Nebula
Loading...
Searching...
No Matches
Nebula.Game.Property Class Reference

Public Member Functions

virtual Nebula.Game.FrameEvent[] AcceptedEvents ()
 Override in subclass to tell the property manager which methods to call for this class.
virtual void OnMessage (in Msg msg)
 Called when a message is sent to the property's associated entity.
override string ToString ()
 String representation of this property.
virtual void OnActivate ()
 Called when the property is attached to an entity, or when Property.Active is changed to true.
virtual void OnDeactivate ()
 Called when the property is detached from an entity, or when Property.Active is changed to false.
virtual void OnBeginFrame ()
 Called once every frame at the beginning of the frame.
virtual void OnFrame ()
 Called once every frame.
virtual void OnEndFrame ()
 Called once every frame at the end of the frame.
void Destroy ()
 Destroys the property.

Protected Member Functions

virtual void RegisterMessages ()
void RegisterMessage< T > ()

Package Functions

FrameEvent[] GetAcceptedEvents ()
void AttachMessages ()
void DetachMessages ()

Properties

bool Active [get, set]
 Activate or deactivate property This is not trivial and can potentially be costly.
Entity Entity [get, set]
 The entity that owns this property.
bool IsValid [get]
 Checks if the property is valid (attached to an entity).

Private Attributes

bool active = false
Entity entity = null
FrameEvent[] acceptedEvents
bool acceptedEventsCached

Member Function Documentation

◆ AcceptedEvents()

virtual Nebula.Game.FrameEvent[] Nebula.Game.Property.AcceptedEvents ( )
inlinevirtual

Override in subclass to tell the property manager which methods to call for this class.

◆ AttachMessages()

void Nebula.Game.Property.AttachMessages ( )
inlinepackage

◆ Destroy()

void Nebula.Game.Property.Destroy ( )
inline

Destroys the property.

You should not call this manually, it is called automatically by destroying an entity, or removing the property

◆ DetachMessages()

void Nebula.Game.Property.DetachMessages ( )
inlinepackage

◆ GetAcceptedEvents()

FrameEvent[] Nebula.Game.Property.GetAcceptedEvents ( )
inlinepackage

◆ OnActivate()

virtual void Nebula.Game.Property.OnActivate ( )
inlinevirtual

Called when the property is attached to an entity, or when Property.Active is changed to true.

Override in subclass.

◆ OnBeginFrame()

virtual void Nebula.Game.Property.OnBeginFrame ( )
inlinevirtual

Called once every frame at the beginning of the frame.

Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all.

See also
AcceptedEvents()

◆ OnDeactivate()

virtual void Nebula.Game.Property.OnDeactivate ( )
inlinevirtual

Called when the property is detached from an entity, or when Property.Active is changed to false.

Override in subclass.

◆ OnEndFrame()

virtual void Nebula.Game.Property.OnEndFrame ( )
inlinevirtual

Called once every frame at the end of the frame.

Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all.

See also
AcceptedEvents()

◆ OnFrame()

virtual void Nebula.Game.Property.OnFrame ( )
inlinevirtual

Called once every frame.

Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all.

See also
AcceptedEvents()

◆ OnMessage()

virtual void Nebula.Game.Property.OnMessage ( in Msg msg)
inlinevirtual

Called when a message is sent to the property's associated entity.

◆ RegisterMessage< T >()

void Nebula.Game.Property.RegisterMessage< T > ( )
inlineprotected
Type Constraints
T :Msg 

◆ RegisterMessages()

virtual void Nebula.Game.Property.RegisterMessages ( )
inlineprotectedvirtual

◆ ToString()

override string Nebula.Game.Property.ToString ( )
inline

String representation of this property.

Member Data Documentation

◆ acceptedEvents

FrameEvent [] Nebula.Game.Property.acceptedEvents
private

◆ acceptedEventsCached

bool Nebula.Game.Property.acceptedEventsCached
private

◆ active

bool Nebula.Game.Property.active = false
private

◆ entity

Entity Nebula.Game.Property.entity = null
private

Property Documentation

◆ Active

bool Nebula.Game.Property.Active
getset

Activate or deactivate property This is not trivial and can potentially be costly.

◆ Entity

Entity Nebula.Game.Property.Entity
getset

The entity that owns this property.

You cannot change the entity after one has been associated with the property.

◆ IsValid

bool Nebula.Game.Property.IsValid
get

Checks if the property is valid (attached to an entity).


The documentation for this class was generated from the following file:
  • /github/workspace/code/addons/nsharp/NebulaEngine/engine/Property.cs