Example #1
0
 private void btnExitYes()
 {
     StartWndUIController.ShowOrHide(true);
     ClearAllZombie();
     p._ZombieMgr.RemoveAllZombie();
     p.ClearGold();
     p.DestroyEvent();
     BagWndUIController.getMe().gameObject.SetActive(false);
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        Player p = new Player();

        p.id = 1;

        PlayerManager.Instance.AddPlayer(p);
        BattleManager.Instance.leftPlayer = p;
        StartWndUIController.ShowOrHide(true);
    }
    //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);
    }