All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyGame.ActorFactionManager Class Reference

Manages and contains a list of all the Factions. Factions should not be added at runtime. and must all be defined in the plyGame Main Editor. This manager will automatically interact with the SaveLoad System to save and restore the relevant data of factions. More...

Inherits MonoBehaviour.

Public Member Functions

ActorFaction GetDefinitionByIdent (string ident, plyGameObjectIdentifyingType identType)
 Get a defined faction by an ident. Return null if not found. More...
 
ActorFaction GetDefinitionById (UniqueID id)
 Get a defined faction by its Id. Return null if not defined or invalid id. More...
 
int GetDefinitionIdx (ActorFaction f)
 Return the index of the faction in the list of defined factions More...
 
ActorFaction GetRuntimeByIdent (string ident, plyGameObjectIdentifyingType identType)
 Get a faction by an ident. Return null if not found. More...
 
ActorFaction GetRuntimeById (UniqueID id)
 Get a faction by its Id. Return null if not defined or invalid id. More...
 
int GetRuntimeIdx (ActorFaction f)
 Return the index of the faction in the list of active runtime factions More...
 

Public Attributes

List< ActorFactiondefinedFactions = new List<ActorFaction>()
 List of defined factions.
 
List< FactionVarListvarTypes = new List<FactionVarList>()
 The variable types use by factions.
 
bool persistVars = true
 should variables be persisted?
 
plyBlox blox = null
 

Protected Member Functions

void Reset ()
 
void Awake ()
 
void Start ()
 

Properties

static ActorFactionManager Instance [get]
 

Detailed Description

Manages and contains a list of all the Factions. Factions should not be added at runtime. and must all be defined in the plyGame Main Editor. This manager will automatically interact with the SaveLoad System to save and restore the relevant data of factions.

Member Function Documentation

ActorFaction plyGame.ActorFactionManager.GetDefinitionById ( UniqueID  id)

Get a defined faction by its Id. Return null if not defined or invalid id.

ActorFaction plyGame.ActorFactionManager.GetDefinitionByIdent ( string  ident,
plyGameObjectIdentifyingType  identType 
)

Get a defined faction by an ident. Return null if not found.

int plyGame.ActorFactionManager.GetDefinitionIdx ( ActorFaction  f)

Return the index of the faction in the list of defined factions

ActorFaction plyGame.ActorFactionManager.GetRuntimeById ( UniqueID  id)

Get a faction by its Id. Return null if not defined or invalid id.

ActorFaction plyGame.ActorFactionManager.GetRuntimeByIdent ( string  ident,
plyGameObjectIdentifyingType  identType 
)

Get a faction by an ident. Return null if not found.

int plyGame.ActorFactionManager.GetRuntimeIdx ( ActorFaction  f)

Return the index of the faction in the list of active runtime factions