コード例 #1
0
ファイル: Game.cs プロジェクト: lancelotx999/pacman
 public Game(String name)
 {
     GamePlayer = new Player (name);
     GameBoard = new Board ();
     GamePacman = new PacmanCharacter (GameBoard, GamePlayer, this);
     GameRandomGhost = new GhostCharacter (GameBoard, GamePlayer,this,GamePacman);
     GameTrackingGhost = new GhostCharacter (GameBoard, GamePlayer,this,GamePacman);
     GameOver = false;
 }
コード例 #2
0
        public PacmanCharacter(Board Gameboard, Player GamePlayer, Game CurrentGame)
        {
            Speed = 1;
            Direction = 0;
            State = 0;
            Board = Gameboard;
            Timer = 0;

            this.Game = CurrentGame;
            Player = GamePlayer;

            //starting position
            this.Position.X = 1;
            this.Position.Y = 1;
        }
コード例 #3
0
ファイル: GhostCharacter.cs プロジェクト: lancelotx999/pacman
        public GhostCharacter(Board Gameboard, Player GamePlayer, Game CurrentGame, PacmanCharacter Pacman)
        {
            Speed = 1;
            Direction = 0;
            State = 0;
            Board = Gameboard;

            this.Game = CurrentGame;
            Player = GamePlayer;
            PlayerPacman = Pacman;

            //starting position
            this.Position.X = 13;
            this.Position.Y = 14;
        }