- Timestamp:
- Nov 7, 2018, 11:42:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.cc
r12062 r12089 83 83 Wall on the right side (1) or on top (2) of this square, 0-1 84 84 */ 85 void OrxoKartTile::init(int x, int y, int cellSize, int cellHeight, int orientation)85 void OrxoKartTile::init(int x, int z, int s, int type) 86 86 { 87 model_ = new Model(this->getContext()); 88 if (type == 1) { 89 model_->setMeshSource("OrxoKartStreckenabschnitt.mesh"); 90 } 91 else if (type == 2 ) { 92 model_->setMeshSource("OrxoKartStreckenabschnittZiel.mesh"); 93 } 94 model_->setScale3D(Vector3(s*1.0f, 8.0f, s*1.0f)); 95 model_->setPosition(Vector3(x*1.0f, 0.0f, z*1.0f)); 96 97 this->attach(model_); 98 99 cs_ = new BoxCollisionShape(this->getContext()); 100 cs_->setHalfExtents(Vector3(s/2.0f, 1.0f, s/2.0f)); 101 cs_->setPosition(Vector3(x*1.0f, -1.0f, z*1.0f)); 102 103 this->attachCollisionShape(cs_); 104 105 /* 106 87 107 int xSize_, zSize_, xPos_, zPos_; 88 108 … … 113 133 114 134 this->attachCollisionShape(cs_); 135 */ 115 136 } 116 137 }
Note: See TracChangeset
for help on using the changeset viewer.