public void SceneStart()
    {
        AllEventManager eventMgr = AllEventManager.GetInstance();
        AllSceneManager sceneMgr = AllSceneManager.GetInstance();

        //依存性注入
        inputSoundProvider_.state_ = SaveDataSceneInputSoundState.Normal;

        //初期化
        dataSelectInfoSprite_.sprite = ResourcesGraphicsLoader.GetInstance().GetGraphics(GraphicsPathSupervisor.GetInstance().GetPathGameStartInfo());

        commandParts_.SelectReset(new Vector3(3.32f, 0.81f, -4));

        //フェードイン
        eventMgr.EventSpriteRendererSet(
            sceneMgr.GetPublicFrontScreen().GetEventScreenSprite()
            , null
            , new Color(sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.r, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.g, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.b, 0)
            );
        eventMgr.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.ChangeColor);
        eventMgr.AllUpdateEventExecute(0.4f);

        //イベントの最後
        eventMgr.EventFinishSet();
    }
    public MonsterTribesData(string monsterTribesName)
    {
        ResourcesGraphicsLoader graphicsLoader = ResourcesGraphicsLoader.GetInstance();

        ResourcesMonsterTribesData data = ResourcesMonsterTribesDatasLoader.GetInstance().GetMonsterDatas(monsterTribesName);

        monsterNumber_ = data.monsterNumber_;
        monsterName_   = data.monsterName_;

        tribesHitPoint_ = data.tribesHitPoint_;
        tribesAttack_   = data.tribesAttack_;
        tribesDefense_  = data.tribesDefense_;
        tribesSpeed_    = data.tribesSpeed_;

        tribesDreamAttack_  = data.tribesDreamAttack_;
        tribesDreamDefense_ = data.tribesDreamDefense_;
        tribesDreamSpeed_   = data.tribesDreamSpeed_;

        firstElement_  = new ElementTypeState((ElementType)data.firstElement_);
        secondElement_ = new ElementTypeState((ElementType)data.secondElement_);

        frontTex_      = graphicsLoader.GetGraphics("Monster/" + data.texName_ + "/" + data.texName_ + "_Front");
        backTex_       = graphicsLoader.GetGraphics("Monster/" + data.texName_ + "/" + data.texName_ + "_Back");
        SDTex_         = graphicsLoader.GetGraphics("Monster/" + data.texName_ + "/" + data.texName_ + "_SD");
        frontDreamTex_ = graphicsLoader.GetGraphics("Monster/" + data.texName_ + "/" + data.texName_ + "_FrontDream");
        backDreamTex_  = graphicsLoader.GetGraphics("Monster/" + data.texName_ + "/" + data.texName_ + "_BackDream");
    }
    public void SetTrainerData(ResourcesEnemyTrainerData data)
    {
        number_ = data.trainerNumber_;
        name_   = data.trainerName_;
        job_    = data.jobName_;

        sprite_ = ResourcesGraphicsLoader.GetInstance().GetGraphics("Enemy/" + data.texName_);

        attackRate_ = data.attackRate_;
        tradeRate_  = data.tradeRate_;

        for (int i = 0; i < data.monsterDatas_.Length; ++i)
        {
            MonsterData monsterData = new MonsterData(new MonsterTribesData(data.monsterDatas_[i].monsterName_), 0, 50);

            //技の習得
            for (int j = 0; j < data.monsterDatas_[i].skillNames_.Length; ++j)
            {
                monsterData.SkillAdd(new SkillData(data.monsterDatas_[i].skillNames_[j]));
            }

            //モンスターの追加
            MonsterAdd(monsterData);
        }
    }
