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