Changeset 11177 for code/branches/tgidronFS16
- Timestamp:
- Apr 28, 2016, 4:04:42 PM (9 years ago)
- Location:
- code/branches/tgidronFS16
- Files:
-
- 2 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tgidronFS16/data/levels/Hover.oxw
r11171 r11177 24 24 MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE 25 25 ?> 26 <!-- 27 <Template name=mediumdamagehoverpickupRepresentation> 28 <PickupRepresentation> 29 <spawner-representation> 30 <StaticEntity> 31 <attached> 32 <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 > 33 <attached> 34 <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.5 /> 35 </attached> 36 </Billboard> 37 </attached> 38 </StaticEntity> 39 </spawner-representation> 40 </PickupRepresentation> 41 </Template> 42 43 <Template name=damagehover baseclass=DamageBoostPickup> 44 <DamageBoostPickup 45 representation = "mediumdamagehoverpickup" 46 duration = 10.0 47 damageMultiplier = 5.0 48 activationType = "immediate" 49 durationType = "continuous" 50 /> 51 </Template> --> 52 53 <Template name=hugespeedpickupRepresentation> 54 <PickupRepresentation> 55 <spawner-representation> 56 <StaticEntity> 57 <attached> 58 <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1> 59 <attached> 60 <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.7 /> 61 </attached> 62 </Billboard> 63 </attached> 64 </StaticEntity> 65 </spawner-representation> 66 </PickupRepresentation> 67 </Template> 68 69 <Template name=hugespeedpickup baseclass=SpeedPickup> 70 <SpeedPickup 71 representation = "hugespeedpickup" 72 duration = 10.0 73 speedAdd = 0.0 74 SpeedMultiply = 50.0 75 activationType = "immediate" 76 durationType = "continuous" 77 /> 78 </Template> 79 80 26 81 27 82 <Template name=destroyhoverpickupRepresentation> … … 45 100 </Template> 46 101 102 <Template name=obstacle baseclass=Pawn> 103 <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" > 104 <attached> 105 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 106 </attached> 107 <collisionShapes> 108 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 109 </collisionShapes> 110 </Pawn> 111 </Template> 112 113 47 114 <Level 48 115 plugins = hover … … 72 139 /> 73 140 141 <PickupRepresentation 142 name = "hugespeedpickup" 143 pickupName = "Huge Speed Boost" 144 pickupDescription = "Multiplies Speed of the Ship by a huge amount." 145 spawnerTemplate = "hugespeedpickupRepresentation" 146 inventoryRepresentation = "HugeSpeed" 147 /> 148 <!-- 149 <PickupRepresentation 150 name = "damagehover" 151 pickupName = "Medium Damage Hover Pickup" 152 pickupDescription = "Multiplies the ship damage with 5." 153 spawnerTemplate = "mediumdamagehoverpickupRepresentation" 154 inventoryRepresentation = "MediumDamageHover" 155 /> --> 156 74 157 <StaticEntity position="0,0,0" collisionType="static"> 75 158 <attached> … … 78 161 cellSize="<?lua print(MAZE_CELL_SIZE)?>" 79 162 cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>" 163 obstacletemplate=obstacle 80 164 pickuptemplate=destroyhoverpickup 81 165 pickuprepresentationtemplate=destroyhoverpickupRepresentation 166 pickuptemplatedam=hugespeedpickup 167 pickuprepresentationtemplatedam=hugespeedpickupRepresentation 82 168 /> 83 169 <Model -
code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi
r11171 r11177 17 17 </Weapon> 18 18 <Weapon> 19 <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" />19 <EnergyDrink mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" /> 20 20 </Weapon> 21 21 </WeaponPack> -
code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt
r11168 r11177 79 79 boostfactor = 2 80 80 81 speedfront = 1 2081 speedfront = 150 82 82 speedback = 40 83 83 speedleftright = 40 -
code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
r11171 r11177 76 76 /> 77 77 78 <FlagsAndLivesHUD 78 <OverlayText 79 position = "0.02, 0.16" 80 pickpoint = "0.0, 0.0" 81 font = "ShareTechMono" 82 textsize = 0.04 83 colour = "1.0, 1.0, 1.0, 1.0" 84 align = "left" 85 caption = "Level: " 86 /> 87 88 <TFlagsLivesLevelHUD 79 89 position = "0.14, 0.02" 80 90 pickpoint = "0.0, 0.0" … … 83 93 colour = "1.0, 1.0, 1.0, 1.0" 84 94 align = "left" 95 showFlags = true 85 96 showLives = false 97 showLevel = false 98 86 99 /> 87 100 88 < FlagsAndLivesHUD101 <TFlagsLivesLevelHUD 89 102 position = "0.14, 0.04" 90 103 pickpoint = "0.0, 0.0" … … 93 106 colour = "1.0, 1.0, 1.0, 1.0" 94 107 align = "left" 108 showFlags = false 95 109 showLives = true 110 showLevel = false 96 111 97 112 /> 113 114 <TFlagsLivesLevelHUD 115 position = "0.14, 0.06" 116 pickpoint = "0.0, 0.0" 117 font = "ShareTechMono" 118 textsize = 0.04 119 colour = "1.0, 1.0, 1.0, 1.0" 120 align = "left" 121 showFlags = false 122 showLives = false 123 showLevel = true 124 125 /> 126 98 127 99 128 </OverlayGroup> -
code/branches/tgidronFS16/src/modules/hover/CMakeLists.txt
r11171 r11177 8 8 FlagHUD.cc 9 9 MazeGenerator.cc 10 FlagsAndLivesHUD.cc10 TFlagsLivesLevelHUD.cc 11 11 ) 12 12 -
code/branches/tgidronFS16/src/modules/hover/Hover.cc
r11171 r11177 121 121 122 122 123 //Generate 5 PickupSpawners randomly 123 //Generate 5 PickupSpawners randomly (destroy hover pickup) 124 124 for (int i = 0; i<5; i++) 125 125 { … … 134 134 pickupSpawners_.push_back(pickupSpawner); 135 135 } 136 //If no lives are left, end game 137 if(lives <= 0){ 138 GSLevel::startMainMenu(); 139 } 140 141 orxout() << this->origin_->getPickupTemplate() << endl; 142 orxout() << this->origin_->getPickupRepresentationTemplate() << endl; 143 } 144 } 145 146 147 // Rename/delete this function. 148 void Hover::startLevel() 149 { 150 //Generate 5 flags randomly (test only 1 flag) 151 for ( int i = 0; i < 5; i++ ) 152 { 153 HoverFlag* flag = new HoverFlag(origin_->getContext()); 154 flag->init(rand()%numCells, rand()%numCells, cellSize); 155 flags_.push_back(flag); 156 } 157 158 //Generate 5 PickupSpawners randomly 136 137 //Generate 5 PickupSpawners randomly (damage pickup) 159 138 for (int i = 0; i<5; i++) 160 139 { … … 162 141 163 142 pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f)); 164 pickupSpawner->setPickupTemplateName(origin_->getPickupTemplate ());143 pickupSpawner->setPickupTemplateName(origin_->getPickupTemplateDam()); 165 144 pickupSpawner->setMaxSpawnedItems(5); 166 145 pickupSpawner->setRespawnTime(30); … … 170 149 } 171 150 151 //***************************************************************************** 152 153 Pawn* crate = new Pawn(origin_->getContext()); 154 155 crate->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f)); 156 crate->addTemplate(origin_->getObstacleTemplate()); 157 158 159 160 161 //If no lives are left, end game 162 if(lives <= 0){ 163 GSLevel::startMainMenu(); 164 } 165 166 orxout() << this->origin_->getPickupTemplate() << endl; 167 orxout() << this->origin_->getPickupRepresentationTemplate() << endl; 168 169 orxout() << this->origin_->getPickupTemplateDam() << endl; 170 orxout() << this->origin_->getPickupRepresentationTemplateDam() << endl; 171 } 172 } 173 174 175 // Start new level 176 void Hover::newLevel() 177 { 178 //Generate 5 flags randomly (test only 1 flag) 179 for ( int i = 0; i < 5; i++ ) 180 { 181 HoverFlag* flag = new HoverFlag(origin_->getContext()); 182 flag->init(rand()%numCells, rand()%numCells, cellSize); 183 flags_.push_back(flag); 184 } 172 185 173 186 } … … 187 200 totFlags++; 188 201 if(flags_.size()<=0){ 189 ChatManager::message("Level Up!");202 //ChatManager::message("Level Up!"); 190 203 191 204 levelUp(); … … 205 218 { 206 219 level++; 207 startLevel(); 220 //increment lives after every 4 levels 221 if(level%4 == 0) 222 { 223 lives++; 224 } 225 newLevel(); 208 226 209 227 } -
code/branches/tgidronFS16/src/modules/hover/Hover.h
r11171 r11177 58 58 59 59 void start(); 60 void startLevel();60 void newLevel(); 61 61 void levelUp(); 62 62 void endLevel(); … … 73 73 inline int getLives() const 74 74 { return this->lives; } 75 76 inline int getLevel() const 77 { return this->level; } 75 78 76 79 private: -
code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc
r11169 r11177 48 48 pickupTemplate_ = ""; 49 49 pickupRepresentationTemplate_ = ""; 50 51 pickupTemplateDam_ = ""; 52 pickupRepresentationTemplateDam_ = ""; 50 53 } 51 54 … … 59 62 XMLPortParam(HoverOrigin, "pickuptemplate", setPickupTemplate, getPickupTemplate, xmlelement, mode); 60 63 XMLPortParam(HoverOrigin, "pickuprepresentationtemplate", setPickupRepresentationTemplate, getPickupRepresentationTemplate, xmlelement, mode); 64 XMLPortParam(HoverOrigin, "pickuptemplatedam", setPickupTemplateDam, getPickupTemplateDam, xmlelement, mode); 65 XMLPortParam(HoverOrigin, "pickuprepresentationtemplatedam", setPickupRepresentationTemplateDam, getPickupRepresentationTemplateDam, xmlelement, mode); 66 XMLPortParam(HoverOrigin, "obstacletemplate", setObstacleTemplate, getObstacleTemplate, xmlelement, mode); 61 67 } 68 62 69 63 70 void HoverOrigin::checkGametype() -
code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h
r11169 r11177 66 66 { return this->cellHeight_; } 67 67 68 //pickup template set and get for destroy hover pickup 69 68 70 inline void setPickupTemplate(std::string pickupTemplate) 69 71 { this->pickupTemplate_ = pickupTemplate; } … … 76 78 { return this->pickupRepresentationTemplate_; } 77 79 80 //pickup template get and set for damage hover pickup 81 82 inline void setPickupTemplateDam(std::string pickupTemplateDam) 83 { this->pickupTemplateDam_ = pickupTemplateDam; } 84 inline std::string getPickupTemplateDam() const 85 { return this->pickupTemplateDam_; } 86 87 inline void setPickupRepresentationTemplateDam(std::string pickupRepresenationaTemplateDam) 88 { this->pickupRepresentationTemplateDam_ = pickupRepresenationaTemplateDam; } 89 inline std::string getPickupRepresentationTemplateDam() const 90 { return this->pickupRepresentationTemplateDam_; } 91 92 //get and set for obstacle template 93 94 inline void setObstacleTemplate(std::string obstacleTemplate) 95 { this->obstacleTemplate_ = obstacleTemplate; } 96 inline std::string getObstacleTemplate() const 97 { return this->obstacleTemplate_; } 98 78 99 private: 79 100 void checkGametype(); 101 80 102 81 103 int numCells_; … … 86 108 std::string pickupTemplate_; 87 109 std::string pickupRepresentationTemplate_; 110 111 // Tempaltes for the damage hover pickup 112 std::string pickupTemplateDam_; 113 std::string pickupRepresentationTemplateDam_; 114 115 //Template for crate obstacle 116 std::string obstacleTemplate_; 88 117 }; 89 118 }
Note: See TracChangeset
for help on using the changeset viewer.