public void Clicked()
    {
        // Uses the same basic method as guidance but stats counting at
        // 10 if you need more space in the guidance system you'll need to tweak a few numbrs here

        for (int i = 0; i < 10; i++)
        {
            GameObject    arrow  = GameObject.Find("Arrow" + i);
            Arrow_Control arrows = arrow.GetComponent <Arrow_Control>();
            arrows.ActivateGuidance();
        }

        // This script will also make an emergency trigger arrow appear, hitting this arrow
        // is what will activate the emergency system and disble the others
        GameObject    triggerarrow  = GameObject.Find("EmergencyTriggerArrow");
        Arrow_Control triggerarrows = triggerarrow.GetComponent <Arrow_Control>();

        triggerarrows.ActivateGuidance();

        GameObject        beam     = GameObject.Find("EmergencyLightBeam");
        Pillar_Controller bluebeam = beam.GetComponent <Pillar_Controller>();

        bluebeam.GuidancePillar();

        Destroy(gameObject);
        Destroy(GameObject.Find("book1(Clone)"));
    }
    public void Clicked()
    {
        //This will need to be repeated for every arrow we need, in order to work all arrows must follow the same naming convention!
        for (int i = 0; i < 10; i++)
        {
            GameObject    arrow  = GameObject.Find("Arrow" + i);
            Arrow_Control arrows = arrow.GetComponent <Arrow_Control>();
            arrows.ActivateGuidance();
        }
        GameObject        beam     = GameObject.Find("LightBeam");
        Pillar_Controller bluebeam = beam.GetComponent <Pillar_Controller>();

        bluebeam.GuidancePillar();

        Destroy(gameObject);
        Destroy(GameObject.Find("book2(Clone)"));
    }
Exemple #3
0
    void OnTriggerEnter(Collider other)
    {
        //Here I has to be set to the exact number of arros and the naming must be exact
        for (int i = 0; i < 2; i++)
        {
            Debug.Log("EMERGENCY!");
            GameObject    arrow  = GameObject.Find("EmergencyArrow" + i);
            Arrow_Control arrows = arrow.GetComponent <Arrow_Control>();
            arrows.ActivateGuidance();
        }

        GameObject        pillar  = GameObject.Find("EmergencyLightBeam");
        Pillar_Controller pillars = pillar.GetComponent <Pillar_Controller>();

        pillars.EmergencyPillar();
        pillars.DisableGuidance();
    }