godot-vn/common/scene.gd

16 lines
293 B
GDScript3
Raw Normal View History

2018-09-21 02:43:57 +01:00
extends Node2D
2018-09-21 18:51:38 +01:00
onready var bg_sprite = get_node("background")
2018-09-21 18:45:08 +01:00
2018-09-21 02:43:57 +01:00
signal on_scene_ready
2018-09-21 03:54:04 +01:00
signal on_scene_start
2018-09-21 02:43:57 +01:00
func _ready():
2018-09-21 18:51:38 +01:00
Game.game_started = true
emit_signal("on_scene_ready")
2018-09-21 03:54:04 +01:00
func on_scene_start():
2018-09-21 18:45:08 +01:00
emit_signal("on_scene_start")
func set_background(bg_tex):
bg_sprite.texture = bg_tex