initial upload
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class Popupguiscript : MonoBehaviour
|
||||
{
|
||||
public Texture2D yourtexture;
|
||||
|
||||
public AudioClip popupsound;
|
||||
|
||||
public virtual void Update()
|
||||
{
|
||||
if (popupsound != null)
|
||||
{
|
||||
if (!GetComponent<AudioSource>().isPlaying)
|
||||
{
|
||||
GetComponent<AudioSource>().clip = popupsound;
|
||||
GetComponent<AudioSource>().Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnGUI()
|
||||
{
|
||||
GUI.DrawTexture(new Rect(0f, 0f, Screen.width, Screen.height), yourtexture);
|
||||
}
|
||||
|
||||
public virtual void Main()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user