challenge-editor/test/scene/map_example_2.gd

22 lines
520 B
GDScript3
Raw Normal View History

2024-09-22 17:37:51 +08:00
extends MapIndex
func _on_tool_button_pressed() -> void:
click_scene("scene_tower")
pass # Replace with function body.
func get_scene_global_pos(scene_id:String):
match scene_id:
"scene_tower":
2024-09-23 11:47:55 +08:00
return $TextureRect/ToolButton.global_position+Vector2($TextureRect/ToolButton.size.x/2,0)
2024-10-16 11:54:14 +08:00
"scene_01":
return $TextureRect2.global_position+Vector2($TextureRect2.size.x/2,0)
2024-09-22 17:37:51 +08:00
_:return Vector2(0,0)
pass
func _on_tool_button2_pressed() -> void:
click_scene("scene_01")
pass # Replace with function body.