Exemplo n.º 1
0
        /************************************************自 定 义 方 法************************************************/
        //打开页面
        public override void Open(object param = null)
        {
            base.Open();

            this.lockBox.SetStatus(true);
            SoundPlayer.GetInstance().PlaySoundInChannal("popup_no_network", this.audioPlayer, 0.2f);
        }
Exemplo n.º 2
0
        public override void ProcessState(UIState state)
        {
            bFinish = false;
            object missionObj = state.value0;
            int    missionID  = -1;

            if (missionObj == null || !int.TryParse(missionObj.ToString(), out missionID))
            {
                this.Stop(); return;
            }
            WorldInfo worldInfo = this.MissionConfig.GetWorldByStarID(this.MissionConfig.GetStarIDByMissionID(missionID));

            if (worldInfo == null)
            {
                this.Stop(); return;
            }
            Sprite starSprite = Resources.Load <Sprite>(string.Format("Texture/WorldMap/{0}", worldInfo.Preview));

            if (starSprite == null)
            {
                this.Stop(); return;
            }
            Sprite tipSprite = Resources.Load <Sprite>(this.I18NConfig.GetImagePath("PlayAgain"));

            if (starSprite == null)
            {
                this.Stop(); return;
            }

            this.starImage.sprite = starSprite;
            this.tipImage.sprite  = tipSprite;
            this.gameObject.SetActive(true);
            SoundPlayer.GetInstance().PlaySoundType("mission_complete_retry");
        }
Exemplo n.º 3
0
 public override void Stop()
 {
     base.Stop();
     SoundPlayer.GetInstance().StopSound("mission_complete_retry");
     this.gameObject.SetActive(false);
     this.bFinish = true;
 }
Exemplo n.º 4
0
        void onConnected()
        {
            GuLog.Info("<><InCharging><>onConnected<><>");

            RepeatBatteryUppdate();
            SoundPlayer.GetInstance().PlaySoundType("system_charging_start");
        }
Exemplo n.º 5
0
        /************************************************自 定 义 方 法************************************************/
        //初始化
        private void Initialize()
        {
            if (this.audioPlayer == null)
            {
                this.audioPlayer = this.gameObject.AddComponent <AudioSource>();
            }

            this.FadeIn();
            this.SetCanvasLayer(false);
            RoleManager.Instance.CurrentRole.StatusCheckingEnable = false;
            RoleManager.Instance.CurrentRole.Hide();
            RoleManager.Instance.CurrentRole.Show();
            RoleManager.Instance.Show();
            if (RoleManager.Instance.Mates != null)
            {
                RoleManager.Instance.Mates.ForEach(t => t.HideParticleEffect());
            }
            this.accessories.Initialize(this.PrefabRoot, this.PlayerDataManager, this.AccessoryDataManager, this.LocalPetAccessoryAgent, this.I18NConfig);
            this.accessoryTypes.AccessoryTypeChange += this.OnAccessoryTypeChanged;
            this.accessories.AccessoryChange        += this.OnAccessoryChanged;
            this.accessoryTypes.Initialize(this.PrefabRoot);
            this.qrCodeView.ViewClosed += this.OnQRCodeiewClosed;
            this.stateBar.Initialize();
            this.InvokeRepeating("GetPaidItems", 0, 1f);
            this.LocalPetAccessoryAgent.LoadData();
            SoundPlayer.GetInstance().StopAllSoundExceptMusic();
            SoundPlayer.GetInstance().PlayMusic("mall_bgm");
            this.PlaySound("mall_welcome");
            this.SyncData();
        }
        private void OnDisable()
        {
#if (UNITY_ANDROID) && (!UNITY_EDITOR)
            CupKeyEventHookStaticManager.removePowerKeyPressCallBack(PowerKeyPressUp);
#endif
            SoundPlayer.GetInstance().StopMusic();
        }
