示例#1
0
 public GhostRun(frmPacmanGame frm, PacmanBoard b, GhostColor color)
 {
     this.color = color;
     parentForm = frm;
     board      = b;
     this.Init();
 }
示例#2
0
 public FruitRun(frmPacmanGame frm, PacmanBoard b, int stage)
 {
     this.stage = stage;
     parentForm = frm;
     board      = b;
     this.Init();
 }
示例#3
0
 private void frmPacmanGame_Load(object sender, EventArgs e)
 {
     game        = new PacmanGame(this, pnlBoard, pnlBoardInfo, difficulty, algorithm, pacmanDelay, ghostDelay, highScore);
     board       = new PacmanBoard(pnlBoard);
     this.Height = Screen.PrimaryScreen.Bounds.Height - 40;
     posSizeInit();
 }
示例#4
0
 public GhostRun(frmPacmanGame frm, PacmanBoard b, GhostColor color, int algorithm, int stage)
 {
     this.color     = color;
     parentForm     = frm;
     board          = b;
     this.algorithm = algorithm;
     this.stage     = stage;
     this.Init();
 }
示例#5
0
 public PacmanGame(frmPacmanGame frm, Panel p)
 {
     parentForm  = frm;
     board       = new PacmanBoard(p);
     Pacman      = new PacmanRun(parentForm, board);
     RedGhost    = new GhostRun(parentForm, board, GhostColor.RED);
     BlueGhost   = new GhostRun(parentForm, board, GhostColor.BLUE);
     PinkGhost   = new GhostRun(parentForm, board, GhostColor.PINK);
     YellowGhost = new GhostRun(parentForm, board, GhostColor.YELLOW);
     this.Init();
     RePaint();
 }
示例#6
0
        public PacmanGame(frmPacmanGame frm, Panel p, Panel pInfo, int difficulty, int algorithm, int pacmanDelay, int ghostDelay, int highScore)
        {
            parentForm  = frm;
            board       = new PacmanBoard(p);
            Pacman      = new PacmanRun(parentForm, board, stage);
            RedGhost    = new GhostRun(parentForm, board, GhostColor.RED, algorithm, stage);
            BlueGhost   = new GhostRun(parentForm, board, GhostColor.BLUE, algorithm, stage);
            PinkGhost   = new GhostRun(parentForm, board, GhostColor.PINK, algorithm, stage);
            YellowGhost = new GhostRun(parentForm, board, GhostColor.YELLOW, algorithm, stage);

            fruit            = new FruitRun(parentForm, board, stage);
            pnlInfo          = pInfo;
            this.difficulty  = difficulty;
            this.algorithm   = algorithm;
            stockGhostDelay  = ghostDelay;
            stockPacmanDelay = pacmanDelay;
            this.highScore   = highScore;
            this.Init();

            RePaint();
        }
示例#7
0
文件: Packman.cs 项目: ldh906/Pacman
 public PacmanRun(frmPacmanGame frm, PacmanBoard b)
 {
     parentForm = frm;
     board      = b;
     this.Init();
 }