Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.ItemStatProvider Class Referenceabstract
Inheritance diagram for PlatformerPro.ItemStatProvider:
PlatformerPro.Persistable PlatformerPro.PlatformerProMonoBehaviour PlatformerPro.ICharacterReference PlatformerPro.EquipmentManager PlatformerPro.ItemManager

Protected Member Functions

abstract void RecalculateEffectsOfItems ()
 Updates multiplier stats. More...
 
- Protected Member Functions inherited from PlatformerPro.Persistable
virtual void OnLoaded ()
 Raises the loaded event. More...
 
virtual void ConfigureEventListeners ()
 Init this instance. More...
 
virtual void DoPendingSaves (object sender, PersistenceEventArgs e)
 Trigger any pending saves. More...
 
virtual void PhaseChange (object sender, GamePhaseEventArgs e)
 Handle a change of game phase, look for persistence event and apply. More...
 
virtual void HandleRespawn (object sender, CharacterEventArgs e)
 Handle a change of game phase, look for persistence event and apply. More...
 
virtual void HandleWillExitScene (object sender, SceneEventArgs e)
 Handles the will exit scene event More...
 
virtual void HandleGameOver (object sender, CharacterEventArgs e)
 Handles the game over event More...
 
virtual void HandleDied (object sender, DamageInfoEventArgs e)
 Handles the died event. More...
 

Protected Attributes

float totalJumpHeightMultiplier = 1.0f
 
float totalMoveSpeedMultiplier = 1.0f
 
float totalRunSpeedMultiplier = 1.0f
 
float totalAccelerationMultiplier = 1.0f
 
int totalMaxHealthAdjustment = 1
 
float totalDamageMultiplier = 1.0f
 
float totalWeaponSpeedMultiplier = 1.0f
 
- Protected Attributes inherited from PlatformerPro.Persistable
bool loaded
 Have we loaded the data yet? More...
 
bool readyToSave
 Are we ready to save on the next save tick? More...
 
Persistable latestSaveData
 Data to save when we trigger the next save tick. More...
 

Properties

virtual float TotalJumpHeightMultiplier [get]
 Gets the total JumpHeightMultiplier of all equipped items, updated whenever items are equipped. More...
 
virtual float TotalMoveSpeedMultiplier [get]
 Gets the total MoveSpeedMultiplier of all equipped items, updated whenever items are equipped. More...
 
virtual float TotalRunSpeedMultiplier [get]
 Gets the total RunSpeedMultiplier of all equipped items, updated whenever items are equipped. More...
 
virtual float TotalAccelerationMultiplier [get]
 Gets the total AccelerationMultiplier of all equipped items, updated whenever items are equipped. More...
 
virtual int TotalMaxHealthAdjustment [get]
 Gets the total MaxHealthAdjustment of all equipped items, updated whenever items are equipped. More...
 
virtual float TotalDamageMultiplier [get]
 Gets the total DamageMultiplier of all equipped items, updated whenever items are equipped. More...
 
virtual float TotalWeaponSpeedMultiplier [get]
 Gets the total WeaponSpeedMultiplier of all equipped items, updated whenever items are equipped. More...
 
- Properties inherited from PlatformerPro.Persistable
virtual string PlayerPrefsIdentifier [get]
 The player preference identifier. More...
 
virtual bool EnablePersistence [get]
 Gets the value for persistence type taking in to account defaults. More...
 
virtual PersistenceResetType PersistenceType [get]
 Gets the value for persistence type taking in to account defaults. More...
 
virtual bool SaveOnChange [get]
 Gets the value for save on change type taking in to account defaults. More...
 
abstract Character Character [get, set]
 Gets the character. More...
 
abstract object SaveData [get]
 Gets the data to save. More...
 
abstract string Identifier [get]
 Get a unique identifier to use when saving the data (for example this could be used for part of the file name or player prefs name). More...
 
- Properties inherited from PlatformerPro.PlatformerProMonoBehaviour
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...
 
- Properties inherited from PlatformerPro.ICharacterReference
Character Character [get, set]
 Get the character. More...
 

Additional Inherited Members

- Public Member Functions inherited from PlatformerPro.Persistable
virtual System.Type[] GetExtraTypes ()
 Support complex object serialisation by passing additional types to seralizer. More...
 
abstract void ApplySaveData (object t)
 Applies the save data to the object. More...
 
