Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 4, 2019, 2:40:29 PM (5 years ago)
Author:
ahuwyler
Message:

OrxoBlox in the HUD

File:
1 edited

Legend:

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

    r12264 r12268  
    4646#include "OrxoBloxBat.h"
    4747#include "OrxoBloxBot.h"
    48 #include "OrxoBloxAI.h"
     48#include "OrxoBloxStones.h"
    4949
    5050namespace orxonox
     
    7575
    7676        // Set the type of Bots for this particular Gametype.
    77         this->botclass_ = Class(OrxoBloxBot);
     77        this->botclass_ = Class(OrxoBloxBat);
    7878
    7979        this->scoreLimit_ = 10;
     
    193193    void OrxoBlox::end()
    194194    {
     195        ChatManager::message("You suck!!");
    195196        this->cleanup();
    196197
     
    233234        else
    234235            return;
    235 
    236         // If the player is an AI, it receives a pointer to the ball.
    237         if (player->getController() != nullptr && player->getController()->isA(Class(OrxoBloxAI)))
    238         {
    239             OrxoBloxAI* ai = orxonox_cast<OrxoBloxAI*>(player->getController());
    240             ai->setOrxoBloxBall(this->ball_);
    241         }
    242236    }
    243237
     
    278272        }
    279273
    280         // If a player gets enough points, he won the game -> end of game
    281         PlayerInfo* winningPlayer = nullptr;
    282         if (this->getLeftPlayer() && this->getScore(this->getLeftPlayer()) >= scoreLimit_)
    283             winningPlayer = this->getLeftPlayer();
    284 
    285         if (winningPlayer)
    286         {
    287              ChatManager::message(winningPlayer->getName() + " has won!");
    288              this->end();
    289         }
    290274
    291275        // Restart the timer to start the ball.
     
    317301    }
    318302
    319     /**
    320     @brief
    321         Get the right player.
    322     @return
    323         Returns a pointer to the player playing on the right. If there is no right player, nullptr is returned.
    324     */
    325303   
    326304}
Note: See TracChangeset for help on using the changeset viewer.