2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __A_SPECSPOT_H
|
|
|
|
#define __A_SPECSPOT_H
|
|
|
|
|
|
|
|
#include "actor.h"
|
|
|
|
#include "tarray.h"
|
|
|
|
|
|
|
|
class ASpecialSpot : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (ASpecialSpot, AActor)
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
void BeginPlay();
|
2017-01-12 21:49:18 +00:00
|
|
|
void OnDestroy() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct FSpotList;
|
|
|
|
|
|
|
|
|
|
|
|
class DSpotState : public DThinker
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DSpotState, DThinker)
|
2017-03-08 12:34:26 +00:00
|
|
|
static TObjPtr<DSpotState*> SpotState;
|
2016-09-19 17:58:04 +00:00
|
|
|
TArray<FSpotList> SpotLists;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
DSpotState ();
|
2017-01-12 21:49:18 +00:00
|
|
|
void OnDestroy() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
void Tick ();
|
|
|
|
static DSpotState *GetSpotState(bool create = true);
|
2016-09-19 17:58:04 +00:00
|
|
|
FSpotList *FindSpotList(PClassActor *type);
|
2016-03-01 15:47:10 +00:00
|
|
|
bool AddSpot(ASpecialSpot *spot);
|
|
|
|
bool RemoveSpot(ASpecialSpot *spot);
|
2016-09-19 17:58:04 +00:00
|
|
|
void Serialize(FSerializer &arc);
|
|
|
|
ASpecialSpot *GetNextInList(PClassActor *type, int skipcounter);
|
|
|
|
ASpecialSpot *GetSpotWithMinMaxDistance(PClassActor *type, double x, double y, double mindist, double maxdist);
|
|
|
|
ASpecialSpot *GetRandomSpot(PClassActor *type, bool onlyonce = false);
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|