@@ -7,6 +7,10 @@
#include <map>
#include "mainwindow.h"

bool MyScene::AbilityUsed = false;
int MyScene::counter = 0;
int MyScene::abilitycounter = 200;

#define PI 3.14159265f

MyScene::MyScene(Window& window, GameObjectMag* gom) : Scene(window), GOM(gom)
@@ -25,6 +29,9 @@ MyScene::~MyScene()

bool MyScene::InitialiseGL()
{
ActionHandler::Instance()->AIChoice = MainWindow::AIchoice;
GOM->AIChoice = MainWindow::AIchoice;

PhysicsEngine::Instance()->SetGravity(Vector3(0.0f, -14.81f, 0.0f));
PhysicsEngine::Instance()->SetDampingFactor(0.988f);

@@ -48,7 +55,7 @@ bool MyScene::InitialiseGL()
AssetsManager::InitializeMeshes();
GOM->GOM_GamePlay(this);

AssetsManager::Player_1 = new Player("car");
//AssetsManager::Player_1 = new Player("car");
AssetsManager::Player_1->SetScene(this);
AssetsManager::Player_1->SetMesh(AssetsManager::Cube(), false);

@@ -67,27 +74,22 @@ bool MyScene::InitialiseGL()
AssetsManager::Player_1->SetTexture(AssetsManager::m_Field, false); //grass texture
}



//4 choices of car size, 1 2 3 4
int size= MainWindow::playersize * 0.5;
AssetsManager::Player_1->SetLocalTransform(Matrix4::Scale(Vector3((MainWindow::playersize), (MainWindow::playersize), (MainWindow::playersize))));
AssetsManager::Player_1->Physics()->SetCollisionShape(new CuboidCollisionShape(Vector3((MainWindow::playersize), (MainWindow::playersize), (MainWindow::playersize))));
AssetsManager::Player_1->SetBoundingRadius((MainWindow::playersize) * (MainWindow::playersize));

AssetsManager::Player_1->Physics()->name = "car";
AssetsManager::Player_1->Physics()->SetInverseMass(0.06f);
AssetsManager::Player_1->Physics()->SetPosition(Vector3(10.0f, 5.0f, 10.0f));
Matrix3 inertia(0.1f, 0.0f, 0.0f, 0.0f, 1.1f, 0.0f, 0.0f, 0.0f, 0.1f);
AssetsManager::Player_1->Physics()->SetInverseInertia(inertia);
AssetsManager::Player_1->Physics()->SetCar(true);
this->AddGameObject(AssetsManager::Player_1);
}

{//Player_1
//AssetsManager::Player_1->Physics()->name = "car";
//AssetsManager::Player_1->Physics()->SetInverseMass(0.06f);
//AssetsManager::Player_1->Physics()->SetPosition(Vector3(10.0f, 5.0f, 10.0f));
//Matrix3 inertia(0.1f, 0.0f, 0.0f, 0.0f, 1.1f, 0.0f, 0.0f, 0.0f, 0.1f);
//AssetsManager::Player_1->Physics()->SetInverseInertia(inertia);
//this->AddGameObject(AssetsManager::Player_1);
}




//Initialize all game objects
Audio_Timer.GetTimedMS();
return true;
@@ -120,19 +122,43 @@ void MyScene::UpdateScene(float msec)
CarPosition = { AssetsManager::Player_1->Physics()->GetPosition().x, AssetsManager::Player_1->Physics()->GetPosition().y, AssetsManager::Player_1->Physics()->GetPosition().z };
CarVelocity = { AssetsManager::Player_1->Physics()->GetLinearVelocity().x, AssetsManager::Player_1->Physics()->GetLinearVelocity().y, AssetsManager::Player_1->Physics()->GetLinearVelocity().z };
float CarSpeed = AssetsManager::Player_1->Physics()->GetLinearVelocity().Length();
FMOD_VECTOR AIPosition = { AssetsManager::NeutralAI->Physics()->GetPosition().x, AssetsManager::NeutralAI->Physics()->GetPosition().y, AssetsManager::NeutralAI->Physics()->GetPosition().z };
/*FMOD_VECTOR AIPosition = { AssetsManager::NeutralAI->Physics()->GetPosition().x, AssetsManager::NeutralAI->Physics()->GetPosition().y, AssetsManager::NeutralAI->Physics()->GetPosition().z };
FMOD_VECTOR AIVelocity = { AssetsManager::NeutralAI->Physics()->GetLinearVelocity().x, AssetsManager::NeutralAI->Physics()->GetLinearVelocity().y, AssetsManager::NeutralAI->Physics()->GetLinearVelocity().z };

float AIForce = AssetsManager::NeutralAI->Physics()->GetForce().Length();
Audio::UpdateSound(AIPosition, AIVelocity, 20000.f + AIForce * 200, 10.f + AIForce, Audio::channel9);
Audio::UpdateSound(CarPosition, CarVelocity, 20000.f + CarSpeed * 200, 10.f + CarSpeed, Audio::channel3);
Audio::Result = Audio::AudioSystem->update();

Audio::Result = Audio::AudioSystem->update();*/
Audio::UpdateSound(CarPosition, CarVelocity, 20000.f + CarSpeed * 200, 10.f + CarSpeed, Audio::channel3);
Audio::GetCameraInfo(m_Camera);

