private void UpdateView(DeckModel deckModel)
        {
            int num   = 0;
            int count = deckModel.Count;

            UIRebellionOrgaizeShipBanner[] shipStates = this.ShipStates;
            for (int i = 0; i < shipStates.Length; i++)
            {
                UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = shipStates[i];
                int nIndex = num + 1;
                uIRebellionOrgaizeShipBanner.SetShipData(deckModel.GetShip(num), nIndex);
                uIRebellionOrgaizeShipBanner.SetShipIndex(num);
                num++;
            }
            if (this.FocusBanner != null)
            {
                this.BannerFocusAnim(false);
                this.FocusBanner = this.ShipStates[this.key.Index];
                this.BannerFocusAnim(true);
            }
            this.DeckNoLabel.text            = deckModel.Name;
            this.DeckNoLabel.supportEncoding = false;
            this.DeckNoIcon.mainTexture      = (Resources.Load("Textures/Common/DeckFlag/icon_deck" + deckModel.Id) as Texture2D);
            if (deckModel.IsActionEnd())
            {
                this.DeckActionEnd.SetActive(true);
                ShortcutExtensions.DOKill(this.DeckActionEnd, false);
                ShortcutExtensions.DOLocalRotate(this.DeckActionEnd, new Vector3(0f, 0f, 300f), 0f, 1);
                TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOLocalRotate(this.DeckActionEnd, new Vector3(0f, 0f, 360f), 0.8f, 1), 30);
            }
            else
            {
                this.DeckActionEnd.SetActive(false);
            }
        }
예제 #2
0
        private IEnumerator StepTutorialInstantiateForWaitFirstTutorial(TutorialModel model, Action OnFinish)
        {
            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.PortTopText, null);

            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.RepairInfo, delegate
            {
                UIRebellionOrgaizeShipBanner component2 = ((Component)SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().View.FindChild("ShipBanner")).GetComponent <UIRebellionOrgaizeShipBanner>();
                ShipModel[] ships2 = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShips();
                int num2           = 1;
                for (int j = 0; j < ships2.Length; j++)
                {
                    if ((float)(ships2[j].NowHp / ships2[j].MaxHp) < 0.7f)
                    {
                        num2 = j;
                        break;
                    }
                }
                component2.SetShipData(ships2[num2], num2 + 1);
            });

            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.SupplyInfo, delegate
            {
                UIRebellionOrgaizeShipBanner component = ((Component)SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().View.FindChild("ShipBanner")).GetComponent <UIRebellionOrgaizeShipBanner>();
                ShipModel[] ships = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShips();
                int num           = 1;
                for (int i = 0; i < ships.Length; i++)
                {
                    if (ships[i].AmmoRate < 50.0 || ships[i].FuelRate < 50.0)
                    {
                        num = i;
                        break;
                    }
                }
                component.SetShipData(ships[num], num + 1);
            });

            while (!(SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog() != null))
            {
                yield return(null);
            }
            SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().OnClosed = delegate
            {
                this.StepTutorialInstantiate(model);
                if (OnFinish != null)
                {
                    OnFinish();
                }
            };
        }