Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12144


Ignore:
Timestamp:
Dec 5, 2018, 10:48:32 AM (6 years ago)
Author:
ottka
Message:

New HUDs and Start

Location:
code/branches/OrxoKart_HS18
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw

    r12128 r12144  
    7171      team=0
    7272
    73       position="<?lua print(S*0)?>,40,<?lua print(8*S)?>"
     73      position="<?lua print(S*0)?>,40,<?lua print(8.5*S)?>"
    7474      lookat="0,40,0"
    7575      spawnclass=OrxoKartKart
  • code/branches/OrxoKart_HS18/data/overlays/OrxoKartHUD.oxo

    r12079 r12144  
    1717    />
    1818
    19     <HUDHealthBar
    20      name              = "HealthBar1"
    21      background        = "Orxonox/HealthBarBackground"
    22      size              = "0.35, 0.0875"
    23      position          = "0.0 , 0.97"
    24      pickpoint         = "0, 1"
    25      bartexture        = "healthbar_bar.png"
    26      textfont          = "VeraMono"
    27      textusebarcolour  = true
    28      textscale          = 0.4
    29      textoffset        = "0.325, -0.825"
    30      textpickpoint     = "0, 0"
    31      textalign         = "right"
    32      correctaspect     = true
    33      iconmaterial      = "Orxonox/BarIconHealth"
    34     >
    35       <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
    36       <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
    37       <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
    38     </HUDHealthBar>
     19    <ShroomHUD
     20     name      = "ShroomHUD"
     21     position  = "0.05, 0.02"
     22     size      = "0.18, 0.05"
     23    />
     24   
    3925 </OverlayGroup>
    4026</Template>
  • code/branches/OrxoKart_HS18/src/modules/orxokart/CMakeLists.txt

    r12108 r12144  
    55  OrxoKartOrigin.cc
    66  OrxoKartFlag.cc
     7  ShroomHUD.cc
    78  TimeHUD.cc
    89)
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc

    r12128 r12144  
    5050        this->raceFinished = false;
    5151        this->firstTick_ = true;
     52        this->numberOfShrooms = 3;
    5253
    5354        this->setHUDTemplate("OrxoKartHUD");
     
    181182            OrxoKartKart* player = flag_->getObjectofCollision();
    182183            if (level == 1)
    183                 player->setPosition(Vector3(s*0, 20, s*8));
     184                player->setPosition(Vector3(s*0, 20, s*8.5));
    184185            if (level == 2)
    185                 player->setPosition(Vector3(s*0, 20, s*18));
     186                player->setPosition(Vector3(s*0, 20, s*18.5));
    186187            player->setOrientation(Quaternion(1, 0, 0, 0));   // 0, 0, 0
    187188            player->setVelocity(Vector3(0,0,0));
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h

    r12128 r12144  
    5757            inline int getRaceFinished() const
    5858                { return this->raceFinished; }
     59            inline int getNumberOfShrooms() const
     60                { return this->numberOfShrooms; }   
    5961
    6062        private:
     
    6870            bool firstTick_;
    6971
     72            int numberOfShrooms;
     73
    7074            int s;
    7175            int n;
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartPrereqs.h

    r12108 r12144  
    7474    class OrxoKartTile;
    7575    class TimeHUD;
     76    class ShroomHUD;
    7677}
    7778
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.cc

    r12128 r12144  
    4848        this->model_ = nullptr;
    4949        this->cs_ = nullptr;
     50        this->arc = nullptr;
    5051
    5152        this->enableCollisionCallback();
     
    6667            if (this->cs_)
    6768                this->cs_->destroy();
     69            if (this->arc)
     70                this->arc->destroy();
    6871        }
    6972    }
     
    9093        else if (type == 2 ) {
    9194            model_->setMeshSource("OrxoKartStreckenabschnittZiel.mesh");
     95
     96            arc = new Model(this->getContext());
     97            arc->setMeshSource("OrxoKartStartTor.mesh");
     98            arc->setPosition(Vector3(x*1.0f, -1.0f, z*1.0f));
     99            arc->setScale3D(Vector3(s*1.0f/10, s*1.0f/10, s*1.0f/10));
     100            arc->yaw(Degree(-90));
     101            this->attach(arc);
    92102        }
    93103        model_->setScale3D(Vector3(s*1.0f, 8.0f, s*1.0f));
  • code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.h

    r12128 r12144  
    6565        private:
    6666            Model* model_;
     67            Model* arc;
    6768            BoxCollisionShape* cs_;
    6869            bool collided_;
Note: See TracChangeset for help on using the changeset viewer.