コード例 #1
0
    public void Consume(IConsumable c)
    {
        ItemType type = c.GetItemType();

        switch (type)
        {
        case ItemType.Food:
            SoundManager.instance.RandomizeSfx(eatSound1, eatSound2);
            break;

        case ItemType.Soda:
            SoundManager.instance.RandomizeSfx(drinkSound1, drinkSound2);
            break;
        }
    }