SScene
服务器场景
在此类中ConnectedAvatars
成员 4
| 属性 | ConnectedAvatars | Returns the number of Avatars connected to the region. |
| 属性 | Avatars | Returns a table of SAvatar objects currently in the region |
| 属性 | Cells | Returns a table of SCell objects. (Not all cells are available at all times, a client on this server must be within 384m of a cell in order for it to exist.) |
| 属性 | Parcels | Access to the SParcelManager class. |
属性
ConnectedAvatars只读
int ConnectedAvatars {get; }
Returns the number of Avatars connected to the region.
示例
Lua
numOfAvatars = Space.Scene.ConnectedAvatars
Lua
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars
Space.Log("Avatar with ID " .. id .. "has joined")
Space.Log("Number of avatars connected: " .. numOfAvatars)
end
Avatars只读
Table Avatars {get; }
Returns a table of SAvatar objects currently in the region
示例
Lua
currentAvatars = Space.Scene.Avatars
Cells只读
Table Cells {get; }
Returns a table of SCell objects. (Not all cells are available at all times, a client on this server must be within 384m of a cell in order for it to exist.)
示例
Lua
cellsTable = Space.Scene.Cells
Parcels只读
Access to the SParcelManager class.
示例
Lua
Space.Scene.Parcels



