mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
Some Fake Bowser Fixes (#635)
This PR fixes the issues mentioned in #557 with Fake and Real Bowsers. Also for fun, I got the Bowser fall SFX to work when you kill a REAL Bowser or Bowser Bro by moving it outside of Bowser before they were freed from the scene.
This commit is contained in:
@@ -50,15 +50,12 @@ func get_target_y(player: Player) -> float:
|
||||
return player.global_position.y - 8
|
||||
|
||||
func show_smoke() -> void:
|
||||
# guzlad: ugly but it'll have to do until we move the metadata stuff to actual variables
|
||||
if (((Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL) or (Global.current_game_mode == Global.GameMode.LEVEL_EDITOR)) and !is_real):
|
||||
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
|
||||
smoke.scale = Vector2(2, 2)
|
||||
smoke.global_position =global_position
|
||||
AudioManager.play_sfx("magic", global_position)
|
||||
add_sibling(smoke)
|
||||
elif has_meta("is_real"):
|
||||
return
|
||||
if is_real: return
|
||||
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
|
||||
smoke.scale = Vector2(2, 2)
|
||||
smoke.global_position =global_position
|
||||
AudioManager.play_sfx("magic", global_position)
|
||||
add_sibling(smoke)
|
||||
|
||||
func breathe_fire() -> void:
|
||||
if can_fire == false:
|
||||
@@ -133,7 +130,8 @@ func fireball_hit() -> void:
|
||||
func play_music() -> void:
|
||||
for i: EntityGenerator in get_tree().get_nodes_in_group("EntityGenerators"):
|
||||
if i.entity_scene != null:
|
||||
if i.entity_scene.resource_path == "res://Scenes/Prefabs/Entities/Enemies/BowserFlame.tscn":
|
||||
if i.entity_scene.resource_path == "res://Scenes/
|
||||
Prefabs/Entities/Enemies/BowserFlame.tscn":
|
||||
i.queue_free()
|
||||
if Settings.file.audio.extra_bgm == 0: return
|
||||
if Global.level_editor != null:
|
||||
@@ -141,6 +139,14 @@ func play_music() -> void:
|
||||
if music_enabled:
|
||||
AudioManager.set_music_override(AudioManager.MUSIC_OVERRIDES.BOWSER, 5, false)
|
||||
|
||||
|
||||
func on_timeout() -> void:
|
||||
move_dir = [-1, 1].pick_random()
|
||||
|
||||
func on_gib_about_to_spawn() -> void:
|
||||
if is_real:
|
||||
$FallSFX.play()
|
||||
$FallSFX.finished.connect($FallSFX.queue_free)
|
||||
$FallSFX.reparent(get_parent())
|
||||
# guzlad: ugly but it'll have to do until we move the metadata stuff to actual variables
|
||||
if ((Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL) or (Global.current_game_mode == Global.GameMode.LEVEL_EDITOR)) and !is_real:
|
||||
$SpriteScaleJoint/DeathSprite/ResourceSetterNew.resource_json = load("res://Assets/Sprites/Enemies/Goomba.json")
|
||||
|
Reference in New Issue
Block a user