Changeset 1052 for code/trunk/src/asylum/orxonox
- Timestamp:
- Apr 14, 2008, 3:42:49 AM (17 years ago)
- Location:
- code/trunk/src/asylum/orxonox/objects
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/asylum/orxonox/objects/Fighter.cc
r1032 r1052 38 38 #include "util/String2Number.h" 39 39 #include "core/CoreIncludes.h" 40 #include "core/ConfigValueIncludes.h" 40 41 #include "GraphicsEngine.h" 41 42 #include "core/InputManager.h" -
code/trunk/src/asylum/orxonox/objects/Test.h
r1024 r1052 30 30 31 31 #include "core/BaseObject.h" 32 #include "core/CoreIncludes.h" 32 33 33 34 namespace orxonox -
code/trunk/src/asylum/orxonox/objects/test2.cc
r1024 r1052 30 30 #include "test3.h" 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h" 32 33 33 34 namespace orxonox … … 43 44 this->usefullClass3_ = Class(Test3); 44 45 45 timer1.setTimer(1, true, this, &Test2::timerFunction1);46 timer2.setTimer(5, true, this, &Test2::timerFunction2);47 timer3.setTimer(10, false, this, &Test2::timerFunction3);46 timer1.setTimer(1, true, this, createExecutor(createFunctor(&Test2::timerFunction1))); 47 timer2.setTimer(5, true, this, createExecutor(createFunctor(&Test2::timerFunction2))); 48 timer3.setTimer(10, false, this, createExecutor(createFunctor(&Test2::timerFunction3))); 48 49 } 49 50 -
code/trunk/src/asylum/orxonox/objects/test3.cc
r1024 r1052 30 30 #include "test3.h" 31 31 #include "core/CoreIncludes.h" 32 #include "core/ConfigValueIncludes.h" 32 33 33 34 namespace orxonox … … 56 57 SetConfigValue(value_vector3_, Vector3(13, 26, 39)); 57 58 SetConfigValue(value_colourvalue_, ColourValue(1.0, 0.5, 0.25, 0.887)); 59 SetConfigValueVector(vector_int_, std::vector<int>(1, 13)); 60 SetConfigValueVector(vector_string_, std::vector<std::string>(3, "nothing")); 61 SetConfigValueVector(vector_vector3_, std::vector<Vector3>(1, Vector3(3, 2, 1))); 58 62 } 59 63 … … 64 68 void Test3::configOutput() 65 69 { 66 std::cout << "int: " << this->value_int_ << std::endl; 67 std::cout << "uint: " << this->value_uint_ << std::endl; 68 std::cout << "char: " << (int)this->value_char_ << std::endl; 69 std::cout << "uchar: " << (int)this->value_uchar_ << std::endl; 70 std::cout << "float: " << this->value_float_ << std::endl; 71 std::cout << "double: " << this->value_double_ << std::endl; 72 std::cout << "bool: " << this->value_bool_ << std::endl; 73 std::cout << "string: " << this->value_string_ << std::endl; 74 std::cout << "constchar: " << this->value_constchar_ << std::endl; 75 std::cout << "vector2: " << this->value_vector2_ << std::endl; 76 std::cout << "vector3: " << this->value_vector3_ << std::endl; 77 std::cout << "colourvalue: " << this->value_colourvalue_ << std::endl; 70 std::cout << "int: " << this->value_int_ << std::endl; 71 std::cout << "uint: " << this->value_uint_ << std::endl; 72 std::cout << "char: " << (int)this->value_char_ << std::endl; 73 std::cout << "uchar: " << (int)this->value_uchar_ << std::endl; 74 std::cout << "float: " << this->value_float_ << std::endl; 75 std::cout << "double: " << this->value_double_ << std::endl; 76 std::cout << "bool: " << this->value_bool_ << std::endl; 77 std::cout << "string: >" << this->value_string_ << "<" << std::endl; 78 std::cout << "constchar: >" << this->value_constchar_ << "<" << std::endl; 79 std::cout << "vector2: " << this->value_vector2_ << std::endl; 80 std::cout << "vector3: " << this->value_vector3_ << std::endl; 81 std::cout << "colourvalue: " << this->value_colourvalue_ << std::endl; 82 std::cout << std::endl; 83 for (unsigned int i = 0; i < this->vector_int_.size(); i++) 84 std::cout << "vector<int>: " << i << ": " << this->vector_int_[i] << std::endl; 85 for (unsigned int i = 0; i < this->vector_string_.size(); i++) 86 std::cout << "vector<string>: " << i << ":>" << this->vector_string_[i] << "<" << std::endl; 87 for (unsigned int i = 0; i < this->vector_vector3_.size(); i++) 88 std::cout << "vector<vector3>: " << i << ": " << this->vector_vector3_[i] << std::endl; 89 90 ModifyConfigValue(value_int_, tset, "100"); 91 std::cout << std::endl; 92 std::cout << "int: " << this->value_int_ << std::endl; 93 94 ModifyConfigValue(value_int_, update); 95 std::cout << std::endl; 96 std::cout << "int: " << this->value_int_ << std::endl; 78 97 } 79 98 -
code/trunk/src/asylum/orxonox/objects/test3.h
r1024 r1052 1 1 #ifndef _Test3_H__ 2 2 #define _Test3_H__ 3 4 #include <vector> 3 5 4 6 #include "core/BaseObject.h" … … 36 38 Vector3 value_vector3_; 37 39 ColourValue value_colourvalue_; 40 41 std::vector<int> vector_int_; 42 std::vector<std::string> vector_string_; 43 std::vector<Vector3> vector_vector3_; 38 44 }; 39 45 }
Note: See TracChangeset
for help on using the changeset viewer.