R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
Player.hpp
1/*
2** EPITECH PROJECT, 2023
3** Player.hpp
4** File description:
5** Player.hpp
6*/
7
8#ifndef URANUS_PLAYER_HPP
9#define URANUS_PLAYER_HPP
10
11#include "uranus/engine/Engine.hpp"
12#include "Damaging.hpp"
13
14class Player : public engine::Base, public Damaging {
15public:
16 explicit Player(const std::string &uniqueName, std::shared_ptr<engine::Texture> &texture, const std::string &bulletTextureName, std::uint32_t networkId = 0, const sf::Vector2f &pos = {0, 0});
17
18 void move(size_t entity, const engine::Event event);
19
20 void shoot();
21
22 void colliding(const size_t &entity, const size_t &entityCollidingWith);
23
24 void enableDoubleBullet();
25
26 void getDamage(size_t entity, int damage) override;
27
28private:
29 float _delta;
30 engine::Clock _clockCooldown;
31 std::string _bulletTextureName;
32 bool _networked;
33 bool _doubleBullet;
34 std::uint32_t _networkId;
35};
36
37#endif // URANUS_PLAYER_HPP
Definition: Damaging.hpp:11
Definition: Player.hpp:14
Definition: Base.hpp:15
Definition: Clock.hpp:14
Definition: Event.hpp:14