public BubbleHelper NextColorBubble()
        {
            var obj = Helpers[nextColorCode];

            nextColorCode = nextColorCode == BubbleColorCode.Pink ? BubbleColorCode.Yellow : BubbleColorCode.Pink;
            return(obj);
        }
        public BubbleHelperGroup(List <BubbleMove> prefabs)
        {
            var dict = new Dictionary <BubbleColorCode, BubbleHelper>();

            foreach (var prefab in prefabs)
            {
                dict.Add(prefab.ColorCode, new BubbleHelper(prefab));
            }
            Helpers = dict;

            nextColorCode = UnityEngine.Random.value > 0.5f ? BubbleColorCode.Yellow : BubbleColorCode.Pink;
        }
Exemplo n.º 3
0
    private static bool AreCompatible(BubbleColorCode a, BubbleColorCode b)
    {
        switch (a)
        {
        case BubbleColorCode.Pink:
            return(b != BubbleColorCode.Yellow);

        case BubbleColorCode.Yellow:
            return(b != BubbleColorCode.Pink);

        default:
            throw new ArgumentException();
        }
    }