Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2015, 4:24:41 PM (9 years ago)
Author:
erbj
Message:

added timer in tick function to pause for 10 seconds between waves , trying to solve the problem, that towers are shooting at (0,0,0) (center point). The Problem seems to be in the sameteam function as the turret and the pawn at the position (0,0,0) should have the same team

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h

    r10351 r10368  
    3939#include "TDCoordinate.h"
    4040#include "towerdefense/TowerDefensePrereqs.h"
    41 #include "gametypes/Deathmatch.h"
     41#include "gametypes/TeamDeathmatch.h"
    4242#include "TowerDefenseEnemy.h"
    4343#include "util/Output.h"
     
    4646namespace orxonox
    4747{
    48     class _TowerDefenseExport TowerDefense : public Deathmatch
     48    class _TowerDefenseExport TowerDefense : public TeamDeathmatch
    4949    {
    5050    public:
     
    7070        void buyTower(int cost){ credit_ -= cost;}
    7171        void addCredit(int credit) { credit_+=credit; }
    72         void nextwave(){ waves_++;}
     72        void nextwave(){ TowerDefenseEnemyvector.clear(); waves_++; time=0;}
    7373        int reduceLifes(int NumberofLifes){ return lifes_-=NumberofLifes; }
     74        TDCoordinate* selectedPos;
    7475
    7576        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
     
    9596        TowerDefenseCenterpoint *center_;
    9697        float time;
    97         float time2;
     98//        float time2;
    9899        int credit_;
    99100        int waves_;
    100101        int lifes_;
     102        Timer nextwaveTimer_;
    101103
    102104        /* handles stats */
Note: See TracChangeset for help on using the changeset viewer.