Actor support 2 and inheritance

This commit is contained in:
2024-02-21 21:07:46 -05:00
parent e5f1a546b1
commit 92743349e5
5 changed files with 29 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
local CrouchModule = {
IsCrouching = false,
StandHeight = 2.1,
CrouchHeight = .6,
WalkSpeedMultiplier = 6,
@@ -23,6 +24,7 @@ function CrouchModule:Crouch(StandingWalkSpeed: number)
HipHeight = CrouchModule.CrouchHeight,
WalkSpeed = math.max(1, StandingWalkSpeed-CrouchModule.WalkSpeedMultiplier)
}, Easing)
CrouchModule.IsCrouching = true
end
function CrouchModule:Stand(CrouchingWalkSpeed: number)
@@ -32,6 +34,7 @@ function CrouchModule:Stand(CrouchingWalkSpeed: number)
HipHeight = CrouchModule.StandHeight,
WalkSpeed = math.max(1, CrouchingWalkSpeed+CrouchModule.WalkSpeedMultiplier)
}, Easing)
CrouchModule.IsCrouching = false
end
return CrouchModule