Flying Piggy 2D Runner Kit  1.0
Complete 2D runner template for Unity
 All Classes Files Functions Variables Enumerations Enumerator Properties
Explosive Class Reference
Inheritance diagram for Explosive:
Item GameCommandReceiver

Public Member Functions

override void Reset ()
 
- Public Member Functions inherited from Item
override void StartGame ()
 
override void PauseGame ()
 
override void ResumeGame ()
 
- Public Member Functions inherited from GameCommandReceiver
virtual void PauseNewGame ()
 
virtual void ResumeNewGame ()
 
virtual void GameOver ()
 
virtual void WinGame ()
 
virtual void StopGame ()
 
virtual void ResetGame ()
 

Public Attributes

ExplosionParticle explosionPrefab
 
- Public Attributes inherited from Item
GameData.ScoreId scoreId
 
GameData.ScoreId totalScoreId
 
GameData.ScoreId highscoreId
 

Protected Member Functions

override void OnStart ()
 
override void ItemOnTriggerEnter (Collider2D other)
 
- Protected Member Functions inherited from Item
void AddToScore ()
 
virtual void OnUpdate ()
 
virtual void ItemOnCollisionEnter (Collision2D collision)
 
virtual void ItemOnCollisionStay (Collision2D collision)
 
virtual void ItemOnCollisionExit (Collision2D collision)
 

Additional Inherited Members

- Protected Attributes inherited from Item
List< Scorescores
 
int scoreStep = 1
 
Vector3 originalPosition
 
Vector3 originalAngles
 
- Static Protected Attributes inherited from Item
static bool pause = false
 

Detailed Description

Explodes after being triggered by the player or other items

Member Function Documentation

override void Explosive.ItemOnTriggerEnter ( Collider2D  other)
protectedvirtual

Explode if other collider is the player or an obstacle. Game is over if other collider is the player. Increase the score if other collider is an obstacle.

Reimplemented from Item.

override void Explosive.OnStart ( )
protectedvirtual

Set Collider as a trigger. Set the command, which is executed after the item is triggered by the player, to execute "game over".

Reimplemented from Item.

override void Explosive.Reset ( )
virtual

Destroy executed explosion effect.

Reimplemented from Item.

Member Data Documentation

ExplosionParticle Explosive.explosionPrefab

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