private void OnDestroy()
 {
     mPrefab_MapTransitionCutManager       = null;
     mPrefab_UIStateCover                  = null;
     mTexture_sallyBGsky.mainTexture       = null;
     mTexture_sallyBGclouds.mainTexture    = null;
     mTexture_sallyBGcloudRefl.mainTexture = null;
     mTexture_bgSea.mainTexture            = null;
     mTexture_snow.mainTexture             = null;
 }
Exemple #2
0
 private void OnDisable()
 {
     if (this.uiStageCovers != null)
     {
         UIStageCover[] array = this.uiStageCovers;
         for (int i = 0; i < array.Length; i++)
         {
             UIStageCover uIStageCover = array[i];
             uIStageCover.SelfRelease();
         }
     }
 }
        private IEnumerator InititalizeStageCovers(Action onInitialized)
        {
            Transform stageCoversPlace = mTransform_StageCovers.Find("UIStageCovers");

            foreach (Transform child in mRouletteSelector.GetContainer().transform)
            {
                UnityEngine.Object.Destroy(child.gameObject);
            }
            mStageConfirm.Initialize(mMapModels[0]);
            MapModel[] array = mMapModels;
            foreach (MapModel model in array)
            {
                UIStageCover stageCover = Util.Instantiate(mPrefab_UIStateCover.gameObject, stageCoversPlace.gameObject).GetComponent <UIStageCover>();
                stageCover.Initialize(model);
            }
            yield return(new WaitForEndOfFrame());

            onInitialized?.Invoke();
        }
