godot-vn/common/scene.gd

17 lines
278 B
GDScript

extends Node2D
signal on_scene_ready
signal on_scene_start
func _ready():
if not Game.game_started:
Game.game_started = true
emit_signal("on_scene_ready")
on_scene_start()
else:
emit_signal("on_scene_ready")
func on_scene_start():
emit_signal("on_scene_start")