zip压缩加载测试
This commit is contained in:
38
Assets/Main/Script/Runtime/Panel/VideoSystem.cs
Normal file
38
Assets/Main/Script/Runtime/Panel/VideoSystem.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Stary.Evo;
|
||||
using Stary.Evo.AudioCore;
|
||||
using Stary.Evo.UIFarme;
|
||||
using UnityEngine;
|
||||
|
||||
public interface IVideoSystem : ISystem
|
||||
{
|
||||
void PlayVideo(VideoPanel.VideoInfo info);
|
||||
void StopVideo();
|
||||
}
|
||||
|
||||
public class VideoSystem : AbstractSystem, IVideoSystem
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public async void PlayVideo(VideoPanel.VideoInfo info)
|
||||
{
|
||||
AudioCoreManager.SetMusicVolume(new AudioData()
|
||||
{
|
||||
fadeDuration = 2f,
|
||||
volume = 0f,
|
||||
});
|
||||
await this.GetSystem<IPanelSystem>().PushQueue<VideoPanel>(AppConfig.GetDefaultMainInstance().transform,"Main");
|
||||
this.GetSystem<IPanelSystem>().SendPanelEvent(ModeType.VideoStart,info);
|
||||
}
|
||||
|
||||
public void StopVideo()
|
||||
{
|
||||
this.GetSystem<IPanelSystem>().SendPanelEvent(ModeType.VideoEnd);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user