![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A platform that springs the character in to the air using the characters DefaultAirMovement. More...
Public Member Functions | |
override void | UnParent (IMob character) |
Called when the character is unparented from this platform. More... | |
override bool | SkipMovement (Character character, Movement movement) |
Skip air movements as this platform wants to control the jump button. More... | |
![]() | |
virtual void | Activate (IMob mob) |
Activate the platform. More... | |
virtual void | Deactivate (IMob mob) |
Deactivate the platform. More... | |
virtual bool | IgnoreCollision (Character character, BasicRaycast collider) |
Called to determine if collision should be ignored. Use for one way platforms or z-ordered platforms like those found in loops. More... | |
virtual bool | Collide (PlatformCollisionArgs args) |
Called when one of the characters colliders collides with this platform. More... | |
virtual void | Parent (IMob character) |
Called when the character is parented to this platform. More... | |
![]() | |
void | SetPersistenceState (bool state) |
Sets the persistence state. More... | |
void | SetPersistenceState (bool state, string extraPersistenceData) |
Sets the persistence state, overriding extra persistence data More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
Public Attributes | |
float | springDelay = 0.2f |
How long to wait before the character is flung in to the air. More... | |
float | resetDelay = 0.05f |
How long to wait before reseting the spring animation after flinging the character. More... | |
float | springHeight = 2.0f |
How high the character will spring if they do not press jump. More... | |
float | springPlusJumpHeight = 4.0f |
How high the character will spring if they do press jump. More... | |
bool | pressJumpToGetHighJump = true |
Does the character have to press jump to get the high jump or can they just hold the jump button down? More... | |
Sprite | sprungSprite |
The sprite to use when the springboard has sprung. More... | |
![]() | |
bool | useDefaultPersistence |
Does this Item get persistence defaults form the Game manager? More... | |
![]() | |
bool | enablePersistence |
Should we enable persistence? More... | |
string | guid = System.Guid.NewGuid().ToString() |
Unique ID for this object. You shoulnd't need to edit this, use editor debug mode if you must. More... | |
GameObject | target |
GameObject to apply persitence settings to, defaults to self. More... | |
PersistableObjectType | persistenceImplementation |
How do we implement the persistence settings. More... | |
bool | defaultStateIsDisabled |
If true then the obejct starts disabled. More... | |
string | spawnedObjectName |
If this item was spawned then save the name of the prefab here. More... | |
Protected Member Functions | |
override void | PostInit () |
Init this instance. More... | |
override bool | CustomCollide (PlatformCollisionArgs args) |
If the collision is a foot and character is moving down get ready to launch. More... | |
virtual IEnumerator | DelaySpring () |
Delays the spring until ready. More... | |
virtual IEnumerator | ResetSpring () |
Resets the spring after a delay. More... | |
virtual void | DoSpring () |
Does the actual springing. More... | |
virtual void | DoReset () |
Does the spring reset. More... | |
![]() | |
virtual void | OnPlatformActivated (IMob character) |
Raises the activated event. More... | |
virtual void | DoUpdate () |
Add update code here so it isn't triggered during play mode. More... | |
virtual void | OnPlatformDeactivated (IMob character) |
Raises the deactivated event. More... | |
virtual void | OnFired (IMob character) |
Raises the fired event. More... | |
void | BaseCollide (PlatformCollisionArgs args) |
Called when one of the characters colliders collides with this platform. This handles basic shared behaviour. If you want to ignore it you can ovverride Collide() instead of CustomCollide(). More... | |
virtual void | SavePersistenceData () |
Gets the extra persistence data which is used to save platform state. NOTE: Generally you should override ExtraPersistenceData to save a different set of data. More... | |
override void | ApplyCustomPersistence (PersistableObjectData data) |
Custom persistable implementation. Override to customise. More... | |
virtual void | DoDrawGizmos () |
Draw the base gizmos More... | |
virtual void | DoDrawSelectedGizmos () |
Draw the base gizmos shown when selected. More... | |
virtual void | OnConnectedToObject (Object other) |
Called when the connect handle is dragged on to another object. More... | |
![]() | |
virtual void | SetPersistenceDefaults () |
Sets the persistence defaults. More... | |
virtual void | ProcessState () |
Processes the persisted state. More... | |
virtual void | ApplyExtraPersistenceData (PersistableObjectData data) |
Apply any extra data. This differs from custom persistence, as custom persistence must control both data and ctivation state. More... | |
Protected Attributes | |
Character | character |
The character currently on the springboard. More... | |
bool | jumpHasBeenPressed |
Track if we have pressed/held jump while on the platform. More... | |
Sprite | originalSprite |
Stores a copy of the springboards original (unsprung) sprite. More... | |
![]() | |
float | friction = -1 |
The friction coefficient use -1 for default. More... | |
PlatformActivationType | automaticActivation |
How should the platform activate itself? More... | |
PlatformDeactivationType | automaticDeactivation |
How should the platform deactivate itself? More... | |
bool | conditionsEnableCollisions = true |
Should additional conditions enable or disable collisions. More... | |
CharacterEventArgs | characterEventArgs |
A cached character event args that we update so we don't need to allocate. More... | |
AdditionalCondition[] | conditions |
Cached list of all additional conditions. More... | |
Additional Inherited Members | |
![]() | |
static Color | GizmoColor = new Color(0.3f, 0.4f, 1.0f, 1.0f) |
Default color to use when drawing Platform gizmos. More... | |
![]() | |
static GUIStyle | connectionHandleStyle |
The conneciton handle stlye More... | |
static Platform | activeConnectHandleDrag |
static Vector3 | currentConnectPosition |
![]() | |
virtual bool | Activated [get, protected set] |
Gets or sets a value indicating whether this PlatformerPro.Platform is activated. More... | |
virtual float | Friction [get] |
Gets the friction coefficent for the platform. Returns -1 if the default should be used. More... | |
virtual bool | IsMultiplayerReady [get] |
Gets a value indicating whether this platform can handle multiple characters at once. More... | |
virtual PlatformActivationType | ForcedActivation [get] |
If this is not NONE then the actiation state will be forced to this value and not editable by user. More... | |
virtual PlatformDeactivationType | ForcedDeactivation [get] |
If this is not NONE then the deactiation state will be forced to this value and not editable by user. More... | |
![]() | |
virtual string | ExtraPersistenceData [get] |
Gets the extra persistence data. More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
![]() | |
System.EventHandler< CharacterEventArgs > | PlatformActivated |
Occurs when activated. More... | |
System.EventHandler< CharacterEventArgs > | PlatformDeactivated |
Occurs when deactivated. More... | |
System.EventHandler< CharacterEventArgs > | Fired |
Some platforms have a special kind of action separate to activa or deactivate. For example the spring of a spring baord, or the fall of a decaying platform. This event is sent for those states. More... | |
A platform that springs the character in to the air using the characters DefaultAirMovement.
|
protectedvirtual |
If the collision is a foot and character is moving down get ready to launch.
character | Character. |
type | Type of raycast. |
Reimplemented from PlatformerPro.Platform.
|
protectedvirtual |
Delays the spring until ready.
|
protectedvirtual |
Does the spring reset.
|
protectedvirtual |
Does the actual springing.
Reimplemented in PlatformerPro.EnemySpringBoard.
|
protectedvirtual |
Init this instance.
Reimplemented from PlatformerPro.Platform.
|
protectedvirtual |
Resets the spring after a delay.
|
virtual |
Skip air movements as this platform wants to control the jump button.
false
character | The character. |
movement | Movement being checked. |
Reimplemented from PlatformerPro.Platform.
|
virtual |
Called when the character is unparented from this platform.
Reimplemented from PlatformerPro.Platform.
|
protected |
The character currently on the springboard.
|
protected |
Track if we have pressed/held jump while on the platform.
|
protected |
Stores a copy of the springboards original (unsprung) sprite.
bool PlatformerPro.SpringboardPlatform.pressJumpToGetHighJump = true |
Does the character have to press jump to get the high jump or can they just hold the jump button down?
float PlatformerPro.SpringboardPlatform.resetDelay = 0.05f |
How long to wait before reseting the spring animation after flinging the character.
float PlatformerPro.SpringboardPlatform.springDelay = 0.2f |
How long to wait before the character is flung in to the air.
float PlatformerPro.SpringboardPlatform.springHeight = 2.0f |
How high the character will spring if they do not press jump.
float PlatformerPro.SpringboardPlatform.springPlusJumpHeight = 4.0f |
How high the character will spring if they do press jump.
Sprite PlatformerPro.SpringboardPlatform.sprungSprite |
The sprite to use when the springboard has sprung.