Пример #1
0
    public void Shoot(int desiredLane)
    {
        Ammo = currCauld.ammoType;
        int ammoCount = currCauld.ammoStored;

        if (desiredLane == currentLane)
        {
            if (ammoCount == 0)
            {
                Debug.Log("No ammo");
            }
            else
            {
                GetComponent <Animator>().SetTrigger("ToThrow");
                Instantiate(AmmoPrefabs [Ammo - 1], transform.position, transform.rotation);
                currCauld.ammoStored--;
                currCauld.RefreshText();
            }
        }
    }