Example #1
0
        protected override void Initialize()
        {
            var version = Assembly.GetEntryAssembly().GetName().Version;

            batch = new SpriteBatch(this);
            tex   = Content.Load <Texture2D> ("nginz.png", TextureConfiguration.Nearest);

            testSheet = new SpriteSheet2D(Content.Load <Texture2D> ("classical_ruin_tiles_1.png", TextureConfiguration.Nearest), 23, 16);
            testMap   = new TileMap(new Vector2(128, 256), 32, 32, new Vector2(32, 32), 2);
            testMap.AddLayer("testLayer", testSheet);

            /*testMap.SetTile ("testLayer", 0, 1, 0);
            *  testMap.SetTile ("testLayer", 1, 1, 1);
            *  testMap.SetTile ("testLayer", 2, 1, 2);
            *  testMap.SetTile ("testLayer", 3, 1, 3);*/

            stage = new Stage(this);
            var mascot = new MascotActor();

            stage.AddActor(mascot);
            stage.AddAction(mascot);
            stage.TileMap = testMap;

            base.Initialize();
        }
Example #2
0
        protected override void Initialize()
        {
            var version = Assembly.GetEntryAssembly ().GetName ().Version;
            batch = new SpriteBatch (this);
            tex = Content.Load<Texture2D> ("nginz.png", TextureConfiguration.Nearest);

            testSheet = new SpriteSheet2D (Content.Load<Texture2D> ("classical_ruin_tiles_1.png", TextureConfiguration.Nearest), 23, 16);
            testMap = new TileMap (new Vector2 (128, 256), 32, 32, new Vector2(32, 32), 2);
            testMap.AddLayer ("testLayer", testSheet);

            /*testMap.SetTile ("testLayer", 0, 1, 0);
            testMap.SetTile ("testLayer", 1, 1, 1);
            testMap.SetTile ("testLayer", 2, 1, 2);
            testMap.SetTile ("testLayer", 3, 1, 3);*/

            stage = new Stage (this);
            var mascot = new MascotActor ();
            stage.AddActor (mascot);
            stage.AddAction (mascot);
            stage.TileMap = testMap;

            base.Initialize ();
        }