2014-10-03 03:25:53 +00:00
|
|
|
|
|
|
|
extends Control
|
|
|
|
|
2015-11-21 12:31:25 +00:00
|
|
|
# Member variables
|
2015-12-09 07:38:23 +00:00
|
|
|
var town = null
|
2014-10-03 03:25:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _back():
|
|
|
|
town.queue_free()
|
|
|
|
show()
|
|
|
|
|
|
|
|
|
2015-12-09 07:38:23 +00:00
|
|
|
func _load_scene(car):
|
2014-10-03 03:25:53 +00:00
|
|
|
var tt = load(car).instance()
|
|
|
|
tt.set_name("car")
|
|
|
|
town = load("res://truck_scene.scn").instance()
|
|
|
|
town.get_node("instance_pos").add_child(tt)
|
2015-12-09 07:38:23 +00:00
|
|
|
town.get_node("back").connect("pressed", self, "_back")
|
2014-10-03 03:25:53 +00:00
|
|
|
get_parent().add_child(town)
|
|
|
|
hide()
|
|
|
|
|
|
|
|
|
2015-12-09 07:38:23 +00:00
|
|
|
func _on_van_1_pressed():
|
2014-10-03 03:25:53 +00:00
|
|
|
_load_scene("res://car_base.scn")
|
|
|
|
|
|
|
|
|
|
|
|
func _on_van_2_pressed():
|
|
|
|
_load_scene("res://trailer_truck.scn")
|
|
|
|
|
|
|
|
|
|
|
|
func _on_van_3_pressed():
|
|
|
|
_load_scene("res://crane.scn")
|