Beispiel #1
0
        public Snowy()
        {
            this.stateName = AppState.Instance.ResourceManager.GetString("WeatherStateSnowy");            

            int maxParticles = 0;

            this.Type = (SnowType)Utilities.RandomCache.Next(0, 3);

            switch (this.Type)
            {
                case SnowType.Light:
                    {
                        maxParticles = 200;
                        this.snowyFog.MaximumDensity = 0.01f;
                        break;
                    }

                case SnowType.Normal:
                    {
                        maxParticles = 400;
                        this.snowyFog.MaximumDensity = 0.015f;
                        break;
                    }

                case SnowType.Strong:
                    {
                        maxParticles = 600;
                        this.snowyFog.MaximumDensity = 0.02f;
                        break;
                    }
            }
            
            this.snowyFog.FogColor = new float[] { 0.6f, 0.6f, 0.6f, 1.0f };
            this.snowyFog.initialize();            

            this.engine = new ParticleEngine(maxParticles);
            this.engine.ParticleBaseVelocity = -1.0f;

            this.Engine.TypeOfParticle = ParticleEngine.ParticleType.Snow;
        }
Beispiel #2
0
        public Snowy()
        {
            this.stateName = AppState.Instance.ResourceManager.GetString("WeatherStateSnowy");

            int maxParticles = 0;

            this.Type = (SnowType)Utilities.RandomCache.Next(0, 3);

            switch (this.Type)
            {
            case SnowType.Light:
            {
                maxParticles = 200;
                this.snowyFog.MaximumDensity = 0.01f;
                break;
            }

            case SnowType.Normal:
            {
                maxParticles = 400;
                this.snowyFog.MaximumDensity = 0.015f;
                break;
            }

            case SnowType.Strong:
            {
                maxParticles = 600;
                this.snowyFog.MaximumDensity = 0.02f;
                break;
            }
            }

            this.snowyFog.FogColor = new float[] { 0.6f, 0.6f, 0.6f, 1.0f };
            this.snowyFog.initialize();

            this.engine = new ParticleEngine(maxParticles);
            this.engine.ParticleBaseVelocity = -1.0f;

            this.Engine.TypeOfParticle = ParticleEngine.ParticleType.Snow;
        }
Beispiel #3
0
        public Rainy()
        {
            this.stateName = AppState.Instance.ResourceManager.GetString("WeatherStateRainy");
            

            int maxParticles = 0;

            this.Type = (RainType)Utilities.RandomCache.Next(0, 3);
            this.fog.initialize();

            switch (this.Type)
            {
                case RainType.Shower:
                    {
                        maxParticles = 200;
                        this.fog.MaximumDensity = 0.01f;
                        break;
                    }

                case RainType.Normal:
                    {
                        maxParticles = 400;
                        this.fog.MaximumDensity = 0.015f;
                        break;
                    }

                case RainType.Storm:
                    {
                        maxParticles = 600;
                        this.fog.MaximumDensity = 0.02f;
                        break;
                    }
            }

            this.engine = new ParticleEngine(maxParticles);
            this.engine.ParticleBaseVelocity = 0.7f;

            this.Engine.TypeOfParticle = ParticleEngine.ParticleType.Rain;
        }
Beispiel #4
0
        public Rainy()
        {
            this.stateName = AppState.Instance.ResourceManager.GetString("WeatherStateRainy");


            int maxParticles = 0;

            this.Type = (RainType)Utilities.RandomCache.Next(0, 3);
            this.fog.initialize();

            switch (this.Type)
            {
            case RainType.Shower:
            {
                maxParticles            = 200;
                this.fog.MaximumDensity = 0.01f;
                break;
            }

            case RainType.Normal:
            {
                maxParticles            = 400;
                this.fog.MaximumDensity = 0.015f;
                break;
            }

            case RainType.Storm:
            {
                maxParticles            = 600;
                this.fog.MaximumDensity = 0.02f;
                break;
            }
            }

            this.engine = new ParticleEngine(maxParticles);
            this.engine.ParticleBaseVelocity = 0.7f;

            this.Engine.TypeOfParticle = ParticleEngine.ParticleType.Rain;
        }