Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2015, 3:59:26 PM (10 years ago)
Author:
erbj
Message:

tower templates verwaltet und tower direkt turret, nicht eigenes objekt

Location:
code/branches/towerdefenseFS15/src/modules/towerdefense
Files:
4 edited

Legend:

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

    r10319 r10325  
    154154        //set initial credits, lifes and WaveNumber
    155155        this->setCredit(1000);
    156         this->setLifes(50);
     156        this->setLifes(25);
    157157        this->setWaveNumber(0);
    158158        time=0.0;
     
    278278        //Creates tower
    279279        TowerDefenseTower* towernew = new TowerDefenseTower(this->center_->getContext());
    280         towernew->addTemplate("towerturret");
    281280        towernew->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
    282281        towernew->setGame(this);
  • code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r9667 r10325  
    5353        this->width_ = 15;
    5454        this->height_ = 15;
    55         this->towerTemplate_ = "";
    5655
    5756        //this->setCollisionType(Static);
     
    7271        XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
    7372        XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
    74         XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
    7573
    7674        //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint,  xmlelement, mode);
  • code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseCenterpoint.h

    r9667 r10325  
    7979                { return this->tileScale_; }
    8080
    81             /**
    82             @brief Set the template for the towers.
    83             @param template The template name to be applied to each tower.
    84             */
    85             void setTowerTemplate(const std::string& templateName)
    86                 { this->towerTemplate_ = templateName; }
    87 
    88             const std::string& getTowerTemplate(void) const
    89                 { return this->towerTemplate_; }
    90 
    9181        private:
    9282            void checkGametype();
     
    9585            unsigned int height_;
    9686            unsigned int tileScale_;
    97 
    98             std::string towerTemplate_;
    9987    };
    10088}
  • code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc

    r10319 r10325  
    2626        RegisterObject(TowerDefenseTower);
    2727        game_ =NULL;
    28         this->setCollisionType(WorldEntity::Dynamic);
     28        this->setCollisionType(WorldEntity::None);
    2929        upgrade = 0;
    30 
     30        this->addTemplate("towerdefensetower");
    3131
    3232
     
    7070            setReloadRate(reloadrate);
    7171            setReloadWaitTime(reloadwaittime);
    72             this->addTemplate("towerturret1");
     72            //this->addTemplate("towerturret1");
    7373        }
    7474        else
Note: See TracChangeset for help on using the changeset viewer.