////END AUDIO


//player special ability
int skillchoice = MainWindow::playerskill;

if (!MyScene::AbilityUsed && Window::GetKeyboard()->KeyHeld(KEYBOARD_Q)) {
MyScene::AbilityUsed = true;
if (skillchoice == 1){ //ball pull
ActionHandler::Instance()->GravityGun();
}

if (skillchoice == 2){ //midpoint teleport
AssetsManager::Player_1->Physics()->SetPosition(Vector3(0, 10, 0));
MyScene::AbilityUsed = true;
}

if (skillchoice == 3){
ActionHandler::Instance()->AIOffAbility = true;
}
}

if (AbilityUsed == true) {
abilitycounter--;
if (abilitycounter == 0) {
ActionHandler::Instance()->AIOffAbility = false;
ActionHandler::Instance()->RemoveForce();
}
}

//PowerUps
if (AssetsManager::Player_1->invisible){
if (PowerUps::InvisTimer.GetLastTime() > 20000){
@@ -154,8 +180,8 @@ void MyScene::UpdateScene(float msec)
powerupspark->SetSourcePosition(AssetsManager::Player_1->Physics()->GetPosition());
this->AddParticleObject(powerupspark);
PowerUps::SetPlayerPickup(false);
}


}
if (Window::GetKeyboard()->KeyTriggered(KEYBOARD_B)){
PowerUps::AddRandomPowerUp(this);
}
@@ -184,11 +210,30 @@ void MyScene::UpdateScene(float msec)
Audio::channel4->setPaused(false);
}

/*NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Camera X:" + std::to_string((int)m_Camera->GetPosition().x)
+ " Y:"
+ std::to_string((int)m_Camera->GetPosition().y)
+ " Z:"
+ std::to_string((int)m_Camera->GetPosition().z)
+ " Pitch:"
+ std::to_string((float)m_Camera->GetPitch())
+ " Yaw:"
+ std::to_string((float)m_Camera->GetYaw())
+ " cord:"
+ std::to_string((float)Proj_dir.x) + " "
+ std::to_string((float)Proj_dir.y) + " "
+ std::to_string((float)Proj_dir.z) + " "
);*/

NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "HP : " + std::to_string(AssetsManager::Player_1->Physics()->GetHP()));

if (AssetsManager::Player_1->Physics()->GetHP() <= 0){
AssetsManager::Player_1->Physics()->SetPosition(Vector3(10.0f, 10.0f, 10.0f));
AssetsManager::Player_1->Physics()->SetHP(100.f);

}


}

void MyScene::RenderScene()
@@ -33,6 +33,10 @@ class MyScene : public Scene
void RenderScene() override;
void UpdateScene(float dt) override;

static bool AbilityUsed;
static int counter;
static int abilitycounter;

