Exemple #1
0
        private bool UpdatePartnerSelect(object data)
        {
            KeyControl keyControl = StartupTaskManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.RIGHT))
            {
                _ctrlPartnerSelect.press_Button(CtrlPartnerSelect.ButtonIndex.R);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.LEFT))
            {
                _ctrlPartnerSelect.press_Button(CtrlPartnerSelect.ButtonIndex.L);
            }
            else
            {
                if (keyControl.GetDown(KeyControl.KeyName.MARU))
                {
                    return(_ctrlPartnerSelect.OnDecidePartnerShip());
                }
                if (keyControl.GetDown(KeyControl.KeyName.BATU))
                {
                    return(_ctrlPartnerSelect.OnCancel());
                }
            }
            return(false);
        }
Exemple #2
0
        protected override bool Run()
        {
            KeyControl keyControl = StartupTaskManager.GetKeyControl();

            Main.Update();
            if (Ime.IsDialogOpen)
            {
                return(true);
            }
            if (!keyControl.GetDown(KeyControl.KeyName.SELECT))
            {
                if (keyControl.GetDown(KeyControl.KeyName.MARU))
                {
                    OnClickInputLabel();
                }
                else
                {
                    if (keyControl.GetDown(KeyControl.KeyName.START))
                    {
                        if (_uiNameInput.value == string.Empty || _uiNameInput.value.Replace(" ", string.Empty).Replace("\u3000", string.Empty) == string.Empty)
                        {
                            return(true);
                        }
                        if (Utils.ChkNGWard(_uiNameInput.value))
                        {
                            _ANI.Play("feather_ng");
                            return(true);
                        }
                        _uiNameInput.isSelected = false;
                        _onNameSubmit();
                        return(false);
                    }
                    if (keyControl.GetDown(KeyControl.KeyName.BATU) && !StartupTaskManager.IsInheritStartup())
                    {
                        _uiNameInput.isSelected = false;
                        SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
                        {
                            Application.LoadLevel(Generics.Scene.Title.ToString());
                            this.DelayActionFrame(2, delegate
                            {
                                SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, null);
                            });
                        });

                        return(true);
                    }
                }
            }
            if (StartupTaskManager.GetMode() != StartupTaskManager.StartupTaskManagerMode.StartupTaskManagerMode_BEF)
            {
                return((StartupTaskManager.GetMode() == StartupTaskManager.StartupTaskManagerMode.StartupTaskManagerMode_ST) ? true : false);
            }
            return(true);
        }
        private bool UpdatePictureStoryShowConfirm(object data)
        {
            KeyControl keyControl = StartupTaskManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                _uiTutorialConfirmDialog.OnDecide();
                return(true);
            }
            if (keyControl.GetDown(KeyControl.KeyName.BATU))
            {
                _uiTutorialConfirmDialog.OnCancel();
                return(true);
            }
            return(false);
        }
        private IEnumerator PlayDesctiption()
        {
            KeyControl input   = StartupTaskManager.GetKeyControl();
            bool       isWait2 = true;

            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            PlayDescriotionVoice(nowPage);
            _uiGearButton.onClick.Clear();
            _uiGearButton.onClick.Add(new EventDelegate(delegate
            {
                isWait2 = false;
            }));
            while (isWait2)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isWait2 = false;
                }
                yield return(null);
            }
            Utils.StopDescriptionVoice();
            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isWait2 = true;
            _uiGearButton.onClick.Clear();
            _uiGearButton.onClick.Add(new EventDelegate(delegate
            {
                isWait2 = false;
            }));
            while (isWait2)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isWait2 = false;
                }
                yield return(null);
            }
            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            nowPage++;
        }
