FCV Engine 0.1
A tool and framework for tutorials in game development
Loading...
Searching...
No Matches
Movement Class Reference

Component that controls the movement of an object with a RigidBody2D. More...

Inheritance diagram for Movement:

Private Member Functions

void CheckInputs ()
 Checks for all inputs and assigns values based on the pressed key.
 
void Run ()
 Calculates the targeted speed and applies it over time using rigidbody2D.
 
void Jump ()
 Applies a force upward to simulate a jump.
 
void GravityScaling ()
 Scales gravity so that the player has higher gravity when falling compared to jumping.
 
void SetAnimation ()
 Sets the animations of the player.
 
bool CanJump ()
 Checks if all conditions for player jump is met.
 
void Flip ()
 Flips sprite depending on direction of movement inputs.
 

Detailed Description

Component that controls the movement of an object with a RigidBody2D.

Definition at line 10 of file Movement.cs.

Member Function Documentation

◆ CanJump()

bool CanJump ( )
private

Checks if all conditions for player jump is met.

Returns
returns true if all requirements are met

Definition at line 180 of file Movement.cs.


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