void LogicComponent::init() { OBB* box = (OBB*) this->gameObject->findComponent<OBB>(); SphereCollider* sphere = (SphereCollider*) this->gameObject->findComponent<SphereCollider>(); if(box != NULL) box->registerLogicComponent(this); if(sphere!=NULL) sphere->registerLogicComponent(this); LogicManager::addLogicComponent(*this); logicInit(); }