add oxygen timer
This commit is contained in:
parent
fd218d6b13
commit
e6a393c5e2
22 changed files with 314 additions and 13 deletions
|
@ -15,8 +15,10 @@ func _physics_process(delta):
|
|||
sprite.position.x = sin(lifetime * 4.0) * 4.0
|
||||
position.y -= speed * delta
|
||||
|
||||
func _on_area_entered(area):
|
||||
if area.is_in_group("player_hitbox") or area.is_in_group("arrow"):
|
||||
sprite.frame_coords.y = 1
|
||||
speed = 0.0
|
||||
get_tree().create_timer(0.5, false).connect("timeout", self, "queue_free")
|
||||
func _on_Bubble_body_entered(body):
|
||||
sprite.frame_coords.y = 1
|
||||
speed = 0.0
|
||||
get_tree().create_timer(0.5, false).connect("timeout", self, "queue_free")
|
||||
if body.is_in_group("player"):
|
||||
body.oxygen_timer.start()
|
||||
Audio.play_sound(Audio.a_bubble,Audio.ac_die)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue