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