void OnEnable()
    {
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }

        if (mainController == null)
        {
            mainController = GameObject.Find("MainController").GetComponent <MainController>();
        }

        mainController.ShowActivityTopUI(ActivityType.E_ACTIVITY_TYPE_GGL);
        this.FreshGGLTimesAndYuanBao();

        if (bFirstEnter)
        {
            this.ResetCard();
            bFirstEnter = false;
        }

        if (Obj_MyselfPlayer.GetMe().GGLTimes == 0)
        {
            bTodayTip = true;
        }
    }
Ejemplo n.º 2
0
 //初始化guide基类基本数据
 public void InitGuide(GuidePlayer gp, MainUILogic mul)
 {
     player     = gp;
     mainLogic  = mul;
     labelIndex = 0;
     curstep    = 0;
 }
Ejemplo n.º 3
0
    //重置升级卡牌 和 材料卡牌
    void ResetHeroCardAndMaterials()
    {
        if (MainUILogic.GetLastWindow() == MainUILogic.ChildIndex.SelectHeroController)
        {
            return;
        }

        if (Obj_MyselfPlayer.GetMe().updateHeroItem != null)
        {
            bool bheroCardInbag = Obj_MyselfPlayer.GetMe().IsCardInBagByID(Obj_MyselfPlayer.GetMe().updateHeroItem.cardID);
            if (!bheroCardInbag)
            {
                Obj_MyselfPlayer.GetMe().updateHeroItem = null;
            }
        }

        UserCardItem[] mataerItemListTemp = Obj_MyselfPlayer.GetMe().updateMaterialItems;
        //把出售了的和保护的过滤
        for (int i = 0; i < mataerItemListTemp.Length; i++)
        {
            if (mataerItemListTemp[i] != null &&
                (mataerItemListTemp[i].isProtected ||
                 !Obj_MyselfPlayer.GetMe().IsCardInBagByID(mataerItemListTemp[i].cardID) ||
                 mataerItemListTemp[i].IsInFightArray()))
            {
                mataerItemListTemp[i] = null;
            }
        }
    }
    void OnEnable()
    {
        for (int i = 0; i < Obj_MyselfPlayer.GetMe().PvPBattleArray.Length; i++)
        {
            TempBattleArray[i] = Obj_MyselfPlayer.GetMe().PvPBattleArray[i];
        }

//		Debug.LogError(isSelectLeader == true ? "Select Team Leader" : "Select Team Member");
        mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        if (mainController == null)
        {
            mainController = mainUILogic.mainController.GetComponent <MainController>();
        }
        if (isSelectLeader && bottomBox != null)
        {
            bottomBox.SetActive(false);
            title.spriteName = "zhujiemian_xuanzeduizhang";
            mainController.showBottomBar();
        }
        else
        {
            bottomBox.SetActive(true);
            title.spriteName = "zhujiemian_xuanzeduiyuan";
            mainController.hideBottomBar();
        }
        initCardList();
    }
