Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10325


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
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseFS15/data/levels/towerDefense.oxw

    r10258 r10325  
    2020  include("templates/spaceshipAssff.oxt")
    2121  include("templates/spaceshipPirate.oxt")
    22   include("templates/tower.oxt")
     22  include("templates/towerdefensetower.oxt")
    2323  include("templates/enemytowerdefense.oxt")
    2424  include("templates/standardTurret.oxt")
     
    4242  </Pawn>
    4343</Template>
    44 
    45 
    46 <!-- Template for a tower   EDIT: new towertemplate is included with "templates/tower" -->
    47 <!--Template name=towertemplate>
    48   <Tower>
    49     <attached>
    50       <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />
    51     </attached>
    52   </Tower>
    53 </Template-->
    54 
    55 
    56 
    5744
    5845
     
    114101    height=16
    115102    tileScale=100
    116     towerTemplate=tower
    117103    position="0,0,0"
    118104    direction="0,0,0"
  • 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.