Fixed so oilshooter shoots the new particle
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
@@ -23,6 +23,7 @@
|
|||||||
#include "Game/EHitPad.h"
|
#include "Game/EHitPad.h"
|
||||||
#include "Game/CProjectile.h"
|
#include "Game/CProjectile.h"
|
||||||
#include "Game/CBall.h"
|
#include "Game/CBall.h"
|
||||||
|
#include "REndering/CSprite.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@ void dd::Systems::LevelSystem::GetNextLevel()
|
|||||||
1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 0, 1, 2, 1, 0, 1,
|
1, 0, 1, 2, 1, 0, 1,
|
||||||
0, 1, 0, 1, 0, 1, 0,
|
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};
|
0, 0, 0, 0, 0, 0, 0};
|
||||||
color =
|
color =
|
||||||
{w, w, w, w, w, w, w,
|
{w, w, w, w, w, w, w,
|
||||||
|
|||||||
@@ -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->Mask = static_cast<CollisionLayer::Type>(CollisionLayer::Type::Pad | CollisionLayer::Type::Brick | CollisionLayer::Type::Wall);
|
||||||
physics->Calculate = true;
|
physics->Calculate = true;
|
||||||
ctransform->Position = glm::vec3(0.f, 0.f, -10.f);
|
ctransform->Position = glm::vec3(0.f, 0.f, -10.f);
|
||||||
ctransform->Scale = glm::vec3(0.1f, 0.1f, 0.1f);
|
ctransform->Scale = glm::vec3(0.6f, 0.6f, 0.6f);
|
||||||
auto cModel = m_World->AddComponent<Components::Model>(ent);
|
// auto cModel = m_World->AddComponent<Components::Model>(ent);
|
||||||
cModel->ModelFile = "Models/Test/Ball/Sid.obj";
|
// 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);
|
auto projectile = m_World->AddComponent<Components::Projectile>(ent);
|
||||||
|
|
||||||
m_World->CommitEntity(ent);
|
m_World->CommitEntity(ent);
|
||||||
@@ -117,7 +119,7 @@ bool dd::Systems::ProjectileSystem::OnActionButton(const dd::Events::ActionButto
|
|||||||
m_World->RemoveComponent<Components::Template>(ent);
|
m_World->RemoveComponent<Components::Template>(ent);
|
||||||
auto transform = m_World->GetComponent<Components::Transform>(ent);
|
auto transform = m_World->GetComponent<Components::Transform>(ent);
|
||||||
transform->Position = event.Position;
|
transform->Position = event.Position;
|
||||||
transform->Velocity = glm::vec3(0, 5, 0);
|
transform->Velocity = glm::vec3(0, 7, 0);
|
||||||
m_Shots--;
|
m_Shots--;
|
||||||
if (m_Shots <= 0) {
|
if (m_Shots <= 0) {
|
||||||
auto ball = m_World->GetComponent<Components::Ball>(m_AttachedSquid);
|
auto ball = m_World->GetComponent<Components::Ball>(m_AttachedSquid);
|
||||||
|
|||||||
Reference in New Issue
Block a user