blob: 8c7d8ea4fb6b10954759ced4b831b1610a41ce9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
game.createLiquid = () => {
// TODO: Split this into two entities: water and lava
const liquid = game.Entity();
liquid.addComponent(game.components.LoadPriority({priority: 5}));
liquid.addComponent(game.components.Position({x: 0, y: 0}));
liquid.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
liquid.sprite = game.graphics.Sprite({
image: game.assets.liquid,
spriteHeight: 24,
spriteWidth: 24,
numFrames: 3,
timePerFrame: 100,
});
return liquid;
}
|