Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Entity {
  2.     constructor(x, y, boundingRect) {
  3.             this.x = x;
  4.         this.y = y;
  5.         this.boundingRect = boundingRect;
  6.     }
  7. }
  8.  
  9. class Enemy extends Entity {
  10.         constructor() {
  11.             let boundingRect = { x: this.x, y: this.y + 10, w: 20,  h: 20 };
  12.         super(42, 42, boundingRect);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement