FYFY 2.3
Loading...
Searching...
No Matches
FYFY.Family Class Reference

Family is a container of GameObjects which respect constraints specified by FYFY.Matcher. More...

Inheritance diagram for FYFY.Family:

Public Member Functions

delegate void EntryCallback (GameObject gameObject)
 Type of the entry callbacks.
 
delegate void ExitCallback (int gameObjectId)
 Type of the exit callbacks.
 
IEnumerator< GameObject > GetEnumerator ()
 Gets the enumerator over this FYFY.Family.
 
GameObject getAt (int index)
 Gets the GameObject at the specified index FYFY.Family. Warning: this function can return null if a Game Object is Destroyed without beeing unbinded, you still have to unbind Game Object before destroying them.
 
bool contains (int gameObjectId)
 Checks if a GameObject belongs to this FYFY.Family.
 
void addEntryCallback (EntryCallback callback)
 Adds callback function which will be executed when an entry occurs in this FYFY.Family.
 
void addExitCallback (ExitCallback callback)
 Adds callback function which will be executed when an exit occurs in this FYFY.Family.
 
bool Equals (Family other)
 Check if two families are equals.
 
bool Equals (string[] descriptor)
 Check if this is equal with descriptor.
 
string[] getDescriptor ()
 Return a descriptor of this family.
 
string getInlineDescriptor ()
 Return a descriptor of this family.
 
GameObject First ()
 Get the first Game Object included into the family.
 

Public Attributes

bool showContent = false
 Show game objects included into this family inside Unity Inspector.
 

Properties

int Count [get]
 Gets the number of GameObjects belonging to this FYFY.Family.
 

Detailed Description

Family is a container of GameObjects which respect constraints specified by FYFY.Matcher.

The family is updated before each FixedUpdate, Update, LateUpdate blocks of the FYFY.MainLoop.

The family state is the same for each system in a same block of update.

The family works only with the GameObjects known by FYFY (see FYFY.GameObjectManager.bind).

Member Function Documentation

◆ addEntryCallback()

void FYFY.Family.addEntryCallback ( EntryCallback callback)

Adds callback function which will be executed when an entry occurs in this FYFY.Family.

Parameters
callbackCallback function.

◆ addExitCallback()

void FYFY.Family.addExitCallback ( ExitCallback callback)

Adds callback function which will be executed when an exit occurs in this FYFY.Family.

Parameters
callbackCallback function.

◆ contains()

bool FYFY.Family.contains ( int gameObjectId)

Checks if a GameObject belongs to this FYFY.Family.

Parameters
gameObjectIdThe Game object identifier.

◆ First()

GameObject FYFY.Family.First ( )

Get the first Game Object included into the family.

Returns
The first GameObject or null if the family is empty.

◆ getAt()

GameObject FYFY.Family.getAt ( int index)

Gets the GameObject at the specified index FYFY.Family. Warning: this function can return null if a Game Object is Destroyed without beeing unbinded, you still have to unbind Game Object before destroying them.

Returns
The GameObject at the specified index.

◆ GetEnumerator()

IEnumerator< GameObject > FYFY.Family.GetEnumerator ( )

Gets the enumerator over this FYFY.Family.

Returns
The enumerator.

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