Moved some files around
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
class_name LivesBarSegment
|
||||
extends Control
|
||||
|
||||
var lives_left: int = 6
|
||||
|
||||
func take_life(value: int) -> void:
|
||||
for x: int in value:
|
||||
lives_left -= 1
|
||||
if lives_left == 5:
|
||||
$AnimationPlayer.play("lose1")
|
||||
if lives_left == 4:
|
||||
$AnimationPlayer2.play("lose2")
|
||||
if lives_left == 3:
|
||||
$AnimationPlayer3.play("lose3")
|
||||
if lives_left == 2:
|
||||
$AnimationPlayer4.play("lose4")
|
||||
if lives_left == 1:
|
||||
$AnimationPlayer5.play("lose5")
|
||||
if lives_left == 0:
|
||||
$AnimationPlayer6.play("lose6")
|
||||
@@ -1 +0,0 @@
|
||||
uid://c3ark32u3lct8
|
||||
@@ -1,11 +0,0 @@
|
||||
class_name LivesBar
|
||||
extends TextureRect
|
||||
|
||||
@export var segments: Array[LivesBarSegment]
|
||||
var lives: float = 120.0
|
||||
|
||||
|
||||
func take_life() -> void:
|
||||
var segment_to_animate: int = ceil(lives / 6.0) - 1
|
||||
lives -= 1
|
||||
segments[segment_to_animate].take_life(1)
|
||||
@@ -1 +0,0 @@
|
||||
uid://b3g3hofk5pbcp
|
||||
Reference in New Issue
Block a user