Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
BaseSystem Interface Reference

To create a system, you just need to create a class which inherits from BaseSystem, and then specify GetSystemPoint to your need. More...

Inheritance diagram for BaseSystem:
[legend]

Public Member Functions

proto external World GetWorld ()
 Get the world associated to this system.
 
proto external void Enable (bool enable)
 
proto external bool IsEnabled ()
 
proto void Rpc (func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
 Attempts to run a remote procedure call of this instance with parameters pecified in method NetRpc attribute.
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Protected Member Functions

proto external void BeginUpdate ()
 The 4 functions below are designed so scripters can handle a batch update of multiple entities in a performant way.
 
proto external void Update ()
 
proto external void EndUpdate ()
 
proto external void AddEntity (notnull IEntity entity)
 
bool DependsOn (ESystemPoint point, BaseSystem system)
 Should return true for systems this system depends on. False otherwise.
 
void OnInit ()
 Called when system are to be intialized.
 
void OnCleanup ()
 Called when system are to be cleaned up.
 
void OnStarted ()
 Called every time system is started (before the first run and after Enable(true) is called.
 
void OnStopped ()
 Called every time system is stopped (after Enable(false) is called and before the system is being destroyed.
 
void OnUpdate (ESystemPoint point)
 Called every time system is allowed to tick.
 
void OnDiag (float timeSlice)
 

Detailed Description

To create a system, you just need to create a class which inherits from BaseSystem, and then specify GetSystemPoint to your need.

Member Function Documentation

◆ AddEntity()

proto external void BaseSystem.AddEntity ( notnull IEntity  entity)
protected

◆ BeginUpdate()

proto external void BaseSystem.BeginUpdate ( )
protected

The 4 functions below are designed so scripters can handle a batch update of multiple entities in a performant way.

Example: override void OnUpdate() { BeginUpdate(); foreach (IEntity ent: myents) { ent.SetWorldTransform(myNewTransform); AddEntity(ent); } Update(); //< This is the call where entities are updated in batch EndUpdate(); }

◆ DependsOn()

bool BaseSystem.DependsOn ( ESystemPoint  point,
BaseSystem  system 
)
protected

Should return true for systems this system depends on. False otherwise.

◆ Enable()

proto external void BaseSystem.Enable ( bool  enable)

◆ EndUpdate()

proto external void BaseSystem.EndUpdate ( )
protected

◆ GetWorld()

proto external World BaseSystem.GetWorld ( )

Get the world associated to this system.

◆ IsEnabled()

proto external bool BaseSystem.IsEnabled ( )

◆ OnCleanup()

void BaseSystem.OnCleanup ( )
protected

Called when system are to be cleaned up.

This always happens at any point when simulation decides to bring the system back to the initial state without actually destroying it.

◆ OnDiag()

void BaseSystem.OnDiag ( float  timeSlice)
protected

◆ OnInit()

void BaseSystem.OnInit ( )
protected

Called when system are to be intialized.

This always happens at any point when simulation decides to reinitialize the system without actually destroying it.

◆ OnStarted()

void BaseSystem.OnStarted ( )
protected

Called every time system is started (before the first run and after Enable(true) is called.

◆ OnStopped()

void BaseSystem.OnStopped ( )
protected

Called every time system is stopped (after Enable(false) is called and before the system is being destroyed.

◆ OnUpdate()

void BaseSystem.OnUpdate ( ESystemPoint  point)
protected

Called every time system is allowed to tick.

◆ Rpc()

proto void BaseSystem.Rpc ( func  method,
void  p0 = NULL,
void  p1 = NULL,
void  p2 = NULL,
void  p3 = NULL,
void  p4 = NULL,
void  p5 = NULL,
void  p6 = NULL,
void  p7 = NULL 
)

Attempts to run a remote procedure call of this instance with parameters pecified in method NetRpc attribute.

Parameters
methodmember function pointer

◆ Update()

proto external void BaseSystem.Update ( )
protected

The documentation for this interface was generated from the following file: