mmmhh
This commit is contained in:
1 parent
c6f6fbfac8
commit
7c3fd134e7
7 files changed
+116
-27
No files matched your search
@@ -2,21 +2,17 @@ extends Node
|
||||
|
||||
var _win_screen_scene
|
||||
var _fighting_scene_path = "res://Ingame/Testing.tscn"
|
||||
|
||||
#test vars
|
||||
var test = 0
|
||||
var tested = false
|
||||
signal player_win(player_id)
|
||||
|
||||
|
||||
var _fighting_scene
|
||||
var _body_build_scene
|
||||
|
||||
func _ready():
|
||||
_win_screen_scene = preload("res://UI/WinScreen.tscn").instance()
|
||||
#_fighting_scene = preload("res://Ingame/Testing.tscn").instance()
|
||||
_body_build_scene = preload("res://BodyConfig/bodyBuilderMenu.tscn").instance()
|
||||
_fighting_scene = preload("res://Ingame/Testing.tscn").instance()
|
||||
|
||||
connect("player_win", self, "_switch_to_win")
|
||||
_win_screen_scene.connect("start_fight", self, "_switch_to_fighting")
|
||||
|
||||
InGameState.connect("player_win", self, "_switch_to_win")
|
||||
_body_build_scene.connect("start_fight", self, "_switch_to_fighting")
|
||||
_win_screen_scene.connect("build_body", self, "_switch_to_body_build")
|
||||
|
||||
func _switch_scene(scene):
|
||||
#delete children
|
||||
@@ -35,15 +31,11 @@ func _switch_to_win(player_id):
|
||||
|
||||
|
||||
func _switch_to_fighting():
|
||||
#_switch_scene(_fighting_scene)
|
||||
get_tree().reload_current_scene()
|
||||
print("oh fuck")
|
||||
|
||||
_switch_scene(_fighting_scene)
|
||||
#get_tree().reload_current_scene()
|
||||
|
||||
|
||||
# test
|
||||
#func _process(delta):
|
||||
#if test > 3 and not tested:
|
||||
#tested = true
|
||||
#test = 0
|
||||
#emit_signal("player_win", 1)
|
||||
#else:
|
||||
#test += delta
|
||||
func _switch_to_body_build():
|
||||
_switch_scene(_body_build_scene)
|
||||
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Controllers/GameStateController.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Ingame/Testing.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://BodyConfig/bodyBuilderMenu.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="GameStateController" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="InGame" parent="." instance=ExtResource( 2 )]
|
||||
[node name="Body Builder Menu" parent="." instance=ExtResource( 2 )]
|
||||
Reference in new issue
Block a user