Pax1601 30a9d4e730 Added speed and altitude controls
Fixed Clone
Added "Land here" command
Added ROE and reaction to threat buttons
2023-02-08 18:26:45 +01:00

30 lines
752 B
C++

#pragma once
#include "framework.h"
#include "utils.h"
#include "dcstools.h"
#include "luatools.h"
#include "Unit.h"
#define AIR_DEST_DIST_THR 2000
class AirUnit : public Unit
{
public:
AirUnit(json::value json, int ID);
virtual wstring getCategory() = 0;
virtual void changeSpeed(wstring change) {};
virtual void changeAltitude(wstring change) {};
virtual void setTargetSpeed(double newTargetSpeed) {};
virtual void setTargetAltitude(double newTargetAltitude) {};
protected:
virtual void AIloop();
virtual void setState(int newState);
bool isDestinationReached();
bool setActiveDestination();
void createHoldingPattern();
bool updateActivePath(bool looping);
void goToDestination(wstring enrouteTask = L"nil");
void taskWingmen();
};