Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Commit

Permalink
Added animal images and error recording
Browse files Browse the repository at this point in the history
  • Loading branch information
falkirks committed Jan 2, 2018
1 parent c05a2d1 commit 44c6c92
Show file tree
Hide file tree
Showing 43 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Programming/2018/starter/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ let R_KEY = 82;
function preload() {
// If you want to use other images, put them in the images folder
// and change the panda.png part to be the image file name
petImage = loadImage("images/panda.png");
foodImage = loadImage("images/bamboo.png");
petImage = loadImage("images/animal/panda.png");
foodImage = loadImage("images/food/bamboo.png");
}

function setup() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/bear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/bird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/cow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/deer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/fish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/fox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/horse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/lion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/monkey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/mouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/pig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/rabbit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/shark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/sheep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Programming/2018/starter/images/animal/tiger.png
Binary file added Programming/2018/starter/images/animal/whale.png
Binary file added Programming/2018/starter/images/animal/wolf.png
Binary file added Programming/2018/starter/images/animal/worm.png
Binary file added Programming/2018/starter/images/animal/zebra.png
Binary file added Programming/2018/starter/images/food/bananas.png
Binary file added Programming/2018/starter/images/food/berries.png
Binary file added Programming/2018/starter/images/food/carrot.png
Binary file added Programming/2018/starter/images/food/cheese.png
Binary file added Programming/2018/starter/images/food/chestnut.png
Binary file added Programming/2018/starter/images/food/grass.png
Binary file added Programming/2018/starter/images/food/hay.png
Binary file added Programming/2018/starter/images/food/leaves.png
Binary file added Programming/2018/starter/images/food/meat.png
10 changes: 10 additions & 0 deletions Programming/2018/starter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
<link rel="stylesheet" href="style.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.js"></script>
<div id="errorBox">
<p>An error occured inside your game. Go back to the editor to see what it is.</p>
</div>
<script>
window.onerror = function (msg, url, lineNo, columnNo, error) {
document.getElementById('errorBox').style.display = 'block';
return false;
}
</script>
<script src="canvas.js"></script> <!-- this line is not needed on codepen-->

</head>
<body>
</body>
Expand Down
9 changes: 9 additions & 0 deletions Programming/2018/starter/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ html, body {
height: 100%;
}

#errorBox{
display: none;
position: fixed;
top: 50%;
width: 100%;
font-size: 20px;
background-color: red;
}

body {
margin: 0;
display: flex;
Expand Down

0 comments on commit 44c6c92

Please sign in to comment.