Unfinished npc object thingy
This commit is contained in:
parent
9e1577b1dc
commit
bfc212ab42
1
samp-npcs/NPC.cpp
Normal file
1
samp-npcs/NPC.cpp
Normal file
|
@ -0,0 +1 @@
|
|||
#include "NPC.h"
|
7
samp-npcs/NPC.h
Normal file
7
samp-npcs/NPC.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
class NPC
|
||||
{
|
||||
public:
|
||||
virtual void Update() = 0;
|
||||
};
|
||||
|
13
samp-npcs/NPCManager.cpp
Normal file
13
samp-npcs/NPCManager.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "NPCManager.h"
|
||||
|
||||
NPCZone::NPCZone(float radius) {
|
||||
this->radius = radius;
|
||||
}
|
||||
|
||||
NPCZone::~NPCZone() {
|
||||
|
||||
}
|
||||
|
||||
void NPCZone::Update() {
|
||||
this->npcs.push_back(new NPCVehicle());
|
||||
}
|
23
samp-npcs/NPCManager.h
Normal file
23
samp-npcs/NPCManager.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include "NPC.h"
|
||||
#include "NPCVehicle.h"
|
||||
|
||||
#define SPAWN_RADIUS 300
|
||||
#define DESPAWN_RADIUS SPAWN_RADIUS + 100
|
||||
|
||||
class NPCManager
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class NPCZone {
|
||||
public:
|
||||
NPCZone(float radius);
|
||||
~NPCZone();
|
||||
void Update();
|
||||
|
||||
private:
|
||||
float radius;
|
||||
std::vector<NPC*> npcs;
|
||||
};
|
13
samp-npcs/NPCVehicle.cpp
Normal file
13
samp-npcs/NPCVehicle.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "NPCVehicle.h"
|
||||
|
||||
NPCVehicle::NPCVehicle() {
|
||||
|
||||
}
|
||||
|
||||
NPCVehicle::~NPCVehicle() {
|
||||
|
||||
}
|
||||
|
||||
void NPCVehicle::Update() {
|
||||
|
||||
}
|
11
samp-npcs/NPCVehicle.h
Normal file
11
samp-npcs/NPCVehicle.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
#include "NPC.h"
|
||||
|
||||
class NPCVehicle : public NPC
|
||||
{
|
||||
public:
|
||||
NPCVehicle();
|
||||
~NPCVehicle();
|
||||
void Update();
|
||||
};
|
||||
|
|
@ -20,12 +20,18 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="NPC.cpp" />
|
||||
<ClCompile Include="NPCManager.cpp" />
|
||||
<ClCompile Include="NPCVehicle.cpp" />
|
||||
<ClCompile Include="paths.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DEFINE.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="NPC.h" />
|
||||
<ClInclude Include="NPCManager.h" />
|
||||
<ClInclude Include="NPCVehicle.h" />
|
||||
<ClInclude Include="paths.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
|
|
|
@ -21,6 +21,15 @@
|
|||
<ClCompile Include="paths.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NPCManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NPCVehicle.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NPC.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DEFINE.def">
|
||||
|
@ -31,5 +40,14 @@
|
|||
<ClInclude Include="paths.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NPCManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NPCVehicle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NPC.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user