32 lines
556 B
C++
32 lines
556 B
C++
#pragma once
|
|
|
|
#include "../math.hpp"
|
|
#include "world_object.hpp"
|
|
|
|
namespace dxd::sim
|
|
{
|
|
|
|
class Aircraft : public WorldObject
|
|
{
|
|
private:
|
|
vec2 _position;
|
|
float _direction;
|
|
float _speed;
|
|
int _trail_cooldown;
|
|
|
|
const int _TRAIL_DELAY = 60;
|
|
const int _TRAIL_DURATION = 420;
|
|
|
|
public:
|
|
Aircraft(vec2 position, float direction, float speed)
|
|
: _position(position), _direction(direction), _speed(speed)
|
|
{
|
|
_trail_cooldown = _TRAIL_DELAY;
|
|
}
|
|
|
|
void tick(float timestep, World *world) override;
|
|
void draw(Renderer *rend) override;
|
|
};
|
|
|
|
} // namespace dxd::sim
|