protected override bool Init()
 {
     if (!this.isKeyControlDisable)
     {
         this.keyController.IsRun = true;
     }
     this.IndexChange = 0;
     this.swipeWait   = false;
     this.SwipeEvent  = this.CommandMenu.get_transform().FindChild("AreaInfoBG").GetComponent <UIDisplaySwipeEventRegion>();
     this.SwipeEvent.SetOnSwipeActionJudgeCallBack(new UIDisplaySwipeEventRegion.SwipeJudgeDelegate(this.CheckSwipe));
     this.LogicMng = StrategyTopTaskManager.GetLogicManager();
     this.CommandMenu.SetActive(true);
     Util.FindParentToChild(ref this.CommandMenu.Menus, this.CommandMenu.get_transform(), "Menus");
     this.sttm        = StrategyTaskManager.GetStrategyTop();
     this.areaID      = SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID;
     this.areaModel   = StrategyTopTaskManager.GetLogicManager().Area.get_Item(this.areaID);
     this.sceneChange = true;
     this.DeckEnableCheck();
     this.CommandMenu.MenuEnter((int)this.currentMenu);
     this.keyController.Index = (int)this.currentMenu;
     KeyControlManager.Instance.KeyController = this.keyController;
     this.isInfoOpenEnable = true;
     if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide();
     }
     return(true);
 }
Exemple #2
0
 protected override bool Init()
 {
     if (!isKeyControlDisable)
     {
         keyController.IsRun = true;
     }
     IndexChange = 0;
     swipeWait   = false;
     SwipeEvent  = ((Component)CommandMenu.transform.FindChild("AreaInfoBG")).GetComponent <UIDisplaySwipeEventRegion>();
     SwipeEvent.SetOnSwipeActionJudgeCallBack(CheckSwipe);
     LogicMng = StrategyTopTaskManager.GetLogicManager();
     CommandMenu.SetActive(isActive: true);
     Util.FindParentToChild(ref CommandMenu.Menus, CommandMenu.transform, "Menus");
     sttm        = StrategyTaskManager.GetStrategyTop();
     areaID      = SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID;
     areaModel   = StrategyTopTaskManager.GetLogicManager().Area[areaID];
     sceneChange = true;
     DeckEnableCheck();
     CommandMenu.MenuEnter((int)currentMenu);
     keyController.Index = (int)currentMenu;
     KeyControlManager.Instance.KeyController = keyController;
     isInfoOpenEnable = true;
     if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null)
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide();
     }
     return(true);
 }
        public void UpdateSideAreaPanel()
        {
            MapAreaModel focusAreaModel = StrategyTopTaskManager.Instance.GetAreaMng().FocusAreaModel;
            int          countNoMove    = focusAreaModel.GetTankerCount().GetCountNoMove();
            int          countMove      = focusAreaModel.GetTankerCount().GetCountMove();

            this.setTankerCount(countNoMove, countMove);
            this.escortDeck.UpdateEscortDeck(focusAreaModel.GetEscortDeck());
            this.setMaterialNums(focusAreaModel, countNoMove);
        }
        public void Initialize(RadingResultData radingData, MapAreaModel m)
        {
            this.hukidashi.Init();
            TweenAlpha tweenAlpha = TweenAlpha.Begin(base.get_gameObject(), 0.2f, 1f);

            tweenAlpha.onFinished.Clear();
            this.RadingData = radingData;
            int beforeNum    = radingData.BeforeNum;
            int tanker_count = radingData.BeforeNum - radingData.BreakNum;

            Debug.Log(m);
            Debug.Log(m.GetEscortDeck());
            if (radingData.FlagShipMstId != 0)
            {
                bool isDamaged = radingData.FlagShipDamageState == DamageState.Taiha || radingData.FlagShipDamageState == DamageState.Tyuuha;
                this.friendly.UnloadTexture();
                this.DelayActionFrame(1, delegate
                {
                    this.friendly.SetTexture(ShipUtils.LoadTexture(m.GetEscortDeck().GetFlagShip(), isDamaged));
                });
            }
            if (radingData.AttackKind == RadingKind.AIR_ATTACK)
            {
                this.enemy.UnloadTexture();
                this.DelayActionFrame(1, delegate
                {
                    this.enemy.SetTexture(ShipUtils.LoadTexture(512, 9));
                });
            }
            else
            {
                this.enemy.UnloadTexture();
                this.DelayActionFrame(1, delegate
                {
                    this.enemy.SetTexture(ShipUtils.LoadTexture(530, 9));
                });
            }
            this.tot        = beforeNum;
            this.cnt        = tanker_count;
            this.resFrom    = new int[4];
            this.resFrom[0] = m.GetResources(beforeNum).get_Item(enumMaterialCategory.Fuel);
            this.resFrom[1] = m.GetResources(beforeNum).get_Item(enumMaterialCategory.Bull);
            this.resFrom[2] = m.GetResources(beforeNum).get_Item(enumMaterialCategory.Steel);
            this.resFrom[3] = m.GetResources(beforeNum).get_Item(enumMaterialCategory.Bauxite);
            this.resTo      = new int[4];
            this.resTo[0]   = m.GetResources(tanker_count).get_Item(enumMaterialCategory.Fuel);
            this.resTo[1]   = m.GetResources(tanker_count).get_Item(enumMaterialCategory.Bull);
            this.resTo[2]   = m.GetResources(tanker_count).get_Item(enumMaterialCategory.Steel);
            this.resTo[3]   = m.GetResources(tanker_count).get_Item(enumMaterialCategory.Bauxite);
            for (int i = 0; i < 4; i++)
            {
                this.downTexts[i].text = " ×" + Convert.ToString(this.resFrom[i]);
            }
        }
        private async void QueryMapAreas()
        {
            try
            {
                // Clear existing overlays
                _mapViewService.ClearOverlays();

                // Clear existing areas (in case user wants to refresh results)
                MapAreas.Clear();

                // Create new task to
                var offlineMapTask = await OfflineMapTask.CreateAsync(Map);

                // Get list of areas
                IReadOnlyList <PreplannedMapArea> preplannedMapAreas = await offlineMapTask.GetPreplannedMapAreasAsync();

                // Create UI from the areas
                foreach (var preplannedMapArea in preplannedMapAreas.OrderBy(x => x.PortalItem.Title))
                {
                    // Load area to get the metadata
                    await preplannedMapArea.LoadAsync();

                    // Using a custom model for easier visualization
                    var model = new MapAreaModel(preplannedMapArea);
                    MapAreas.Add(model);
                    // Graphic that shows the area in the map
                    var graphic = new Graphic(preplannedMapArea.AreaOfInterest, GetSymbolForColor(model.DisplayColor));
                    graphic.Attributes.Add("Name", preplannedMapArea.PortalItem.Title);
                    _areasOverlay.Graphics.Add(graphic);
                }

                if (!preplannedMapAreas.Any())
                {
                    await _windowService.ShowAlertAsync("No preplanned map areas available.");
                }
                else
                {
                    // Show the overlays on the map
                    _mapViewService.AddGraphicsOverlay(_areasOverlay);

                    // Zoom to the offline areas
                    await _mapViewService.SetViewpointGeometryAsync(_areasOverlay.Extent, 20);
                }

                // Refresh commands
                RefreshCommands();
            }
            catch (Exception ex)
            {
                await _windowService.ShowAlertAsync(ex.Message, "Couldn't query map areas");
            }
        }
