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

A gravity which can be flipped. More...

Inheritance diagram for PlatformerPro.FlippableGravity:
PlatformerPro.Gravity

Public Member Functions

virtual void FlipGravity ()
 Flips the gravity. More...
 
- Public Member Functions inherited from PlatformerPro.Gravity
virtual void Init (Character character)
 
virtual void ApplyGravity ()
 

Public Attributes

int gravityFlipActionKey = -1
 If > 0 then the player can flip gravity using the specified action key. More...
 
bool flipCharacterImmediately
 Should the character be immediately rotated. More...
 
float bumpSpriteInY
 Should we set the cahracters Y velocity to 0 on flip. More...
 
- Public Attributes inherited from PlatformerPro.Gravity
bool usePhysics2dGravity
 If true use the gravity value form the Physics 2D Project settings. More...
 
float gravity = -20.0f
 The value of gravity for manual gravity type. More...
 

Protected Member Functions

void OnGravityFlipped ()
 Raises the gravity flipped event. More...
 

Protected Attributes

bool gravityIsFlipped
 Is the gravity flipped. More...
 
- Protected Attributes inherited from PlatformerPro.Gravity
Character character
 Cached reference to the character. More...
 

Properties

override bool IsGravityFlipped [get]
 Gets a value indicating whether the gravity flipped. More...
 
- Properties inherited from PlatformerPro.Gravity
virtual float? Value [get]
 Gets the current value of gravity. More...
 
virtual bool IsGravityFlipped [get]
 Gets a value indicating whether thegravity flipped. More...
 

Events

System.EventHandler< EmptyEventArgsGravityFlipped
 Event thrown when gravity flipped. More...
 

Detailed Description

A gravity which can be flipped.

Member Function Documentation

◆ FlipGravity()

virtual void PlatformerPro.FlippableGravity.FlipGravity ( )
virtual

Flips the gravity.

◆ OnGravityFlipped()

void PlatformerPro.FlippableGravity.OnGravityFlipped ( )
protected

Raises the gravity flipped event.

Member Data Documentation

◆ bumpSpriteInY

float PlatformerPro.FlippableGravity.bumpSpriteInY

Should we set the cahracters Y velocity to 0 on flip.

◆ flipCharacterImmediately

bool PlatformerPro.FlippableGravity.flipCharacterImmediately

Should the character be immediately rotated.

◆ gravityFlipActionKey

int PlatformerPro.FlippableGravity.gravityFlipActionKey = -1

If > 0 then the player can flip gravity using the specified action key.

◆ gravityIsFlipped

bool PlatformerPro.FlippableGravity.gravityIsFlipped
protected

Is the gravity flipped.

Property Documentation

◆ IsGravityFlipped

override bool PlatformerPro.FlippableGravity.IsGravityFlipped
get

Gets a value indicating whether the gravity flipped.

Event Documentation

◆ GravityFlipped

System.EventHandler<EmptyEventArgs> PlatformerPro.FlippableGravity.GravityFlipped

Event thrown when gravity flipped.


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