added infinite lives mode
This commit is contained in:
parent
f19a49f6e7
commit
ed04bf1c2e
13 changed files with 109 additions and 11 deletions
|
@ -17,6 +17,11 @@ export (Color) var bonus_color
|
|||
|
||||
func _ready():
|
||||
Game.time = 0
|
||||
#Change graphics depending on if lives are on
|
||||
if Game.use_lives:
|
||||
$LivesHead.visible = true
|
||||
else:
|
||||
$DeathsHead.visible = true
|
||||
|
||||
func _physics_process(delta):
|
||||
#Gold Counter
|
||||
|
@ -35,7 +40,10 @@ func _physics_process(delta):
|
|||
arrow_counter.text = str(Game.arrows)
|
||||
##TOUCH UP LATER
|
||||
#Lives counter
|
||||
lives_counter.text = str(Game.lives)
|
||||
if Game.use_lives:
|
||||
lives_counter.text = str(Game.lives)
|
||||
else:
|
||||
lives_counter.text = str(Game.deaths)
|
||||
#Life bonus color
|
||||
if Game.lives == 2:
|
||||
lives_counter.modulate = bonus_color
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1]
|
||||
[ext_resource path="res://graphics/hud/lives_head.png" type="Texture" id=2]
|
||||
[ext_resource path="res://graphics/hud/hud.png" type="Texture" id=3]
|
||||
[ext_resource path="res://graphics/hud/deaths_head.png" type="Texture" id=4]
|
||||
[ext_resource path="res://objects/hud/hud.gd" type="Script" id=6]
|
||||
[ext_resource path="res://scripts/theme.tres" type="Theme" id=10]
|
||||
|
||||
|
@ -72,6 +74,16 @@ texture = ExtResource( 1 )
|
|||
region_enabled = true
|
||||
region_rect = Rect2( 32, 0, 8, 8 )
|
||||
|
||||
[node name="LivesHead" type="Sprite" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 234, 6 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="DeathsHead" type="Sprite" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 236, 6 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="ScoreText" type="Label" parent="."]
|
||||
margin_left = 137.0
|
||||
margin_top = -1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue