-
Notifications
You must be signed in to change notification settings - Fork 1
/
Bullet.h
49 lines (42 loc) · 1.05 KB
/
Bullet.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Created by josep on 2/14/2024.
//
#ifndef GAME1_BULLET_H
#define GAME1_BULLET_H
namespace raylib{
#include <raylib.h>
}
#include <iostream>
using namespace std;
//TODO implement TTL on bullets and implent textures and animations on collision
class Bullet {
public:
Bullet(Vector3 temp_position, Vector3 temp_velocity, Vector3 temp_hitbox,bool temp,float temp_speed){
position = temp_position;
velocity = temp_velocity;
hitbox = temp_hitbox;
alive = temp;
speed = temp_speed;
// setBulletModel();
}
void UpdatePosition(float x, float y,float z);
Vector3 getPosition();
Vector3 getVelocity();
Vector3 getHitbox();
void kill();
bool getAlive();
BoundingBox getBulletBox();
void setBulletBox(BoundingBox temp);
void setBulletModel();
Model getBulletModel();
float getSpeed();
private:
float speed;
Model bulletModel;
bool alive;
BoundingBox bulletBox{};
Vector3 position{};
Vector3 velocity{};
Vector3 hitbox{};
};
#endif //GAME1_BULLET_H