public void Init(Game1 game) { _game = game; //Setup the Content in the Manager GameObjectManager.Instance.Init(game.Content); playerController = new PlayerController(); }
void loadContent(Game1 game, string name = null) { tileSet = game.Content.Load<Texture2D>(Assets.TILESET); if (name == null) name = Assets.DATA_TESTROOM_PLATFORM; map = new TmxMap(name); ExtractObjects(); collisionMap = CollisionMap.Instance; collisionMap.Init(map); tileWidth = map.Tilesets[0].TileWidth; tileHeight = map.Tilesets[0].TileHeight; numTilesWide = tileSet.Width / tileWidth; numTilesHigh = tileSet.Height / tileHeight; }
static void Main() { using (var game = new Game1()) game.Run(); }
public Terrain(Game1 game, string name=null) { loadContent(game, name); }