Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/StoryModePawn.cc @ 11743

Last change on this file since 11743 was 11743, checked in by landauf, 6 years ago

merged CampaignMap_HS17

File size: 2.6 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        enableCollisionCallback();
51    }
52
53    void StoryModePawn::moveFrontBack(const Vector2& value)
54        {
55            //this->getCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
56            Vector3 newPos = this->getCamera()->getPosition();
57            newPos.z -= 5*value.x;
58            this->getCamera()->setPosition(newPos);
59        }
60
61    void StoryModePawn::moveRightLeft(const Vector2& value)
62        {   
63            Vector3 newPos = this->getCamera()->getPosition();
64            newPos.x += 5*value.x;
65            this->getCamera()->setPosition(newPos);
66        }
67
68    void StoryModePawn::moveUpDown(const Vector2& value) {}
69
70    void StoryModePawn::rotateYaw(const Vector2& value) {
71
72        Pawn::rotateYaw(value);
73    }
74
75    void StoryModePawn::XMLPort(Element& xmlelement, XMLPort::Mode mode)
76    {
77        SUPER(StoryModePawn, XMLPort, xmlelement, mode);
78    }
79
80    /**
81    @brief
82        Removed, does nothing.
83    @param value
84    */
85    void StoryModePawn::rotatePitch(const Vector2& value) { }
86
87    /**
88    @brief
89        Removed, does nothing.
90    @param value
91    */
92    void StoryModePawn::rotateRoll(const Vector2& value) { }
93
94    /**
95    @brief
96        Removed, does nothing
97    @param bBoost
98    */
99    void StoryModePawn::boost(bool bBoost) { }
100}
Note: See TracBrowser for help on using the repository browser.