private string CreateNews(T_RLU_NewsHistory model)
        {
            string result;

            DungeonInformation duninfo = TableDungeonMaster.GetValue(model.iDungeonObjNo);

            switch (model.iActionNo)
            {
            //ダンジョン挑戦
            case NewsType.DungeonStart:
                result = string.Format("news:<color={0}>{1}</color>が<color={2}>{3}</color>に挑戦開始",
                                       CommonConst.Color.Player,
                                       model.vcCharacterName,
                                       CommonConst.Color.Dungeon,
                                       duninfo.Name);
                break;

            //ダンジョン進行
            case NewsType.DungeonNext:
                result = string.Format("news:<color={0}>{1}</color>が<color={2}>{3}</color>{4}Fに到達",
                                       CommonConst.Color.Player,
                                       model.vcCharacterName,
                                       CommonConst.Color.Dungeon,
                                       duninfo.Name,
                                       model.iFloor);
                break;

            //踏破失敗
            case NewsType.DisruptFail:

                result = string.Format("news:<color={0}>{1}</color>が<color={5}>{6}</color>にて<color={2}>{3}</color>{4}Fで踏破失敗",
                                       CommonConst.Color.Player,
                                       model.vcCharacterName,
                                       CommonConst.Color.Dungeon,
                                       duninfo.Name,
                                       model.iFloor,
                                       CommonConst.Color.DeathCause,
                                       model.vcCouse);
                break;

            //踏破成功
            case NewsType.DisruptSuccess:
                result = string.Format("news:<color={0}>{1}</color>が<color={2}>{3}</color>の踏破成功",
                                       CommonConst.Color.Player,
                                       model.vcCharacterName,
                                       CommonConst.Color.Dungeon,
                                       duninfo.Name,
                                       model.iFloor);

                break;

            default:
                result = "";
                break;
            }

            return(result);
        }
