Beispiel #1
0
        /// <summary>
        /// Constructor for Midsummer effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Midsummer(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/rain.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/mid.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            currentImage = 0;
            snd = sound;

            LastDate = string.Empty;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/grodorna.ogg", "Midsummer");
            sf = new Raindrops[NUMBEROFRAINDROPS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFRAINDROPS; i++)
            {

                sf[i] = new Raindrops((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, image,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.33f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.33f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.33f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.33f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                currentImage++;

                if (currentImage == 2)
                    currentImage = 0;

            }
        }
Beispiel #2
0
 /// <summary>
 /// Constructor for Halloween effect
 /// </summary>
 /// <param name="chessboard">Chessboard background</param>
 /// <param name="sound">Sound system</param>
 /// <param name="NumberOfSpiders">How many spiders to show on screen</param>
 public Halloween(ref Chess chessboard, ref Sound sound, int NumberOfSpiders)
 {
     chess = chessboard;
     snd = sound;
     textureSpider = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/spider.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.Black);
     textureGhost = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/halloween.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255,0,255));
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/scary.ogg", "Scary");
     MaxSpiders = NumberOfSpiders;
     Spiders = new Spider[MaxSpiders];
     Ghost = new Vector3[4];
     Size = new SizeF(1.0f, 1.0f);
     float sZ = 0.4f;
     for (int i = 0; i < MaxSpiders; i++)
     {
         Spiders[i] = new Spider(0.1f, 0.1f, sZ, 1.0f, textureSpider);
         sZ -= sZ / (NumberOfSpiders + 2000);
     }
     X = Util.Rnd.Next(-3, 3) / 10.0f;
     Y = Util.Rnd.Next(-3, 3) / 10.0f;
     Z = sZ - 0.001f;
     Ghost[0] = new Vector3(X, Y, Z); // red
     Ghost[1] = new Vector3(X, Y + Size.Height, Z); // blue
     Ghost[2] = new Vector3(X + Size.Width, Y + Size.Height, Z); // green
     Ghost[3] = new Vector3(X + Size.Width, Y, Z); // yellow
     LastPlayedDate = string.Empty;
 }
Beispiel #3
0
        /// <summary>
        /// Cosntructor for Valentine effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Valentine(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/valentine.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/barseback3.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            heartsImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/h.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/valentine.wav", "Valentine");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/valentine.ogg", "Valentine");

            Random r = new Random();
            h = new Hearts[NUMBEROFHEARTS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFHEARTS; i++)
            {
                h[i] = new Hearts((r.Next(-18, 15)) / 10.0f, (r.Next(-10, 20) * -1) / 10.0f, r.Next(2, 8) / 1000.0f, heartsImage,
                    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)}, r.Next(5, 10) * 10.0f, z);

                z -= 0.000001f;
                currentImage++;

                if (currentImage == 4)
                    currentImage = 0;

            }//for
        }
Beispiel #4
0
 /// <summary>
 /// Constructor for f**k me gently effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="chess">Chessboard</param>
 public F**k(ref Sound sound,ref Chess chess)
 {
     img = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/f**k.jpg");
     bakground = chess;
     snd = sound;
     snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/F**k.ogg", "F**k");
     LastDate = string.Empty;
 }
Beispiel #5
0
        public SilverFang(ref Sound sound)
        {
            img = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Akakabuto.jpg");
            img2 = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/silver.jpg");

            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/SilverFangJap.ogg", "SilverFang");
            LastDate = string.Empty;
        }
Beispiel #6
0
        /// <summary>
        /// Constructor for Sailormoon effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="chess">Chessboard</param>
        public Sailormoon(ref Sound sound,ref Chess chess)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sailormoon.jpg");

            bakground = chess;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/SailorJap.ogg", "Moon");
            LastDate = string.Empty;
        }
Beispiel #7
0
        /// <summary>
        /// Constructor for Chip and Dale effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="chess">Chessboard</param>
        public ChipAndDale(ref Sound sound,ref Chess chess)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/chipanddale.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            bakground = chess;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/chipanddale.ogg", "Chip");
            LastDate = string.Empty;
        }
Beispiel #8
0
        /// <summary>
        /// Constructor for Hajk effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Hajk(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/Hajk.bmp", 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/HAJK.ogg", "Hajk");
            disposed = false;
            LastDate = string.Empty;
        }
