Pig Eatin Time II.0 SHOOTERS

Same game as before, but more awesome!

by nukeboy212

HTML

<canvas id="poop05" width="630" height="450"></canvas>
<canvas id="wee" width="630" height="450"></canvas>

<img src="http://pngimg.com/upload/green_leaves_PNG3678.png" id="ii">
<img src="http://vignette3.wikia.nocookie.net/adventuretimewithfinnandjake/images/0/06/Pig_trans.png/revision/latest?cb=20120812082359" id="one">

<h2 id="oi">
You are a delicate little fat pig you must eat awesome healthy things, but who says you have to obtain it by mouth? (click to start)
</h2>

<img src="http://freepngimages.com/wp-content/uploads/2015/11/nuclear-explosion-transparent-background.png" id="iii">

<button id="poop06">
  RESET
</button>

<button id="scam">

  CLICK THIS TO BE SCAMMED
</button>

<button id="add">

  ADVERTISEMENT
</button>

<button id="butt">
  Cant Click this!
</button>

<img src="http://www.medievalcollectibles.com/images/product/icon/OD61.png" id="GUN"

CSS

canvas {
  background-color: pink;
}

img {
  display: none;
}

h2 {
  color: Red;
}

#wee {
  background-image: url("http://freepngimages.com/wp-content/uploads/2015/11/nuclear-explosion-transparent-background.png");
  background-repeat: no-repeat;
}

JavaScript

console.log("Hello! Most people won't bother looking at this text!");
$(document).ready(function() {
  $("#wee").hide();
  var canvas = document.getElementById("poop05");
  var ctx = canvas.getContext("2d");
  var enemies = [];
  var money = 0;
  var time = 240;
  var over = true;
  var bullets = [];

  $("#poop06").hide();
  $("#scam").hide();

  function Enemy(I) {
    I = I || {};
    I.active = true;
    I.age = Math.floor(Math.random() * 100);
    I.color = "red";
    I.x = Math.random() * 1000;
    I.y = 0;
    I.xVelocity = 0;
    I.yVelocity = 2;
    I.width = 50;
    I.height = 50;

    I.inBounds = function() {
      return I.x >= 0 && I.x <= 1000 && I.y >= 0 && I.y <= 1000;
    };

    I.draw = function() {
      //ctx.fillStyle = this.color;
      //ctx.fillRect(this.x, this.y, this.width, this.height);
      ctx.drawImage(ii, this.x, this.y, this.width, this.height);

    };

    I.update = function() {
      I.x += I.xVelocity;
      I.y += I.yVelocity;
      I.age++;

      I.xVelocity = 3 * Math.sin(I.age * Math.PI / 64);

      I.active = I.active && I.inBounds();

    };
    return I;

  };

  function Bullet(I) {
    I.active = true;
    I.xVelocity = 0;
    I.yVelocity = -I.speed;
    I.width = 3;
    I.height = 9;
    I.color = "blue";

    I.inBounds = function() {
      return I.x >= 0 && I.x <= 630 && I.y >= 0 && <= 450;
    };

    I.draw = function() {
      //ctx.fillStyle = this.color;
      // ctx.fillRect(this.x, this.y, this.width, this.height);
      ctx.drawImage(GUN, this.x, this.y, this.width, this.height);
    };
    I.update = function() {
      I.x += I.xVelocity;
      I.y += I.yVelocity;
      I.active = I.active = I.active && I.inBounds();
    };
    return I;
  }

  var player = {
    color: "yellow",
    height: 80,
    width: 100,
    x: canvas.width / 2,
    y: canvas.height - 100,

    draw: function() {
      //ctx.fillStyle = this.color;
      //ctx.fillRect(this.x, this.y, this.width, this.height);
     ...