Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12101


Ignore:
Timestamp:
Nov 14, 2018, 10:01:05 AM (6 years ago)
Author:
linggj
Message:

12

Location:
code/branches/WorldMap_HS18
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout

    r12053 r12101  
    77        <Property name="Area" value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
    88        <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>
    1023
    1124        <Window name="Mission1Text" type="MenuWidgets/Button">
     
    1528            <Event function="CampaignMenu.Mission1Button_clicked" name="Clicked" />
    1629        </Window>
     30
    1731        <Window name="Mission1Button" type="MenuWidgets/JuuButton">
    1832            <Property name="Visible" value="False" />
     
    2943            <Event function="CampaignMenu.Mission2Button_clicked" name="Clicked" />
    3044        </Window>
     45       
    3146        <Window name="Mission2Button" type="MenuWidgets/JuuButton">
    3247            <Property name="Visible" value="True" />
     
    149164            <Event function="CampaignMenu.CampaignMenuBackButton_clicked" name="Clicked" />
    150165        </Window>
     166
     167
    151168        <Window name="CampaignMenuCongratulation" type="MenuWidgets/StaticText">
    152169            <Property name="Text" value="Campaign Completed!!!" />
  • code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua

    r12053 r12101  
    7575end
    7676
     77function P.forwardButton_clicked(e)
     78    P.loadMap()
     79end
     80
    7781function P.Mission1Button_clicked(e)
     82    P.loadLevel(P.FindLevel(0))
     83end
     84function P.KeyPressed(e)
    7885    P.loadLevel(P.FindLevel(0))
    7986end
     
    116123end
    117124
     125function P.loadMap()
     126    orxonox.execute("change Game  NC_StoryModeLevel")
     127end
     128
    118129function P.FindLevel(index)
    119130    local filename = orxonox.LevelManager:getInstance():getCampaignMission(index)
  • code/branches/WorldMap_HS18/data/levels/NC_StoryModeLevel.oxw

    r12058 r12101  
    1 a<LevelInfo
     1<LevelInfo
    22 name = "NC StoryMode"
    33 description = "A level in which the Campaign Menu is defined, which opens other levels."
  • code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw

    r12059 r12101  
    3737       
    3838         <Model position="550,300,0" mesh="assff.mesh" scale=20  visible="true" orientation="-0.015,0.091,0.038,-0.995"/>
    39                <Model position="600,370,0" mesh="Coordinates.mesh" scale=10 />
     39        <Model position="600,370,0" mesh="Coordinates.mesh" scale=10 />
    4040        <Billboard colour="1,1,0.05" position="600,370,-80"  material="Flares/lensflare" scale=4.5 />
    4141       
  • code/branches/WorldMap_HS18/data/levels/StoryModeMapDev.oxw

    r12060 r12101  
    3838         
    3939       
    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 />
     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 />
    4242        <Billboard colour="1,1,0.05" position="600,370,-80"  material="Flares/lensflare" scale=4.5 />
    4343       
     
    7777    </templates>
    7878    <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       
    8780    </controller>
    8881</SpaceShip>
    89 
    9082
    9183
  • code/branches/WorldMap_HS18/data/levels/templates/StoryMode.oxt

    r11783 r12101  
    11<Template name=StoryMode>
    2   <Pawn
     2  <StoryModeController
    33   hudtemplate            = StoryModeMap
    44  />
  • code/branches/WorldMap_HS18/src/modules/towerdefense/TowerDefense.cc

    r11716 r12101  
    272272        if (hasStarted() == false || player_ == nullptr)
    273273        {
     274            orxout(internal_warning) << "Heere" << endl;
    274275            return;
    275276        }
     277
     278        orxout(internal_warning) << "2" << endl;
    276279        timeUntilNextWave_ -= dt;
    277280        timeSinceLastSpawn_ += dt;
     
    280283        if (selecter != nullptr && selecter->buildTower_ == true)
    281284        {
     285             orxout(internal_warning) << "3" << endl;
    282286            selecter->buildTower_ = false;
    283287
  • code/branches/WorldMap_HS18/src/modules/towerdefense/TowerDefenseSelecter.cc

    r11071 r12101  
    108108    void TowerDefenseSelecter::moveFrontBack(const Vector2& value)
    109109    {
     110       
    110111        if (value.x > 0)
    111112        {
  • code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.cc

    r12060 r12101  
    3636    RegisterClass(StoryModeController);
    3737
    38    StoryModeController::StoryModeController(Context* context) : ArtificialController(context)
     38   StoryModeController::StoryModeController(Context* context) : Pawn(context)
    3939    {
    4040        RegisterObject(StoryModeController);
    41         this->setAccuracy(100);
     41        moveRight_ = false;
     42        moveLeft_ = false;
     43        //this->setAccuracy(50);
    4244    }
    4345
    4446    StoryModeController::~StoryModeController()
    4547    {
    46         for (WorldEntity* waypoint : this->waypoints_)
     48        /*for (WorldEntity* waypoint : this->waypoints_)
    4749        {
    4850            if(waypoint)
    4951                waypoint->destroy();
    50         }
     52        }*/
     53
    5154    }
    5255
    5356    void StoryModeController::tick(float dt)
    5457    {
    55         if (!this->isActive())
     58        orxout(internal_error) << "Hi" << endl;
     59       
     60        /*if (!this->isActive())
    5661            return;
    5762
     
    5964            return;
    6065
    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();
    6368
    6469        //this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition());
    6570    }
    6671
     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){}
    6795}
  • code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.h

    r12060 r12101  
    3434#include <vector>
    3535#include "tools/interfaces/Tickable.h"
    36 #include "ArtificialController.h"
     36#include "worldentities/ControllableEntity.h"
     37#include "worldentities/pawns/SpaceShip.h"
    3738
    3839namespace orxonox
    3940{
    40     class _OrxonoxExport StoryModeController : public ArtificialController, public Tickable
     41    class _OrxonoxExport StoryModeController : public Pawn
    4142    {
    4243        public:
     
    4445            virtual ~StoryModeController();
    4546
    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_ ;
    4858        protected:
    4959
Note: See TracChangeset for help on using the changeset viewer.