Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7347 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Apr 19, 2006, 1:38:23 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: some more stuff (now one can play around with them using the Shell →
GameWorld Urban Playmode …. Vertical/Full3D/Horizontal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r7346 r7347  
    2121#include "player.h"
    2222#include "state.h"
     23#include "camera.h"
     24
    2325#include "util/loading/load_param.h"
    2426
     
    251253 */
    252254void Playable::setCameraMode(unsigned int cameraMode)
    253 {}
     255{
     256  State::getCamera()->setViewMode((Camera::ViewMode)cameraMode);
     257}
    254258
    255259
     
    265269  else
    266270  {
     271    this->enterPlaymode(playmode);
    267272    this->playmode = playmode;
    268273    return true;
     
    289294 * In this function all the actions that are required to enter the Playmode are described.
    290295 * e.g: camera, rotation, wait cycle and so on...
     296 *
     297 * on enter of this function the playmode is still the old playmode.
    291298 */
    292299void Playable::enterPlaymode(Playable::Playmode playmode)
    293300{
    294 
    295 }
    296 
     301  switch(playmode)
     302  {
     303    default:
     304      this->attachCamera();
     305      break;
     306    case Playable::Horizontal:
     307      this->setCameraMode(Camera::ViewTop);
     308      break;
     309    case Playable::Vertical:
     310      this->setCameraMode(Camera::ViewLeft);
     311      break;
     312    case Playable::FromBehind:
     313      this->setCameraMode(Camera::ViewBehind);
     314      break;
     315  }
     316}
    297317/**
    298318 * @brief helps us colliding Playables
Note: See TracChangeset for help on using the changeset viewer.