Esempio n. 1
0
    void OnEnable()
    {
        Dome.SetActive(false);
        mProjector.gameObject.SetActive(true);
        mParticleEmitter.gameObject.SetActive(true);
        if (mCameraShake != null)
        {
            mCameraShake.BeginShake();
        }

        // Rescale dome bolts out
        mBoltsRescalings = new float[DomeBolts.transform.childCount];
        for (int i = 0; i < mBoltsRescalings.Length; i++)
        {
            mBoltsRescalings[i] = Random.Range(0.0f, 1.0f);
            DomeBolts.transform.GetChild(i).localScale += new Vector3(0.0f, 0.0f, mBoltsRescalings[i]);
        }
    }