Exemplo n.º 7
0
        //顺序5
        private void WaterRiseAnimation()
        {
            FlurryUtil.LogEvent("Drink_Exp_Collect_ani_View");

            if (this.IsNormalStatus())
            {
                SoundPlayer.GetInstance().PlaySoundType("water_raise");
                if (drinkCoin > 0)
                {
                    SoundPlayer.GetInstance().PlaySoundType("gain_coin");
                }
            }

            expBall.SetActive(true);
            Scale(expBall.gameObject);

            if (missionProcess > 0.84)
            {
                expBall.GetComponent <Image>().DOFade(1, 0.01f);
            }
            award.gameObject.SetActive(true);
            int textLength = Mathf.Max(drinkExp.ToString().Length, drinkCoin.ToString().Length);

            expWord.text  = "+" + drinkExp.ToString().PadLeft(textLength, ' ');
            coinWord.text = "+" + drinkCoin.ToString().PadLeft(textLength, ' ');
            Sequence sDropSeq = DOTween.Sequence();

            sDropSeq.Append(expBall.transform.DOLocalMove(this.waterLevel.localPosition + new Vector3(-300, 240, 0), 1.5f).SetEase(Ease.OutQuad))
            .Append(expBall.GetComponent <Image>().DOFade(0, 0.5f))
            .Append(expBall.transform.DOLocalMove(this.waterLevel.localPosition, 0.01f));

            sDropSeq.onComplete = delegate()
            {
                expShiny.Play("ExpShiny");
            };

            award.DOFade(0.5f, 0.8f).SetLoops(3);
            float dest_pos_y = exp_pos_y + 70;

            if (missionProcess < 0.7)
            {
                dest_pos_y = this.waterLevel.localPosition.y + 20;
            }

            award.transform.DOLocalMoveY(dest_pos_y, 2.4f).onComplete = delegate()
            {
                award.DOFade(0, 1.0f).onComplete = delegate()
                {
                    award.transform.DOMoveY(exp_pos_y, 0.5f);
                };
                drinkExp = 0;
                SetFinishAndOpenScreenSave(true);
                uIStateCompleteSignal.Dispatch(GetStateEnum());
            };

            sliderWave.DOValue(missionProcess, 1.0f).onComplete = delegate()
            {
            };
        }
Exemplo n.º 8
0
        /************************************************自 定 义 方 法************************************************/
        //打开页面
        public override void Open(object param = null)
        {
            base.Open();

            this.lockBox.SetStatus(true);
            this.I18NUtils.SetText(this.lockBox.Text, "Feed_No_Coin", true);
            SoundPlayer.GetInstance().PlaySoundInChannal("no_coin", this.audioPlayer, 0.2f);
        }
        /*===============================================界面显示与关闭===============================================*/
        private void OnOpenView(IEvent evt)
        {
            if (evt == null || evt.data == null)
            {
                return;
            }

            this.currentView = (TopViewHelper.ETopView)evt.data;
            //Debug.LogFormat("<><MainSceneMediator.OnOpenView>{0}", this.currentView);
            this.crossContextAction.Enqueue((System.Action)(() =>
            {
                switch (this.currentView)
                {
                case TopViewHelper.ETopView.eAchievement:
                    if (!this.ViewOpened(this.currentView))
                    {
                        this.ShowCommingSoon();
                        this.CloseMainMenuModule(TopViewHelper.ETopView.eCommingSoon);
                    }
                    break;

                case TopViewHelper.ETopView.eFriend:
                    if (!this.ViewOpened(this.currentView))
                    {
                        this.ShowCommingSoon();
                        this.CloseMainMenuModule(TopViewHelper.ETopView.eCommingSoon);
                    }
                    break;

                case TopViewHelper.ETopView.ePetDress:
                    RoleInfo roleInfo = this.RoleConfig.GetRoleInfo(this.dataManager.CurrentPet);
                    if (roleInfo != null && !roleInfo.IsLocal && !this.mLocalPetInfoAgent.ModelExists(roleInfo.Name))
                    {    //当前选中的小宠物的资源不存在,不进入换装页,显示下载页或提示请联网下载资源
                        if (NativeWifiManager.Instance.IsConnected())
                        {
                            this.ShowDownloadPage2View();
                        }
                        else
                        {
                            SoundPlayer.GetInstance().PlaySoundType("download_popup_no_network");
                        }
                        return;
                    }
                    else if (RoleManager.Instance.CurrentRole.PetName != this.dataManager.CurrentPet)
                    {    //当前选中的小宠物的资源已存在,但可能还没加载出来
                        //Debug.LogFormat("<><MainSceneMediator.OnOpenView>PetDress, CurrentName: {0}, Actual Name: {1}", RoleManager.Instance.CurrentRole.PetName, this.dataManager.CurrentPet);
                        return;
                    }

                    if (!this.ViewOpened(this.currentView))
                    {
                        this.ShowPetDress();
                        this.CloseMainMenuModule(TopViewHelper.ETopView.ePetDress);
                    }
                    break;
                }
            }));
        }
