Exemplo n.º 1
0
 public void checkForObject(Interactive aObject)
 {
     //This is an interactiveObject
     if (aObject != null)
     {
         //Do we already have an interactive object?
         if (m_FocusedObject == null)
         {
             //Make an entry call
             //Make a stay call
             m_FocusedObject = aObject;
             m_FocusedObject.onPlayerFocusEnter(this);
             m_FocusedObject.onPlayerFocus(this);
         }
         else if (aObject == m_FocusedObject)
         {
             //Make a stay call
             m_FocusedObject.onPlayerFocus(this);
         }
         //Not Equal and not null
         else if (aObject != m_FocusedObject)
         {
             //Make an exit call on the current focused object
             m_FocusedObject.onPlayerFocusExit(this);
             //Make stay and entry call on the new interactive object
             m_FocusedObject = aObject;
             m_FocusedObject.onPlayerFocusEnter(this);
             m_FocusedObject.onPlayerFocus(this);
         }
     }//end if This is an interactiveObject
 }