Ejemplo n.º 5
0
 public void OnChooseCard()
 {
     if (mainUILogic == null)
     {
         mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainUILogic.OnPVPTeamWindow();
 }
 void LoadSelectMemberWindow()
 {
     if (mainUILogic == null)
     {
         mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainUILogic.LoadPvPSelectMemberWindow();
 }
Ejemplo n.º 7
0
 public static void GoProtectCard(GameObject button)
 {
     if (mainLogic == null)
     {
         mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainLogic.onHeroWindow();
 }
Ejemplo n.º 8
0
 void OnFlowerRewardClick()
 {
     if (MainUILogic.Instance() != null)
     {
         IsOpenAward = true;
         UIManager.ShowUI(UIInfo.AwardRoot);
     }
 }
Ejemplo n.º 9
0
 private static void BackToQxzbPvPController(GameObject go)
 {
     if (mainLogic == null)
     {
         mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainLogic.OnQxzbPvPWindow();
 }
Ejemplo n.º 10
0
 public static void GoPVEWindow(GameObject button)
 {
     if (mainLogic == null)
     {
         mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainLogic.LoadMainToPveSceneList();
 }
Ejemplo n.º 11
0
 public static void GoShop(GameObject button)
 {
     if (mainLogic == null)
     {
         mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainLogic.OnShopWindow();
 }
 void OnChooseFinish()
 {
     if (mainUILogic == null)
     {
         mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     }
     mainUILogic.OnPVPBattleBeforeController();
 }
Ejemplo n.º 13
0
    public void OnRecharge()
    {
//		BoxManager.showMessage("功能暂未开放");
//		BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }
        mainLogic.OnPurchaseWindow();
    }
Ejemplo n.º 14
0
    public void ConnectLost()
    {
        if (!GameManager.gameManager.OnLineState)
        {
            return;
        }
        if (LoginUILogic.Instance() != null)
        {
            LoginUILogic.Instance().EnterServerChoose();
            // 连接丢失,请重新登录
#if !UNITY_WP8
            MessageBoxLogic.OpenOKBox(1292, 1000);
#else
            if (!m_DeviceLost)
            {
                MessageBoxLogic.OpenOKBox(1292, 1000);
            }
#endif

            return;
        }
        else if (MainUILogic.Instance() != null)
        {
            if (!m_bAskConnecting || null != MessageBoxLogic.Instance())
            {
                LogModule.DebugLog("reconnecting....");
                // 连接丢失,正在重新连接。。。
#if UNITY_WP8
                if (!m_DeviceLost)
                {
                    MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect);
                }
                else
                {
                    WP8ConnectingLostLogic();
                }
#else
                MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect);
#endif

                m_bAskConnecting  = true;
                m_IsAskConnecting = true;
                if (BackCamerControll.Instance() != null && BackCamerControll.Instance().gameObject.activeInHierarchy)
                {
                    BackCamerControll.Instance().gameObject.SetActive(false);
                }
                WorldMapWindow.OnDisConnect();
                HuaShanPVPData.OnDisconnect();
            }
        }
        else
        {
            // 有可能在loading不处理,等UI起来后检测
        }
    }
Ejemplo n.º 15
0
    public static void GoRecharge(GameObject button)
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn58).ToString());
//		BoxManager.showMessage("功能暂未开放");
//		BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }
        mainLogic.OnPurchaseWindow();
    }
Ejemplo n.º 16
0
 void OnEnable()
 {
     if (mainController == null)
     {
         mainLogic      = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
         mainController = mainLogic.mainController.GetComponent <MainController>();
     }
     if (Obj_MyselfPlayer.GetMe().selectedCardID != -1)
     {
         FreshCardInfo(Obj_MyselfPlayer.GetMe().selectedCardID);
     }
 }
Ejemplo n.º 17
0
    void OnEnable()
    {
        mainLogic      = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        mainController = mainLogic.mainController.GetComponent <MainController>();
        mainController.hideTopBar();
        mainController.showBottomBar();

        RefreshFengShuiInfor();

        //默认点击的风水阵
        if (globalLastSelected == 0)
        {
            TopClicked(transform.FindChild("Graph/Grid/1/top").gameObject);
        }
    }
Ejemplo n.º 18
0
    public bool Init()
    {
        GameObject m;
        Transform  g;

        m = GameObject.Find("MainUILogic");
        g = GameObject.FindWithTag("MainCamera").transform.FindChild("GuideAnchor/GuidePanel/GuidePlayer");
        if (m == null || g == null)
        {
            return(false);
        }
        mainLogic   = m.GetComponent <MainUILogic>();
        guidePlayer = g.GetComponent <GuidePlayer>();
        return(true);
    }
Ejemplo n.º 19
0
 public static void ActiveShowChallengeUI()
 {
     if (MainUILogic.Instance() != null)
     {
         //活动界面已经被点开了。什么都不做
         if (null != ActivityController.Instance())
         {
             return;
         }
         else
         {
             ActivityController.RequireOpenPVPTab();
             UIManager.ShowUI(UIInfo.Activity, OnActiveShowActiviController);
         }
     }
 }
    void OnEnable()
    {
        mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
//		Debug.LogError("Init Team");

        long leaderCardID = Obj_MyselfPlayer.GetMe().curPvPLearder;

        if (leaderCardID <= 0 || !Obj_MyselfPlayer.GetMe().IsCardInBagByID(leaderCardID))         //无队长或者队长卡不存在
        {
            this.transform.gameObject.SetActive(false);
            LoadSelectHeaderWindow();
            return;
        }

        initTeamCard();
    }
Ejemplo n.º 21
0
    public static void BuyPowerDone(bool isSuccess)
    {
        if (isSuccess)
        {
            if (mainLogic == null)
            {
                mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
            }
            mainLogic.SendMessage("refreshTopBar");
//			BoxManager.showMessage("购买成功!");
            BoxManager.showMessageByID((int)MessageIdEnum.Msg59);
        }
        else
        {
            Debug.LogError("Shop Buy Error !");
        }
    }
Ejemplo n.º 22
0
 public static void BuyGoldFinish(bool isSucess)
 {
     if (isSucess)
     {
         if (mainLogic == null)
         {
             mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
         }
         mainLogic.SendMessage("refreshTopBar");
         BoxManager.showMessageByID((int)MessageIdEnum.Msg59);
         Debug.Log("Buy Gold Finish");
     }
     else
     {
         Debug.LogError("Buy Gold Error");
     }
 }
Ejemplo n.º 23
0
    void OnEnable()
    {
        mainUILogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        curStar     = Obj_MyselfPlayer.GetMe().curPvPStar;

        initPvPData();

        long leaderCardID = Obj_MyselfPlayer.GetMe().curPvPLearder;

        if (leaderCardID <= 0 || !Obj_MyselfPlayer.GetMe().IsCardInBagByID(leaderCardID))         //无队长或者队长卡不存在
        {
            this.transform.gameObject.SetActive(false);
            OnChooseCard();
            return;
        }

        FreshUI();
    }
Ejemplo n.º 24
0
    void Awake()
    {
        mainLogic      = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        mainController = mainLogic.mainController.GetComponent <MainController>();

        friendLotteryOneCost        = TableManager.GetGambleCostByID((int)LotteryController.LOTTERY_TYPE.FRIEND).OneCost;
        friendLotteryTenCost        = TableManager.GetGambleCostByID((int)LotteryController.LOTTERY_TYPE.FRIEND).TenCost;
        diamondLotteryOneCost       = TableManager.GetGambleCostByID((int)LotteryController.LOTTERY_TYPE.DIAMOND).OneCost;
        diamondLotteryTenCost       = TableManager.GetGambleCostByID((int)LotteryController.LOTTERY_TYPE.DIAMOND).TenCost;
        Application.targetFrameRate = -1;
        layer1_scale     = layer1.transform.localScale;
        layer2_1_scale   = layer2_1.transform.localScale;
        layer2_2_scale   = layer2_2.transform.localScale;
        layer3_scale     = layer3.transform.localScale;
        layer4_2position = layer4_2.transform.localPosition;
        layer8_scale     = layer8.transform.localScale;
        layer9_scale     = layer9.transform.localScale;
    }
    void OnEnable()
    {
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }
        if (mainController == null)
        {
            mainController = GameObject.Find("MainController").GetComponent <MainController>();
        }

        mainController.ShowActivityTopUI(ActivityType.E_ACTIVITY_TYPE_PATA);
        mainLogic.SetMainUIBottomBarActive(true);

        if (lefttimeslabel != null)
        {
            lefttimeslabel.GetComponent <UILabel>().text = Obj_MyselfPlayer.GetMe().pataTimes.ToString();
        }
        if (currentPatafloorlabel != null)
        {
            currentPatafloorlabel.GetComponent <UILabel>().text = Obj_MyselfPlayer.GetMe().pataNum.ToString();
        }
        if (Obj_MyselfPlayer.GetMe().pataTimes > 0 || (Obj_MyselfPlayer.GetMe().pataTimes == 0 && Obj_MyselfPlayer.GetMe().pataNum > 0))
        {
            if (startBattleBtn != null)
            {
                startBattleBtn.collider.enabled = true;
                startBattleBtn.transform.FindChild("Sprite").GetComponent <UISprite>().spriteName     = "kaishizhandou";
                startBattleBtn.transform.FindChild("Background").GetComponent <UISprite>().spriteName = "anniu_1";
                UIEventListener.Get(startBattleBtn).onClick += OnStartBattle;
            }
        }
        else
        {
            if (startBattleBtn != null)
            {
                startBattleBtn.collider.enabled = false;
                startBattleBtn.transform.FindChild("Sprite").GetComponent <UISprite>().spriteName     = "kaishizhandou_2";
                startBattleBtn.transform.FindChild("Background").GetComponent <UISprite>().spriteName = "anniu_3";
            }
        }
    }
