Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/asylum/orxonox/objects/test1.cc @ 1504

Last change on this file since 1504 was 1504, checked in by rgrieder, 16 years ago

Once again, set all the svn:eol-style property to native. I really hope this doesn't pose more problems than it solves..

  • Property eol-style set to native
File size: 3.3 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 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#include "test1.h"
30#include "test2.h"
31#include "test3.h"
32#include "core/CoreIncludes.h"
33
34namespace orxonox
35{
36    CreateFactory(Test1);
37
38    Test1::Test1()
39    {
40        RegisterObject(Test1);
41
42        this->usefullClass1_ = Class(Test1);
43        this->usefullClass2_ = Class(Test2);
44        this->usefullClass3_ = Class(Test3);
45    }
46
47    Test1::~Test1()
48    {
49    }
50
51    void Test1::tick(float dt)
52    {
53        std::cout << "Test1: " << this << std::endl;
54    }
55
56    bool Test1::usefullClass1isA(Identifier* identifier)
57    {
58        return this->usefullClass1_->isA(identifier);
59    }
60
61    bool Test1::usefullClass2isA(Identifier* identifier)
62    {
63        return this->usefullClass2_->isA(identifier);
64    }
65
66    bool Test1::usefullClass3isA(Identifier* identifier)
67    {
68        return this->usefullClass3_.isA(identifier);
69    }
70
71    void Test1::setUsefullClass1(Identifier* identifier)
72    {
73        std::cout << std::endl;
74        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
75        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
76        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
77        this->usefullClass1_ = identifier;
78    }
79
80    void Test1::setUsefullClass2(Identifier* identifier)
81    {
82        std::cout << std::endl;
83        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
84        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
85        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
86        this->usefullClass2_ = identifier;
87    }
88
89    void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
90    {
91        std::cout << std::endl;
92        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
93        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
94        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
95        this->usefullClass3_ = identifier;
96    }
97
98    void Test1::loadParams(TiXmlElement* xmlElem)
99    {
100
101
102
103    }
104}
Note: See TracBrowser for help on using the repository browser.