Ejemplo n.º 1
0
        public void OnVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio)
        {
            try
            {
                if (!AppSettings.ShowVideoWithDynamicHeight)
                {
                    return;
                }

                if (height > width)
                {
                    height = GetPortraitHeight(height);
                }
                // Get layout params of view
                // Use MyView.this to refer to the current MyView instance
                // inside a callback
                var p         = MainRoot.LayoutParameters;
                int currWidth = MainRoot.Width;

                // Set new width/height of view
                // height or width must be cast to float as int/int will give 0
                // and distort view, e.g. 9/16 = 0 but 9.0/16 = 0.5625.
                // p.height is int hence the final cast to int.
                p.Width  = currWidth;
                p.Height = (int)((float)height / width * currWidth);

                // Redraw myView
                MainRoot.RequestLayout();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 2
0
        public void OnDetailClick()
        {
            UMengPlugin.UMengEvent(EventId.VEGETABLE_EXPLAIN, new Dictionary <string, object> {
                { "code", _userVegetable.VegetableCode }, { "level", _userVegetable.CurrentLevel }
            });

            //这个复杂了,每个技能的介绍或许还不一样
            var vegetableIntroTextConfig =
                ConfigManager.GetConfig(ConfigManager.ConfigType.VegetableIntroTextConfig) as VegetableIntroTextConfig;

            if (vegetableIntroTextConfig == null)
            {
                Debug.LogError("没有VegetableIntroTextConfig");
                return;
            }
            var vegetableIntro =
                vegetableIntroTextConfig.IntroList.Find(x => x.VegetableCode == _userVegetable.VegetableCode);

            if (vegetableIntro == null)
            {
                Debug.LogError("没有vegetableIntro.Code:" + _userVegetable.VegetableCode);
                return;
            }
            MorlnTooltip.Show(vegetableIntro.IntroContent, MainRoot.InverseTransformPoint(VegetableArtContentContainer.position));
        }
Ejemplo n.º 3
0
 void OnPlanetSceneUnloaded(Scene scene)
 {
     SceneManager.sceneUnloaded -= OnPlanetSceneUnloaded;
     SceneManager.sceneLoaded   += OnPlanetSceneLoaded;
     //GetParentalController().SetProc(Procs_BaseActController._Main);
     SceneManager.LoadSceneAsync(MainRoot.GetAppConf().worldToLoad, LoadSceneMode.Additive);
 }
Ejemplo n.º 4
0
            protected void thisEnter()
            {
                AppI_Debug.ShowMsg("BaseAct Controller proc_Main thisEnter");

                MainRoot.GetUIMgr().HudCamPegs.gameObject.SetActive(true);
                MainRoot.GetUIMgr().HudQuads.gameObject.SetActive(true);
                MainRoot.GetUIMgr().HUDSpares.gameObject.SetActive(true);
            }
Ejemplo n.º 5
0
    public override void _Ready()
    {
        main         = GetTree().CurrentScene as MainRoot;
        pauseButton  = GetNode <TextureButton>("PauseButton");
        buttons      = GetNode <HBoxContainer>("Buttons");
        settingMenue = GetTree().CurrentScene.GetNode <Control>("Hud/SettingMenue");

        buttons.Hide();
    }
Ejemplo n.º 6
0
 private void OnEnterGameClick()
 {
     //MainRoot.Goto(MainRoot.UIStateName.Menu);
     MainRoot.Goto(MainRoot.UIStateName.Game);
     MainController.Instance.Execute(new Communication.UpperPart.StartChallenge
     {
         RoundTimeout = 999,
     });
 }
Ejemplo n.º 7
0
 void OnExitClick()
 {
     if (_hasChanged)
     {
         SystemSettings.SaveSettingsToHD();
     }
     OnConfirmClick();
     MainRoot.Goto(MainRoot.UIStateName.Entrance);
 }
Ejemplo n.º 8
0
 void Awake()
 {
     MainRoot.SetTerrainLot(FindObjectOfType <TerrainLot>());
     MainRoot.GetUIMgr().HudQuads = FindObjectOfType <HUDQuadDiag>();
     MainRoot.GetUIMgr().HudQuads.gameObject.SetActive(false);
     MainRoot.GetUIMgr().HUDSpares = FindObjectOfType <HUDSpareDiag>();
     MainRoot.GetUIMgr().HUDSpares.gameObject.SetActive(false);
     MainRoot.GetUIMgr().HudCamPegs = FindObjectOfType <HUDCamPeg>();
     MainRoot.GetUIMgr().HudCamPegs.gameObject.SetActive(false);
 }
Ejemplo n.º 9
0
        public void OnRealTimeFightingClick()
        {
            CommonData.RivalUser     = null;
            GameData.LastChallengeID = null;
            Requester.Instance.Send(new NewMatch());//发送消息
            MainRoot.Goto(MainRoot.UIStateName.Match);
            MatchUI.Instance.RefreshBeforeMatch();

            UMengPlugin.UMengEvent(EventId.HOME_MULTI, null);
        }
Ejemplo n.º 10
0
        IEnumerator GotoEndRoundUICoroutine(EndRound cmd)
        {
            yield return(new WaitForSeconds(2));

            MainRoot.Goto(MainRoot.UIStateName.EndRound);
            while (!EndRoundUI.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            EndRoundUI.Instance.PlayEndRoundProcess(cmd);
        }
Ejemplo n.º 11
0
            protected void thisEnter()
            {
                AppI_Debug.ShowMsg("BaseAct Controller proc_Boot thisEnter");

                SceneManager.sceneUnloaded += OnPlanetSceneUnloaded;

                ((BaseActController)actBase).planeObj.SetActive(true);
                ((BaseActController)actBase).terrainObj.SetActive(true);
                ((BaseActController)actBase).sunObj.SetActive(false);

                SceneManager.UnloadSceneAsync(MainRoot.GetAppConf().homeToLoad);
            }
Ejemplo n.º 12
0
        IEnumerator GotoPlayingRealTimeCoroutine(float delay)
        {
            yield return(new WaitForSeconds(delay));

            MainRoot.Goto(MainRoot.UIStateName.Game);
            while (!GameManager.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            GameManager.Instance.ResetAndRefreshBeforeRealTimeFighting();
            CandyBAPool.Instance.PrepareAllCandys();
        }
Ejemplo n.º 13
0
        public void OnConfirmClick()
        {
            if (_gotoNext)
            {
                Debug.LogError("出错了");
                return;

                MusicManager.Instance.CrossFadeIn();
                MainRoot.Goto(MainRoot.UIStateName.PushLevel);
            }
            else
            {
                _gotoNext = true;
            }
        }
Ejemplo n.º 14
0
        IEnumerator _ReturnToPushLevelUI()
        {
            MainRoot.Goto(MainRoot.UIStateName.PushLevel);
            while (!PushLevelUI.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            var majorLevelUnlockInfo =
                CommonData.ChallengeUnlockInfoList.Find(x => x.MajorLevelId == GameData.LastChallengeMajorLevelID);

            if (majorLevelUnlockInfo != null)
            {
                PushLevelUI.Instance.EnterMajorLevel(majorLevelUnlockInfo);
            }
        }
Ejemplo n.º 15
0
    public static void Main(string[] args)
    {
        MainRoot Input = JsonConvert.DeserializeObject <MainRoot>(File.ReadAllText(@"C:\Users\rajesh.konki\Desktop\json\input.json"));

        one = JsonConvert.DeserializeObject <List <Movie> >(File.ReadAllText(@"C:\Users\rajesh.konki\Desktop\wikipedia-movie-data-master\wikipedia-movie-data-master\movies.json"));
        if (Input.title != null)
        {
            foreach (var x in SearchTitle(Input.title))
            {
                result.Add(x);
            }
        }
        foreach (var x in result)
        {
            Console.WriteLine(x.title);
            Console.WriteLine(x.year);
        }
        try
        {
            if (Input.years != 0)
            {
                foreach (var x in YearSearch(Input.years))
                {
                    result.Add(x);
                }
            }
        }catch (Exception e)
        {
            Console.WriteLine(e);
        }


        //Console.WriteLine(Input.years);
        //if (input.years != 0)
        //    yearsearch(input.years);
        //  List<string> rs = new List<string>();
        //foreach(var x in Input.cast)
        //  {
        //      rs.Add(x);


        //  }
        //  CastCheck(rs);

        Console.Read();

        //Console.WriteLine(obj.Title);
    }
Ejemplo n.º 16
0
 public static void Load()
 {
     if (Instance)
     {
         MainRoot.FocusPanel(Instance);
     }
     else
     {
         if (!Prefab)
         {
             Debug.LogWarning("找不到Panel的Prefab");
             return;
         }
         MainRoot.ShowPanel(Prefab);
     }
 }
Ejemplo n.º 17
0
        public void Execute(StartChallenge cmd)
        {
            GameData.FriendDataList  = cmd.FriendDataList;
            GameData.LastChallengeID = cmd.ChallengeId;

            MainRoot.Goto(MainRoot.UIStateName.Game);

            if (CommonData.MyUser != null)
            {
                CommonData.MyUserOld = CommonData.MyUser.GetDuplicate(); //备份旧的MyUser
            }
            StartCoroutine(GotoPlayingChallengeCoroutine(2));            //最好有倒计时

            MusicManager.Instance.CrossFadeOut();                        //音乐渐出

            CandyBAPool.Instance.PrepareAllCandys();                     //预加载所有糖果
        }
Ejemplo n.º 18
0
 public static void Load()
 {
     if (Instance)
     {
         MainRoot.FocusPanel(Instance);
     }
     else
     {
         if (!Prefab)
         {
             return;
         }
         MainRoot.ShowPanel(Prefab);
     }
     if (Instance)
     {
         Instance.Initialize();
     }
 }
Ejemplo n.º 19
0
    void Awake()
    {
        Instance = this;
        Debug.Log("屏幕分辨率:" + Screen.width + "*" + Screen.height + "; Ratio:" + (Screen.height * 1f / Screen.width));
        if (Screen.height * 1f / Screen.width > 1.5f)//如果屏幕太高,就在上下增加白边
        {
// ReSharper disable PossibleLossOfFraction
            foreach (var myCamera in Cameras)
            {
                myCamera.orthographicSize = 320 * Screen.height / Screen.width;
            }
// ReSharper restore PossibleLossOfFraction
            Background.localScale = new Vector3(1, Screen.height / 1.5f / Screen.width, 1);
        }
        else if (Screen.height * 1f / Screen.width < 1.5f)
        {
            Background.localScale = new Vector3(Screen.width * 1.5f / Screen.height, 1, 1);
        }
    }
Ejemplo n.º 20
0
        void OnClick()
        {
            UMengPlugin.UMengEvent(EventId.EQUIP_INTRO, new Dictionary <string, object> {
                { "code", _equip.EquipCode }
            });                                                                                                      //发送统计事件

            if (_equip == null)
            {
                return;
            }
            var equipIntroTextConfig =
                ConfigManager.GetConfig(ConfigManager.ConfigType.EquipIntroTextConfig) as EquipIntroTextConfig;

            if (equipIntroTextConfig != null)
            {
                var equipIntro = equipIntroTextConfig.IntroList.Find(x => x.EquipCode == _equip.EquipCode);
                var text       = equipIntro.IntroContent + (_worn ? "\n[FFFF00]双击脱下[-]" : "\n[FFFF00]双击穿上[-]");
                MorlnTooltip.Show(text, MainRoot.InverseTransformPoint(transform.position));
            }
        }
Ejemplo n.º 21
0
        IEnumerator GotoPlayingChallengeCoroutine(float delay)
        {
            var curT = Time.time;

            while (!GameManager.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            GameManager.Instance.ResetAndRefreshBeforeChallengeFighting(2);
            while (Time.time - curT < delay)
            {
                yield return(new WaitForEndOfFrame());
            }

            State = new State.PlayingChallenge();     //切状态

            MainRoot.Goto(MainRoot.UIStateName.Game); //确保进入了GameUI,一般无用

            GameManager.Instance.StartChallengeRound();
        }
Ejemplo n.º 22
0
    /// <summary>
    /// 实例化。开始切换时调用。不会重复加载
    /// </summary>
    /// <returns></returns>
    public static EntranceUI Load(bool useAnimation = true)
    {
        if (Instance)
        {
            return(Instance);         //不重复加载
        }
        if (!Prefab)
        {
            return(null);
        }
        var ui = MainRoot.LoadUI(Prefab, useAnimation);

        Instance = ui.GetComponent <EntranceUI>();
        Instance.ResetUIRange();
        Instance.Initialize();
        if (useAnimation)
        {
            Instance.DelayEnterStageCoroutine();
        }
        return(Instance);
    }
Ejemplo n.º 23
0
        public void Execute(RequestChallengeOk cmd)
        {
            GameData.LastChallengeMajorLevelID = cmd.MajorLevelId;
            GameData.LastChallengeSubLevelID   = cmd.SubLevelId;

            //为之后准备好SubLevelData
            var hasCorrectsubLevelData = false;
            var challengeLevelConfig   =
                ConfigManager.GetConfig(ConfigManager.ConfigType.ChallengeLevelConfig) as ChallengeLevelConfig;

            if (challengeLevelConfig != null)
            {
                var majorLevelData =
                    challengeLevelConfig.MajorLevelList.Find(x => x.MajorLevelId == GameData.LastChallengeMajorLevelID);
                if (majorLevelData != null)
                {
                    GameData.LastMajorLevelData = majorLevelData;
                    GameData.LastSubLevelData   =
                        majorLevelData.SubLevelList.Find(x => x.SubLevelId == GameData.LastChallengeSubLevelID);
                    hasCorrectsubLevelData = true;
                }
            }
            if (!hasCorrectsubLevelData)
            {
                GameData.LastMajorLevelData = null;
                GameData.LastSubLevelData   = null;
            }

            GameData.LastChallengeID = cmd.ChallengeId;
            GameData.FellowDataList  = cmd.FellowDataList;
            GameData.RivalBossData   = cmd.BossData;

            MainRoot.Goto(MainRoot.UIStateName.Match);
            if (MatchUI.Instance)
            {
                MatchUI.Instance.RefreshBeforeChallenge();
            }
        }
Ejemplo n.º 24
0
        IEnumerator _GotoPushLevel()
        {
            MainRoot.Goto(MainRoot.UIStateName.PushLevel);
            while (!PushLevelUI.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            var unlocks = CommonData.ChallengeUnlockInfoList.Where(x => x.Unlocked);
            MajorLevelUnlockInfo max = null;

            foreach (var majorLevelUnlockInfo in unlocks)
            {
                if (max == null || majorLevelUnlockInfo.MajorLevelId > max.MajorLevelId)
                {
                    max = majorLevelUnlockInfo;
                }
            }
            //PushLevelUI.Instance.EnterMajorLevel(max);
            if (max != null && max.MajorLevelId > 1)
            {
                PushLevelUI.Instance.Planet.GoToIndex(max.MajorLevelId - 1);
            }
        }
Ejemplo n.º 25
0
 public static bool PersonLogin(string Us, string Pas)
 {
     try
     {
         using (var db = new Modals.Context())
         {
             var res = db.Persons.Where(i => i.UserName == Us || i.Email == Us)
                       .Where(i => i.Password == Security.Hash_SHA256.CreatHash256(Pas)).FirstOrDefault();
             if (res != null)
             {
                 MainRoot.SetRoot(res.UserName, res.FullName, res.AccessLevel, res.Email, res.PhoneNumber, res.Cart);
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 26
0
    public GameObject ChangeUIMask;//UI过渡时前景遮罩

    void Awake()
    {
        Instance = this;
        var h = Camera.main.pixelHeight;
        var w = Camera.main.pixelWidth;

        Debug.Log("屏幕分辨率:" + w + "*" + h + "; Ratio:" + (h * 1f / w));
        if (ScreenDirection == ScreenDirectionEnum.Landscape)
        {
            if (h / w > 1f / 1.5f) //如果屏幕太高,就在上下增加白边
            {
                // ReSharper disable PossibleLossOfFraction
                MyCamera.orthographicSize = 3.2f * h / w / (1f / 1.5f);
                // ReSharper restore PossibleLossOfFraction
                //if (Background) Background.localScale = new Vector3(1, Screen.height * 1.5f / Screen.width, 1);
            }
            else if (h / w < 1.5f)
            {
                //if (Background) Background.localScale = new Vector3(Screen.width / 1.5f / Screen.height, 1, 1);
            }
        }
        else
        {
            //if (w / h > 1f / 1.5f) //如果屏幕太高,就在上下增加白边
            //{
            //    // ReSharper disable PossibleLossOfFraction
            //    MyCamera.orthographicSize = 3.2f * h / w / (1f / 1.5f);
            //    // ReSharper restore PossibleLossOfFraction
            //    //if (Background) Background.localScale = new Vector3(1, Screen.height * 1.5f / Screen.width, 1);
            //}
            //else if (h / w < 1.5f)
            //{
            //    //if (Background) Background.localScale = new Vector3(Screen.width / 1.5f / Screen.height, 1, 1);
            //}
        }
    }
Ejemplo n.º 27
0
 public void OnReturnClick()
 {
     MainRoot.Goto(MainRoot.UIStateName.Menu);
 }
Ejemplo n.º 28
0
 protected void Unload()
 {
     DestroyImmediate(gameObject);
     DestroyImmediate(this);
     MainRoot.DidDestroyPanel(this);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// 延迟进场,在加载之后,激活之前
 /// </summary>
 /// <returns></returns>
 protected virtual void DelayEnterStageCoroutine()
 {
     gameObject.SetActive(false);
     MainRoot.Instance.StartCoroutine(MainRoot.DelayActivateUI(gameObject));
 }
Ejemplo n.º 30
0
        IEnumerator GuideCoroutine()
        {
            transform.localPosition = new Vector3(0, 0, -500);
            gameObject.layer        = 8;
            var boxCollider = GetComponent <BoxCollider>();

            if (!boxCollider)
            {
                boxCollider = gameObject.AddComponent <BoxCollider>();
            }
            boxCollider.size      = new Vector3(2000, 2000, 0);
            boxCollider.center    = Vector3.zero;
            boxCollider.isTrigger = true;

            //选择昵称
            boxCollider.enabled = false;
            SelectNicknamePanel.Load();
            while (!SelectNicknamePanel.NicknameSelectOk)
            {
                yield return(new WaitForEndOfFrame());
            }

            UMengPlugin.UMengEvent(EventId.NICKNAME_FINISH,
                                   new Dictionary <string, object>
            {
                { "random_times", SelectNicknamePanel.RandomTimes }
            });

            MusicManager.Instance.CrossFadeOut();

            //加载GameUI
            MainRoot.Goto(MainRoot.UIStateName.Game);
            while (!GameManager.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            SelectNicknamePanel.UnloadInterface();//此时才能销毁SelectNicknamePanel,不然会突变
            GameUI.Instance.gameObject.SetActive(false);

            #region 故事板

            _next = false;

            var mangaPrefab = MorlnResources.Load("UI/FreshmanGuide/Prefabs/Manga") as GameObject;
            var manga       = PrefabHelper.InstantiateAndReset(mangaPrefab, transform);
            manga.transform.SetSortingLayer("Foreground");
            manga.GetComponentInChildren <Animator>().enabled = true;
            Destroy(manga, 24f);
            yield return(new WaitForSeconds(22.5f));

            _next = true;
            //while (!_next) yield return new WaitForEndOfFrame();

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "故事板完" }
            });

            GameUI.Instance.gameObject.SetActive(true);

            #region  消教学

            _next = false;
            boxCollider.enabled = false;

            GameData.RivalBossData = new DefenseData("鸡妈妈", 1, 90005, 100, 100);

            GameManager.Instance.ClearDefenserSetAIAndCameraAndTimeScale();

            var grid = GameManager.Instance.MyGrid;

            grid.ResetCells(5, 5, null);
            GameData.InitVegetableTypeCount = 4;
            //填入预设的蔬菜
            const string text = @"0 1 0 3 4
4 3 2 1 0
0 2 4 2 1
3 1 0 4 3
0 1 4 3 2";
            grid.CreateCandysAsPreset(text);

            GameManager.Instance.ResetAndRefreshAndStartFreshmanGuideRound();

            #region 母子对话

            yield return(new WaitForSeconds(1.5f));

            var lines        = new[] { new Line(false, "慢着,老娘我先陪你练练", 2.5f), new Line(true, "妈,我怕伤着你", 1.1f), new Line(false, "少废话,接招", 2f) };
            var bubblePrefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/Bubble");
            var bubbleGo     = PrefabHelper.InstantiateAndReset(bubblePrefab, transform);
            var bubbleSpr    = bubbleGo.GetComponentInChildren <UISprite>();
            var talkLabel    = bubbleGo.GetComponentInChildren <UILabel>();
            foreach (var line in lines)
            {
                bubbleSpr.transform.localScale = new Vector3(line.Left ? -1 : 1, 1, 1);
                talkLabel.text = line.Text;
                yield return(new WaitForSeconds(line.Length));
            }
            Destroy(bubbleGo);

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "母子对话完" }
            });

            //开始遮罩教学
            var        prefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/GuideMask-Sanxiao");
            GameObject go     = null;
            if (prefab)
            {
                go = PrefabHelper.InstantiateAndReset(prefab, MainRoot.Instance.transform);
            }
            else
            {
                Debug.LogError("不能没有这个Prefab!");
            }

            while (!_next)
            {
                //监测是否完成操作,完成则_next = true;
                if (GameData.MyEnergy > 0)
                {
                    _next = true;
                }
                yield return(new WaitForEndOfFrame());
            }
            Destroy(go);
            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "三消教学完" }
            });

            #region 蓄力值

            _next = false;
            boxCollider.enabled = true;

            prefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/GuideMask-Energy");
            go     = null;
            if (prefab)
            {
                go = PrefabHelper.InstantiateAndReset(prefab, MainRoot.Instance.transform);
            }
            else
            {
                Debug.LogError("不能没有这个Prefab!");
            }

            while (!_next)
            {
                yield return(new WaitForEndOfFrame());
            }
            Destroy(go);

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "教蓄力值完" }
            });

            #region 使用技能

            while (true)
            {
                if (GameData.MyEnergy >= GameData.MyEnergyCapacity)
                {
                    break;
                }
                yield return(new WaitForEndOfFrame());
            }

            _next = false;
            boxCollider.enabled = false;

            prefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/GuideMask-UseSkill");
            go     = null;
            if (prefab)
            {
                go = PrefabHelper.InstantiateAndReset(prefab, MainRoot.Instance.transform);
            }
            else
            {
                Debug.LogError("不能没有这个Prefab!");
            }

            while (!_next)
            {
                if (GameData.MyEnergy < 120)
                {
                    _next = true;                         //证明使用过技能了
                }
                yield return(new WaitForEndOfFrame());
            }
            Destroy(go);

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "使用技能完" }
            });

            #region  成了伤害
            while (true)
            {
                if (GameData.RivalHealthList[1] <= 0)
                {
                    break;
                }
                yield return(new WaitForEndOfFrame());
            }

            _next = false;

            yield return(new WaitForSeconds(2));

            boxCollider.enabled = true;

            prefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/GuideMask-Damage");
            go     = null;
            if (prefab)
            {
                go = PrefabHelper.InstantiateAndReset(prefab, MainRoot.Instance.transform);
            }
            else
            {
                Debug.LogError("不能没有这个Prefab!");
            }

            while (!_next)
            {
                yield return(new WaitForEndOfFrame());
            }
            Destroy(go);

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "对战完" }
            });

            #region 结局
            _next = false;
            boxCollider.enabled = false;

            while (true)
            {
                if (GameData.RivalHealthList[0] <= 0 || _next)
                {
                    break;
                }
                yield return(new WaitForEndOfFrame());
            }

            yield return(new WaitForSeconds(2));

            GameData.LastRoundWin = true;

            MainRoot.Goto(MainRoot.UIStateName.EndRound);
            while (!EndRoundUI.Instance)
            {
                yield return(new WaitForEndOfFrame());
            }
            EndRoundUI.Instance.PlayEndRoundProcess_FreshmanGuide(3,
                                                                  new List <Currency>
            {
                new Currency((int)CurrencyType.Coin,
                             CommonData.MyUser.Money10),
                new Currency((int)CurrencyType.Diamond,
                             CommonData.MyUser.Money1)
            }, null);

            prefab = MorlnResources.Load <GameObject>("UI/FreshmanGuide/Prefabs/GuideMask-KillFellow");
            go     = null;
            if (prefab)
            {
                go = PrefabHelper.InstantiateAndReset(prefab, MainRoot.Instance.transform);
            }
            else
            {
                Debug.LogError("不能没有这个Prefab!");
            }

            while (!_next)
            {
                yield return(new WaitForEndOfFrame());
            }
            Destroy(go);

            #endregion

            UMengPlugin.UMengEvent(EventId.GUIDE_PROGRESS,
                                   new Dictionary <string, object>
            {
                { "state", "引导完" }
            });
        }