Exemple #1
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (comboCounter.DragObjList.Count.Equals(0))
        {
            return;
        }

        //同一色の距離が離れているかどうかのチェック
        if (comboCounter.CheckCombo(this.gameObject.transform))
        {
            return;
        }



        if (comboCounter.DragObjList.Contains(this.gameObject))
        {
            if (comboCounter.DragObjList.Count.Equals(1))
            {
                return;
            }

            comboCounter.MinusCombo();
            return;
        }

        if (comboCounter.DragObjList.FirstOrDefault().GetComponent <OrbController>().ThisOrbType != ThisOrbType)
        {
            return;
        }

        comboCounter.AddCombo(this.gameObject);
    }
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (ThisOrbType == OrbType.DevilOrb)
        {
            DevilAction();
            return;
        }

        if (comboCounter.DragObjList.Count.Equals(0))
        {
            return;
        }

        //リストの中に自分がいたらかえる
        foreach (var thisOrb in comboCounter.DragObjList)
        {
            if (thisOrb == this.gameObject)
            {
                return;
            }
        }

        if (ThisOrbType == OrbType.SpecialOrb ||
            comboCounter.DragObjList.LastOrDefault().GetComponent <OrbController>().
            ThisOrbType == OrbType.SpecialOrb)
        {
            comboCounter.AddCombo(this.gameObject);
            return;
        }


        if (!comboCounter.CheckCombo(this.transform))
        {
            return;
        }


        if (comboCounter.DragObjList.Contains(this.gameObject))
        {
            if (comboCounter.DragObjList.Count.Equals(1))
            {
                return;
            }

            comboCounter.MinusCombo();
            return;
        }

        if (comboCounter.DragObjList.FirstOrDefault().GetComponent <OrbController>().ThisOrbType != ThisOrbType)
        {
            return;
        }


        comboCounter.AddCombo(this.gameObject);
    }