forked from team-sg/hero-mark-2
made some changes :)
This commit is contained in:
parent
4cc10fae6e
commit
bc5f2606a0
12 changed files with 92 additions and 49 deletions
29
maps/map.gd
Normal file
29
maps/map.gd
Normal file
|
@ -0,0 +1,29 @@
|
|||
extends Node2D
|
||||
export var target_time_any = 0
|
||||
export var target_time_100 = 0
|
||||
export var save_location = 0
|
||||
export (AudioStream) var music
|
||||
|
||||
#Bonuses
|
||||
var time_bonus = true
|
||||
var life_bonus = true
|
||||
var collectible_bonus = false
|
||||
|
||||
func _ready():
|
||||
Game.play_sound(load("res://audio/music/rumble_loop.mp3"),Game.ac_music)
|
||||
Game.current_level = save_location
|
||||
|
||||
func _physics_process(delta):
|
||||
if Game.golds == 50 && Game.shards == 5:
|
||||
#Time bonus
|
||||
collectible_bonus = true
|
||||
#Time bonus
|
||||
if Game.time <= target_time_100:
|
||||
time_bonus = true
|
||||
else:
|
||||
time_bonus = false
|
||||
else:
|
||||
if Game.time <= target_time_any:
|
||||
time_bonus = true
|
||||
else:
|
||||
time_bonus = false
|
Loading…
Add table
Add a link
Reference in a new issue