Stuff :3
This commit is contained in:
@@ -3,6 +3,24 @@
|
||||
|
||||
void Systems::LevelGenerationSystem::SpawnObstacle()
|
||||
{
|
||||
std::shared_ptr<Components::Transform> transform;
|
||||
std::shared_ptr<Components::Bounds> bounds;
|
||||
std::shared_ptr<Components::Collision> collision;
|
||||
std::shared_ptr<Components::Model> model;
|
||||
|
||||
EntityID ent;
|
||||
ent = m_World->CreateEntity();
|
||||
m_World->SetProperty(ent, "Name", std::string("Obstacle"));
|
||||
|
||||
transform = m_World->AddComponent<Components::Transform>(ent, "Transform");
|
||||
transform->Position = glm::vec3(0,0,0); // fix position
|
||||
|
||||
bounds = m_World->AddComponent<Components::Bounds>(ent, "Bounds");
|
||||
bounds->VolumeVector = glm::vec3(4, 4, 4);
|
||||
|
||||
collision = m_World->AddComponent<Components::Collision>(ent, "Collision");
|
||||
|
||||
model = m_World->AddComponent<Components::Model>(ent, "Model");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
#define LevelGenerationSystem_h__
|
||||
|
||||
#include "System.h"
|
||||
#include "World.h"
|
||||
#include "Components/Transform.h"
|
||||
#include "Components/Bounds.h"
|
||||
#include "Components/Collision.h"
|
||||
#include "Components/Model.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
@@ -14,7 +23,7 @@ namespace Systems
|
||||
void SpawnObstacle();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user