diff --git a/scripts/game_logic/graphics.js b/scripts/game_logic/graphics.js index 39351a59d4c520e73f6e99e5417ea436ec4aa914..993e28a0045765fdf7b4fd6346329002e73984fb 100644 --- a/scripts/game_logic/graphics.js +++ b/scripts/game_logic/graphics.js @@ -1,6 +1,8 @@ var playerPic = document.createElement("img"); var tilePics=[ ]; var picsToLoad = 2; +// +var SQUARE_SIZE = 900/11; function countLoadedImageAndLaunchIfReady(){ picsToLoad-=1; @@ -47,4 +49,17 @@ function drawCenteredRotatingBitMap(pic, picX, picY, angle){ canvasContext.rotate(angle); canvasContext.drawImage(pic, -pic.width/2, -pic.height/2); canvasContext.restore(); +} + +//provisorische graphiken +function drawBall(ballX,ballY,ballRadius,ballColour){ + canvasContext.fillStyle = ballColour; + canvasContext.beginPath(); + canvasContext.arc(ballX, ballY, ballRadius, 0, 2*Math.PI, true); + canvasContext.fill(); +} + +function drawRectangle(X, Y, width, height, colour){ + canvasContext.fillStyle = colour; + canvasContext.fillRect(X, Y, width, height); } \ No newline at end of file