Exemple #6
0
        public List <MapAreaModel> GetRebellionAreaList()
        {
            List <int>          rebellionAreaOrderByEvent = new Api_req_StrategeMap().GetRebellionAreaOrderByEvent();
            List <MapAreaModel> list = new List <MapAreaModel>();

            for (int i = 0; i < rebellionAreaOrderByEvent.Count; i++)
            {
                int          key  = rebellionAreaOrderByEvent[i];
                MapAreaModel item = ManagerBase._area[key];
                list.Add(item);
            }
            return(list);
        }
        public List <MapAreaModel> GetRebellionAreaList()
        {
            List <int>          rebellionAreaOrderByEvent = new Api_req_StrategeMap().GetRebellionAreaOrderByEvent();
            List <MapAreaModel> list = new List <MapAreaModel>();

            for (int i = 0; i < rebellionAreaOrderByEvent.get_Count(); i++)
            {
                int          num          = rebellionAreaOrderByEvent.get_Item(i);
                MapAreaModel mapAreaModel = ManagerBase._area.get_Item(num);
                list.Add(mapAreaModel);
            }
            return(list);
        }
        public string ToString(bool detail)
        {
            string text = string.Empty;

            text += string.Format("{0}\n", base.ToString());
            AreaTankerModel nonDeploymentTankerCount = this.GetNonDeploymentTankerCount();

            text += string.Format("海域に未配備の輸送船数:{0}(帰港中:{1})\n", nonDeploymentTankerCount.GetCount(), nonDeploymentTankerCount.GetCountMove());
            if (detail)
            {
                text += string.Format("[--海域一覧--]\n", new object[0]);
                Dictionary <int, MapAreaModel> area = this.Area;
                using (Dictionary <int, MapAreaModel> .ValueCollection.Enumerator enumerator = area.get_Values().GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        MapAreaModel  current       = enumerator.get_Current();
                        SortieManager sortieManager = this.SelectArea(current.Id);
                        MapModel[]    maps          = sortieManager.Maps;
                        text += string.Format("{0} ", current);
                        for (int i = 0; i < maps.Length; i++)
                        {
                            MapModel mapModel = maps[i];
                            if (mapModel.Map_Possible)
                            {
                                text += string.Format("{0}-{1}{2}{3} ", new object[]
                                {
                                    mapModel.AreaId,
                                    mapModel.No,
                                    (!mapModel.Cleared) ? string.Empty : "[Clear]",
                                    (!mapModel.ClearedOnce) ? string.Empty : "!"
                                });
                            }
                            else
                            {
                                text += string.Format("({0}-{1}{2}{3}) ", new object[]
                                {
                                    mapModel.AreaId,
                                    mapModel.No,
                                    (!mapModel.Cleared) ? string.Empty : "[Clear]",
                                    (!mapModel.ClearedOnce) ? string.Empty : "!"
                                });
                            }
                        }
                        text += "\n";
                    }
                }
                text += string.Format("[--海域一覧--]", new object[0]);
            }
            return(text);
        }
