Breakroom is now Sinewave Campus. Book a meeting

SScriptingEvents

客户端组件
在此类中InvokeEvent
  1. 函数
  2. InvokeEvent
  3. 属性
  4. Enabled
  5. Events
  6. ComponentName
  7. GameObject
成员 5
函数InvokeEventInvoke the event with its name
属性EnabledWhether the scriptingEvents component is enabled or not
属性EventsReturns a list of events
属性ComponentNameThe name of this component.
属性GameObject–

函数​

InvokeEvent​

void InvokeEvent(string name)

Invoke the event with its name

参数

名称类型默认值
namestring–

返回值

void

示例

Lua
Space.Host.ExecutingObject.Events.InvokeEvent("EventName")

属性​

Enabled​

bool Enabled {get; set; }

Whether the scriptingEvents component is enabled or not

示例

Lua
Space.Host.ExecutingObject.Events.Enabled = true

Events只读​

string[] Events {get; }

Returns a list of events

示例

Lua
eventNames = Space.Host.ExecutingObject.Events.Events

ComponentName只读​

string ComponentName {get; }

The name of this component.

示例

Lua
componentName = Space.Host.ExecutingObject.Events.ComponentName

GameObject只读​

SGameObject GameObject {get; }

示例

Lua
theGameObject = Space.Host.ExecutingObject.Events.GameObject