remove dynamic coloring, recolor sprites
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 517 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 448 B |
@ -1,6 +1,6 @@
|
||||
game.createFlag = () => {
|
||||
const flag = game.Entity();
|
||||
flag.addComponent(game.components.LoadPriority({priority: 2}));
|
||||
flag.addComponent(game.components.LoadPriority({priority: 5}));
|
||||
flag.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
|
||||
flag.addComponent(game.components.Alive());
|
||||
flag.addComponent(game.components.Sprite({spriteName: "flag"}))
|
||||
|
@ -1,6 +1,6 @@
|
||||
game.createFloor = () => {
|
||||
const floor = game.Entity();
|
||||
floor.addComponent(game.components.LoadPriority({priority: 5}));
|
||||
floor.addComponent(game.components.LoadPriority({priority: 6}));
|
||||
floor.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
|
||||
floor.addComponent(game.components.Alive());
|
||||
floor.addComponent(game.components.Sprite({spriteName: "floor"}))
|
||||
|
@ -1,6 +1,6 @@
|
||||
game.createLava = () => {
|
||||
const lava = game.Entity();
|
||||
lava.addComponent(game.components.LoadPriority({priority: 5}));
|
||||
lava.addComponent(game.components.LoadPriority({priority: 6}));
|
||||
lava.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
|
||||
lava.addComponent(game.components.Alive());
|
||||
lava.addComponent(game.components.Sprite({spriteName: "lava"}))
|
||||
|
@ -34,14 +34,6 @@ game.graphics = (
|
||||
const col = Math.floor(currentFrame / rows);
|
||||
context.drawImage(image, spriteX+col*spriteWidth, spriteY+row*spriteHeight, spriteWidth, spriteHeight, x, y, width, height);
|
||||
|
||||
// apply color to sprite
|
||||
if (color) {
|
||||
context.globalAlpha=0.7;
|
||||
context.globalCompositeOperation="source-atop";
|
||||
context.fillStyle=color;
|
||||
context.fillRect(x, y, width, height);
|
||||
}
|
||||
|
||||
context.restore();
|
||||
};
|
||||
} else {
|
||||
|
@ -12,7 +12,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#ede285",
|
||||
}),
|
||||
floor: game.graphics.Sprite({
|
||||
image: game.assets.floor,
|
||||
@ -20,7 +19,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#404040",
|
||||
}),
|
||||
hedge: game.graphics.Sprite({
|
||||
image: game.assets.hedge,
|
||||
@ -28,7 +26,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 250,
|
||||
color: "#5c8339",
|
||||
}),
|
||||
grass: game.graphics.Sprite({
|
||||
image: game.assets.grass,
|
||||
@ -36,7 +33,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#5c8339",
|
||||
}),
|
||||
lava: game.graphics.Sprite({
|
||||
image: game.assets.lava,
|
||||
@ -44,7 +40,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#e49950",
|
||||
}),
|
||||
rock: game.graphics.Sprite({
|
||||
image: game.assets.rock,
|
||||
@ -52,7 +47,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#90673e",
|
||||
}),
|
||||
wall: game.graphics.Sprite({
|
||||
image: game.assets.wall,
|
||||
@ -60,7 +54,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#707070",
|
||||
}),
|
||||
water: game.graphics.Sprite({
|
||||
image: game.assets.water,
|
||||
@ -68,7 +61,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#5f9dd1",
|
||||
}),
|
||||
wordBigBlue: game.graphics.Sprite({
|
||||
image: game.assets.wordBigBlue,
|
||||
@ -76,7 +68,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#0f2439",
|
||||
}),
|
||||
wordFlag: game.graphics.Sprite({
|
||||
image: game.assets.wordFlag,
|
||||
@ -84,7 +75,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#ede285",
|
||||
}),
|
||||
wordIs: game.graphics.Sprite({
|
||||
image: game.assets.wordIs,
|
||||
@ -92,7 +82,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#ffffff",
|
||||
}),
|
||||
wordKill: game.graphics.Sprite({
|
||||
image: game.assets.wordKill,
|
||||
@ -100,7 +89,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#e49950",
|
||||
}),
|
||||
wordLava: game.graphics.Sprite({
|
||||
image: game.assets.wordLava,
|
||||
@ -108,7 +96,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#e49950",
|
||||
}),
|
||||
wordPush: game.graphics.Sprite({
|
||||
image: game.assets.wordPush,
|
||||
@ -116,7 +103,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#90673e",
|
||||
}),
|
||||
wordRock: game.graphics.Sprite({
|
||||
image: game.assets.wordRock,
|
||||
@ -124,7 +110,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#90673e",
|
||||
}),
|
||||
wordSink: game.graphics.Sprite({
|
||||
image: game.assets.wordSink,
|
||||
@ -132,7 +117,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#5f9dd1",
|
||||
}),
|
||||
wordStop: game.graphics.Sprite({
|
||||
image: game.assets.wordStop,
|
||||
@ -140,7 +124,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#252e0e",
|
||||
}),
|
||||
wordWall: game.graphics.Sprite({
|
||||
image: game.assets.wordWall,
|
||||
@ -148,7 +131,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#707070",
|
||||
}),
|
||||
wordWater: game.graphics.Sprite({
|
||||
image: game.assets.wordWater,
|
||||
@ -156,7 +138,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#5f9dd1",
|
||||
}),
|
||||
wordWin: game.graphics.Sprite({
|
||||
image: game.assets.wordWin,
|
||||
@ -164,7 +145,6 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#ede285",
|
||||
}),
|
||||
wordYou: game.graphics.Sprite({
|
||||
image: game.assets.wordYou,
|
||||
@ -172,6 +152,5 @@ game.sprites = {
|
||||
spriteWidth: 24,
|
||||
numFrames: 3,
|
||||
timePerFrame: 100,
|
||||
color: "#0f2439",
|
||||
}),
|
||||
};
|
||||
|