Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9139


Ignore:
Timestamp:
Apr 29, 2012, 12:52:05 PM (12 years ago)
Author:
mentzerf
Message:
  • Fixed some formatting, some comments and some logs. Done for today.
Location:
code/branches/newlevel2012
Files:
3 edited

Legend:

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

    r9138 r9139  
    2727
    2828<!-- Specify the position of the camera -->
    29 <Template name=playfieldcameras defaults=0>
     29<Template name=centerpointmarkcamera defaults=0>
    3030  <Pawn>
    3131    <camerapositions>
     
    3535</Template>
    3636
    37 <!-- Loads the playfield mesh -->
    38 <Template name=playfield>
    39   <Pawn camerapositiontemplate=playfieldcameras>
     37<!-- Loads a mesh to mark the center-->
     38<Template name=centerpointmark>
     39  <Pawn camerapositiontemplate=centerpointmarkcamera>
    4040    <attached>
    4141      <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
     
    5858    <Template link=lodtemplate_default />
    5959  </templates>
     60 
    6061  <?lua include("includes/notifications.oxi") ?>
    61 
    6262
    6363  <Scene
     
    6565    skybox       = "Orxonox/Starbox"
    6666  >
    67 
    68     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    69    
     67 
     68        <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    7069   
    7170        <!-- Spawns the camera, attached to a crate -->
    72         <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=playfield />
    73 
     71        <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
    7472       
    7573        <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
    7674        <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    7775       
    78        
    79          <!--SpaceShip position="-10,0,20" lookat="0,0,0">
     76        <!--SpaceShip position="-10,0,20" lookat="0,0,0">
    8077      <templates>
    8178        <Template link=spaceshipassff />
     
    109106                        <Model position="-0.5,-0.5,0" mesh="Playfield_ME.mesh" scale=0.8 />
    110107                       
     108                        <!-- This was used to mark the playfield, let's let it be here for now -->
    111109                        <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    112110                        <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    113111                        <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    114112                        <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    115                        
    116                         <!--Model position="0,0,50" direction="0,0,0"  mesh="rocket.mesh"  scale3D="0.3,0.3,0.3" /-->
    117113                       
    118114        </attached>
  • code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc

    r9138 r9139  
    8383    TowerDefense::~TowerDefense()
    8484    {
     85                /* Part of a temporary hack to allow the player to add towers */
    8586        if (this->isInitialized())
    8687        {
     
    9293        void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
    9394        {
    94                 orxout() << "got a centerpoint..." << endl;
    95                
     95                orxout() << "Centerpoint now set..." << endl;
    9696                this->center_ = centerpoint;
    9797        }
     
    101101        Deathmatch::start();
    102102               
    103         orxout()<< "Adding towers for debug..." <<endl;
    104                
    105                 addTower(0,15);
    106                 addTower(15,0);
    107                
     103        orxout() << "Adding towers for debug..." << endl;
     104               
     105                // Mark corners
     106                addTower(0,15); addTower(15,0);
     107               
     108                // Mark diagonal line
    108109                for (int i = 0 ; i <= 15; i++)
    109                 {
    110110                        addTower(i,i);
    111                 }
    112                
    113                 orxout()<< "Done" <<endl;
     111               
     112                orxout() << "Done" << endl;
    114113               
    115114                ChatManager::message("Use the console command addTower x y to add towers");
    116     }
    117        
    118         /*
    119          void TowerDefense::end()
    120          {
    121          Deathmatch::end();
    122          
    123          std::string message("The match has ended.");
    124          ChatManager::message(message);
    125          }
    126          */
     115        }
     116       
     117        void TowerDefense::end()
     118        {
     119                Deathmatch::end();
     120         
     121                ChatManager::message("Match is over");
     122        }
     123       
    127124       
    128125        void TowerDefense::addTower(int x, int y)
  • code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.h

    r9136 r9139  
    5050                //virtual void playerScored(PlayerInfo* player);
    5151               
     52                /*      Called by TowerDefenseCenterpoint upon game start
     53                        The centerpoint is used to create towers
     54                */
    5255                void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
    5356               
     57                /* Adds a tower at x, y in the playfield */
     58                void addTower(int x, int y);
     59               
    5460                /* Part of a temporary hack to allow the player to add towers */
    55                 void addTower(int x, int y);
    5661                ConsoleCommand* dedicatedAddTower_;
    5762               
Note: See TracChangeset for help on using the changeset viewer.