Beispiel #9
0
        /// <summary>
        /// Constructor for Talespin effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Talespin(ref Sound sound)
        {
            x = -1.0f;
            y = 0.0f;
            seaDuck = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/seaDuck.bmp", 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/Talespin.ogg", "Talespin");
            LastDate = string.Empty;
        }
Beispiel #10
0
        public Drink(ref Sound sound)
        {
            image = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/ibeer.png");
            snd = sound;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Drink.ogg", "Drink");
            b = new Beer();
            disposed = false;
            LastDate = string.Empty;
        }
Beispiel #11
0
 /// <summary>
 /// Constructor for Zelda effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="chess">Chessboard</param>
 public Zelda(ref Sound sound,ref Chess chess)
 {
     zelda = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Zelda.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     link = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Link.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     ganon = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Ganon.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     bakground = chess;
     snd = sound;
     snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/zeldaNES.ogg", "Zelda");
     LastDate = string.Empty;
     showGanon = false;
 }
Beispiel #12
0
        /// <summary>
        /// Constructor for Degerfors IF effect
        /// </summary>
        /// <param name="chess"></param>
        /// <param name="sound"></param>
        public Dif(ref Chess chess, ref Sound sound)
        {
            bakground = chess;
            x = 0.0f;
            y = 0.0f;
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/dif2.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;
            tick = 0;
            LastDate = string.Empty;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/imperial.ogg", "Dif");
        }
Beispiel #13
0
        /// <summary>
        /// Constructor for Outro effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Outro(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/BOSD.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/Blackheart.wav", "Outro");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Blackheart.ogg", "Outro");

            disposed = false;
            ticks = 0;
            oldTicks = 0;
            delyed = false;
        }
Beispiel #14
0
        /// <summary>
        /// Constructor for Ghostbusters effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public GhostBusters(ref Sound sound)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/ghostbusters.jpg");
            slime = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/slimer.bmp", 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/GhostBuster.ogg", "GhostBusters");
            LastDate = string.Empty;

            this.x = -1.0f;
            this.y = 0.0f;
            this.tick = 0;
        }
Beispiel #15
0
        /// <summary>
        /// constructor of National day effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        public National(ref Chess chess, ref Sound sound)
        {
            ticks = 0;
            oldTicks = 0;

            currentImage = 0;
            bakground = chess;
            snd = sound;
            LastDate = string.Empty;

            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/flagga.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Du gamla du fria (Black Ingvars).ogg", "National");
        }
Beispiel #16
0
        /// <summary>
        /// Constructor for Quiz effect
        /// </summary>
        /// <param name="Text">Text printer</param>
        /// <param name="BuiltInFont">Use build in fonts for the text?</param>
        /// <param name="sound">Sound system</param>
        public Quiz(ref Text2D Text, bool BuiltInFont, ref Sound sound)
        {
            listquotes = new List<string>();
            indexList = new List<int>();
            maxIndexValue = 0;
            text = Text;
            builtInFont = BuiltInFont;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Yoda.ogg", "YODA");

            readFromXml();
            drawInit(builtInFont);
        }
Beispiel #17
0
        /// <summary>
        /// Constructor for Self effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Self(ref Sound sound)
        {
            imageWach = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/wach.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            imageKamikazE = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/kze.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            randomImage = (Util.Rnd.Next(0, 100)<50? 0:1);
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Tetris.ogg", "Self");

            tick = 0;
            x = 0.0f;
            y = 0.0f;

            CurrentDate = string.Empty;
        }
Beispiel #18
0
        /// <summary>
        /// Constructor for Intro effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printer</param>
        public Intro(ref Sound sound, ref Text2D txt)
        {
            disposed = false;
            snd = sound;
            text = txt;

            ZA = 0.0f;
            ZT = 0.0f;
            ZW = 0.0f;

            XA = 0.0f;
            XT = 0.0f;
            XW = 0.0f;
            XTBack = false;
        }
Beispiel #19
0
 /// <summary>
 /// Constructor for SuneAnimation
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="Text">Text printer</param>
 public SuneAnimation(ref Sound sound, ref Text2D Text)
 {
     ticks = 0;
     oldTicks = 0;
     soundOldTicks = 0;
     soundOldTicks = 0;
     currentImage = 0;
     sh = new SuneTxtHandler(ref Text, false);
     snd = sound;
     //text = Text;
     LastPlayedDate = string.Empty;
     image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sune_sprite.bmp");
     //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/laugh.wav", "Sune");
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/laugh.ogg", "Sune");
 }
