Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10698 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Jun 14, 2007, 5:33:43 PM (18 years ago)
Author:
snellen
Message:

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

Location:
trunk/src/util
Files:
7 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/util/Makefile.am

    r10618 r10698  
    2626                        animation/animation_player.cc \
    2727                        \
    28                         track/track.cc
     28                        track/track.cc \
     29                        track/action_box.cc
    2930
    3031noinst_HEADERS =        \
     
    4950                        animation/t_animation.h \
    5051                        \
    51                         track/track.h
     52                        track/track.h \
     53                        track/action_box.h
  • trunk/src/util/hud.cc

    r10516 r10698  
    1111   ### File Specific:
    1212   main-programmer: Benjamin Grauer
    13    co-programmer: ...
     13   co-programmer: Benjamin Knecht
    1414*/
    1515
     
    5252  this->energyWidget = NULL;
    5353  this->shieldWidget = NULL;
    54   this->armorWidget = NULL;
    55   //this->leftRect = NULL;
    56   //this->rightRect = NULL;
     54  this->healthWidget = NULL;
     55  this->leftRect = NULL;
     56  this->rightRect = NULL;
    5757  this->resX = 1;
    5858  this->resY = 1;
     
    6262  this->rightRect = new OrxGui::GLGuiImage();
    6363  this->leftRect = new OrxGui::GLGuiImage();
     64  this->topRect = new OrxGui::GLGuiImage();
     65  this->bottomRect = new OrxGui::GLGuiImage();
     66  this->middleRect = new OrxGui::GLGuiImage();
    6467
    6568  this->inputLine = new OrxGui::GLGuiInputLine();
    66   this->inputLine->setParent2D(this);
     69  //this->inputLine->setParent2D(this);
    6770  this->notifier = new OrxGui::GLGuiNotifier();
    68   this->notifier->setParent2D(this);
    69   notifier->setAbsCoor2D(100,100);
     71  this->notifier->setParent2D(this->bottomRect);
     72  notifier->setRelCoor2D(5,5);
     73 
     74  this->barSocket = new OrxGui::GLGuiImage();
     75  this->barSocket->setParent2D(this->bottomRect);
    7076
    7177  this->_radar = new OrxGui::GLGuiRadar();
     
    8894
    8995  delete this->_radar;
     96  delete this->barSocket;
    9097  delete this->rightRect;
    9198  delete this->leftRect;
     99  delete this->topRect;
     100  delete this->bottomRect;
     101  delete this->middleRect;
     102
    92103  //if (this->shipValuesBox != NULL)
    93104    //delete this->shipValuesBox;
     
    135146  }
    136147
    137   this->updateResolution();
    138 }
    139 
    140 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget)
     148  this->updateResolution(); 
     149}
     150
     151void Hud::setShieldWidget(OrxGui::GLGuiWidget* widget)
    141152{
    142153  /*
     
    169180}
    170181
    171 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget)
    172 {
    173   /*
    174   if (this->shipValuesBox == NULL)
    175     this->createShipValuesBox();
    176   */
    177 
    178 // decopple old widget
    179   if (this->armorWidget != NULL)
    180   {
    181     this->armorWidget->hide();
    182   }
    183 
    184   this->armorWidget = widget;
    185   if (this->armorWidget != NULL)
    186   {
    187     //this->armorWidget->shiftDir2D(270);
    188     //this->shipValuesBox->pack(this->armorWidget);
    189     //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->armorWidget)->setStandardSettings();
    190     this->armorWidget->setParent2D(this->leftRect);
    191     dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->armorWidget)->setDisplayedImage("textures/gui/gui_health_icon.png");
    192     this->armorWidget->show();
    193     /*    this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
    194         this->armorWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
     182void Hud::setHealthWidget(OrxGui::GLGuiWidget* widget)
     183{
     184        if( this->playmode == FirstPerson )
     185        {
     186                this->healthWidget = new OrxGui::GLGuiBar();
     187                dynamic_cast<OrxGui::GLGuiBar*> (this->healthWidget)->setMaximum(dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (widget)->getBarWidget()->maximum());
     188                dynamic_cast<OrxGui::GLGuiBar*> (this->healthWidget)->setValue(dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (widget)->getBarWidget()->value());
     189                this->healthWidget->setParent2D(this->barSocket);
     190        }
     191        else
     192        {
     193          /*
     194          if (this->shipValuesBox == NULL)
     195            this->createShipValuesBox();
     196          */
     197       
     198        // decopple old widget
     199          if (this->healthWidget != NULL)
     200          {
     201            this->healthWidget->hide();
     202          }
     203       
     204          this->healthWidget = widget;
     205          if (this->healthWidget != NULL)
     206          {
     207            //this->healthWidget->shiftDir2D(270);
     208            //this->shipValuesBox->pack(this->healthWidget);
     209            //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->healthWidget)->setStandardSettings();
     210            this->healthWidget->setParent2D(this->leftRect);
     211            //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->healthWidget)->setDisplayedImage("textures/gui/gui_health_icon.png");
     212            this->healthWidget->show();
     213            /*    this->healthWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     214                this->healthWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
     215          }
     216        }
     217
     218  this->updateResolution();
     219}
     220
     221
     222void Hud::setImplantWidget(OrxGui::GLGuiWidget* widget)
     223{
     224  //if (this->shipValuesBox == NULL)
     225    //this->createShipValuesBox();
     226
     227  // decopple old widget
     228  if (this->implantWidget != NULL)
     229  {
     230    this->implantWidget->hide();
     231  }
     232
     233  this->implantWidget = widget;
     234  if (this->implantWidget != NULL)
     235  {
     236    //this->energyWidget->shiftDir2D(270);
     237    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
     238    //this->shipValuesBox->pack(this->energyWidget);
     239    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setStandardSettings();
     240    this->implantWidget->setParent2D(this->leftRect);
     241    dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->implantWidget)->setDisplayedImage("textures/gui/gui_electronics_icon.png");
     242    this->implantWidget->show();
     243    /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     244        this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
    195245  }
    196246
     
    341391
    342392  this->setSize2D(.2 * this->resX, this->resY);
    343   this->notifier->setAbsCoor2D(0.7 * this->resX, 0.3 * this->resY);
    344   this->notifier->setWidgetSize(0.25 * this->resX, 0.6 * this->resY);
     393  if( this->playmode != FirstPerson )
     394  {
     395          this->notifier->setAbsCoor2D(0.7 * this->resX, 0.3 * this->resY);
     396          this->notifier->setWidgetSize(0.25 * this->resX, 0.6 * this->resY);
     397  }
    345398
    346399  int overlayWidth = 0;
     
    348401    overlayWidth = this->resX * (overlayPercentage)/(200);
    349402  else
    350     overlayWidth = this->resX * 0.1;
     403    overlayWidth = this->resX / 10; // fixed warning!
    351404  //if (overlayWidth < 100)
    352405    //overlayWidth = 100;
     
    354407  this->rightRect->hide();
    355408  this->leftRect->hide();
    356 
    357   this->leftRect->setParent2D(this);
    358   this->leftRect->setWidgetSize(float(overlayWidth), float(this->resY));
    359   this->leftRect->setAbsCoor2D(0,0);
    360   this->leftRect->setBackgroundTexture(Texture());
    361   this->leftRect->setBackgroundColor(Color(0,0,0.7,0.2));
    362   this->leftRect->setForegroundTexture(Texture());
    363   this->leftRect->setForegroundColor(Color(0,0,0,0));
    364 
    365   this->rightRect->setParent2D(this);
    366   this->rightRect->setWidgetSize(float(overlayWidth), float(this->resY));
    367   this->rightRect->setAbsCoor2D(this->resX - overlayWidth,0);
    368   this->rightRect->setBackgroundTexture(Texture());
    369   this->rightRect->setBackgroundColor(Color(0,0,0.7,0.2));
    370   this->rightRect->setForegroundTexture(Texture());
    371   this->rightRect->setForegroundColor(Color(0,0,0,0));
    372 
     409 
     410  if( this->playmode != FirstPerson )
     411  {
     412          this->leftRect->setParent2D(this);
     413          this->leftRect->setWidgetSize(float(overlayWidth), float(this->resY));
     414          this->leftRect->setAbsCoor2D(0,0);
     415          this->leftRect->setBackgroundTexture(Texture());
     416          this->leftRect->setBackgroundColor(Color(0,0,0.7,0.2));
     417          this->leftRect->setForegroundTexture(Texture());
     418          this->leftRect->setForegroundColor(Color(0,0,0,0));
     419       
     420          this->rightRect->setParent2D(this);
     421          this->rightRect->setWidgetSize(float(overlayWidth), float(this->resY));
     422          this->rightRect->setAbsCoor2D(this->resX - overlayWidth,0);
     423          this->rightRect->setBackgroundTexture(Texture());
     424          this->rightRect->setBackgroundColor(Color(0,0,0.7,0.2));
     425          this->rightRect->setForegroundTexture(Texture());
     426          this->rightRect->setForegroundColor(Color(0,0,0,0));
     427  }
     428  else
     429  {
     430          this->bottomRect->setParent2D(this);
     431          this->bottomRect->setWidgetSize(float(this->resX), float(overlayWidth));
     432          this->bottomRect->setAbsCoor2D(0, this->resY - overlayWidth);
     433          this->topRect->setParent2D(this);
     434          this->topRect->setWidgetSize(float(this->resX), float(overlayWidth));
     435          this->topRect->setAbsCoor2D(0, 0);
     436          this->middleRect->setParent2D(this);
     437          this->middleRect->setWidgetSize(float(this->resY)/2, float(this->resY)/2);
     438          this->middleRect->setAbsCoor2D(float(this->resX - this->resY/2)/2, float(this->resY)/4);
     439  }
    373440
    374441  if (this->overlayActive == true)
     
    382449  {
    383450    PRINTF(4)("UPDATING RADAR\n");
    384     this->_radar->setParent2D(this->leftRect);
     451    if( this->playmode != FirstPerson )
     452        this->_radar->setParent2D(this->leftRect);
     453    else
     454        this->_radar->setParent2D(this->topRect);
    385455    if (radarCenterNode == NULL)
    386456      this->_radar->setCenterNode(State::getPlayer()->getPlayable());
     
    397467   
    398468    int statWidgetsNumber = 0;
    399     float expectedArmorSizeX = 0;
    400     float expectedArmorSizeY = 0;
     469    float expectedHealthSizeX = 0;
     470    float expectedHealthSizeY = 0;
    401471    float newSizeY = 0; float newSizeX = 0;
    402472    float moduloWidth = 0;
    403473
    404     if (this->armorWidget != NULL)
    405     {
    406       expectedArmorSizeX = 150;
    407       expectedArmorSizeY = 50;
    408       statWidgetsNumber++;
    409     }
    410 
     474        if( this->playmode != FirstPerson )
     475        {
     476            if (this->healthWidget != NULL)
     477            {
     478              expectedHealthSizeX = 150;
     479              expectedHealthSizeY = 50;
     480              statWidgetsNumber++;
     481            }
     482
     483            if (this->shieldWidget != NULL)
     484              statWidgetsNumber++;
     485           
     486            if (this->energyWidget != NULL)
     487              statWidgetsNumber++;
     488       
     489            if (expectedHealthSizeY * statWidgetsNumber > overlayWidth)
     490            {
     491              newSizeY = overlayWidth / float(statWidgetsNumber);
     492              newSizeX = expectedHealthSizeX;
     493              PRINTF(0)("Statwidgets resized\n");
     494            }
     495            else
     496            {
     497              newSizeY = expectedHealthSizeY;
     498              newSizeX = expectedHealthSizeX;
     499              moduloWidth = int(overlayWidth) % int(expectedHealthSizeY * statWidgetsNumber);
     500            }
     501       
     502            float posY = overlayWidth + newSizeX;
     503       
     504            if (this->healthWidget != NULL)
     505            {
     506              this->healthWidget->setSize2D(newSizeX, newSizeY);
     507              this->healthWidget->setRelCoor2D((statWidgetsNumber - 1) * newSizeY + 3 * moduloWidth / (statWidgetsNumber + 1),posY);
     508            }
     509            if (this->shieldWidget != NULL)
     510            {
     511              this->shieldWidget->setSize2D(newSizeX, newSizeY);
     512              this->shieldWidget->setRelCoor2D((statWidgetsNumber - 2) * newSizeY + 2 *moduloWidth / (statWidgetsNumber + 1),posY);
     513            }
     514            if (this->energyWidget != NULL)
     515            {
     516              this->energyWidget->setSize2D(newSizeX, newSizeY);
     517              this->energyWidget->setRelCoor2D(moduloWidth / (statWidgetsNumber + 1),posY);
     518            }
     519        }
     520        else
     521        {
     522                this->barSocket->setParent2D(this->bottomRect);
     523                this->barSocket->setWidgetSize( float(overlayWidth), float(overlayWidth));
     524                this->barSocket->setRelCoor2D(0,this->resX - float(overlayWidth));
     525               
     526                this->healthWidget->setRelCoor2D(10,-20);
     527        }
     528       
     529
     530    /*
     531    if (this->healthWidget != NULL)
     532      this->healthWidget->setRelCoor2D(100,0.2*this->resY + this->healthWidget->getSizeX2D());
    411533    if (this->shieldWidget != NULL)
    412       statWidgetsNumber++;
    413    
     534      this->shieldWidget->setRelCoor2D(60,0.2*this->resY + this->healthWidget->getSizeX2D());
    414535    if (this->energyWidget != NULL)
    415       statWidgetsNumber++;
    416 
    417     if (expectedArmorSizeY * statWidgetsNumber > overlayWidth)
    418     {
    419       newSizeY = overlayWidth / float(statWidgetsNumber);
    420       newSizeX = expectedArmorSizeX;
    421       PRINTF(0)("Statwidgets resized\n");
    422     }
    423     else
    424     {
    425       newSizeY = expectedArmorSizeY;
    426       newSizeX = expectedArmorSizeX;
    427       moduloWidth = int(overlayWidth) % int(expectedArmorSizeY * statWidgetsNumber);
    428     }
    429 
    430     float posY = overlayWidth + newSizeX;
    431 
    432     if (this->armorWidget != NULL)
    433     {
    434       this->armorWidget->setSize2D(newSizeX, newSizeY);
    435       this->armorWidget->setRelCoor2D((statWidgetsNumber - 1) * newSizeY + 3 * moduloWidth / (statWidgetsNumber + 1),posY);
    436     }
    437     if (this->shieldWidget != NULL)
    438     {
    439       this->shieldWidget->setSize2D(newSizeX, newSizeY);
    440       this->shieldWidget->setRelCoor2D((statWidgetsNumber - 2) * newSizeY + 2 *moduloWidth / (statWidgetsNumber + 1),posY);
    441     }
    442     if (this->energyWidget != NULL)
    443     {
    444       this->energyWidget->setSize2D(newSizeX, newSizeY);
    445       this->energyWidget->setRelCoor2D(moduloWidth / (statWidgetsNumber + 1),posY);
    446     }
    447 
    448     /*
    449     if (this->armorWidget != NULL)
    450       this->armorWidget->setRelCoor2D(100,0.2*this->resY + this->armorWidget->getSizeX2D());
    451     if (this->shieldWidget != NULL)
    452       this->shieldWidget->setRelCoor2D(60,0.2*this->resY + this->armorWidget->getSizeX2D());
    453     if (this->energyWidget != NULL)
    454       this->energyWidget->setRelCoor2D(20,0.2*this->resY + this->armorWidget->getSizeX2D());
     536      this->energyWidget->setRelCoor2D(20,0.2*this->resY + this->healthWidget->getSizeX2D());
    455537    */
    456     //this->shieldWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D(),0);
    457     //this->energyWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D() + this->shieldWidget->getSizeX2D(),0);
     538    //this->shieldWidget->setRelCoor2D(0.1*this->resX + this->healthWidget->getSizeX2D(),0);
     539    //this->energyWidget->setRelCoor2D(0.1*this->resX + this->healthWidget->getSizeX2D() + this->shieldWidget->getSizeX2D(),0);
    458540  }
    459541
  • trunk/src/util/hud.h

    r10368 r10698  
    2828
    2929public:
     30
     31  typedef enum {
     32    Vertical         =  1,       //!< Vertical (seen from left or right/move in x-z)
     33    Horizontal       =  2,       //!< Horizontal (seet from the top/move in x-y)
     34    FromBehind       =  4,       //!< Seen from behind (move in z-y)
     35    Full3D           =  8,       //!< Full featured 3D-mode. (move in all directions x-y-z)
     36    FirstPerson      = 16,
     37
     38    PlaymodeCount    =  5,
     39  } Playmode;
     40 
    3041  Hud();
    3142  virtual ~Hud();
     
    3647  void notifyUser(const std::string& message);
    3748
     49  inline void setMode(Hud::Playmode playmode) {this->playmode = playmode;};
     50  inline Hud::Playmode getMode() {return this->playmode;};
    3851
    3952  void setBackGround();
    4053  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
    41   void setShiledWidget(OrxGui::GLGuiWidget* widget);
    42   void setArmorWidget(OrxGui::GLGuiWidget* widget);
     54  void setShieldWidget(OrxGui::GLGuiWidget* widget);
     55  void setHealthWidget(OrxGui::GLGuiWidget* widget);
     56  void setImplantWidget(OrxGui::GLGuiWidget* widget);
     57
    4358  inline OrxGui::GLGuiWidget* getEnergyWidget() {return this->energyWidget;};
    4459  inline OrxGui::GLGuiWidget* getShieldWidget() {return this->shieldWidget;};
    45   inline OrxGui::GLGuiWidget* getArmorWidget() {return this->armorWidget;};
     60  inline OrxGui::GLGuiWidget* getHealthWidget() {return this->healthWidget;};
     61  inline OrxGui::GLGuiWidget* getImplantWidget() {return this->implantWidget;};
    4662
    4763  void setWeaponManager(WeaponManager* weaponMan, WeaponManager* weaponManSec = NULL);
     
    8298  unsigned int             resX;
    8399  unsigned int             resY;
     100 
     101  Hud::Playmode                         playmode;
    84102
    85103  float                    travelZoneWidth; //the percentage of the screen, the player has got for his movements. should always be a value between 0 and 1;
     
    87105  OrxGui::GLGuiWidget*     energyWidget;
    88106  OrxGui::GLGuiWidget*     shieldWidget;
    89   OrxGui::GLGuiWidget*     armorWidget;
     107  OrxGui::GLGuiWidget*     healthWidget;
     108  OrxGui::GLGuiWidget*     implantWidget;
    90109
    91110  OrxGui::GLGuiNotifier*   notifier;
     
    96115  OrxGui::GLGuiWidget*     rightRect;
    97116  OrxGui::GLGuiWidget*     leftRect;
     117  OrxGui::GLGuiWidget*          topRect;
     118  OrxGui::GLGuiWidget*          bottomRect;
     119  OrxGui::GLGuiWidget*          middleRect;
     120  OrxGui::GLGuiWidget*          barSocket;
    98121  bool                     overlayActive;
    99122  int                      overlayPercentage; //the percentage of the screen, the player has got for his movements. should always be a value between 0 and 1;
  • trunk/src/util/state.cc

    r10643 r10698  
    5656int State::menuID = -1;
    5757
     58ActionBox* State::actionBox = NULL;
    5859
    5960/**
  • trunk/src/util/state.h

    r10643 r10698  
    2020class CameraMan;
    2121class ScriptManager;
     22class ActionBox;
    2223
    2324
     
    130131  /** @returns the scroller-travelnode (center of the screen) */
    131132  static PNode* getTravelNode() { return State::travelNode; }
     133 
     134  /** sets the action box (this is where the fighting takes place) */
     135  static void setActionBox( ActionBox* ab ){ State::actionBox = ab; }
     136  /** @returns the action box (this is where the fighting takes place) */
     137  static ActionBox* getActionBox(){ return State::actionBox; }
    132138
    133139
     
    146152  static Player*                player;             //!< A reference to the Player
    147153  static PNode*                 travelNode;         //!< A reference to the scroller-travelnode
     154  static ActionBox*             actionBox;          //!< A reference to the action box
    148155
    149156  static SkyBox*                skyBox;            //!< The SkyBox used in the current world.
  • trunk/src/util/track/track.cc

    r10618 r10698  
    2929
    3030#include "debug.h"
     31#include "action_box.h"
    3132
    3233ObjectListDefinition(Track);
     
    6566  this->duration = 20;
    6667  this->endTime = 20;
    67   this->width = 10;
     68  this->width = 24;
     69  this->height = 18;
     70  this->depth = 200;
     71  this->stretch = 4;
    6872  this->curve = new BezierCurve();
    6973  this->trackNode = new PNode(PNode::getNullParent(), PNODE_ALL);
     
    7175  this->localTime = 0;
    7276  this->pause = false;
     77 
     78  this->actionBox = NULL;
    7379}
    7480
     
    94100     }
    95101     LOAD_PARAM_END_CYCLE(element);
     102
     103     LoadParam(root, "ActionBox", this, Track, addActionBox );
    96104}
    97105
     
    252260       {
    253261           Vector tmp = this->calcPos();
    254    
    255    
     262
     263
    256264           Vector dV = tmp - this->trackNode->getAbsCoor();
    257265           float dx = speed * dt;
    258266           float ratio = dx / dV.len();
    259    
     267
    260268           if( dt > 0.0f)
    261269           {
     
    264272           }
    265273           tmp = this->calcPos();
    266    
     274
    267275           Vector v(0.0, 1.0, 0.0);
    268276           Quaternion quat = Quaternion(this->calcDir(), v);
    269277           Quaternion q(-PI/2, v);
    270278           quat = quat * q;
    271    
     279
    272280           // move trackNode of the track
    273281           this->trackNode->shiftCoor(tmp - this->trackNode->getAbsCoor());
     
    331339    glPopMatrix();
    332340}
     341
     342/**
     343 * creates new action box and assignes it to this track
     344 * @param width_2 width/2 of near end
     345 * @param height_2 height/2 of near end
     346 * @param depth depth
     347 * @param stretch far end will be stretched with this factor
     348 */
     349void Track::addActionBox( float width_2, float height_2, float depth, float stretch )
     350{
     351  actionBox = new ActionBox( this, width_2, height_2, depth, stretch );
     352}
     353
     354
     355
  • trunk/src/util/track/track.h

    r10498 r10698  
    1212class PNode;
    1313class TiXmlElement;
     14class ActionBox;
    1415
    1516class Track : public BaseObject
     
    4243   float                 duration;             //!< The time used to cross this Track (curve).
    4344   float                 endTime;              //!< The time at which this Track ends.
    44    float                 width;                //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right.
     45   float                 width;                //!< The width of the action box, next to the player.
     46   float                 height;               //!< The Height of the action box, next to the player
     47   float                 depth;                //!< Depth of the action box
     48   float                 stretch;              //!< multiplyer between w/h at player and w/h at far end of the action box
    4549
    4650   int                   nodeCount;            //!< The count of points this Track has.
    4751   Curve*                curve;                //!< The Curve of this Track
     52   
     53   ActionBox*            getActionBox(){ return this->actionBox; }
    4854
    4955 private:
    5056   void init();
    51 
    52 
     57   
    5358 private:
    5459   CurveType            curveType;              //!< The CurveType the entire TrackSystem will have.
     
    5762   int                  mode;                   //!< Defines the behaviour of the Track.
    5863   bool                 pause;                  //!< Defines if the track runs (false) or not (true)
     64   
     65   ActionBox*           actionBox;
     66   
     67   void addActionBox( float width_2, float height_2, float depth, float stretch );
     68   
     69
    5970};
    6071
Note: See TracChangeset for help on using the changeset viewer.