Ejemplo n.º 1
0
    public void Init(
        SeedFunnel _funnel,
        SeedGenerator _generator,
        AudioClip soundLoop,
        AudioClip speedSound)
    {
        funnel    = _funnel;
        generator = _generator;

        AddOrbitPaths();
        CreateHandle();
        CreateAudioSources(soundLoop);
        MakingNoise = true;


        seedRenderer = transform.Find("SEED").GetComponent <Renderer>();
        seedMat      = seedRenderer.material;

        glow = transform.Find("Glow");
        glow.GetComponent <Renderer>().enabled = false;

        orbitorSpeedObj               = new GameObject("OrbitorSpeedSound").transform;
        orbitorSpeedObj.parent        = transform;
        orbitorSpeedObj.localPosition = Vector3.zero;
        orbitorSpeedSound             = orbitorSpeedObj.gameObject.AddComponent <GvrAudioSource>();
        orbitorSpeedSound.clip        = speedSound;
        orbitorSpeedSound.loop        = true;
        orbitorSpeedSound.volume      = 0.0f;
        orbitorSpeedSound.Play();
        extraSounds.PlayOneShot(enterSound);
    }
Ejemplo n.º 2
0
 public void AddFunnel(SeedFunnel _funnel)
 {
     seedFunnel = _funnel;
 }
Ejemplo n.º 3
0
 void SetUpFunnel()
 {
     funnel = transform.Find("FUNNEL/FUNNEL_2").gameObject.AddComponent <SeedFunnel>();
     funnel.Init(this);
 }