示例#1
0
    /// <summary>
    /// 注册僵尸卡
    /// </summary>
    /// <param name="btn"></param>
    private void ZombieCardBtnOnClick(Button btn)
    {
        if (uiMgr.getMe().FindUI(MenuWndUIController.ui_name) == null)
        {
            MenuWndUIController.ShowOrHide(true);
        }
        else
        {
            MenuWndUIController.getMe().gameObject.SetActive(true);
            MenuWndUIController.getMe().Notify();
            uiMgr.getMe().setTopUI(MenuWndUIController.ui_name);
        }

        MenuWndUIController.getMe().transform.position = btn.transform.position;
        MenuWndUIController.getMe().id     = Intercept.Instance.GetIdForBagName(btn.transform.parent.name);
        MenuWndUIController.getMe().zombie = btn.transform.parent.GetComponent <ZombieController>().zombie;
    }
示例#2
0
    /// <summary>
    /// 注册地图图标
    /// </summary>
    /// <param name="btn"></param>
    private void btnOnClick(Button btn)
    {
        //

        if (uiMgr.getMe().FindUI(MenuWndUIController.ui_name) != null)
        {
            if (MenuWndUIController.getMe().MovePutDown() == true)
            {
                return;
            }
        }


        if (p._ZombieMgr.GetAllZombie().Count < 1)
        {
            return;
        }
        //if (uiMgr.getMe().FindUI(BagWndUIController.ui_name) == null)
        //{
        //    BagWndUIController.ShowOrHide(true);
        //}
        //else
        //{
        uiMgr.Instance.setTopUI(BagWndUIController.ui_name);
        BagWndUIController.getMe().SetFirstBtnOnNode();
        //}
        //Debug.Log("btn");
        //var g = BagWndUIController.getMe().getCurButton().name;


        ZombieInfo thisCard = p._ZombieMgr.GetZombie(Intercept.Instance.GetCardIdForBagName(BagWndUIController.getMe().getCurButton().name)).zombie;

        if (thisCard == null)
        {
            return;
        }
        BagWndUIController.getMe().SetCardShow(thisCard);
    }
    //private void btnOnEnter(Button btn)
    //{
    //    btn.image.color = Color.white;
    //}

    //private void btnOnExit(Button btn)
    //{
    //    btn.image.color = Color.grey;
    //}

    //单机模式
    private void btnSingleOnClick()
    {
        GroundManager.getMe().ClearNum();
        BattleManager.Instance.leftPlayer.Init();
        if (uiMgr.getMe().FindUI(MenuWndUIController.ui_name) != null)
        {
            MenuWndUIController.getMe().isPingpong = false;
        }


        if (uiMgr.getMe().FindUI(BagWndUIController.ui_name) != null)
        {
            BagWndUIController.getMe().gameObject.SetActive(true);
            BagWndUIController.getMe().Notify();
            uiMgr.getMe().setTopUI(BagWndUIController.ui_name);
        }
        BagWndUIController.ShowOrHide(true);

        if (uiMgr.getMe().FindUI(BattleWndUIController.ui_name) != null)
        {
            BattleWndUIController.getMe().gameObject.SetActive(true);
            BattleWndUIController.getMe().SetFirstBtnOnNode();
            EventManager.getMe().GoldAdd(8);
        }

        BattleWndUIController.ShowOrHide(true);

        if (uiMgr.getMe().FindUI(BuyWndUIController.ui_name) != null)
        {
            BuyWndUIController.getMe().gameObject.SetActive(true);
            uiMgr.getMe().setTopUI(BuyWndUIController.ui_name);
            BuyWndUIController.getMe().Notify();
        }
        BuyWndUIController.ShowOrHide(true);

        StartWndUIController.ShowOrHide(false);
    }