SScriptingEvents
客户端组件
在此类中InvokeEvent
成员 5
| 函数 | InvokeEvent | Invoke the event with its name |
| 属性 | Enabled | Whether the scriptingEvents component is enabled or not |
| 属性 | Events | Returns a list of events |
| 属性 | ComponentName | The name of this component. |
| 属性 | GameObject | – |
函数
InvokeEvent
void InvokeEvent(string name)
Invoke the event with its name
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| name | string | – |
返回值
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只读
示例
Lua
theGameObject = Space.Host.ExecutingObject.Events.GameObject



