platformer
Public Member Functions | Public Attributes | Protected Attributes | List of all members
UnityPlatformer.CharacterActionFence Class Reference

Move in a fence. The character must be completely inside the fence to enter More...

Inheritance diagram for UnityPlatformer.CharacterActionFence:
UnityPlatformer.CharacterAction

Public Member Functions

override void OnEnable ()
 keep Character.actions in sync More...
 
void OnActionDown (string _action)
 input.onActionDown More...
 
void OnActionUp (string _action)
 input.onActionUp More...
 
override int WantsToUpdate (float delta)
 Enter in fence mode when user is in a fence area and pressing up/down More...
 
override void GainControl (float delta)
 EnterState More...
 
override void PerformAction (float delta)
 Do your action here. More...
 
override PostUpdateActions GetPostUpdateActions ()
 Return what to do next. More...
 
- Public Member Functions inherited from UnityPlatformer.CharacterAction
void Reset ()
 Try to set character & input from parent nodes More...
 
virtual void OnDisable ()
 keep Character.actions in sync More...
 
virtual void LoseControl (float delta)
 Called (once) when other action 'WantsToUpdate' or this action don't anymore More...
 

Public Attributes

Vector2 speed = new Vector2(6, 6)
 Fence movement speed. More...
 
string action = "Pull"
 Input name action to start grabbing on the fence More...
 
bool dismountJumping = true
 Allow dismount pressing jump More...
 
JumpConstantProperties jumpOff = new JumpConstantProperties(new Vector2(20, 20))
 dismount jump properties More...
 
int priority = 10
 Action priority More...
 
- Public Attributes inherited from UnityPlatformer.CharacterAction
Character character
 Target character that will be affected by this movement More...
 
PlatformerInput input
 Input to listen More...
 
Action onGrainControl
 Callback when this movement WantsToUpdate and has highest priority. More...
 
Action onLoseControl
 Callback when this movement don't WantsToUpdate or another movement has higher priority More...
 

Protected Attributes

bool grabHeld
 Is action held? More...
 
CharacterActionJump actionJump
 CharacterActionJump More...
 

Detailed Description

Move in a fence. The character must be completely inside the fence to enter

Member Function Documentation

◆ GainControl()

override void UnityPlatformer.CharacterActionFence.GainControl ( float  delta)
inlinevirtual

EnterState

Reimplemented from UnityPlatformer.CharacterAction.

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionFence.GetPostUpdateActions ( )
inlinevirtual

Return what to do next.

By default should be: APPLY_GRAVITY | WORLD_COLLISIONS

Implements UnityPlatformer.CharacterAction.

◆ OnActionDown()

void UnityPlatformer.CharacterActionFence.OnActionDown ( string  _action)
inline

input.onActionDown

◆ OnActionUp()

void UnityPlatformer.CharacterActionFence.OnActionUp ( string  _action)
inline

input.onActionUp

◆ OnEnable()

override void UnityPlatformer.CharacterActionFence.OnEnable ( )
inlinevirtual

keep Character.actions in sync

Reimplemented from UnityPlatformer.CharacterAction.

◆ PerformAction()

override void UnityPlatformer.CharacterActionFence.PerformAction ( float  delta)
inlinevirtual

Do your action here.

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

override int UnityPlatformer.CharacterActionFence.WantsToUpdate ( float  delta)
inlinevirtual

Enter in fence mode when user is in a fence area and pressing up/down

Implements UnityPlatformer.CharacterAction.

Member Data Documentation

◆ action

string UnityPlatformer.CharacterActionFence.action = "Pull"

Input name action to start grabbing on the fence

◆ actionJump

CharacterActionJump UnityPlatformer.CharacterActionFence.actionJump
protected

◆ dismountJumping

bool UnityPlatformer.CharacterActionFence.dismountJumping = true

Allow dismount pressing jump

◆ grabHeld

bool UnityPlatformer.CharacterActionFence.grabHeld
protected

Is action held?

◆ jumpOff

JumpConstantProperties UnityPlatformer.CharacterActionFence.jumpOff = new JumpConstantProperties(new Vector2(20, 20))

dismount jump properties

◆ priority

int UnityPlatformer.CharacterActionFence.priority = 10

Action priority

◆ speed

Vector2 UnityPlatformer.CharacterActionFence.speed = new Vector2(6, 6)

Fence movement speed.


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