Esempio n. 1
0
    public void OnClickMenu(UIController ctrl)
    {    //菜单按钮
        Debug.Log("OnClickMenu");
        UIGameSetingController seting = (UIGameSetingController)ctrl;

        seting.showMenuBtn();
    }
Esempio n. 2
0
    public void OnClickHuanpai(UIController ctrl)
    {
        MahjongTile.TotalClickCount = 1;
        UIGameSetingController seting = (UIGameSetingController)ctrl;

        seting.CloseHuanpaiTips();

        List <byte> cards = new List <byte> ();


        MahjongUserPlayer userPlayer = GameClient.Instance.MG.Self as MahjongUserPlayer;
        bool checkSelect             = true;

        if (userPlayer != null)
        {
            List <MahjongTile> mahjongTiles = userPlayer.Clicked;
            if (mahjongTiles.Count > 0)
            {
                TileDef.Kind kind = mahjongTiles [0].Def.GetKind();
                foreach (var temp in mahjongTiles)
                {
                    if (kind != temp.Def.GetKind())
                    {
                        checkSelect = false;
                    }
                    cards.Add(temp.Def.Value);
                }
            }
        }

        if (cards.Count == 0 || !checkSelect)
        {
            foreach (var temp in _HuanPaiOldDef)
            {
                cards.Add(temp.Value);
            }
        }
        else
        {
            for (int i = 0; i < GameMessage.MAXHUANPAINUM; i++)
            {
                if (i < cards.Count)
                {
                    _HuanPaiOldDef [i] = TileDef.Create(cards[i]);
                }
            }
        }

        GameClient.Instance.MG.Self.Proxy.Huanpai(cards);
    }
Esempio n. 3
0
    /// <summary>
    /// 点击头像
    /// </summary>
    /// <param name="index">0:自己, 1:左, 2:上,3:右</param>
    /// <param name="ctrl"></param>
    public void OnClickHead(int index, UIController ctrl)
    {
        Debug.Log("OnClickHead index:" + index);
        UIGameSetingController seting = (UIGameSetingController)ctrl;

        switch (index)
        {
        case 0:
            OnClickHeadSelf(ctrl);
            break;

        case 1:
            OnClickHeadLeft(ctrl);
            break;

        case 2:
            OnClickHeadUp(ctrl);
            break;

        case 3:
            OnClickHeadRight(ctrl);
            break;
        }
    }
Esempio n. 4
0
 public void OnClickHeadSelf(UIController ctrl)
 {//点击自己头像
     Debug.Log("OnClickHeadSelf");
     UIGameSetingController seting = (UIGameSetingController)ctrl;
 }
Esempio n. 5
0
 public void OnClickSeting(UIController ctrl)
 {//设置按钮
     Debug.Log("OnClickSeting");
     UIGameSetingController seting = (UIGameSetingController)ctrl;
 }
Esempio n. 6
0
 public void OnClickHelp(UIController ctrl)
 {//帮助按钮
     Debug.Log("OnClickHelp");
     UIGameSetingController seting = (UIGameSetingController)ctrl;
 }
Esempio n. 7
0
 public void OnClickHeadRight(UIController ctrl)
 {//点击右侧玩家头像
     Debug.Log("OnClickHeadRight");
     UIGameSetingController seting = (UIGameSetingController)ctrl;
 }
Esempio n. 8
0
 public void OnClickHeadUp(UIController ctrl)
 {//点击上面玩家头像
     Debug.Log("OnClickHeadUp");
     UIGameSetingController seting = (UIGameSetingController)ctrl;
 }