protected:
GameObjectMag* GOM;
Vector3 Proj_dir;
@@ -58,7 +58,6 @@ it is removed from the particle list. If it's time to generate some new particle
that in here, too. Finally, this function resizes our VBOs if necessary.
*/
void ParticleEmitter::Update(float msec) {

nextParticleTime -= msec; //some time has passed!

/*
@@ -74,7 +73,7 @@ void ParticleEmitter::Update(float msec) {

//Now for the particle 'think' function. Particles are so 'lightweight' there's not
//much point putting this as a member variable of the Particle struct...


for(std::vector<Particle *>::iterator i = particles.begin(); i != particles.end();/*No I++ here!!! */) {
Particle *p = (*i);
Binary file not shown.
@@ -1,17 +1,17 @@
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\vc120.pdb
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\moc_mainwindow.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\moc_dialog.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\particleemitter.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\myscene.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\mainwindow.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\main.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\dialog.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\audio.obj
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\release\gametech cw.exe
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\release\gametech cw.pdb
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\cl.command.1.tlog
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\cl.read.1.tlog
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\cl.write.1.tlog
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\link.command.1.tlog
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\link.read.1.tlog
d:\team project\team-project-newcastle\team-project-newcastle-henry-s-branch(1)\team-project-newcastle-henry-s-branch\henry\teamwork\gametechcw\gametechnologies\gametech cw\release\gametech cw.tlog\link.write.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\vc120.pdb
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\moc_mainwindow.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\moc_dialog.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\myscene.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\mainwindow.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\main.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\dialog.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\release\gametech cw.exe
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\release\gametech cw.pdb
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\audio.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\particleemitter.obj
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\cl.command.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\cl.read.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\cl.write.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\link.command.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\link.read.1.tlog
d:\team-project-newcastle-eric - copy\withtimer\gametechnologies\gametech cw\release\gametech cw.tlog\link.write.1.tlog
@@ -1,4 +1,4 @@
Build started 07/03/2016 16:48:27.
Build started 08/03/2016 18:34:06.
1>Project "D:\Team Project\Team-Project-Newcastle\GameTechCW\GameTechnologies\GameTech CW\GameTech CW.vcxproj" on node 2 (Build target(s)).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(381,5): warning MSB8028: The intermediate directory (Release\) contains files shared from another project (Tutorial1 - Integration.vcxproj). This can lead to incorrect clean and rebuild behavior.
1>ClCompile:
@@ -15,8 +15,8 @@
Release\moc_mainwindow.obj
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Generating code
1>d:\team project\team-project-newcastle\gametechcw\ncltech\powerups.cpp(163): warning C4715: 'PowerUps::PowerUpSelector' : not all control paths return a value
1>d:\team project\team-project-newcastle\gametechcw\ncltech\actionhandler.cpp(70): warning C4715: 'ActionHandler::ScoreCheck' : not all control paths return a value
1>d:\team project\team-project-newcastle\gametechcw\ncltech\powerups.cpp(162): warning C4715: 'PowerUps::PowerUpSelector' : not all control paths return a value
1>d:\team project\team-project-newcastle\gametechcw\ncltech\actionhandler.cpp(102): warning C4715: 'ActionHandler::ScoreCheck' : not all control paths return a value
Finished generating code
1>ParticleEmitter.obj : warning LNK4049: locally defined symbol ___glewEnableVertexAttribArray imported
1>ParticleEmitter.obj : warning LNK4049: locally defined symbol ___glewGenBuffers imported
@@ -53,4 +53,4 @@

Build succeeded.

Time Elapsed 00:00:06.10
Time Elapsed 00:00:06.06
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,8 +19,8 @@

QT_BEGIN_MOC_NAMESPACE
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[5];
char stringdata0[54];
QByteArrayData data[6];
char stringdata0[62];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -33,11 +33,12 @@ QT_MOC_LITERAL(0, 0, 10), // "MainWindow"
QT_MOC_LITERAL(1, 11, 9), // "play_game"
QT_MOC_LITERAL(2, 21, 0), // ""
QT_MOC_LITERAL(3, 22, 22), // "create_chara_triggered"
QT_MOC_LITERAL(4, 45, 8) // "exit_now"
QT_MOC_LITERAL(4, 45, 8), // "exit_now"
QT_MOC_LITERAL(5, 54, 7) // "make_ai"

},
"MainWindow\0play_game\0\0create_chara_triggered\0"
"exit_now"
"exit_now\0make_ai"
};
#undef QT_MOC_LITERAL

