mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-27 03:53:33 +00:00
28 lines
727 B
C++
Executable File
28 lines
727 B
C++
Executable File
#pragma once
|
|
#ifndef DESTROYER_H
|
|
#define DESTROYER_H
|
|
|
|
#include "vessel.h"
|
|
#include "destroyerData.h"
|
|
#include "player.h"
|
|
#include "util.h"
|
|
|
|
namespace battleship {
|
|
class Destroyer : public Vessel {
|
|
public:
|
|
Destroyer(Player*, vb01::Vector3, int);
|
|
void dropDepthCharge();
|
|
void attack(Order);
|
|
void update();
|
|
private:
|
|
void reload();
|
|
inline bool canDropDepthCharge(){return vb01::getTime() - lastDropTime > rateOfDrops;}
|
|
bool reloading = false;
|
|
float maxDepthChargeDropRange;
|
|
int depthCharges, maxDepthCharges, rateOfDrops, reloadRate;
|
|
s64 lastShotTime = 0, reloadStartTime = 0, lastDropTime = 0;
|
|
};
|
|
}
|
|
|
|
#endif
|