Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Entity {
- constructor(x, y, boundingRect) {
- this.x = x;
- this.y = y;
- this.boundingRect = boundingRect;
- }
- }
- class Enemy extends Entity {
- constructor() {
- let boundingRect = { x: this.x, y: this.y + 10, w: 20, h: 20 };
- super(42, 42, boundingRect);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement