added infinite lives mode
This commit is contained in:
parent
f19a49f6e7
commit
ed04bf1c2e
13 changed files with 109 additions and 11 deletions
8
game.gd
8
game.gd
|
@ -14,6 +14,7 @@ var arrows = 0
|
|||
var score = 0
|
||||
var high_score = 0
|
||||
var lives = 2
|
||||
var deaths = 0
|
||||
var time = 0.0
|
||||
#Audio Channels
|
||||
onready var ac_jump = $JumpSound
|
||||
|
@ -39,13 +40,17 @@ const a_gover = preload("res://audio/sounds/gover.wav")
|
|||
#Objects
|
||||
const block_text = preload("res://objects/hud/blocktext.tscn")
|
||||
const pause_screen = preload("res://objects/hud/pause_screen.tscn")
|
||||
#Game info
|
||||
var respawn_point = Vector2(32,166) #Respawn point
|
||||
var current_level = 0 #Current level being played
|
||||
var current_file = 1 #Current save file
|
||||
var shards_collected = [false,false,false,false,false,false,false,false,false,false]
|
||||
var is_marathon_mode = false
|
||||
var use_lives = false
|
||||
|
||||
func _ready():
|
||||
Save.load_file(current_file)
|
||||
Save.load_options()
|
||||
|
||||
#Instances a node
|
||||
func instance_node(node:PackedScene,x:float,y:float,parent):
|
||||
|
@ -83,6 +88,7 @@ func clear_collectibles():
|
|||
Game.shards_collected = [false,false,false,false,false,false,false,false,false,false]
|
||||
Game.arrows = 0
|
||||
Game.lives = 2
|
||||
Game.deaths = 0
|
||||
|
||||
#Save
|
||||
func save():
|
||||
|
@ -98,6 +104,8 @@ func save():
|
|||
for i in 8:
|
||||
if shards_collected[i]:
|
||||
Save.set_shard_collected(save_id, i, true)
|
||||
# set options
|
||||
Save.set_options()
|
||||
# save file
|
||||
Save.save_file(current_file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue