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

Public Types

enum  State {
  State.RUNNING, State.PAUSED, State.OVER, State.WON,
  State.STOPPED
}
 

Public Member Functions

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

Public Attributes

float startSpeed = 5.0f
 
float maxSpeed = 12.0f
 
float acceleration = 0.05f
 
float brakingAcceleration = -0.5f
 
List< CommandcommandsAfterGameStopped
 
List< CommandcommandsOnGameStopping
 
List< CommandcommandsOnGameOver
 
List< CommandcommandsOnGameWon
 
List< CommandcommandsOnGameOverAfterGameStopped
 
List< CommandcommandsOnGameWonAfterGameStopped
 

Properties

static RunSettings Instance [get]
 
float Speed [get]
 

Detailed Description

RunSettings determines the speed of the rolling backgrounds and other items, and actions related to state of the movement (rolling speed).

Member Enumeration Documentation

Enumerator
RUNNING 
PAUSED 
OVER 
WON 
STOPPED 

Member Function Documentation

override void RunSettings.GameOver ( )
virtual

Actions after the game is over.

Reimplemented from GameCommandReceiver.

override void RunSettings.PauseGame ( )
virtual

Actions after the game is paused.

Reimplemented from GameCommandReceiver.

override void RunSettings.ResetGame ( )
virtual

Actions after the game is resetted.

Reimplemented from GameCommandReceiver.

override void RunSettings.ResumeGame ( )
virtual

Actions after the game is resumed.

Reimplemented from GameCommandReceiver.

override void RunSettings.StartGame ( )
virtual

Actions after the game is started.

Reimplemented from GameCommandReceiver.

override void RunSettings.StopGame ( )
virtual

Actions after the game is stopped.

Reimplemented from GameCommandReceiver.

override void RunSettings.WinGame ( )
virtual

Actions after the game is won.

Reimplemented from GameCommandReceiver.

Member Data Documentation

float RunSettings.acceleration = 0.05f
float RunSettings.brakingAcceleration = -0.5f
List<Command> RunSettings.commandsAfterGameStopped
List<Command> RunSettings.commandsOnGameOver
List<Command> RunSettings.commandsOnGameOverAfterGameStopped
List<Command> RunSettings.commandsOnGameStopping
List<Command> RunSettings.commandsOnGameWon
List<Command> RunSettings.commandsOnGameWonAfterGameStopped
float RunSettings.maxSpeed = 12.0f
float RunSettings.startSpeed = 5.0f

Property Documentation

RunSettings RunSettings.Instance
staticget

Get single instance of RunSettings

float RunSettings.Speed
get

Speed


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