예제 #1
0
    public void Use()
    {
        WeaponSlot weaponSlot = FindObjectOfType <WeaponSlot>();

        if (weaponType == GameTypes.PlayerWeaponType.MatterManipulator)
        {
            PlayerData.instance.hasMatterManipulator = true;
            weaponSlot.EquipMatterManipulator();
        }
        else if (weaponType == GameTypes.PlayerWeaponType.MultiCannon)
        {
            PlayerData.instance.hasMultiCannon = true;
            weaponSlot.EquipMultiCannon();
        }

        SceneManager.instance.RemoveGravityBody(GetComponentInParent <Rigidbody>());
        Destroy(transform.parent.gameObject);
    }