Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12165


Ignore:
Timestamp:
Dec 7, 2018, 10:18:21 AM (9 months ago)
Author:
zdenis
Message:

Swiggidy swooty im comitting for that booty

Location:
code/branches/TowerDefense_HS18
Files:
2 added
6 edited

Legend:

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

    r12153 r12165  
    662662  </TowerDefenseEnemy>
    663663</Template>
     664
     665<Template name=therangeviewer>
     666  <TowerDefenseRangeViewer>
     667      <attached>
     668        <Model yaw=0 pitch=0 roll=0 scale3D="1000,1000,10" mesh="cylinder.mesh" />
     669      </attached>
     670    </TowerDefenseRangeViewer>
     671</Template>
     672
    664673
    665674<Level plugins = "towerdefense" gametype = "TowerDefense">
  • code/branches/TowerDefense_HS18/src/modules/towerdefense/CMakeLists.txt

    r12125 r12165  
    1111  TDCoordinate.cc
    1212  TowerDefenseController.cc
     13  TowerDefenseRangeViewer.cc
    1314)
    1415
  • code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc

    r12153 r12165  
    7676#include "TowerDefenseCenterpoint.h"
    7777#include "worldentities/SpawnPoint.h"
     78#include "worldentities/StaticEntity.h"
    7879#include "TowerDefenseController.h" //muss ich noch in den richtigen Ordner verschieben
    7980#include "graphics/Model.h"
     
    8283#include "core/CoreIncludes.h"
    8384#include "Highscore.h"
     85#include "util/Output.h"
     86#include "TowerDefenseRangeViewer.h"
     87
    8488
    8589namespace orxonox
     
    9296
    9397        selecter = nullptr;
     98        rangeViewer = nullptr;
    9499        this->player_ = nullptr;
    95100        this->setHUDTemplate("TowerDefenseHUD");
     
    124129                selecter = new TowerDefenseSelecter(this->center_->getContext());               
    125130            }
     131            if(rangeViewer == nullptr){
     132                rangeViewer = new TowerDefenseRangeViewer(this->center_->getContext());
     133            }
    126134            selecter->addTemplate(center_->getSelecterTemplate());
     135            rangeViewer->addTemplate("therangeviewer");
     136            rangeViewer->setPosition(-10000,0,-500);
    127137            center_->attach(selecter);
     138            center_->attach(rangeViewer);
    128139        }
    129140        else // If no centerpoint was specified, an error is thrown and the level is exited.
     
    136147
    137148        createFields();
     149
    138150        TeamDeathmatch::start();
    139151
     
    282294        timeUntilNextWave_ -= dt;
    283295        timeSinceLastSpawn_ += dt;
     296
     297        if(selecter != nullptr && getField(selecter->selectedPos_)->canUpgrade() == true ){
     298            rangeViewer->setPosition(((selecter->selectedPos_->GetX())-8)*100, ((selecter->selectedPos_->GetY())-8)*100, 200);
     299        } else {
     300            rangeViewer->setPosition(-10000,0,-500);
     301        }
    284302
    285303        //build/upgrade tower at selecter position
  • code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.h

    r12125 r12165  
    3838#include "util/Output.h"
    3939#include "TowerDefenseField.h"
     40#include "TowerDefenseRangeViewer.h"
    4041
    4142namespace orxonox
     
    7677        virtual TDCoordinate* getNextStreetCoord(TDCoordinate*);
    7778       
    78         TowerDefenseSelecter* selecter;       
     79        TowerDefenseSelecter* selecter;   
     80        TowerDefenseRangeViewer* rangeViewer;     
    7981
    8082    private:
  • code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseField.cc

    r11071 r12165  
     1
    12/*
    23 *   ORXONOX - the hottest 3D action shooter ever to exist
     
    282283                }
    283284            }
     285           
    284286        }                           
    285287    }
  • code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefensePrereqs.h

    r10258 r12165  
    6868
    6969    class TowerDefenseTower;
    70 
     70    class TowerDefenseRangeViewer;
    7171    class TowerDefenseCenterpoint;
    7272    class TowerDefenseHUDController;
Note: See TracChangeset for help on using the changeset viewer.