Exemple #1
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;
    }
    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
    }