Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 1:13:58 PM (5 years ago)
Author:
pomselj
Message:

BallProjectiles fly

Location:
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt

    r12367 r12371  
    33  OrxoBlox.cc
    44  OrxoBloxWall.cc
    5   OrxoBloxBall.cc
    65  OrxoBloxCenterpoint.cc
    76  OrxoBloxStones.cc
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12370 r12371  
    4848
    4949#include "OrxoBloxCenterpoint.h"
    50 #include "OrxoBloxBall.h"
    5150#include "OrxoBloxStones.h"
    5251#include "OrxoBloxWall.h"
     
    6867
    6968        this->center_ = nullptr;
    70         this->ball_ = nullptr;
     69        //this->ball_ = nullptr;
    7170        this->futureWall_ = nullptr;
    7271        this->player_ = nullptr;
     
    7776
    7877        // Pre-set the timer, but don't start it yet.
    79         this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&OrxoBlox::startBall, this)));
     78        this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&OrxoBlox::LevelUp, this)));
    8079        this->starttimer_.stopTimer();
    8180
     
    10099    void OrxoBlox::cleanup()
    101100    {
    102         if (this->ball_ != nullptr) // Destroy the ball, if present.
    103         {
    104             this->ball_->destroy();
    105             this->ball_ = nullptr;
    106         }
     101        //if (this->ball_ != nullptr) // Destroy the ball, if present.
     102        //{
     103        //    this->ball_->destroy();
     104        //    this->ball_ = nullptr;
     105        //}
    107106
    108107        if (this->futureWall_ != nullptr)
     
    135134        if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place.
    136135        {
    137             if (this->ball_ == nullptr) // If there is no ball, create a new ball.
    138             {
    139                 this->ball_ = new OrxoBloxBall(this->center_->getContext());
     136            //if (this->ball_ == nullptr) // If there is no ball, create a new ball.
     137            //{
     138            //    this->ball_ = new OrxoBloxBall(this->center_->getContext());
    140139                // Apply the template for the ball specified by the centerpoint.
    141                 this->ball_->addTemplate(this->center_->getBalltemplate());
    142             }
     140            //    this->ball_->addTemplate(this->center_->getBalltemplate());
     141            //}
    143142
    144143            // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to.
    145             this->center_->attach(this->ball_);
     144            //this->center_->attach(this->ball_);
    146145            //Startposition Ball
    147             this->ball_->setPosition(0, 0, 40);
    148             this->ball_->setFieldDimension(this->center_->getFieldDimension());
    149             this->ball_->setSpeed(0);
    150             this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());
     146            //this->ball_->setPosition(0, 0, 40);
     147            //this->ball_->setFieldDimension(this->center_->getFieldDimension());
     148            //this->ball_->setSpeed(0);
     149            //this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());
    151150           
    152151            level_=1;
     
    286285        Starts the ball with some default speed.
    287286    */
    288     void OrxoBlox::startBall()
    289     {
    290         if (this->ball_ != nullptr && this->center_ != nullptr)
    291             this->ball_->setSpeed(this->center_->getBallSpeed());
    292     }
     287    //void OrxoBlox::startBall()
     288    //{
     289    //    if (this->ball_ != nullptr && this->center_ != nullptr)
     290    //        this->ball_->setSpeed(this->center_->getBallSpeed());
     291    //}
    293292     
    294     OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {
    295 
     293    /*OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {
    296294        //orxout() << "Checking for Collision" << endl;
    297295        Vector3 BallPosition = Ball->getPosition();
     
    314312        return nullptr;
    315313    }
     314    */
    316315
    317316    void OrxoBlox::playerPreSpawn(PlayerInfo* player)
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h

    r12370 r12371  
    8989            OrxoBloxCenterpoint* getCenterpoint(void)
    9090                { return this->center_; }
    91             OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
     91            //OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
    9292            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    9393        protected:
     
    9595            void startWall(void);
    9696            void createWall(void);
    97             void startBall(); //!< Starts the ball with some default speed.
     97            //void startBall(); //!< Starts the ball with some default speed.
    9898            void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats.
    9999
    100100            WeakPtr<OrxoBloxCenterpoint> center_; //!< The playing field.
    101             WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball.
     101            //WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball.
    102102            unsigned int level_;
    103103
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h

    r12370 r12371  
    6969{
    7070    class OrxoBlox;
    71     class OrxoBloxBall;
     71    //class OrxoBloxBall;
    7272    class OrxoBloxCenterpoint;
    7373    class OrxoBloxWall;
Note: See TracChangeset for help on using the changeset viewer.