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

Movement while below water surface (buoyancy) TODO slopeAccelerationFactor/slopeDeccelerationFactor More...

Inheritance diagram for UnityPlatformer.CharacterActionLiquidMovement:
UnityPlatformer.CharacterAction

Public Member Functions

override void OnEnable ()
 keep Character.actions in sync More...
 
override int WantsToUpdate (float delta)
 Execute when collision below. 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 GainControl (float delta)
 Called (once) when this action is going to be 'PerformAction' for first time More...
 
virtual void LoseControl (float delta)
 Called (once) when other action 'WantsToUpdate' or this action don't anymore More...
 

Public Attributes

float speed = 6
 Movement speed More...
 
float accelerationTime = .1f
 Time to reach max speed More...
 
float surfaceLevel = 1.5f
 Distance from feet (up) More...
 
float terminalYUP = 2f
 Terminal velocity going up More...
 
float terminalYDown = 3f
 Terminal velocity going down More...
 
float liquidMinHeight = 0.75f
 Ignore liquids under liquidMinHeight More...
 
JumpConstantProperties jumpOff = new JumpConstantProperties(new Vector2(20, 20))
 Exit jump properties 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

Movement while below water surface (buoyancy) TODO slopeAccelerationFactor/slopeDeccelerationFactor

Member Function Documentation

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionLiquidMovement.GetPostUpdateActions ( )
inlinevirtual

Return what to do next.

By default should be: APPLY_GRAVITY | WORLD_COLLISIONS

Implements UnityPlatformer.CharacterAction.

◆ OnEnable()

override void UnityPlatformer.CharacterActionLiquidMovement.OnEnable ( )
inlinevirtual

keep Character.actions in sync

Reimplemented from UnityPlatformer.CharacterAction.

◆ PerformAction()

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

Do your action here.

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

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

Execute when collision below.

Implements UnityPlatformer.CharacterAction.

Member Data Documentation

◆ accelerationTime

float UnityPlatformer.CharacterActionLiquidMovement.accelerationTime = .1f

Time to reach max speed

◆ jumpOff

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

Exit jump properties

◆ liquidMinHeight

float UnityPlatformer.CharacterActionLiquidMovement.liquidMinHeight = 0.75f

Ignore liquids under liquidMinHeight

◆ speed

float UnityPlatformer.CharacterActionLiquidMovement.speed = 6

Movement speed

◆ surfaceLevel

float UnityPlatformer.CharacterActionLiquidMovement.surfaceLevel = 1.5f

Distance from feet (up)

◆ terminalYDown

float UnityPlatformer.CharacterActionLiquidMovement.terminalYDown = 3f

Terminal velocity going down

◆ terminalYUP

float UnityPlatformer.CharacterActionLiquidMovement.terminalYUP = 2f

Terminal velocity going up


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