moonfall/Assets/Scripts/.svn/text-base/WorldDefault.lua.svn-base
2014-10-21 13:54:42 +09:00

16 lines
406 B
Plaintext

function OnWorldCreate(parameters)
local spawnId = nil
if parameters.spawn == nil then
spawnId = ActorFromName("spawnDefault")
else
spawnId = ActorFromName(parameters.spawn)
end
if spawnId ~= nil then
playerId = ActorScriptSendMessage(spawnId, "spawn").playerId
if playerId ~= nil then
CameraSetTargetActor(playerId)
end
end
end