Ejemplo n.º 26
0
 void Start()
 {
     //更新用户数据
     updateUserInfo();
     //		cloneGuideItem();
     if (needFlashWulin)
     {
         startFlashWuLin();
     }
     if (needFlashLunJian)
     {
         startFlashLunJian();
     }
     mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
     //---------------------------新手引导中断参考变量----------------------------
     PlayerPrefs.SetInt("GUIDE_INT_TEMP", 0);
     Debug.Log("*** Set PlayerPrefs ***    ***GUIDE_INT_TEMP = 0***");
     //----------------------------------END-----------------------------------
     //Obj_MyselfPlayer.GetMe().TestClearPlayerSet();
 }
    public void FakeFinishPay(bool bSuccess, string result)
    { // 假的支付完成
        BoxManager.removeMessage();
        GameObject mainLogic = GameObject.Find("/MainUILogic");

        if (mainLogic != null)
        {
            MainUILogic muil = mainLogic.GetComponent <MainUILogic>();
            if (muil != null)
            {
                muil.RefreshRecordList();
            }
        }
        if (bSuccess == true)
        {
            Debug.Log("pllog_UpdateUserInfo dollar=" + Games.CharacterLogic.Obj_MyselfPlayer.GetMe().dollar);
            GameObject.FindWithTag("main_controller").SendMessage("updateUserInfo");
            BoxManager.showMessage(result, ""); //WML MARK
        }
    }
