public void StartBattleEndDirection(GameObject legend, GameObject title_ui, Action onComplete)
    {
        //IL_0013: Unknown result type (might be due to invalid IL or missing references)
        //IL_0018: Expected O, but got Unknown
        //IL_007f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
        //IL_0150: Unknown result type (might be due to invalid IL or missing references)
        //IL_0165: Unknown result type (might be due to invalid IL or missing references)
        //IL_022e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0233: Unknown result type (might be due to invalid IL or missing references)
        //IL_0243: Unknown result type (might be due to invalid IL or missing references)
        //IL_0248: Unknown result type (might be due to invalid IL or missing references)
        //IL_0258: Unknown result type (might be due to invalid IL or missing references)
        //IL_025d: Unknown result type (might be due to invalid IL or missing references)
        //IL_029a: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ae: Unknown result type (might be due to invalid IL or missing references)
        //IL_02cb: Unknown result type (might be due to invalid IL or missing references)
        titleUIPrefab = title_ui;
        originalPlayerAnimatorController = player.animator.get_runtimeAnimatorController();
        player._collider.set_enabled(false);
        player.animator.set_runtimeAnimatorController(playerAnimatorController);
        player.animator.set_cullingMode(0);
        player.animator.Rebind();
        player._transform.set_position(new Vector3(0f, 0f, 26f));
        player._transform.set_eulerAngles(new Vector3(0f, 180f, 0f));
        player._rigidbody.set_constraints(126);
        player.ActIdle(false, -1f);
        player.PlayMotion(PLAYER_ANIM_EXIT_CUT_SCENE_START_NAME, -1f);
        legend.SetActive(true);
        legendDragon = legend;
        Animator component = legend.GetComponent <Animator>();

        component.set_runtimeAnimatorController(legendDragonAnimController);
        component.Play(LEGEND_DRAGON_ANIM_STATE);
        for (int i = 0; i < boss.colliders.Length; i++)
        {
            boss.colliders[i].set_enabled(false);
        }
        boss._transform.set_position(Vector3.get_zero());
        boss._transform.set_eulerAngles(Vector3.get_zero());
        boss._rigidbody.set_constraints(126);
        boss.ActIdle(false, -1f);
        boss.animator.set_cullingMode(0);
        boss.animator.Rebind();
        boss.PlayMotion(BOSS_ANIM_EXIT_CUT_SCENE_STATE_NAME, -1f);
        bossShadow.setAnimTransform(boss.hip);
        if (enemyController == null)
        {
            enemyController = (boss.controller as EnemyController);
        }
        enemyController.set_enabled(false);
        originalFov = MonoBehaviourSingleton <AppMain> .I.mainCamera.get_fieldOfView();

        cameraAnim.get_transform().set_position(Vector3.get_zero());
        cameraAnim.get_transform().set_rotation(Quaternion.get_identity());
        cameraAnim.get_transform().set_localScale(Vector3.get_zero());
        cameraAnim.set_cullingType(0);
        cameraAnim.Play(BATTLE_EXIT_CAMERA_CLIP_NAME);
        cameraAnim.Sample();
        MonoBehaviourSingleton <AppMain> .I.mainCameraTransform.set_position(CAMERA_END_POSITION);

        MonoBehaviourSingleton <AppMain> .I.mainCameraTransform.set_rotation(CAMERA_END_ROTAION);

        MonoBehaviourSingleton <InGameCameraManager> .I.set_enabled(false);

        this.StartCoroutine(DoBattleEndDirection(onComplete));
    }
