Clase de motor
Sky
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Resumen
Propiedades
MoonTextureId:ContentId |
SkyboxBk:ContentId |
SkyboxDn:ContentId |
SkyboxFt:ContentId |
SkyboxLf:ContentId |
SkyboxRt:ContentId |
SkyboxUp:ContentId |
SunTextureId:ContentId |
Referencia API
Propiedades
MoonTextureId
Sky.MoonTextureId:ContentId
SkyboxBk
Sky.SkyboxBk:ContentId
SkyboxDn
Sky.SkyboxDn:ContentId
SkyboxFt
Sky.SkyboxFt:ContentId
SkyboxLf
Sky.SkyboxLf:ContentId
SkyboxOrientation
Muestras de código
Orientación del cielo con Tween
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local sky = Lighting:FindFirstChild("Sky")
local ROTATION_SPEED = 4 -- En grados por segundo
local MAX_TILT = 2 -- En grados
local TILT_SPEED = 4
local currentTilt = Instance.new("NumberValue")
currentTilt.Value = -MAX_TILT
local tweenGoal = { Value = MAX_TILT }
local tweenInfo = TweenInfo.new(TILT_SPEED, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true)
local tween = TweenService:Create(currentTilt, tweenInfo, tweenGoal)
tween:Play()
RunService.Heartbeat:Connect(function(deltaTime)
sky.SkyboxOrientation =
Vector3.new(currentTilt.Value, (sky.SkyboxOrientation.Y + ROTATION_SPEED * deltaTime) % 360, 0)
end)SkyboxRt
Sky.SkyboxRt:ContentId
SkyboxUp
Sky.SkyboxUp:ContentId
SunTextureId
Sky.SunTextureId:ContentId