its done?
This commit is contained in:
parent
d5455ef493
commit
0191cadf6a
8 changed files with 138 additions and 43 deletions
20
cyclone_spawner.gd
Normal file
20
cyclone_spawner.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
extends Node2D
|
||||
|
||||
var loaded : bool = false
|
||||
signal spawn(spawn_position : Vector2)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
visible = loaded
|
||||
if loaded:
|
||||
global_position = get_global_mouse_position()
|
||||
if(Input.is_action_just_pressed("spawn")):
|
||||
loaded = false
|
||||
spawn.emit(get_global_mouse_position())
|
||||
if(Input.is_action_just_pressed("cancel_spawn")):
|
||||
loaded = false
|
||||
Loading…
Add table
Add a link
Reference in a new issue