示例#1
0
 private void Use()      //use for the ladder
 {
     if (useable != null)
     {
         useable.Use();
     }
 }
示例#2
0
 public void UseItem()
 {
     if (m_inventory.GetItem(m_equipedItem) != null && m_inventory.GetItem(m_equipedItem).m_isUsable)
     {
         Iuseable useable = m_inventory.GetItem(m_equipedItem).m_item.GetComponent <Iuseable>();
         if (useable != null)
         {
             //TODO should probably be handled in a seperate class
             Iuseable.status status = useable.Use(gameObject, m_orientation);
             m_animator.useItem(m_inventory.GetItem(m_equipedItem).m_itemId);
             handleItemStatus(status);
         }
     }
 }