예제 #1
0
    public void SetType(BUBBLE_TYPE type)
    {
        foreach (GameObject go in colorsGO)
        {
            go.SetActive(false);
        }

        this.type        = type;
        this.BubbleValue = GetValue((int)type);
        if (type == BUBBLE_TYPE.NONE)
        {
            return;
        }

        colorsGO[(int)type].SetActive(true);
    }
예제 #2
0
    public void SetNextType(BUBBLE_TYPE type, int matches)
    {
        foreach (GameObject go in colorsGO)
        {
            go.SetActive(false);
        }

        int newType = GetBubbleTypeFromValue(matches * GetValue((int)type));

        //this logic will multiply all similar bubbles and give the value of the new sum
        this.type        = (BUBBLE_TYPE)newType;
        this.BubbleValue = GetValue(newType);
        if (type == BUBBLE_TYPE.NONE)
        {
            return;
        }

        colorsGO[newType].SetActive(true);
    }