Changeset 12410 for code/branches/Presentation_FS19/src/modules
- Timestamp:
- May 22, 2019, 2:45:31 PM (6 years ago)
- Location:
- code/branches/Presentation_FS19
- Files:
-
- 8 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_FS19
- Property svn:mergeinfo changed
/code/branches/Boxhead_FS19 (added) merged: 12209,12211,12216,12261-12262,12267,12273-12274,12284,12286,12299-12300,12354,12358,12374,12390,12397-12399,12405
- Property svn:mergeinfo changed
-
code/branches/Presentation_FS19/src/modules/hover/Hover.cc
r12292 r12410 36 36 #include "HoverOrigin.h" 37 37 #include "HoverWall.h" 38 #include "HoverFlag.h" 38 39 39 #include "MazeGenerator.h" 40 40 #include "core/CoreIncludes.h" 41 #include "worldentities/pawns/Pawn.h" 42 #include "worldentities/pawns/ScriptableControllerDrone.h" 43 #include "worldentities/pawns/SpaceShip.h" 44 45 #include "tools/Timer.h" 46 #include "infos/Bot.h" 47 #include "worldentities/pawns/ModularSpaceShip.h" 48 #include "graphics/Model.h" 49 50 51 41 52 42 53 namespace orxonox … … 49 60 50 61 this->origin_ = nullptr; 51 this->numberOfFlags_ = 1;52 62 this->firstTick_ = true; 53 63 54 64 this->setHUDTemplate("HoverHUD"); 55 65 } 66 // void Hover::spawnZombie(std::string id) 67 // { 68 // Identifier *identifier = ClassByString("SpaceShip"); 69 70 // if(!identifier) 71 // { 72 // orxout(user_error) << "Script tried to spawn unknown object" << std::endl; 73 // return; 74 // } 75 76 // if(!identifier->isLoadable()) 77 // { 78 // orxout(user_error) << "Script tried to spawn unloadable object" << std::endl; 79 // return; 80 // } 81 82 83 // WorldEntity *entity; 84 // Identifiable *obj = identifier->fabricate(this->controller_->getWorldEntityByID("Player")->getContext()); 85 86 87 88 // orxout(user_status) << "First hit!" << std::endl; 89 90 // if(obj->isA(ClassIdentifier<WorldEntity>::getIdentifier())) 91 // { 92 // orxout(user_status) << "Is WorldEntity!" << std::endl; 93 // entity = orxonox_cast<WorldEntity*>(obj); 94 // } 95 // else if(obj->isA(ClassIdentifier<PlayerInfo>::getIdentifier())) 96 // { 97 // // TODO This does not work yet because somehow the controllable entity is not set 98 // // yet at this stage. 99 // // entity = orxonox_cast<PlayerInfo*>(obj)->getControllableEntity(); 100 101 // orxout(user_status) << "Is PlayerInfo!" << std::endl; 102 103 // //use TEMPLATES in the map to define objects that are not present on the map yet 104 // return; 105 // } 106 // else 107 // { 108 // orxout(user_warning) << "Script tried to spawn an object that is neither a WorldEntity, nor a PlayerInfo" << std::endl; 109 110 // return; 111 // } 112 113 // if(entity->isA(ClassIdentifier<MobileEntity>::getIdentifier())) { 114 // orxout(user_status) << "Is MobileEntity!" << std::endl; 115 // this->controller_->registerMobileEntity(id, orxonox_cast<MobileEntity*>(entity)); 116 // } 117 118 119 120 // if(entity->isA(ClassIdentifier<Pawn>::getIdentifier())) { 121 // orxout(user_status) << "Is Pawn!" << std::endl; 122 // this->controller_->registerPawn(id, orxonox_cast<Pawn*>(entity)); 123 // } 124 125 // this->controller_->registerWorldEntity(id, orxonox_cast<WorldEntity*>(entity)); 126 127 128 // ///////////////GOLD!!!!!!!!!!!!!!!//////////////////////// 129 // Pawn* pawn = this->controller_->getPawnByID(id); 130 131 // //Attach to pawn 132 // SpaceShip* drone = new SpaceShip(pawn->getContext()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something) 133 134 // drone->addTemplate("spaceshipzombie"); //ScriptableControllerDroneTemplate spaceshipescort 135 136 // Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(500,20,500); 137 // drone->setPosition(spawnPosition); 138 // } 56 139 57 140 void Hover::tick(float dt) … … 82 165 83 166 //Generate inner Walls according to levelcode 84 for(int y=0; y<numCells; y++){ 85 for(int x=0; x<numCells; x++){ 86 switch(levelcode[ y * numCells + x ]){ 87 case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1); 88 break; 89 case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1); 90 case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0); 91 default: break; 92 } 93 } 94 } 167 // for(int y=0; y<numCells; y++){ 168 // for(int x=0; x<numCells; x++){ 169 // switch(levelcode[ y * numCells + x ]){ 170 // case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1); 171 // break; 172 // case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1); 173 // case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0); 174 // default: break; 175 // } 176 // } 177 // } 178 179 180 181 95 182 96 183 //Generate 5 flags randomly 97 for ( int i = 0; i < 5; i++ ) 98 { 99 HoverFlag* flag = new HoverFlag(origin_->getContext()); 100 flag->init(rand()%numCells, rand()%numCells, cellSize); 101 flags_.push_back(flag); 102 } 184 // for ( int i = 0; i < 5; i++ ) 185 // { 186 // HoverFlag* zombieship = new SpaceShip(origin_->getContext()); 187 // flag->init(rand()%numCells, rand()%numCells, cellSize); 188 // flags_.push_back(flag); 189 // } 190 191 103 192 104 193 }//firsttick end 105 194 106 195 // Check if ship collided with one of the flags 107 for ( unsigned int i = 0; i < flags_.size(); i++ ){ 108 if(flags_[i]->getCollided()){ 109 flags_[i]->destroyLater(); 110 flags_.erase (flags_.begin()+i); 111 } 112 } 113 numberOfFlags_ = flags_.size(); 196 // for ( unsigned int i = 0; i < flags_.size(); i++ ){ 197 // if(flags_[i]->getCollided()){ 198 // flags_[i]->destroyLater(); 199 // flags_.erase (flags_.begin()+i); 200 // } 201 // } 202 // numberOfFlags_ = flags_.size(); 203 204 //Spawn Zombies 205 //spawnZombie(z1); 206 207 114 208 } 115 209 } -
code/branches/Presentation_FS19/src/modules/hover/Hover.h
r11495 r12410 45 45 namespace orxonox 46 46 { 47 48 49 50 47 51 class _HoverExport Hover : public Gametype 48 52 { … … 58 62 { return this->numberOfFlags_; } 59 63 64 60 65 private: 61 66 WeakPtr<HoverOrigin> origin_; … … 66 71 } 67 72 73 68 74 #endif /* _Hover_H__ */ -
code/branches/Presentation_FS19/src/modules/hover/HoverShip.cc
r12292 r12410 48 48 } 49 49 50 // //moves slightly right and left, that zombieship approaches 51 // void HoverShip::leftright(const Vector2& value) 52 // { 53 // this->steering_.z += 5; 54 // this->steering_.z -= 5; 55 // } 56 50 57 void HoverShip::moveFrontBack(const Vector2& value) 51 58 { this->steering_.z -= value.x; } 52 59 53 60 void HoverShip::moveRightLeft(const Vector2& value) 54 { this->steering_.x += value.x; } 61 { this->steering_.x += value.x; 62 // value.x += 0.001; 63 // value.x -= 0.001; 64 } 55 65 56 66 void HoverShip::moveUpDown(const Vector2& value) … … 101 111 } 102 112 113 if(otherObject->isA(Class(SpaceShip))) 114 { 115 removeHealth(0.2); 116 } 117 103 118 return false; 104 119 } -
code/branches/Presentation_FS19/src/modules/hover/HoverShip.h
r12292 r12410 53 53 { return this->jumpBoost_; } 54 54 55 /////moves slightly right and left, that zombieship approaches 56 // virtual void leftright(const Vector2& value); 57 55 58 virtual void moveFrontBack(const Vector2& value) override; 56 59 -
code/branches/Presentation_FS19/src/modules/hover/HoverWall.cc
r11099 r12410 1 /*1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 3 * > www.orxonox.net < … … 102 102 103 103 model_ = new Model(this->getContext()); 104 model_->setMeshSource("CuboidBody.mesh");105 model_->setScale3D(Vector3(xSize_*1.0f, cellHeight* 1.0f, zSize_*1.0f));104 // model_->setMeshSource("CuboidBody.mesh"); 105 model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*400000000.0f, zSize_*1.0f)); 106 106 model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f)); 107 107 … … 109 109 110 110 cs_ = new BoxCollisionShape(this->getContext()); 111 cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight* 1.0f, zSize_*1.0f));111 cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*400000000.0f, zSize_*1.0f)); 112 112 cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f)); 113 113 -
code/branches/Presentation_FS19/src/modules/weapons/projectiles/CMakeLists.txt
r12191 r12410 15 15 MineProjectile.cc 16 16 WagnisProjectile.cc 17 HoverGunProjectile.cc 17 18 ) -
code/branches/Presentation_FS19/src/modules/weapons/weaponmodes/CMakeLists.txt
r12191 r12410 5 5 HsW01.cc 6 6 LightningGun.cc 7 HoverGun.cc 7 8 SplitGun.cc 8 9 IceGun.cc … … 14 15 MineGun.cc 15 16 WagnisGun.cc 17 HoverGun.cc 16 18 )
Note: See TracChangeset
for help on using the changeset viewer.