All actors must have an Actor Class. The actor class links the actor with its attributes. More...
Inherits MonoBehaviour.
Public Member Functions | |
| override string | ToString () |
| void | CopyTo (ActorClass o) |
| void | Init (Actor owner, int startLevel) |
| Called by Actor after creating an instance of its actor class so that some final Initialisation can be performed. More... | |
| void | Save (string key) |
| void | Load (string key) |
| void | DeleteSaveData (string key) |
| ActorAttribute | GetAttribute (UniqueID id) |
| Get a reference to an attribute of the actor by Id. Return null if failed. More... | |
| ActorAttribute | GetAttribute (string ident, plyGameObjectIdentifyingType identType) |
| Get a reference to the attribute of the actor by its name, custom def.ident or def.meta data. Return null if failed. More... | |
| UniqueID | GetAttributeUniqueId (string ident, plyGameObjectIdentifyingType identType) |
| Get the Id of an attribute of the actor by its name, custom def.ident or def.meta data. Return UniqueID.Empty if not found. More... | |
Public Attributes | |
| UniqueID | id = new UniqueID() |
| Unique id. | |
| CommonDefinitionData | def = new CommonDefinitionData() |
| common data | |
| int | maxLevel = 50 |
| Max level that can be reached. | |
| int | maxXP = 100000 |
| XP needed to reach max level (the leveling curve is clamped between 0 and this value) | |
| plyCurve | xpCurve = new plyCurve(50, 0, 100000) |
| The curved used to determine XP and Level relation. | |
| List< ActorAttributeData > | attributesInitData = new List<ActorAttributeData>(0) |
| The Attributes this Actor Class should have linked to and data that they should be initialized to at run-time. Do not use this directly at runtime as it is only used to init the attributes list. | |
| plyBlox | blox |
| The blox object of this Actor Class. | |
Protected Member Functions | |
| void | Reset () |
| void | Start () |
Properties | |
| Actor | owner [get, set] |
| The Actor that owns this Actor Class instance. More... | |
| List< ActorAttribute > | attributes [get, set] |
| List of instantiated attributes. Created from the attributesInitData. More... | |
| ActorAttribute | HP [get, set] |
| Reference to the Health (HP) attribute of this Actor. The HP attribute works with Consumable value. The attribute's 'Value' is the max that its Consumable value can reach. More... | |
| ActorAttribute | XP [get, set] |
| Reference to the Experience points (XP) of this Actor. The XP attribute works with its 'Value' property, not Consumable value property. More... | |
| int | currLevel [get, set] |
| Current Level of this Actor More... | |
All actors must have an Actor Class. The actor class links the actor with its attributes.
| ActorAttribute plyGame.ActorClass.GetAttribute | ( | UniqueID | id | ) |
Get a reference to an attribute of the actor by Id. Return null if failed.
| ActorAttribute plyGame.ActorClass.GetAttribute | ( | string | ident, |
| plyGameObjectIdentifyingType | identType | ||
| ) |
Get a reference to the attribute of the actor by its name, custom def.ident or def.meta data. Return null if failed.
| UniqueID plyGame.ActorClass.GetAttributeUniqueId | ( | string | ident, |
| plyGameObjectIdentifyingType | identType | ||
| ) |
Get the Id of an attribute of the actor by its name, custom def.ident or def.meta data. Return UniqueID.Empty if not found.
| void plyGame.ActorClass.Init | ( | Actor | owner, |
| int | startLevel | ||
| ) |
Called by Actor after creating an instance of its actor class so that some final Initialisation can be performed.
|
getset |
List of instantiated attributes. Created from the attributesInitData.
|
getset |
Current Level of this Actor
|
getset |
Reference to the Health (HP) attribute of this Actor. The HP attribute works with Consumable value. The attribute's 'Value' is the max that its Consumable value can reach.
|
getset |
Reference to the Experience points (XP) of this Actor. The XP attribute works with its 'Value' property, not Consumable value property.