Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Player.SGroup Class Reference
Inheritance diagram for SineSpace.Scripting.Player.SGroup:
ScriptClass< T > ScriptClassWrapper< T >

Public Member Functions

override void Initialise (SScript runtime, object wrapper)
 
bool IsMemberOf (int groupID)
 Whether is a member of this group. More...
 
SGroupInfo GetGroupInfo (int groupID)
 Get the group info by groupID More...
 
void JoinGroup (int groupID, bool force=false)
 Join the group More...
 
void LeaveGroup (int groupID, bool force=false)
 Leave the group More...
 
- Public Member Functions inherited from ScriptClass< T >
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
- Public Member Functions inherited from ScriptClassWrapper< T >
override void Initialise (SScript runtime, object wrapper)
 

Properties

SGroupInfo[] Membership [get]
 Return an array of members from the group More...
 
- Properties inherited from ScriptClass< T >
override bool Alive [get]
 Return if the component is alive. More...
 
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 
- Properties inherited from ScriptClassWrapper< T >
_wrap [get]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass< T >
void Initialise (SScript runtime)
 

Member Function Documentation

◆ GetGroupInfo()

SGroupInfo SineSpace.Scripting.Player.SGroup.GetGroupInfo ( int  groupID)

Get the group info by groupID

local group=Space.Groups
function Get()
Space.Log(group.GetGroupInfo(675).Name)
end
<br>
Parameters
groupIDThe ID of the group
Returns

◆ Initialise()

override void SineSpace.Scripting.Player.SGroup.Initialise ( SScript  runtime,
object  wrapper 
)
virtual

Implements ScriptClass< T >.

◆ IsMemberOf()

bool SineSpace.Scripting.Player.SGroup.IsMemberOf ( int  groupID)

Whether is a member of this group.

local group=Space.Groups
function Get()
Space.Log(group.IsMemberOf(675))
end
<br>
Parameters
groupIDThe ID of the group
Returns

◆ JoinGroup()

void SineSpace.Scripting.Player.SGroup.JoinGroup ( int  groupID,
bool  force = false 
)

Join the group

local group=Space.Groups
function Get()
group.JoinGroup(675)
end
<br>
Parameters
groupIDThe ID of the group
forceWhether force the group or not

◆ LeaveGroup()

void SineSpace.Scripting.Player.SGroup.LeaveGroup ( int  groupID,
bool  force = false 
)

Leave the group

local group=Space.Groups
function Get()
group.LeaveGroup(675)
end
<br>
Parameters
groupIDThe ID of the group
forceWhether force the group or not

Property Documentation

◆ Membership

SGroupInfo [] SineSpace.Scripting.Player.SGroup.Membership
get

Return an array of members from the group

local group=Space.Groups
local members=group.Membership
function Get()
for i=1, #members do
Space.Log(members[i].Name)
end
end
<br>
SineSpace.Scripting.Player.SGroup.LeaveGroup
void LeaveGroup(int groupID, bool force=false)
Leave the group
Definition: SGroup.cs:195
SineSpace.Scripting.Player.SGroup.JoinGroup
void JoinGroup(int groupID, bool force=false)
Join the group
Definition: SGroup.cs:88
SineSpace.Scripting.Player.SGroup.IsMemberOf
bool IsMemberOf(int groupID)
Whether is a member of this group.
Definition: SGroup.cs:31
SineSpace.Scripting.Player.SGroup.GetGroupInfo
SGroupInfo GetGroupInfo(int groupID)
Get the group info by groupID
Definition: SGroup.cs:49