Beispiel #20
0
        /// <summary>
        /// Constructor for Datasmurf effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printing</param>
        public Datasmurf(ref Sound sound, ref Text2D txt)
        {
            x = -1.0f;
            y = 0.0f;
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/dataSmurf.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255,0,255));

            snd = sound;
            text = txt;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/datasmurf.wav", "Smurf");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/datasmurf.ogg", "Smurf");

            tick = 0;
            LastDate = string.Empty;

            currentImage = 0;
            ticks = oldTicks = 0;
        }
Beispiel #21
0
        /// <summary>
        /// Constructor for GummiBears effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public GummiBears(ref Sound sound)
        {
            PlayedSongs = new List<int>();
            snd = sound;

            songName = new string[8];
            songName[0] = "GummiSwe";
            songName[1] = "GummiDan";
            songName[2] = "GummiEng";
            songName[3] = "GummiGer";
            songName[4] = "GummiJap";
            songName[5] = "GummiNor";
            songName[6] = "GummiPol";
            songName[7] = "GummiRus";

            textures = new int[7]; // there are 7 in the "newer" gummi bears, 6 in the older (Gusto is a new one)...
            textures[0] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/zummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[1] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/grammi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[2] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/tummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[3] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gruffi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[4] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sunni.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[5] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/cubbi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[6] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gusto.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Swedish.ogg", songName[0]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Danish.ogg", songName[1]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-English.ogg", songName[2]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-German.ogg", songName[3]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Japanese.ogg", songName[4]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Norwegian.ogg", songName[5]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Polish.ogg", songName[6]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Russian.ogg", songName[7]);

            currentSound = Util.Rnd.Next(0, songName.Length); // do this random and add to list of played?
            PlayedSongs.Add(currentSound);
            LastPlayedDate = string.Empty;
            Bears = new Bear[7];
            // left max = 1.2, right max = -1.7,
            Bears[0] = new Bear(0.4f, 0.4f, 1.0f, -0.5f, 0.40006f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[0]);
            Bears[1] = new Bear(0.4f, 0.4f, 0.75f, 0.0f, 0.40005f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[1]);
            Bears[2] = new Bear(0.4f, 0.4f, 0.5f, 0.0f, 0.40004f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[2]);
            Bears[3] = new Bear(0.4f, 0.4f, 0.0f, 0.0f, 0.40003f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[3]);
            Bears[4] = new Bear(0.25f, 0.35f, -0.5f, 0.0f, 0.40002f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[4]);
            Bears[5] = new Bear(0.3f, 0.3f, -1.0f, 0.0f, 0.40001f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[5]);
            Bears[6] = new Bear(0.4f, 0.4f, -1.5f, 0.0f, 0.40000f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[6]);
        }
Beispiel #22
0
        /// <summary>
        /// Constructor for TeknatStyle effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printer</param>
        public TeknatStyle(ref Chess chess, ref Sound sound, ref Text2D txt)
        {
            disposed = false;
            slideshowImage1 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel1.jpg");
            slideshowImage2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel2.jpg");
            slideshowImage3 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel3.jpg");
            snd = sound;
            bakground = chess;
            text = txt;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/ts.ogg", "TS");
            currentImage = 0;
            currentSlideShow = 0;

            LastDate = string.Empty;
            ticks = 0;
            oldTicks = 0;
        }
Beispiel #23
0
        /// <summary>
        /// Constructor for T-rex effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Trex(ref Sound sound)
        {
            disposed = false;
            ponyrun = false;
            trexrun = false;
            showend = false;
            pony = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/pony.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            t = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/Trex.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/this_is.png");

            snd = sound;
            //snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Nerdy.ogg", "Nerdy");

            LastDate = string.Empty;
            ticks = 0;
            ticks = 0;
            oldTicks = 0;
        }
