Handles player character movement. More...
#include <player.h>#include <time_system.h>#include <app.h>#include <input.h>#include <colliders.h>Functions | |
| int | Player_Look (Vec2 direction) |
| [Utility] Sets the player's movement direction | |
| int | Player_Move () |
| [PostUpdate] Moves the player according to current direction and speed | |
| void | Player_UpdateHitbox () |
| [Utility] Updates the player's hitbox position based on current position | |
Handles player character movement.
Contains functions for moving the player character, handling acceleration, and managing movement states.
| int Player_Look | ( | Vec2 | direction | ) |
[Utility] Sets the player's movement direction
Makes player look in specified direction.
Updates the player's direction vector and sets appropriate movement speed. Ignores input if the direction is locked (e.g., during a dash).
| direction | The direction to move the player in |
| int Player_Move | ( | ) |
[PostUpdate] Moves the player according to current direction and speed
Moves the player.
Applies the player's direction and speed to position, handles collision checking, and updates movement state flags.
| void Player_UpdateHitbox | ( | ) |
[Utility] Updates the player's hitbox position based on current position
Updates player hitbox.
Recalculates the position of the player's collision hitbox to match their current world position, with appropriate offsets.