Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 5:22:59 PM (9 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/HoverFlag.cc

    r11030 r11040  
    6464        Y-Coordinate of the flage, 0-9, origin is bottom left
    6565    */
    66     HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate) : StaticEntity(context)
     66    HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate, int cellSize) : StaticEntity(context)
    6767    {
    6868        RegisterObject(HoverFlag);
     
    7474        model_->setMeshSource("ss_flag_eu.mesh");
    7575        model_->setScale3D(Vector3(5, 5, 5));
    76         model_->setPosition(Vector3(xCoordinate*100.0f + 50.0f,10.0f,yCoordinate*100.0f + 50.0f));
     76        model_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,10.0f,yCoordinate*cellSize*1.0f + cellSize/2));
    7777
    7878        this->attach(model_);
     
    8484        cs_ = new BoxCollisionShape(context);
    8585        cs_->setHalfExtents(Vector3(5, 5, 5));
    86         cs_->setPosition(Vector3(xCoordinate*100.0f + 50.0f,0.0f,yCoordinate*100.0f + 50.0f));
     86        cs_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,0.0f,yCoordinate*cellSize*1.0f + cellSize/2));
    8787
    8888        this->attachCollisionShape(cs_);
Note: See TracChangeset for help on using the changeset viewer.