Exemplo n.º 1
0
    //设置操作气泡
    public void SetInsTips(eGFOptIns ins)
    {
        string str = "";

        switch (ins)
        {
        case eGFOptIns.Add:    //加注
            str = "state_jiazhu";
            break;

        case eGFOptIns.Follow:    //跟注
            str = "state_genzhu";
            break;

        case eGFOptIns.Compare:    //比牌
            str = "state_bipai";
            break;

        case eGFOptIns.DisCard:    //弃牌
            str = "state_qipai";
            break;

        case eGFOptIns.LookCard:    //看牌
            str = "state_kanpai";
            break;
        }
        if (string.IsNullOrEmpty(str))
        {
            mInsSprite.gameObject.SetActive(false);
            return;
        }
        mInsSprite.gameObject.SetActive(true);
        if (this.transform.parent.parent.name.Contains("Right"))
        {
            str += "2";
            mInsSprite.transform.localPosition = new Vector3(-65, 86, 0);
        }
        else
        {
            str += "1";
            mInsSprite.transform.localPosition = new Vector3(65, 86, 0);
        }

        mInsSprite.spriteName = str;
    }
Exemplo n.º 2
0
    /// <summary>
    /// 操作点击
    /// </summary>
    public void OnOptBtnClick(GameObject indexGo)
    {
        SendGoldFlowerOpt req = new SendGoldFlowerOpt();
        int       index       = int.Parse(indexGo.name);
        eGFOptIns optIns      = (eGFOptIns)index;

        if (optIns == eGFOptIns.Add)//加注按钮
        {
            if (XXGoldFlowerGameModel.Inst.mLookCard)
            {
                InitAddList(XXGoldFlowerGameModel.Inst.mStartInfo.lookRate);
            }
            else
            {
                InitAddList(XXGoldFlowerGameModel.Inst.mStartInfo.menRate);
            }
            ShowAddBtnList(XXGoldFlowerGameModel.Inst.mOpt.jiazhuList);
        }
        else if (optIns == eGFOptIns.Compare)//比牌
        {
            Global.Inst.GetController <CommonTipsController>().ShowTips("是否确定要比牌?", "比牌|取消", () =>
            {
                XXGoldFlowerGameModel.Inst.mComparingCard = true;
                if (XXGoldFlowerGameModel.Inst.mHasCardSeatList.Count == 2)
                {
                    int temp = 1;
                    for (int i = 0; i < XXGoldFlowerGameModel.Inst.mHasCardSeatList.Count; i++)
                    {
                        if (XXGoldFlowerGameModel.Inst.mHasCardSeatList[i] != XXGoldFlowerGameModel.Inst.mMySeatId)
                        {
                            temp = XXGoldFlowerGameModel.Inst.mHasCardSeatList[i];
                        }
                    }
                    SendGoldFlowerOpt teme = new SendGoldFlowerOpt();
                    teme.ins         = (int)eGFOptIns.Compare;
                    teme.otherSeatId = temp;
                    Global.Inst.GetController <XXGoldFlowerGameController>().SendOpt(teme, () =>
                    {
                        XXGoldFlowerGameModel.Inst.mComparingCard = false;
                    });
                }
                else
                {
                    Global.Inst.GetController <XXGoldFlowerGameController>().mView.SetShowCompareSelectSp(true);
                }
            });
        }
        else if (optIns == eGFOptIns.DisCard)//弃牌提示
        {
            Global.Inst.GetController <CommonTipsController>().ShowTips("是否确定要弃牌?", "确定|取消", () =>
            {
                req.ins = index;
                Global.Inst.GetController <XXGoldFlowerGameController>().SendOpt(req);
            });
        }
        else
        {
            req.ins = index;
            Global.Inst.GetController <XXGoldFlowerGameController>().SendOpt(req);
        }
    }
Exemplo n.º 3
0
 //设置操作提示
 public void SetInsTips(eGFOptIns ins)
 {
     mBasePlayerInfo.SetInsTips(ins);
 }