49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#include <iostream>
|
|
|
|
#include "Entity.h"
|
|
#include "Ork.h"
|
|
#include "Vector3.h"
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
//Entity entity; // this is an entity instance
|
|
//entity.name = "My Entity";
|
|
|
|
//Monster monster; // can't be instantiated, because Monster is abstract
|
|
//Monster monster2 = Monster::Create(Monsters::Ork);
|
|
|
|
Ork ork;
|
|
ork.name = "Ork1";
|
|
ork.Move();
|
|
|
|
//cout << entity.ToString() << endl;
|
|
//cout << ork.ToString() << endl;
|
|
|
|
//Vector3 position(1.0f, 3.0f, -5.0f);
|
|
//position.y = 0.0f;
|
|
|
|
//ICompareable* pComparable = nullptr;
|
|
//pComparable = &ork;
|
|
//pComparable->Compare(&ork);
|
|
//(*pComparable).Compare(&ork); // same as line above, but more complicated to write
|
|
|
|
//ICompareable* pComparables[] = { new Ork, new Ork, new Ork };
|
|
//for (size_t i = 0; i < size(pComparables); i++)
|
|
//{
|
|
// //pComparables[i]->Compare(nullptr);
|
|
// delete pComparables[i];
|
|
// pComparables[i] = nullptr;
|
|
//}
|
|
|
|
//ICompareable** pHeapComparables = new ICompareable*[10];
|
|
//delete[] pHeapComparables;
|
|
//pHeapComparables = nullptr;
|
|
|
|
//Ork ork2(ork);
|
|
//ork2.name = "Ork2";
|
|
//ork2.Move();
|
|
|
|
return 0;
|
|
} |