GPR5100 - Rollback
Loading...
Searching...
No Matches
player_character.h
1#pragma once
2#include <SFML/System/Time.hpp>
3
4#include "game_globals.h"
5
6namespace game
7{
8class PhysicsManager;
9
14{
15 float shootingTime = 0.0f;
16 PlayerInput input = 0u;
17 PlayerNumber playerNumber = INVALID_PLAYER;
18 short health = playerHealth;
19 float invincibilityTime = 0.0f;
20};
21class GameManager;
22
26class PlayerCharacterManager : public core::ComponentManager<PlayerCharacter, static_cast<core::EntityMask>(ComponentType::PLAYER_CHARACTER)>
27{
28public:
29 explicit PlayerCharacterManager(core::EntityManager& entityManager, PhysicsManager& physicsManager, GameManager& gameManager);
30 void FixedUpdate(sf::Time dt);
31
32private:
33 PhysicsManager& physicsManager_;
34 GameManager& gameManager_;
35};
36}
ComponentManager is a class that owns Component in a contiguous array. Component indexing is done wit...
Definition: component.h:33
Manages the entities in an array using bitwise operations to know if it has components.
Definition: entity.h:35
GameManager is a class which manages the state of the game. It is shared between the client and the s...
Definition: game_manager.h:27
PhysicsManager is a class that holds both BodyManager and BoxManager and manages the physics fixed up...
Definition: physics_manager.h:75
PlayerCharacterManager is a ComponentManager that holds all the PlayerCharacter in the game.
Definition: player_character.h:27
constexpr auto INVALID_PLAYER
INVALID_PLAYER is an integer constant that defines an invalid player number.
Definition: game_globals.h:26
std::uint8_t PlayerNumber
PlayerNumber is a type used to define the number of the player. Starting from 0 to maxPlayerNmb.
Definition: game_globals.h:22
std::uint8_t PlayerInput
PlayerInput is a type defining the input data from a player.
Definition: game_globals.h:103
PlayerCharacter is a struct that holds information about the player character (when they can shoot ag...
Definition: player_character.h:14