Exemple #1
0
        public Main()
        {
            InitializeComponent();
            paper    = pctPlayField.CreateGraphics();
            muren    = new Muren();
            rndAngle = new Random();
            splash   = new Splash();
            #region initialize pacman & ghosts
            //pacman
            pacman         = new Pacman();
            pacman.X       = 10;
            pacman.Y       = 12;
            pacman.Angle   = 0;
            pacman.Wall    = 0;
            pacman.PrevX   = 10;
            pacman.PrevY   = 12;
            pacman.Sprites = pacman.pacmanUp;

            //pink ghost was red
            pinkGhost           = new Monster();
            pinkGhost.X         = 10;
            pinkGhost.Y         = 10;
            pinkGhost.Angle     = 3;
            pinkGhost.Wall      = 0;
            pinkGhost.PrevX     = 10;
            pinkGhost.PrevY     = 10;
            pinkGhost.PrevAngle = 0;
            pinkGhost.Sprites   = Image.FromFile("../../images/ghostPink.png");

            //aqua ghost was green
            aquaGhost           = new Monster();
            aquaGhost.X         = 11;
            aquaGhost.Y         = 10;
            aquaGhost.Angle     = 3;
            aquaGhost.Wall      = 0;
            aquaGhost.PrevX     = 11;
            aquaGhost.PrevY     = 10;
            aquaGhost.PrevAngle = 0;
            aquaGhost.Sprites   = Image.FromFile("../../images/ghostAqua.png");

            //orange ghost was yellow
            orangeGhost           = new Monster();
            orangeGhost.X         = 9;
            orangeGhost.Y         = 10;
            orangeGhost.Angle     = 3;
            orangeGhost.Wall      = 0;
            orangeGhost.PrevX     = 9;
            orangeGhost.PrevY     = 10;
            orangeGhost.PrevAngle = 0;
            orangeGhost.Sprites   = Image.FromFile("../../images/ghostOrange.png");
            #endregion
        }
Exemple #2
0
        public Main()
        {
            InitializeComponent();
              paper = pctPlayField.CreateGraphics();
              muren = new Muren();
              rndAngle = new Random();
              splash = new Splash();
              #region initialize pacman & ghosts
              //pacman
              pacman = new Pacman();
              pacman.X = 10;
              pacman.Y = 12;
              pacman.Angle = 0;
              pacman.Wall = 0;
              pacman.PrevX = 10;
              pacman.PrevY = 12;
              pacman.Sprites = pacman.pacmanUp;

              //red ghost
              redGhost = new Monster();
              redGhost.X = 10;
              redGhost.Y = 10;
              redGhost.Angle = 3;
              redGhost.Wall = 0;
              redGhost.PrevX = 10;
              redGhost.PrevY = 10;
              redGhost.PrevAngle = 0;
              redGhost.Sprites = Image.FromFile("../../images/ghostRed.png");

              //green ghost
              greenGhost = new Monster();
              greenGhost.X = 11;
              greenGhost.Y = 10;
              greenGhost.Angle = 3;
              greenGhost.Wall = 0;
              greenGhost.PrevX = 11;
              greenGhost.PrevY = 10;
              greenGhost.PrevAngle = 0;
              greenGhost.Sprites = Image.FromFile("../../images/ghostGreen.png");

              //yellow ghost
              yellowGhost = new Monster();
              yellowGhost.X = 9;
              yellowGhost.Y = 10;
              yellowGhost.Angle = 3;
              yellowGhost.Wall = 0;
              yellowGhost.PrevX = 9;
              yellowGhost.PrevY = 10;
              yellowGhost.PrevAngle = 0;
              yellowGhost.Sprites = Image.FromFile("../../images/ghostYellow.png");
              #endregion
        }
Exemple #3
0
        public Main()
        {
            InitializeComponent();
            paper    = pctPlayField.CreateGraphics();
            muren    = new Muren();
            rndAngle = new Random();
            splash   = new Splash();
            #region initialize pacman & ghosts
            //pacman
            pacman         = new Pacman();
            pacman.X       = 10;
            pacman.Y       = 12;
            pacman.Angle   = 0;
            pacman.Wall    = 0;
            pacman.PrevX   = 10;
            pacman.PrevY   = 12;
            pacman.Sprites = pacman.pacmanUp;

            //red ghost
            redGhost           = new Monster();
            redGhost.X         = 10;
            redGhost.Y         = 10;
            redGhost.Angle     = 3;
            redGhost.Wall      = 0;
            redGhost.PrevX     = 10;
            redGhost.PrevY     = 10;
            redGhost.PrevAngle = 0;
            redGhost.Sprites   = Image.FromFile("../../images/ghostRed.png");

            //green ghost
            greenGhost           = new Monster();
            greenGhost.X         = 11;
            greenGhost.Y         = 10;
            greenGhost.Angle     = 3;
            greenGhost.Wall      = 0;
            greenGhost.PrevX     = 11;
            greenGhost.PrevY     = 10;
            greenGhost.PrevAngle = 0;
            greenGhost.Sprites   = Image.FromFile("../../images/ghostGreen.png");

            //yellow ghost
            yellowGhost           = new Monster();
            yellowGhost.X         = 9;
            yellowGhost.Y         = 10;
            yellowGhost.Angle     = 3;
            yellowGhost.Wall      = 0;
            yellowGhost.PrevX     = 9;
            yellowGhost.PrevY     = 10;
            yellowGhost.PrevAngle = 0;
            yellowGhost.Sprites   = Image.FromFile("../../images/ghostYellow.png");

            //Add black ghost to board
            //black ghost
            blackGhost           = new Monster();
            blackGhost.X         = 8;
            blackGhost.Y         = 10;
            blackGhost.Angle     = 3;
            blackGhost.Wall      = 0;
            blackGhost.PrevX     = 8;
            blackGhost.PrevY     = 10;
            blackGhost.PrevAngle = 0;
            blackGhost.Sprites   = Image.FromFile("../../images/ghostBlack.png");
            #endregion
        }