Commit 9032e10f authored by AL's avatar AL

tweaks+bugs

parent 85969d35
......@@ -210,7 +210,7 @@ void LevelLayout::AddWall(Wall::Model mod, Wall::Type type, DirectX::XMFLOAT2 po
wallPositions[static_cast<size_t>(mod)].push_back(posData);
}
void LevelLayout::AddEnemy(Enemy::Monster monster, DirectX::XMFLOAT2 pos, bool isDead)
void LevelLayout::AddEnemy(Enemy::Monster monster, DirectX::XMFLOAT2 pos, bool isDead) //right now only adds corpses
{
PositionData posData;
posData.rot = { 0.0f, 3 * PI / 2, PI / 2 }; //this rotation is used for the camera facing technique to work correctly
......@@ -232,16 +232,16 @@ void LevelLayout::RemoveCorpses()
void LevelLayout::SubmitDrawables()
{
auto state = cm.GetEnemyState();
if (state == EnemyCombat::State::GhoulDead && enemyWasDead == false) //adding corpses
if (state == EnemyCombat::State::GhoulDead && !enemyWasDead) //adding corpses
{
enemyWasDead = true;
}
else if (state != EnemyCombat::State::GhoulDead && enemyWasDead == true)
else if (state != EnemyCombat::State::GhoulDead && enemyWasDead)
{
enemyWasDead = false;
AddEnemy(LevelLayout::Enemy::Monster::Ghoul, { RU.GetFloat(6.0f, 7.5f), RU.GetFloat(0.0f,2.0f) }, true);
}
else if (state == EnemyCombat::State::NoEntity) //removing corpses
else if (state == EnemyCombat::State::NoEntity && !cm.GetRewardMenuActiveness()) //removing corpses
{
RemoveCorpses();
}
......
......@@ -103,7 +103,6 @@ public:
LevelLayout& operator=(LevelLayout&&) = delete;
~LevelLayout() = default;
void AddWall(Wall::Model mod, Wall::Type type, DirectX::XMFLOAT2 pos = { 0,0 }, Wall::Direction dir = Wall::Direction::Backwards);
void AddEnemy(Enemy::Monster monster, DirectX::XMFLOAT2 pos = { 0,0 }, bool isDead = false);
void ClearWallPositions()
{
wallPositions.clear();
......@@ -125,6 +124,7 @@ public:
camMan.Translate(translation);
}
private:
void AddEnemy(Enemy::Monster monster, DirectX::XMFLOAT2 pos = { 0,0 }, bool isDead = false);
void RemoveCorpses();
DXGraphics& gfx; //to reduce the amount of argument passing
FrameCommander& fc; //same reason
......
......@@ -148,7 +148,7 @@ PlaneTexNorm::PlaneTexNorm(std::wstring modelName, DXGraphics& gfx, float scale,
{
Step only(0);
only.AddBindable(std::make_shared<TransformCbuf>(gfx, TransformCbuf::DataType::CameraFacing));
ConsecutiveStandart.AddStep(std::move(only));
ConsecutiveCamFacing.AddStep(std::move(only));
}
AddTechnique(std::move(ConsecutiveCamFacing));
......
......@@ -115,7 +115,7 @@ public:
Ghoul::Ghoul()
{
HP = 75u;
HP = 1u;
maxHP = 75u;
speed = 1.0f;
block = 0u;
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -4,7 +4,7 @@
newmtl Enemy
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 1.100000 2.900000 8.300000
Kd 0.900000 2.400000 7.000000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
......@@ -46,10 +46,10 @@ public:
TD::DrawString(L"YOU\nDIED", Vec2(-0.2f, 0.3f), Colors::Red, 0.3f);
break;
case AnnTurn::EnemyDead:
TD::DrawString(L" Killed it!\nChoose your reward!", Vec2(-0.4f, 0.15f), Colors::Green, 0.09f);
TD::DrawString(L" Killed it!\nChoose your reward!", Vec2(-0.52f, 0.15f), Colors::Green, 0.09f);
break;
case AnnTurn::TheBattleBegins:
TD::DrawString(L"Let The Battle\n BEGIN!", Vec2(-0.3f, 0.0f), Colors::Yellow, 0.12f);
TD::DrawString(L"Let The Battle\n BEGIN!", Vec2(-0.4f, 0.0f), Colors::Yellow, 0.12f);
break;
case AnnTurn::SpawningEnemy:
TD::DrawString(L"GHOUL enteres\n the room", Vec2(-0.4f, -0.1f), Colors::Orange, 0.12f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment