Fixed so oilshooter shoots the new particle

This commit is contained in:
tleety
2015-10-19 16:32:14 +02:00
parent 13a5af837b
commit 970201520e
5 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1011,7 +1011,7 @@ void dd::Systems::LevelSystem::GetNextLevel()
1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 2, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 5,
0, 0, 0, 0, 0, 0, 0};
color =
{w, w, w, w, w, w, w,
+6 -4
View File
@@ -31,9 +31,11 @@ void dd::Systems::ProjectileSystem::Initialize()
physics->Mask = static_cast<CollisionLayer::Type>(CollisionLayer::Type::Pad | CollisionLayer::Type::Brick | CollisionLayer::Type::Wall);
physics->Calculate = true;
ctransform->Position = glm::vec3(0.f, 0.f, -10.f);
ctransform->Scale = glm::vec3(0.1f, 0.1f, 0.1f);
auto cModel = m_World->AddComponent<Components::Model>(ent);
cModel->ModelFile = "Models/Test/Ball/Sid.obj";
ctransform->Scale = glm::vec3(0.6f, 0.6f, 0.6f);
// auto cModel = m_World->AddComponent<Components::Model>(ent);
// cModel->ModelFile = "Models/Test/Ball/Sid.obj";
auto cSprite = m_World->AddComponent<Components::Sprite>(ent);
cSprite->SpriteFile = "Textures/Particles/OilShot.png";
auto projectile = m_World->AddComponent<Components::Projectile>(ent);
m_World->CommitEntity(ent);
@@ -117,7 +119,7 @@ bool dd::Systems::ProjectileSystem::OnActionButton(const dd::Events::ActionButto
m_World->RemoveComponent<Components::Template>(ent);
auto transform = m_World->GetComponent<Components::Transform>(ent);
transform->Position = event.Position;
transform->Velocity = glm::vec3(0, 5, 0);
transform->Velocity = glm::vec3(0, 7, 0);
m_Shots--;
if (m_Shots <= 0) {
auto ball = m_World->GetComponent<Components::Ball>(m_AttachedSquid);