Ejemplo n.º 28
0
    public void OnAskBattleDataRet(bool bSuccess)
    {
        //LoadingController.Instance.show_load();//战斗切换loading界面//
        switch (GuideManager.Instance.currentStep)
        {
        case GuideManager.GUIDE_STEP.COPY1_1:
            GuideCopy1_1.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        case GuideManager.GUIDE_STEP.COPY1_2:
            GuideCopy1_2.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        case GuideManager.GUIDE_STEP.COPY1_3:
            GuideCopy1_3.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        case GuideManager.GUIDE_STEP.COPY1_4:
            GuideCopy1_4.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        case GuideManager.GUIDE_STEP.COPY1_5:
            GuideCopy1_5.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        case GuideManager.GUIDE_STEP.COPY2_1:
            GuideCopy2_1.Instance.NextStep();    //新手战斗引导 SELECT_6
            break;

        default:
            break;
        }
        optSuccess = true;
        GameObject  obj1      = GameObject.FindWithTag("main_ui_logic");
        MainUILogic mainlogic = obj1.GetComponent <MainUILogic>();

        mainlogic.LoadBattleUIScene();
    }
Ejemplo n.º 29
0
    /// <summary>
    /// 加载UI
    /// </summary>
    /// <param name="strUIName">UI名字</param>
    /// <param name="nLevel">UI级别</param>
    /// <returns></returns>
    public static GameObject LoadUIPrefab(string strUIName, int nUILevel)
    {
        if (null == GameManager.gameManager)
        {
            LogModule.ErrorLog("can not find gamemanager");
            return(null);
        }

        if (null == GameManager.gameManager.ActiveScene)
        {
            LogModule.ErrorLog("can not find ActiveScene");
            return(null);
        }

        GameObject uiRoot = GameManager.gameManager.ActiveScene.UIRoot;

        if (null == uiRoot)
        {
            LogModule.ErrorLog("can not find uiroot");
            return(null);
        }
        string     strPath = "Prefab/UI/" + strUIName;
        GameObject newObj  = InstantiateResource(strPath, strUIName) as GameObject;

        if (newObj)
        {
            newObj.transform.parent        = uiRoot.transform;
            newObj.transform.localPosition = Vector3.zero;
            newObj.transform.localScale    = Vector3.one;
            if (MainUILogic.Instance() != null)
            {
                MainUILogic.Instance().DicUI.Add(strUIName, newObj);
                MainUILogic.Instance().DicUILevel.Add(strUIName, nUILevel);
            }
        }

        return(newObj);
    }
Ejemplo n.º 30
0
    void OnEnable()
    {
#if UNITY_ANDROID
        int level = 20;
        if (Obj_MyselfPlayer.GetMe().level >= level || WebMediator.GetNetworkType().Equals("3g"))
        {
            Debug.Log("open other billing button");
            otherPurchaseBtn.SetActive(true);
        }
        else
        {
            Debug.Log("close other billing button");
            otherPurchaseBtn.SetActive(false);
        }
#elif UNITY_IPHONE
        otherPurchaseBtn.SetActive(false);
#endif
        RefreshUI(true);
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }
        mainLogic.mainController.GetComponent <MainController>().showBottomBar();
    }
Ejemplo n.º 31
0
 protected virtual void Start()
 {
     ui = GameObject.Find("UILogic").GetComponent<MainUILogic>();
     hidUtils = GameObject.Find("HIDUtils").GetComponent<HIDUtils>();
     FixExitAbnormally();
     RegisterEvents();
 }