mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 12:17:22 +00:00
Create none hat
This commit is contained in:
@@ -3,6 +3,7 @@ import { PALETTE } from "./animation/sprites.js";
|
||||
import { getLayerPixels } from "./shared.js";
|
||||
|
||||
export const HAT = {
|
||||
NONE: 'none',
|
||||
TOP_HAT: 'top-hat'
|
||||
};
|
||||
|
||||
@@ -16,6 +17,9 @@ export function createHatLayers(spriteSheet) {
|
||||
down: []
|
||||
};
|
||||
for (const hatName in HAT) {
|
||||
if (hatName === 'NONE') {
|
||||
continue;
|
||||
}
|
||||
const hatKey = HAT[hatName];
|
||||
const hatLayer = buildHatLayer(spriteSheet, hatKey, false);
|
||||
const downHatLayer = buildHatLayer(spriteSheet, hatKey, false, 1);
|
||||
|
||||
Reference in New Issue
Block a user