Exemplo n.º 1
0
 void Start()
 {
     rb             = GetComponent <Rigidbody> ();
     rb.isKinematic = true;
     mainSwarm      = GameObject.FindGameObjectWithTag("MainSwarm");
     secondarySwarm = GameObject.FindGameObjectWithTag("SecondarySwarm");
     mainSwarmScr   = mainSwarm.GetComponent <SwarmManagement> ();
     startVol       = audio.volume;
     ftbMat         = fadeToBlack.GetComponent <MeshRenderer>().materials[0];
     startCamSize   = this.camera.orthographicSize;
 }
Exemplo n.º 2
0
    public bool startActive = false;     // this is so the first lantern can start on.

    void Start()
    {
        lanternLight = GetComponentInChildren <Light>();
        particles    = GetComponentInChildren <ParticleSystem>();
        mainSwarm    = GameObject.FindGameObjectWithTag("MainSwarm");
        mainSwarmScr = mainSwarm.GetComponent <SwarmManagement>();

        desiredIntensity       = lanternLight.intensity;
        lanternLight.intensity = 0;

        if (!startActive)
        {
            particles.gameObject.SetActive(false);
        }
    }
Exemplo n.º 3
0
    void Start()
    {
        rb             = GetComponent <Rigidbody>();
        FireflyDragger = GameObject.FindGameObjectWithTag("FireflyDragger");
        scrSwarm       = GetComponent <Swarming>();
        trail          = GetComponent <TrailRenderer> ();
        swarmManager   = GameObject.FindGameObjectWithTag("MainSwarm").GetComponent <SwarmManagement>();

        //Set starting fireflies to start with no light
        areaLight      = GetComponentInChildren <Light>();
        startIntensity = areaLight.intensity;
        if (initialFirefly)
        {
            areaLight.intensity = 0;
        }
    }
Exemplo n.º 4
0
    void Start()
    {
        mainSwarmPoint      = GameObject.FindGameObjectWithTag("MainSwarm");
        secondarySwarmPoint = GameObject.FindGameObjectWithTag("SecondarySwarm");
        swarmPoint          = mainSwarmPoint;
        swarmNormSpeed      = swarmSpeed;
        swarmNormRange      = swarmRange;
//		originalHalo = fireflyHalo.color;
        originalHaloSize = fireflyHalo.range;
        swarmManager     = GameObject.FindGameObjectWithTag("MainSwarm").GetComponent <SwarmManagement>();

        //Set initial direction
        ChangeDir();

        //Give fireflies varying timers
        swarmDirectionVolatility = Random.Range(swarmDirectionVolatility * 0.5f, swarmDirectionVolatility * 1.5f);
    }
Exemplo n.º 5
0
 void Start()
 {
     rb             = GetComponent <Rigidbody>();
     FireflyDragger = GameObject.FindGameObjectWithTag("FireflyDragger");
     swarmManager   = GameObject.FindGameObjectWithTag("MainSwarm").GetComponent <SwarmManagement>();
 }