![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Base class for all collectible things. More...
Public Member Functions | |
virtual void | DoDrop (string prefabName) |
Called after an item is spawned from a drop. More... | |
virtual void | DoCollect (Character character) |
Do the collection. More... | |
virtual void | Reset () |
Reset this instance. More... | |
![]() | |
void | SetPersistenceState (bool state) |
Sets the persistence state. More... | |
void | SetPersistenceState (bool state, string extraPersistenceData) |
Sets the persistence state, overriding extra persistence data More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
Public Attributes | |
ItemInstanceData | instanceData |
bool | autoPickUp |
bool | useDefaultPersistence = true |
Does this Item get persistence defaults form the Game manager? More... | |
jnamobile.mmm.PointOfInterest | poi |
Reference to point of interest on a map. You can use this to override item POI settings. More... | |
![]() | |
bool | enablePersistence |
Should we enable persistence? More... | |
string | guid = System.Guid.NewGuid().ToString() |
Unique ID for this object. You shoulnd't need to edit this, use editor debug mode if you must. More... | |
GameObject | target |
GameObject to apply persitence settings to, defaults to self. More... | |
PersistableObjectType | persistenceImplementation |
How do we implement the persistence settings. More... | |
bool | defaultStateIsDisabled |
If true then the obejct starts disabled. More... | |
string | spawnedObjectName |
If this item was spawned then save the name of the prefab here. More... | |
Protected Member Functions | |
virtual void | OnCollectItem (Character character) |
Raises the item collected event. More... | |
virtual void | OnCollectItem (string type, int amount, Character character) |
Raises the item collected event. More... | |
override void | PostInit () |
Init item references etc. Called form Start(). More... | |
override void | SetPersistenceDefaults () |
Sets the persistence defaults. More... | |
virtual void | CheckCollect (Collider2D other) |
Check if the collection is valid (in this case by checking if its a character colliding). More... | |
virtual void | DoEventForCollect (Character character) |
Send a collect event if we have any listeners or else deactivates object. More... | |
bool | CollectHasListener () |
Check if there is a listener for the collect event. More... | |
override void | ApplyExtraPersistenceData (PersistableObjectData data) |
Apply any extra data. For items this is durability and amount. More... | |
![]() | |
virtual void | ProcessState () |
Processes the persisted state. More... | |
virtual void | ApplyCustomPersistence (PersistableObjectData data) |
Custom persistable implementation. Override to customise. More... | |
Protected Attributes | |
Collider2D | myCollider |
The items collider. More... | |
bool | hasHitCharacter |
Tracks if this item has already been collected. More... | |
Properties | |
string | ItemId [get, set] |
Type of item (e.g. 'coin', 'gem', etc). Should match the value in the ItemManager. Type of item (e.g. 'coin', 'gem', etc). Should match the value in the ItemManager. More... | |
int | Amount [get, set] |
How many are in this 'pile' More... | |
override string | ExtraPersistenceData [get] |
Gets the extra persistence data. More... | |
![]() | |
virtual string | ExtraPersistenceData [get] |
Gets the extra persistence data. More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
Events | |
System.EventHandler< ItemEventArgs > | CollectItem |
Power up collected. More... | |
Base class for all collectible things.
|
protectedvirtual |
Apply any extra data. For items this is durability and amount.
data | Data. |
Reimplemented from PlatformerPro.PersistableObject.
|
protectedvirtual |
Check if the collection is valid (in this case by checking if its a character colliding).
other | Other. |
|
protected |
Check if there is a listener for the collect event.
|
virtual |
Do the collection.
character | Character doing the collection. |
|
virtual |
Called after an item is spawned from a drop.
|
protectedvirtual |
Send a collect event if we have any listeners or else deactivates object.
character | Character. |
|
protectedvirtual |
Raises the item collected event.
type | Type. |
character | Character. |
|
protectedvirtual |
Raises the item collected event.
type | Type. |
amount | Number collected. |
character | Character. |
|
protectedvirtual |
Init item references etc. Called form Start().
Reimplemented from PlatformerPro.PersistableObject.
|
virtual |
Reset this instance.
|
protectedvirtual |
Sets the persistence defaults.
Reimplemented from PlatformerPro.PersistableObject.
bool PlatformerPro.Item.autoPickUp |
|
protected |
Tracks if this item has already been collected.
ItemInstanceData PlatformerPro.Item.instanceData |
|
protected |
The items collider.
jnamobile.mmm.PointOfInterest PlatformerPro.Item.poi |
Reference to point of interest on a map. You can use this to override item POI settings.
bool PlatformerPro.Item.useDefaultPersistence = true |
Does this Item get persistence defaults form the Game manager?
|
getset |
How many are in this 'pile'
|
getprotected |
Gets the extra persistence data.
The extra persistence data.
|
getset |
Type of item (e.g. 'coin', 'gem', etc). Should match the value in the ItemManager. Type of item (e.g. 'coin', 'gem', etc). Should match the value in the ItemManager.
System.EventHandler<ItemEventArgs> PlatformerPro.Item.CollectItem |
Power up collected.