| Core/GameEngine/Model/Player/PlayerDatas.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/ResModule/VideoLoader.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/ResModule/VideoLoader.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Stage/Dungeon/DungeonStage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BossShow/ShowActor.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/CreateRolePostProcess.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/CreateRolePostProcess/MoviePlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/CreateRolePostProcess/MoviePlayer.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -759,7 +759,9 @@ break; case PlayerDataType.PlayerPKState: extersion.pkState = (int)value; if (baseData.MapID != 31220) if (baseData.MapID != 31220 && baseData.MapID != 32030 && baseData.MapID != 22030) { if (hero != null) { Core/ResModule/VideoLoader.cs
New file @@ -0,0 +1,56 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Video; public class VideoLoader { public static VideoClip Load(string name) { VideoClip mp4 = null; if (Application.isEditor) { #if UNITY_EDITOR var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Movie/", name, ".mp4"); mp4 = UnityEditor.AssetDatabase.LoadAssetAtPath<VideoClip>(path); if (mp4 == null) { DebugEx.LogErrorFormat("VideoLoader.Load() => 加载不到资源: {0}.", name); } #endif } else { var assetInfo = new AssetInfo("movie", name); mp4 = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as VideoClip; } return mp4; } public static GameObject LoadPlayer() { GameObject prefab = null; if (Application.isEditor) { #if UNITY_EDITOR var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Movie/MoviePlayer.prefab"); prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path); #endif } else { var assetInfo = new AssetInfo("movie", "MoviePlayer"); prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject; } if (prefab == null) { DebugEx.LogError("VideoLoader.LoadPlayer() => 加载不到资源: MoviePlayer."); } return prefab; } } Core/ResModule/VideoLoader.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 288ed29d137c09c43959063f8d4e3dd2 timeCreated: 1557279838 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Fight/Stage/Dungeon/DungeonStage.cs
@@ -54,11 +54,17 @@ _hero.EnterArea((int)MapArea.E_Type.Normal); CameraController.Instance.ResetOriginal(); } var _instance = TipPanel.Instance; if (PlayerDatas.Instance.baseData.LV == 1) { WindowCenter.Instance.Open<WelcomeWin>(true); CameraController.Instance.CameraObject.enabled = false; MoviePlayer.Instance.Play("CreateRoleMovie", () => { CameraController.Instance.CameraObject.enabled = true; WindowCenter.Instance.Open<MainInterfaceWin>(true); var taskModel = ModelCenter.Instance.GetModel<TaskModel>(); taskModel.AutomaticTripToTask(taskModel.currentMission); }); } else { @@ -66,11 +72,6 @@ } GA_Hero.forceAutoFight = false; // if (PreFightMission.Instance.IsFinished() == false) // { // PreFightMission.Instance.Start(); // } WindowCenter.Instance.Open<MapNameHintWin>(); WindowCenter.Instance.Open<ExperienceGetWin>(); System/BossShow/ShowActor.cs
@@ -154,6 +154,14 @@ if (sfxController != null) { sfxController.duration = 0; var _animNodde = sfxController.GetComponent<Animator>("Animation"); if (_animNodde) { if (_animNodde.HasState(0, GAStaticDefine.State_IdleHash)) { _animNodde.Play(GAStaticDefine.State_IdleHash); } } } } RequestCircleShadow(); System/CreateRolePostProcess.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: c7030bc9d853fab409f1241b4fbcc049 folderAsset: yes timeCreated: 1557222318 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: System/CreateRolePostProcess/MoviePlayer.cs
New file @@ -0,0 +1,79 @@ using UnityEngine; using System.Collections; using Snxxz.UI; using UnityEngine.Video; using System; public class MoviePlayer : MonoBehaviour { static MoviePlayer m_Instance; public static MoviePlayer Instance { get { if (m_Instance == null) { var prefab = VideoLoader.LoadPlayer(); var go = Instantiate(prefab); go.name = "MoviePlayer"; go.transform.position = new Vector3(1000, 4000, 1000); m_Instance = go.GetComponent<MoviePlayer>(); m_Instance.m_VideoCamera.enabled = false; } return m_Instance; } } [SerializeField] VideoPlayer m_VideoPlayer; [SerializeField] AudioSource m_AudioSource; [SerializeField] Camera m_VideoCamera; public bool isPlaying { get; private set; } Action onComplete; public void Play(string name, Action onComplete) { var clip = VideoLoader.Load(name); if (clip == null) { return; } this.onComplete = onComplete; m_VideoPlayer.clip = clip; m_VideoPlayer.SetTargetAudioSource(0, m_AudioSource); m_VideoPlayer.Play(); m_VideoCamera.enabled = true; SoundPlayer.Instance.mute = true; isPlaying = true; } public void Stop() { isPlaying = false; m_VideoCamera.enabled = false; SoundPlayer.Instance.mute = false; if (m_VideoPlayer.isPlaying) { m_VideoPlayer.Stop(); m_VideoPlayer.clip = null; } if (onComplete != null) { onComplete(); onComplete = null; } } void Update() { if (isPlaying && !m_VideoPlayer.isPlaying) { Stop(); } } } System/CreateRolePostProcess/MoviePlayer.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 538244db8588cb04caa934a9eae10ec7 timeCreated: 1557222335 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: