Exemplo n.º 1
0
        void InitializePlayer()
        {
            player = new Player();
            layers[2].GetEntities(true).Add(player);
            cameraPosition = player.Position - ScreenSize / 2;

            // testing stuff
            for (int i = 0; i < Width; i++)
            {
                layers[1].SetTile(i, 50, Tile.Dirt);
                layers[2].SetTile(i, 51, Tile.Dirt);
                layers[2].SetTile(i, 52, Tile.Dirt);
                layers[3].SetTile(i, 53, Tile.Dirt);
                if (i > Width / 2)
                    layers[2].SetTile(i, 45, Tile.Dirt);
            }
            for (int i = 0; i < Height; i++)
            {
                layers[2].SetTile(50, i, Tile.Dirt);
            }
        }
Exemplo n.º 2
0
 void InitializePlayer()
 {
     layers = WorldGen.Generate();
     player = new Player();
     player.Spawn();
     cameraPosition = player.Position - ScreenSize / 2;
 }