41 lines
691 B
C#
41 lines
691 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public class Door_0020text : MonoBehaviour
|
|
{
|
|
public bool triggered;
|
|
|
|
public GUIStyle Style;
|
|
|
|
public Texture Image;
|
|
|
|
public virtual void Start()
|
|
{
|
|
Screen.lockCursor = true;
|
|
}
|
|
|
|
public virtual void OnMouseEnter()
|
|
{
|
|
triggered = true;
|
|
}
|
|
|
|
public virtual void OnMouseExit()
|
|
{
|
|
triggered = false;
|
|
}
|
|
|
|
public virtual void OnGUI()
|
|
{
|
|
if (triggered)
|
|
{
|
|
GUI.Label(new Rect(Screen.width / 2 - 50, Screen.height / 2 - 50, 400f, 400f), "Click on mouse", Style);
|
|
GUI.Label(new Rect((Screen.width - Image.width) / 2, (Screen.height - Image.height) / 2, Image.width, Image.height), Image);
|
|
}
|
|
}
|
|
|
|
public virtual void Main()
|
|
{
|
|
}
|
|
}
|