Exemplo n.º 10
0
        public override void ProcessState(UIState state)
        {
            shakeAniEnd = false;
            bFinish     = false;
            shakeDrop.Play("shakeDrop");
            SoundPlayer.GetInstance().PlaySoundType("water_cheat");

            StartCoroutine(WaitActionOver("shakeDrop"));
        }
Exemplo n.º 11
0
 //上一个场景
 public void Previous()
 {
     if (this.pageCounter.ItemIndex > 0)
     {
         this.lastButton = this.CurrentButton;
         this.pageCounter.PreItem();
         this.ChangeButton();
         SoundPlayer.GetInstance().PlaySoundType("mall_change_item");
     }
 }
 public override void ProcessState(UIState state)
 {
     bFinish = false;
     ChangeRole();
     doHandBarAni(roleType);
     if (this.PlayerDataManager.LanguageInitialized())//设置过语言后才能播放此声音
     {
         SoundPlayer.GetInstance().PlaySoundType("daily_goal_progress_init_bgm");
     }
 }
Exemplo n.º 13
0
 //下一个场景
 public void Next()
 {
     if (this.pageCounter.ItemIndex + 1 < this.pageCounter.ItemCount)
     {
         this.lastButton = this.CurrentButton;
         this.pageCounter.NextItem();
         this.ChangeButton();
         SoundPlayer.GetInstance().PlaySoundType("mall_change_item");
     }
 }
Exemplo n.º 14
0
 private void PlayEffect(string soundType)
 {
     if (this.effectPlayer.isPlaying)
     {
         return;
     }
     SoundPlayer.GetInstance().PlaySoundInChannal(soundType, this.effectPlayer);
     this.effectPlayer.volume = 0;
     DOTween.To(() => this.effectPlayer.volume, x => this.effectPlayer.volume = x, 1, 1);//用1秒的时间打开音量
 }
        void bigCrownOpenRewardAni(int rewardId)
        {
            string[] openReward = { "open_reward_c", "open_reward_s", "open_reward_g" };
            string[] rewardIdle = { "open_idle_c", "open_idle_s", "open_idle_g" };
            bigCrownGp.AnimationState.ClearTracks();
            bigCrownGp.AnimationState.SetAnimation(0, openReward[rewardId], false);
            bigCrownGp.AnimationState.AddAnimation(0, rewardIdle[rewardId], true, 0);
            SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_fly_in");

            addExpAni();
        }
