37 lines
1.2 KiB
C#
Raw Normal View History

2025-01-02 12:15:45 +08:00
using CG.Framework;
using CG.UTility;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*******************************************************************************
*Create By CG
*Function
*******************************************************************************/
namespace ZXK.LouDiXvMuNiu
{
public class VideoShowPanel : UIBase
{
private VCRCustom _videoCtrl;
private Action _exitEvent;
protected override void Awake()
{
base.Awake();
_videoCtrl = GetWedage("VCRPanel_N").GetComponent<VCRCustom>();
AddEventListener("ExitVideoBtn_N", UIEventType.OnButtonClick, () =>
{
_exitEvent?.Invoke();
UI_Manage.Instance.ClosePanel("VideoShowPanel");
2025-01-03 08:42:56 +08:00
UI_Manage.Instance.ClosePanel("VideoShowNoCtrlPanel");
2025-01-02 12:15:45 +08:00
});
}
public void PlayVideoClip(string clipName,Action exitEvent)
{
_exitEvent = exitEvent;
2025-01-07 20:14:22 +08:00
2025-01-02 12:15:45 +08:00
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_CSDY_PATH+clipName+".mp4";
_videoCtrl.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
}
}
}