diff --git a/JoshHeaps.Net/Pages/Game.cshtml b/JoshHeaps.Net/Pages/Game.cshtml deleted file mode 100644 index 0760bc8..0000000 --- a/JoshHeaps.Net/Pages/Game.cshtml +++ /dev/null @@ -1,16 +0,0 @@ -@page -@model JoshHeaps.Net.Pages.GameModel -@{ - ViewData["Title"] = "Game"; - Layout = "_Layout"; -} - - - -@section Styles { - -} - -@section Scripts { - -} \ No newline at end of file diff --git a/JoshHeaps.Net/Pages/Game.cshtml.cs b/JoshHeaps.Net/Pages/Game.cshtml.cs deleted file mode 100644 index 4f0d131..0000000 --- a/JoshHeaps.Net/Pages/Game.cshtml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace JoshHeaps.Net.Pages -{ - public class GameModel : PageModel - { - public void OnGet() - { - } - } -} diff --git a/JoshHeaps.Net/Pages/_Layout.cshtml b/JoshHeaps.Net/Pages/_Layout.cshtml index aff4baf..207e85a 100644 --- a/JoshHeaps.Net/Pages/_Layout.cshtml +++ b/JoshHeaps.Net/Pages/_Layout.cshtml @@ -1,6 +1,6 @@ @{ Layout = null; - ViewData["cssVersion"] = "1.0.3"; // <--- change this once to bust cache + ViewData["cssVersion"] = "1.0.2"; // <--- change this once to bust cache } diff --git a/JoshHeaps.Net/wwwroot/css/game/game.css b/JoshHeaps.Net/wwwroot/css/game/game.css deleted file mode 100644 index 4c78c79..0000000 --- a/JoshHeaps.Net/wwwroot/css/game/game.css +++ /dev/null @@ -1,18 +0,0 @@ -html, body { - margin: 0; - padding: 0; - height: 100%; - overflow: hidden; -} - -#gameCanvas { - position: fixed; - inset: 0; - width: 100vw; - height: 100vh; - display: block; - background-image: url('/images/Game Images/background.jpg'); - background-repeat: no-repeat; - background-position: center; - background-size: cover; -} \ No newline at end of file diff --git a/JoshHeaps.Net/wwwroot/images/Game Images/background.jpg b/JoshHeaps.Net/wwwroot/images/Game Images/background.jpg deleted file mode 100644 index 3f7efc3..0000000 Binary files a/JoshHeaps.Net/wwwroot/images/Game Images/background.jpg and /dev/null differ diff --git a/JoshHeaps.Net/wwwroot/js/Game/game.js b/JoshHeaps.Net/wwwroot/js/Game/game.js deleted file mode 100644 index 23a557d..0000000 --- a/JoshHeaps.Net/wwwroot/js/Game/game.js +++ /dev/null @@ -1,86 +0,0 @@ - -document.addEventListener('DOMContentLoaded', () => { - const canvas = document.getElementById('gameCanvas'); - const ctx = canvas.getContext('2d'); - - canvas.width = window.innerWidth; - canvas.height = window.innerHeight; - - window.addEventListener('resize', () => { - canvas.width = window.innerWidth; - canvas.height = window.innerHeight; - }); - - // Game state - const windows = [ - { x: 100, y: 100, width: 200, height: 150, isDragging: false, offsetX: 0, offsetY: 0 }, - { x: 400, y: 300, width: 200, height: 150, isDragging: false, offsetX: 0, offsetY: 0 } - ]; - - const particles = []; - - // Event handling - canvas.addEventListener('mousedown', (e) => { - const mouse = { x: e.clientX, y: e.clientY }; - windows.forEach(win => { - if ( - mouse.x >= win.x && mouse.x <= win.x + win.width && - mouse.y >= win.y && mouse.y <= win.y + win.height - ) { - win.isDragging = true; - win.offsetX = mouse.x - win.x; - win.offsetY = mouse.y - win.y; - } - }); - }); - - canvas.addEventListener('mousemove', (e) => { - windows.forEach(win => { - if (win.isDragging) { - win.x = e.clientX - win.offsetX; - win.y = e.clientY - win.offsetY; - } - }); - }); - - canvas.addEventListener('mouseup', () => { - windows.forEach(win => win.isDragging = false); - }); - - - // Game loop - function gameLoop() { - ctx.clearRect(0, 0, canvas.width, canvas.height); - - ctx.fillStyle = 'rgba(0, 0, 0, 1)'; - ctx.fillRect(0, 0, canvas.width, canvas.height); - windows.forEach(win => { - ctx.save(); - ctx.globalCompositeOperation = 'destination-out'; - ctx.beginPath(); - ctx.roundRect(win.x, win.y, win.width, win.height, 10); - ctx.fill(); - ctx.restore(); - - // Optional: draw a visible outline - ctx.strokeStyle = '#ccc'; - ctx.lineWidth = 2; - ctx.stroke(); - }); - - // Draw windows - windows.forEach(win => { - ctx.fillStyle = "rgba(255,255,255,0)"; - ctx.strokeStyle = "#ccc"; - ctx.lineWidth = 2; - ctx.beginPath(); - ctx.circle(win.x, win.y, win.width, 10); - ctx.fill(); - ctx.stroke(); - }); - - requestAnimationFrame(gameLoop); - } - - gameLoop(); -}); \ No newline at end of file