Exemplo n.º 16
0
        public void SetDailyGoalPercent(float dailyGoalPercent, bool languageInitialized)
        {
            if (normalStatusBar != null)
            {
                normalStatusBar.setAwardAndHandle(dailyGoalPercent);
            }
            if (sleepBar != null)
            {
                sleepBar.setAwardAndHandle(dailyGoalPercent);
            }
            if (schoolBar != null)
            {
                schoolBar.setAwardAndHandle(dailyGoalPercent);
            }

            complete100CwGp.gameObject.SetActive(dailyGoalPercent >= 1);

            if (dailyGoalPercent < 0.3)
            {
                dailyGoalGp1.AnimationState.ClearTracks();
                dailyGoalGp1.AnimationState.SetAnimation(0, "fall_d", false);
                dailyGoalGp1.AnimationState.AddAnimation(0, "small crown_d", true, 0);
                if (languageInitialized)//设置过语言后才能播放此声音
                {
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_jump_in");
                }
            }
            else if (dailyGoalPercent >= 0.3 && dailyGoalPercent < 0.6)
            {
                dailyGoalGp2.AnimationState.ClearTracks();
                dailyGoalGp2.AnimationState.SetAnimation(0, "fall_c", false);
                dailyGoalGp2.AnimationState.AddAnimation(0, "small crown_c", true, 0);
                if (languageInitialized)//设置过语言后才能播放此声音
                {
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_jump_in");
                }
            }
            else if (dailyGoalPercent >= 0.6 && dailyGoalPercent < 1.0)
            {
                dailyGoalGp3.AnimationState.ClearTracks();
                dailyGoalGp3.AnimationState.SetAnimation(0, "fall_s", false);
                dailyGoalGp3.AnimationState.AddAnimation(0, "small crown_s", true, 0);
                if (languageInitialized)//设置过语言后才能播放此声音
                {
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_jump_in");
                }
            }
            else if (dailyGoalPercent >= 1.0)
            {
                complete100CwGp.AnimationState.ClearTracks();
                complete100CwGp.AnimationState.SetAnimation(0, "daily goal crown_drop", false);
                complete100CwGp.AnimationState.AddAnimation(0, "daily goal crown_idle", true, 0);
            }
        }
        private void DuplicateMissionComplete(UIState state)
        {
            this.uiDuplicateMission.uiPropsItems.ForEach(t => t.SetStatus(false));
            this.uiDuplicateMission.uiPropsItems[0].SetStatus(true);
            this.uiDuplicateMission.uiPropsItems[0].SetContent(this.uiDuplicateMission.CoinIcon, (int)state.value2);
            this.uiDuplicateMission.uiPropsItems[1].SetStatus(true);
            this.uiDuplicateMission.uiPropsItems[1].SetContent(this.uiDuplicateMission.ExpIcon, (int)state.value1);

            this.gameObject.SetActive(true);
            this.uiDuplicateMission.SetPosition(320.0f, 0.0f);
            SoundPlayer.GetInstance().PlaySoundType("mission_complete_init");
        }
Exemplo n.º 18
0
        /************************************************自 定 义 方 法************************************************/
        //打开页面
        public override void Open(object param = null)
        {
            base.Open();

            if (this.audioPlayer == null)
            {
                this.audioPlayer = this.gameObject.AddComponent <AudioSource>();
            }

            RoleManager.Instance.Hide();
            SoundPlayer.GetInstance().StopAllSoundExceptMusic();
        }
Exemplo n.º 19
0
        public override void ProcessState(UIState state)
        {
            bFinish = false;
            isIdle  = false;
            level   = (int)state.value0;

            SoundPlayer.GetInstance().PlaySoundType("level_up_" + mLocalPetInfoAgent.getCurrentPet());

            levelUpBlur.SetActive(true);
            levelUpAni.AnimationState.ClearTracks();
            levelUpAni.AnimationState.SetAnimation(1, "lv_enter", false);
        }
        void setBigCrownComplete()
        {
            bigCrownGp.AnimationState.Complete += delegate(TrackEntry trackEntry)
            {
                if (trackEntry.trackIndex == 4)
                {
                    dailyGoalBlur.SetActive(false);
                    if (crownIndex == 0)
                    {
                        handle1.SetActive(false);
                        indicate1.color = new Color(indicate3.color.r, indicate3.color.g, indicate3.color.b, 1);
                        handle2.SetActive(true);
                        dailyGoalGp2.AnimationState.ClearTracks();
                        dailyGoalGp2.AnimationState.SetAnimation(0, "fall_c", false);
                        dailyGoalGp2.AnimationState.AddAnimation(0, "small crown_c", true, 0);
                        SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_jump_in");

                        //dailyGoalUI.indicateTnPlay(1);
                    }
                    else if (crownIndex == 1)
                    {
                        handle2.SetActive(false);
                        indicate2.color = new Color(indicate3.color.r, indicate3.color.g, indicate3.color.b, 1);
                        handle3.SetActive(true);
                        dailyGoalGp3.AnimationState.ClearTracks();
                        dailyGoalGp3.AnimationState.SetAnimation(0, "fall_s", false);
                        dailyGoalGp3.AnimationState.AddAnimation(0, "small crown_s", true, 0);
                        SoundPlayer.GetInstance().PlaySoundType("daily_goal_crown_jump_in");

                        //dailyGoalUI.indicateTnPlay(2);
                    }
                    else if (crownIndex == 2)
                    {
                        handle3.SetActive(false);
                        indicate3.color = new Color(indicate3.color.r, indicate3.color.g, indicate3.color.b, 1);
                        complete100CwGp.gameObject.SetActive(true);
                        complete100CwGp.AnimationState.ClearTracks();
                        complete100CwGp.AnimationState.SetAnimation(0, "daily goal crown_drop", false);
                        complete100CwGp.AnimationState.AddAnimation(0, "daily goal crown_idle", true, 0);
                    }
                    bFinish = true;
                    uIStateCompleteSignal.Dispatch(GetStateEnum());
                }
                else if (trackEntry.trackIndex == 5)
                {
                    if (dailyGoalExp > 0)
                    {
                        bigCrownOpenRewardAni(crownIndex);
                    }
                }
            };
        }
