Exemplo n.º 1
0
    protected void Process(MessageType cameFrom, InterationType it, GameObject go)
    {
        if (it != interationType)
        {
            return;
        }

        //stays are their own thing
        if (cameFrom == MessageType.Enter && triggerType == MessageType.Stay && isCounting <= 0)
        {
            if (tagsThatPass.CheckAll(go.gameObject))
            {
                waitTimerCounter = 0;
                isCounting++;
                Tick(); //force a tick now to avoid 1 frame delay bug
            }
        }

        if (cameFrom == MessageType.Exit && triggerType == MessageType.Stay && isCounting > 0)
        {
            isCounting--;
            waitTimerCounter = 0;
        }

        //instants are much simplier
        if (triggerType == cameFrom && tagsThatPass.CheckAll(go.gameObject))
        {
            DoThing();
        }
    }
Exemplo n.º 2
0
        private void setInteration(InterationType interationType, int index = -1)
        {
            switch (interation = interationType)
            {
            case InterationType.NONE:
                pictureBox1.Cursor = null;
                break;

            case InterationType.TILE:
                pictureBox1.Cursor = null;
                break;

            case InterationType.COLORPICKERPF0:
            case InterationType.COLORPICKERPF1:
            case InterationType.COLORPICKERPF2:
            case InterationType.COLORPICKERPF3:
            case InterationType.COLORPICKERBK:
            {
                pictureBox1.Cursor =
                    new Cursor(new MemoryStream(Properties.Resources.ColorPickerToolCursor));
            }; break;
            }

            this.index = index;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化  0叫地主1抢地主2叫分3出牌
 /// </summary>
 /// <param name="type"></param>
 public void Init(string uid, int type)
 {
     if (exitCall != null)
     {
         exitCall();
     }
     CurInterationType   = (InterationType)type;
     currentAuthorityUid = uid;
     BiggestUid          = uid;
     if (enterCall != null)
     {
         enterCall(false);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 出牌轮转  0叫地主1抢地主2叫分3出牌
 /// </summary>
 public void Turn(string uid, int type)
 {
     if (exitCall != null)
     {
         exitCall();
     }
     currentAuthorityUid = uid;
     if (biggestUid == currentAuthorityUid)
     {//如果当前出牌者是最大的,那么清空桌面出牌
         DeskCardsCache.Instance.Clear();
     }
     CurInterationType = (InterationType)type;
     if (enterCall != null)
     {
         enterCall(biggestUid != currentAuthorityUid);
     }
 }