- Timestamp:
- Jun 3, 2012, 6:05:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc
r9271 r9272 17 17 { 18 18 CreateFactory(Tower); 19 19 20 20 /** 21 22 23 21 @brief 22 Constructor. Registers and initializes the object. 23 */ 24 24 Tower::Tower(BaseObject* creator) : Pawn(creator) 25 25 { … … 34 34 this->delay_ = false; 35 35 this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this))); 36 36 */ 37 37 } 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 38 39 void Tower::setOrientation(const Quaternion& orientation) 40 { 41 static int ori; 42 orxout() << "orientation " << ++ori << endl; 43 } 44 45 void Tower::rotateYaw(const Vector2& value) 46 { 47 static int yaw; 48 orxout() << "rotateYaw " << ++yaw << endl; 49 } 50 51 void Tower::rotatePitch(const Vector2& value) 52 { 53 static int pitch; 54 orxout() << "rotatePitch " << ++pitch << endl; 55 } 56 57 void Tower::rotateRoll(const Vector2& value) 58 { 59 static int roll; 60 orxout() << "rotateRoll" << ++roll << endl; 61 } 62 63 // This function is called whenever a player presses the up or the down key. 64 64 // You have to implement what happens when the up or the down key is pressed. 65 65 // value.x < 0 means: down key is pressed. … … 75 75 76 76 /** 77 78 79 80 81 82 77 @brief 78 Overloaded the function to rotate the stone. 79 @param value 80 A vector whose first component is the angle by which to rotate. 81 */ 82 /* 83 83 void Tower::moveFrontBack(const Vector2& value) 84 84 { 85 85 //orxout() << "frontBack.x: " << value.x << endl; 86 86 } 87 88 87 */ 88 89 89 /** 90 91 92 93 94 95 90 @brief 91 Overloaded the function to steer the stone right and left 92 @param value 93 A vector whose first component is the direction in which we want to steer the stone. 94 */ 95 /* 96 96 void Tower::moveRightLeft(const Vector2& value) 97 97 { 98 99 98 //orxout() << "rightLeft.x: " << value.x << endl; 99 100 100 if(!this->delay_) 101 101 { … … 104 104 if(!this->tetris_->isValidMove(this, newPos)) 105 105 return; 106 106 107 107 this->setPosition(newPos); 108 108 this->delay_ = true; 109 109 this->delayTimer_.startTimer(); 110 110 } 111 111 } 112 112 */ 113 113 }
Note: See TracChangeset
for help on using the changeset viewer.