- Timestamp:
- May 20, 2019, 3:09:55 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt
r12394 r12402 7 7 explosionchunks = 4 8 8 9 health = 10 10 maxhealth = 10 11 initialhealth = 10 12 9 13 10 shieldhealth = 20 14 11 initialshieldhealth = 20 -
code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo
r12393 r12402 21 21 /> 22 22 23 <OverlayText24 position = "0.7, 0.20"25 pickpoint = "0.0, 0.0"26 font = "ShareTechMono"27 textsize = 0.0528 colour = "1.0, 1.0, 1.0, 1.0"29 align = "left"30 31 showhealth = true32 />33 23 34 24 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12396 r12402 143 143 void OrxoBlox::LevelUp(){ 144 144 level_++; 145 if((level_%10)==0){ 146 --counter; 147 } 145 148 int z_ = 0; 146 149 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc
r12394 r12402 18 18 19 19 this->size_ = 9.0f; 20 this-> health_ = 1;20 this->setHealth(1); 21 21 this->delay_ = false; 22 22 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h
r12394 r12402 40 40 float getSize(void) const 41 41 { 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(); 49 51 } 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) const55 { return this->health_; }56 57 void gotHit(){58 if (this->health_ > 0){59 this->health_ -= this->health_;60 }61 // else ~OrxoBloxStones();62 52 } 63 53 … … 74 64 private: 75 65 float size_; //!< The dimensions a stone has in the game world. 76 unsigned int health_;77 66 bool delay_; 78 67 -
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 1 34 #include "BallProjectile.h" 2 35 #include "gametypes/Gametype.h" 36 #include <OrxoBlox/OrxoBloxStones.h> 3 37 4 38 … … 27 61 this->orxoblox_ = this->getOrxoBlox(); 28 62 this->setCollisionShapeRadius(2.5); 29 this->setDamage(1000);30 63 64 //setEffect("Orxonox/sparks2"); 31 65 } 32 66 … … 81 115 distance_Z = -distance_Z; 82 116 117 //orxout() << distance_X << endl; 118 //orxout() << distance_Z << endl; 119 83 120 if (distance_X < distance_Z) { 84 121 velocity.z = -velocity.z; 122 //orxout() << "z" << endl; 85 123 } 86 124 if (distance_Z < distance_X) { 87 125 velocity.x = -velocity.x; 126 //orxout() << "x" << endl; 88 127 } 89 128 else { 90 129 velocity.x = -velocity.x; 91 130 velocity.z = -velocity.z; 131 //orxout() << "both" << endl; 92 132 } 93 133 this->setVelocity(velocity); 134 //} 94 135 } 95 136 … … 101 142 if (otherObject->isA(Class(OrxoBloxStones))) { 102 143 Bounce(otherObject, contactPoint, cs); 144 (orxonox_cast<OrxoBloxStones*>(otherObject))->gotHit(); 103 145 104 146 } … … 145 187 position.z = this-> fieldHeight_; 146 188 orxoblox_->count(); 147 148 189 suicidal = true; 149 190 … … 215 256 } 216 257 217 218 //This is an override to prevent getting killed by the program219 258 void BallProjectile::destroyObject(void) 220 259 { -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h
r12396 r12402 38 38 std::string materialBase_; //!< The base name of the material. 39 39 OrxoBlox* orxoblox_; 40 OrxoBloxStones* stone_; 40 41 }; 41 42 }
Note: See TracChangeset
for help on using the changeset viewer.