private string getAlertMessage(DeckModel deck)
    {
        UserInfoModel userInfo       = StrategyTopTaskManager.GetLogicManager().UserInfo;
        MemberMaxInfo memberMaxInfo  = userInfo.ShipCountData();
        MemberMaxInfo memberMaxInfo2 = userInfo.SlotitemCountData();

        if (deck.GetShips().Any((ShipModel x) => x.IsTaiha()))
        {
            AlertMessage.color = AlertColor;
            return("※大破している艦娘がいます。(被弾により喪失の危険があります)");
        }
        if (memberMaxInfo.MaxCount <= memberMaxInfo.NowCount)
        {
            AlertMessage.color = AlertColor;
            return("※艦娘保有数が上限に達しているため、新しい艦娘との邂逅はできません。");
        }
        if (memberMaxInfo.MaxCount - 6 <= memberMaxInfo.NowCount)
        {
            AlertMessage.color = WarningColor;
            return("※艦娘保有数が上限に近いため、新しい艦娘と邂逅できない可能性があります。");
        }
        if (memberMaxInfo2.MaxCount <= memberMaxInfo2.NowCount)
        {
            AlertMessage.color = AlertColor;
            return("※装備保有数が上限に達しているため、新しい艦娘との邂逅はできません。");
        }
        if (memberMaxInfo2.MaxCount - 24 <= memberMaxInfo2.NowCount)
        {
            AlertMessage.color = WarningColor;
            return("※装備保有数が上限に近いため、新しい艦娘と邂逅できない可能性があります。");
        }
        if (deck.GetShips().Any((ShipModel x) => x.FuelRate < 100.0 || x.AmmoRate < 100.0))
        {
            AlertMessage.color = WarningColor;
            return("※十分な補給を受けていない艦娘がいます。(本来の戦闘力を発揮できません)");
        }
        return(string.Empty);
    }
Example #2
0
    private IEnumerator StartVoyageCoroutine()
    {
        while (true)
        {
            UnityEngine.Debug.Log("StartVoyage [TotalCount]:" + mCycleCount + "  [Total Time]:" + mStopWatch.Elapsed.TotalSeconds);
            StrategyTopTaskManager.GetTurnEnd().DebugTurnEndAuto();
            DeckModel currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;
            yield return(StartCoroutine(WaitForCount("Next Start VoyageDebug:", 5)));

            yield return(StartCoroutine(DeckTeaTime(currentDeck)));

            SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize();

            yield return(StartCoroutine(GoFrontMenues()));

            yield return(StartCoroutine(GoBackMenues()));

            SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();

            yield return(StartCoroutine(WaitForCount("Next GoSortie", 5)));

            yield return(StartCoroutine(GoSortie()));

            mCycleCount++;
            if (Input.GetKey(KeyCode.Joystick1Button6) || Input.GetKey(KeyCode.LeftShift))
            {
                break;
            }
            UnityEngine.Debug.Log("EndOfVoyage [TotalCount]:" + mCycleCount + "  [Total Time]:" + mStopWatch.Elapsed.TotalSeconds);
        }
        if (CommonPopupDialog.Instance != null)
        {
            CommonPopupDialog.Instance.StartPopup("オ\u30fcト戦闘キャンセル");
        }
        mStartVoyageCoroutine = null;
    }
