Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11566


Ignore:
Timestamp:
Nov 20, 2017, 2:00:56 PM (6 years ago)
Author:
pascscha
Message:

skybox

Location:
code/branches/FlappyOrx_HS17
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw

    r11563 r11566  
    3232  <Scene
    3333    ambientlight = "0.8, 0.7, 0.4"
    34     skybox     = "Orxonox/skyBoxFlappyOrx"
     34    skybox     = "Orxonox/skyBoxBasic"
    3535  >
    3636
  • code/branches/FlappyOrx_HS17/data/overlays/FlappyOrxHUD.oxo

    r11563 r11566  
    2929    />
    3030
    31     <OverlayText
    32      position  = "0.02, 0.02"
    33      pickpoint = "0.0, 0.0"
    34      font      = "ShareTechMono"
    35      textsize  = 0.04
    36      colour    = "1.0, 1.0, 1.0, 1.0"
    37      align     = "left"
    38      caption   = "Score: "
    39     />
    4031    <!-- <FlappyOrxHUDinfo
    4132     position  = "0.14, 0.01"
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc

    r11565 r11566  
    6767        point = 0;
    6868        bShowLevel = false;
    69         sDeathMessage = "hallihallo";
     69        sDeathMessage = "Welcome to FlappyOrx\nPress Space to start!";
    7070        bIsDead = true;
    7171        multiplier = 1;
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc

    r11565 r11566  
    6868            if(not this->FlappyOrxGame->isDead()){
    6969                if(this->bShowPoints_){
    70                     const std::string& points = multi_cast<std::string>(this->FlappyOrxGame->getPoints());
     70                    const std::string& points = "Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints());
    7171                    setTextSize(0.04);
    7272                    setPosition(Vector2(0.14, 0.02));
     
    7979            }
    8080            else{
    81                 if(this->bShowGameOver_){
     81                if(this->bShowPoints_){
     82                    setTextSize(0);
     83                }
     84                else if(this->bShowGameOver_){
    8285                    std::string message = this->FlappyOrxGame->getDeathMessage();
    8386                    setTextSize(0.1);
    8487                    setPosition(Vector2(.5, .5));
     88
     89                    setAlignment(OverlayText::Alignment::Center);
     90                   
    8591                    this->setCaption(message);
    8692                    this->setColour(ColourValue(1, 0, 0, 1));
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc

    r11565 r11566  
    6969        SUPER(FlappyOrxShip, tick, dt);
    7070        //Execute movement
    71         if (this->hasLocalController()&&not isDead)
     71        if (this->hasLocalController())
    7272        {
    7373            if(getHealth()<0){
     
    8181           
    8282
    83             velocity.y += gravity*dt;
    84             if(isFlapping){
    85                 isFlapping = false;
    86                 if(pos.z > -150)
    87                     velocity.y = -UpwardThrust;
     83            if(not isDead){
     84                velocity.y += gravity*dt;
     85                if(isFlapping){
     86                    isFlapping = false;
     87                    if(pos.z > -150)
     88                        velocity.y = -UpwardThrust;
     89                }
     90
     91                pos += Vector3(speed + velocity.x, 0, velocity.y) * dt;
    8892            }
    89 
    90             pos += Vector3(speed + velocity.x, 0, velocity.y) * dt;
    9193           
    92 
    93            
     94                       
    9495            // Camera
    9596            Camera* camera = this->getCamera();
     
    154155    void FlappyOrxShip::death()
    155156    {
     157        isDead = true;
    156158        Vector3 pos = getPosition();
    157159        pos.x = 0;
Note: See TracChangeset for help on using the changeset viewer.