summaryrefslogtreecommitdiffhomepage
path: root/Player.h
blob: b1cb6296d14452a56bae38a074275596325982db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <memory>
#include <vector>

#include <raylib.h>

#include "Controller.h"


struct Player
{
    Player();
    void update(float dt);
    void draw();
    void hit();
    template<typename T> bool collide(const std::vector<T>& bullets);
    float m_invulnerability;
    Vector2 m_position;
    Vector2 m_velocity;
    std::unique_ptr<Controller> m_controller;
};


#include "Player-inl.h"