Final Commit
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "imgui.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -137,62 +136,6 @@ void Player::Die() {
|
||||
m_CurrentAnimation = m_DieStartAnimation;
|
||||
m_HasPlayedDeathAnimation = false;
|
||||
}
|
||||
void Player::ProcessImGui() {
|
||||
ImGui::Begin("Collision Info", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text("is Grounded: %s", m_Grounded ? "true" : "false");
|
||||
ImGui::Checkbox("Draw Collision Rect", &m_DrawCollisionRect);
|
||||
std::string currentState { "No idea" };
|
||||
switch (m_State) {
|
||||
case PlayerState::Idle:
|
||||
currentState = "Idle";
|
||||
break;
|
||||
case PlayerState::Digging:
|
||||
currentState = "Digging";
|
||||
break;
|
||||
case PlayerState::Walking:
|
||||
currentState = "Walking";
|
||||
break;
|
||||
case PlayerState::Flying:
|
||||
currentState = "Flying";
|
||||
break;
|
||||
}
|
||||
ImGui::Text("Player State %s", currentState.c_str());
|
||||
ImGui::Text("Is digging Primed: %s", m_IsDiggingPrimed ? "true" : "false");
|
||||
ImGui::Text("Bob counter: %f", m_BobTimer);
|
||||
ImGui::Text("Bob up: %s", m_BobUp ? "true" : "false");
|
||||
ImGui::Text("Is Grounded: %s", m_Grounded ? "true" : "false");
|
||||
std::string direction {};
|
||||
switch (m_Direction) {
|
||||
case PlayerDirection::Down:
|
||||
direction = "Down";
|
||||
break;
|
||||
case PlayerDirection::Left:
|
||||
direction = "Left";
|
||||
break;
|
||||
case PlayerDirection::Right:
|
||||
direction = "Right";
|
||||
break;
|
||||
case PlayerDirection::Up:
|
||||
direction = "Up";
|
||||
break;
|
||||
}
|
||||
ImGui::Text("Direction: %s", direction.c_str());
|
||||
|
||||
|
||||
//ContactMap
|
||||
ImGui::Text("ContactMap:");
|
||||
ImGui::Text("Top: %s", m_ContactMap[Collision::CollisionDirection::Top] != nullptr ? "true" : "false");
|
||||
ImGui::Text("Bottom: %s", m_ContactMap[Collision::CollisionDirection::Bottom] != nullptr ? "true" : "false");
|
||||
ImGui::Text("Left: %s", m_ContactMap[Collision::CollisionDirection::Left] != nullptr ? "true" : "false");
|
||||
ImGui::Text("Right: %s", m_ContactMap[Collision::CollisionDirection::Right] != nullptr ? "true" : "false");
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Values");
|
||||
ImGui::Text("Current Fuel: %f", GameManager::GetInstance().GetFuel());
|
||||
ImGui::Text("Current Score: %d", GameManager::GetInstance().GetScore());
|
||||
ImGui::Text("Current Hull Integrity: %d", GameManager::GetInstance().GetHullIntegrity());
|
||||
ImGui::End();
|
||||
}
|
||||
void Player::Dig(Collision::CollisionDirection dir, WorldLevel& level) {
|
||||
m_State = PlayerState::Digging;
|
||||
m_DigProgress = 0;
|
||||
|
||||
Reference in New Issue
Block a user