Changeset 11517 for code/branches/SOBv2_HS17/src
- Timestamp:
- Oct 30, 2017, 4:05:01 PM (7 years ago)
- Location:
- code/branches/SOBv2_HS17/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
r11491 r11517 65 65 firePressed_ = false; 66 66 collDisZ_ = 0; 67 67 68 //Times and turning 68 69 timeSinceLastFire_ = 0.0; … … 110 111 mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once 111 112 112 Vector3 scale = {1.2, 1.2, 1.2}; 113 this->setScale3D(scale); 114 /*if (this->hasPhysics() && this->collisionShape_ != nullptr) 113 114 // now, change the clothes of the Figure to red 115 std::set<WorldEntity*> attachedObjects = this->getAttachedObjects(); 116 std::set<WorldEntity*>::iterator it; 117 for (it = attachedObjects.begin(); it != attachedObjects.end(); ++it) 115 118 { 116 this->collisionShape_->setScale3D(scale); 117 }*/ 118 119 Model* FiguresModel = orxonox_cast<Model*>(*it); 120 if (FiguresModel != nullptr) 121 { 122 std::string name = "orxo_material_gross"; 123 FiguresModel->setMaterial(name); 124 } 125 } 119 126 } 120 127 //Check if otherObject is a Gumba (that walking enemies) … … 136 143 gotPowerUp_ = false; 137 144 138 Vector3 scale = {1, 1, 1}; 139 this->setScale3D(scale); 140 /*if (this->hasPhysics() && this->collisionShape_ != nullptr) 141 { 142 this->collisionShape_->setScale3D(scale); 143 }*/ 144 145 // TODO: reset to old clothes of figure 146 // now, change the clothes of the Figure to red 147 std::set<WorldEntity*> attachedObjects = this->getAttachedObjects(); 148 std::set<WorldEntity*>::iterator it; 149 for (it = attachedObjects.begin(); it != attachedObjects.end(); ++it) 150 { 151 Model* FiguresModel = orxonox_cast<Model*>(*it); 152 if (FiguresModel != nullptr) 153 { 154 std::string name = "orxo_material"; 155 FiguresModel->setMaterial(name); 156 } 157 } 145 158 gumba->destroyLater(); 146 159 gumba->hasCollided_ = true; … … 269 282 270 283 //If player hits space and collides against an object under him then jump 271 if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 7.75 && collDisZ_ <+ 8.25)) { 284 if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) { 285 //if (inputAllowed && firePressed_ && isColliding_ ) { 286 272 287 gravityAcceleration_ = 100.0; 273 288 velocity.z = 110; -
code/branches/SOBv2_HS17/src/orxonox/graphics/Model.cc
r11080 r11517 40 40 #include "graphics/MeshLodInformation.h" 41 41 #include "Level.h" 42 42 43 43 44 namespace orxonox … … 155 156 this->mesh_.setMaterial(this->materialName_); 156 157 } 158 157 159 158 160 void Model::changedShadows()
Note: See TracChangeset
for help on using the changeset viewer.