Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 5:00:59 PM (6 years ago)
Author:
vyang
Message:

Asteroids2D erfolgreich als Minigame eingebunden, Dimensionen des Spielfeldes werden im CenterPoint gesetzt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc

    r11593 r11608  
    2525 */
    2626
    27 #include "DodgeRaceHUDinfo.h"
     27#include "Asteroids2DHUDinfo.h"
    2828
    2929#include "core/CoreIncludes.h"
    3030#include "core/XMLPort.h"
    3131#include "util/Convert.h"
    32 //#include "DodgeRace.h"
     32//#include "Asteroids2D.h"
    3333
    3434namespace orxonox
    3535{
    36     RegisterClass(DodgeRaceHUDinfo);
     36    RegisterClass(Asteroids2DHUDinfo);
    3737
    38     DodgeRaceHUDinfo::DodgeRaceHUDinfo(Context* context) : OverlayText(context)
     38    Asteroids2DHUDinfo::Asteroids2DHUDinfo(Context* context) : OverlayText(context)
    3939    {
    40         RegisterObject(DodgeRaceHUDinfo);
     40        RegisterObject(Asteroids2DHUDinfo);
    4141
    42         this->DodgeRaceGame = nullptr;
     42        this->Asteroids2DGame = nullptr;
    4343        this->bShowPoints_ = true;
    4444    }
    4545
    46     void DodgeRaceHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     46    void Asteroids2DHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    4747    {
    48         SUPER(DodgeRaceHUDinfo, XMLPort, xmlelement, mode);
     48        SUPER(Asteroids2DHUDinfo, XMLPort, xmlelement, mode);
    4949
    50         XMLPortParam(DodgeRaceHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
     50        XMLPortParam(Asteroids2DHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
    5151    }
    5252
    53     void DodgeRaceHUDinfo::tick(float dt)
     53    void Asteroids2DHUDinfo::tick(float dt)
    5454    {
    55         SUPER(DodgeRaceHUDinfo, tick, dt);
     55        SUPER(Asteroids2DHUDinfo, tick, dt);
    5656
    5757
    5858        if(this->bShowPoints_)
    5959        {
    60             const std::string& points = multi_cast<std::string>(this->DodgeRaceGame->getPoints());
    61             if (this->DodgeRaceGame->lives <= 0)
     60            const std::string& points = multi_cast<std::string>(this->Asteroids2DGame->getPoints());
     61            if (this->Asteroids2DGame->lives <= 0)
    6262            {
    6363                setTextSize(0.2);
     
    7676    }
    7777
    78     void DodgeRaceHUDinfo::changedOwner()
     78    void Asteroids2DHUDinfo::changedOwner()
    7979    {
    80         SUPER(DodgeRaceHUDinfo, changedOwner);
     80        SUPER(Asteroids2DHUDinfo, changedOwner);
    8181
    8282        if (this->getOwner() && this->getOwner()->getGametype())
    8383        {
    84             this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
     84            this->Asteroids2DGame = orxonox_cast<Asteroids2D*>(this->getOwner()->getGametype());
    8585        }
    8686        else
    8787        {
    88             this->DodgeRaceGame = nullptr;
     88            this->Asteroids2DGame = nullptr;
    8989        }
    9090    }
Note: See TracChangeset for help on using the changeset viewer.