Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 5:22:59 PM (8 years ago)
Author:
landauf
Message:

hover: maze size is now fully configurable in xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/HoverWall.cc

    r11030 r11040  
    6565            Wall on the right side (1) or on top (2) of this square, 0-1       
    6666    */
    67     HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context)
     67    HoverWall::HoverWall(Context* context, int x, int y, int cellSize, int cellHeight, int orientation) : StaticEntity(context)
    6868    {
    6969        RegisterObject(HoverWall);
     
    7272
    7373        if(orientation == 1){
    74             xSize_ = 50;
     74            xSize_ = cellSize/2;
    7575            zSize_ = 2;
    76             zPos_ = x*100;
    77             xPos_ = y*100 -50;
     76            zPos_ = x*cellSize;
     77            xPos_ = y*cellSize-cellSize/2;
    7878        }
    7979        else{
    8080            xSize_ = 2;
    81             zSize_ = 50;
    82             zPos_ = x*100-50;
    83             xPos_ = y*100;
     81            zSize_ = cellSize/2;
     82            zPos_ = x*cellSize-cellSize/2;
     83            xPos_ = y*cellSize;
    8484        }
    8585
     
    8787        model_ = new Model(context);
    8888        model_->setMeshSource("CuboidBody.mesh");
    89         model_->setScale3D(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));
     89        model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
    9090        model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
    9191
     
    9797
    9898        cs_ = new BoxCollisionShape(context);
    99         cs_->setHalfExtents(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));
     99        cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
    100100        cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
    101101
Note: See TracChangeset for help on using the changeset viewer.