Changeset 12292
- Timestamp:
- Apr 11, 2019, 2:08:28 PM (6 years ago)
- Location:
- code/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/data/levels/BumpMap.oxw
r12290 r12292 60 60 <Model position="0, 12,0" yaw="90" pitch="-90" roll="0" scale="10" mesh="Cube_Lava_V2.mesh" /> 61 61 <Model position="0, -12,0" yaw="90" pitch="-90" roll="0" scale="10" mesh="Cube_Lava_V2_Normal.mesh" /> 62 63 62 --> 64 65 s<MovableEntity position="0,0,40" rotationrate="30" rotationaxis="1,0,1">66 <attached>67 <Model position="0, 0,0" yaw="90" pitch="-90" roll="0" scale="10" mesh="Gravestone.mesh" />68 </attached>69 </MovableEntity>70 63 71 64 <MovableEntity position="0,0,40" rotationrate="30" rotationaxis="1,0,1"> -
code/trunk/data/levels/templates/spaceshipHover.oxt
r12290 r12292 22 22 rotationThrust = 25 23 23 24 jumpBoost = 18024 jumpBoost = 90 25 25 26 26 lift = 1; -
code/trunk/src/modules/hover/Hover.cc
r12290 r12292 53 53 54 54 this->setHUDTemplate("HoverHUD"); 55 56 55 } 57 56 … … 113 112 } 114 113 numberOfFlags_ = flags_.size(); 115 116 114 } 117 115 } -
code/trunk/src/modules/hover/HoverShip.cc
r12290 r12292 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" 35 #include "graphics/Camera.h"36 35 37 36 #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h> … … 46 45 enableCollisionCallback(); 47 46 isFloor_ = false; 48 jumpBoost_ = 0; 47 jumpBoost_ = 0; 49 48 } 50 49 51 50 void HoverShip::moveFrontBack(const Vector2& value) 52 { this->steering_.z -= value.x; 53 Vector3 currentPosition = this->getPosition(); 54 currentPosition.y -= 2*value.y; 55 this->setPosition(currentPosition); 56 } 51 { this->steering_.z -= value.x; } 57 52 58 53 void HoverShip::moveRightLeft(const Vector2& value) 59 { 60 this->steering_.x += value.x; 61 Vector3 currentPosition = this->getPosition(); 62 currentPosition.x -= 2*value.x; 63 this->setPosition(currentPosition); 64 } 54 { this->steering_.x += value.x; } 65 55 66 56 void HoverShip::moveUpDown(const Vector2& value) 67 { 68 this->steering_.y += value.x; 69 this->setPosition(Vector3(0, 0, 0)); 70 } 57 { this->steering_.y += value.x; } 71 58 72 59 void HoverShip::rotateYaw(const Vector2& value) … … 82 69 83 70 XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode); 84 }85 86 void HoverShip::tick(float dt)87 {88 SUPER(HoverShip, tick, dt);89 //Execute movement90 if (this->hasLocalController())91 {92 // Camera93 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 }101 71 } 102 72 -
code/trunk/src/modules/hover/HoverShip.h
r12290 r12292 69 69 virtual void boost(bool bBoost) override; 70 70 71 virtual void tick(float dt) override;72 73 71 private: 74 72 float jumpBoost_;
Note: See TracChangeset
for help on using the changeset viewer.