#ifndef Fokker_hpp
#define Fokker_hpp

#include <logic/Logic.hpp>

struct Fokker : MeshObject {
  Fokker(const double size = 1.25);
private:
  const struct Mesh : CylinderMesh {
    const struct Prop : TriangleMesh {
      Prop(const double size);
    } prop;
    const Vector* propPosition = nullptr;
    Mesh(const double size);
  } mesh;
  const ::Mesh& getMesh() const override;
  const MeshObject& renderMesh() const override;
};

typedef FirstPerson::Gunner<
  FirstPerson::Enemy<
    Terminatable<
      ::Enemy<
        Gunner<
          FirstPerson::EnemyFire,
          7,
          Fokker
        >
      >
    >
  >
> FokkerEnemyParent;

struct FokkerEnemy : FokkerEnemyParent {
  FokkerEnemy(
    const Vector& r,
    const bool isLeft
  );
private:
  static const EnemyAction Fly = Termination + 1;
  const Vector r;
  const bool isLeft;
  double startRad = 0;
  const Vector* getAcceleration() const override;
  const int getPrize() const override;
  const bool heroIsVisible() const override;
  const Object::Time getFireTime() const override;
  const Vector& getFireStartDirection() const override;
  const Vector& calculatePosition() const;
  const Vector& calculateDirection() const;
  const Matrix* getActivationMatrix() override;
  const Vector& getTerminationSpeed() const override;
  Object& simulate(
    const EnemyAction action,
    const Object::Time dt
  ) override;
};

#endif
