mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 04:07:23 +00:00
Create none hat
This commit is contained in:
@@ -237,7 +237,7 @@ function startApplication(birbPixels, featherPixels, hatsPixels) {
|
||||
let petStack = [];
|
||||
let currentSpecies = DEFAULT_BIRD;
|
||||
let unlockedSpecies = [DEFAULT_BIRD];
|
||||
let currentHat = HAT.TOP_HAT;
|
||||
let currentHat = HAT.NONE;
|
||||
// let visible = true;
|
||||
let lastPetTimestamp = 0;
|
||||
/** @type {StickyNote[]} */
|
||||
|
||||
@@ -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