Example #3
0
        private void ChangeStateCommandMenu()
        {
            if (this.mIsEndPhase)
            {
                return;
            }
            bool flag = StrategyTopTaskManager.GetLogicManager().IsValidDeploy(StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID, this.top.TankerCount, EscortOrganizeTaskManager.GetEscortManager());

            if (flag)
            {
                StrategyTopTaskManager.GetLogicManager().Deploy(this.top.areaID, this.top.TankerCount, EscortOrganizeTaskManager.GetEscortManager());
                StrategyTopTaskManager.CreateLogicManager();
                this.isPlayVoice         = false;
                this.EscortFlagShipModel = null;
                this.top.backToCommandMenu();
                this.mIsEndPhase = true;
                SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
                if (this.PanelShowCor != null)
                {
                    base.StopCoroutine(this.PanelShowCor);
                }
                TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial;
                if (tutorial.GetStep() == 8 && !tutorial.GetStepTutorialFlg(9))
                {
                    tutorial.SetStepTutorialFlg(9);
                    CommonPopupDialog.Instance.StartPopup("「はじめての配備!」 達成");
                    SoundUtils.PlaySE(SEFIleInfos.SE_012);
                }
                StrategyTopTaskManager.Instance.setActiveStrategy(true);
            }
            else
            {
                SoundUtils.PlaySE(SEFIleInfos.CommonCancel2);
                CommonPopupDialog.Instance.StartPopup("変更がありません", 0, CommonPopupDialogMessage.PlayType.Long);
            }
        }
Example #4
0
        private void DecideSortieStart()
        {
            DebugUtils.Log("TaskRebellionOrganize", string.Empty);
            RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager();
            List <UIRebellionParticipatingFleetInfo> participatingFleetList             = _ctrlRebellionOrganize.participatingFleetSelector.participatingFleetList;
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo  = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo2 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattlePrimaryFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo3 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardSupportFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo4 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattleSupportFleet);

            int[] array = new int[4]
            {
                (!(uIRebellionParticipatingFleetInfo == null)) ? uIRebellionParticipatingFleetInfo.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo2 == null)) ? uIRebellionParticipatingFleetInfo2.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo3 == null)) ? uIRebellionParticipatingFleetInfo3.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo4 == null)) ? uIRebellionParticipatingFleetInfo4.deckModel.Id : (-1)
            };
            bool flag = rebellionManager.IsGoRebellion(array[0], array[1], array[2], array[3]);
            List <IsGoCondition> list  = null;
            List <IsGoCondition> list2 = null;

            if (array[2] != -1)
            {
                list = rebellionManager.IsValidMissionSub(array[2]);
            }
            if (array[3] != -1)
            {
                list2 = rebellionManager.IsValid_MissionMain(array[3]);
            }
            bool flag2 = list == null || (list != null && list.Count == 0);
            bool flag3 = list2 == null || (list2 != null && list2.Count == 0);

            if (flag && flag2 && flag3)
            {
                RebellionMapManager rebellionMapManager = rebellionManager.GoRebellion(array[0], array[1], array[2], array[3]);
                MapModel            map       = rebellionMapManager.Map;
                Hashtable           hashtable = new Hashtable();
                hashtable.Add("rebellionMapManager", rebellionMapManager);
                hashtable.Add("rootType", 0);
                hashtable.Add("shipRecoveryType", ShipRecoveryType.None);
                hashtable.Add("escape", false);
                RetentionData.SetData(hashtable);
                Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
                SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks();
                StartCoroutine(PlayTransition(map, uIRebellionParticipatingFleetInfo2.deckModel));
            }
            SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
        }
