public void AddPollen(int amount, PollenPickup.PollenType type) { switch (type) { case PollenPickup.PollenType.Red: redPollen += amount; break; case PollenPickup.PollenType.Purple: purplePollen += amount; break; case PollenPickup.PollenType.Blue: bluePollen += amount; break; case PollenPickup.PollenType.Yellow: yellowPollen += amount; break; default: Debug.LogWarning("Inventory.AddPollen :: Unrecognized PollenType"); break; } updateUI(); }
public int GetPollen(PollenPickup.PollenType type) { switch (type) { case PollenPickup.PollenType.Red: return(this.redPollen); case PollenPickup.PollenType.Purple: return(this.purplePollen); case PollenPickup.PollenType.Blue: return(this.bluePollen); case PollenPickup.PollenType.Yellow: return(this.yellowPollen); default: throw new System.Exception("Inventory.GetPollen :: Unrecognized PollenType"); } }
public void RemovePollen(int amount, PollenPickup.PollenType type) { AddPollen(-amount, type); }
public void AddPollen(PollenPickup.PollenType type) { AddPollen(1, type); }