summaryrefslogtreecommitdiff
path: root/src/entities/wall.js
blob: 55226d0eff3b3675366b50339feec983c7e50753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
game.createWall = () => {
  const wall = game.Entity();
  wall.addComponent(game.components.Position({x: 0, y: 0}));
  wall.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
  wall.sprite = game.graphics.Sprite({
    image: game.assets.wall,
    spriteHeight: 24,
    spriteWidth: 24,
    numFrames: 3,
    timePerFrame: 100,
  });
  return wall;
}