Exemplo n.º 21
0
        //旋转轮盘
        private void Turn(int selectedIndex, bool visible = true)
        {
            this.selectedIndex = selectedIndex;
            if (this.items == null)
            {
                Debug.LogError("<><NavigatorView.Turn>Parameter 'items' is null");
                return;
            }
            else if (selectedIndex < 0 || selectedIndex >= this.items.Count)
            {
                Debug.LogErrorFormat("<><NavigatorView.Turn>Parameter 'selectedIndex' is invalid, selectedIndex: {0}, items.Count: {1}", selectedIndex, this.items.Count);
                return;
            }

            if (this.sequence != null)
            {
                this.sequence.Kill(true);
            }
            this.items.ForEach(t => t.SetStatus(t == this.items[this.selectedIndex]));
            if (visible)
            {
                this.canvasGroup.DOFade(1f, this.indexChanged && !this.displayed ? this.fadeDuration : 0);
                this.panel.transform.DOScale(1f, this.indexChanged && !this.displayed ? this.fadeDuration : 0);
            }
            this.displayed = true;
            NavigatorItem navigatorItem = this.items[this.selectedIndex];
            Vector3       endAngle      = new Vector3(0, 0, navigatorItem.Angle);

            this.sequence = DOTween.Sequence();
            if (visible)
            {
                if (this.indexChanged)
                {
                    sequence.Append(this.panel.DOLocalRotate(endAngle, this.rotateDuration));
                    //SoundPlayer.GetInstance().StopSound("navigator_change_icon");
                    SoundPlayer.GetInstance().PlaySoundType("navigator_change_icon");
                }
                sequence.AppendInterval(this.reaminSeconds);
                sequence.Append(this.canvasGroup.DOFade(0f, this.fadeDuration / 2));
                sequence.Append(this.panel.transform.DOScale(0.9f, this.fadeDuration / 2));
                if (this.viewChanged)
                {
                    sequence.AppendCallback(() => this.Dispatch(navigatorItem.View));
                }
            }
            else
            {
                sequence.Append(this.panel.DOLocalRotate(endAngle, 0f));
            }
            sequence.AppendCallback(() => this.displayed = false);
            this.lastSelectedIndex = this.selectedIndex;
        }
Exemplo n.º 22
0
        /************************************************自 定 义 方 法************************************************/
        //打开页面
        public override void Open(object param = null)
        {
            base.Open();

            Accessory accessory = param as Accessory;

            this.lockBox.SetStatus(true);
            if (accessory != null)
            {
                this.lockBox.SetIcon(this.PrefabRoot.GetObjectNoInstantiate <Sprite>("Texture/PetDress/Accessories", accessory.Icon + "_big"));
            }
            SoundPlayer.GetInstance().PlaySoundInChannal("mall_suit_not_match", this.audioPlayer, 0.2f);
        }
 private void CloseGuideTip()
 {
     TopViewHelper.Instance.RemoveView(TopViewHelper.ETopView.eGuideTip);
     if (this.viewMainScene.GuideTipSpine.AnimationState != null)
     {
         this.viewMainScene.GuideTipSpine.AnimationState.SetAnimation(0, "tips_ani03", false);
     }
     if (SoundPlayer.GetInstance() != null)
     {
         SoundPlayer.GetInstance().StopSound("mainview_tips_sfx");
         SoundPlayer.GetInstance().StopSound("guide_homepage");
     }
 }
