-
Notifications
You must be signed in to change notification settings - Fork 2
/
FactoryManager.h
64 lines (49 loc) · 1.45 KB
/
FactoryManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include <Spore\BasicIncludes.h>
#include "DrillBuilding.h"
#include <Spore/Simulator/cSpatialObject.h>
#include <Spore/Simulator/cInteractableObject.h>
#include <Spore/Simulator/cGameData.h>
#define FactoryManagerPtr intrusive_ptr<FactoryManager>
#define FactoryManagerA (FactoryManager::Get())[0]
///
/// In your dllmain Initialize method, add the system like this:
/// ModAPI::AddSimulatorStrategy(new FactoryManager(), FactoryManager::NOUN_ID);
///
class FactoryManager
: public Simulator::cStrategy
{
public:
static const uint32_t TYPE = id("RattlerSpore::FactoryManager");
static const uint32_t NOUN_ID = TYPE;
int AddRef() override;
int Release() override;
void Initialize() override;
void Dispose() override;
const char* GetName() const override;
bool Write(Simulator::ISerializerStream* stream) override;
bool WriteToXML(Simulator::XmlSerializer* writexml) override;
bool Read(Simulator::ISerializerStream* stream) override;
void Update(int deltaTime, int deltaGameTime) override;
//
// You can add more methods here
//
bool CreateBuilding(const Vector3& position, uint32_t buildingType);
static Simulator::Attribute ATTRIBUTES[];
static FactoryManager* Get();
private:
//
// You can add members here
//
bool LoadPlanet = false;
static FactoryManager* sInstance;
//vector<DrillBuildingPtr> SavedBuildings;
};
struct ratBuilding
{public:
private:
Vector3 position;
uint32_t planetID;
uint32_t ID;
uint32_t propFact;
};