Exemple #4
0
    protected void Init()//継承したクラスのスタート関数で必ず呼び出すこと
    {
        _map       = GameObject.FindGameObjectWithTag("Map").GetComponent <MapData>();
        _now_pos   = transform.position;
        _start_pos = transform.position;

        _sprite_renderer = GetComponent <SpriteRenderer>();
        if (animeSpritesActive_ &&
            _sprite_renderer.sprite)
        {
            var name = _sprite_renderer.sprite.name;
            name    = name.Substring(0, name.IndexOf("_"));
            sprites = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("CharaChip/" + name);
        }
    }
    public void SceneUpdate()
    {
        AllEventManager eventMgr = AllEventManager.GetInstance();
        AllSceneManager sceneMgr = AllSceneManager.GetInstance();

        if (AllEventManager.GetInstance().EventUpdate())
        {
            sceneMgr.inputProvider_ = new KeyBoardNormalTriggerInputProvider();
        }

        //カーソルが動いていたら
        int commandSelectNumber = commandParts_.CommandSelectForNumber(new Vector3(), new Vector3(0, 1.9f, 0));

        if (commandSelectNumber > -1)
        {
            //説明の画像
            if (commandSelectNumber == 0)
            {
                dataSelectInfoSprite_.sprite = ResourcesGraphicsLoader.GetInstance().GetGraphics(GraphicsPathSupervisor.GetInstance().GetPathGameStartInfo());
            }
            if (commandSelectNumber == 1)
            {
                dataSelectInfoSprite_.sprite = ResourcesGraphicsLoader.GetInstance().GetGraphics(GraphicsPathSupervisor.GetInstance().GetPathGameContinueInfo());
            }

            //SE
            inputSoundProvider_.UpSelect();
        }
        else if (sceneMgr.inputProvider_.UpSelect())
        {
            //カーソルが動かせたら
            if (commandParts_.CommandSelectUp(new Vector3(0, 1.9f, 0)))
            {
                //説明の画像
                dataSelectInfoSprite_.sprite = ResourcesGraphicsLoader.GetInstance().GetGraphics(GraphicsPathSupervisor.GetInstance().GetPathGameStartInfo());

                //SE
                inputSoundProvider_.UpSelect();
            }
        }
        else if (sceneMgr.inputProvider_.DownSelect())
        {
            //カーソルが動かせたら
            if (commandParts_.CommandSelectDown(new Vector3(0, -1.9f, 0)))
            {
                //説明の画像
                dataSelectInfoSprite_.sprite = ResourcesGraphicsLoader.GetInstance().GetGraphics(GraphicsPathSupervisor.GetInstance().GetPathGameContinueInfo());

                //SE
                inputSoundProvider_.DownSelect();
            }
        }
        else if (sceneMgr.inputProvider_.SelectEnter() ||
                 commandParts_.MouseLeftButtonTriggerActive())
        {
            //データの初期化
            PlayerTrainerData.ReleaseInstance();
            EnemyTrainerData.ReleaseInstance();

            if (commandParts_.SelectNumber() == 0)
            {
                Debug.Log("はじめから");

                //操作の変更
                sceneMgr.inputProvider_ = new InactiveInputProvider();

                //SE
                inputSoundProvider_.SelectEnter();

                //ウェイト
                eventMgr.EventWaitSet(sceneMgr.GetEventWaitTime());

                //フェードアウト
                eventMgr.EventSpriteRendererSet(
                    sceneMgr.GetPublicFrontScreen().GetEventScreenSprite()
                    , null
                    , new Color(sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.r, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.g, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.b, 255)
                    );
                eventMgr.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.ChangeColor);
                eventMgr.AllUpdateEventExecute(0.4f);

                //シーンの切り替え
                eventMgr.SceneChangeEventSet(SceneState.Map, SceneChangeMode.Change);
            }
            else if (commandParts_.SelectNumber() == 1)
            {
                Debug.Log("つづきから");

                //データのロード
                if (SaveDataTrasfer.GetInstance().DataLoad())
                {
                    //操作の変更
                    sceneMgr.inputProvider_ = new InactiveInputProvider();

                    //SE
                    inputSoundProvider_.SelectEnter();

                    //ウェイト
                    eventMgr.EventWaitSet(sceneMgr.GetEventWaitTime());

                    //フェードアウト
                    eventMgr.EventSpriteRendererSet(
                        sceneMgr.GetPublicFrontScreen().GetEventScreenSprite()
                        , null
                        , new Color(sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.r, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.g, sceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.b, 255)
                        );
                    eventMgr.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.ChangeColor);
                    eventMgr.AllUpdateEventExecute(0.4f);

                    //シーンの切り替え
                    eventMgr.SceneChangeEventSet(SceneState.Map, SceneChangeMode.Change);
                }
            }
        }
    }
    //交換処理
    public override void MonsterChangeEventSet(BattleManager manager)
    {
        AllSceneManager allSceneMgr = AllSceneManager.GetInstance();

        //モンスターの変更が行われていたら
        if (changeMonsterNumber_ > 0)
        {
            IMonsterData md = monsterDatas_[changeMonsterNumber_];

            manager.playerSelectSkillNumber_ = changeMonsterSkillNumber_;

            //先頭のパラメーターをリセット
            monsterDatas_[0].battleData_.RankReset();

            AllEventManager.GetInstance().EventStatusInfoPartsSet(manager.GetPlayerStatusInfoParts(), new Color32(0, 0, 0, 0));
            AllEventManager.GetInstance().StatusInfoPartsUpdateExecuteSet(StatusInfoPartsEventManagerExecute.IdleMoveEnd);
            AllEventManager.GetInstance().AllUpdateEventExecute();

            //先頭がダウンしていなかったら
            if (monsterDatas_[0].battleActive_ == true)
            {
                AllEventManager.GetInstance().EventTextSet(manager.GetNovelWindowParts().GetNovelWindowEventText(), monsterDatas_[0].uniqueName_ + "\n"
                                                           + "もどれ!");
                AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
                AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

                AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

                AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetPlayerMonsterParts().GetEventGameObject());
                AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(false);

                AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

                AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetPlayerStatusInfoParts().GetEventGameObject(), new Vector3(-13.5f, manager.GetPlayerStatusInfoParts().transform.position.y, manager.GetPlayerStatusInfoParts().transform.position.z));
                AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
                AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);
            }

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            AllEventManager.GetInstance().EventTextSet(manager.GetNovelWindowParts().GetNovelWindowEventText(), "ゆけ! " + md.uniqueName_ + "!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            //SE
            AllEventManager.GetInstance().SEAudioPlayOneShotEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathMonsterSet()));

            //モンスターの登場演出
            {
                Sprite[]      sprites      = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("BattleScene/MonsterSetEffect");
                List <Sprite> animeSprites = new List <Sprite>();
                for (int i = 0; i < sprites.Length; ++i)
                {
                    animeSprites.Add(sprites[i]);
                }
                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetPlayerEffectParts().GetEventSpriteRenderer(), animeSprites);
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.Anime);
                AllEventManager.GetInstance().AllUpdateEventExecute(0.35f);
            }

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime() / 2);

            //画像の設定
            if (md.battleData_.HaveAbnormalType(AbnormalType.Hero))
            {
                List <Sprite> sprites = new List <Sprite>();
                sprites.Add(md.tribesData_.backDreamTex_);

                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetPlayerMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
                AllEventManager.GetInstance().AllUpdateEventExecute();
            }
            else
            {
                List <Sprite> sprites = new List <Sprite>();
                sprites.Add(md.tribesData_.backTex_);

                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetPlayerMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
                AllEventManager.GetInstance().AllUpdateEventExecute();
            }

            //ステータスインフォへの反映
            manager.GetPlayerStatusInfoParts().MonsterStatusInfoSetEventSet(md);

            //攻撃技の反映
            manager.GetAttackCommandParts().MonsterDataReflect(md, EnemyBattleData.GetInstance().GetMonsterDatas(0));

            //ねむりの終了処理
            manager.SleepProcessEnd();

            IMonsterData temp = monsterDatas_[0];
            monsterDatas_[0] = monsterDatas_[changeMonsterNumber_];
            monsterDatas_[changeMonsterNumber_] = temp;

            //ねむりの開始処理
            manager.SleepProcessStart();
            manager.SleepUseStart(this);

            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetPlayerMonsterParts().GetEventGameObject());
            AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(true);

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetPlayerStatusInfoParts().GetEventGameObject(), new Vector3(-6.12f, manager.GetPlayerStatusInfoParts().transform.position.y, manager.GetPlayerStatusInfoParts().transform.position.z));
            AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
            AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);
        }

        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        manager.ActiveUiCommand();
        manager.InactiveUiCommand();

        allSceneMgr.inputProvider_ = new InactiveInputProvider();

        changeMonsterNumber_      = 0;
        changeMonsterSkillNumber_ = 0;
    }
    public void DreamSyncronizeEventSet(IMonsterData monsterData, Vector3 monsterStartPos, Vector3 monsterEndPos)
    {
        AllEventManager eventManager = AllEventManager.GetInstance();
        AllSceneManager sceneManager = AllSceneManager.GetInstance();

        //表示
        eventManager.UpdateGameObjectSet(updateGameObject_);
        eventManager.UpdateGameObjectsActiveSetExecute(true);

        //モンスターの画像の設定
        {
            List <Sprite> sprites = new List <Sprite>();
            sprites.Add(monsterData.tribesData_.frontTex_);
            eventManager.EventSpriteRendererSet(monsterEventSprite_, sprites);
            eventManager.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
            eventManager.AllUpdateEventExecute();
        }

        //モンスターの初期位置への移動
        eventManager.UpdateGameObjectSet(monsterUpdateObject_, monsterStartPos);
        eventManager.UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
        eventManager.AllUpdateEventExecute();

        //ウェイト
        eventManager.EventWaitSet(0.5f);

        //モンスターを中心に移動
        eventManager.UpdateGameObjectSet(monsterUpdateObject_, new Vector3(0, monsterStartPos.y, monsterStartPos.z));
        eventManager.UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
        eventManager.AllUpdateEventExecute(1.0f, t13.TimeFluctProcess.Sine);

        //ウェイト
        eventManager.EventWaitSet(0.8f);

        //進化後のモンスターの画像の設定
        {
            List <Sprite> sprites = new List <Sprite>();
            sprites.Add(monsterData.tribesData_.frontDreamTex_);
            eventManager.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
            eventManager.EventSpriteRendererSet(monsterEventSprite_, sprites);
            eventManager.AllUpdateEventExecute();
        }

        //進化時SE
        eventManager.SEAudioPlayOneShotEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathDreamEffect()));

        //進化エフェクト
        {
            Sprite[]      sprites    = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("BattleScene/MonsterDreamEffect");
            List <Sprite> spriteList = new List <Sprite>();
            for (int i = 0; i < sprites.Length; ++i)
            {
                spriteList.Add(sprites[i]);
            }
            eventManager.EventSpriteRendererSet(effectEventSprite_, spriteList);
            eventManager.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.Anime);
            eventManager.AllUpdateEventExecute(0.5f);
        }

        //ウェイト
        eventManager.EventWaitSet(0.8f);

        //モンスターの退場
        eventManager.UpdateGameObjectSet(monsterUpdateObject_, monsterEndPos);
        eventManager.UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
        eventManager.AllUpdateEventExecute(1.0f, t13.TimeFluctProcess.Quart);

        //ウェイト
        eventManager.EventWaitSet(0.5f);

        //非表示
        eventManager.UpdateGameObjectSet(updateGameObject_);
        eventManager.UpdateGameObjectsActiveSetExecute(false);
    }
Exemple #8
0
    public SkillData(string skillDataName)
    {
        //初期化
        addSelfParameterRanks_  = new List <AddParameterRankState>();
        addOtherParameterRanks_ = new List <AddParameterRankState>();

        addSelfAbnormalStates_  = new List <AddAbnormalTypeState>();
        addOtherAbnormalStates_ = new List <AddAbnormalTypeState>();

        effectValueType_ = new EffectValueTypeProvider();

        ResourcesSkillData data = ResourcesSkillDatasLoader.GetInstance().GetSkillDatas(skillDataName);

        skillNumber_ = data.skillNumber_;

        skillName_ = data.skillName_;

        effectValue_ = data.effectValue_;

        optionEffectTriggerRateValue_ = data.optionEffectTriggerRateValue_;
        successRateValue_             = data.successRateValue_;
        upDpValue_ = data.upDpValue_;

        playPoint_    = data.playPoint_;
        nowPlayPoint_ = playPoint_;

        elementType_            = new ElementTypeState((ElementType)data.elementType_);
        effectValueType_.state_ = (EffectValueTypeState)data.effectValueType_;

        triggerPriority_       = data.triggerPriority_;
        criticalParameterRank_ = data.criticalParameterRank_;

        if (data.effectName_ == "NoneEffect")
        {
            effectAnimeSprites_.Add(ResourcesGraphicsLoader.GetInstance().GetGraphics("SkillEffect/" + data.effectName_));
        }
        else
        {
            Sprite[] sprite = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("SkillEffect/" + data.effectName_);
            for (int i = 0; i < sprite.Length; ++i)
            {
                effectAnimeSprites_.Add(sprite[i]);
            }
            effectSound_ = ResourcesSoundsLoader.GetInstance().GetSounds("SE/SkillEffect/" + data.effectName_);
        }

        for (int i = 0; i < data.addSelfParameterRanks_.Length; ++i)
        {
            addSelfParameterRanks_.Add(
                new AddParameterRankState((AddParameterRank)data.addSelfParameterRanks_[i].addParameterRank_
                                          , data.addSelfParameterRanks_[i].value_
                                          ));
        }
        for (int i = 0; i < data.addOtherParameterRanks_.Length; ++i)
        {
            addOtherParameterRanks_.Add(
                new AddParameterRankState((AddParameterRank)data.addOtherParameterRanks_[i].addParameterRank_
                                          , data.addOtherParameterRanks_[i].value_
                                          ));
        }

        for (int i = 0; i < data.addSelfAbnormals_.Length; ++i)
        {
            addSelfAbnormalStates_.Add(new AddAbnormalTypeState((AddAbnormalType)data.addSelfAbnormals_[i].addAbnormal_));
        }
        for (int i = 0; i < data.addOtherAbnormals_.Length; ++i)
        {
            addOtherAbnormalStates_.Add(new AddAbnormalTypeState((AddAbnormalType)data.addOtherAbnormals_[i].addAbnormal_));
        }

        effectInfo_ = data.effectInfo_;
    }
