Ejemplo n.º 1
0
 private void OnClickCancel()
 {
     if (pvp02Panel != null)
     {
         pvp02Panel.OnTipsHide();
         pvp02Panel.OnPieceAnimatorStop();
     }
 }
Ejemplo n.º 2
0
    public override void HandleNotification(INotification notification)
    {
        object body = notification.Body;

        switch (notification.Name)
        {
        case NotificationConstant.OnDragEnd:
            m_viewComponent.OnTipsHide();
            break;

        case NotificationConstant.OnGameOver:
            //m_viewComponent.OnGameOver((Config.PieceColor)body);
            break;

        case NotificationConstant.OnTipsShow:
            m_viewComponent.OnTipsShow((Vector2)body);
            break;

        case NotificationConstant.PlayerReadyResponse:
            m_viewComponent.OnReadyResponse();
            break;

        case NotificationConstant.OnCheck:
            m_viewComponent.OnCheck((int)body);
            break;

        case NotificationConstant.NewEndTurnResponse:
            m_viewComponent.EndCurRound();
            break;

        case NotificationConstant.PlayerActiveResponse:
            m_viewComponent.SetCanNext(false);
            break;

        case NotificationConstant.ShowTips:
            Vector2 clickPoint = (Vector2)body;
            if (m_viewComponent.canNext == true && m_viewComponent.isTurn == true)
            {
                m_viewComponent.OnTipsShow(clickPoint);
            }
            else
            {
                m_viewComponent.OnTipsShow(clickPoint, true);
            }

            break;

        case NotificationConstant.ShowRedTips:
            Vector2 redPoint = (Vector2)body;
            m_viewComponent.OnTipsShow(redPoint, true);
            break;

        case NotificationConstant.SomeoneDead:
            if (m_viewComponent.isTurn == false)
            {
                CurPieceNum--;
            }
            break;

        default:
            break;
        }
    }