| 1 | /* | 
|---|
| 2 |    orxonox - the future of 3D-vertical-scrollers | 
|---|
| 3 |  | 
|---|
| 4 |    Copyright (C) 2004 orx | 
|---|
| 5 |  | 
|---|
| 6 |    This program is free software; you can redistribute it and/or modify | 
|---|
| 7 |    it under the terms of the GNU General Public License as published by | 
|---|
| 8 |    the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 9 |    any later version. | 
|---|
| 10 |  | 
|---|
| 11 |    ### File Specific | 
|---|
| 12 |    main-programmer: | 
|---|
| 13 |    co-programmer: | 
|---|
| 14 | */ | 
|---|
| 15 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY | 
|---|
| 16 |  | 
|---|
| 17 |  | 
|---|
| 18 | #include "executor/executor.h" | 
|---|
| 19 | #include "util/loading/factory.h" | 
|---|
| 20 | #include "util/loading/load_param.h" | 
|---|
| 21 |  | 
|---|
| 22 |  | 
|---|
| 23 | #include "test_entity.h" | 
|---|
| 24 | #include "debug.h" | 
|---|
| 25 |  | 
|---|
| 26 |  | 
|---|
| 27 | #include "state.h" | 
|---|
| 28 | #include "shell_command.h" | 
|---|
| 29 | #include "game_world_data.h" | 
|---|
| 30 |  | 
|---|
| 31 | #include "class_id_DEPRECATED.h" | 
|---|
| 32 | ObjectListDefinition(TestEntity); | 
|---|
| 33 | CREATE_FACTORY(TestEntity); | 
|---|
| 34 |  | 
|---|
| 35 |  | 
|---|
| 36 |  | 
|---|
| 37 | /** | 
|---|
| 38 |  * | 
|---|
| 39 |  */ | 
|---|
| 40 | TestEntity::TestEntity () | 
|---|
| 41 | { | 
|---|
| 42 |   this->init(); | 
|---|
| 43 | } | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 | SHELL_COMMAND(test, TestEntity,test); | 
|---|
| 47 | SHELL_COMMAND(t2, TestEntity,t2); | 
|---|
| 48 | SHELL_COMMAND(t3, TestEntity,t3); | 
|---|
| 49 | SHELL_COMMAND(t4, TestEntity, t4); | 
|---|
| 50 | SHELL_COMMAND(t5, TestEntity,t5); | 
|---|
| 51 |  | 
|---|
| 52 | /** | 
|---|
| 53 |  * | 
|---|
| 54 |  */ | 
|---|
| 55 | TestEntity::TestEntity(const TiXmlElement* root) | 
|---|
| 56 | { | 
|---|
| 57 |   this->init(); | 
|---|
| 58 |  | 
|---|
| 59 |   if( root != NULL) | 
|---|
| 60 |     this->loadParams(root); | 
|---|
| 61 | } | 
|---|
| 62 |  | 
|---|
| 63 |  | 
|---|
| 64 | /** | 
|---|
| 65 |  * | 
|---|
| 66 |  */ | 
|---|
| 67 | TestEntity::~TestEntity () | 
|---|
| 68 | {} | 
|---|
| 69 |  | 
|---|
| 70 |  | 
|---|
| 71 | /** | 
|---|
| 72 |  * | 
|---|
| 73 |  */ | 
|---|
| 74 | void TestEntity::init() | 
|---|
| 75 | { | 
|---|
| 76 |   this->registerObject(this, TestEntity::_objectList); | 
|---|
| 77 |   this->toList(OM_GROUP_00); | 
|---|
| 78 |  | 
|---|
| 79 | } | 
|---|
| 80 |  | 
|---|
| 81 | void TestEntity::test() | 
|---|
| 82 | { | 
|---|
| 83 |   CM= new cameraman(); | 
|---|
| 84 |   CM->createCam(); | 
|---|
| 85 |   //CM->moveCurrCam(-300, 0, 0); | 
|---|
| 86 |   CM->moveCam(-300, 0, 0, 0); | 
|---|
| 87 | } | 
|---|
| 88 |  | 
|---|
| 89 | void TestEntity::t2() | 
|---|
| 90 | { | 
|---|
| 91 |   CM->moveCurrCam(+600, 0, 0); | 
|---|
| 92 |  | 
|---|
| 93 | } | 
|---|
| 94 |  | 
|---|
| 95 | void TestEntity::t3() | 
|---|
| 96 | { | 
|---|
| 97 |  | 
|---|
| 98 |   CM->setCam(1); | 
|---|
| 99 | } | 
|---|
| 100 |  | 
|---|
| 101 | void TestEntity::t4() | 
|---|
| 102 | { | 
|---|
| 103 |   CM->moveCurrCam(-500,0,0); | 
|---|
| 104 | } | 
|---|
| 105 |  | 
|---|
| 106 | void TestEntity::t5() | 
|---|
| 107 | { | 
|---|
| 108 |   CM->setCam(0); | 
|---|
| 109 | } | 
|---|
| 110 |  | 
|---|
| 111 |  | 
|---|
| 112 |  | 
|---|
| 113 | /** | 
|---|
| 114 |  * loads the Settings of a MD2Creature from an XML-element. | 
|---|
| 115 |  * @param root the XML-element to load the MD2Creature's properties from | 
|---|
| 116 |  */ | 
|---|
| 117 | void TestEntity::loadParams(const TiXmlElement* root) | 
|---|
| 118 | { | 
|---|
| 119 |   WorldEntity::loadParams(root); | 
|---|
| 120 | } | 
|---|
| 121 |  | 
|---|
| 122 | void TestEntity::draw() const | 
|---|
| 123 | { | 
|---|
| 124 |  | 
|---|
| 125 | } | 
|---|
| 126 |  | 
|---|
| 127 | /** | 
|---|
| 128 |  * | 
|---|
| 129 |  */ | 
|---|
| 130 | void TestEntity::tick (float time) | 
|---|
| 131 | { | 
|---|
| 132 |  | 
|---|
| 133 | } | 
|---|
| 134 |  | 
|---|
| 135 |  | 
|---|
| 136 | void  TestEntity::changeState (bool sta) | 
|---|
| 137 | { | 
|---|
| 138 |  | 
|---|
| 139 | } | 
|---|