Exemple #9
0
    //倒れた時の処理
    public override void MonsterDownEventSet(BattleManager manager)
    {
        battleActiveMonsterSize_ -= 1;

        //dreamPoint_ += 45;

        //戦闘のモンスターをダウンさせる
        monsterDatas_[0].battleActive_ = false;

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(1.0f);

        //エネミーの画像の非表示
        AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyMonsterParts().GetEventGameObject());
        AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(false);

        //SE
        AllEventManager.GetInstance().SEAudioPlayOneShotEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathMonsterDown()));

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        ////DPの演出のイベント
        //manager.StatusInfoPartsDPEffectEventSet(this, manager.GetEnemyStatusInfoParts());
        //
        ////ウェイト
        //AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        //エネミーのステータスインフォの退場
        AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyStatusInfoParts().GetEventGameObject(), new Vector3(-13.5f, manager.GetEnemyStatusInfoParts().transform.position.y, manager.GetEnemyStatusInfoParts().transform.position.z));
        AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
        AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);

        //文字列の処理
        AllEventManager.GetInstance().EventTextSet(manager.GetNovelWindowParts().GetNovelWindowEventText(), "あいての " + monsterDatas_[0].uniqueName_ + "は たおれた!");
        AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        if (battleActiveMonsterSize_ == 0)
        {
            //DPゲージの登場
            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetPlayerDreamPointInfoParts().GetUpdateGameObject());
            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyDreamPointInfoParts().GetUpdateGameObject());
            AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(true);

            //BGMの再生
            AllEventManager.GetInstance().BGMAudioClipChangeEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathDreamers_Win()));
            AllEventManager.GetInstance().BGMAudioPlayEventSet();

            //文字列の処理
            AllEventManager.GetInstance().EventTextSet(
                manager.GetNovelWindowParts().GetNovelWindowEventText()
                , EnemyTrainerData.GetInstance().GetJob() + "の " + EnemyTrainerData.GetInstance().GetName() + "\n"
                + "との しょうぶに かった!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime() * 2);

            //エネミーの入場
            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyParts().GetEventGameObject(), new Vector3(3.5f, manager.GetEnemyParts().transform.position.y, manager.GetEnemyParts().transform.position.z));
            AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
            AllEventManager.GetInstance().AllUpdateEventExecute(1.5f);

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime() * 2);

            //フェードアウト
            AllEventManager.GetInstance().EventSpriteRendererSet(
                AllSceneManager.GetInstance().GetPublicFrontScreen().GetEventScreenSprite()
                , null
                , new Color(AllSceneManager.GetInstance().GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.r, AllSceneManager.GetInstance().GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.g, AllSceneManager.GetInstance().GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.b, 255)
                );
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.ChangeColor);
            AllEventManager.GetInstance().AllUpdateEventExecute(2.0f);

            //シーンの切り替え
            AllEventManager.GetInstance().SceneChangeEventSet(SceneState.Map, SceneChangeMode.Continue);

            //勝ちの設定
            PlayerTrainerData.GetInstance().battleEnd_    = true;
            PlayerTrainerData.GetInstance().battleResult_ = true;

            //データの初期化
            PlayerBattleData.ReleaseInstance();
            EnemyTrainerData.ReleaseInstance();
            EnemyBattleData.ReleaseInstance();

            return;
        }

        //タイプ相性の測定
        int[] typeSimillarResult = new int[3] {
            0, 0, 0
        };
        int[] monsterNumbers = new int[3] {
            0, 1, 2
        };


        for (int i = 0; i < monsterDatas_.Length; ++i)
        {
            //戦えたら
            if (monsterDatas_[i].battleActive_ &&
                monsterDatas_[i].tribesData_.monsterNumber_ != 0)
            {
                {
                    int simillarResult = PlayerBattleData.GetInstance().GetMonsterDatas(0).ElementSimillarCheckerForValue(monsterDatas_[i].tribesData_.firstElement_);

                    typeSimillarResult[i] += simillarResult;
                }
                {
                    int simillarResult = PlayerBattleData.GetInstance().GetMonsterDatas(0).ElementSimillarCheckerForValue(monsterDatas_[i].tribesData_.secondElement_);

                    typeSimillarResult[i] += simillarResult;
                }
            }
        }

        t13.Utility.SimpleHiSort2Index(typeSimillarResult, monsterNumbers);

        //モンスターデータの入れ替え
        IMonsterData temp = monsterDatas_[0];

        monsterDatas_[0] = monsterDatas_[monsterNumbers[0]];
        monsterDatas_[monsterNumbers[0]] = temp;

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(1.0f);

        //文字列の処理
        AllEventManager.GetInstance().EventTextSet(
            manager.GetNovelWindowParts().GetNovelWindowEventText(), EnemyTrainerData.GetInstance().GetName() + "は\n"
            + monsterDatas_[0].uniqueName_ + "を くりだした!"
            );
        AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

        //SE
        AllEventManager.GetInstance().SEAudioPlayOneShotEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathMonsterSet()));

        //モンスターの登場演出
        {
            Sprite[]      sprites      = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("BattleScene/MonsterSetEffect");
            List <Sprite> animeSprites = new List <Sprite>();
            for (int i = 0; i < sprites.Length; ++i)
            {
                animeSprites.Add(sprites[i]);
            }
            AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyEffectParts().GetEventSpriteRenderer(), animeSprites);
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.Anime);
            AllEventManager.GetInstance().AllUpdateEventExecute(0.35f);
        }

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime() / 2);

        //画像の設定
        if (monsterDatas_[0].battleData_.HaveAbnormalType(AbnormalType.Hero))
        {
            List <Sprite> sprites = new List <Sprite>();
            sprites.Add(monsterDatas_[0].tribesData_.frontDreamTex_);

            AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
            AllEventManager.GetInstance().AllUpdateEventExecute();
        }
        else
        {
            List <Sprite> sprites = new List <Sprite>();
            sprites.Add(monsterDatas_[0].tribesData_.frontTex_);

            AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
            AllEventManager.GetInstance().AllUpdateEventExecute();
        }

        //ステータスインフォへの反映
        manager.GetEnemyStatusInfoParts().MonsterStatusInfoSetEventSet(monsterDatas_[0]);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        //エネミーの表示
        AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyMonsterParts().GetEventGameObject());
        AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(true);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        //エネミーのステータスインフォの入場
        AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyStatusInfoParts().GetEventGameObject(), new Vector3(-3.5f, manager.GetEnemyStatusInfoParts().transform.position.y, manager.GetEnemyStatusInfoParts().transform.position.z));
        AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
        AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        manager.ActiveUiCommand();
        manager.InactiveUiCommand();
    }
