I don't understand what the bug is?

Help me please about the AmmoType

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ammo : MonoBehaviour
{

[SerializeField] AmmoSlot[] ammoSlots;

[System.Serializable]
private class AmmoSlot
{
    public AmmoType ammoType;
    public int ammoAmount;
}

//public int GetCurrentAmmo()
//{
//    return ammoAmount;
//}

//public void ReduceCurrentAmmo()
//{
//    ammoAmount--;
//}

}

and another script i think is calling

public enum AmmoType
{
Bullets,
Shells,
Rokets
}

Hi Ahmad,

What exactly is your problem? What did you expect to happen? What happened instead? Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

Privacy & Terms