Update init.lua
This commit is contained in:
parent
b6a19b47a6
commit
5ca0051112
1 changed files with 20 additions and 5 deletions
|
@ -237,25 +237,37 @@ end
|
||||||
function Mario.PlayLandingSound(m: Mario, sound: Instance?)
|
function Mario.PlayLandingSound(m: Mario, sound: Instance?)
|
||||||
local sound = sound or Sounds.ACTION_TERRAIN_LANDING
|
local sound = sound or Sounds.ACTION_TERRAIN_LANDING
|
||||||
|
|
||||||
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_LANDING else sound
|
-- stylua: ignore
|
||||||
|
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP)
|
||||||
|
then Sounds.ACTION_METAL_LANDING
|
||||||
|
else sound
|
||||||
|
|
||||||
m:PlaySoundAndSpawnParticles(landSound, 1)
|
m:PlaySoundAndSpawnParticles(landSound, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Mario.PlayLandingSoundOnce(m: Mario, sound: Instance?)
|
function Mario.PlayLandingSoundOnce(m: Mario, sound: Instance?)
|
||||||
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_LANDING else sound
|
-- stylua: ignore
|
||||||
|
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP)
|
||||||
|
then Sounds.ACTION_METAL_LANDING
|
||||||
|
else sound
|
||||||
|
|
||||||
m:PlayActionSound(landSound, 1)
|
m:PlayActionSound(landSound, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Mario.PlayHeavyLandingSound(m: Mario, sound: Instance?)
|
function Mario.PlayHeavyLandingSound(m: Mario, sound: Instance?)
|
||||||
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_HEAVY_LANDING else sound
|
-- stylua: ignore
|
||||||
|
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP)
|
||||||
|
then Sounds.ACTION_METAL_HEAVY_LANDING
|
||||||
|
else sound
|
||||||
|
|
||||||
m:PlaySoundAndSpawnParticles(landSound, 1)
|
m:PlaySoundAndSpawnParticles(landSound, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Mario.PlayHeavyLandingSoundOnce(m: Mario, sound: Instance?)
|
function Mario.PlayHeavyLandingSoundOnce(m: Mario, sound: Instance?)
|
||||||
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_HEAVY_LANDING else sound
|
-- stylua: ignore
|
||||||
|
local landSound = if m.Flags:Has(MarioFlags.METAL_CAP)
|
||||||
|
then Sounds.ACTION_METAL_HEAVY_LANDING
|
||||||
|
else sound
|
||||||
|
|
||||||
m:PlayActionSound(landSound, 1)
|
m:PlayActionSound(landSound, 1)
|
||||||
end
|
end
|
||||||
|
@ -266,7 +278,10 @@ function Mario.PlayMarioSound(m: Mario, actionSound: Instance, marioSound: Insta
|
||||||
end
|
end
|
||||||
|
|
||||||
if actionSound == Sounds.ACTION_TERRAIN_JUMP then
|
if actionSound == Sounds.ACTION_TERRAIN_JUMP then
|
||||||
local sound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_JUMP else actionSound
|
-- stylua: ignore
|
||||||
|
local sound = if m.Flags:Has(MarioFlags.METAL_CAP)
|
||||||
|
then Sounds.ACTION_METAL_JUMP
|
||||||
|
else actionSound
|
||||||
|
|
||||||
m:PlayActionSound(sound)
|
m:PlayActionSound(sound)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue