private void ShowErrorMessage() { VisibilityController visibilityController = errorMessage.GetComponent <VisibilityController>(); visibilityController.Show(errorMessage); visibilityController.Show(karsten); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.LeftArrow)) { player.transform.Translate((float)-0.02, 0, 0); } if (Input.GetKey(KeyCode.RightArrow)) { player.transform.Translate((float)0.02, 0, 0); } if (player.transform.position.y < -15.7) { failureAudio.Play(); VisibilityController visibilityController = mistake.GetComponent <VisibilityController>(); visibilityController.Show(mistake); visibilityController.Show(Karsten); } else { if (background.transform.position.y < -36) { if (i > 100) { UnityEngine.SceneManagement.SceneManager.LoadScene("Chapter2_Top-Down_Outside"); } player.transform.Translate(0, (float)0.03, 0); i++; } } }
private void ShowMessage() { if (!finish) { VisibilityController visibilityController = message.GetComponent <VisibilityController>(); visibilityController.Show(message); visibilityController.Show(karsten); } }
private bool yumiActive; // Flag for if the human is currently active void Start() { human = GameObject.Find("Yumi").GetComponent <PlayerController>(); switcher = GameObject.Find("Yumi").GetComponentInChildren <YokaiSwitcher>(); spellcaster = GameObject.Find("Yumi").GetComponentInChildren <SpellCasting>(); //You will need a gameObject attached to Yumi called SpellAbilities. On that object, attach the script SpellCasting and the spell spawner objects to that script. invisibleObjects = GameObject.Find("SceneDirector").GetComponentInChildren <VisibilityController>(); switcher.SetSpawnOffset(true); // If Yokai is spawned, do so on the right side of human by default activePlayer = human; yumiActive = true; }
/* * Previous gesture */ void Previous(string currentScene) { if (currentScene == "paintingScene") // if scene is paintingScene update color { ColorController.PreviousColor(); } else // if scene is sculptureScene update color { VisibilityController.PreviousModel(); } }
private void Awake() { flowVisibilityDictionary = new Dictionary <Flow, VisibilityController>(); _flows = FindObjectsOfType <Flow>(); foreach (Flow f in _flows) { VisibilityController visibility = f.GetComponentInChildren <VisibilityController>(); flowVisibilityDictionary.Add(f, visibility); } }
private YokaiSwitcher switcher; // Toggle for the yokai void Start() { switcher = GameObject.Find("Yumi").GetComponentInChildren <YokaiSwitcher>(); // Gets all the child objs of the obj named "Yumi" and sorts them into switcher invisibleObjects = GameObject.Find("SceneDirector").GetComponentInChildren <VisibilityController>(); // Gets all the child objs of the obj names "SceneDirector" and sorts them into invisibleObjects SetTime(); // Calls the SetTime() function }
void Start() { visibilityController = gameObject.GetComponent <VisibilityController>(); }