Beispiel #1
0
        public OrangeGhost(Form form, Ghost.Character chosenGhostCharacter) : base(form, chosenGhostCharacter)
        {
            waitTreshold = 40;

            if (chosenCharacter == Character.Default)
            {
                characterImages[0] = new Bitmap(Properties.Resources.OrangeGhostUp);
                characterImages.Add(new Bitmap(Properties.Resources.OrangeGhostLeft));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeGhostDown));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeGhostRight));
                characterImages.Add(new Bitmap(Properties.Resources.GhostFleeBlue));
                characterImages.Add(new Bitmap(Properties.Resources.GhostFleeWhite));
            }
            else if (chosenCharacter == Character.Kanji)
            {
                characterImages[0] = new Bitmap(Properties.Resources.OrangeKanji);
                characterImages.Add(new Bitmap(Properties.Resources.OrangeKanji));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeKanji));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeKanji));
                characterImages.Add(new Bitmap(Properties.Resources.KanjiFleeBlue));
                characterImages.Add(new Bitmap(Properties.Resources.KanjiFleeWhite));
            }
            else
            {
                characterImages[0] = new Bitmap(Properties.Resources.OrangeCGhostUp);
                characterImages.Add(new Bitmap(Properties.Resources.OrangeCGhostLeft));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeCGhostDown));
                characterImages.Add(new Bitmap(Properties.Resources.OrangeCGhostRight));
                characterImages.Add(new Bitmap(Properties.Resources.CGhostFleeBlue));
                characterImages.Add(new Bitmap(Properties.Resources.CGhostFleeWhite));
            }
        }
Beispiel #2
0
 public Ghost(Form form, Ghost.Character chosenGhostCharacter) : base(form)
 {
     // Na početku su duhovi sporiji od pacmana.
     timerInterval           = 180;
     characterTimer.Interval = timerInterval;
     currentImage            = 0;
     chosenCharacter         = chosenGhostCharacter;
     rand = new Random();
 }