Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2009, 11:26:46 AM (16 years ago)
Author:
landauf
Message:

Added "Pong" minigame

Location:
code/branches/miniprojects/src/orxonox/objects/worldentities
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/miniprojects/src/orxonox/objects/worldentities/CMakeLists.txt

    r2768 r2824  
    2020  SpawnPoint.cc
    2121  TeamSpawnPoint.cc
     22  PongCenterpoint.cc
     23  PongBall.cc
     24  PongBat.cc
    2225)
    2326
  • code/branches/miniprojects/src/orxonox/objects/worldentities/CameraPosition.cc

    r2662 r2824  
    4444        this->bDrag_ = false;
    4545        this->bAllowMouseLook_ = false;
     46        this->bAbsolute_ = false;
    4647
    4748        this->setObjectMode(0x0);
     
    5859        XMLPortParam(CameraPosition, "drag", setDrag, getDrag, xmlelement, mode).defaultValues(false);
    5960        XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false);
     61        XMLPortParam(CameraPosition, "absolute", setIsAbsolute, getIsAbsolute, xmlelement, mode).defaultValues(false);
    6062    }
    6163
  • code/branches/miniprojects/src/orxonox/objects/worldentities/CameraPosition.h

    r2662 r2824  
    5454                { return this->bAllowMouseLook_; }
    5555
     56            inline void setIsAbsolute(bool bAbsolute)
     57                { this->bAbsolute_ = bAbsolute; }
     58            inline bool getIsAbsolute() const
     59                { return this->bAbsolute_; }
     60
    5661            void attachCamera(Camera* camera);
    5762
     
    5964            bool bDrag_;
    6065            bool bAllowMouseLook_;
     66            bool bAbsolute_;
    6167    };
    6268}
  • code/branches/miniprojects/src/orxonox/objects/worldentities/ControllableEntity.cc

    r2662 r2824  
    144144    void ControllableEntity::addCameraPosition(CameraPosition* position)
    145145    {
    146         if (position->getAllowMouseLook())
    147             position->attachToNode(this->cameraPositionRootNode_);
     146        if (!position->getIsAbsolute())
     147        {
     148            if (position->getAllowMouseLook())
     149                position->attachToNode(this->cameraPositionRootNode_);
     150            else
     151                this->attach(position);
     152        }
    148153        else
    149             this->attach(position);
     154        {
     155            WorldEntity* parent = this->getParent();
     156            if (parent)
     157                parent->attach(position);
     158        }
    150159        this->cameraPositions_.push_back(position);
    151160    }
Note: See TracChangeset for help on using the changeset viewer.