Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.ItemsToLives Class Reference

The following script turns a stack of collectible into lives when a threshold value is reached. i.e. Collect 100 coins to get a life. Could easily be modified to convert items or add health. More...

Inheritance diagram for PlatformerPro.ItemsToLives:

Public Attributes

string itemType
 Name of the item that is collected and converted in to lives. More...
 
int threshold = 100
 The threshold at which the item is convertedin to to lives. More...
 

Protected Member Functions

virtual void Init ()
 Init this instance. More...
 
virtual void HandleItemCollected (object sender, ItemEventArgs e)
 Handles the item collected event. More...
 

Protected Attributes

CharacterHealth characterHealth
 Cached reference to character health. More...
 
ItemManager itemManager
 Cached reference to item manager More...
 

Detailed Description

The following script turns a stack of collectible into lives when a threshold value is reached. i.e. Collect 100 coins to get a life. Could easily be modified to convert items or add health.

Member Function Documentation

◆ HandleItemCollected()

virtual void PlatformerPro.ItemsToLives.HandleItemCollected ( object  sender,
ItemEventArgs  e 
)
protectedvirtual

Handles the item collected event.

Parameters
senderSender.
eParameters.

◆ Init()

virtual void PlatformerPro.ItemsToLives.Init ( )
protectedvirtual

Init this instance.

Member Data Documentation

◆ characterHealth

CharacterHealth PlatformerPro.ItemsToLives.characterHealth
protected

Cached reference to character health.

◆ itemManager

ItemManager PlatformerPro.ItemsToLives.itemManager
protected

Cached reference to item manager

◆ itemType

string PlatformerPro.ItemsToLives.itemType

Name of the item that is collected and converted in to lives.

◆ threshold

int PlatformerPro.ItemsToLives.threshold = 100

The threshold at which the item is convertedin to to lives.


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