Exemplo n.º 24
0
        public override void Stop()
        {
            base.Stop();
            FlurryUtil.LogEvent("Nim_Chest_open_event");
            if (!TopViewHelper.Instance.HasModulePageOpened() || TopViewHelper.Instance.IsInGuideView())
            {
                SoundPlayer.GetInstance().PlaySoundType("nim_chest_get_nim");
            }

            this.missionBackground.PlayNimAnimation(treasureBoxIndex, missionId);
            bFinish = true;
            gameObject.SetActive(false);
        }
        void setSliderGpComplete()
        {
            dailyGoalGp1.AnimationState.Complete += delegate(TrackEntry trackEntry)
            {
                if (trackEntry.trackIndex == 1)
                {
                    indicate1.DOFade(0, 0.5f);
                    dailyGoalBlur.SetActive(true);
                    bigCrownGp.AnimationState.ClearTracks();
                    bigCrownGp.AnimationState.SetAnimation(5, "update_d", false);
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_milestone_01_crown_shapeshift");
                    if (dailyGoalExp == 0)
                    {
                        bigCrownGp.AnimationState.AddAnimation(0, "idle_c", true, 0);
                    }
                }
            };

            dailyGoalGp2.AnimationState.Complete += delegate(TrackEntry trackEntry)
            {
                if (trackEntry.trackIndex == 2)
                {
                    indicate2.DOFade(0, 0.5f);
                    dailyGoalBlur.SetActive(true);
                    bigCrownGp.AnimationState.ClearTracks();
                    bigCrownGp.AnimationState.SetAnimation(5, "update_c", false);
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_milestone_02_crown_shapeshift");
                    if (dailyGoalExp == 1)
                    {
                        bigCrownGp.AnimationState.AddAnimation(0, "idle_s", true, 0);
                    }
                }
            };

            dailyGoalGp3.AnimationState.Complete += delegate(TrackEntry trackEntry)
            {
                if (trackEntry.trackIndex == 3)
                {
                    indicate3.DOFade(0, 0.5f);
                    dailyGoalBlur.SetActive(true);
                    bigCrownGp.AnimationState.ClearTracks();
                    bigCrownGp.AnimationState.SetAnimation(5, "update_s", false);
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_milestone_03_crown_shapeshift");
                    SoundPlayer.GetInstance().PlaySoundType("daily_goal_progress_done_bgm");
                    if (dailyGoalExp == 2)
                    {
                        bigCrownGp.AnimationState.AddAnimation(0, "idle_g", true, 0);
                    }
                }
            };
        }
Exemplo n.º 26
0
 //当二维码页面关闭时
 private void OnQRCodeiewClosed(ViewResult viewResult)
 {
     if (viewResult == ViewResult.OK)
     {
         this.accessories.CurrentButton.Paid = true;
         this.AccessoryDataManager.AddItem(this.accessories.CurrentButton.Accessory.ID);//配饰添加到包裹
         SoundPlayer.GetInstance().StopAllSoundExceptMusic();
         SoundPlayer.GetInstance().PlaySoundInChannal("mall_purchase_qr_complete", this.audioPlayer, 0.2f);
         this.PutOn(this.accessories.CurrentButton.Accessory);
         ExpUI.Instance.Show(this.accessories.CurrentButton.Accessory.Exp, 0, -25, 25, GameObject.FindGameObjectWithTag("ExpUILayer").transform);
         this.PlayerDataManager.exp += this.accessories.CurrentButton.Accessory.Exp;
         this.UIState.PushNewState(UIStateEnum.eExpIncrease, this.PlayerDataManager.GetExpPercent());
         this.UpdateExpAndCoinSignal.Dispatch();
         FlurryUtil.LogEventWithParam("mall_scene_purchase_rmb", "accessory_name", this.accessories.CurrentButton.Accessory.Name);
     }
 }
