optimize native scripts

This commit is contained in:
2024-09-06 14:58:12 -04:00
parent f0bf277d13
commit a5afa7792a
61 changed files with 45 additions and 96 deletions

View File

@@ -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, {