[Orxonox-commit 7005] r11624 - in code/branches/FlappyOrx_HS17: data/levels data/levels/includes data/levels/templates data/overlays data/particle src/modules/flappyorx
merholzl at orxonox.net
merholzl at orxonox.net
Mon Dec 4 14:38:03 CET 2017
Author: merholzl
Date: 2017-12-04 14:38:03 +0100 (Mon, 04 Dec 2017)
New Revision: 11624
Removed:
code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeapon.oxi
code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeaponEnemy.oxi
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxAsteroid.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxAsteroid.h
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.h
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.h
Modified:
code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw
code/branches/FlappyOrx_HS17/data/levels/templates/spaceshipFlappyOrx.oxt
code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo
code/branches/FlappyOrx_HS17/data/particle/fire3.particle
code/branches/FlappyOrx_HS17/src/modules/flappyorx/CMakeLists.txt
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.h
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxPrereqs.h
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.h
Log:
More clean-up, particle fix, deleting unnecessary files, adding quotes
Modified: code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw
===================================================================
--- code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw 2017-12-04 13:38:03 UTC (rev 11624)
@@ -4,11 +4,8 @@
tags = "minigame"
screenshot = "orxonoxArcade.png"
/>
-<FlappyOrx
- spawnDistance=50
- Speed = 700 />
+
<?lua
- include("includes/notifications.oxi")
include("templates/lodInformation.oxt")
include("templates/spaceshipFlappyOrx.oxt")
include("overlays/FlappyOrxHUD.oxo")
@@ -49,7 +46,7 @@
<MovableEntity
collisionType = dynamic
linearDamping = 0.8
- angularDamping = 0
+ angularDamping = 1
scale = "<?lua print(j) ?>"
collisiondamage = 10000
enablecollisiondamage = true
@@ -59,7 +56,7 @@
<Model mass="1000" mesh="ast<?lua print(i) ?>.mesh" />
</attached>
<collisionShapes>
- <SphereCollisionShape radius="<?lua print(j + 5) ?>" />
+ <SphereCollisionShape radius="<?lua print(j + 7) ?>" />
</collisionShapes>
</MovableEntity>
</Template>
Deleted: code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeapon.oxi
===================================================================
--- code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeapon.oxi 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeapon.oxi 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,30 +0,0 @@
- <weaponslots>
- <WeaponSlot position="-9.2,2,-13" />
- <WeaponSlot position=" 9.2,2,-13" />
- </weaponslots>
- <weaponsets>
- <WeaponSet firemode=0 />
- <WeaponSet firemode=1 />
- </weaponsets>
- <weaponpacks>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
- <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
- </links>
- <Weapon>
- <InvaderWeapon mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="laserbeam.mesh" />
- </Weapon>
- <Weapon>
- <InvaderWeapon mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="laserbeam.mesh" />
- </Weapon>
- </WeaponPack>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
- </links>
- </WeaponPack>
- </weaponpacks>
- <munition>
- <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
- </munition>
Deleted: code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeaponEnemy.oxi
===================================================================
--- code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeaponEnemy.oxi 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/levels/includes/FlappyOrxWeaponEnemy.oxi 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,30 +0,0 @@
- <weaponslots>
- <WeaponSlot position="-9.2,2,-13" />
- <WeaponSlot position=" 9.2,2,-13" />
- </weaponslots>
- <weaponsets>
- <WeaponSet firemode=0 />
- <WeaponSet firemode=1 />
- </weaponsets>
- <weaponpacks>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
- <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
- </links>
- <Weapon>
- <InvaderWeaponEnemy mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="laserbeam.mesh" />
- </Weapon>
- <Weapon>
- <InvaderWeaponEnemy mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="laserbeam.mesh" />
- </Weapon>
- </WeaponPack>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
- </links>
- </WeaponPack>
- </weaponpacks>
- <munition>
- <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
- </munition>
Modified: code/branches/FlappyOrx_HS17/data/levels/templates/spaceshipFlappyOrx.oxt
===================================================================
--- code/branches/FlappyOrx_HS17/data/levels/templates/spaceshipFlappyOrx.oxt 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/levels/templates/spaceshipFlappyOrx.oxt 2017-12-04 13:38:03 UTC (rev 11624)
@@ -22,18 +22,15 @@
enablecollisiondamage = true
speedBase = 100
- speedIncrease = 2
- tubeDistanceBase = 300
- tubeDistanceIncrease = -3
+ speedIncrease = 0.5
+ tubeDistanceBase = 200
+ tubeDistanceIncrease = -1
- upwardThrust = 200
- gravity = 500
+ upwardThrust = 210
+ gravity = 700
>
- <engines>
- <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipFlappyOrxengine />
- <MultiStateEngine position="-7.6, 0, 0" template=spaceshipFlappyOrxengine />
- </engines>
+
<attached>
<Model position="0,0,0" yaw=180 pitch=90 roll=270 scale=9 mesh="FlappyOrxShip.mesh" />
Modified: code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo
===================================================================
--- code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,5 +1,7 @@
-
-
+<Template name="spectatorhud">
+ <OverlayGroup name = "spectatorhud" scale = "1, 1">
+ </OverlayGroup>
+</Template>
<Template name="FlappyOrxHUD">
<OverlayGroup name="FlappyOrxHUD" scale = "1, 1">
Modified: code/branches/FlappyOrx_HS17/data/particle/fire3.particle
===================================================================
--- code/branches/FlappyOrx_HS17/data/particle/fire3.particle 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/data/particle/fire3.particle 2017-12-04 13:38:03 UTC (rev 11624)
@@ -64,9 +64,6 @@
time2 0.4
colour3 0 0 0 0
time3 1
- colour4 0.5 0.5 0.5 0
- time4 1
- colour5 0.5 0.5 0.5 0
- time5 1
+
}
}
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/CMakeLists.txt
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/CMakeLists.txt 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/CMakeLists.txt 2017-12-04 13:38:03 UTC (rev 11624)
@@ -3,10 +3,7 @@
FlappyOrx.cc
FlappyOrxCenterPoint.cc
FlappyOrxShip.cc
- FlappyOrxWeapon.cc
- FlappyOrxWeaponEnemy.cc
FlappyOrxHUDinfo.cc
- FlappyOrxAsteroid.cc
END_BUILD_UNIT
)
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,8 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Leo Mehr Holz
+ * Leo Merholz
* Pascal Schärli
+ * Co-authors:
+ * ...
*
*/
@@ -46,7 +48,6 @@
#include "infos/PlayerInfo.h"
#include "FlappyOrxCenterPoint.h"
-#include "FlappyOrxAsteroid.h"
#include "FlappyOrxShip.h"
#include "core/command/ConsoleCommand.h"
@@ -72,13 +73,6 @@
setHUDTemplate("FlappyOrxHUD");
}
- void FlappyOrx::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(FlappyOrx, XMLPort, xmlelement, mode);
- XMLPortParam(FlappyOrx, "spawnDistance", setspawnDistance, getspawnDistance, xmlelement, mode);
- XMLPortParam(FlappyOrx, "Speed", setSpeed, getSpeed, xmlelement, mode);
- }
-
void FlappyOrx::updatePlayerPos(int x){
//Spawn a new Tube when the spawn distance is reached
@@ -286,10 +280,6 @@
void FlappyOrx::end()
{
- // DON'T CALL THIS!
- // Deathmatch::end();
- // It will misteriously crash the game!
- // Instead startMainMenu, this won't crash.
if (Highscore::exists()){
int score = this->getPoints();
if(score > Highscore::getInstance().getHighestScoreOfGame("Orxonox Arcade"))
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,8 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Leo Mehr Holz
+ * Leo Merholz
* Pascal Schärli
+ * Co-authors:
+ * ...
*
*/
@@ -66,19 +68,7 @@
virtual void start() override;
virtual void end() override;
virtual void death();
- virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
- void setspawnDistance( int spawnDistance)
- {this->spawnDistance = spawnDistance; }
- int getspawnDistance()
- { return this->spawnDistance; }
- inline void setSpeed( float speed ){
- orxout()<< speed<< endl;
- this->speed = speed; }
- inline float getSpeed( )
- { return this->speed; }
-
+
void updatePlayerPos(int x);
void createAsteroid(Circle &c);
void asteroidField(int x, int y, float slope);
@@ -158,8 +148,9 @@
"That was flappin bad!",
"Well, that was a waste of time",
"You suck!",
- "Maybe try SuperOrxoBros? That game is not as hard.",
- "Here's a tip: Try not to fly into these grey thingies."};
+ "Maybe try SuperOrxoBros. That game is not as hard.",
+ "Here's a tip: Try not to fly into these grey thingies.",
+ "We won't comment on that."};
std::vector<std::string> DeathMessage30 = {
"Getting better!",
"Training has paid off, huh?",
@@ -181,8 +172,9 @@
"Fucking great job",
"Wow, we're really impressed",
"We will honor you!",
- "Please do that again!",
- "Take that golden medal! You've earned it"};
+ "Please, please do that again!",
+ "Take that golden medal! You've earned it",
+ "We are completely speechless! That was magnificent"};
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxAsteroid.cc
===================================================================
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxAsteroid.h
===================================================================
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,7 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * Leo Merholz
+ * Pascal Schärli
* Co-authors:
* ...
*
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxCenterPoint.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,7 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * Leo Merholz
+ * Pascal Schärli
* Co-authors:
* ...
*
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,8 +20,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * Leo Merholz
+ * Pascal Schärli
*
+ * Co-authors:
+ * ...
*/
#include "FlappyOrxHUDinfo.h"
@@ -83,7 +86,7 @@
if(this->FlappyOrxGame->firstGame){
if(messageID==3){
setTextSize(0.05);
- this->setCaption("press space to start");
+ this->setCaption("Press fire and then press space to start");
}
}
else{
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxPrereqs.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxPrereqs.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxPrereqs.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,7 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * Leo Merholz
+ * Pascal Schärli
* Co-authors:
* ...
*
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,7 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * FLeo Merholz
+ * Pascal Schärli
* Co-authors:
* ...
*
@@ -51,7 +52,7 @@
isDead = true;
deathTime = 0;
- particleLifespan = 0.1;
+ particleLifespan = 0.08;
particleAge = 0;
particlespawner_ = NULL;
@@ -118,7 +119,6 @@
Camera* camera = this->getCamera();
if (camera != nullptr)
{
- //camera->setPosition(Vector3(-pos.z, -pos.y, 0));
camera->setPosition(pos.x,-100,0);
camera->setOrientation(Vector3::UNIT_Z, Degree(0));
@@ -137,7 +137,7 @@
}
int FlappyOrxShip::timeUntilRespawn(){
- return 2-time(0)+deathTime;
+ return 1-time(0)+deathTime;
}
void FlappyOrxShip::boost(bool boost){
@@ -153,13 +153,7 @@
isFlapping=boost;
}
- // void FlappyOrxShip::rotateRoll(const Vector2& value)
- // {
- // if (getGame())
- // if (getGame()->bEndGame)
- // getGame()->end();
- // }
-
+
FlappyOrx* FlappyOrxShip::getGame()
{
if (game == nullptr)
@@ -176,7 +170,7 @@
deathTime = time(0);
- orxout()<<"death time: "<<deathTime<<std::endl;
+ //orxout()<<"death time: "<<deathTime<<std::endl;
Vector3 pos = getPosition();
pos.x = 0;
pos.z = 0;
Modified: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -20,7 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * Florian Zinggeler
+ * Leo Merholz
+ * Pascal Schärli
* Co-authors:
* ...
*
@@ -55,9 +56,8 @@
virtual void boost(bool bBoost) override;
//return to main menu if game has ended.
- virtual void rotateRoll(const Vector2& value) override;
- inline void setSpeedBase(int speedBase){ getGame()->setSpeedBase(speedBase);}
+ inline void setSpeedBase(float speedBase){ getGame()->setSpeedBase(speedBase);}
inline float getSpeedBase(){ return getGame()->getSpeedBase();}
inline void setSpeedIncrease(int speedIncrease){ getGame()->setSpeedIncrease(speedIncrease);}
inline float getSpeedIncrease(){ return getGame()->getSpeedIncrease();}
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,91 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Florian Zinggeler
- * Co-authors:
- * --
- *
- */
-
-/**
- @file FlappyOrxWeapon.h
- @brief Implementation of the FlappyOrxWeapon class.
-*/
-
-#include "FlappyOrxWeapon.h"
-
-#include "core/CoreIncludes.h"
-// #include "core/XMLPort.h"
-// #include "core/command/Executor.h"
-
-#include "graphics/Model.h"
-#include "weaponsystem/Weapon.h"
-#include "weaponsystem/WeaponPack.h"
-#include "weaponsystem/WeaponSystem.h"
-#include "worldentities/WorldEntity.h"
-#include "worldentities/pawns/Pawn.h"
-
-#include "weapons/projectiles/Projectile.h"
-#include "weapons/MuzzleFlash.h"
-
-namespace orxonox
-{
- RegisterClass(FlappyOrxWeapon);
-
- FlappyOrxWeapon::FlappyOrxWeapon(Context* context) : HsW01(context)
- {
- RegisterObject(FlappyOrxWeapon);
- }
-
- FlappyOrxWeapon::~FlappyOrxWeapon()
- {
-
- }
-
- void FlappyOrxWeapon::shot()
- {
- assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );
-
- // Create the projectile.projectile
- projectile = new Projectile(this->getContext());
- Model* model = new Model(projectile->getContext());
- model->setMeshSource(mesh_);
- model->setCastShadows(false);
- projectile->attach(model);
- model->setScale(5);
-
- this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
- // only shoot in foreward direction
- projectile->setOrientation(Quaternion(sqrt(0.5f),0,sqrt(0.5f),0));
- projectile->setPosition(this->getMuzzlePosition());
- // only shoot in foreward direction
- projectile->setVelocity(Vector3(1, 0, 0) * 2000);
-
- projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
- projectile->setDamage(this->getDamage());
- projectile->setShieldDamage(this->getShieldDamage());
- projectile->setHealthDamage(this->getHealthDamage());
-
- // Display the muzzle flash.
- this->FlappyOrxWeapon::muzzleflash();
- }
-}
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeapon.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,55 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Florian Zinggeler
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file FlappyOrxWeapon.h
- @brief Definition of the FlappyOrxWeapon class.
-*/
-
-#ifndef _FlappyOrxWeapon_H__
-#define _FlappyOrxWeapon_H__
-
-#include "flappyorx/FlappyOrxPrereqs.h"
-
-#include "weapons/WeaponsPrereqs.h"
-#include "weapons/weaponmodes/HsW01.h"
-
-namespace orxonox
-{
- class _FlappyOrxExport FlappyOrxWeapon : public HsW01
- {
- public:
- FlappyOrxWeapon(Context* context);
- virtual ~FlappyOrxWeapon();
- protected:
- virtual void shot() override;
- WeakPtr<Projectile> projectile;
- };
-}
-
-#endif /* _FlappyOrxWeapon_H__ */
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.cc 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.cc 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,58 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Florian Zinggeler
- * Co-authors:
- * --
- *
- */
-
-/**
- @file FlappyOrxWeaponEnemy.h
- @brief Implementation of the FlappyOrxWeaponEnemy class.
-*/
-
-#include "FlappyOrxWeaponEnemy.h"
-
-#include "core/CoreIncludes.h"
-#include "weapons/projectiles/Projectile.h"
-
-namespace orxonox
-{
- RegisterClass(FlappyOrxWeaponEnemy);
-
- FlappyOrxWeaponEnemy::FlappyOrxWeaponEnemy(Context* context) : FlappyOrxWeapon(context)
- {
- RegisterObject(FlappyOrxWeaponEnemy);
- }
-
- void FlappyOrxWeaponEnemy::shot()
- {
- FlappyOrxWeapon::shot();
- // SUPER(FlappyOrxWeaponEnemy, shot);
- // only shoot in foreward direction
- projectile->setVelocity(Vector3(1, 0, 0) * 300);
- // projectile->setOrientation(Quaternion(sqrt(0.5),0,sqrt(0.5),0));
- }
-}
-
-
Deleted: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.h 2017-12-04 13:34:08 UTC (rev 11623)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxWeaponEnemy.h 2017-12-04 13:38:03 UTC (rev 11624)
@@ -1,53 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Florian Zinggeler
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file FlappyOrxWeaponEnemy.h
- @brief Definition of the FlappyOrxWeaponEnemy class.
-*/
-
-#ifndef _FlappyOrxWeaponEnemy_H__
-#define _FlappyOrxWeaponEnemy_H__
-
-#include "flappyorx/FlappyOrxPrereqs.h"
-
-#include "FlappyOrxWeapon.h"
-#include "tools/Timer.h"
-
-namespace orxonox
-{
- class _FlappyOrxExport FlappyOrxWeaponEnemy : public FlappyOrxWeapon
- {
- public:
- FlappyOrxWeaponEnemy(Context* context);
- protected:
- virtual void shot() override;
- };
-}
-
-#endif /* _FlappyOrxWeaponEnemy_H__ */
More information about the Orxonox-commit
mailing list