Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class showMessage : MonoBehaviour {
- GameObject player;
- private bool startLap;
- void OnTriggerEnter ( Collider other ){
- if(other.tag == "Player") {
- bool = true;
- }
- }
- void OnGUI (){
- if(bool == true) {
- if(GUI.Button ( new Rect(100, 100, 500, 40), "Help! I lost my car. Find it through this maze for me?")) {
- Debug.Log("Door Works!");
- bool = false;
- }
- }
- }
- }
- using UnityEngine;
- public class showMessage : MonoBehaviour
- {
- private bool startLap;
- void OnTriggerEnter(Collider other)
- {
- if (other.tag == "Player")
- {
- startLap = true;
- }
- }
- void OnGUI()
- {
- if (startLap)
- {
- if (GUI.Button(new Rect(100, 100, 500, 40), "Help! I lost my car. Find it through this maze for me?"))
- {
- Debug.Log("Door Works!");
- startLap = false;
- }
- }
- }
- }
- private bool startLap;
- private bool foo;
- private bool bar;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement