t1 / TFDContents / Assets / VLC for Unity / Scripts / QuitVLCHelper.cs @ 11
이력 | 보기 | 이력해설 | 다운로드 (651 Bytes)
1 |
using UnityEngine; |
---|---|
2 |
using System.Collections; |
3 |
|
4 |
public class QuitVLCHelper : MonoBehaviour { |
5 |
|
6 |
private PlayVLC[] videos; |
7 |
|
8 |
void Start () { |
9 |
videos = GameObject.FindObjectsOfType<PlayVLC>(); |
10 |
} |
11 |
|
12 |
public void QuitAllVideos() { |
13 |
foreach (PlayVLC video in videos) { |
14 |
video.StopVideo(); |
15 |
} |
16 |
} |
17 |
|
18 |
public void QuitApplication() { |
19 |
foreach (PlayVLC video in videos) { |
20 |
video.StopVideo(); |
21 |
} |
22 |
|
23 |
Application.Quit(); |
24 |
} |
25 |
|
26 |
void OnApplicationQuit() { |
27 |
foreach (PlayVLC video in videos) |
28 |
{ |
29 |
video.StopVideo(); |
30 |
} |
31 |
|
32 |
} |
33 |
} |