Documentation ¶
Index ¶
- Constants
- type Entity
- func (e *Entity) Call(funName string, args ...interface{}) (otto.Value, error)
- func (e Entity) Context() script_context_api
- func (e *Entity) Create(script script_context_api) error
- func (e Entity) GetProp(name string) interface{}
- func (e Entity) GetScriptPrivilegeLevel() privilege.Level
- func (e *Entity) GetScriptReferenceEntity() *Entity
- func (e Entity) HasFunction(funName string) bool
- func (e *Entity) Heartbeat() error
- func (e Entity) IsActive() bool
- func (e *Entity) OnShutdown(reason string)
- func (e *Entity) SetProp(name string, value interface{})
- type FunctionInvocationError
Constants ¶
View Source
const ( P_SYS_ID = "$uuid" P_SYS_PATH = "$path" P_SYS_EXCLUSIVE = "$exclusive" P_SYS_ACTIVE = "$active" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
Entity represents any in-game object that exists
func (Entity) GetProp ¶
GetProp returns you the value of a previously set property or nil (undefined) if the property is not set.
func (Entity) GetScriptPrivilegeLevel ¶
func (*Entity) GetScriptReferenceEntity ¶
func (Entity) HasFunction ¶
HasFunction returns true if a function of the given name is defined or will return false otherwise. This can be used to check if an entity has a function that you wish to call
func (*Entity) Heartbeat ¶
Heartbeat will take care that the $tick function is called whenever a heartbeat of the driver occurs
func (Entity) IsActive ¶
IsActive indicates if the entity is still active or not. Inactive entities are considered to be already destroyed or not-yet set up correctly and must not be accessed in any way.
func (*Entity) OnShutdown ¶
type FunctionInvocationError ¶
func (FunctionInvocationError) Error ¶
func (f FunctionInvocationError) Error() string
Click to show internal directories.
Click to hide internal directories.