Beispiel #2
0
    private void StartMain()
    {
        GameObject gm = new GameObject("FloorChanger");

        _manageFade = gm.AddComponent <ManageFade>();
        _manageFade.SetupFade();
        _manageFade.Wait = 0.01f;
        _manageFade.PlayFadeOut(false);

        GameObject.Find("OnBGMCheck").GetComponent <Toggle>().isOn =
            MusicInformation.Music.IsMusicOn;

        GameObject.Find("OnSoundCheck").GetComponent <Toggle>().isOn =
            SoundInformation.Sound.IsPlay;

        GameObject.Find("OnVoiceCheck").GetComponent <Toggle>().isOn =
            VoiceInformation.Voice.IsPlay;

        if (KeyControlInformation.Info.OpMode == OperationMode.UseMouse)
        {
            GameObject.Find("UseMouse").GetComponent <Toggle>().isOn =
                true;
        }

        if (ScoreInformation.Info.PlayerNameBase != CommonConst.Message.UnityChanName && ScoreInformation.Info.PlayerNameBase != CommonConst.Message.StellaChanName)
        {
            GameObject.Find("NameInputField").GetComponent <InputField>().text = ScoreInformation.Info.PlayerNameBase;
        }
        else
        {
            GameObject.Find("NameInputField").GetComponent <InputField>().text = "";
        }

        //MusicInformation.Music.Setup(MusicInformation.MusicType.CharacterSelect);

        ScrollViewSelected         = GameObject.Find("SelectTargetScrollView");
        ScrollViewSelectedUnit     = GameObject.Find("SelectUnit");
        ScrollViewSelectedContents = GameObject.Find("SelectTargetContent");

        _keyDisp = GameObject.Find("KeyDisplayPanel");

        CharacterStatusPanel = GameObject.Find("CharacterStatusPanel");
        DungeonStatusPanel   = GameObject.Find("DungeonStatusPanel");

        ScrollViewSelectedUnit.SetActive(false);
        DungeonStatusPanel.SetActive(false);

        SelectedList = new Dictionary <long, GameObject>();

        _state = SelectTurnState.ManageStart;

        _keyDisp.SetActive(false);


        //ダンジョンデータを読み込み
        Dungeons = TableDungeonMaster.GetAllValue();
        //キャラクターデータを読み込み
        Characters = TablePlayer.GetAllValue();
        //初期選択を格納
        SelectCharacter = Characters.First().Value.ObjNo;
        InitialzeContent(Characters, SelectCharacter);

        MainThreadDispatcher.StartUpdateMicroCoroutine(TransSceneStart(1f));
    }
    private void UpdateMain()
    {
        if (IsStart == false)
        {
            return;
        }

        if (ManageWait.Info.IsWait == true)
        {
            return;
        }

        if (state == TitleState.Input)
        {
            if (KeyControlInformation.Info.OnKeyDownMenu(KeyType.MenuOk) ||
                (KeyControlInformation.Info.OnLeftClick() &&
                 CommonFunction.IsDoubleClick()))
            {
                if (CommonFunction.IsNull(UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject) == false &&
                    UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name == "NameInputField")
                {
                    return;
                }

                if (CommonFunction.IsNull(ResourceInformation.SaveInfo) == false &&
                    ResourceInformation.SaveInfo.IsLoadSave == true)
                {
                    //サウンドを鳴らす
                    SoundInformation.Sound.Play(SoundInformation.SoundType.MenuOk);

                    state = TitleState.ActionSelectInit;
                }
                else
                {
                    TargetScene = "Scenes/GameSelect";
                    state       = TitleState.FadeInit;
                }
            }
        }
        else
        if (state == TitleState.ActionSelectInit)
        {
            InitialzeContent();

            state = TitleState.ActionSelect;
        }
        else
        if (state == TitleState.ActionSelect)
        {
            if (UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject == GameObject.Find("NameInputField"))
            {
                return;
            }

            //上
            if (KeyControlInformation.Info.OnMoveUp())
            {
                Selected = SelectUp(SelectedList, Selected);
            }
            //下
            else if (KeyControlInformation.Info.OnMoveDown())
            {
                Selected = SelectDown(SelectedList, Selected);
            }
            //ダンジョン決定 シーン移動
            else if (KeyControlInformation.Info.OnKeyDownMenu(KeyType.MenuOk))
            {
                if (Selected == (int)TitleSelectAction.Continue)
                {
                    TargetScene = "Scenes/rouge1";
                    state       = TitleState.FadeInitLoadSave;
                }
                else if (Selected == (int)TitleSelectAction.NewGame)
                {
                    ResourceInformation.SaveInfo = new SavePlayingInformation();
                    SaveDataInformation.RemoveSaveData();
                    TargetScene = "Scenes/GameSelect";
                    state       = TitleState.FadeInit;
                }
            }
        }
        else
        if (state == TitleState.FadeInitLoadSave)
        {
            //サウンドを鳴らす
            SoundInformation.Sound.Play(SoundInformation.SoundType.GameStart);

            string name = GameObject.Find("NameText").GetComponent <Text>().text;

            ScoreInformation.Info.PlayerName = name;

            _manageFade.PlayFadeIn(true, 0.5f);


            SavePlayingInformation save = ResourceInformation.SaveInfo;

            //保存されていたら保存データを読み込み
            if (save.IsLoadSave == true)
            {
                DungeonInformation.Info = TableDungeonMaster.GetValue(save.don);
                PlayerInformation.Info  = TablePlayer.GetValue(save.pon);

                //アイテムデータをロード
                SaveItemData[] items = SaveDataInformation.LoadItemValue();

                //アイテムデータを反映
                GameStateInformation.TempItemList = SaveItemInformation.ToListBaseItem(items);

                //セーブデータを削除
                SaveDataInformation.RemoveSaveData();
            }

            StartCoroutine(TransScene(TargetScene, 0.5f));

            state = TitleState.Fade;
        }
        else
        if (state == TitleState.FadeInit)
        {
            //サウンドを鳴らす
            SoundInformation.Sound.Play(SoundInformation.SoundType.GameStart);

            string name = GameObject.Find("NameText").GetComponent <Text>().text;

            ScoreInformation.Info.PlayerName = name;

            _manageFade.PlayFadeIn(true, 0.5f);

            StartCoroutine(TransScene(TargetScene, 0.5f));

            state = TitleState.Fade;
        }
    }