Beispiel #2
0
    public void Play(Action _onComplete = null)
    {
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0029: Expected O, but got Unknown
        //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_0264: Unknown result type (might be due to invalid IL or missing references)
        //IL_0269: Expected O, but got Unknown
        //IL_0285: Unknown result type (might be due to invalid IL or missing references)
        //IL_028a: Expected O, but got Unknown
        //IL_02c7: Unknown result type (might be due to invalid IL or missing references)
        //IL_02de: Unknown result type (might be due to invalid IL or missing references)
        //IL_02e3: Unknown result type (might be due to invalid IL or missing references)
        //IL_03d6: Unknown result type (might be due to invalid IL or missing references)
        //IL_046b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0507: Unknown result type (might be due to invalid IL or missing references)
        //IL_050c: Expected O, but got Unknown
        //IL_0528: Unknown result type (might be due to invalid IL or missing references)
        //IL_052d: Expected O, but got Unknown
        //IL_05c4: Unknown result type (might be due to invalid IL or missing references)
        //IL_05dc: Unknown result type (might be due to invalid IL or missing references)
        //IL_05e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_06b3: Unknown result type (might be due to invalid IL or missing references)
        //IL_06cd: Unknown result type (might be due to invalid IL or missing references)
        //IL_06d4: Unknown result type (might be due to invalid IL or missing references)
        //IL_06ec: Unknown result type (might be due to invalid IL or missing references)
        //IL_06f3: Unknown result type (might be due to invalid IL or missing references)
        //IL_06f8: Unknown result type (might be due to invalid IL or missing references)
        //IL_0724: Unknown result type (might be due to invalid IL or missing references)
        //IL_0729: Unknown result type (might be due to invalid IL or missing references)
        //IL_0733: Unknown result type (might be due to invalid IL or missing references)
        //IL_0738: Unknown result type (might be due to invalid IL or missing references)
        if (cutSceneData == null)
        {
            MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("InGameMain", this.get_gameObject(), "HOME", null, null, true);

            _onComplete?.Invoke();
        }
        else
        {
            onComplete  = _onComplete;
            isPlaying   = true;
            cutNo       = 0;
            playingTime = 0f;
            oldTime     = 0f;
            MonoBehaviourSingleton <SoundManager> .I.TransitionTo(cutSceneData.mixerName, 1f);

            if (cutSceneData.bgm != 0)
            {
                SoundManager.RequestBGM(cutSceneData.bgm, true);
            }
            cameraAnimator.set_cullingMode(0);
            cameraAnimator.set_runtimeAnimatorController(cutSceneData.cameraController);
            cameraAnimator.Play(CUT_STATE_HASH[cutNo]);
            UpdateCamera();
            MonoBehaviourSingleton <InGameCameraManager> .I.cameraTransform.get_gameObject().SetActive(false);

            for (int k = 0; k < this.playerInfo.Length; k++)
            {
                this.playerInfo[k] = null;
            }
            for (int l = 0; l < cutSceneData.playerData.Length; l++)
            {
                CutSceneData.PlayerData playerData = cutSceneData.playerData[l];
                if (playerData != null)
                {
                    if (!MonoBehaviourSingleton <StageObjectManager> .IsValid())
                    {
                        break;
                    }
                    StageObjectManager i2     = MonoBehaviourSingleton <StageObjectManager> .I;
                    Player             player = null;
                    if (playerData.type == CutSceneData.PlayerData.TYPE.MY_CHARACTER)
                    {
                        player = i2.self;
                    }
                    else
                    {
                        if (i2.playerList.Count <= (int)playerData.type)
                        {
                            continue;
                        }
                        int num = 0;
                        for (int m = 0; m < i2.playerList.Count; m++)
                        {
                            if (!(i2.playerList[m] is Self))
                            {
                                if ((int)playerData.type <= num)
                                {
                                    player = (i2.playerList[m] as Player);
                                    break;
                                }
                                num++;
                            }
                        }
                        if (player == null)
                        {
                            for (int n = 0; n < i2.playerList.Count; n++)
                            {
                                if ((int)playerData.type <= num)
                                {
                                    player = (i2.nonplayerList[n] as Player);
                                    break;
                                }
                                num++;
                            }
                        }
                        if (player == null)
                        {
                            continue;
                        }
                    }
                    PlayerInfo playerInfo = new PlayerInfo();
                    playerInfo.obj                = player.get_gameObject();
                    playerInfo.animator           = player.animator;
                    playerInfo.originalController = player.animator.get_runtimeAnimatorController();
                    playerInfo.keyData            = playerData;
                    player.ActIdle(false, -1f);
                    player._collider.set_enabled(false);
                    player._rigidbody.set_constraints(126);
                    player._transform.set_position(playerData.startPos);
                    player._transform.set_rotation(Quaternion.AngleAxis(playerData.startAngleY, Vector3.get_up()));
                    player.animator.set_cullingMode(0);
                    player.animator.set_runtimeAnimatorController(playerData.controller);
                    player.animator.Rebind();
                    this.playerInfo[l] = playerInfo;
                }
            }
            for (int num2 = 0; num2 < this.playerInfo.Length; num2++)
            {
                if (this.playerInfo[num2] != null && !(this.playerInfo[num2].obj == null))
                {
                    List <StageObject> playerList = MonoBehaviourSingleton <StageObjectManager> .I.playerList;
                    int i;
                    for (i = 0; i < playerList.Count; i++)
                    {
                        PlayerInfo playerInfo2 = Array.Find(this.playerInfo, delegate(PlayerInfo info)
                        {
                            //IL_0024: Unknown result type (might be due to invalid IL or missing references)
                            if (info == null)
                            {
                                return(false);
                            }
                            return(info.obj == playerList[i].get_gameObject());
                        });
                        if (playerInfo2 == null)
                        {
                            playerList[i].get_gameObject().SetActive(false);
                        }
                    }
                    List <StageObject> npcList = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList;
                    int j;
                    for (j = 0; j < npcList.Count; j++)
                    {
                        PlayerInfo playerInfo3 = Array.Find(this.playerInfo, delegate(PlayerInfo info)
                        {
                            //IL_0024: Unknown result type (might be due to invalid IL or missing references)
                            if (info == null)
                            {
                                return(false);
                            }
                            return(info.obj == npcList[j].get_gameObject());
                        });
                        if (playerInfo3 == null)
                        {
                            npcList[j].get_gameObject().SetActive(false);
                        }
                    }
                }
            }
            if (cutSceneData.enemyData != null && MonoBehaviourSingleton <StageObjectManager> .IsValid())
            {
                CutSceneData.EnemyData enemyData = cutSceneData.enemyData;
                EnemyInfo enemyInfo = new EnemyInfo();
                Debug.Log((object)enemyData.startPos.y);
                Enemy boss = MonoBehaviourSingleton <StageObjectManager> .I.boss;
                enemyInfo.obj                = boss.get_gameObject();
                enemyInfo.animator           = boss.animator;
                enemyInfo.originalController = boss.animator.get_runtimeAnimatorController();
                enemyInfo.keyData            = enemyData;
                this.enemyInfo               = enemyInfo;
                if (boss.controller != null)
                {
                    boss.controller.set_enabled(false);
                    if (boss._rigidbody != null)
                    {
                        boss._rigidbody.set_constraints(126);
                    }
                }
                boss.ActIdle(false, -1f);
                boss.animator.set_cullingMode(0);
                boss.animator.set_runtimeAnimatorController(enemyData.controller);
                boss.animator.Rebind();
                boss._transform.set_position(enemyData.startPos);
                boss._transform.set_rotation(Quaternion.AngleAxis(enemyData.startAngleY, Vector3.get_up()));
                boss.animator.Play(CUT_STATE_HASH[cutNo]);
            }
            for (int num3 = 0; num3 < actorInfo.Length; num3++)
            {
                if (actorInfo[num3] != null)
                {
                    actorInfo[num3].obj.SetActive(true);
                    bool flag = actorInfo[num3].animator.HasState(0, CUT_STATE_HASH[cutNo]);
                    if (flag)
                    {
                        actorInfo[num3].obj.SetActive(flag);
                        CutSceneData.ActorData keyData = actorInfo[num3].keyData;
                        Transform parentNode           = GetParentNode(keyData.attachmentType, keyData.nodeName);
                        if (parentNode != null)
                        {
                            actorInfo[num3].obj.get_transform().set_parent(parentNode);
                        }
                        actorInfo[num3].obj.get_transform().set_localPosition(keyData.position);
                        actorInfo[num3].obj.get_transform().set_localRotation(Quaternion.Euler(keyData.rotation));
                        SkinnedMeshRenderer[] componentsInChildren = actorInfo[num3].obj.GetComponentsInChildren <SkinnedMeshRenderer>();
                        for (int num4 = 0; num4 < componentsInChildren.Length; num4++)
                        {
                            componentsInChildren[num4].set_localBounds(new Bounds(Vector3.get_zero(), Vector3.get_one() * 10000f));
                        }
                        actorInfo[num3].animator.Play(CUT_STATE_HASH[cutNo]);
                    }
                }
            }
        }
    }