void Die() { if (anim.GetCurrentAnimatorStateInfo(0).IsName("Die") && anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 0.99f) { dm.DropItem(transform.position); Destroy(gameObject); } }
private void DropItem() { int itemId = DropManager.GetDrop(m_DropCategory); if (itemId == Consts.NULL_ITEM_ID) { return; } DropManager.DropItem(itemId, transform.position); }
private void DropItem(int itemID) { if (ItemManager.IsPassiveItem(itemID)) { ItemManager.GetPassiveItem(itemID).RemoveEffect(m_Manager); } else if (ItemManager.IsActiveItem(itemID)) { ItemManager.GetActiveItem(itemID).CancelEffect(); } DropManager.DropItem(itemID, transform.position); }
private void DropItem() { int itemId = DropManager.GetDrop(m_SpecialItems, m_useDefault, m_Type); if (itemId == -1) { return; } DropManager.DropItem(itemId, transform.position); //Play a chest animation here Destroy(gameObject); }