![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Interface used by mobile things like characters and enemies. More...
Public Member Functions | |
void | SetVelocityX (float x) |
Sets the velocity in x. More... | |
void | SetVelocityY (float y) |
Sets the velocity in y. More... | |
void | Translate (float x, float y, bool applyYTransformsInWorldSpace) |
Translate the character by the supplied amount. More... | |
bool | IsColliderIgnored (Collider2D collider) |
Check if a given collider should be ignored in collisions. More... | |
Properties | |
AnimationState | AnimationState [get] |
The current animation state. More... | |
int | FacingDirection [get] |
Returns the direction being faced. 0 for none, 1 for right, -1 for left. More... | |
int | LastFacedDirection [get] |
Returns the direction being faced, but if direction is currently 0 instead returns the direction last faced. More... | |
Vector2 | Velocity [get] |
The characters velocity relative to self. More... | |
Vector2 | PreviousVelocity [get] |
The characters velocity in the previous frame relative to self. More... | |
float | SlopeTargetRotation [get] |
If slopes are on this is the rotation we are rotating towards. More... | |
float | SlopeActualRotation [get] |
If slopes are on this is the rotation we are currently on. More... | |
float | PreviousRotation [get] |
If slopes are on this is the rotation we were at last frame. More... | |
float | IgnoredSlope [get, set] |
Gets the ignored slope. The ignored slope is used primary for internal physics calculations and is the largest slope that was ignored by the side colliders last frame. More... | |
float | MinSideAngle [get] |
Gets the minimum angle at which geometry is considered a wall. More... | |
int | ZLayer [get, set] |
Gets or sets the characters current z layer. More... | |
bool | Grounded [get] |
Returns true if we are grounded or false otherwise. More... | |
int | GroundLayer [get] |
If grounded this is the layer of the ground. Undefined if not grounded. More... | |
float | Gravity [get] |
Gravity currently acting on the character. More... | |
float | Friction [get, set] |
Gets the friction. More... | |
Events | |
System.EventHandler< AnimationEventArgs > | ChangeAnimationState |
Event for anmation state changes. More... | |
Interface used by mobile things like characters and enemies.
bool PlatformerPro.IMob.IsColliderIgnored | ( | Collider2D | collider | ) |
Check if a given collider should be ignored in collisions.
true
if this instance is ignoring he specified collider; otherwise, false
.collider | Collider. |
Implemented in PlatformerPro.Enemy, and PlatformerPro.Character.
void PlatformerPro.IMob.SetVelocityX | ( | float | x | ) |
Sets the velocity in x.
Implemented in PlatformerPro.Enemy, and PlatformerPro.Character.
void PlatformerPro.IMob.SetVelocityY | ( | float | y | ) |
Sets the velocity in y.
Implemented in PlatformerPro.Enemy, and PlatformerPro.Character.
void PlatformerPro.IMob.Translate | ( | float | x, |
float | y, | ||
bool | applyYTransformsInWorldSpace | ||
) |
Translate the character by the supplied amount.
x | The x amount. |
y | The y amount. |
applyYTransformsInWorldSpace | Should Y transforms be in world space instead of realtive to the character position? |
Implemented in PlatformerPro.Enemy, and PlatformerPro.Character.
|
get |
The current animation state.
|
get |
Returns the direction being faced. 0 for none, 1 for right, -1 for left.
|
getset |
Gets the friction.
|
get |
Gravity currently acting on the character.
|
get |
Returns true if we are grounded or false otherwise.
|
get |
If grounded this is the layer of the ground. Undefined if not grounded.
|
getset |
Gets the ignored slope. The ignored slope is used primary for internal physics calculations and is the largest slope that was ignored by the side colliders last frame.
|
get |
Returns the direction being faced, but if direction is currently 0 instead returns the direction last faced.
|
get |
Gets the minimum angle at which geometry is considered a wall.
|
get |
If slopes are on this is the rotation we were at last frame.
|
get |
The characters velocity in the previous frame relative to self.
|
get |
If slopes are on this is the rotation we are currently on.
|
get |
If slopes are on this is the rotation we are rotating towards.
|
get |
The characters velocity relative to self.
|
getset |
Gets or sets the characters current z layer.
System.EventHandler<AnimationEventArgs> PlatformerPro.IMob.ChangeAnimationState |
Event for anmation state changes.