代码拉取完成,页面将自动刷新
local checkShadows = false
function DoPlayerShadows( currentRun )
local shadowIds = GetIds({ Name = "PlayerShadows" })
local heroId = currentRun.Hero.ObjectId
local inShadow = "InShadow"
local outOfShadow = "OutOfShadow"
checkShadows = true
while( checkShadows ) do
NotifyOnCollide({ Id = heroId, DestinationIds = shadowIds, Notify = inShadow })
waitUntil( inShadow )
SetThingProperty({ Property = "Ambient", Value = 0.7, DestinationId = currentRun.Hero.ObjectId })
if checkShadows then
NotifyNotColliding({ Id = heroId, DestinationIds = shadowIds, Notify = outOfShadow })
waitUntil( outOfShadow )
SetThingProperty({ Property = "Ambient", Value = 0.0, DestinationId = currentRun.Hero.ObjectId })
end
end
end
function SetupRoomArt( currentRun, currentRoom )
local currentArea = currentRun.CurrentRoom.RoomSetName
if currentArea == "Secrets" then
thread( DoPlayerShadows, currentRun )
CreateAnimation({ Name = "ReflectionBlob", DestinationId = currentRun.Hero.ObjectId, OffsetY = 100, Scale = 1 })
elseif currentArea == "Tartarus" then
thread( DoPlayerShadows, currentRun )
end
if currentRoom.FootstepAnimationL ~= nil then
SwapAnimation({ Name = "FireFootstepL-Spawner", DestinationName = currentRoom.FootstepAnimationL })
end
if currentRoom.FootstepAnimationR ~= nil then
SwapAnimation({ Name = "FireFootstepR-Spawner", DestinationName = currentRoom.FootstepAnimationR })
end
if currentRoom.SwapAnimations ~= nil then
for fromAnim, toAnim in pairs( currentRoom.SwapAnimations ) do
SwapAnimation({ Name = fromAnim, DestinationName = toAnim })
end
end
if currentRoom.SwapSounds ~= nil then
for fromSound, toSound in pairs( currentRoom.SwapSounds ) do
SwapSound({ Name = fromSound, DestinationName = toSound })
end
end
end
function TeardownRoomArt( currentRun, currentRoom )
checkShadows = false
killWaitUntilThreads("InShadow")
killWaitUntilThreads("OutOfShadow")
SetThingProperty({ Property = "Ambient", Value = 0.0, DestinationId = currentRun.Hero.ObjectId })
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。