Exemple #5
0
        private bool UpdateStarterSelect(object data)
        {
            KeyControl keyControl = StartupTaskManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                _ctrlStarterSelect.OnClickStarter(_ctrlStarterSelect.selectType);
                return(true);
            }
            if (keyControl.GetDown(KeyControl.KeyName.BATU))
            {
                _ctrlStarterSelect.OnCancel();
                return(true);
            }
            if (keyControl.GetDown(KeyControl.KeyName.LEFT))
            {
                _ctrlStarterSelect.PreparaNext(isFoward: false);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.RIGHT))
            {
                _ctrlStarterSelect.PreparaNext(isFoward: true);
            }
            return(false);
        }
        public bool Run()
        {
            KeyControl keyControl = StartupTaskManager.GetKeyControl();

            Main.Update();
            if (keyControl.GetDown(KeyControl.KeyName.SELECT))
            {
                OnNameSubmit();
                return(true);
            }
            if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                if (_uiNameInput.value == string.Empty || _uiNameInput.value.Replace(" ", string.Empty).Replace("\u3000", string.Empty) == string.Empty)
                {
                    _strEditName       = string.Empty;
                    _uiNameInput.value = string.Empty;
                    OnClickInputLabel();
                }
                else if (Utils.ChkNGWard(_uiNameInput.value))
                {
                    _uiNameInput.value = string.Empty;
                    _animFeather.Play();
                    OnClickInputLabel();
                }
                else
                {
                    _uiNameInput.isSelected = false;
                    OnNameSubmit();
                }
            }
            else if (keyControl.GetDown(KeyControl.KeyName.BATU))
            {
                Dlg.Call(ref _actOnCancel);
            }
            return(true);
        }
        private IEnumerator PlayPictureStoryShow(UniRx.IObserver <bool> observer)
        {
            KeyControl input            = StartupTaskManager.GetKeyControl();
            bool       isAnimationWait9 = true;

            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            _listSheets[0].Show(delegate
            {
                isAnimationWait9 = false;
            });

            UISprite gear = this._uiGearButton.GetComponent <UISprite>();

            LeanTweenExtesntions.LTValue(from : _uiGearButton.GetComponent <UISprite>().alpha, self : _uiGearButton.transform, to : 1f, time : _strParams.showHideMessageWindowTime).setEase(LeanTweenType.linear).setOnUpdate(delegate(float x)
            {
                gear.alpha = x;
            })
            .setOnComplete((Action) delegate
            {
                this._uiGearButton.enabled = true;
            });
            while (isAnimationWait9)
            {
                yield return(null);
            }
            isAnimationWait9 = true;
            _uiStartupFairy.Show(UIStartupFairy.FairyType.Tails, UIStartupFairy.FairyState.Move, delegate
            {
                this._uiGearButton.onClick.Clear();
                this._uiGearButton.onClick.Add(new EventDelegate(delegate
                {
                    isAnimationWait9 = false;
                }));
            });
            PlayDescriotionVoice(0);
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.ImmediateIdle();
            Utils.StopDescriptionVoice();
            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isAnimationWait9 = true;
            _uiStartupFairy.ShowBaloon(0, new System.Tuple <Vector3, Vector3>(_strParams.fairyBalloonSize[0], _strParams.fairyBalloonPos[0]), null);
            _uiStartupFairy.PlayVoice(0, null);
            _uiGearButton.onClick.Clear();
            _uiGearButton.onClick.Add(new EventDelegate(delegate
            {
                isAnimationWait9 = false;
            }));
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.StopVoice();
            _uiStartupFairy.Hide(null);
            yield return(Observable.Timer(TimeSpan.FromSeconds(0.75)).StartAsCoroutine());

            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isAnimationWait9 = true;
            _listSheets[1].Show(delegate
            {
                isAnimationWait9 = false;
            });
            while (isAnimationWait9)
            {
                yield return(null);
            }
            isAnimationWait9 = true;
            _uiStartupFairy.Show(UIStartupFairy.FairyType.Ahoge, UIStartupFairy.FairyState.Move, delegate
            {
                this._uiGearButton.onClick.Add(new EventDelegate(delegate
                {
                    isAnimationWait9 = false;
                }));
            });
            PlayDescriotionVoice(1);
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.ImmediateIdle();
            Utils.StopDescriptionVoice();
            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isAnimationWait9 = true;
            _uiStartupFairy.ShowBaloon(1, new System.Tuple <Vector3, Vector3>(_strParams.fairyBalloonSize[1], _strParams.fairyBalloonPos[1]), null);
            _uiStartupFairy.PlayVoice(1, null);
            _uiGearButton.onClick.Clear();
            _uiGearButton.onClick.Add(new EventDelegate(delegate
            {
                isAnimationWait9 = false;
            }));
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.StopVoice();
            _uiStartupFairy.Hide(null);
            yield return(Observable.Timer(TimeSpan.FromSeconds(0.75)).StartAsCoroutine());

            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isAnimationWait9 = true;
            _listSheets[2].Show(delegate
            {
                isAnimationWait9 = false;
            });
            while (isAnimationWait9)
            {
                yield return(null);
            }
            isAnimationWait9 = true;
            _uiStartupFairy.Show(UIStartupFairy.FairyType.Braid, UIStartupFairy.FairyState.Idle, delegate
            {
                this._uiGearButton.onClick.Add(new EventDelegate(delegate
                {
                    isAnimationWait9 = false;
                }));
            });
            PlayDescriotionVoice(2);
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.ImmediateIdle();
            Utils.StopDescriptionVoice();
            yield return(Observable.TimerFrame(2, FrameCountType.EndOfFrame).StartAsCoroutine());

            isAnimationWait9 = true;
            _uiStartupFairy.ShowBaloon(2, new System.Tuple <Vector3, Vector3>(_strParams.fairyBalloonSize[2], _strParams.fairyBalloonPos[2]), null);
            _uiStartupFairy.PlayVoice(2, null);
            _uiGearButton.onClick.Clear();
            _uiGearButton.onClick.Add(new EventDelegate(delegate
            {
                isAnimationWait9 = false;
            }));
            while (isAnimationWait9)
            {
                if (input.GetDown(KeyControl.KeyName.MARU))
                {
                    isAnimationWait9 = false;
                }
                yield return(null);
            }
            _uiGearButton.onClick.Clear();
            _uiStartupFairy.StopVoice();
            _uiStartupFairy.Hide(null);
            yield return(Observable.Timer(TimeSpan.FromSeconds(0.75)).StartAsCoroutine());

            observer.OnNext(value: true);
            observer.OnCompleted();
        }