Changeset 12101
- Timestamp:
- Nov 14, 2018, 10:01:05 AM (6 years ago)
- Location:
- code/branches/WorldMap_HS18
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout
r12053 r12101 7 7 <Property name="Area" value="{{0,0},{0,0},{1.0,0},{1.0,0}}" /> 8 8 <Property name="BackgroundEnabled" value="False" /> 9 9 10 <Window name="ForwardText" type="MenuWidgets/Button"> 11 <Property name="Text" value="Forward" /> 12 <Property name="Visible" value="True" /> 13 <Property name="Area" value="{{0.1,0},{0.6,0},{0.3,0},{0.65,0}}" /> 14 <Event function="CampaignMenu.forwardButton_clicked" name="Clicked" /> 15 </Window> 16 17 <Window name="ForwardButton" type="MenuWidgets/JuuButton"> 18 <Property name="Visible" value="True" /> 19 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 20 <Property name="Area" value="{{0.1,0},{0.75,0},{0.25,0},{0.95,0}}" /> 21 <Event function="CampaignMenu.forwardButton_clicked" name="Clicked" /> 22 </Window> 10 23 11 24 <Window name="Mission1Text" type="MenuWidgets/Button"> … … 15 28 <Event function="CampaignMenu.Mission1Button_clicked" name="Clicked" /> 16 29 </Window> 30 17 31 <Window name="Mission1Button" type="MenuWidgets/JuuButton"> 18 32 <Property name="Visible" value="False" /> … … 29 43 <Event function="CampaignMenu.Mission2Button_clicked" name="Clicked" /> 30 44 </Window> 45 31 46 <Window name="Mission2Button" type="MenuWidgets/JuuButton"> 32 47 <Property name="Visible" value="True" /> … … 149 164 <Event function="CampaignMenu.CampaignMenuBackButton_clicked" name="Clicked" /> 150 165 </Window> 166 167 151 168 <Window name="CampaignMenuCongratulation" type="MenuWidgets/StaticText"> 152 169 <Property name="Text" value="Campaign Completed!!!" /> -
code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua
r12053 r12101 75 75 end 76 76 77 function P.forwardButton_clicked(e) 78 P.loadMap() 79 end 80 77 81 function P.Mission1Button_clicked(e) 82 P.loadLevel(P.FindLevel(0)) 83 end 84 function P.KeyPressed(e) 78 85 P.loadLevel(P.FindLevel(0)) 79 86 end … … 116 123 end 117 124 125 function P.loadMap() 126 orxonox.execute("change Game NC_StoryModeLevel") 127 end 128 118 129 function P.FindLevel(index) 119 130 local filename = orxonox.LevelManager:getInstance():getCampaignMission(index) -
code/branches/WorldMap_HS18/data/levels/NC_StoryModeLevel.oxw
r12058 r12101 1 a<LevelInfo1 <LevelInfo 2 2 name = "NC StoryMode" 3 3 description = "A level in which the Campaign Menu is defined, which opens other levels." -
code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw
r12059 r12101 37 37 38 38 <Model position="550,300,0" mesh="assff.mesh" scale=20 visible="true" orientation="-0.015,0.091,0.038,-0.995"/> 39 39 <Model position="600,370,0" mesh="Coordinates.mesh" scale=10 /> 40 40 <Billboard colour="1,1,0.05" position="600,370,-80" material="Flares/lensflare" scale=4.5 /> 41 41 -
code/branches/WorldMap_HS18/data/levels/StoryModeMapDev.oxw
r12060 r12101 38 38 39 39 40 41 40 <Model position="550,300,0" mesh="assff.mesh" scale=20 visible="true" orientation="-0.015,0.091,0.038,-0.995"/> 41 <Model position="600,370,0" mesh="Coordinates.mesh" scale=10 /> 42 42 <Billboard colour="1,1,0.05" position="600,370,-80" material="Flares/lensflare" scale=4.5 /> 43 43 … … 77 77 </templates> 78 78 <controller> 79 <StoryModeController accuracy=10 team=3> 80 <waypoints> 81 <Model mesh="cube.mesh" scale=8 position="100,350,-250" /> 82 <Model mesh="cube.mesh" scale=8 position="-900,-400,-1000" /> 83 <Model mesh="cube.mesh" scale=8 position="0,500,0" /> 84 <StaticEntity position="0,0,0" /> 85 </waypoints> 86 </StoryModeController> 79 87 80 </controller> 88 81 </SpaceShip> 89 90 82 91 83 -
code/branches/WorldMap_HS18/data/levels/templates/StoryMode.oxt
r11783 r12101 1 1 <Template name=StoryMode> 2 < Pawn2 <StoryModeController 3 3 hudtemplate = StoryModeMap 4 4 /> -
code/branches/WorldMap_HS18/src/modules/towerdefense/TowerDefense.cc
r11716 r12101 272 272 if (hasStarted() == false || player_ == nullptr) 273 273 { 274 orxout(internal_warning) << "Heere" << endl; 274 275 return; 275 276 } 277 278 orxout(internal_warning) << "2" << endl; 276 279 timeUntilNextWave_ -= dt; 277 280 timeSinceLastSpawn_ += dt; … … 280 283 if (selecter != nullptr && selecter->buildTower_ == true) 281 284 { 285 orxout(internal_warning) << "3" << endl; 282 286 selecter->buildTower_ = false; 283 287 -
code/branches/WorldMap_HS18/src/modules/towerdefense/TowerDefenseSelecter.cc
r11071 r12101 108 108 void TowerDefenseSelecter::moveFrontBack(const Vector2& value) 109 109 { 110 110 111 if (value.x > 0) 111 112 { -
code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.cc
r12060 r12101 36 36 RegisterClass(StoryModeController); 37 37 38 StoryModeController::StoryModeController(Context* context) : ArtificialController(context)38 StoryModeController::StoryModeController(Context* context) : Pawn(context) 39 39 { 40 40 RegisterObject(StoryModeController); 41 this->setAccuracy(100); 41 moveRight_ = false; 42 moveLeft_ = false; 43 //this->setAccuracy(50); 42 44 } 43 45 44 46 StoryModeController::~StoryModeController() 45 47 { 46 for (WorldEntity* waypoint : this->waypoints_)48 /*for (WorldEntity* waypoint : this->waypoints_) 47 49 { 48 50 if(waypoint) 49 51 waypoint->destroy(); 50 } 52 }*/ 53 51 54 } 52 55 53 56 void StoryModeController::tick(float dt) 54 57 { 55 if (!this->isActive()) 58 orxout(internal_error) << "Hi" << endl; 59 60 /*if (!this->isActive()) 56 61 return; 57 62 … … 59 64 return; 60 65 61 if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*/ )62 this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size();66 if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*///) 67 //this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size(); 63 68 64 69 //this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition()); 65 70 } 66 71 72 void StoryModeController::moveFrontBack(const Vector2& value) 73 { 74 orxout(internal_error) << "FrontBack" << endl; 75 76 77 } 78 void StoryModeController::moveRightLeft(const Vector2& value) 79 { 80 orxout(internal_error) << "RightLeft" << endl; 81 if (value.x>0){ 82 moveRight_ =false; 83 moveLeft_ =true; 84 85 } 86 87 } 88 89 void StoryModeController::rotateYaw(const Vector2& value){} 90 void StoryModeController::rotatePitch(const Vector2& value){} 91 void StoryModeController::rotateRoll(const Vector2& value){} 92 void StoryModeController::fire(unsigned int a){} 93 void StoryModeController::fired(unsigned int b){} 94 void StoryModeController::boost(bool bBoost){} 67 95 } -
code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.h
r12060 r12101 34 34 #include <vector> 35 35 #include "tools/interfaces/Tickable.h" 36 #include "ArtificialController.h" 36 #include "worldentities/ControllableEntity.h" 37 #include "worldentities/pawns/SpaceShip.h" 37 38 38 39 namespace orxonox 39 40 { 40 class _OrxonoxExport StoryModeController : public ArtificialController, public Tickable41 class _OrxonoxExport StoryModeController : public Pawn 41 42 { 42 43 public: … … 44 45 virtual ~StoryModeController(); 45 46 46 virtual void tick(float dt) override; 47 47 virtual void tick(float dt) override; 48 virtual void moveFrontBack(const Vector2& value) override; 49 virtual void moveRightLeft(const Vector2& value) override; 50 virtual void rotateYaw(const Vector2& value) override; 51 virtual void rotatePitch(const Vector2& value) override; 52 virtual void rotateRoll(const Vector2& value) override; 53 void fire(unsigned int firemode); 54 virtual void fired(unsigned int firemode) override; 55 virtual void boost(bool bBoost) override; 56 bool moveRight_ ; 57 bool moveLeft_ ; 48 58 protected: 49 59
Note: See TracChangeset
for help on using the changeset viewer.