Enfusion Script API
Loading...
Searching...
No Matches
WorldSystem Interface Reference

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

Inheritance diagram for WorldSystem:
EventProvider ScriptAndConfig Managed AnimationPlayerSystem ConfigurableSystem DialogueSystem GameMode HelloWorldSystem MultiPointSystem NearbyEntitiesSystem ParticleEffectsSystem PawnEntitySystem PlayerNameInputSystem RplSchedulerDebugSystem SndSystem TestWorldSystem

Public Member Functions

proto external World GetWorld ()
 Get the world associated with this system.
 
proto external WorldSystems GetSystems ()
 Get world systems associated with this system.
 
proto external RplNode GetNode ()
 
proto external void Enable (bool enable)
 Enable/disable system.
 
proto external bool IsEnabled ()
 Returns true if system is enabled.
 
- 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)
 

Static Public Member Functions

static void InitInfo (WorldSystemInfo outInfo)
 
- Static Public Member Functions inherited from EventProvider
static proto bool ConnectEvent (func eventSender, func eventReceiver)
 Connects receiver callback to provider event.
 
static proto bool ConnectEventFiltered (func eventSender, func eventReceiver, void filter)
 Connects receiver callback to provider event.
 
static proto bool DisconnectEvent (func eventSender, func eventReceiver)
 Disconnect single event connection.
 
static proto bool DisconnectEventFiltered (func eventSender, func eventReceiver, void filter)
 Disconnect single event connection.
 
static proto bool DisconnectEvents (EventProvider provider, Managed receiver)
 Disconnect all connections between provider and receiver.
 

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)
 
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 (RPC) of this instance with parameters specified in method RplRpc attribute.
 
bool DependsOn (WorldSystemPoint point, WorldSystem system)
 Should return true for systems this system depends on.
 
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 (WorldSystemPoint point)
 
void OnUpdatePoint (WorldUpdatePointArgs args)
 Called at specific points during World update.
 
void OnOneTimePoint (WorldOneTimePointArgs args)
 Called at specific one-time events during World lifetime.
 
void OnDiag (float timeSlice)
 
- Protected Member Functions inherited from EventProvider
proto external void ThrowEvent (func eventSender, void param1=null, void param2=null, void param3=null, void param4=null, void param5=null, void param6=null, void param7=null, void param8=null, void param9=null)
 Emit event on provider.
 

Detailed Description

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

Member Function Documentation

◆ AddEntity()

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

◆ BeginUpdate()

proto external void WorldSystem.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 WorldSystem.DependsOn ( WorldSystemPoint point,
WorldSystem system )
protected

Should return true for systems this system depends on.

False otherwise

Deprecated
Use WorldSystemInfo.ExecuteAfter instead.

◆ Enable()

proto external void WorldSystem.Enable ( bool enable)

Enable/disable system.

◆ EndUpdate()

proto external void WorldSystem.EndUpdate ( )
protected

◆ GetNode()

proto external RplNode WorldSystem.GetNode ( )

◆ GetSystems()

proto external WorldSystems WorldSystem.GetSystems ( )

Get world systems associated with this system.

◆ GetWorld()

proto external World WorldSystem.GetWorld ( )

Get the world associated with this system.

◆ InitInfo()

◆ IsEnabled()

proto external bool WorldSystem.IsEnabled ( )

Returns true if system is enabled.

◆ OnCleanup()

void WorldSystem.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 WorldSystem.OnDiag ( float timeSlice)
protected

◆ OnInit()

void WorldSystem.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.

Implemented in DeathmatchMode, GameMode, and TeamDeathmatchMode.

◆ OnOneTimePoint()

void WorldSystem.OnOneTimePoint ( WorldOneTimePointArgs args)
protected

Called at specific one-time events during World lifetime.

◆ OnStarted()

void WorldSystem.OnStarted ( )
protected

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

◆ OnStopped()

void WorldSystem.OnStopped ( )
protected

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

◆ OnUpdate()

void WorldSystem.OnUpdate ( WorldSystemPoint point)
protected
Deprecated
Override OnUpdatePoint() instead.

◆ OnUpdatePoint()

void WorldSystem.OnUpdatePoint ( WorldUpdatePointArgs args)
protected

Called at specific points during World update.

Implemented in HelloWorldSystem, MultiPointSystem, and PlayerNameInputSystem.

◆ Rpc()

proto void WorldSystem.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 )
protected

Attempts to run a remote procedure call (RPC) of this instance with parameters specified in method RplRpc attribute.

Parameters
methodMember function to be invoked as an RPC.

◆ Update()

proto external void WorldSystem.Update ( )
protected

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