public void Init(Game1 game)
        {
            _game = game;
            //Setup the Content in the Manager
            GameObjectManager.Instance.Init(game.Content);

            playerController = new PlayerController();
        }
Esempio n. 2
0
        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;

        }
Esempio n. 3
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }
Esempio n. 4
0
 public Terrain(Game1 game, string name=null)
 {
     loadContent(game, name);
 }