2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __A_SPECSPOT_H
|
|
|
|
#define __A_SPECSPOT_H
|
|
|
|
|
|
|
|
#include "actor.h"
|
|
|
|
#include "tarray.h"
|
|
|
|
|
|
|
|
struct FSpotList;
|
|
|
|
|
|
|
|
|
2019-01-05 09:04:27 +00:00
|
|
|
class DSpotState : public DObject
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2019-01-05 09:04:27 +00:00
|
|
|
DECLARE_CLASS(DSpotState, DObject)
|
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);
|
2018-12-04 17:21:48 +00:00
|
|
|
bool AddSpot(AActor *spot);
|
|
|
|
bool RemoveSpot(AActor *spot);
|
2016-09-19 17:58:04 +00:00
|
|
|
void Serialize(FSerializer &arc);
|
2018-12-04 17:21:48 +00:00
|
|
|
AActor *GetNextInList(PClassActor *type, int skipcounter);
|
|
|
|
AActor *GetSpotWithMinMaxDistance(PClassActor *type, double x, double y, double mindist, double maxdist);
|
|
|
|
AActor *GetRandomSpot(PClassActor *type, bool onlyonce = false);
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|