Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/mergeFS18/src/orxonox/worldentities/pawns/StoryModePawn.cc @ 12047

Last change on this file since 12047 was 11783, checked in by landauf, 7 years ago

merged Presentation_HS17_merge back to trunk

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Nikola Bolt
24 *   Co-Author:
25 *      Claudio Fanconi
26 *
27 */
28
29/**
30    @file StoryModePawn.cc
31    @brief Implementation of the StoryModePawn control
32*/
33
34#include "StoryModePawn.h"
35
36#include "core/CoreIncludes.h"
37#include "core/XMLPort.h"
38
39#include "graphics/Camera.h"
40
41#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
42
43namespace orxonox
44{
45    RegisterClass(StoryModePawn);
46
47    StoryModePawn::StoryModePawn(Context* context) : SpaceShip(context)
48    {
49        RegisterObject(StoryModePawn);
50    }
51
52    void StoryModePawn::moveFrontBack(const Vector2& value)
53        {
54            //this->getCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
55            Vector3 newPos = this->getCamera()->getPosition();
56            newPos.z -= 5*value.x;
57            this->getCamera()->setPosition(newPos);
58        }
59
60    void StoryModePawn::moveRightLeft(const Vector2& value)
61        {   
62            Vector3 newPos = this->getCamera()->getPosition();
63            newPos.x += 5*value.x;
64            this->getCamera()->setPosition(newPos);
65        }
66
67    void StoryModePawn::moveUpDown(const Vector2& value) {}
68
69    void StoryModePawn::rotateYaw(const Vector2& value) {
70
71        Pawn::rotateYaw(value);
72    }
73
74    /**
75    @brief
76        Removed, does nothing.
77    @param value
78    */
79    void StoryModePawn::rotatePitch(const Vector2& value) { }
80
81    /**
82    @brief
83        Removed, does nothing.
84    @param value
85    */
86    void StoryModePawn::rotateRoll(const Vector2& value) { }
87
88    /**
89    @brief
90        Removed, does nothing
91    @param bBoost
92    */
93    void StoryModePawn::boost(bool bBoost) { }
94}
Note: See TracBrowser for help on using the repository browser.