Beispiel #1
0
 /// <summary>
 /// Constructs a new screen manager component.
 /// </summary>
 public ScreenManager(Game1 game)
     : base(game)
 {
     if (game == null) Environment.Exit(0);
     audioManager = new AudioManager(this);
     this.DrawOrder = 1;
 }
Beispiel #2
0
        public World(Game1 game, GameplayScreen gps, int x, int y)
        {
            this.game = game;
            screen = gps;
            currentX = x;
            currentY = y;

            collisionMaps = new String[worldWidth, worldHeight];
            backgrounds = new String[worldWidth, worldHeight];
        }
Beispiel #3
0
 public Map(Game1 game, World world, Player player, int x, int y)
     : base(game)
 {
     this.game = game;
     this.world = world;
     this.player = player;
     colFileName = world.getCollisionMapFilename(x, y);
     bgFileName = world.getBackgroundFilename(x, y);
     this.DrawOrder = 0;
     game.Components.Add(this);
     loadMap();
 }
Beispiel #4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     GameState state;
     using (StreamReader r = new StreamReader("res/data.json"))
     {
         string json = r.ReadToEnd();
         state = JsonConvert.DeserializeObject<GameState>(json);
     }
     using (Game1 game = new Game1(state))
     {
         game.Run();
     }
 }
Beispiel #5
0
 public Map(Game1 game)
     : base(game)
 {
 }
Beispiel #6
0
 protected EventMap(Game1 game, World world, Player player, int x, int y)
     : base(game, world, player, x, y)
 {
 }
Beispiel #7
0
 public FirstFeatherMap(Game1 game, World world, Player player, Vector2 playPos)
     : base(game, world, player, 4, 2)
 {
     playerPosition = playPos;
     inCabThing = false;
 }