godot-vn/common/scene.gd

16 lines
293 B
GDScript

extends Node2D
onready var bg_sprite = get_node("background")
signal on_scene_ready
signal on_scene_start
func _ready():
Game.game_started = true
emit_signal("on_scene_ready")
func on_scene_start():
emit_signal("on_scene_start")
func set_background(bg_tex):
bg_sprite.texture = bg_tex