Exemple #10
0
    //交換処理
    public override void MonsterChangeEventSet(BattleManager manager)
    {
        //モンスターの変更が行われていたら
        if (changeMonsterNumber_ > 0)
        {
            IMonsterData md = monsterDatas_[changeMonsterNumber_];

            //先頭のパラメーターをリセット
            monsterDatas_[0].battleData_.RankReset();

            AllEventManager.GetInstance().EventTextSet(manager.GetNovelWindowParts().GetNovelWindowEventText(), EnemyTrainerData.GetInstance().GetName() + "は\n"
                                                       + monsterDatas_[0].uniqueName_ + "を ひっこめた!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyMonsterParts().GetEventGameObject());
            AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(false);

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyStatusInfoParts().GetEventGameObject(), new Vector3(-13.5f, manager.GetEnemyStatusInfoParts().transform.position.y, manager.GetEnemyStatusInfoParts().transform.position.z));
            AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
            AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            //モンスターデータの入れ替え
            IMonsterData temp = monsterDatas_[0];
            monsterDatas_[0] = monsterDatas_[changeMonsterNumber_];
            monsterDatas_[changeMonsterNumber_] = temp;

            AllEventManager.GetInstance().EventTextSet(manager.GetNovelWindowParts().GetNovelWindowEventText(), EnemyTrainerData.GetInstance().GetName() + "は\n"
                                                       + md.uniqueName_ + "を くりだした!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(manager.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            //SE
            AllEventManager.GetInstance().SEAudioPlayOneShotEventSet(ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathMonsterSet()));

            //モンスターの登場演出
            {
                Sprite[]      sprites      = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("BattleScene/MonsterSetEffect");
                List <Sprite> animeSprites = new List <Sprite>();
                for (int i = 0; i < sprites.Length; ++i)
                {
                    animeSprites.Add(sprites[i]);
                }
                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyEffectParts().GetEventSpriteRenderer(), animeSprites);
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.Anime);
                AllEventManager.GetInstance().AllUpdateEventExecute(0.35f);
            }

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime() / 2);

            //画像の設定
            if (monsterDatas_[0].battleData_.HaveAbnormalType(AbnormalType.Hero))
            {
                List <Sprite> sprites = new List <Sprite>();
                sprites.Add(monsterDatas_[0].tribesData_.frontDreamTex_);

                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
                AllEventManager.GetInstance().AllUpdateEventExecute();
            }
            else
            {
                List <Sprite> sprites = new List <Sprite>();
                sprites.Add(monsterDatas_[0].tribesData_.frontTex_);
                AllEventManager.GetInstance().EventSpriteRendererSet(manager.GetEnemyMonsterParts().GetEventMonsterSprite(), sprites, new Color32());
                AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.SpriteSet);
                AllEventManager.GetInstance().AllUpdateEventExecute();
            }

            //ステータスインフォへの反映
            manager.GetEnemyStatusInfoParts().MonsterStatusInfoSetEventSet(monsterDatas_[0]);

            //エネミーの表示
            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyMonsterParts().GetEventGameObject());
            AllEventManager.GetInstance().UpdateGameObjectsActiveSetExecute(true);

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

            //エネミーのステータスインフォの入場
            AllEventManager.GetInstance().UpdateGameObjectSet(manager.GetEnemyStatusInfoParts().GetEventGameObject(), new Vector3(-3.5f, manager.GetEnemyStatusInfoParts().transform.position.y, manager.GetEnemyStatusInfoParts().transform.position.z));
            AllEventManager.GetInstance().UpdateGameObjectUpdateExecuteSet(UpdateGameObjectEventManagerExecute.PosMove);
            AllEventManager.GetInstance().AllUpdateEventExecute(0.2f);
        }

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(manager.GetEventWaitTime());

        changeMonsterNumber_      = 0;
        changeMonsterSkillNumber_ = 0;
    }
