Changeset 8381 for code/branches/pickup/src
- Timestamp:
- May 2, 2011, 3:58:10 PM (14 years ago)
- Location:
- code/branches/pickup/src/modules/pickup/items
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup/src/modules/pickup/items/ShrinkPickup.cc
r8375 r8381 7 7 #include "pickup/PickupIdentifier.h" 8 8 #include "worldentities/pawns/Pawn.h" 9 10 #include "weaponsystem/WeaponSlot.h" 11 #include "weaponsystem/Weapon.h" 9 12 10 13 namespace orxonox … … 40 43 41 44 COUT(0) << "shrinking..." << endl; 45 //this->pawn->setScale3D(this->pawn->getScale3D() / 2.0); 42 46 std::set<WorldEntity*> set = this->pawn->getAttachedObjects(); 43 47 for(std::set<WorldEntity*>::iterator it = set.begin(); it != set.end(); it++) 44 48 { 45 49 (*it)->setScale((*it)->getScale() / 5.0); 50 (*it)->setPosition((*it)->getPosition() / 5.0); 46 51 } 52 47 53 durationTimer.setTimer(10, false, createExecutor(createFunctor(&ShrinkPickup::terminate, this))); 48 54 } … … 55 61 void ShrinkPickup::terminate(void) 56 62 { 63 //this->pawn->setScale3D(this->pawn->getScale3D() * 5.0); 64 57 65 std::set<WorldEntity*> set = this->pawn->getAttachedObjects(); 58 66 for(std::set<WorldEntity*>::iterator it = set.begin(); it != set.end(); it++) -
code/branches/pickup/src/modules/pickup/items/ShrinkPickup.h
r8375 r8381 5 5 6 6 #include <string> 7 #include <vector> 7 8 8 9 #include "pickup/Pickup.h" … … 27 28 private: 28 29 void initialize(void); 29 Pawn* carrierToPawnHelper(void); 30 const float duration; //determines how long the pickup will be active 31 const float shrinkFactor; //shrink factor of the space ship 32 const float shrinkDelay; //how long it takes to shrink to the final size 33 double factorPerCall; 34 bool isTerminating; 35 vector<float> defaultScales; 36 vector<float> smallScales; 37 vector<float> actualScales; 38 vector<float> defaultPositions; 39 vector<float> smallPositions; 40 vector<float> actualPositions; 41 Pawn* carrierToPawnHelper(void); 30 42 Pawn* pawn; 31 43 Timer durationTimer;
Note: See TracChangeset
for help on using the changeset viewer.