Breakroom is now Sinewave Campus. Book a meeting

SScene

服务器场景
在此类中ConnectedAvatars
  1. 属性
  2. ConnectedAvatars
  3. Avatars
  4. Cells
  5. Parcels
成员 4
属性ConnectedAvatarsReturns the number of Avatars connected to the region.
属性AvatarsReturns a table of SAvatar objects currently in the region
属性CellsReturns 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.)
属性ParcelsAccess 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只读​

SParcelManager Parcels {get; }

Access to the SParcelManager class.

示例

Lua
Space.Scene.Parcels