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

The defined Actor Classes. More...

Inherits ScriptableObject.

Public Member Functions

void UpdateCacheIfNeeded ()
 Used to update the list of defined actor classes from the classFabs list. More...
 
void UpdateCache ()
 Used to update the list of defined actor classes from the classFabs list. More...
 
GameObject GetPrefab (UniqueID id)
 Get Actor Class prefab by its Id. Return null if not found. More...
 
ActorClass GetDefinition (UniqueID id)
 Get Actor Class definition by its Id. Return null if not found. More...
 
int GetDefinitionIdx (UniqueID id)
 Get index of Actor Class in the actor classes list by its Id. Return -1 if not found. More...
 
string GetScreenName (UniqueID id)
 Get the screen name of an actor class. Return "-invalid-" if not found. More...
 
string[] GetNames ()
 Returns a list of names of all defined actor classes. More...
 

Public Attributes

List< GameObject > classFabs = new List<GameObject>()
 List if Actor Class prefabs.
 
List< ActorClassclasses = new List<ActorClass>(0)
 List of defined classes. Should call UpdateCache() or UpdateCacheIfNeeded() before using this for first time.
 

Properties

static ActorClassesAsset Instance [get]
 Provide access to asset at runtime More...
 

Detailed Description

The defined Actor Classes.

Member Function Documentation

ActorClass plyGame.ActorClassesAsset.GetDefinition ( UniqueID  id)

Get Actor Class definition by its Id. Return null if not found.

int plyGame.ActorClassesAsset.GetDefinitionIdx ( UniqueID  id)

Get index of Actor Class in the actor classes list by its Id. Return -1 if not found.

string [] plyGame.ActorClassesAsset.GetNames ( )

Returns a list of names of all defined actor classes.

GameObject plyGame.ActorClassesAsset.GetPrefab ( UniqueID  id)

Get Actor Class prefab by its Id. Return null if not found.

string plyGame.ActorClassesAsset.GetScreenName ( UniqueID  id)

Get the screen name of an actor class. Return "-invalid-" if not found.

void plyGame.ActorClassesAsset.UpdateCache ( )

Used to update the list of defined actor classes from the classFabs list.

void plyGame.ActorClassesAsset.UpdateCacheIfNeeded ( )

Used to update the list of defined actor classes from the classFabs list.

Property Documentation

ActorClassesAsset plyGame.ActorClassesAsset.Instance
staticget

Provide access to asset at runtime