void Start() { tut = Component.FindObjectOfType <tutorial>(); // init base since Start is protected. myInit(); }
private void Awake() { scene = SceneManager.GetActiveScene(); if (scene.name == "GameScene") { MagicEffect = GameObject.Find("MagicEffect"); StickEffect = GameObject.Find("StickEffect"); } else if (scene.name == "TutorialScene") { tuto = GameObject.Find("Player").GetComponent <tutorial>(); } }
public void tutorialskip(int op) { GameObject manager = GameObject.FindGameObjectWithTag("manager"); GameObject panel = GameObject.FindGameObjectWithTag("TutoPanel"); switch (op) { case (0): SceneManager.LoadScene("Jogo - Tabela Verdade Next (2)"); break; case (1): panel.SetActive(false); tutorial man = manager.GetComponent <tutorial>(); man.iniciaTutorial(); break; } }
// Use this for initialization void Start() { rb = transform.GetComponent <Rigidbody>(); cam = transform.GetComponentInChildren <Camera>(); inv = transform.GetComponent <Inventory>(); cursor = transform.Find("Main Camera").Find("crosshair").GetComponent <SpriteRenderer>(); DEFAULT_MASK = LayerMask.GetMask("Default"); INTERACTABLE_MASK = LayerMask.GetMask("Default", "Interactable"); OBSERVABLE_MASK = LayerMask.GetMask("Default", "Observable"); //relock in case Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; tut = Component.FindObjectOfType <tutorial>(); if (tut == null) { Debug.Log("no tutorial found"); } am = GameObject.FindObjectOfType <AudioManager>(); }
void Awake() { instance = this; }
public void TestMethod1() { tutorial tp = new tutorial(); Assert.AreEqual(tp.name, "hello dude"); }