mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-17 03:51:53 +00:00
actions module
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local Bobbing = {}
|
||||
Bobbing.__index = Bobbing
|
||||
|
||||
@@ -84,8 +88,7 @@ local function CameraAnimation(self, dt: deltatime)
|
||||
|
||||
--go go boolean algebra
|
||||
local MaxMinY: boolean = Camera_YArc(self.CurrentCamera)>Bobbing.MaxGimbalLockY --TODO: instead, make this an equation so it will just subtract from the existing animation radians
|
||||
local ForceStop: boolean = Bobbing.ForceStop and "Stop"
|
||||
local AnimationType: string = ForceStop or RootMagnitude>1 and "Walk" or (not MaxMinY and "Idle" or "Stop")
|
||||
local AnimationType: string = Bobbing.ForceStop and "Stop" or RootMagnitude>1 and "Walk" or (not MaxMinY and "Idle" or "Stop")
|
||||
local CurrentAnimation: CFrame = Animations[AnimationType](Bobbing.Tick, dt)
|
||||
|
||||
--"Lerp" so the transitions between walking and idling are smoothed instead of instant
|
||||
|
||||
Reference in New Issue
Block a user