Exemple #9
0
        public void SetDockIcon(MapAreaModel areaModel)
        {
            List <NdockStates> nDockStateList = areaModel.GetNDockStateList();

            for (int i = 0; i < 4; i++)
            {
                if (i < nDockStateList.get_Count())
                {
                    this.DockIcon[i].SetDockState(nDockStateList.get_Item(i));
                }
                else
                {
                    this.DockIcon[i].SetActive(false);
                }
            }
        }
Exemple #10
0
 public void Initialize(RadingResultData d, MapAreaModel m, bool isFirst)
 {
     if (d == null)
     {
         this.isFinished = true;
         return;
     }
     this.curTile = d.AreaId - 1;
     this.taa.SetActive(true);
     this.tileAnimInstance.SetActive(true);
     this.taa.Initialize(d, m);
     StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenOut(delegate
     {
         StrategyTopTaskManager.Instance.UIModel.MapCamera.MoveToTargetTile(d.AreaId, false);
         this.StartAnimation(m.GetEscortDeck().GetFlagShip() != null, d.AttackKind, isFirst);
     }, true, true);
 }
        public List <ShipModel> GetAreaShips(int area_id, bool use_deck, bool use_edeck, List <ShipModel> all_ships)
        {
            List <ShipModel> list         = new List <ShipModel>();
            MapAreaModel     mapAreaModel = ManagerBase._area.get_Item(area_id);

            if (use_deck)
            {
                DeckModel[] decks = mapAreaModel.GetDecks();
                DeckModel[] array = decks;
                for (int i = 0; i < array.Length; i++)
                {
                    DeckModel deckModel = array[i];
                    list.AddRange(deckModel.GetShips());
                }
            }
            if (use_edeck)
            {
                list.AddRange(mapAreaModel.GetEscortDeck().GetShips());
            }
            HashSet <int> hashSet = mapAreaModel.__GetRepairingShipMemIdsHash__();

            using (HashSet <int> .Enumerator enumerator = hashSet.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    int       current = enumerator.get_Current();
                    ShipModel ship2   = this.UserInfo.GetShip(current);
                    if (ship2.IsInDeck() == -1 && ship2.IsInEscortDeck() == -1)
                    {
                        list.Add(ship2);
                    }
                }
            }
            if (all_ships == null)
            {
                all_ships = this.UserInfo.__GetShipList__();
            }
            List <ShipModel> list2 = all_ships.FindAll((ShipModel ship) => ship.IsBlingWait() && ship.AreaIdBeforeBlingWait == area_id);

            list.AddRange(list2);
            return(list);
        }
