Changeset 10760 for code/branches/hoverHS15
- Timestamp:
- Nov 2, 2015, 6:01:56 PM (9 years ago)
- Location:
- code/branches/hoverHS15
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hoverHS15/data/levels/Hover.oxw
r10751 r10760 14 14 <?lua 15 15 include("templates/spaceshipPirate.oxt") 16 include("templates/spaceshipHover.oxt") 16 17 ?> 17 18 … … 75 76 76 77 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 77 <SpawnPoint team=0 position="0,100,0" lookat="100,100,0" spawnclass= SpaceShip pawndesign=spaceshippirate/>78 <SpawnPoint team=0 position="0,100,0" lookat="100,100,0" spawnclass=HoverShip pawndesign=spaceshiphover /> 78 79 79 80 </Scene> -
code/branches/hoverHS15/src/modules/hover/Hover.cc
r10751 r10760 56 56 SUPER(Hover, tick, dt); 57 57 58 if(firstTick){ 58 if(firstTick) 59 { 59 60 firstTick = false; 60 61 new HoverWall(origin_->getContext(), 1, 2); 62 new HoverWall(origin_->getContext(), 2, 6); 61 63 } 62 64 -
code/branches/hoverHS15/src/modules/hover/HoverShip.cc
r10694 r10760 49 49 } 50 50 51 void HoverShip::moveFrontBack(const Vector2& value)51 /*void HoverShip::moveFrontBack(const Vector2& value) 52 52 { this->steering_.z -= value.x; } 53 53 … … 60 60 void HoverShip::rotateYaw(const Vector2& value) {} 61 61 void HoverShip::rotatePitch(const Vector2& value) {} 62 void HoverShip::rotateRoll(const Vector2& value) {} 62 void HoverShip::rotateRoll(const Vector2& value) {}*/ 63 63 64 bool HoverShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)64 bool HoverShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) 65 65 { 66 orxout() << "collision" << endl; 67 66 68 /*if (contactPoint.m_normalWorldOnB.y() > 0.6) 67 69 this->isFloor_ = true; -
code/branches/hoverHS15/src/modules/hover/HoverShip.h
r10694 r10760 53 53 virtual void tick(float dt); 54 54 55 virtual void moveFrontBack(const Vector2& value);55 /*virtual void moveFrontBack(const Vector2& value); 56 56 57 57 virtual void moveRightLeft(const Vector2& value); … … 63 63 virtual void rotatePitch(const Vector2& value); 64 64 65 virtual void rotateRoll(const Vector2& value); 65 virtual void rotateRoll(const Vector2& value);*/ 66 66 67 virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);67 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint); 68 68 69 69 virtual void boost(bool bBoost); -
code/branches/hoverHS15/src/modules/hover/HoverWall.cc
r10751 r10760 50 50 { 51 51 RegisterObject(HoverWall); 52 model_ = new Model(context); 53 cs_ = new BoxCollisionShape(context); 54 model_->setMeshSource("cube.mesh"); 55 model_->setScale3D(Vector3(100, 30, 2)); 56 model_->setPosition(Vector3(100,0,100)); 57 cs_->setPosition(Vector3(100,0,100)); 58 cs_->setHalfExtents(Vector3(100, 30, 2)); 59 60 61 52 model_ = NULL; 53 cs_ = NULL; 62 54 } 63 55 … … 65 57 { 66 58 RegisterObject(HoverWall); 59 67 60 model_ = new Model(context); 61 model_->setMeshSource("cube.mesh"); 62 model_->setScale3D(Vector3(100, 30, 2)); 63 model_->setPosition(Vector3(x*100-50,0,y*100-50)); 64 65 this->attach(model_); 66 67 this->enableCollisionCallback(); 68 this->setCollisionResponse(true); 69 this->setCollisionType(Static); 70 68 71 cs_ = new BoxCollisionShape(context); 69 model_->setMeshSource("cube.mesh"); 70 model_->setScale3D(Vector3(50, 30, 2)); 71 model_->setPosition(Vector3(x*100-50,0,y*100-50)); 72 cs_->setHalfExtents(Vector3(100, 30, 2)); 72 73 cs_->setPosition(Vector3(x*100-50,0,y*100-50)); 73 cs_->setHalfExtents(Vector3(50, 30, 2));74 74 75 76 75 this->attachCollisionShape(cs_); 77 76 } 78 77 -
code/branches/hoverHS15/src/modules/invader/InvaderShip.cc
r10624 r10760 139 139 isFireing = bBoost; 140 140 } 141 inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)141 inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) 142 142 { 143 143 // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint; -
code/branches/hoverHS15/src/modules/invader/InvaderShip.h
r10624 r10760 65 65 virtual void updateLevel(); 66 66 67 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);67 virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint); 68 68 69 69 protected:
Note: See TracChangeset
for help on using the changeset viewer.