@@ -47,21 +48,23 @@ static const uint qt_meta_data_MainWindow[] = {
7, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount

// slots: name, argc, parameters, tag, flags
1, 0, 29, 2, 0x0a /* Public */,
3, 0, 30, 2, 0x0a /* Public */,
4, 0, 31, 2, 0x0a /* Public */,
1, 0, 34, 2, 0x0a /* Public */,
3, 0, 35, 2, 0x0a /* Public */,
4, 0, 36, 2, 0x0a /* Public */,
5, 0, 37, 2, 0x0a /* Public */,

// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,

0 // eod
@@ -76,6 +79,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
case 0: _t->play_game(); break;
case 1: _t->create_chara_triggered(); break;
case 2: _t->exit_now(); break;
case 3: _t->make_ai(); break;
default: ;
}
}
@@ -107,13 +111,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 3)
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
_id -= 4;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 3)
if (_id < 4)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 3;
_id -= 4;
}
return _id;
}
Binary file not shown.
Binary file not shown.
@@ -149,13 +149,13 @@ void Dialog::sizesliderValueChanged(int value){
void Dialog::skillsliderValueChanged(int value){

if (value == 1) {
skilloptions->setText("Shrink & Boost");
skilloptions->setText("Ball Pull");
}
if (value == 2) {
skilloptions->setText("Gravity Gun");
skilloptions->setText("Midpoint Teleport");
}
if (value == 3) {
skilloptions->setText("Tron");
skilloptions->setText("AI Stun");
}

skillchoice = value;
@@ -33,10 +33,10 @@ class Dialog : public QDialog

QLabel *namelabel = new QLabel("Name: ");
QLabel *sizelabel = new QLabel("Cube Size: ");
QLabel *skilllabel = new QLabel("Special Ability: ");
QLabel *skilllabel = new QLabel("Special Ability (1 use): ");
QLabel *texlabel = new QLabel("Texture: ");
QLabel *sizeoptions = new QLabel("Small");
QLabel *skilloptions = new QLabel("Shrink & Boost");
QLabel *skilloptions = new QLabel("Ball Pull");
QLabel *texoptions = new QLabel("Checker");
QLabel *textcubeimg = new QLabel;

@@ -89,8 +89,8 @@ void Loading()
while (isStillLoad)
{
Loading_scene->RenderScene();
Loading_scene->GetCamera()->SetYaw(i);
NCLDebug::Log(Vector3(1, 1, 1), std::to_string(i));
Loading_scene->GetCamera()->SetYaw(i * 0.4);
//NCLDebug::Log(Vector3(1, 1, 1), std::to_string(i));
i++;
}
}
@@ -113,7 +113,6 @@ void Scoring()
}

int main()

{
//-------------------
//--- MAIN ENGINE ---
@@ -125,6 +124,7 @@ int main()
return Quit(true, "Window failed to initialise!");
}


GameObjectMag* GOM_Loading = new GameObjectMag();

GOM_Loading->SetID(0);
@@ -139,11 +139,6 @@ int main()
main2(argc, argv); //call the qt window
//~~~ END QT SHIT~~~

//if they clicked the exit button, don't progress
if (MainWindow::WannaExit){
return Quit();
}

//Initialise the PhysicsEngine
//Create GameObject Iterate Root Node upon which the GameObject List will be built
PhysicsEngine::Instance();
@@ -170,22 +165,16 @@ int main()
loading.join();

//Create main game-loop
Audio::AddSound({ 0.f, 0.f, 0.f }, { 0.f, 0.f, 0.f }, Audio::channel6, Audio::Start, 5);

