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
|
@ -52,7 +52,7 @@ func _physics_process(delta):
|
|||
Debug.print(get_viewport().get_mouse_position())
|
||||
#Debug 1
|
||||
if Input.is_action_just_pressed(\"debug_1\"):
|
||||
Game.save()
|
||||
Game.change_map(load(\"res://maps/level_select.tscn\"))
|
||||
#Debug 2
|
||||
if Input.is_action_just_pressed(\"debug_2\"):
|
||||
var save = ConfigFile.new()
|
||||
|
|
|
@ -18,18 +18,26 @@ func _on_Area2D_area_entered(area):
|
|||
if area.is_in_group("player"):
|
||||
if Game.score > Game.high_score: Game.high_score = Game.score
|
||||
#BONUSES
|
||||
#Time bonus
|
||||
if Game.golds == 50 && Game.shards == 5:
|
||||
if Game.time < map.target_time_100: Game.score += floor(2500 * (Game.time / map.target_time_100))
|
||||
else:
|
||||
if Game.time < map.target_time_any: Game.score += floor(2500 * (Game.time / map.target_time_any))
|
||||
#Collection bonus
|
||||
if Game.golds == 50: Game.score += 500
|
||||
if Game.shards == 5: Game.score += 500
|
||||
if Game.golds == 50 && Game.shards == 5: Game.score += 250
|
||||
if Game.golds == 50 && Game.shards == 5:
|
||||
Game.score += 250
|
||||
Game.shards_collected[5] = true
|
||||
#Time bonus
|
||||
if Game.golds == 50 && Game.shards == 5:
|
||||
if Game.time < map.target_time_100:
|
||||
Game.score += floor(2500 * (Game.time / map.target_time_100))
|
||||
Game.shards_collected[6] = true
|
||||
else:
|
||||
if Game.time < map.target_time_any:
|
||||
Game.score += floor(2500 * (Game.time / map.target_time_any))
|
||||
Game.shards_collected[6] = true
|
||||
#Life bonus
|
||||
if Game.lives == 1: Game.score += 500
|
||||
if Game.lives == 2: Game.score += 1500
|
||||
if Game.lives == 2:
|
||||
Game.score += 1500
|
||||
Game.shards_collected[7] = true
|
||||
#Perfect bonus
|
||||
if Game.lives == 2 && Game.golds == 50 && Game.shards == 5 && Game.time < map.target_time_100:
|
||||
Game.score += 1000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue