Ejemplo n.º 1
0
 private void TouchCondition(GameObject go)
 {
     if (go == null)
     {
         return;
     }
     if (m_IsChooseSuccessCondition)
     {
         return;
     }
     for (int i = 0; i < m_PaintDrums.Length; i++)
     {
         if (m_PaintDrums[i].TouchObj == go)
         {
             m_IsChooseSuccessCondition = m_PaintDrums[i].Select(m_PaintDrums[i].PropType, (int)m_CurColor);
             if (m_IsChooseSuccessCondition)
             {
                 m_SelectPaintDrums = m_PaintDrums[i];
                 for (int j = 0; j < m_PaintDrums.Length; j++)
                 {
                     if (m_PaintDrums[j].TouchObj != go)
                     {
                         m_PaintDrums[j].Gary();
                     }
                 }
             }
             break;
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// open时候调用一次
        /// </summary>
        protected override void ResetData()
        {
            base.ResetData();
            for (int i = 0; i < m_EasyCars.Length; i++)
            {
                m_EasyCars[i].StopAutoScale();
                m_EasyCars[i].Clear();
            }
            for (int i = 0; i < m_TroubleCars.Length; i++)
            {
                m_TroubleCars[i].StopAutoScale();
                m_TroubleCars[i].Clear();
            }
            for (int i = 0; i < m_PaintDrums.Length; i++)
            {
                m_PaintDrums[i].Clear();
            }
            m_SelectPaintDrums = null;

            //int wallWeight = GameEntry.WindowsConfig.Config.Screen_Wall_Width;
            //if (m_DifficultyType == DifficultyType.Easy)
            //{
            //    Vector3 move = m_EasyPosition + Vector3.right * wallWeight;
            //    m_EasyTransform.transform.localPosition = move;
            //}
            //else if (m_DifficultyType == DifficultyType.Trouble)
            //{
            //    Vector3 move = m_TroublePosition + Vector3.right * wallWeight;
            //    m_TroubleTransform.transform.localPosition = move;
            //}
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 移动笔刷
        /// </summary>
        /// <param name="paint_drum"></param>
        /// <param name="finish"></param>
        public void MoveTo(PaintDrum paint_drum, GameFrameworkAction finish)
        {
            paint_drum.BrushStopShake();
            Sequence ms    = DOTween.Sequence();
            Tween    move1 = paint_drum.BrushTransform.DOMove(transform.position + Vector3.left, 1).SetEase(Ease.Linear);
            Tween    move2 = paint_drum.BrushTransform.DOMoveX(transform.position.x + 1, 0.625f).SetLoops(4, LoopType.Yoyo);

            StartCoroutine(IEnumeratorBrush());
            move2.OnComplete(() =>
            {
                if (finish != null)
                {
                    finish();
                }
                m_ColorMask.enabled = true;
                paint_drum.InitBrush();
            });
            ms.Append(move1);
            ms.Append(move2);
        }
Ejemplo n.º 4
0
 public override bool Select(PropType subProp, TeamType teamType, int id, PaintDrum paint_drum, GameFrameworkAction finish)
 {
     if (!IsCanTouch)
     {
         return(false);
     }
     IsCanTouch = false;
     //true
     if (subProp == PropType && Id == id && m_TeamType == teamType)
     {
         SelectSuccess();
         MoveTo(paint_drum, finish);
         return(true);
     }
     // false
     else
     {
         SelectFailed();
         return(false);
     }
 }
Ejemplo n.º 5
0
 public virtual bool Select(PropType subProp, TeamType teamType, int id, PaintDrum paint_drum, GameFrameworkAction finish)
 {
     throw new System.Exception("调用请实现虚函数!!");
 }