Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SScriptingEvents Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SScriptingEvents:
ScriptClassComponent< ScriptingEventsBaseInternal >

Public Member Functions

void InvokeEvent (string name)
 Invoke the event with its name More...
 

Properties

bool Enabled [get, set]
 Whether the scriptingEvents component is enabled or not More...
 
string ComponentName [get]
 Return the component name of the scripting events More...
 
string[] Events [get]
 Returns a list of events More...
 
- Properties inherited from ScriptClassComponent< ScriptingEventsBaseInternal >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

Member Function Documentation

◆ InvokeEvent()

void SineSpace.Scripting.Components.SScriptingEvents.InvokeEvent ( string  name)

Invoke the event with its name

local thisObject=Space.Host.ExecutingObject
local no1Name="no1"
thisObject.Events.InvokeEvent(no1Name)
&ndash;invoke theĦ°no1Ħħevent.

param name="name">The name of event

Property Documentation

◆ ComponentName

string SineSpace.Scripting.Components.SScriptingEvents.ComponentName
get

Return the component name of the scripting events

local thisObject=Space.Host.ExecutingObject
local events=thisObject.Events
Space.Log(events.ComponentName)

◆ Enabled

bool SineSpace.Scripting.Components.SScriptingEvents.Enabled
getset

Whether the scriptingEvents component is enabled or not

local thisObject=Space.Host.ExecutingObject
local thisObjectScriptingEvents=thisObject.Events
Space.Log(thisObjectScriptingEvents.Enabled)

◆ Events

string [] SineSpace.Scripting.Components.SScriptingEvents.Events
get

Returns a list of events

local thisObject=Space.Host.ExecutingObject
local events=thisObject.Events.Events
&ndash;return a list of Objects
for i=1, #events do
Space.Log(events[i])
end
&ndash;display the name of all events