SQCSimulator2023/SQCSim-common/bullet.h

36 lines
597 B
C
Raw Permalink Normal View History

2023-09-18 15:56:17 -04:00
#ifndef BULLET_H__
#define BULLET_H__
2023-09-30 14:54:39 -04:00
2023-09-29 17:02:57 -04:00
#include "define.h"
#include "vector3.h"
2023-10-30 14:36:44 -04:00
#include <map>
#include "player.h"
2023-09-18 15:56:17 -04:00
2023-10-30 14:56:04 -04:00
2023-09-18 15:56:17 -04:00
class World;
2023-10-30 14:36:44 -04:00
class Player;
2023-09-18 15:56:17 -04:00
class Bullet {
public:
2023-09-29 17:02:57 -04:00
Bullet(Vector3f pos, Vector3f dir);
Bullet(Vector3f pos, Vector3f dir, uint64_t tid);
2023-09-18 15:56:17 -04:00
~Bullet();
2023-10-30 14:36:44 -04:00
bool Update(World* world, float elapsedtime, int perframe, std::map<uint64_t, Player*> m_mapPlayer);
2023-09-18 15:56:17 -04:00
void Transpose(int& x, int& z);
2023-10-16 12:02:37 -04:00
Vector3f getPos() const;
Vector3f getVel() const;
2023-09-29 17:02:57 -04:00
uint64_t getTeamID();
2023-09-18 15:56:17 -04:00
private:
2023-09-29 17:02:57 -04:00
Vector3f m_startpos,
m_currentpos,
m_velocity;
uint64_t m_tid = 0;
2023-10-30 14:36:44 -04:00
2023-09-18 15:56:17 -04:00
};
#endif // BULLET_H__