Пример #1
0
 private ammoslot GetAmmoslot(ammotype ammotype)
 {
     foreach (ammoslot slot in ammoSlot)
     {
         if (slot.ammotype == ammotype)
         {
             return(slot);
         }
     }
     return(null);
 }
Пример #2
0
 public void increasecurrentammo(ammotype ammotype, int ammoamount)
 {
     GetAmmoslot(ammotype).ammoammount += ammoamount;
 }
Пример #3
0
 // Update is called once per frame
 public void reducecurrentammo(ammotype ammotype)
 {
     GetAmmoslot(ammotype).ammoammount--;
 }
Пример #4
0
 public int getcurrentammo(ammotype ammotype)
 {
     return(GetAmmoslot(ammotype).ammoammount);
 }
Пример #5
0
 public void increaseammo(ammotype ammotype, int amoamount)
 {
     getammoslot(ammotype).ammoamount += amoamount;
 }
Пример #6
0
 public int decreaseammo(ammotype ammotype)
 {
     return(getammoslot(ammotype).ammoamount--);
 }
Пример #7
0
 public int currentammo(ammotype ammotype)
 {
     return(getammoslot(ammotype).ammoamount);
 }