Changeset 10785 for code/branches/hoverHS15/src
- Timestamp:
- Nov 9, 2015, 2:14:47 PM (9 years ago)
- Location:
- code/branches/hoverHS15/src/modules/hover
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hoverHS15/src/modules/hover/Hover.cc
r10760 r10785 59 59 { 60 60 firstTick = false; 61 new HoverWall(origin_->getContext(), 1, 2 );62 new HoverWall(origin_->getContext(), 2, 6 );61 new HoverWall(origin_->getContext(), 1, 2, 1); 62 new HoverWall(origin_->getContext(), 2, 6, 1); 63 63 } 64 64 -
code/branches/hoverHS15/src/modules/hover/HoverWall.cc
r10760 r10785 54 54 } 55 55 56 HoverWall::HoverWall(Context* context, int x, int y ) : StaticEntity(context)56 HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context) 57 57 { 58 58 RegisterObject(HoverWall); 59 59 60 int xSize_, zSize_, xPos_, zPos_; 61 62 if(orientation == 1){ 63 xSize_ = 50; 64 zSize_ = 2; 65 xPos_ = x*100; 66 zPos_ = y*100-50; 67 } 68 else{ 69 xSize_ = 2; 70 zSize_ = 50; 71 xPos_ = x*100-50; 72 zPos_ = y*100; 73 } 74 75 60 76 model_ = new Model(context); 61 77 model_->setMeshSource("cube.mesh"); 62 model_->setScale3D(Vector3( 100, 30, 2));63 model_->setPosition(Vector3(x *100-50,0,y*100-50));78 model_->setScale3D(Vector3(xSize_, 30, zSize_)); 79 model_->setPosition(Vector3(xPos_,0,zPos_)); 64 80 65 81 this->attach(model_); … … 70 86 71 87 cs_ = new BoxCollisionShape(context); 72 cs_->setHalfExtents(Vector3( 100, 30, 2));73 cs_->setPosition(Vector3(x *100-50,0,y*100-50));88 cs_->setHalfExtents(Vector3(xSize_, 30, zSize_)); 89 cs_->setPosition(Vector3(xPos_,0,zPos_)); 74 90 75 91 this->attachCollisionShape(cs_); -
code/branches/hoverHS15/src/modules/hover/HoverWall.h
r10751 r10785 49 49 public: 50 50 HoverWall(Context* context); 51 HoverWall(Context* context, int x, int y );51 HoverWall(Context* context, int x, int y, int orientation); 52 52 virtual ~HoverWall(); 53 53 virtual void tick(float dt);
Note: See TracChangeset
for help on using the changeset viewer.