Exemple #12
0
 private void OnDestroy()
 {
     ENSEI          = null;
     EscortOrganize = null;
     mPrefab_UserInterfacePracticeManager = null;
     mUserInterfacePracticeManager        = null;
     sttm                = null;
     sailSelect          = null;
     CommandMenu         = null;
     LogicMng            = null;
     ShipNumberLabel     = null;
     areaModel           = null;
     warningPanel        = null;
     InfoRoot            = null;
     MapRoot             = null;
     OverView            = null;
     OverSceneObject     = null;
     StopExpeditionPanel = null;
     keyController       = null;
     SwipeEvent          = null;
     StopExpeditionPanel = null;
 }
        public HashSet <int> __GetNDockShipMemIdsHash__()
        {
            HashSet <int> hashSet = new HashSet <int>();

            using (Dictionary <int, MapAreaModel> .ValueCollection.Enumerator enumerator = ManagerBase._area.get_Values().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    MapAreaModel  current  = enumerator.get_Current();
                    HashSet <int> hashSet2 = current.__GetRepairingShipMemIdsHash__();
                    using (HashSet <int> .Enumerator enumerator2 = hashSet2.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            int current2 = enumerator2.get_Current();
                            hashSet.Add(current2);
                        }
                    }
                }
            }
            return(hashSet);
        }
 private void OnDestroy()
 {
     this.ENSEI          = null;
     this.EscortOrganize = null;
     this.mPrefab_UserInterfacePracticeManager = null;
     this.mUserInterfacePracticeManager        = null;
     this.sttm                = null;
     this.sailSelect          = null;
     this.CommandMenu         = null;
     this.LogicMng            = null;
     this.ShipNumberLabel     = null;
     this.areaModel           = null;
     this.warningPanel        = null;
     this.InfoRoot            = null;
     this.MapRoot             = null;
     this.OverView            = null;
     this.OverSceneObject     = null;
     this.StopExpeditionPanel = null;
     this.keyController       = null;
     this.SwipeEvent          = null;
     this.StopExpeditionPanel = null;
 }
        public List <MapAreaModel> GetValidMoveToArea(int deck_id)
        {
            List <MapAreaModel> list = new List <MapAreaModel>();
            DeckModel           deck = base.UserInfo.GetDeck(deck_id);

            if (deck.IsValidMove().get_Count() > 0)
            {
                return(list);
            }
            int        areaId             = deck.AreaId;
            List <int> neighboringAreaIDs = ManagerBase._area.get_Item(areaId).NeighboringAreaIDs;

            for (int i = 0; i < neighboringAreaIDs.get_Count(); i++)
            {
                int          num          = neighboringAreaIDs.get_Item(i);
                MapAreaModel mapAreaModel = ManagerBase._area.get_Item(num);
                if (mapAreaModel.IsOpen())
                {
                    list.Add(mapAreaModel);
                }
            }
            return(list);
        }
Exemple #16
0
        public List <MapAreaModel> GetValidMoveToArea(int deck_id)
        {
            List <MapAreaModel> list = new List <MapAreaModel>();
            DeckModel           deck = base.UserInfo.GetDeck(deck_id);

            if (deck.IsValidMove().Count > 0)
            {
                return(list);
            }
            int        areaId             = deck.AreaId;
            List <int> neighboringAreaIDs = ManagerBase._area[areaId].NeighboringAreaIDs;

            for (int i = 0; i < neighboringAreaIDs.Count; i++)
            {
                int          key          = neighboringAreaIDs[i];
                MapAreaModel mapAreaModel = ManagerBase._area[key];
                if (mapAreaModel.IsOpen())
                {
                    list.Add(mapAreaModel);
                }
            }
            return(list);
        }
Exemple #17
0
        public List <ShipModel> GetAreaShips(int area_id, bool use_deck, bool use_edeck, List <ShipModel> all_ships)
        {
            List <ShipModel> list         = new List <ShipModel>();
            MapAreaModel     mapAreaModel = _area[area_id];

            if (use_deck)
            {
                DeckModel[] decks = mapAreaModel.GetDecks();
                DeckModel[] array = decks;
                foreach (DeckModel deckModel in array)
                {
                    list.AddRange(deckModel.GetShips());
                }
            }
            if (use_edeck)
            {
                list.AddRange(mapAreaModel.GetEscortDeck().GetShips());
            }
            HashSet <int> hashSet = mapAreaModel.__GetRepairingShipMemIdsHash__();

            foreach (int item in hashSet)
            {
                ShipModel ship2 = UserInfo.GetShip(item);
                if (ship2.IsInDeck() == -1 && ship2.IsInEscortDeck() == -1)
                {
                    list.Add(ship2);
                }
            }
            if (all_ships == null)
            {
                all_ships = UserInfo.__GetShipList__();
            }
            List <ShipModel> collection = all_ships.FindAll((ShipModel ship) => ship.IsBlingWait() && ship.AreaIdBeforeBlingWait == area_id);

            list.AddRange(collection);
            return(list);
        }
Exemple #18
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);
            }
        }
 public void setAreaModel(MapAreaModel model)
 {
     this.areaModel = model;
 }
Exemple #20
0
        public void _draw_labels()
        {
            MapAreaModel  areaModel     = StrategyTopTaskManager.Instance.TileManager.FocusTile.GetAreaModel();
            RecordManager recordManager = new RecordManager();

            GameObject.Find("VERSION").GetComponent <UILabel>().text = "Version 1.02";
            string text = Util.RankNameJ(recordManager.Rank);

            if (_isRecordScene)
            {
                label         = GameObject.Find("adm_name").GetComponent <UILabel>();
                label.text    = recordManager.Name;
                label         = GameObject.Find("adm_level").GetComponent <UILabel>();
                label.textInt = recordManager.Level;
                label         = GameObject.Find("adm_status").GetComponent <UILabel>();
                label.text    = text;
                label         = GameObject.Find("adm_exp").GetComponent <UILabel>();
                label.text    = recordManager.Experience + "/" + recordManager.NextExperience;
            }
            string text2 = recordManager.DeckCount + "\n" + recordManager.ShipCount + " / " + recordManager.ShipCountMax + "\n" + recordManager.SlotitemCount + " / " + recordManager.SlotitemCountMax + "\n" + recordManager.MaterialMax + "\n" + recordManager.NDockCount + "\n";
            string text3;

            if (areaModel.NDockMax != 0)
            {
                text3 = text2;
                text2 = text3 + areaModel.NDockCount + " / " + areaModel.NDockMax + "\n";
            }
            else
            {
                text2 += "- / -\n";
            }
            text3 = text2;
            text2 = text3 + recordManager.KDockCount + " / " + 4;
            GameObject.Find("Label_3-2").GetComponent <UILabel>().text = text2;
            for (int i = 0; i < areaModel.GetEscortDeck().Count; i++)
            {
                csb[i] = GameObject.Find("board2nd/board1/page2/banners/banner" + (i + 1).ToString() + "/CommonShipBanner2").GetComponent <CommonShipBanner>();
                csb[i].SetShipData(areaModel.GetEscortDeck().GetShips()[i]);
                csb[i].transform.localScale = Vector3.one * (45f / 64f);
            }
            for (int j = areaModel.GetEscortDeck().Count; j < 6; j++)
            {
                csb[j] = GameObject.Find("board2nd/board1/page2/banners/banner" + (j + 1).ToString() + "/CommonShipBanner2").GetComponent <CommonShipBanner>();
                csb[j].transform.localScale = Vector3.zero;
                UITexture component = GameObject.Find("board2nd/board1/page2/banners/banner" + (j + 1).ToString() + "/BannerBG").GetComponent <UITexture>();
                component.color = Color.gray / 2f;
            }
            UILabel component2  = GameObject.Find("board2nd/board1/page2/Labels/Label_2-2").GetComponent <UILabel>();
            int     countNoMove = areaModel.GetTankerCount().GetCountNoMove();
            int     maxCount    = areaModel.GetTankerCount().GetMaxCount();

            if (areaModel.Id < 15)
            {
                component2.text = countNoMove.ToString() + "/" + maxCount.ToString();
            }
            else
            {
                component2.text = "---";
            }
            if (areaModel.Id < 15)
            {
                component2      = GameObject.Find("board2nd/board1/page2/material/GetMaterial1/num").GetComponent <UILabel>();
                component2.text = "× " + string.Format("{0, 3}", areaModel.GetResources(countNoMove)[enumMaterialCategory.Fuel]);
                component2      = GameObject.Find("board2nd/board1/page2/material/GetMaterial3/num").GetComponent <UILabel>();
                component2.text = "× " + string.Format("{0, 3}", areaModel.GetResources(countNoMove)[enumMaterialCategory.Steel]);
                component2      = GameObject.Find("board2nd/board1/page2/material/GetMaterial2/num").GetComponent <UILabel>();
                component2.text = "× " + string.Format("{0, 3}", areaModel.GetResources(countNoMove)[enumMaterialCategory.Bull]);
                component2      = GameObject.Find("board2nd/board1/page2/material/GetMaterial4/num").GetComponent <UILabel>();
                component2.text = "× " + string.Format("{0, 3}", areaModel.GetResources(countNoMove)[enumMaterialCategory.Bauxite]);
            }
            else
            {
                GameObject.Find("board2nd/board1/page2/material/GetMaterial1/num").GetComponent <UILabel>().text = "× ---";
                GameObject.Find("board2nd/board1/page2/material/GetMaterial3/num").GetComponent <UILabel>().text = "× ---";
                GameObject.Find("board2nd/board1/page2/material/GetMaterial2/num").GetComponent <UILabel>().text = "× ---";
                GameObject.Find("board2nd/board1/page2/material/GetMaterial4/num").GetComponent <UILabel>().text = "× ---";
            }
        }