progress
This commit is contained in:
12
addons/cutscene_editor/editor/nodes/MoveActionNode.gd
Normal file → Executable file
12
addons/cutscene_editor/editor/nodes/MoveActionNode.gd
Normal file → Executable file
@@ -6,7 +6,7 @@ extends "res://addons/cutscene_editor/editor/nodes/BaseGraphNode.gd"
|
||||
|
||||
func _init() -> void:
|
||||
node_type = "move"
|
||||
node_id = "move_" + str(randi())
|
||||
name = "move_" + str(randi())
|
||||
title = "Move"
|
||||
modulate = Color(0.4, 0.6, 1.0) # Blue
|
||||
|
||||
@@ -22,6 +22,16 @@ func _ready() -> void:
|
||||
action_parameters["target_y"] = 0.0
|
||||
action_parameters["speed"] = 100.0
|
||||
|
||||
func set_parameter(pname, value) -> void:
|
||||
super.set_parameter(name, value)
|
||||
if pname == "character":
|
||||
$VBoxContainer/CharacterEDit.text = value
|
||||
elif pname == "target_x":
|
||||
$VBoxContainer/HBoxContainer/x.text = value
|
||||
elif pname == "target_y":
|
||||
$VBoxContainer/HBoxContainer/y.text = value
|
||||
elif pname == "speed":
|
||||
$VBoxContainer/speed.text = value
|
||||
func _on_character_changed(new_text: String) -> void:
|
||||
set_parameter("character", new_text)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user