예제 #1
0
    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();
    }
예제 #2
0
    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");
        }
    }
예제 #3
0
 public void RemovePollen(int amount, PollenPickup.PollenType type)
 {
     AddPollen(-amount, type);
 }
예제 #4
0
 public void AddPollen(PollenPickup.PollenType type)
 {
     AddPollen(1, type);
 }