Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12402 for code/branches


Ignore:
Timestamp:
May 20, 2019, 3:09:55 PM (6 years ago)
Author:
ahuwyler
Message:

last commit

Location:
code/branches/OrxoBlox_FS19
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt

    r12394 r12402  
    77   explosionchunks        = 4
    88
    9    health            = 10
    10    maxhealth         = 10
    11    initialhealth     = 10
    12 
     9   
    1310   shieldhealth        = 20
    1411   initialshieldhealth = 20
  • code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo

    r12393 r12402  
    2121    />
    2222
    23     <OverlayText
    24      position  = "0.7, 0.20"
    25      pickpoint = "0.0, 0.0"
    26      font      = "ShareTechMono"
    27      textsize  = 0.05
    28      colour    = "1.0, 1.0, 1.0, 1.0"
    29      align     = "left"
    30 
    31      showhealth  = true
    32     />
    3323
    3424
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12396 r12402  
    143143    void OrxoBlox::LevelUp(){
    144144        level_++;
     145        if((level_%10)==0){
     146            --counter;
     147        }
    145148        int z_ = 0;
    146149
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc

    r12394 r12402  
    1818
    1919        this->size_ = 9.0f;
    20         this->health_ = 1;
     20        this->setHealth(1);
    2121        this->delay_ = false;
    2222    }
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h

    r12394 r12402  
    4040            float getSize(void) const
    4141                { return this->size_; }
    42             /**
    43             @brief Set the Health of the stone.
    44             @param size The dimensions a stone has in the game world. (A stone is a cube)
    45             */
    46             void setHealth(unsigned int health)
    47                 {
    48                     this->health_ = health;
     42           
     43            void gotHit(){
     44                orxout()<<"GOT HIT"<<endl;
     45                unsigned int health_ =this->getHealth();
     46                if (health_> 0){
     47                    this->setHealth(++health_);
     48                    }
     49                else {
     50                    this->kill();
    4951                }
    50             /**
    51             @brief Get the size of the stone.
    52             @return Returns the dimensions a stone has in the game world. (A stone is a cube)
    53             */
    54             unsigned int getHealth(void) const
    55                 { return this->health_; }
    56 
    57             void gotHit(){
    58                 if (this->health_ > 0){
    59                     this->health_ -= this->health_;
    60                     }
    61                 //  else ~OrxoBloxStones();
    6252                }
    6353
     
    7464        private:
    7565            float size_; //!< The dimensions a stone has in the game world.
    76             unsigned int health_;
    7766            bool delay_;
    7867           
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc

    r12401 r12402  
     1/*
     2 *   ORXONOX - the hottest 3D action shooter ever to exist
     3 *                    > www.orxonox.net <
     4 *
     5 *
     6 *   License notice:
     7 *
     8 *   This program is free software; you can redistribute it and/or
     9 *   modify it under the terms of the GNU General Public License
     10 *   as published by the Free Software Foundation; either version 2
     11 *   of the License, or (at your option) any later version.
     12 *
     13 *   This program is distributed in the hope that it will be useful,
     14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 *   GNU General Public License for more details.
     17 *
     18 *   You should have received a copy of the GNU General Public License
     19 *   along with this program; if not, write to the Free Software
     20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     21 *
     22 *   Author:
     23 *      Fabian 'x3n' Landau
     24 *   Co-authors:
     25 *      ...
     26 *
     27 */
     28
     29/**
     30    @file ParticleProjectile.h
     31    @brief Implementation of the ParticleProjectile class.
     32*/
     33
    134#include "BallProjectile.h"
    235#include "gametypes/Gametype.h"
     36#include <OrxoBlox/OrxoBloxStones.h>
    337
    438
     
    2761        this->orxoblox_ = this->getOrxoBlox();
    2862        this->setCollisionShapeRadius(2.5);
    29         this->setDamage(1000);
    30                 //setEffect("Orxonox/sparks2");
     63       
     64        //setEffect("Orxonox/sparks2");
    3165    }
    3266
     
    81115                distance_Z = -distance_Z;
    82116
     117            //orxout() << distance_X << endl;
     118            //orxout() << distance_Z << endl;
     119
    83120            if (distance_X < distance_Z) {
    84121                velocity.z = -velocity.z;
     122                //orxout() << "z" << endl;
    85123            }
    86124            if (distance_Z < distance_X) {
    87125                velocity.x = -velocity.x;
     126                //orxout() << "x" << endl;
    88127            }
    89128            else {
    90129                velocity.x = -velocity.x;
    91130                velocity.z = -velocity.z;
     131                //orxout() << "both" << endl;
    92132            }
    93133            this->setVelocity(velocity);
     134        //}
    94135    }
    95136
     
    101142            if (otherObject->isA(Class(OrxoBloxStones))) {
    102143                Bounce(otherObject, contactPoint, cs);
     144                (orxonox_cast<OrxoBloxStones*>(otherObject))->gotHit();
    103145               
    104146            }
     
    145187                position.z = this-> fieldHeight_;
    146188                orxoblox_->count();
    147 
    148189                suicidal = true;
    149190               
     
    215256    }
    216257
    217 
    218     //This is an override to prevent getting killed by the program
    219258    void BallProjectile::destroyObject(void)
    220259    {
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h

    r12396 r12402  
    3838            std::string materialBase_; //!< The base name of the material.
    3939            OrxoBlox* orxoblox_;
     40            OrxoBloxStones* stone_;
    4041    };
    4142}
Note: See TracChangeset for help on using the changeset viewer.