Skip to content

Commit 40b2867

Browse files
committed
New UI art!!
1 parent 3ba1c16 commit 40b2867

3 files changed

Lines changed: 19 additions & 21 deletions

File tree

assets/sprites/ui.png

-11.8 KB
Loading

scripts/_start.js

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kaboom({
1717
width: kaWidth,
1818
height: kaHeight,
1919
letterbox: true,
20-
pixelDensity: Math.min(devicePixelRatio, 2),
20+
pixelDensity: 0.5*Math.min(devicePixelRatio, 2),
2121
logMax: 3,
2222
debugKey: 'i',
2323
texFilter: 'linear',
@@ -89,28 +89,8 @@ loadSprite('bul_strawberrySeed', 'https://iili.io/KtHgKzb.png');
8989
loadSprite('enemy', 'https://iili.io/KN8fNPs.png')
9090
loadSprite('shadow', 'https://iili.io/fCyT2Cg.png')
9191

92-
loadSpriteAtlas('https://iili.io/fBRKXRt.png', {
93-
'bulletSlot_primary': { x: 1, y: 1, width: 115, height: 115 },
94-
'bulletSlot_transition': { x: 118, y: 1, width: 115, height: 115 },
95-
'bulletSlot_secondary': { x: 235, y: 1, width: 115, height: 115 },
96-
})
97-
9892
loadRoot('https://unpolloloco.github.io/apple-wars-2/assets/');
9993

100-
loadSpriteAtlas('sprites/ui.png', {
101-
'abilityMeter_full': { x: 1, y: 1, width: 150, height: 159 },
102-
'abilityMeter_empty': { x: 153, y: 1, width: 150, height: 159 },
103-
'abilityMeter_filling': { x: 305, y: 1, width: 150, height: 159 },
104-
105-
'healthBar_full': { x: 1, y: 162, width: 600, height: 100 },
106-
'healthBar_empty': { x: 1, y: 264, width: 600, height: 100 },
107-
'healthBar_flash': { x: 1, y: 366, width: 600, height: 100 },
108-
109-
//'bulletSlot_primary': { x: 1, y: 468, width: 115, height: 115 },
110-
//'bulletSlot_transition': { x: 118, y: 468, width: 95, height: 95 },
111-
//'bulletSlot_secondary': { x: 215, y: 468, width: 75, height: 75 },
112-
})
113-
11494
loadSpriteAtlas('sprites/apple.png', {
11595
'apple_base': { x: 1, y: 1, width: 85, height: 85 },
11696
'apple_leaf': { x: 88, y: 1, width: 30, height: 51 },
@@ -122,6 +102,23 @@ loadSpriteAtlas('sprites/apple.png', {
122102
'apple_glisten': { x: 1, y: 89, width: 320, height: 64, sliceX: 5 },
123103
})
124104

105+
loadSpriteAtlas('sprites/ui.png', {
106+
'healthBar_empty': { x: 1, y: 1, width: 600, height: 100 },
107+
'healthBar_full': { x: 1, y: 103, width: 600, height: 100 },
108+
'healthBar_flash': { x: 1, y: 205, width: 600, height: 100 },
109+
'healthBar_end1': { x: 1, y: 307, width: 600, height: 100 },
110+
'healthBar_end2': { x: 1, y: 409, width: 600, height: 100 },
111+
'healthBar_end3': { x: 1, y: 511, width: 600, height: 100 },
112+
113+
'abilityMeter_empty': { x: 1, y: 613, width: 150, height: 159 },
114+
'abilityMeter_full': { x: 153, y: 613, width: 150, height: 159 },
115+
'abilityMeter_filling': { x: 305, y: 613, width: 150, height: 159 },
116+
117+
'bulletSlot_primary': { x: 1, y: 774, width: 115, height: 115 },
118+
'bulletSlot_transition': { x: 118, y: 774, width: 115, height: 115 },
119+
'bulletSlot_secondary': { x: 235, y: 774, width: 115, height: 115 },
120+
})
121+
125122
loadSprite('spurt', 'sprites/spurt.png', {
126123
sliceY: 5,
127124
anims: { 'spurt': { from: 0, to: 4, speed: 30 } },

scripts/game.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ abilityFillingMask.add([
298298
scale(UNIT / 150 * 1.5),
299299
fixed(),
300300
z(LAYERS.ui),
301+
opacity(0.3),
301302
])
302303

303304
// Red full icon

0 commit comments

Comments
 (0)