/// <summary> /// Constructor for Christmas effect /// </summary> /// <param name="sound">Sound system</param> public Christmas(ref Sound sound) { image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/xmas.bmp"); image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/godjul.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255)); snowImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/snow1_db.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255)); currentImage = 0; snd = sound; //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/xmas.wav", "smurf"); snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/xmas.ogg", "XMAS"); LastDate = string.Empty; tick = 0; x = 1; y = 0; //Random r = new Random(); sf = new SnowFlake[NUMBEROFFLAKES]; float z = 0.4f; for (int i = 0; i < NUMBEROFFLAKES; i++) { sf[i] = new SnowFlake((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, snowImage, new Vector2[] { new Vector2(0.0f + (currentImage * 0.2f), 1.0f), new Vector2(0.2f + (currentImage * 0.2f), 1.0f), new Vector2(0.2f + (currentImage * 0.2f), 0.0f), new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z); z -= 0.00001f; currentImage++; if (currentImage == 4) currentImage = 0; } }
public Frozen(ref Sound sound) { image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/Frozen.jpg", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255)); snd = sound; snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Frozen.ogg", "Frozen"); disposed = false; LastDate = string.Empty; snowImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/snow1_db.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255)); currentImage = 0; sf = new SnowFlake[NUMBEROFFLAKES]; float z = 0.4f; for (int i = 0; i < NUMBEROFFLAKES; i++) { sf[i] = new SnowFlake((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, snowImage, new Vector2[] { new Vector2(0.0f + (currentImage * 0.2f), 1.0f), new Vector2(0.2f + (currentImage * 0.2f), 1.0f), new Vector2(0.2f + (currentImage * 0.2f), 0.0f), new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z); z -= 0.00001f; currentImage++; if (currentImage == 4) currentImage = 0; } }