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