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