GameClient set onMoveFunc for all objects

This commit is contained in:
lindaandersson 2014-02-20 10:13:01 +01:00
parent d537bd6791
commit dd397ec752
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody, void (*collisionFuncAfte
this->objectID = objectID; this->objectID = objectID;
this->extraDamageOnCollision = 0; this->extraDamageOnCollision = 0;
this->rigidBody->SetCustomTag(this); this->rigidBody->SetCustomTag(this);
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_Move)((Game*)&Game::Instance())->onMoveFnc);
} }
@ -41,6 +42,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody , Oyster::Physics::ICusto
this->objectID = objectID; this->objectID = objectID;
this->extraDamageOnCollision = 0; this->extraDamageOnCollision = 0;
this->rigidBody->SetCustomTag(this); this->rigidBody->SetCustomTag(this);
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_Move)((Game*)&Game::Instance())->onMoveFnc);
} }
Object::~Object(void) Object::~Object(void)