北海美人鱼地下场景演练
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
950 B

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DelectPanel : MonoBehaviour
{
public Button SureButton;
public Button CancelButton;
public GameObject VideoItem;
// Start is called before the first frame update
void Start()
{
SureButton.onClick.AddListener(SureClick);
CancelButton.onClick.AddListener(CancelClick);
}
private void OnDestroy()
{
SureButton.onClick.RemoveListener(SureClick);
CancelButton.onClick.RemoveListener(CancelClick);
}
private void CancelClick()
{
gameObject.SetActive(false);
}
private void SureClick()
{
var videoData = VideoItem.GetComponent<VideoItem>().videoData;
VideoFileCtrl.Instance.DelectVideoAndUpdateJson(videoData.Url, videoData.Mode);
Destroy(VideoItem);
gameObject.SetActive(false);
}
}