Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SCRIPT 1:
- using UnityEngine;
- using System.Collections;
- using System.Text.RegularExpressions;
- public class PlayerMenu : MonoBehaviour {
- public GUISkin skin2;
- public bool teste = true;
- private LevelMode fase1_levelMode;
- void Start ()
- {
- fase1_levelMode = GetComponent <LevelMode> ();
- }
- void OnGUI()
- {
- GUI.skin = skin2;
- if (GUI.Button (new Rect (200, 400, 200, 50), "Teste"))
- {
- fase1_levelMode.callGameMode1 ();
- teste = false;
- }
- }
- }
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SCRIPT 2:
- using UnityEngine;
- using System.Collections;
- using System.Text.RegularExpressions;
- public class LevelMode : MonoBehaviour {
- PlayerMenu pm;
- public void callGameMode1 ()
- {
- print ("teste");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement