private void setMaterialNums(MapAreaModel areaModel, int tankerCount)
 {
     this.TurnGetMaterialNums[0].text = "× " + areaModel.GetResources(tankerCount).get_Item(enumMaterialCategory.Fuel);
     this.TurnGetMaterialNums[1].text = "× " + areaModel.GetResources(tankerCount).get_Item(enumMaterialCategory.Bull);
     this.TurnGetMaterialNums[2].text = "× " + areaModel.GetResources(tankerCount).get_Item(enumMaterialCategory.Steel);
     this.TurnGetMaterialNums[3].text = "× " + areaModel.GetResources(tankerCount).get_Item(enumMaterialCategory.Bauxite);
 }
        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]);
            }
        }
Ejemplo n.º 3
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 = "× ---";
            }
        }