while (Window::GetWindow().UpdateWindow() && !Window::GetKeyboard()->KeyDown(KEYBOARD_ESCAPE)){


float dt = Window::GetWindow().GetTimer()->GetTimedMS() * 0.001f; //How many milliseconds since last update?

if (Window::GetKeyboard()->KeyTriggered(KEYBOARD_P))
{
PhysicsEngine::Instance()->SetPaused(!PhysicsEngine::Instance()->IsPaused());
{
PhysicsEngine::Instance()->SetPaused(!PhysicsEngine::Instance()->IsPaused());
}

if (Window::GetKeyboard()->KeyTriggered(KEYBOARD_M)){
Audio::AddSound({ 0.f, 0.f, 0.f }, { 0.f, 0.f, 0.f }, Audio::channel6, Audio::Start, 5);
}


if (Window::GetKeyboard()->KeyTriggered(KEYBOARD_NUMPAD1)){
if (PhysicsEngine::Instance()->GetDebug()){
PhysicsEngine::Instance()->SetDebug(false);
@@ -201,7 +190,8 @@ int main()
engine_timer.GetTimedMS();

if (!PhysicsEngine::Instance()->IsGameover()) {



PhysicsEngine::Instance()->Feedback();
ActionHandler::Instance()->Update(dt);
PhysicsEngine::Instance()->Update(dt);
@@ -218,21 +208,6 @@ int main()

//Debug Data
if (PhysicsEngine::Instance()->GetDebug()){
/*NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Camera X:" + std::to_string((int)m_Camera->GetPosition().x)
+ " Y:"
+ std::to_string((int)m_Camera->GetPosition().y)
+ " Z:"
+ std::to_string((int)m_Camera->GetPosition().z)
+ " Pitch:"p1
+ std::to_string((float)m_Camera->GetPitch())
+ " Yaw:"
+ std::to_string((float)m_Camera->GetYaw())
+ " cord:"
+ std::to_string((float)Proj_dir.x) + " "
+ std::to_string((float)Proj_dir.y) + " "
+ std::to_string((float)Proj_dir.z) + " "
);*/

NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Physics Engine: %s (Press P to toggle)", PhysicsEngine::Instance()->IsPaused() ? "Paused" : "Enabled");
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "--------------------------------");
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Collision Detection Distance: " + std::to_string(PhysicsEngine::Instance()->GetCollisionDetectionDis()));
@@ -241,25 +216,83 @@ int main()
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Physics Update: %5.2fms", physics_ms);
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Scene Update : %5.2fms", update_ms);
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "CURRENT PLAYER: " + MainWindow::playername);
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "TIME REMAINING: " + std::to_string(MyScene::timeremaining));
NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "PowerUp :" + AssetsManager::Player_1->GetPowerUpState());
// NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "SCORE: BLUE " + std::to_string(ActionHandler::BLUESCORE) + " - " + std::to_string(ActionHandler::REDSCORE) + " RED");
}

if (MainWindow::playerskill == 1){
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "ABILITY: BALL GRAB");
NCLDebug::DrawTextClipSpace(Vector4(0.5f, -0.7f, 0.0f, 1.0f),
26.0f,
"ABILITY: BALL GRAB",
TEXTALIGN_LEFT,
Vector4(1.0, 1.0, 1.0, 1.0));
}
if (MainWindow::playerskill == 2){
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "ABILITY: TELEPORT");
NCLDebug::DrawTextClipSpace(Vector4(0.5f, -0.7f, 0.0f, 1.0f),
26.0f,
"ABILITY: TELEPORT",
TEXTALIGN_LEFT,
Vector4(1.0, 1.0, 1.0, 1.0));
}
if (MainWindow::playerskill == 3){
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "ABILITY: ?????");
NCLDebug::DrawTextClipSpace(Vector4(0.5f, -0.7f, 0.0f, 1.0f),
26.0f,
"ABILITY: AI STUN",
TEXTALIGN_LEFT,
Vector4(1.0, 1.0, 1.0, 1.0));
}

if (!MyScene::AbilityUsed){
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "ABILITY: available");
NCLDebug::DrawTextClipSpace(Vector4(0.5f, -0.8f, 0.0f, 1.0f),
26.0f,
"ABILITY: available",
TEXTALIGN_LEFT,
Vector4(1.0, 1.0, 1.0, 1.0));
}
if (MyScene::AbilityUsed){
//NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "ABILITY: used");
NCLDebug::DrawTextClipSpace(Vector4(0.5f, -0.8f, 0.0f, 1.0f),
26.0f,
"ABILITY: used",
TEXTALIGN_LEFT,
Vector4(1.0, 1.0, 1.0, 1.0));
}


//Render the Scene

scene->RenderScene();

//check if need end game menu
if (ActionHandler::Instance()->GameOver){
Window::GetWindow().GetTimer()->GetTimedMS();

MainWindow::isExitWindow = true;

Window::GetWindow().ShowOSPointer(true);

char *argv[] = { "windowinwindow", "arg1", "arg2", NULL };
int argc = sizeof(argv) / sizeof(char*)-1;
main2(argc, argv);

MyScene::AbilityUsed = false;
MyScene::abilitycounter = 200;
Window::GetWindow().GetTimer()->GetTimedMS();
}


//HUD for scoring
{
int SC = ActionHandler::Instance()->ScoreCheck();
if (SC == 1) {
for (int i = 0; i < 100; i++) {
Transition_scene->RenderScene();
//Scoring.join();
isScoring = true;
//isStillLoad = true;

NCLDebug::DrawTextClipSpace(Vector4(-0.4f, 0.0f, 0.0f, 1.0f),

NCLDebug::DrawTextClipSpace(Vector4(-0.3f, 0.0f, 0.0f, 1.0f),
40.0,
"Red Team Score !",
TEXTALIGN_LEFT,
@@ -272,11 +305,10 @@ int main()
else if (SC == 2) {
for (int i = 0; i < 100; i++) {
Transition_scene->RenderScene();
//Scoring.join();
isScoring = true;
isStillLoad = true;

NCLDebug::DrawTextClipSpace(Vector4(-0.4f, 0.0f, 0.0f, 1.0f),
NCLDebug::DrawTextClipSpace(Vector4(-0.3f, 0.0f, 0.0f, 1.0f),
40.0f,
"Blue Team Score !",
TEXTALIGN_LEFT,