diff --git a/Gunship/Weekly Archives/140118.zip b/Gunship/Weekly Archives/140118.zip new file mode 100644 index 0000000..c0e84e0 Binary files /dev/null and b/Gunship/Weekly Archives/140118.zip differ diff --git a/Gunship/css/gunship.css b/Gunship/css/gunship.css new file mode 100644 index 0000000..a170bf8 --- /dev/null +++ b/Gunship/css/gunship.css @@ -0,0 +1,8 @@ +#gameDiv { + margin-top: 50px; + margin-left: auto; + margin-right: auto; + width: 512px; + height: 480px; + border: 2px solid gray; +} \ No newline at end of file diff --git a/Gunship/gunship.html b/Gunship/gunship.html new file mode 100644 index 0000000..e80e055 --- /dev/null +++ b/Gunship/gunship.html @@ -0,0 +1,13 @@ + + + Helicopter Gunship + + + + + +
+ +
+ + \ No newline at end of file diff --git a/Gunship/scripts/Gunship.js b/Gunship/scripts/Gunship.js new file mode 100644 index 0000000..88bc347 --- /dev/null +++ b/Gunship/scripts/Gunship.js @@ -0,0 +1,15 @@ +$(document).ready(function() { + var gameCanvas = $("#gameCanvas")[0]; + var drawCtx = gameCanvas.getContext("2d"); + // HTML + var img = new Image(); + img.onload = function() { + var pattern = drawCtx.createPattern(img,'repeat'); + drawCtx.fillStyle = pattern; + drawCtx.fillRect(0,0,gameCanvas.width,gameCanvas.height); + }; + img.src = "images/terrain.png"; + + // More info on this drawing context here: + // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D +}); \ No newline at end of file