Exemple #11
0
    public void SceneStart()
    {
        AllSceneManager   allSceneMgr = AllSceneManager.GetInstance();
        AllEventManager   allEventMgr = AllEventManager.GetInstance();
        PlayerTrainerData playerData  = PlayerTrainerData.GetInstance();

        //初めての処理だったら
        if (firstStart_)
        {
            firstStart_ = false;

            //オブジェクトの配置
            for (int i = 0; i < floorObjects_.Count; ++i)
            {
                floorObjects_[i].gameObject.SetActive(true);
            }

            //依存性注入
            processProvider_.state_ = MapSceneProcess.PlayerMove;

            //ウェイト
            allEventMgr.EventWaitSet(0.5f);

            //シーンの切り替え
            allEventMgr.SceneChangeEventSet(SceneState.Map, SceneChangeMode.Change);
        }
        else
        {
            //依存性注入
            processProvider_.state_    = MapSceneProcess.PlayerMove;
            inputSoundProvider_.state_ = MapSceneInputSoundState.Normal;

            //主人公の移動の変更
            playerMoveMap_.is_move = true;

            //BGMの再生
            AllSceneManager.GetInstance().GetPublicAudioParts().GetBGMAudioSource().clip = ResourcesSoundsLoader.GetInstance().GetSounds(SoundsPathSupervisor.GetInstance().GetPathDreamers_Map());
            AllSceneManager.GetInstance().GetPublicAudioParts().GetBGMAudioSource().Play();

            //オブジェクトの配置
            for (int i = 0; i < floorObjects_.Count; ++i)
            {
                floorObjects_[i].gameObject.SetActive(false);
            }
            floorObjects_[playerData.nowMapFloor_].gameObject.SetActive(true);

            //マップデータに反映
            mapData_.MapDataReset();

            //各階層の扉の画像の反映
            {
                Sprite[] sprites = ResourcesGraphicsLoader.GetInstance().GetGraphicsAll("MapScene/institute01");
                for (int i = floorObjects_.Count - 1; i >= playerData.clearMapFloor_; --i)
                {
                    floorObjects_[i].GetEventMoveMaps(1).GetEventSpriteRenderer().GetSpriteRenderer().sprite = sprites[44];
                    floorObjects_[i].GetEventMoveMaps(2).GetEventSpriteRenderer().GetSpriteRenderer().sprite = sprites[43];
                    floorObjects_[i].GetEventMoveMaps(3).GetEventSpriteRenderer().GetSpriteRenderer().sprite = sprites[51];
                    floorObjects_[i].GetEventMoveMaps(4).GetEventSpriteRenderer().GetSpriteRenderer().sprite = sprites[52];
                }
                for (int i = 0; i < playerData.clearMapFloor_; ++i)
                {
                    floorObjects_[i].GetEventMoveMaps(1).GetEventSpriteRenderer().GetSpriteRenderer().sprite = null;
                    floorObjects_[i].GetEventMoveMaps(2).GetEventSpriteRenderer().GetSpriteRenderer().sprite = null;
                    floorObjects_[i].GetEventMoveMaps(3).GetEventSpriteRenderer().GetSpriteRenderer().sprite = null;
                    floorObjects_[i].GetEventMoveMaps(4).GetEventSpriteRenderer().GetSpriteRenderer().sprite = null;
                }
            }
            //各階層の階層イベントの反映
            for (int i = floorObjects_.Count - 1; i >= playerData.clearMapFloor_; --i)
            {
                floorObjects_[i].GetEventMoveMaps(0).executeEventNum_ = 1;
                floorObjects_[i].GetEventMoveMaps(1).executeEventNum_ = 0;
                floorObjects_[i].GetEventMoveMaps(2).executeEventNum_ = 0;
            }
            for (int i = 0; i < playerData.clearMapFloor_; ++i)
            {
                floorObjects_[i].GetEventMoveMaps(0).executeEventNum_ = 4;
                floorObjects_[i].GetEventMoveMaps(1).executeEventNum_ = 1;
                floorObjects_[i].GetEventMoveMaps(2).executeEventNum_ = 1;
            }

            //フェードイン
            allEventMgr.EventSpriteRendererSet(
                allSceneMgr.GetPublicFrontScreen().GetEventScreenSprite()
                , null
                , new Color(allSceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.r, allSceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.g, allSceneMgr.GetPublicFrontScreen().GetEventScreenSprite().GetSpriteRenderer().color.b, 0)
                );
            allEventMgr.EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.ChangeColor);
            allEventMgr.AllUpdateEventExecute(0.4f);

            //イベントの最後
            //制御の変更
            allEventMgr.InputProviderChangeEventSet(new KeyBoardNormalInputProvider());
        }
    }