public void AddWeapon(ScriptableGun weapon) { if (currentlyEquipped == weapon) { AddAmmo(25); } else { currentlyEquipped = weapon; if (ammo.ContainsKey(currentlyEquipped.ammoID) == false) { ammo.Add(currentlyEquipped.ammoID, 50); } else { AddAmmo(25); } SpawnGun(); } //TODO Check to see if its already equipped //If it is, then we just need to add ammo //TODO If not already equipped, spawn new gun UpdateUI(); }
private void attachNewGuns(ScriptableGun scrGun, int type = 0) { switch (type) { case 0: holsters[holsterToReplace].GetComponent <GunController>().gun = scrGun; holsterToReplace = (holsterToReplace + 1) % holsters.Length; break; default: break; } }
public void Init(string tag, ScriptableGun gun) { base.Init(tag); weapon = gun; }