Exemplo n.º 1
0
        /// <summary>
        /// Start
        /// </summary>
        public override void Start()
        {
            this.scene.StartCoroutine(new WaitForEndOfFrame().AddCallback(() =>
            {
                //一時停止
                TimePauseManager.Pause();

                //ボス出現アニメ再生
                var anim = Instantiate(this.bossAppearAnimPrefab, this.scene.animationEffectArea, false);
                anim.onFinished = (tag) =>
                {
                    Destroy(anim.gameObject);

                    //一時停止解除
                    TimePauseManager.Play();

                    //元のステートへ戻る
                    this.manager.PopState();
                };
            }));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 一時停止ボタンクリック時
        /// </summary>
        public override void OnClickPauseButton()
        {
            //Noneステートへ一時退避
            this.manager.PushState<NoneState>(null);

            //一時停止
            TimePauseManager.Pause();

            //一時停止メニューポップアップを開く
            var dialog = SharedUI.Instance.ShowSimpleDialog();
            var content = dialog.SetAsYesNoMessageDialog(Masters.LocalizeTextDB.Get("ConfirmRetire"));
            content.yesNo.yes.onClick = () =>
            {
                dialog.onClose = () =>
                {
                    //一時停止解除
                    TimePauseManager.Play();
                    //リタイア通信
                    SinglePlayApi.CallClearApi(
                        SinglePlayApi.ClearResult.Retire,
                        Rank.None,
                        (response) => this.scene.ChangeSceneToSingleStageSelect()
                    );
                };

                dialog.Close();
            };
            content.yesNo.no.onClick = () =>
            {
                dialog.onClose = () =>
                {
                    //一時停止解除
                    TimePauseManager.Play();
                    //元のステートへ戻る
                    this.manager.PopState();
                };

                dialog.Close();
            };
        }
Exemplo n.º 3
0
 /// <summary>
 /// OnDestroy
 /// </summary>
 protected virtual void OnDestroy()
 {
     TimePauseManager.Remove(this);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Awake
 /// </summary>
 protected virtual void Awake()
 {
     TimePauseManager.Add(this);
 }