mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
exports
This commit is contained in:
@@ -39,7 +39,7 @@ func _ready():
|
|||||||
p2_train.hit.connect(_on_hit_player)
|
p2_train.hit.connect(_on_hit_player)
|
||||||
p1_train.game_over.connect(_on_player_game_over)
|
p1_train.game_over.connect(_on_player_game_over)
|
||||||
p2_train.game_over.connect(_on_player_game_over)
|
p2_train.game_over.connect(_on_player_game_over)
|
||||||
p1_train.current_speed = 9
|
p1_train.current_speed = 1
|
||||||
p2_train.current_speed = 6
|
p2_train.current_speed = 6
|
||||||
|
|
||||||
func getMapSize(node, is_start):
|
func getMapSize(node, is_start):
|
||||||
@@ -55,7 +55,11 @@ func getMapSize(node, is_start):
|
|||||||
active_map_nodes += 1
|
active_map_nodes += 1
|
||||||
|
|
||||||
func _on_player_game_over():
|
func _on_player_game_over():
|
||||||
pass
|
$Control/GameOver.visible = true
|
||||||
|
p1_train.current_speed = 0
|
||||||
|
p2_train.current_speed = 0
|
||||||
|
p1_train.visible = false
|
||||||
|
p2_train.visible = false
|
||||||
|
|
||||||
func _on_turn_event():
|
func _on_turn_event():
|
||||||
#
|
#
|
||||||
@@ -76,12 +80,6 @@ func _on_hit_player(player1,dmg):
|
|||||||
else:
|
else:
|
||||||
p2_train.current_speed -= dmg
|
p2_train.current_speed -= dmg
|
||||||
|
|
||||||
if p1_train.current_speed <= .0001 or p2_train.current_speed <= .0001:
|
|
||||||
$Control/GameOver.visible = true
|
|
||||||
p1_train.current_speed = 0
|
|
||||||
p2_train.current_speed = 0
|
|
||||||
p1_train.visible = false
|
|
||||||
p2_train.visible = false
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if(active_pickups.size() < 1):
|
if(active_pickups.size() < 1):
|
||||||
|
|||||||
Reference in New Issue
Block a user