Beispiel #24
0
        /// <summary>
        /// Constructor for Nerdy effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        public Nerdy(ref Chess chess, ref Sound sound)
        {
            disposed = false;
            n1 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n1.jpg");
            n2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n2.jpg");
            n3 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n3.jpg");
            n4 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n4.jpg");
            n5 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n5.png");
            n6 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n6.png");
            snd = sound;
            bakground = chess;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Nerdy.ogg", "Nerdy");
            currentImage = 0;

            LastDate = string.Empty;
            ticks = 0;
            oldTicks = 0;
        }
Beispiel #25
0
        /// <summary>
        /// Constructor for Advent effect
        /// </summary>
        /// <param name="sound">The sound system to play sounds</param>
        public Advent(ref Sound sound)
        {
            snd = sound;
            texture = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/ljus.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(244,143,143));
            //snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/lucia.ogg", "lucia"); 

            Ghost = new Vector3[4];
            Size = new SizeF(0.4f, 0.8f);
            Speed = 0.0025f;

            X = 0.0f - Size.Width / 2.0f;
            Y = -0.5f - Size.Height / 2.0f;
            Z = 0.45f;
            Ghost[0] = new Vector3(X, Y, Z); // red
            Ghost[1] = new Vector3(X, Y + Size.Height, Z); // blue
            Ghost[2] = new Vector3(X + Size.Width, Y + Size.Height, Z); // green
            Ghost[3] = new Vector3(X + Size.Width, Y, Z); // yellow

        }
Beispiel #26
0
        /// <summary>
        /// Constructor for Lucia effect
        /// </summary>
        /// <param name="chessboard">Chessboard</param>
        /// <param name="sound">Sound system</param>
        public Lucia(ref Chess chessboard, ref Sound sound)
        {
            chess = chessboard;
            snd = sound;
            texture = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/lucia.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.Black);
            //snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/lucia.ogg", "lucia");

            Ghost = new Vector3[4];
            Size = new SizeF(0.4f, 0.8f);
            Speed = 0.0045f;

            X = Util.Rnd.Next(-3, 3) / 10.0f;
            Y = Util.Rnd.Next(-3, 3) / 10.0f;
            Z = 0.45f;
            Ghost[0] = new Vector3(X, Y, Z); // red
            Ghost[1] = new Vector3(X, Y + Size.Height, Z); // blue
            Ghost[2] = new Vector3(X + Size.Width, Y + Size.Height, Z); // green
            Ghost[3] = new Vector3(X + Size.Width, Y, Z); // yellow
        }
Beispiel #27
0
 /// <summary>
 /// Constructor for Richard Stalman effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="text">Text printer</param>
 public RMS(ref Sound sound, ref Text2D text)
 {
     snd = sound;
     txt = text;
     texture = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/rms.jpg", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.Yellow);
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/free.ogg", "rms");
     SongText = new string[9];
     CurrentRow = -1;
     DelayRow = 3500; // milisecond
     LastPlayedDate = string.Empty;
     SongText[0] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[1] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[2] = "Hoarders can get piles of money, That is true, hackers, that is true.";
     SongText[3] = "But they cannot help their neighbors; That's not good, hackers, that's not good.";
     SongText[4] = "When we have enough free software At our call, hackers, at our call.";
     SongText[5] = "We'll kick out those dirty licenses Ever more, hackers, ever more.";
     SongText[6] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[7] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     //SongText[8] = "Richard Stallman - a true hacker's birthday!";
     SongText[8] = "Richard Stallman - a true hacker!";
     lastTick = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; // lastTick is in milisecond
 }
Beispiel #28
0
        /// <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;
            }
        }
Beispiel #29
0
        /// <summary>
        /// Constructor for Easter effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Easter(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gladpask.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/chicken.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            eggImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/eggs.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            currentImage = 0;
            curruntEggImage = 0;
            ticks = 0;
            oldTicks = 0;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Gullefjun.ogg", "Easter");
            xc = 0;
            LastDate = string.Empty;
            tick = 0;
            x = 1;
            y = 0;

            egg = new Eggs[NUMBEROFFEGGS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFFEGGS; i++)
            {

                egg[i] = new Eggs((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, eggImage,
                    new Vector2[] {  new Vector2(0.0f + (curruntEggImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (curruntEggImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (curruntEggImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (curruntEggImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                curruntEggImage++;

                if (curruntEggImage == 4)
                    curruntEggImage = 0;
            }
        }
Beispiel #30
-1
        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;
            }
        }