Example #5
0
        static void Main(string[] args)
        {
            AppInitializeManager.Awake();
            App.InitSystems(); // 26 fuso

            // var bgm = Mst_DataManager.Instance.GetMstBgm();
            // var cabinet = Mst_DataManager.Instance.GetMstCabinet();
            // var payitem = Mst_DataManager.Instance.GetPayitem();
            // var furnitureText = Mst_DataManager.Instance.GetFurnitureText();


            Debug_Mod  debug_Mod = new Debug_Mod();
            List <int> list      = new List <int>();

            Debug.Log("ADD SHIP");
            debug_Mod.Add_Ship(list);
            list.Add(330); // Akizuki Kai
            list.Add(24);  // Ooi
            list.Add(175); // Z3
            list.Add(117); // Zuihou Kai
            list.Add(75);  // Hiyou
            list.Add(321); // Ooyodo Kai
            list.Add(182); // Akashi
            for (int i = 100; i < 110; i++)
            {
                // 100 Tama
                // 101 Kiso
                // 102 Chitose
                // 103 Chiyoda
                // 104 Chitose Kai
                // 105 Chiyoda Kai
                // 106 Chitose A
                // 107 Chiyoda A
                // 108 Chitose-Kou
                // 109 Chiyoda-Kou
                list.Add(i);
            }
            debug_Mod.Add_Ship(list);

            var userData = Comm_UserDatas.Instance;



            // var ui = (new LocalManager()).UserInfo;
            // LocalManager localManager = new LocalManager();

            OrganizeManager organizeManager = new OrganizeManager(1);

            debug_Mod.Add_Deck(2);
            debug_Mod.Add_Deck(3);
            debug_Mod.Add_Deck(4);
            debug_Mod.Add_Deck(5);
            debug_Mod.Add_Deck(6);


            ManagerBase.initialize();
            organizeManager.ChangeOrganize(1, 2, 2);
            organizeManager.ChangeOrganize(1, 3, 3);

            Dictionary <int, int> dictionary = new Dictionary <int, int>();

            for (int j = 0; j < 100; j++)
            {
                if ((1 <= j && j <= 3) || (10 <= j && j <= 12) || (49 <= j && j <= 59))
                {
                    dictionary[j] = 1;
                }
                dictionary[54] = 0;
                dictionary[59] = 10;
            }
            debug_Mod.Add_UseItem(dictionary);



            debug_Mod.Add_Materials(enumMaterialCategory.Fuel, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Bull, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Steel, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Bauxite, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Repair_Kit, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Dev_Kit, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Revamp_Kit, 2000);
            debug_Mod.Add_Materials(enumMaterialCategory.Build_Kit, 2000);
            debug_Mod.Add_Coin(80000);
            List <int> list2 = new List <int>();

            list2.Add(1);
            list2.Add(1);
            list2.Add(1);
            list2.Add(1);
            list2.Add(1);
            list2.Add(1);
            for (int k = 0; k < 30; k++)
            {
                list2.Add(14);
            }
            for (int l = 1; l < 100; l++)
            {
                list2.Add(l);
            }
            for (int m = 0; m < 30; m++)
            {
                list2.Add(25);
            }
            for (int n = 0; n < 6; n++)
            {
                list2.Add(42);
            }
            for (int num = 1; num < 100; num++)
            {
                Debug_Mod.ChangeSlotLevel(list2[num], 9);
            }
            debug_Mod.Add_SlotItem(list2);
            DebugUtils.SLog("DEBUG_MOD OK");


            StrategyTopTaskManager top = new StrategyTopTaskManager();
            // top.Awake2();

            StrategyMapManager strategyMapManager = new StrategyMapManager();
            SortieManager      sortieManager      = strategyMapManager.SelectArea(1);
            SortieMapManager   sortieMapManager   = sortieManager.GoSortie(1, 11);

            SortieBattleManager sortieBattleManager = sortieMapManager.BattleStart(BattleFormationKinds1.TanJuu);
            BattleResultModel   battleResultModel   = sortieBattleManager.GetBattleResult();


            //SortieMapManager _clsSortieMapManager = sortieManager.GoSortie(1, 11);
            //SortieMapManager _clsSortieMapManager = sortieManager.GoSortie(1, 14);
            //SortieBattleManager _clsSortieBattleManager = _clsSortieMapManager.BattleStart(BattleFormationKinds1.TanJuu);
            // var a = KCV.BattleCut.BattleCutPhase.Command;
            // CommandPhaseModel _clscommandPhaseModel = _clsSortieBattleManager.GetCommandPhaseModel();
            // var a = Server_Controllers.BattleLogic.ExecBattleKinds.DayToNight;
            // _clsSortieBattleManager.StartDayToNightBattle();
            //BattleResultModel res = _clsSortieBattleManager.GetBattleResult();

            Console.WriteLine("hajimarimasu");
        }
 private void InitAreaName()
 {
     AreaName.text = StrategyTopTaskManager.GetLogicManager().Area[StrategyRebellionTaskManager.RebellionArea].Name;
 }
Example #7
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);
            }
        }