void Start()
 {
     tip = Instantiate(m_Tip);
     tip.SetActive(false);
     if (_handCardMgr == null)
     {
         _handCardMgr = GetComponentInChildren <DHM_HandCardManager>();
     }
     if (_recyleCardMgr == null)
     {
         _recyleCardMgr = GetComponentInChildren <DHM_RecyleHandCardManager>();
     }
     if (_pengGangMgr == null)
     {
         _pengGangMgr = GetComponentInChildren <PengGangManager>();
     }
     if (_handAnimationCtr == null)
     {
         _handAnimationCtr = GetComponentInChildren <DHM_HandAnimationCtr>();
     }
     if (_handCardMgr != null && _recyleCardMgr != null)
     {
         _handCardMgr.chuPaiEvent           += _recyleCardMgr.ChuPai;
         _recyleCardMgr.ChuPaiCallBackEvent += _handCardMgr.ChuPaiCallBackEventHandle;
     }
     //initHighLight();
 }
Esempio n. 2
0
    void Start()
    {
        switch (m_Player)
        {
        case DHM_HandCardManager.PlayerType.East:
            localindex = 0;
            break;

        case DHM_HandCardManager.PlayerType.South:
            localindex = 1;
            break;

        case DHM_HandCardManager.PlayerType.West:
            localindex = 2;
            break;

        case DHM_HandCardManager.PlayerType.North:
            localindex = 3;
            break;
        }

        seatindex = RoomMgr.GetInstance().getSeatIndexByLocal(localindex);

        _handCardMgr      = GetComponentInChildren <DHM_HandCardManager>();
        _recyleCardMgr    = GetComponentInChildren <DHM_RecyleHandCardManager>();
        _pengGangMgr      = GetComponentInChildren <PengGangManager>();
        _handAnimationCtr = GetComponentInChildren <DHM_HandAnimationCtr>();

        _handCardMgr.seatindex   = seatindex;
        _recyleCardMgr.seatindex = seatindex;
        _pengGangMgr.seatindex   = seatindex;

        _handCardMgr.chuPaiEvent           += _recyleCardMgr.ChuPai;
        _recyleCardMgr.ChuPaiCallBackEvent += _handCardMgr.ChuPaiCallBackEventHandle;

        if (RoomMgr.GetInstance().seatindex == seatindex)
        {
            SetLayer();
        }
    }
Esempio n. 3
0
    public void onBtnChat()
    {
        //GameAlert.GetInstance().show("测试");

        //DHM_CardManager cm = PlayerManager.GetInstance ().getCardManager (0);

        DHM_CardManager cm = GameObject.Find("WestPlayer").GetComponent <DHM_CardManager> ();
        PengGangManager pg = cm._pengGangMgr;

        //cm._handCardMgr.unittest ();

        DHM_RecyleHandCardManager.playHu();
        //cm._handCardMgr ();
        //gseats[0].GetComponent<GameSeat>().showAction ("peng", 11);
        //gseats[1].GetComponent<GameSeat>().showAction ("chi", 11);
        //gseats[2].GetComponent<GameSeat>().showAction ("gang", 11);
        //gseats[3].GetComponent<GameSeat>().showAction ("qiao", 11);

        //InteractMgr.GetInstance().showQiaoHelp();

        /*
         * List<int> tings = new List<int>();
         *
         * tings.Add (22);
         * tings.Add (33);
         * tings.Add (44);
         *
         * InteractMgr.GetInstance ().showPrompt (tings);
         */

        //Transform tm = cm._handCardMgr._HandCardPlace.transform;

        /*
         * tm.Translate(0, 0.0225f, 0);
         * tm.Rotate(90, 0, 0);
         *
         * tm.Translate(0, 0.05f, 0.0225f);
         * tm.Rotate(-180, 0, 0);
         */
        //tm.Translate (0, 0, 0.05f);
        //tm.Rotate (-90, 0, 0);

        //GameManager.GetInstance ().SwitchTo (2);

        //pg.Peng(134);
        //pg.Peng (341);
        //pg.CreateWanGangCard (341);

        //pg.Peng (141);
        //cm._pengGangMgr.Chi (13);
        //
//		cm._pengGangMgr.Gang (312, false);
//		cm._pengGangMgr.Chi (33);
//		cm._pengGangMgr.Peng (327);

        //cm._pengGangMgr.Chi (11);
        //cm._pengGangMgr.Peng (327);

        //cm._handCardMgr.HuPai(21);

/*
 *              if (show) {
 *                      cm.ActiveChuPaiState (true);
 *              } else {
 *                      cm.HideChuPaiState ();
 *              }
 *
 *              show = !show;
 */
        //GameManager.GetInstance ().PlaySaiZi (0, new int[] { 1, 6 });

/*
 *              VoiceMgr vm = VoiceMgr.GetInstance ();
 *              if (!show) {
 *                      Debug.Log ("start record");
 *                      vm.startRecord ();
 *              } else {
 *                      Debug.Log ("stop record");
 *                      vm.stopRecord ();
 *              }
 *
 *              show = !show;
 */
//		transform.Find("Chat").gameObject.SetActive(true);
    }