Changeset 12290 for code/trunk/src
- Timestamp:
- Apr 11, 2019, 2:05:59 PM (6 years ago)
- Location:
- code/trunk/src/modules
- Files:
-
- 3 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/hover/Hover.cc
r11495 r12290 53 53 54 54 this->setHUDTemplate("HoverHUD"); 55 55 56 } 56 57 … … 112 113 } 113 114 numberOfFlags_ = flags_.size(); 115 114 116 } 115 117 } -
code/trunk/src/modules/hover/HoverShip.cc
r11495 r12290 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" 35 #include "graphics/Camera.h" 35 36 36 37 #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h> … … 45 46 enableCollisionCallback(); 46 47 isFloor_ = false; 47 jumpBoost_ = 0; 48 jumpBoost_ = 0; 48 49 } 49 50 50 51 void HoverShip::moveFrontBack(const Vector2& value) 51 { this->steering_.z -= value.x; } 52 { this->steering_.z -= value.x; 53 Vector3 currentPosition = this->getPosition(); 54 currentPosition.y -= 2*value.y; 55 this->setPosition(currentPosition); 56 } 52 57 53 58 void HoverShip::moveRightLeft(const Vector2& value) 54 { this->steering_.x += value.x; } 59 { 60 this->steering_.x += value.x; 61 Vector3 currentPosition = this->getPosition(); 62 currentPosition.x -= 2*value.x; 63 this->setPosition(currentPosition); 64 } 55 65 56 66 void HoverShip::moveUpDown(const Vector2& value) 57 { this->steering_.y += value.x; } 67 { 68 this->steering_.y += value.x; 69 this->setPosition(Vector3(0, 0, 0)); 70 } 58 71 59 72 void HoverShip::rotateYaw(const Vector2& value) … … 69 82 70 83 XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode); 84 } 85 86 void HoverShip::tick(float dt) 87 { 88 SUPER(HoverShip, tick, dt); 89 //Execute movement 90 if (this->hasLocalController()) 91 { 92 // Camera 93 Camera* camera = this->getCamera(); 94 if (camera != nullptr) 95 { 96 camera->setPosition(0,1000,0); 97 camera->setOrientation(Vector3::UNIT_X, Degree(-90)); 98 99 } 100 } 71 101 } 72 102 -
code/trunk/src/modules/hover/HoverShip.h
r11495 r12290 69 69 virtual void boost(bool bBoost) override; 70 70 71 virtual void tick(float dt) override; 72 71 73 private: 72 74 float jumpBoost_; -
code/trunk/src/modules/pacman/CMakeLists.txt
r12289 r12290 6 6 PacmanPointAfraid.cc 7 7 PacmanHUDinfo.cc 8 getShortestPath.cc9 10 8 ) 11 9 -
code/trunk/src/modules/pacman/PacmanGhost.h
r12289 r12290 58 58 bool dontmove = false; 59 59 60 61 60 private: 62 61 int decision = 0;
Note: See TracChangeset
for help on using the changeset viewer.