1234567891011121314151617 |
- import Entity from '../Entity';
- import Vec2 from '../Vec2';
-
- import KeyboardControls from '../traits/KeyboardControls';
-
- export default class Player extends Entity {
- constructor(level) {
- super(level);
-
- this.bounds.size.set(20, 20);
- this.addTrait(new KeyboardControls(this));
- }
-
- draw(ctx) {
- this.bounds.draw(ctx);
- }
- }
|