Changeset 2948 for code/branches/netp2/src/orxonox/objects
- Timestamp:
- May 1, 2009, 11:34:14 PM (16 years ago)
- Location:
- code/branches/netp2/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp2/src/orxonox/objects/Test.cc
r2944 r2948 49 49 // NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER ); 50 50 51 registerStaticNetworkFunction( &Test::printV1, "printV1" ); 51 registerStaticNetworkFunction( &Test::printV1 ); 52 registerMemberNetworkFunction( Test, checkU1 ); 52 53 53 54 Test* Test::instance_ = 0; … … 101 102 } 102 103 104 void Test::tick(float dt) 105 { 106 if(!Core::isMaster()) 107 callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 ); 108 // callMemberNetworkFunction( &Test::printV1, this->getObjectID(), 0); 109 } 110 103 111 void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; } 104 112 void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; } -
code/branches/netp2/src/orxonox/objects/Test.h
r2944 r2948 33 33 #include "core/BaseObject.h" 34 34 #include "network/synchronisable/Synchronisable.h" 35 #include "Tickable.h" 35 36 36 37 … … 41 42 namespace orxonox 42 43 { 43 class _OrxonoxExport Test: public BaseObject, public Synchronisable 44 class _OrxonoxExport Test: public BaseObject, public Synchronisable, public Tickable 44 45 { 45 46 public: … … 51 52 52 53 static void call(unsigned int clientID); 54 virtual void tick(float dt); 53 55 54 56
Note: See TracChangeset
for help on using the changeset viewer.