diff --git a/Source/Juego_Prototype/Games/Lander/LanderGame.Art.cs b/Source/Juego_Prototype/Games/Lander/LanderGame.Art.cs deleted file mode 100644 index 062d995..0000000 --- a/Source/Juego_Prototype/Games/Lander/LanderGame.Art.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Juego; - -namespace Juego.Games -{ - public partial class LanderGame - { - } -} \ No newline at end of file diff --git a/Source/Juego_Prototype/Games/Lander/LanderGame.Renderer.cs b/Source/Juego_Prototype/Games/Lander/LanderGame.Renderer.cs deleted file mode 100644 index b6cea15..0000000 --- a/Source/Juego_Prototype/Games/Lander/LanderGame.Renderer.cs +++ /dev/null @@ -1,80 +0,0 @@ -using Meadow; -using Meadow.Foundation.Graphics; - -namespace Juego.Games -{ - public partial class LanderGame - { - readonly byte cellSize = 8; - - readonly DrawPixelDel DrawPixel; - - public void Init(MicroGraphics gl) - { - gl.Clear(); - gl.DrawText(0, 0, "Meadow Lander"); - gl.DrawText(0, 16, "v0.0.1"); - gl.Show(); - } - - public void Update(IIOConfig ioConfig) - { - var gl = ioConfig.Graphics; - - Update(); - - gl.Clear(); - DrawBackground(gl); - - // DrawLives(); - gl.Show(); - } - - void DrawBackground(MicroGraphics graphics) - { - - } - - void DrawLives(MicroGraphics graphics) - { - - } - - delegate void DrawPixelDel(int x, int y, bool colored, MicroGraphics graphics, Color color); - - void DrawPixel1x(int x, int y, bool colored, MicroGraphics graphics, Color color) - { - graphics.DrawPixel(x, y, colored ? color : Color.Black); - } - - void DrawPixel2x(int x, int y, bool colored, MicroGraphics graphics) - { - x *= 2; - y *= 2; - - graphics.DrawPixel(x, y, colored); - graphics.DrawPixel(x + 1, y, colored); - graphics.DrawPixel(x, y + 1, colored); - graphics.DrawPixel(x + 1, y + 1, colored); - } - - void DrawBitmap(int x, int y, int width, int height, byte[] bitmap, MicroGraphics graphics, Color color) - { - for (var ordinate = 0; ordinate < height; ordinate++) //y - { - for (var abscissa = 0; abscissa < width; abscissa++) //x - { - var b = bitmap[(ordinate * width) + abscissa]; - byte mask = 0x01; - - for (var pixel = 0; pixel < 8; pixel++) - { - DrawPixel(x + (8 * abscissa) + 7 - pixel, y + ordinate, (b & mask) > 0, graphics, color); - - mask <<= 1; - } - } - } - } - } -} \ No newline at end of file diff --git a/Source/Juego_Prototype/Games/Lander/LanderGame.cs b/Source/Juego_Prototype/Games/Lander/LanderGame.cs deleted file mode 100644 index 3e3426f..0000000 --- a/Source/Juego_Prototype/Games/Lander/LanderGame.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; - -namespace Juego.Games -{ - public partial class LanderGame : IGame - { - enum LanderState - { - Forward, - Left, - Right, - Dead - } - - LanderState landerState; - - public double GameTime { get; private set; } - public double TimeDelta => GameTime - lastTime; - - public double LanderX { get; set; } - public double LanderY { get; private set; } - - public int Lives { get; private set; } - - public int CellSize { get; private set; } - - - - DateTime gameStart; - UserInput lastInput; - - enum UserInput - { - None, - Up, - Down, - Left, - Right, - } - - public LanderGame(int cellSize = 8, int width = 128) - { - - Reset(); - } - - public void Reset() - { - gameStart = DateTime.UtcNow; - - Lives = 3; - - lastInput = UserInput.None; - } - - void ResetLander() - { - - } - - void GenerateGame() - { - - - - - } - - double lastTime; - public void Update() - { - lastTime = GameTime; - GameTime = (DateTime.UtcNow - gameStart).TotalSeconds; - - switch (lastInput) - { - case UserInput.Up: - - break; - case UserInput.Down: - - break; - case UserInput.Left: - - break; - case UserInput.Right: - - break; - } - //clear for next frame - lastInput = UserInput.None; - } - - public void Up() - { - lastInput = UserInput.Up; - } - - public void Down() - { - lastInput = UserInput.Down; - } - - public void Left() - { - lastInput = UserInput.Left; - } - - public void Right() - { - lastInput = UserInput.Right; - } - - void KillLander() - { - landerState = LanderState.Dead; - ResetLander(); - } - } -} \ No newline at end of file diff --git a/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.Renderer.cs b/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.Renderer.cs deleted file mode 100644 index 076b4c7..0000000 --- a/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.Renderer.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Meadow.Foundation.Graphics; -using System; - -namespace Juego.Games -{ - public partial class SpaceRaid : IGame - { - int[] leftWall = new int[9]; - int[] rightWall = new int[9]; - - int offset = 0; - - - public void Init(MicroGraphics gl) - { - - } - - public void Update(IIOConfig ioConfig) - { - var gl = ioConfig.Graphics; - - gl.Clear(); - - gl.DrawText(0, 0, "Space"); - gl.DrawLine(0, 0, 10, 10, true); - - gl.Show(); - } - } -} diff --git a/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.cs b/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.cs deleted file mode 100644 index 67923f5..0000000 --- a/Source/Juego_Prototype/Games/SpaceRaid/SpaceRaid.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Juego.Games -{ - public partial class SpaceRaid : IGame - { - public void Down() - { - - } - - public void Left() - { - - } - - public void Reset() - { - - offset = 0; - - for(int i = 0; i < 9; i++) - { - leftWall[i] = 32; - rightWall[i] = 96; - } - } - - public void Right() - { - - } - - public void Up() - { - - } - } -} \ No newline at end of file