Exemplo n.º 1
0
    private void ShowErrorMessage()
    {
        VisibilityController visibilityController = errorMessage.GetComponent <VisibilityController>();

        visibilityController.Show(errorMessage);
        visibilityController.Show(karsten);
    }
Exemplo n.º 2
0
    // 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++;
            }
        }
    }
Exemplo n.º 3
0
 private void ShowMessage()
 {
     if (!finish)
     {
         VisibilityController visibilityController = message.GetComponent <VisibilityController>();
         visibilityController.Show(message);
         visibilityController.Show(karsten);
     }
 }
Exemplo n.º 4
0
    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;
    }
Exemplo n.º 5
0
 /*
  *  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();
     }
 }
Exemplo n.º 6
0
    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
    }
Exemplo n.º 8
0
 void Start()
 {
     visibilityController = gameObject.GetComponent <VisibilityController>();
 }