Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartKart.cc @ 12192

Last change on this file since 12192 was 12192, checked in by emustafa, 5 years ago

shroom removed, KartController removed

File size: 2.2 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 *      Cyrill Burgener
24 *
25 */
26
27/**
28    @file OrxoKartKart.cc
29    @brief Implementation of the OrxoKartKart control
30*/
31
32#include "OrxoKartKart.h"
33#include "core/CoreIncludes.h"
34#include "core/XMLPort.h"
35namespace orxonox
36{
37    RegisterClass(OrxoKartKart);
38
39
40    OrxoKartKart::OrxoKartKart(Context* context) : SpaceShip(context)
41    {
42        RegisterObject(OrxoKartKart);
43    }
44
45    void OrxoKartKart::moveFrontBack(const Vector2& value)
46        { 
47            this->steering_.z -= value.x;
48           
49        }
50
51    void OrxoKartKart::moveRightLeft(const Vector2& value)
52        {   
53            this->rotateYaw(value);
54        }
55
56    void OrxoKartKart::moveUpDown(const Vector2& value)
57        { 
58            this->steering_.y += value.x; 
59           
60        }
61
62    void OrxoKartKart::rotateYaw(const Vector2& value)
63        {
64           
65            this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x); 
66        }
67
68    void OrxoKartKart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
69        {
70            SUPER(OrxoKartKart, XMLPort, xmlelement, mode);
71           
72        }
73
74
75    /**
76    @brief
77        Removed, does nothing.
78    @param value
79    */
80    void OrxoKartKart::rotatePitch(const Vector2& value) { }
81
82    /**
83    @brief
84        Removed, does nothing.
85    @param value
86    */
87    void OrxoKartKart::rotateRoll(const Vector2& value) { }
88
89
90}
Note: See TracBrowser for help on using the repository browser.