Merge branch 'master' of github.com:sippeangelo/Return-to-the-Return-of-Return-Fire-2-Returngeance

Conflicts:
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
Stiffly
2014-04-17 00:11:53 +02:00
10 changed files with 158 additions and 17 deletions
+4 -7
View File
@@ -1,5 +1,6 @@
#include "ParticleSystem.h"
#include "PrecompiledHeader.h"
#include "ParticleSystem.h"
#include "World.h"
void Systems::ParticleSystem::Update(double dt)
@@ -13,13 +14,10 @@ void Systems::ParticleSystem::UpdateEntity(double dt, EntityID entity, EntityID
if(!transformComponent)
return;
transformComponent->Position.y --;
timeLived[entity] += dt;
auto emitterComponent = m_World->GetComponent<Components::ParticleEmitter>(entity, "ParticleEmitter");
}
@@ -35,7 +33,6 @@ void Systems::ParticleSystem::SpawnParticles()
auto particle = m_World->CreateEntity();
auto transform = m_World->AddComponent<Components::Transform>(particle, "Transform");
transform->Position = glm::vec3(0);
particles.push_back(particle);
}
}
+3 -4
View File
@@ -13,16 +13,15 @@ namespace Systems
class ParticleSystem : public System
{
public:
ParticleSystem(World* world);
ParticleSystem(World* world)
:System(world) { };
void RegisterComponents(ComponentFactory* cf) override;
void Update(double dt) override;
void UpdateEntity(double dt, EntityID entity, EntityID parent) override;
void Draw(double dt);
private:
void SpawnParticles();
};
+1 -1
View File
@@ -41,7 +41,7 @@ Systems::PhysicsSystem::PhysicsSystem(World* world) : System(world)
worldInfo.m_broadPhaseBorderBehaviour = hkpWorldCinfo::BROADPHASE_BORDER_FIX_ENTITY; // just fix the entity if the object falls off too far
// You must specify the size of the broad phase - objects should not be simulated outside this region
worldInfo.setBroadPhaseWorldSize(1000.0f);
worldInfo.setBroadPhaseWorldSize(10000.0f);
m_PhysicsWorld = new hkpWorld(worldInfo);
}
// Register all collision agents, even though only box - box will be used in this particular example.