42 lines
995 B
C#
42 lines
995 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using ZXK.UTility;
|
|
|
|
public class ButVCRPanel : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Button _startPlayBtn;
|
|
[SerializeField]
|
|
private RectTransform _videoSeekPanel;
|
|
private VCR Vcr;
|
|
private bool _startPlayBtnBool = false;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
Vcr = _videoSeekPanel.GetComponent<VCR>();
|
|
_startPlayBtn.onClick.AddListener(() =>
|
|
{
|
|
if (_startPlayBtnBool == false)
|
|
{
|
|
_videoSeekPanel.gameObject.SetActive(true);
|
|
Vcr.OnOpenVideoFile();
|
|
_startPlayBtnBool = true;
|
|
}
|
|
else
|
|
{
|
|
_videoSeekPanel.gameObject.SetActive(false);
|
|
_startPlayBtnBool = false;
|
|
}
|
|
});
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|