Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 30, 2010, 4:42:58 PM (14 years ago)
Author:
jo
Message:

adding 3rd party: killers, making the gametype playable for larger groups of players, bug removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/dynamicmatch/src/orxonox/gametypes/Dynamicmatch.h

    r6697 r6812  
    4444            virtual ~Dynamicmatch() {}
    4545               
    46                 bool onlyChasers;
    47                 int getParty(PlayerInfo* player);
    48                 void setPlayerColour(PlayerInfo* player);//own function
    49                 void setConfigValues();//done
    50                 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //ok - score function and management of parties
    51                 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //ok - simple
     46            bool notEnoughPigs;
     47            bool notEnoughKillers;
     48            bool notEnoughChasers;
     49            virtual void evaluatePlayerParties();
     50            int getParty(PlayerInfo* player);
     51            void setPlayerColour(PlayerInfo* player);//own function
     52            void setConfigValues();//done
     53            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //ok - score function and management of parties
     54            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //ok - simple
    5255            virtual void start();
    53 
     56            virtual void end(); //Wie geht das mit der Punkteausgabe aendern? Z.B: Persoenliche Nachricht?
     57            virtual void playerEntered(PlayerInfo* player);
     58            virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn);//is used to initialize the player's party and colour
     59            virtual bool playerLeft(PlayerInfo* player);
     60            virtual bool playerChangedName(PlayerInfo* player);//unchanged
     61            virtual void instructions();
     62            virtual void furtherInstructions();
     63            virtual void rewardPig();
     64            void resetSpeedFactor(WeakPtr<Engine>* ptr); 
     65            void tick (float dt);// used to end the game
     66            //three different parties   TODO const machen!     
     67            int chaser;
     68            int piggy;
     69            int killer;
     70               
     71            bool friendlyfire; //goal: player can switch it on/off
     72            bool tutorial; //goal: new players recieve messages how the new gametype works - later it can be switched off.
     73        protected:
    5474                 
    55             virtual void end(); //Wie geht das mit der Punkteausgabe? frags als Schnittstelle ausreichend?
    56             virtual void playerEntered(PlayerInfo* player);
    57                 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn);//is used to initialize the player's party and colour
    58             virtual bool playerLeft(PlayerInfo* player);//ToDo: extract the player's party record - done?
    59             virtual bool playerChangedName(PlayerInfo* player);//unchanged
    60 
    61                 void resetSpeedFactor(WeakPtr<Engine>* ptr);
    62        
    63            
    64                 void tick (float dt);// used to end the game
    65                
    66                 //inline const ColourValue& getPlayerColour(int teamnr) const
    67                 //{ return this->partyColours_[teamnr]; }
    68                
    69                 protected:
    70                   //the two different parties
    71                   int chaser;
    72                   int piggy;
    73                   std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
    74                   std::vector<ColourValue> partyColours_; //aus TeamDeathmatch           
    75                 bool friendlyfire; //goal: player can switch it on/off
    76                 float gameTime_;   // from UnderAttack
    77                 bool gameEnded_; // true if game is over
    78                 int timesequence_; //used for countdown
     75                 
     76            std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
     77            std::vector<ColourValue> partyColours_; //aus TeamDeathmatch
     78            unsigned int numberOf[3]; //array to count number of chasers, pigs, killers
     79            float pointsPerTime;
     80            float gameTime_;   // from UnderAttack better: use gametype interface!!!
     81            bool gameEnded_; // true if game is over
     82            int timesequence_; //used for countdown
     83            Timer callInstructions_;
    7984    };
    8085}
Note: See TracChangeset for help on using the changeset viewer.