Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 2, 2009, 8:42:11 PM (15 years ago)
Author:
landauf
Message:
  • Added overlay element for the Pong Gametype
  • Changed the type of the overlay's owner to BaseObject (former ControllableEntity) to allow other classes to own an overlay (for example a Gametype)
  • OverlayGroup does now use a std::set instead of a std::map to store it's overlay elements. Therefore a name is not anymore compulsory for an overlay element.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/gametypes/Pong.cc

    r2885 r2890  
    5353        this->bat_[0] = 0;
    5454        this->bat_[1] = 0;
     55
     56        this->setHUDTemplate("PongHUD");
    5557
    5658        this->starttimer_.setTimer(1.0, false, this, createExecutor(createFunctor(&Pong::startBall)));
     
    181183            this->ball_->setSpeed(this->center_->getBallSpeed());
    182184    }
     185
     186    PlayerInfo* Pong::getLeftPlayer() const
     187    {
     188        if (this->bat_ && this->bat_[0])
     189            return this->bat_[0]->getPlayer();
     190        else
     191            return 0;
     192    }
     193
     194    PlayerInfo* Pong::getRightPlayer() const
     195    {
     196        if (this->bat_ && this->bat_[1])
     197            return this->bat_[1]->getPlayer();
     198        else
     199            return 0;
     200    }
    183201}
Note: See TracChangeset for help on using the changeset viewer.