mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-23 07:58:09 +00:00
Change 1-up flagpole to replace the 5000 point bonus (#550)
* Change 1-up flagpole to replace the 5000 point bonus * Also no 1-ups in you vs boo * Update EndFlagpole.gd * Style * Update EndFlagpole.tscn
This commit is contained in:

committed by
GitHub

parent
1a0173f095
commit
568d45ee31
@@ -6,17 +6,10 @@ signal player_reached
|
||||
|
||||
signal sequence_begin
|
||||
|
||||
func _ready() -> void:
|
||||
if Settings.file.difficulty.flagpole_lives == 0:
|
||||
print(Settings.file.difficulty)
|
||||
$Top.queue_free()
|
||||
|
||||
func on_area_entered(area: Area2D) -> void:
|
||||
if area.owner is Player:
|
||||
player_touch(area.owner)
|
||||
|
||||
|
||||
|
||||
func player_touch(player: Player) -> void:
|
||||
player_reached.emit()
|
||||
if Global.current_game_mode == Global.GameMode.MARATHON_PRACTICE:
|
||||
@@ -50,10 +43,10 @@ func give_points(player: Player) -> void:
|
||||
var value = clamp(int(lerp(0, 4, (player.global_position.y / -144))), 0, 4)
|
||||
var nearest_value = FLAG_POINTS[value]
|
||||
$Score.text = str(nearest_value)
|
||||
Global.score += nearest_value
|
||||
$Score/Animation2.play("ScoreRise")
|
||||
|
||||
func on_player_entered(player: Player) -> void:
|
||||
player_touch(player)
|
||||
Global.lives += 1
|
||||
AudioManager.play_sfx("1_up", global_position)
|
||||
if nearest_value == 5000 and Settings.file.difficulty.flagpole_lives and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives:
|
||||
AudioManager.play_sfx("1_up", global_position)
|
||||
Global.lives += 1
|
||||
$ScoreNoteSpawner.spawn_one_up_note()
|
||||
else:
|
||||
Global.score += nearest_value
|
||||
$Score/Animation2.play("ScoreRise")
|
||||
|
Reference in New Issue
Block a user