Example #1
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        protected override void Setup()
        {
            if (this._fog_density_curve == null)
            {
                this._fog_density_curve = NeodroidUtilities.DefaultAnimationCurve();
            }

            if (this._fog_gradient == null)
            {
                this._fog_gradient = NeodroidUtilities.DefaultGradient();
            }

            if (this._light_gradient == null)
            {
                this._light_gradient = NeodroidUtilities.DefaultGradient();
            }

            this._light             = this.GetComponent <Light>();
            this._sky_mat           = RenderSettings.skybox;
            this.transform.rotation = this._start_rotation;
            if (!this._particle_system)
            {
                this._particle_system = this.GetComponent <ParticleSystem>();
            }

            this._particle_system.Pause();
            if (this._particles == null || this._particles.Length < this._particle_system.main.maxParticles)
            {
                this._particles = new ParticleSystem.Particle[this._particle_system.main.maxParticles];
            }
        }