Ejemplo n.º 1
0
        public void Init()
        {
            _basePosition = new Vector3[6]
            {
                new Vector3(101f, -481f, 0f),
                new Vector3(38f, -533f, 0f),
                new Vector3(105f, -419f, 0f),
                new Vector3(-39f, -581f, 0f),
                new Vector3(110f, -362f, 0f),
                new Vector3(-120f, -634f, 0f)
            };
            _baseNum = new int[6]
            {
                2,
                3,
                1,
                4,
                0,
                5
            };
            float num = 0.8f + 0.1f * (float)_baseNum[_shipNum];

            base.transform.localPosition = _basePosition[_shipNum];
            base.transform.localScale    = new Vector3(num, num, num);
            GameObject gameObject = base.transform.FindChild("AircraftObj").gameObject;

            Util.FindParentToChild(ref _uiAircraft, gameObject.transform, "Aircraft");
            Util.FindParentToChild <ParticleSystem>(ref _explosionParticle, _uiAircraft.transform, "AircraftExplosion");
            Util.FindParentToChild <ParticleSystem>(ref _smokeParticle, _uiAircraft.transform, "AircraftSmoke");
            _uiAircraft.depth = 5 + _baseNum[_shipNum];
            if ((UnityEngine.Object)_anime == null)
            {
                _anime = ((Component)_uiAircraft.GetComponent <Animation>()).GetComponent <Animation>();
            }
            if (_fleetType == FleetType.Friend)
            {
                _uiAircraft.flip        = UIBasicSprite.Flip.Nothing;
                _uiAircraft.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.SlotItemTexture.Load(_plane.MstId, 6);

                _uiAircraft.transform.localScale = Vector3.one;
            }
            else if (_fleetType == FleetType.Enemy)
            {
                _uiAircraft.flip = UIBasicSprite.Flip.Nothing;
                if (BattleTaskManager.GetBattleManager() is PracticeBattleManager)
                {
                    _uiAircraft.flip        = UIBasicSprite.Flip.Horizontally;
                    _uiAircraft.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.SlotItemTexture.Load(_plane.MstId, 6);

                    _uiAircraft.transform.localScale = Vector3.one;
                }
                else
                {
                    _uiAircraft.mainTexture = SlotItemUtils.LoadTexture(_plane);
                    _uiAircraft.MakePixelPerfect();
                    _uiAircraft.transform.localScale = ((_plane.MstId > 500) ? new Vector3(0.7f, 0.7f, 0.7f) : new Vector3(0.8f, 0.8f, 0.8f));
                }
            }
            LeanTweenExtesntions.LTMoveLocal(to: new Vector3(_basePosition[_shipNum].x, _basePosition[_shipNum].y + 544f, _basePosition[_shipNum].z), self: base.transform, time: 0.8f).setEase(LeanTweenType.easeOutBack).setDelay(0.4f + 0.1f * (float)_baseNum[_shipNum]);
        }
        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();
        }