[Orxonox-commit 7400] r12017 - in code/branches/PresentationFS18: . data/levels src/modules/superorxobros
patricwi at orxonox.net
patricwi at orxonox.net
Wed May 30 14:41:42 CEST 2018
Author: patricwi
Date: 2018-05-30 14:41:42 +0200 (Wed, 30 May 2018)
New Revision: 12017
Added:
code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.cc
code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.h
Modified:
code/branches/PresentationFS18/
code/branches/PresentationFS18/data/levels/SOB.oxw
code/branches/PresentationFS18/src/modules/superorxobros/CMakeLists.txt
code/branches/PresentationFS18/src/modules/superorxobros/SOB.cc
code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.cc
code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.h
code/branches/PresentationFS18/src/modules/superorxobros/SOBGumba.cc
code/branches/PresentationFS18/src/modules/superorxobros/SOBItem.h
code/branches/PresentationFS18/src/modules/superorxobros/SOBPrereqs.h
Log:
Merged SuperOrxoBros
Index: code/branches/PresentationFS18
===================================================================
--- code/branches/PresentationFS18 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18 2018-05-30 12:41:42 UTC (rev 12017)
Property changes on: code/branches/PresentationFS18
___________________________________________________________________
Modified: svn:mergeinfo
## -24,6 +24,7 ##
/code/branches/SpaceRace_HS16:11214-11357
/code/branches/StoryModeMap_HS16:11221-11358
/code/branches/SuperOrxoBros_FS17:11365-11448
+/code/branches/SuperOrxoBros_FS18:11820-12016
/code/branches/Waypoints_HS17:11496-11773
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
Modified: code/branches/PresentationFS18/data/levels/SOB.oxw
===================================================================
--- code/branches/PresentationFS18/data/levels/SOB.oxw 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/data/levels/SOB.oxw 2018-05-30 12:41:42 UTC (rev 12017)
@@ -38,7 +38,7 @@
<Template name=sobfigurecameras defaults=0>
<SOBFigure>
<camerapositions>
- <CameraPosition position="0,-150,30" absolute=true mouselook=false drag=false direction="0,1,0"/>
+ <CameraPosition position="0,-250,30" absolute=true mouselook=false drag=false direction="0,1,0"/>
</camerapositions>
</SOBFigure>
</Template>
@@ -121,9 +121,20 @@
+ <!-- SOBGumbas undergroundlevel-->
+ <SOBGumba collisionType="dynamic" speed=20 position = "350,0,-70">
+ <attached>
+ <Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/>
+
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="5,5,3" />
+ </collisionShapes>
+ </SOBGumba>
+ <!-- SOBGumbas groundlevel-->
<SOBGumba collisionType="dynamic" speed=40 position = "240,0,0">
<attached>
<Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/>
@@ -258,13 +269,33 @@
<StaticEntity collisionType="static" mass='-1'>
<collisionShapes>
- <BoxCollisionShape position="340,0,-20" halfExtents="345,5,5" />
+ <BoxCollisionShape position="140,0,-20" halfExtents="135,5,5" />
+ <BoxCollisionShape position="330,0,-20" halfExtents="30,5,5" />
+ <BoxCollisionShape position="400,0,-20" halfExtents="60,5,5" />
+ <BoxCollisionShape position="530,0,-20" halfExtents="50,5,5" />
+ <BoxCollisionShape position="640,0,-20" halfExtents="40,5,5" />
</collisionShapes>
</StaticEntity>
+ <!-- Boden 1 Unterirdisch-->
+ <Model mesh="Cube2.12.mesh" position="270,0,-90" scale=10 Pitch=90/> <!-- B1.1 -->
+ <Model mesh="Cube2.12.mesh" position="390,0,-90" scale=10 Pitch=90/> <!-- B1.2-->
+
+ <!-- CollisionShape fuer Unterirdisch-->
+ <StaticEntity collisionType="static" mass='-1'>
+ <collisionShapes>
+ <BoxCollisionShape position="390,0,-80" halfExtents="125,5,5" />
+
+ </collisionShapes>
+ </StaticEntity>
+ <StaticEntity collisionType="static" mass='1000000000'>
+ <collisionShapes>
+
+ <BoxCollisionShape position="265,0,-80" halfExtents="5,5,5" />
+ <BoxCollisionShape position="510,0,-80" halfExtents="5,5,5" />
+ </collisionShapes>
+ </StaticEntity>
-
-
<!-- Luft 1 -->
@@ -315,12 +346,25 @@
</collisionShapes>
</SOBQBlock>
- <Model mesh="Cube1.1.mesh" position="250,0,20" scale=10/> <!-- L1.7 -->
+
+ <SOBTube collisionType="dynamic" cool=1 position="295,5,-23" mass='10000'>
+ <attached>
+
+ <Model mesh="Rohr.mesh" position="0,0,-12" scale=10 roll=90 yaw=90 pitch=-90/>
+ </attached>
+ </SOBTube>
+
+ <SOBTube collisionType="dynamic" cool=1 position="475,5,-3" mass='10000'>
+ <attached>
+ <!-- L1.6 -->
+ <Model mesh="Rohr.mesh" position="0,0,-12" scale=10 roll=90 yaw=90 pitch=-90/>
+ </attached>
+ </SOBTube>
+
+ <Model mesh="Cube1.1.mesh" position="250,0,20" scale=10/> <!-- L1.7 -->
<!-- Rohre-->
- <Model mesh="Rohr.mesh" position="295,5,-35" scale=10 roll=90 yaw=90 pitch=-90/> <!-- L1.8 -->
- <Model mesh="Rohr.mesh" position="395,5,-25" scale=10 roll=90 yaw=90 pitch=-90/> <!-- L1.9 -->
- <Model mesh="Rohr.mesh" position="475,5,-15" scale=10 roll=90 yaw=90 pitch=-90 /> <!-- L1.10 -->
- <Model mesh="Rohr.mesh" position="585,5,-15" scale=10 roll=90 yaw=90 pitch=-90 /> <!-- L1.11 -->
+ <!-- L1.8 -->
+ <!-- L1.11 -->
<SOBQBlock collisionType="static" type="Mushroom" position="650,0,30" mass='-1'>
<attached>
@@ -342,24 +386,29 @@
<BoxCollisionShape position="210,0,20" halfExtents="5,5,5" /> <!-- 1.3 -->
<BoxCollisionShape position="230,0,20" halfExtents="5,5,5" /> <!-- 1.5 -->
- <BoxCollisionShape position="250,0,20" halfExtents="5,5,5" /> <!-- 1.7 -->
+
+ <BoxCollisionShape position="250,0,20" halfExtents="5,5,5" /> <!-- 1.7 -->
</collisionShapes>
</StaticEntity>
+ <Model mesh="Rohr.mesh" position="395,0,-25" scale=10 roll=90 yaw=90 pitch=-90/>
+ <Model mesh="Rohr.mesh" position="585,0,-15" scale=10 roll=90 yaw=90 pitch=-90/>
+ <StaticEntity collisionType="static" >
+
+
- <StaticEntity collisionType="static" >
<collisionShapes>
- <BoxCollisionShape position="295,0,-4" halfExtents="12,5,12" /> <!-- 1.8 -->
- <BoxCollisionShape position="395,0,1" halfExtents="12,5,17" /> <!-- 1.9 -->
- <BoxCollisionShape position="475,0,6" halfExtents="12,5,22" /> <!-- 1.10 -->
- <BoxCollisionShape position="585,0,6" halfExtents="12,5,22" /> <!-- 1.11 -->
+
+ <BoxCollisionShape position="395,0,1" halfExtents="12,5,17" />
+
+ <BoxCollisionShape position="585,0,6" halfExtents="12,5,22" />
</collisionShapes>
- </StaticEntity>
+ </StaticEntity>
Modified: code/branches/PresentationFS18/src/modules/superorxobros/CMakeLists.txt
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/CMakeLists.txt 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/CMakeLists.txt 2018-05-30 12:41:42 UTC (rev 12017)
@@ -2,6 +2,7 @@
SOBCenterpoint.cc
SOB.cc
+ SOBTube.cc
SOBFigure.cc
SOBItem.cc
SOBQBlock.cc
@@ -13,6 +14,7 @@
SOBCastlestone.cc
SOBCoin.cc
SOBGumbaBoss.cc
+
)
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOB.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOB.cc 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOB.cc 2018-05-30 12:41:42 UTC (rev 12017)
@@ -148,7 +148,7 @@
//If player has reached end of level
if (this->figure_ != nullptr && figure_->lvlEnded_) {
- std::stringstream a;
+ std::stringstream a;setLvl(2);
if(!newHighscore){
a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
}
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.cc 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.cc 2018-05-30 12:41:42 UTC (rev 12017)
@@ -42,6 +42,7 @@
#include "graphics/ParticleSpawner.h"
#include <OgreMath.h>
+#include "SOBTube.h"
#include "SOBMushroom.h"
#include "SOBGumba.h"
#include "SOBGumbaBoss.h"
@@ -49,7 +50,6 @@
#include "SOB.h"
#include "SOBFlagstone.h"
#include "SOBCastlestone.h"
-#include "SOBFireball.h"
#include "Highscore.h"
#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
@@ -71,7 +71,13 @@
moveRightPressed_ = false;
firePressed_ = false;
collDisZ_ = 0;
+ tube = NULL;
+ //Variables for Action in Tube
+ tcol_ = false;
+ tubing = false;
+ kkk = 0;
+
//Times and turning
timeSinceLastFire_ = 0.0;
lastSpeed_z = 0.0;
@@ -88,7 +94,9 @@
lvlEnded_ = false;
reachedLvlEndState_ = 0;
+ positiontube_=10000;
// Properties concerning PowerUps and items
+
PowerUpCounter_ = 0;
maxPowerUp_ = 2;
FireballPower = 2;
@@ -111,7 +119,10 @@
//Orxocast returns object with casted type if otherObject has that class, and if not a nullptr
+ //SOBTube* test;
+
SOBMushroom* mush = orxonox_cast<SOBMushroom*> (otherObject);
+ tube = orxonox_cast<SOBTube*> (otherObject);
SOBGumba* gumba = orxonox_cast<SOBGumba*> (otherObject);
SOBGumbaBoss* gumbaBoss = orxonox_cast<SOBGumbaBoss*> (otherObject);
SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*> (otherObject);
@@ -120,6 +131,7 @@
SOB* SOBGame = orxonox_cast<SOB*> (getGametype());
+
//Check if otherObject is a powerup-mushroom
if (mush != nullptr && !(mush->hasCollided_)) {
otherObject->destroyLater();
@@ -132,14 +144,14 @@
mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
- }
+ }else if(tube != nullptr && !(tube->hasCollided_)){ //Check if other Object is a tube and set position wher tube is in positiontube_
+ tube->hasCollided_=true;positiontube_=getPosition().x;tcol_=true; //tcol_ used for movedown function in SOBfigure.cc
+
-
- //Check if otherObject is a Gumba (that walking enemies)
+ }else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {
+ //Check if otherObject is a Gumba (that walking enemies)
- else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {
-
//If player jumps on its head, kill the Gumba, else, kill the player
if (getVelocity().z >= -20) {
// If player hasn't a power up, he dies. Else he shrinks and the gumba dies.
@@ -208,7 +220,9 @@
if (x < 0.0) return -1;
return 1;
}
-
+/*bool SOBFigure::tubeAction(){
+return true;
+}*/
//Function to spawn the Fireball
void SOBFigure::spawnFireball() {
SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
@@ -239,10 +253,10 @@
void SOBFigure::tick(float dt)
{
SUPER(SOBFigure, tick, dt);
+
-
bool inputAllowed = true;
- //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+
//the particle spawner that generates the fire from the backpack when pressed
if (particlespawner_ == NULL) {
@@ -290,7 +304,7 @@
if (!predead_)
velocity.y = 0;
//If player falls in a hole
- if (position.z < -100) {
+ if (position.z < -180) {
dead_ = true;
SOBGame->setDone(true);
}
@@ -354,13 +368,43 @@
}
//If moveUp pressed, fire a fireball
- if(moveUpPressed_ && (PowerUpCounter_ >= FireballPower) && fireallowed_)
+ if(moveUpPressed_ && inputAllowed) //if pressed up jump through tube if you are underground
{
+ Vector3 position1 = getPosition();
+
+
+
+
+ if(position1.z>=-100 && position1.z<=-40){
+ position1.z=40;
+ if(460<=position1.x && position1.x<480){setPosition(position1);} //little hack works without this but first tube must be touched //position where second tube is
+ if(positiontube_-10<=position1.x && position1.x<positiontube_+10){ //function for jumping through any SOBtube`s
+ setPosition(position1);}}
+
+
+ if((PowerUpCounter_ >= FireballPower) && fireallowed_){
spawnFireball();
+
fireallowed_ = false;
- firecooldown_ = 0;
+ firecooldown_ = 0;}
}
+
+ if(moveDownPressed_ && inputAllowed ){ //if movedownpressed change collisiontype of tube and slip through tube
+
+
+ Vector3 position1 = getPosition();
+
+
+
+ if(tube != nullptr && !(tube->movedown)){ //Check if other Object is a tube
+
+ if(positiontube_-10<position1.x && position1.x<positiontube_+10){
+ tube->movedown=true;}
+ }
+
+ }
+
//Increase the firecooldown
if(firecooldown_> 0.5)
{
@@ -418,6 +462,7 @@
moveDownPressed_ = false;
moveLeftPressed_ = false;
moveRightPressed_ = false;
+
isColliding_ = false;
collDisZ_ = 0;
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.h
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.h 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBFigure.h 2018-05-30 12:41:42 UTC (rev 12017)
@@ -31,6 +31,7 @@
#include "superorxobros/SOBPrereqs.h"
#include "worldentities/ControllableEntity.h"
+#include "SOBTube.h"
namespace orxonox
@@ -57,8 +58,12 @@
//Soooo many declarations
bool fireallowed_;
-
- bool moveUpPressed_;
+ SOBTube* tube; //class SOBTube* used because tube needs to be global using in collides against function and tick function in SOBfigure.cc
+ bool moveUpPressed_;
+ int kkk;
+
+ bool tcol_; //used for getting through tube
+ bool tubing; //used for getting through tube
bool moveDownPressed_;
bool moveLeftPressed_;
bool moveRightPressed_;
@@ -67,6 +72,7 @@
float timeSinceLastFire_;
float lastSpeed_z;
float firecooldown_;
+ float positiontube_;
bool isColliding_;
WorldEntity* particlespawner_;
int PowerUpCounter_;
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOBGumba.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBGumba.cc 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBGumba.cc 2018-05-30 12:41:42 UTC (rev 12017)
@@ -105,7 +105,7 @@
void SOBGumba::tick(float dt)
{
SUPER(SOBGumba, tick, dt);
-
+
if (!changeAllowed_) {
changedOn_+= dt;
// After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOBItem.h
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBItem.h 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBItem.h 2018-05-30 12:41:42 UTC (rev 12017)
@@ -48,7 +48,6 @@
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
virtual void setFigure(SOBFigure* newFigure);
virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
-
bool attachedToFigure_;
Modified: code/branches/PresentationFS18/src/modules/superorxobros/SOBPrereqs.h
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBPrereqs.h 2018-05-30 12:37:02 UTC (rev 12016)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBPrereqs.h 2018-05-30 12:41:42 UTC (rev 12017)
@@ -79,6 +79,7 @@
class SOBFlagstone;
class SOBCastlestone;
class SOBCoin;
+ class SOBTube;
}
Copied: code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.cc (from rev 12016, code/branches/SuperOrxoBros_FS18/src/modules/superorxobros/SOBTube.cc)
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.cc (rev 0)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.cc 2018-05-30 12:41:42 UTC (rev 12017)
@@ -0,0 +1,121 @@
+/*
+ * 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:
+ * Julien
+ * Co-authors:
+ *
+ *
+ */
+
+/**
+ @file SOBTube.cc
+ @brief Declaration of the SOBTube class.
+ This class is used for the tubes in the game. It adds the function that the figure can slip through Tube.
+*/
+
+#include "SOBTube.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+
+
+namespace orxonox
+{
+ RegisterClass(SOBTube);
+
+ SOBTube::SOBTube(Context* context) : MovableEntity(context)
+ {
+ RegisterObject(SOBTube);
+ setAngularFactor(0.0);
+ this->enableCollisionCallback();
+ k=0;u=0; //initializing variables for tick function
+ a=CollisionType::None; //initializing Collisiontypes for tick function
+ b=CollisionType::Dynamic; //initializing Collisiontypes for tick function
+ movedown=false; //initializing variable movedown (movedown is used for allowing figure to get through tube)
+ hasCollided_=false; //initializing variable
+
+ left = new BoxCollisionShape(context); //BoxCollisionshape initialized for tube (here in Programm not in SOB.oxw as others)
+ left->setHalfExtents(Vector3(10, 10, 30));// set CollisionShape
+ attachCollisionShape(left); //attach CollisionShape
+
+
+
+ }
+
+
+
+
+ void SOBTube::XMLPort(Element& xmlelement, XMLPort::Mode mode) //set parameters for SOB.oxw file
+ {
+ SUPER(SOBTube, XMLPort, xmlelement, mode);
+ XMLPortParam(SOBTube,"cool",getcool,setcool,xmlelement,mode);
+
+
+
+ }
+
+
+ bool SOBTube::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+
+
+
+ return true;
+ }
+
+ void SOBTube::tick(float dt)
+ {
+ SUPER(SOBTube, tick, dt);
+ Vector3 velocity = getVelocity(); //velocity of tube
+ Vector3 position = getPosition(); //position of tube
+ position.y=0; //position in y axes must be 0
+
+ setPosition(position); //set new position of tube
+ velocity.z = 0*dt; //velocity in all directions must be 0 or else tube is moving
+ velocity.y = 0*dt;
+ velocity.x = 0*dt;
+ setVelocity(velocity); //set new velocity
+
+
+
+
+
+ if(movedown && k==0){ //if movedown is allowed change Collisiontype from dynamic to None
+ CollisionType a = CollisionType::None;
+ this->setCollisionType(a);
+
+
+ k++;
+ }
+ if(k!=0){u++;}
+
+ if(u>=50){
+ this->setCollisionType(b);k=0;u=0;movedown=false; //set Collisiontype from None to dynamic
+ }
+ }
+
+
+
+}
Copied: code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.h (from rev 12016, code/branches/SuperOrxoBros_FS18/src/modules/superorxobros/SOBTube.h)
===================================================================
--- code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.h (rev 0)
+++ code/branches/PresentationFS18/src/modules/superorxobros/SOBTube.h 2018-05-30 12:41:42 UTC (rev 12017)
@@ -0,0 +1,77 @@
+/*
+ * 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:
+ * Julien Kindle
+ * Co-authors:
+ *
+ *
+ */
+
+/**
+ @file SOBTube.h
+ @brief Declaration of the SOBTube class.
+ This class is used for the tubes in the game. It adds the function that the figure can slip through Tubes.
+*/
+
+#ifndef _SOBTube_H__
+#define _SOBTube_H__
+
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h" //includes MovableEntity from WorldEntity important because Superclass is MovableEntity
+#include "objects/collisionshapes/BoxCollisionShape.h"
+
+namespace orxonox
+{
+ class _SOBExport SOBTube : public MovableEntity
+ {
+ public:
+ SOBTube(Context* context);
+
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+ virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+ virtual void tick(float dt) override; //tick function override for removing collisionshape and adding them
+
+ void setcool(const bool cool) //here you could add additional information about tube
+ { this->cool_ = cool; }
+ bool getcool() const
+ { return cool_; }
+
+
+ BoxCollisionShape* left; //Collision shape for removing collisionshape of the tube
+
+ CollisionType a; //different Type of collision (none, dynamic for tubes)
+ CollisionType b;
+ float u; //helping variables
+ int k;
+ int Height;
+ int Right;
+ int Left;
+ bool movedown; //says if it is allowed to move through tube
+ bool hasCollided_; //says if figure has Collided with tube ones
+ protected:
+ bool cool_;
+ };
+}
+
+#endif /* _SOBTube_H__ */
More information about the Orxonox-commit
mailing list