Skip to content

Instantly share code, notes, and snippets.

@jrhii
Created November 10, 2016 00:54
Show Gist options
  • Save jrhii/febe93776ccbeba3edf2d3abb21ac8eb to your computer and use it in GitHub Desktop.
Save jrhii/febe93776ccbeba3edf2d3abb21ac8eb to your computer and use it in GitHub Desktop.
import PhysicsBody from './PhysicsBody';
import {Rect, Circle, Triangle} from './Shapes';
class platformEntity {
constructor() {
this.physicsBody = new PhysicsBody( new Rect(25, this.width), [0,0], [0,0], 0);
}
//physicsBody will go here
draw(){
this.ctx.fillStyle = 'rgba(255,255,255, 0.9)';
this.ctx.fillRect(0, 100 , this.width, 25);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment