Reworked ending code to be more player node determined; added heart
animation; added reversable cloud scale toggle.
This commit is contained in:
parent
2db69a689b
commit
5bf3078953
10 changed files with 125 additions and 34 deletions
|
|
@ -14,6 +14,7 @@ var shield: int = 0:
|
|||
|
||||
var pause: bool = false
|
||||
var can_shoot = false
|
||||
var can_win = false
|
||||
var shader_active: bool = false:
|
||||
set(value):
|
||||
if value == true:
|
||||
|
|
@ -127,21 +128,35 @@ func _on_area_entered(area):
|
|||
|
||||
if area.is_in_group("horse"):
|
||||
print("Entered horse!")
|
||||
shield -= int(max_shield / 2)
|
||||
_on_damage_taken()
|
||||
#shield -= int(max_shield / 2)
|
||||
#_on_damage_taken()
|
||||
|
||||
if area.is_in_group("boss"):
|
||||
print("Entered boss!")
|
||||
shield -= int(max_shield / 2)
|
||||
_on_damage_taken()
|
||||
|
||||
if can_win == true:
|
||||
print("You can win!")
|
||||
area.reparent(self)
|
||||
EventBus.win_game.emit()
|
||||
|
||||
elif can_win == false:
|
||||
shield -= int(max_shield / 2)
|
||||
_on_damage_taken()
|
||||
|
||||
if area.is_in_group("heart"):
|
||||
print("Got the heart!")
|
||||
pause = true
|
||||
reparent(area)
|
||||
#pause = true
|
||||
area.reparent(self)
|
||||
EventBus.heart_beat.emit(2.0)
|
||||
ship.frame = 0
|
||||
can_win = true
|
||||
EventBus.ending.emit(1)
|
||||
|
||||
#if area.is_in_group("boss") and can_win == true:
|
||||
print("You can win!")
|
||||
self.monitoring = false
|
||||
|
||||
|
||||
|
||||
func _on_damage_taken():
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue