public FoodManager(Game game) : base(game) { // TODO: Construct any child components here g = game; PacMan = ((Game1)g).PacMan; }
public Ghost(Game game) : base(game) { // TODO: Construct any child components here this.pacMan = ((Game1)game).GetPacMan(); //pacMan.Attach(this); gameConsole = (GameConsole)game.Services.GetService(typeof(IGameConsole)); strGhostTexture = "RedGhost"; this.ghostState = GhostState.Roving; r = new Random(); }
public Game1() : base() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; //Util input = new InputHandler(this); console = new GameConsole(this); this.Components.Add(input); this.Components.Add(console); //close console //console.ToggleConsole(); //Game PacMan = new MonoGamePacMan(this); PacMan.PacState = PacManState.Still; this.Components.Add(PacMan); fm = new FoodManager(this); this.Components.Add(fm); }