Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc @ 12384

Last change on this file since 12384 was 12370, checked in by ahuwyler, 6 years ago

We have new template

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 *      Viviane Yang
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/*  TODO:
30
31    @file OrxoBloxShip.cc
32    @brief Implementation of the OrxoBloxShip class.
33*/
34
35#include "OrxoBloxShip.h"
36#include "OrxoBlox.h"
37#include "core/CoreIncludes.h"
38
39namespace orxonox
40{
41    RegisterClass(OrxoBloxShip);
42
43    OrxoBloxShip::OrxoBloxShip(Context* context) : SpaceShip(context)
44    {
45        RegisterObject(OrxoBloxShip);
46
47        this->bImmune = false;
48        this->width = 120;
49        this->height = 100;
50        orxout() << "SPACESHIP Spawned" << std::endl;
51
52        //timer.setTimer(3.5f, true, createExecutor(createFunctor(&OrxoBloxShip::showorientation, this)));
53    }
54
55    //Use this function to display your position on the field -> to determine field width and height
56    void OrxoBloxShip::showposition()
57    {
58        Vector3 pos = this->getPosition();
59        orxout() << "x = "<< pos.x << " y = " << pos.y << " z = "<< pos.z << endl; 
60    }
61
62    //Same thing for orientation
63    void OrxoBloxShip::showorientation()
64    {
65        Quaternion ort = this->getOrientation();
66        orxout() << "w = " << ort.w << " x = " << ort.x << " y = " << ort.y << "z = " << ort.z << endl;
67    }
68
69    void OrxoBloxShip::tick(float dt)
70    {
71        SUPER(OrxoBloxShip, tick, dt);
72        Vector3 pos = this->getPosition();
73        this->setPosition(pos);
74    }   
75
76    void OrxoBloxShip::boost(bool bBoost)
77    {
78    }
79
80}
81
Note: See TracBrowser for help on using the repository browser.