Sky
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Tóm tắt
Thuộc Tính
MoonTextureId:ContentId |
SkyboxBk:ContentId |
SkyboxDn:ContentId |
SkyboxFt:ContentId |
SkyboxLf:ContentId |
SkyboxRt:ContentId |
SkyboxUp:ContentId |
SunTextureId:ContentId |
Tài Liệu Tham Khảo API
Thuộc Tính
Moon Texture Id
Sky. Moon Texture Id:ContentId
Skybox Bk
Sky. Skybox Bk:ContentId
Skybox Dn
Sky. Skybox Dn:ContentId
Skybox Ft
Sky. Skybox Ft:ContentId
Skybox Lf
Sky. Skybox Lf:ContentId
Skybox Orientation
Mẫu mã
Hướng Skybox với 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 -- Độ trong mỗi giây
local MAX_TILT = 2 -- Độ
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)Skybox Rt
Sky. Skybox Rt:ContentId
Skybox Up
Sky. Skybox Up:ContentId
Sun Texture Id
Sky. Sun Texture Id:ContentId