Exemple #4
0
        public void map_status()
        {
            uiStageCovers = GameObject.Find("board2nd/board1/page1/UIStageCovers").GetComponentsInChildren <UIStageCover>();
            MapAreaModel areaModel = StrategyTopTaskManager.Instance.TileManager.FocusTile.GetAreaModel();

            MapModel[] maps      = StrategyTopTaskManager.GetLogicManager().SelectArea(areaModel.Id).Maps;
            UILabel    component = GameObject.Find("board2nd/board1/page1/Labels/Label_0-1").GetComponent <UILabel>();

            component.text = Util.getDifficultyString(strategyLogicManager.UserInfo.Difficulty);
            UILabel component2 = GameObject.Find("board2nd/board1/page1/Labels/Label_1-2").GetComponent <UILabel>();

            component2.text = areaModel.Name;
            UILabel component3 = GameObject.Find("board2nd/board1/page2/Labels/Label_2-4").GetComponent <UILabel>();

            component3.supportEncoding = false;
            if (areaModel.Id < 15)
            {
                string name = areaModel.GetEscortDeck().Name;
                if (name.Replace(" ", string.Empty).Replace("\u3000", string.Empty).Length != 0)
                {
                    component3.text = name;
                }
                else
                {
                    component3.text = areaModel.Name.Replace("海域", string.Empty) + "航路護衛隊";
                }
            }
            else
            {
                component3.text = "---";
            }
            GameObject.Find("board2nd/board1/page2/Decks").transform.localPosition = new Vector3(-17.536f * (float)strategyLogicManager.UserInfo.DeckCount + 94.286f, 0f);
            for (int i = 0; i < 8; i++)
            {
                UISprite component4 = GameObject.Find("board2nd/board1/page2/Decks/Deck" + (i + 1).ToString()).GetComponent <UISprite>();
                component4.color = Color.black;
                if (i < strategyLogicManager.UserInfo.DeckCount)
                {
                    component4.transform.localScale = Vector3.one;
                }
                else
                {
                    component4.transform.localScale = Vector3.zero;
                }
            }
            for (int j = 0; j < areaModel.GetDecks().Length; j++)
            {
                UISprite component4 = GameObject.Find("board2nd/board1/page2/Decks/Deck" + areaModel.GetDecks()[j].Id).GetComponent <UISprite>();
                if (areaModel.GetDecks()[j].GetShipCount() != 0)
                {
                    if (areaModel.GetDecks()[j].IsActionEnd())
                    {
                        component4.color = _Color_dock * 0.75f;
                    }
                    else if (areaModel.GetDecks()[j].MissionState != 0)
                    {
                        component4.color = Color.blue;
                    }
                    else
                    {
                        component4.color = _Color_dock;
                    }
                }
            }
            if (maps.Length < 5)
            {
                UILabel component5 = GameObject.Find("board2nd/board1/page1/Labels/Label_1-2").GetComponent <UILabel>();
                component5.transform.localPosition = new Vector3(160f, 160f, 0f);
                component5.fontSize = 36;
                UILabel component6 = GameObject.Find("board2nd/board1/page1/Labels/Label_1-1").GetComponent <UILabel>();
                component6.transform.localPosition = new Vector3(160f, 105f, 0f);
                component6.fontSize = 32;
                UILabel component7 = GameObject.Find("board2nd/board1/page1/Labels/Label_0-0").GetComponent <UILabel>();
                component7.transform.localPosition = new Vector3(329f, 105f, 0f);
                component7.fontSize = 20;
                UILabel component8 = GameObject.Find("board2nd/board1/page1/Labels/Label_0-1").GetComponent <UILabel>();
                component8.transform.localPosition = new Vector3(413f, 105f, 0f);
                component8.fontSize = 20;
                UITexture component9 = GameObject.Find("board2nd/board1/page1/lines/line_1").GetComponent <UITexture>();
                if (component9 != null)
                {
                    component9.transform.localPosition = new Vector3(160f, 103f, 0f);
                    component9.width  = 556;
                    component9.height = 2;
                }
                for (int k = 0; k < 3; k++)
                {
                    for (int l = 0; l < 2; l++)
                    {
                        int        num        = k * 2 + l + 1;
                        GameObject gameObject = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover" + num.ToString());
                        if (gameObject == null)
                        {
                            break;
                        }
                        gameObject.transform.localScale = Vector3.one * 0.6f;
                        if (num < 5)
                        {
                            gameObject.transform.localPosition = new Vector3(18f + 293f * (float)l, -17f - 158f * (float)k, 0f);
                        }
                        else
                        {
                            gameObject.transform.localPosition = new Vector3(18f + 293f * (float)l, 320f, 0f);
                        }
                    }
                }
                if (maps.Length == 3)
                {
                    GameObject gameObject2 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover4");
                    gameObject2.transform.localScale = Vector3.zero;
                    GameObject gameObject3 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover3");
                    gameObject3.transform.localPosition = new Vector3(160f, -175f);
                }
                else if (maps.Length == 4)
                {
                    GameObject gameObject4 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover4");
                    gameObject4.transform.localScale = Vector3.one * 0.6f;
                    GameObject gameObject5 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover3");
                    gameObject5.transform.localPosition = new Vector3(18f, -175f);
                }
            }
            else
            {
                component2.transform.localPosition = new Vector3(160f, 171f, 0f);
                component2.fontSize = 28;
                UILabel component10 = GameObject.Find("board2nd/board1/page1/Labels/Label_1-1").GetComponent <UILabel>();
                component10.transform.localPosition = new Vector3(160f, 139f, 0f);
                component10.fontSize = 24;
                UILabel component11 = GameObject.Find("board2nd/board1/page1/Labels/Label_0-0").GetComponent <UILabel>();
                component11.transform.localPosition = new Vector3(329f, 149f, 0f);
                component11.fontSize = 20;
                component.transform.localPosition = new Vector3(413f, 149f, 0f);
                component.fontSize = 20;
                UITexture component12 = GameObject.Find("board2nd/board1/page1/lines/line_1").GetComponent <UITexture>();
                component12.transform.localPosition = new Vector3(160f, 143f, 0f);
                component12.width  = 556;
                component12.height = 2;
                for (int m = 0; m < 3; m++)
                {
                    for (int n = 0; n < 2; n++)
                    {
                        GameObject gameObject6 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover" + (m * 2 + n + 1).ToString());
                        gameObject6.transform.localScale    = Vector3.one * 0.5f;
                        gameObject6.transform.localPosition = new Vector3(12f + 299f * (float)n, 40f - 122f * (float)m, 0f);
                    }
                }
                if (maps.Length == 5)
                {
                    GameObject gameObject7 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover5");
                    gameObject7.transform.localPosition = new Vector3(162f, -209f, 0f);
                    GameObject gameObject8 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover6");
                    gameObject8.transform.localPosition = new Vector3(162f, 320f, 0f);
                }
            }
            for (int num2 = 0; num2 < maps.Length; num2++)
            {
                UIStageCover component13 = GameObject.Find("board2nd/board1/page1/UIStageCovers/UIStageCover" + (num2 + 1)).GetComponent <UIStageCover>();
                MapModel     mapModel    = maps[num2];
                component13.Initialize(mapModel);
            }
        }