mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
skid particles + extra particles setting
This commit is contained in:
@@ -19,7 +19,7 @@ func collect() -> void:
|
||||
DiscoLevel.combo_meter += 10
|
||||
Global.score += 200
|
||||
AudioManager.play_sfx("coin", global_position)
|
||||
if can_spawn_particles:
|
||||
if can_spawn_particles and Settings.file.visuals.extra_particles == 1:
|
||||
summon_particle()
|
||||
$Sprite.queue_free()
|
||||
else:
|
||||
|
@@ -25,16 +25,14 @@ func collected() -> void:
|
||||
ChallengeModeHandler.red_coins += 1
|
||||
Global.score += 200
|
||||
ChallengeModeHandler.set_value(id, true)
|
||||
if can_spawn_particles:
|
||||
if can_spawn_particles and Settings.file.visuals.extra_particles == 1:
|
||||
summon_particle()
|
||||
$Sprite.queue_free()
|
||||
else:
|
||||
queue_free()
|
||||
queue_free()
|
||||
|
||||
func summon_particle() -> void:
|
||||
var node = COIN_SPARKLE.instantiate()
|
||||
node.finished.connect(queue_free)
|
||||
add_child(node)
|
||||
node.global_position = global_position
|
||||
add_sibling(node)
|
||||
|
||||
func summon_bounced_coin() -> void:
|
||||
var node = SPINNING_RED_COIN.instantiate()
|
||||
|
@@ -17,7 +17,7 @@ func _physics_process(delta: float) -> void:
|
||||
velocity.y += (15 / delta) * delta
|
||||
|
||||
func vanish() -> void:
|
||||
if can_spawn_particles:
|
||||
if can_spawn_particles and Settings.file.visuals.extra_particles == 1:
|
||||
summon_particle()
|
||||
$Sprite.queue_free()
|
||||
else:
|
||||
|
@@ -28,14 +28,12 @@ func _physics_process(delta: float) -> void:
|
||||
velocity.y += (15 / delta) * delta
|
||||
|
||||
func vanish() -> void:
|
||||
if can_spawn_particles:
|
||||
$Sprite.queue_free()
|
||||
if can_spawn_particles and Settings.file.visuals.extra_particles == 1:
|
||||
summon_particle()
|
||||
else:
|
||||
queue_free()
|
||||
queue_free()
|
||||
|
||||
func summon_particle() -> void:
|
||||
var node = COIN_SPARKLE.instantiate()
|
||||
node.finished.connect(queue_free)
|
||||
node.global_position = global_position
|
||||
node.global_position = $Sprite.global_position
|
||||
add_sibling(node)
|
||||
|
Reference in New Issue
Block a user