[Orxonox-commit 5201] r9866 - in code/branches/invaders: data/levels src/modules/invader
zifloria at orxonox.net
zifloria at orxonox.net
Mon Dec 2 17:43:39 CET 2013
Author: zifloria
Date: 2013-12-02 17:43:39 +0100 (Mon, 02 Dec 2013)
New Revision: 9866
Modified:
code/branches/invaders/data/levels/Invaders.oxw
code/branches/invaders/src/modules/invader/Invader.cc
code/branches/invaders/src/modules/invader/Invader.h
code/branches/invaders/src/modules/invader/InvaderEnemy.cc
code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc
Log:
no ending, no crash
Modified: code/branches/invaders/data/levels/Invaders.oxw
===================================================================
--- code/branches/invaders/data/levels/Invaders.oxw 2013-12-02 16:26:43 UTC (rev 9865)
+++ code/branches/invaders/data/levels/Invaders.oxw 2013-12-02 16:43:39 UTC (rev 9866)
@@ -1,7 +1,7 @@
<LevelInfo
- name = "Invader Test"
- description = "Invader Test"
- tags = "test"
+ name = "Orxonox Arcade"
+ description = "Arcade shooter. Maximise your points!!!"
+ tags = "minigame"
screenshot = "emptylevel.png"
/>
<!-- include("HUDTemplates3.oxo") -->
Modified: code/branches/invaders/src/modules/invader/Invader.cc
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.cc 2013-12-02 16:26:43 UTC (rev 9865)
+++ code/branches/invaders/src/modules/invader/Invader.cc 2013-12-02 16:43:39 UTC (rev 9866)
@@ -138,7 +138,8 @@
void Invader::end()
{
+ orxout() << "STOP THE GAME, CHEATER!!!" << endl;
// Call end for the parent class.
- Deathmatch::end();
+ // Deathmatch::end();
}
}
Modified: code/branches/invaders/src/modules/invader/Invader.h
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.h 2013-12-02 16:26:43 UTC (rev 9865)
+++ code/branches/invaders/src/modules/invader/Invader.h 2013-12-02 16:43:39 UTC (rev 9866)
@@ -71,6 +71,7 @@
void levelUp(){level++;}
void addPoints(int numPoints){point += numPoints * multiplier; b_combo = true;}
void comboControll();
+ int lives;
private:
WeakPtr<InvaderCenterPoint> center_;
WeakPtr<InvaderShip> player;
@@ -79,7 +80,6 @@
Timer enemySpawnTimer;
Timer comboTimer;
//Context* context;
- int lives;
int level;
int point;
bool b_combo;
Modified: code/branches/invaders/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderEnemy.cc 2013-12-02 16:26:43 UTC (rev 9865)
+++ code/branches/invaders/src/modules/invader/InvaderEnemy.cc 2013-12-02 16:43:39 UTC (rev 9866)
@@ -67,7 +67,7 @@
inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
{
- // setVelocity(Vector3(1000,0,0));
+ // setVelocity(Vector3(1500,0,0));
removeHealth(2000);
return false;
}
Modified: code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc 2013-12-02 16:26:43 UTC (rev 9865)
+++ code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc 2013-12-02 16:43:39 UTC (rev 9866)
@@ -79,6 +79,11 @@
else if(this->bShowPoints_)
{
const std::string& points = multi_cast<std::string>(this->InvaderGame->getPoints());
+ if (this->InvaderGame->lives <= 0)
+ {
+ setTextSize(0.1);
+ setPosition(Vector2(0.2, 0.5));
+ }
this->setCaption(points);
}
else if(this->bShowMultiplier_)
More information about the Orxonox-commit
mailing list