mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 21:51:55 +00:00
optimize native scripts
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local Camera = {}
|
||||
@@ -51,7 +50,7 @@ function Camera:ZoomIn(Vignette: Vignette?, Crosshair: Crosshair?)
|
||||
if Camera.VignetteEnabled then
|
||||
if Vignette then
|
||||
Vignette.Screen.Enabled = true
|
||||
|
||||
|
||||
VignetteTween:Start(Vignette.Icon, {
|
||||
ImageTransparency = 0
|
||||
}, TweenInfo.new(Camera.FOV.Speed.In, Camera.EffectsEase))
|
||||
@@ -79,7 +78,7 @@ function Camera:ZoomOut(Vignette: Vignette?, Crosshair: Crosshair?)
|
||||
if Camera.VignetteEnabled then
|
||||
if Vignette then
|
||||
Vignette.Screen.Enabled = true
|
||||
|
||||
|
||||
VignetteTween:Start(Vignette.Icon, {
|
||||
ImageTransparency = 1
|
||||
}, TweenInfo.new(Camera.FOV.Speed.Out, Camera.EffectsEase))
|
||||
@@ -87,7 +86,7 @@ function Camera:ZoomOut(Vignette: Vignette?, Crosshair: Crosshair?)
|
||||
warn("Camera: no Vignette object was provided for the camera", debug.traceback())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if Camera.CrosshairEffect then
|
||||
if Crosshair then
|
||||
VignetteTween:Start(Crosshair.Icon, {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
--Couldn't get ContextActionService to work how i wanted
|
||||
@@ -46,7 +45,7 @@ function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings
|
||||
Began = {},
|
||||
Ended = {}
|
||||
}
|
||||
|
||||
|
||||
--Return these for convenience
|
||||
self.InputBegan = UIS.InputBegan:Connect(function(input, gameProcessedEvent)
|
||||
if gameProcessing and gameProcessedEvent or not gameProcessedEvent then
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local Delta = {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local Enums = {}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local RunService = game:GetService("RunService")
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
@@ -1,5 +1,4 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
--Weird type hack for allowing more than 1 property to be defined inside a tween
|
||||
|
||||
Reference in New Issue
Block a user