mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
more native changes
This commit is contained in:
@@ -110,6 +110,7 @@ local DoorAnimations = {
|
||||
} :: DoorAnimationsMap
|
||||
|
||||
--Cab doors--
|
||||
@native
|
||||
function DoorAnimations.Cab.SingleSpeed(self, AnimationTime, Door1Position, OpenToVec1)
|
||||
local ElevatorY = Vector3.new(0, self.ElevatorBox.Position.Y, 0)
|
||||
local ElevatorDoor1_Goal = Vector3.new(OpenToVec1.X, 0, OpenToVec1.Z)
|
||||
@@ -118,6 +119,7 @@ function DoorAnimations.Cab.SingleSpeed(self, AnimationTime, Door1Position, Open
|
||||
CabDoor1.Position = ElevatorY+CabDoor1.Position:Lerp(OpenToVec1+ElevatorDoor1_Goal, Algebra.Easing.OutQuad(AnimationTime))
|
||||
end
|
||||
|
||||
@native
|
||||
function DoorAnimations.Cab.DoubleSpeed(self, AnimationTime, Door1Position, Door2Position, OpenToVec1, OpenToVec2)
|
||||
local OutQuad = Algebra.Easing.OutQuad(AnimationTime)
|
||||
local ElevatorY = Vector3.new(0, self.ElevatorBox.Position.Y, 0)
|
||||
@@ -130,6 +132,7 @@ function DoorAnimations.Cab.DoubleSpeed(self, AnimationTime, Door1Position, Door
|
||||
CabDoor2.Position = Door2Position:Lerp(OpenToVec2, OutQuad)
|
||||
end
|
||||
|
||||
@native
|
||||
function DoorAnimations.Cab.TripleSpeed(self, AnimationTime, Door1Position, Door2Position, Door3Position, OpenToVec1, OpenToVec2, OpenToVec3)
|
||||
local OutQuad = Algebra.Easing.OutQuad(AnimationTime)
|
||||
local ElevatorY = Vector3.new(0, self.ElevatorBox.Position.Y, 0)
|
||||
@@ -147,6 +150,7 @@ end
|
||||
----
|
||||
|
||||
--Floor doors--
|
||||
@native
|
||||
function DoorAnimations.Landing.SingleSpeed(self, Floor, AnimationTime, Door1Position, OpenToVec1)
|
||||
(self.DoorsTree.Hall[Floor][1] :: BasePart).Position = Door1Position:Lerp(OpenToVec1, Algebra.Easing.OutQuad(AnimationTime))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user