Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/objects/test1.cc @ 619

Last change on this file since 619 was 616, checked in by nicolasc, 17 years ago

changed include names to new file names…<

File size: 2.4 KB
RevLine 
[197]1#include "test1.h"
2#include "test2.h"
3#include "test3.h"
[480]4#include "../../tinyxml/tinyxml.h"
[614]5#include "../Orxonox.h"
[482]6#include <OgreSceneManager.h>
[197]7
8namespace orxonox
9{
[218]10    CreateFactory(Test1);
11
[197]12    Test1::Test1()
13    {
[244]14        RegisterObject(Test1);
[197]15
16        this->usefullClass1_ = Class(Test1);
17        this->usefullClass2_ = Class(Test2);
18        this->usefullClass3_ = Class(Test3);
19    }
20
21    Test1::~Test1()
22    {
23    }
24
[384]25    void Test1::tick(float dt)
26    {
27        std::cout << "Test1: " << this << "\n";
28    }
29
[197]30    bool Test1::usefullClass1isA(Identifier* identifier)
31    {
32        return this->usefullClass1_->isA(identifier);
33    }
34
35    bool Test1::usefullClass2isA(Identifier* identifier)
36    {
37        return this->usefullClass2_->isA(identifier);
38    }
39
40    bool Test1::usefullClass3isA(Identifier* identifier)
41    {
42        return this->usefullClass3_.isA(identifier);
43    }
44
45    void Test1::setUsefullClass1(Identifier* identifier)
46    {
47        std::cout << "\n";
48        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
49        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
50        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
51        this->usefullClass1_ = identifier;
52    }
53
54    void Test1::setUsefullClass2(Identifier* identifier)
55    {
56        std::cout << "\n";
57        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
58        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
59        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
60        this->usefullClass2_ = identifier;
61    }
62
63    void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
64    {
65        std::cout << "\n";
66        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
67        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
68        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
69        this->usefullClass3_ = identifier;
70    }
[616]71
[480]72    void Test1::loadParams(TiXmlElement* xmlElem)
73    {
[507]74
[616]75
76
[480]77    }
[197]78}
Note: See TracBrowser for help on using the repository browser.