cutscene progress.
This commit is contained in:
16
addons/cutscene_editor/editor/nodes/TurnActionNode.gd
Executable file → Normal file
16
addons/cutscene_editor/editor/nodes/TurnActionNode.gd
Executable file → Normal file
@@ -6,21 +6,27 @@ extends "res://addons/cutscene_editor/editor/nodes/BaseGraphNode.gd"
|
||||
|
||||
func _init() -> void:
|
||||
node_type = "turn"
|
||||
name = "turn_" + str(randi())
|
||||
node_id = "turn_" + str(randi())
|
||||
title = "Turn"
|
||||
modulate = Color(0.5, 1.0, 0.5) # Green
|
||||
|
||||
# One input and one output connection
|
||||
var slot = 0
|
||||
set_slot(slot, true, 0, Color(0, 0, 0), true, 0, Color(0, 0, 0))
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
# Initialize default parameters
|
||||
action_parameters["character"] = ""
|
||||
action_parameters["target"] = ""
|
||||
action_parameters["turn_speed"] = 2.0
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
# Initialize default parameters
|
||||
|
||||
|
||||
func _parameters_to_view() -> void:
|
||||
$VBoxContainer/character.text = action_parameters["character"]
|
||||
$VBoxContainer/target.text = action_parameters["target"]
|
||||
$VBoxContainer/turn_speed.text = str(action_parameters["turn_speed"])
|
||||
|
||||
func _on_character_changed(new_text: String) -> void:
|
||||
set_parameter("character", new_text)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user