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.
36 lines
785 B
36 lines
785 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UltraCombos;
|
|
using UnityEngine;
|
|
|
|
public class OverlayVfx : MonoBehaviour
|
|
{
|
|
|
|
public List<DShowMoviePlayer> VideoPlayer;
|
|
|
|
private void Awake()
|
|
{
|
|
VideoPlayer = new List<DShowMoviePlayer>(GetComponentsInChildren<DShowMoviePlayer>(true));
|
|
}
|
|
|
|
|
|
public bool Take(out DShowMoviePlayer video)
|
|
{
|
|
if (VideoPlayer.Count > 0)
|
|
{
|
|
video = VideoPlayer[Random.Range(0, VideoPlayer.Count)];
|
|
VideoPlayer.Remove(video);
|
|
return true;
|
|
}
|
|
video = null;
|
|
return false;
|
|
}
|
|
|
|
public void Put(DShowMoviePlayer video)
|
|
{
|
|
VideoPlayer.Add(video);
|
|
video.Frame = 0;
|
|
video.Stop();
|
|
video.Pause();
|
|
}
|
|
}
|
|
|