00001 #include "SelectableObject.h" 00002 #include "Application.h" 00003 00004 int SelectableObject::s_nextID = 0; 00005 00006 SelectableObject::SelectableObject() : GameObject() 00007 { 00008 m_selected = false; 00009 } 00010 00011 void SelectableObject::setSelected(const bool _val) 00012 { 00013 m_selected = _val; 00014 } 00015 00016 void SelectableObject::setAny() 00017 { 00018 if (m_entity != 0) m_entity->setUserAny(Ogre::Any(this)); 00019 if (m_manual != 0) m_manual->setUserAny(Ogre::Any(this)); 00020 if (m_sceneNode != 0) m_sceneNode->setUserAny(Ogre::Any(this)); 00021 } 00022 00023 void SelectableObject::tryResetPosition() 00024 { 00025 // We don't do anything here, it's just wrapped through to craft. 00026 }