예제 #1
0
    void Start()
    {
        if (is_start_by_editor)
        {
            GameEnine.Init(this);
            _cut_scene_camera = new XCutSceneCamera();
            _cut_scene_camera.Initialize();
            _cut_scene_camera.Effect(cut_scene_data.CameraClip, cut_scene_data.Trigger);
            _cut_scene_camera.UnityCamera.fieldOfView = cut_scene_data.FieldOfView;
            XLoading.Show(false);
        }
        else
        {
            XScene.singleton.GameCamera.Effect(cut_scene_data.CameraClip, cut_scene_data.Trigger);
            XScene.singleton.GameCamera.UnityCamera.fieldOfView = cut_scene_data.FieldOfView;
        }
        start_play_time = Time.time;
        XCutSceneUI.singleton.Initial();

        if (!cut_scene_data.GeneralShow)
        {
            for (int i = 0, max = cut_scene_data.Actors.Count; i < max; i++)
            {
                XActorDataClip clip = cut_scene_data.Actors[i];
                XResources.Load <AnimationClip>(clip.Clip, AssetType.Anim);
                _times.Add(XTimerMgr.singleton.SetTimer(clip.TimeLineAt / FPS - 0.016f, BeOnStage, clip));
            }
            for (int i = 0, max = cut_scene_data.Player.Count; i < max; i++)
            {
                XPlayerDataClip clip = cut_scene_data.Player[i];
                XResources.Load <AnimationClip>(clip.Clip1, AssetType.Anim);
                _times.Add(XTimerMgr.singleton.SetTimer(clip.TimeLineAt / FPS - 0.016f, BePlayerOnStage, clip));
            }
            for (int i = 0, max = cut_scene_data.Fxs.Count; i < max; i++)
            {
                _times.Add(XTimerMgr.singleton.SetTimer(cut_scene_data.Fxs[i].TimeLineAt / FPS, Fx, cut_scene_data.Fxs[i]));
            }
        }
        for (int i = 0, max = cut_scene_data.Audios.Count; i < max; i++)
        {
            XAudioDataClip clip = cut_scene_data.Audios[i];
            _times.Add(XTimerMgr.singleton.SetTimer(clip.TimeLineAt / FPS, Audio, clip));
        }
        if (cut_scene_data.AutoEnd)
        {
            _times.Add(XTimerMgr.singleton.SetTimer((cut_scene_data.TotalFrame - 30) / FPS, EndShow, null));
        }
        if (cut_scene_data.Mourningborder)
        {
            XCutSceneUI.singleton.SetVisible(true);
            for (int i = 0, max = cut_scene_data.SubTitle.Count; i < max; i++)
            {
                XSubTitleDataClip clip = cut_scene_data.SubTitle[i];
                _times.Add(XTimerMgr.singleton.SetTimer(clip.TimeLineAt / FPS, SubTitle, clip));
            }
            for (int i = 0, max = cut_scene_data.Slash.Count; i < max; i++)
            {
                _times.Add(XTimerMgr.singleton.SetTimer(cut_scene_data.Slash[i].TimeLineAt / FPS, Slash, cut_scene_data.Slash[i]));
            }
        }
    }
예제 #2
0
    void BePlayerOnStage(object o)
    {
        XPlayerDataClip clip = o as XPlayerDataClip;

        _actors.Add(new XActor(clip.AppearX, clip.AppearY, clip.AppearZ, clip.Clip1));
    }