lose condition
This commit is contained in:
parent
b1b5d6e186
commit
8ce9ada279
3
Rock.gd
3
Rock.gd
@ -8,6 +8,9 @@ var last_mv_delta = 0
|
|||||||
func get_fall_offset():
|
func get_fall_offset():
|
||||||
var state = get_parent().get_state()
|
var state = get_parent().get_state()
|
||||||
var tile_below = get_pos() + Vector2(0, 1)
|
var tile_below = get_pos() + Vector2(0, 1)
|
||||||
|
if state.player_pos == tile_below:
|
||||||
|
OS.window_size = Vector2(1024,600)
|
||||||
|
get_tree().change_scene("res://Defeat.tscn")
|
||||||
if tile_below.y > len(state.level_map) - 1:
|
if tile_below.y > len(state.level_map) - 1:
|
||||||
return null
|
return null
|
||||||
if state.get_type(tile_below) == "Empty":
|
if state.get_type(tile_below) == "Empty":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user