// Use this for initialization void Start() { areaEffector = GetComponent <AreaEffector2D>(); if (subWind && masterWind != null) { masterExtWind = masterWind.GetComponent <ExternalWind>(); } player = GameObject.FindGameObjectWithTag("Player"); if (player != null) { playerMovements = player.GetComponent <PlayerMovements> (); } }
void Start() { if (pipe01 != null) { linearMov01 = pipe01.GetComponent <SimpleLinearMovement>(); } if (pipe02 != null) { linearMov02 = pipe02.GetComponent <SimpleLinearMovement>(); pipe02Down = pipe02.GetComponent <Pipe02Down>(); } if (particleExit != null) { partSystExit = particleExit.GetComponent <ParticleSystem>(); } if (particleMiddle != null) { partSystMiddle = particleMiddle.GetComponent <ParticleSystem>(); } if (particleRight != null) { partSystRight = particleRight.GetComponent <ParticleSystem>(); } if (wind != null) { externalWind = wind.GetComponent <ExternalWind>(); } /* * if (particleMiddle != null) * audioHandlerMiddle = particleMiddle.GetComponent<AudioHandler>(); * * if (particleRight != null) * audioHandlerRight = particleRight.GetComponent<AudioHandler>(); */ }