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

Stick at walls. Also perform wall-jumps More...

Inheritance diagram for UnityPlatformer.CharacterActionWallStick:
UnityPlatformer.CharacterAction

Public Member Functions

override void OnEnable ()
 Initialization More...
 
override int WantsToUpdate (float delta)
 When Character is colliding left or right but now below and falling! Stick! More...
 
override void GainControl (float delta)
 Reset SmoothDamp and enter state States.WallSliding More...
 
override void PerformAction (float delta)
 Stick, then slide down. Can dismount jumping if enableWallJumps More...
 
override PostUpdateActions GetPostUpdateActions ()
 default behaviour 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

float wallSlideSpeedMax = 3
 Vertical terminal velocity while stick More...
 
float wallStickLeaveTime = 0.25f
 Time player need to oppose walkstick to leave / press in the other direction. More...
 
float wallStickLeaveAgain = 0.25f
 After wall-jump, time that CharacterActionWallStick will be disabled More...
 
bool enableWallJumps = true
 Character can use wall-jumps ? More...
 
CharacterActionJump actionJump
 CharacterActionJump More...
 
JumpConstantProperties wallJumpClimb = new JumpConstantProperties(new Vector2(10, 35))
 Climb jump: Jump in the same direction as the wall. More...
 
JumpConstantProperties wallJumpOff = new JumpConstantProperties(new Vector2(20, 20))
 Jump with no direction pressed. More...
 
JumpConstantProperties wallLeap = new JumpConstantProperties(new Vector2(20, 20))
 Jump in the opposite direction More...
 
int priority = 7
 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...
 

Detailed Description

Stick at walls. Also perform wall-jumps

Member Function Documentation

◆ GainControl()

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

Reset SmoothDamp and enter state States.WallSliding

Reimplemented from UnityPlatformer.CharacterAction.

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionWallStick.GetPostUpdateActions ( )
inlinevirtual

default behaviour

Implements UnityPlatformer.CharacterAction.

◆ OnEnable()

override void UnityPlatformer.CharacterActionWallStick.OnEnable ( )
inlinevirtual

Initialization

Reimplemented from UnityPlatformer.CharacterAction.

◆ PerformAction()

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

Stick, then slide down. Can dismount jumping if enableWallJumps

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

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

When Character is colliding left or right but now below and falling! Stick!

Implements UnityPlatformer.CharacterAction.

Member Data Documentation

◆ actionJump

CharacterActionJump UnityPlatformer.CharacterActionWallStick.actionJump

◆ enableWallJumps

bool UnityPlatformer.CharacterActionWallStick.enableWallJumps = true

Character can use wall-jumps ?

◆ priority

int UnityPlatformer.CharacterActionWallStick.priority = 7

action priority

◆ wallJumpClimb

JumpConstantProperties UnityPlatformer.CharacterActionWallStick.wallJumpClimb = new JumpConstantProperties(new Vector2(10, 35))

Climb jump: Jump in the same direction as the wall.

◆ wallJumpOff

JumpConstantProperties UnityPlatformer.CharacterActionWallStick.wallJumpOff = new JumpConstantProperties(new Vector2(20, 20))

Jump with no direction pressed.

◆ wallLeap

JumpConstantProperties UnityPlatformer.CharacterActionWallStick.wallLeap = new JumpConstantProperties(new Vector2(20, 20))

Jump in the opposite direction

◆ wallSlideSpeedMax

float UnityPlatformer.CharacterActionWallStick.wallSlideSpeedMax = 3

Vertical terminal velocity while stick

◆ wallStickLeaveAgain

float UnityPlatformer.CharacterActionWallStick.wallStickLeaveAgain = 0.25f

After wall-jump, time that CharacterActionWallStick will be disabled

◆ wallStickLeaveTime

float UnityPlatformer.CharacterActionWallStick.wallStickLeaveTime = 0.25f

Time player need to oppose walkstick to leave / press in the other direction.


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