예제 #1
0
    public void PickUp()
    {
        if (_pickableObject != null)
        {
            IPickable pickable = _pickableObject.GetComponent <IPickable>();
            switch (pickable.GetPickableType())
            {
            case PickableType.Weapon:
                EquipWeapon();
                break;

            case PickableType.Key:
                PickUpKey();
                break;
            }
            pickable.Picked(gameObject);
        }
    }