abstract System.Type SavedObjectType ()
 Get the type of object this Persistable saves. More...
 
abstract void ResetSaveData ()
 Resets the save data back to default. More...
 
- Public Member Functions inherited from PlatformerPro.PlatformerProMonoBehaviour
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...
 
- Static Public Member Functions inherited from PlatformerPro.Persistable
static void Save (Persistable p)
 Save the given persistable. More...
 
static void SaveXml (Persistable p)
 Save the given persistable in XML format. More...
 
static void SaveBinary (Persistable p)
 Save the given persistable in XML format. More...
 
static void Load (Persistable p)
 Load the given persistable. More...
 
static void Reset (Persistable p)
 Resets the given persistable. More...
 
- Public Attributes inherited from PlatformerPro.Persistable
bool usePersistenceDefaults = true
 Should we use the persistence defaults or override with our own values. More...
 
bool enablePersistence = true
 Should we enable persistence. More...
 
bool saveOnAnyChange
 Save whenever this value changes (Note: not supported by all objects). More...
 
PersistenceResetType persistenceType
 When do we reset persistence? More...
 
- Static Public Attributes inherited from PlatformerPro.Persistable
const string BasePlayerPrefId = "PP.Persistent."
 The base player preference identifier. More...
 
- Static Protected Member Functions inherited from PlatformerPro.Persistable
static object LoadSavedDataXml (Persistable p)
 Does the actual load and returns raw object. More...
 
static object LoadSavedDataBinary (Persistable p)
 Does the actual load and returns raw object. More...
 
- Events inherited from PlatformerPro.Persistable
System.EventHandler< EmptyEventArgsLoaded
 Sent when this persistable is loaded. More...
 

Member Function Documentation

◆ RecalculateEffectsOfItems()

abstract void PlatformerPro.ItemStatProvider.RecalculateEffectsOfItems ( )
protectedpure virtual

Updates multiplier stats.

Implemented in PlatformerPro.ItemManager, and PlatformerPro.EquipmentManager.

Member Data Documentation

◆ totalAccelerationMultiplier

float PlatformerPro.ItemStatProvider.totalAccelerationMultiplier = 1.0f
protected

◆ totalDamageMultiplier

float PlatformerPro.ItemStatProvider.totalDamageMultiplier = 1.0f
protected

◆ totalJumpHeightMultiplier

float PlatformerPro.ItemStatProvider.totalJumpHeightMultiplier = 1.0f
protected

◆ totalMaxHealthAdjustment

int PlatformerPro.ItemStatProvider.totalMaxHealthAdjustment = 1
protected

◆ totalMoveSpeedMultiplier

float PlatformerPro.ItemStatProvider.totalMoveSpeedMultiplier = 1.0f
protected

◆ totalRunSpeedMultiplier

float PlatformerPro.ItemStatProvider.totalRunSpeedMultiplier = 1.0f
protected

◆ totalWeaponSpeedMultiplier

float PlatformerPro.ItemStatProvider.totalWeaponSpeedMultiplier = 1.0f
protected

Property Documentation

◆ TotalAccelerationMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalAccelerationMultiplier
get

Gets the total AccelerationMultiplier of all equipped items, updated whenever items are equipped.

◆ TotalDamageMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalDamageMultiplier
get

Gets the total DamageMultiplier of all equipped items, updated whenever items are equipped.

◆ TotalJumpHeightMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalJumpHeightMultiplier
get

Gets the total JumpHeightMultiplier of all equipped items, updated whenever items are equipped.

◆ TotalMaxHealthAdjustment

virtual int PlatformerPro.ItemStatProvider.TotalMaxHealthAdjustment
get

Gets the total MaxHealthAdjustment of all equipped items, updated whenever items are equipped.

◆ TotalMoveSpeedMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalMoveSpeedMultiplier
get

Gets the total MoveSpeedMultiplier of all equipped items, updated whenever items are equipped.

◆ TotalRunSpeedMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalRunSpeedMultiplier
get

Gets the total RunSpeedMultiplier of all equipped items, updated whenever items are equipped.

◆ TotalWeaponSpeedMultiplier

virtual float PlatformerPro.ItemStatProvider.TotalWeaponSpeedMultiplier
get

Gets the total WeaponSpeedMultiplier of all equipped items, updated whenever items are equipped.


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