39 bool IsBeam(
const int num);
40 inline void IsDual(
int idx,
bool dual) { m_gun[idx].dual = dual; };
42 void MountGun(
const int num,
const float recharge,
const float lifespan,
const float damage,
const float length,
43 const float width,
const bool mining,
const Color &color,
const float speed,
const bool beam,
const float heatrate,
const float coolrate);
47 inline bool IsGunMounted(
int idx)
const {
return m_gun_present[idx]; }
48 inline float GetGunRange(
int idx)
const {
return m_gun[idx].projData.speed * m_gun[idx].projData.lifespan; };
49 inline float GetProjSpeed(
int idx)
const {
return m_gun[idx].projData.speed; };
60 std::vector<GunLoc> locs;
75 bool m_shouldUseLeadCalc =
false;
Guns
Definition: FixedGuns.h:15
@ GUN_REAR
Definition: FixedGuns.h:17
@ GUNMOUNT_MAX
Definition: FixedGuns.h:18
@ GUN_FRONT
Definition: FixedGuns.h:16
nlohmann::json Json
Definition: Json.h:8
Definition: DynamicBody.h:15
Definition: FixedGuns.h:21
void Init(DynamicBody *b)
Definition: FixedGuns.cpp:41
void UnMountGun(int num)
Definition: FixedGuns.cpp:154
bool IsGunMounted(int idx) const
Definition: FixedGuns.h:47
virtual ~FixedGuns()
Definition: FixedGuns.cpp:19
void SetGunFiringState(int idx, int s)
Definition: FixedGuns.cpp:174
bool Fire(int num, Body *ship)
Definition: FixedGuns.cpp:180
const vector3d & GetCurrentLeadDir() const
Definition: FixedGuns.h:51
void UpdateGuns(float timeStep)
Definition: FixedGuns.cpp:213
FixedGuns()
Definition: FixedGuns.cpp:15
float GetProjSpeed(int idx) const
Definition: FixedGuns.h:49
virtual void SaveToJson(Json &jsonObj, Space *space)
Definition: FixedGuns.cpp:64
void SetShouldUseLeadCalc(bool enable)
Definition: FixedGuns.h:35
void MountGun(const int num, const float recharge, const float lifespan, const float damage, const float length, const float width, const bool mining, const Color &color, const float speed, const bool beam, const float heatrate, const float coolrate)
Definition: FixedGuns.cpp:133
void IsDual(int idx, bool dual)
Definition: FixedGuns.h:40
virtual void LoadFromJson(const Json &jsonObj, Space *space)
Definition: FixedGuns.cpp:79
bool IsFiring()
Definition: FixedGuns.cpp:23
void InitGuns(SceneGraph::Model *m)
Definition: FixedGuns.cpp:97
const vector3d & GetTargetLeadPos() const
Definition: FixedGuns.h:50
bool IsBeam(const int num)
Definition: FixedGuns.cpp:36
float GetGunTemperature(int idx) const
Definition: FixedGuns.cpp:272
void SetCoolingBoost(float cooler)
Definition: FixedGuns.h:52
float GetGunRange(int idx) const
Definition: FixedGuns.h:48
void UpdateLead(float timeStep, int num, Body *ship, Body *target)
Definition: FixedGuns.cpp:237
Definition: RefCounted.h:11
Definition: FixedGuns.h:56
vector3d dir
Definition: FixedGuns.h:58
vector3d pos
Definition: FixedGuns.h:57
Definition: Projectile.h:9