Exemplo n.º 27
0
        //执行动画脚本
        public override void ProcessState(UIState state)
        {
            SetFinishAndOpenScreenSave(false);
            drinkCoin      = (int)state.value2;
            drinkExp       = (int)state.value1;
            missionProcess = (float)state.value0;
            coin.SetActive(drinkCoin > 0);

            if (!sliderWave.gameObject.activeInHierarchy)
            {
                SetFinishAndOpenScreenSave(true);
                uIStateCompleteSignal.Dispatch(GetStateEnum());
                return;
            }
            if (sliderWave.value.Equals(missionProcess))
            {
                bSamllDrop = true;
            }

            MissionInfo missionInfo = this.MissionConfig.GetMissionInfoByMissionId(ShowMissionHelper.Instance.currShowMissionId);

            if (missionInfo == null)
            {
                this.bFinish = true; return;
            }

            if (string.IsNullOrEmpty(missionInfo.WaterDrop))
            {
                this.waterDrop.Play("waterDrop");
                if (this.IsNormalStatus())
                {
                    SoundPlayer.GetInstance().PlaySoundType("water_drop_down");
                }
            }
            else if (!string.IsNullOrEmpty(missionInfo.WaterDrop))
            {
                GameObject gameObject = this.PrefabRoot.GetObjectNoInstantiate <GameObject>("WaterDrop", missionInfo.WaterDrop);
                this.specialWaterDrop.runtimeAnimatorController = gameObject.GetComponent <Animator>().runtimeAnimatorController;
                this.StopAllCoroutines();
                this.StartCoroutine(this.CheckState());
                if (this.IsNormalStatus())
                {
                    SoundPlayer.GetInstance().PlaySoundType(missionInfo.WaterDropAudio);
                }
            }
        }
        public Signal <bool> StopSignal   = new Signal <bool>(); //停止下载信号
        /************************************************Unity方法与事件***********************************************/
        protected override void Start()
        {
            base.Start();
            this.progressBar.fillAmount = 0;
            this.originPos = this.progress.rectTransform.anchoredPosition;
            this.SleepTimeManager.AddSleepStatus(SleepTimeout.NeverSleep);
            SoundPlayer.GetInstance().StopAllSoundExceptMusic();
            this.StartCoroutine(this.Download());     //开启文件下载协程
            this.InvokeRepeating("CheckWifi", 0, 5f); //每5秒钟检查一次Wifi状态
#if (!UNITY_EDITOR)
            if (this.wifiStatus != null)
            {
                this.wifiStatus.gameObject.SetActive(false);
            }
#endif
            this.ResourceUtils.IgnoreFileNotExisted = true;
        }
Exemplo n.º 29
0
 //停止所有音频
 protected override void StopAllSound(bool exit)
 {
     if (exit)
     {
         SoundPlayer.GetInstance().StopMusic();
     }
     SoundPlayer.GetInstance().StopSound("mall_welcome");
     SoundPlayer.GetInstance().StopSound("mall_change_item");
     SoundPlayer.GetInstance().StopSound("mall_put_on_accessory");
     SoundPlayer.GetInstance().StopSound("mall_take_off_accessory");
     SoundPlayer.GetInstance().StopSound("mall_spirit_in");
     SoundPlayer.GetInstance().StopSound("mall_spirit_out");
     if (this.audioPlayer != null)
     {
         this.audioPlayer.Stop();
     }
 }
Exemplo n.º 30
0
 public override void ProcessState(UIState state)
 {
     bFinish = false;
     missionNameSC.ShowMissionLimitSpark();
     if (myCoroutine != null)
     {
         StopCoroutine(myCoroutine);
     }
     myCoroutine = StartCoroutine(aniOver());
     Debug.LogFormat("<><BasePlayer.PlayActionSound>Sound: daily_goal_mission_complete_tick, HasModulePageOpened: {0}, InGuideView: {1}",
                     TopViewHelper.Instance.HasModulePageOpened(), TopViewHelper.Instance.IsInGuideView());
     if (!TopViewHelper.Instance.HasModulePageOpened() || TopViewHelper.Instance.IsInGuideView())
     {//没有打开任何功能模块或正在引导才能播放此声音
         Debug.LogFormat("<><BasePlayer.PlayActionSound>Sound: daily_goal_mission_complete_tick ==== Playing");
         SoundPlayer.GetInstance().PlaySoundType("daily_goal_mission_complete_tick");
     }
 }