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/Gametype.cc

    r2839 r2890  
    229229        if (it != this->players_.end())
    230230            it->second.frags_++;
     231    }
     232
     233    int Gametype::getScore(PlayerInfo* player) const
     234    {
     235        std::map<PlayerInfo*, Player>::const_iterator it = this->players_.find(player);
     236        if (it != this->players_.end())
     237            return it->second.frags_;
     238        else
     239            return 0;
    231240    }
    232241
Note: See TracChangeset for help on using the changeset viewer.