Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11402


Ignore:
Timestamp:
Apr 25, 2017, 2:51:44 PM (7 years ago)
Author:
jkindle
Message:

Added mushrooms and deadzone

Location:
code/branches/SuperOrxoBros_FS17
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SuperOrxoBros_FS17/data/levels/SOB.oxw

    r11400 r11402  
    128128
    129129
    130 
     130<SOBMushroom collisionType="dynamic" speed=30>
     131                                                <attached>
     132                                                        <Model mesh="Cube1.1.mesh" position="0,0,20" scale=10/>
     133                                                       
     134                                                </attached>
     135                                                <collisionShapes>
     136                                                        <BoxCollisionShape position="0,0,20" halfExtents="5,5,5" /><!-- 1 -->
     137                                                </collisionShapes>
     138                                        </SOBMushroom>
    131139
    132140
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/CMakeLists.txt

    r11400 r11402  
    66  SOBItem.cc
    77  SOBQBlock.cc
     8  SOBMushroom.cc
    89
    910)
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.cc

    r11392 r11402  
    6464        this->center_ = nullptr;
    6565        figure_ = nullptr;
     66        setHUDTemplate("JumpHUD");
    6667
    6768    }
     
    144145    }
    145146
     147void SOB::tick(float dt)
     148    {
     149        SUPER(SOB, tick, dt);
    146150
     151        if (this->figure_ != nullptr && figure_->dead_)
     152            orxout() << "DEED" << endl;
     153       
     154    }
    147155
    148156
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.h

    r11383 r11402  
    5252            SOB(Context* context); //!< Constructor. Registers and initializes the object.
    5353            virtual ~SOB(); //!< Destructor. Cleans up, if initialized.
     54            virtual void tick(float dt) override;
    5455
    5556       
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOBFigure.cc

    r11400 r11402  
    4040#include "graphics/ParticleSpawner.h"
    4141
     42#include "SOBMushroom.h"
    4243
    4344namespace orxonox
     
    7475
    7576        isColliding_ = true;
    76 
     77        SOBMushroom* mush = orxonox_cast<SOBMushroom*>(otherObject);
     78        if (mush != nullptr) {
     79            orxout() << "YEPPIE" << endl;
     80            //DESTROY THE OTHER OBJECT otherObject.destroyLater();
     81        }
    7782
    7883return true;
     
    107112
    108113
     114
    109115        if (firePressed_ == false) {
    110116             gravityAcceleration_ = 350.0;
     
    116122          Vector3 velocity = getVelocity();
    117123          Vector3 position = getPosition();
     124
     125
     126          if (position.z < -100)
     127            dead_ = true;
    118128
    119129          if (dead_) {
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOBPrereqs.h

    r11400 r11402  
    7979    class SOBItem;
    8080    class SOBQBlock;
     81    class SOBMushroom;
    8182    /*
    8283    class PongScore;*/
Note: See TracChangeset for help on using the changeset viewer.