diff --git a/assets/emotes/angry.png b/assets/emotes/angry.png new file mode 100644 index 0000000..3fdb0f1 Binary files /dev/null and b/assets/emotes/angry.png differ diff --git a/assets/emotes/happy.png b/assets/emotes/happy.png new file mode 100644 index 0000000..f353fd1 Binary files /dev/null and b/assets/emotes/happy.png differ diff --git a/assets/emotes/heart.png b/assets/emotes/heart.png new file mode 100644 index 0000000..b585df4 Binary files /dev/null and b/assets/emotes/heart.png differ diff --git a/assets/emotes/sleepy.png b/assets/emotes/sleepy.png new file mode 100644 index 0000000..b4ff1c1 Binary files /dev/null and b/assets/emotes/sleepy.png differ diff --git a/assets/speech/speech-bubble-blank.png b/assets/speech-bubble-blank.png similarity index 100% rename from assets/speech/speech-bubble-blank.png rename to assets/speech-bubble-blank.png diff --git a/assets/speech-bubbles.aseprite b/assets/speech-bubbles.aseprite new file mode 100644 index 0000000..893956d Binary files /dev/null and b/assets/speech-bubbles.aseprite differ diff --git a/assets/speech/speech-bubble-angry.png b/assets/speech/speech-bubble-angry.png deleted file mode 100755 index dd35603..0000000 Binary files a/assets/speech/speech-bubble-angry.png and /dev/null differ diff --git a/assets/speech/speech-bubble-happy.png b/assets/speech/speech-bubble-happy.png deleted file mode 100755 index 3b604d0..0000000 Binary files a/assets/speech/speech-bubble-happy.png and /dev/null differ diff --git a/assets/speech/speech-bubble-heart.png b/assets/speech/speech-bubble-heart.png deleted file mode 100644 index 7668fef..0000000 Binary files a/assets/speech/speech-bubble-heart.png and /dev/null differ diff --git a/assets/speech/speech-bubble-sleepy.png b/assets/speech/speech-bubble-sleepy.png deleted file mode 100755 index 947c621..0000000 Binary files a/assets/speech/speech-bubble-sleepy.png and /dev/null differ diff --git a/src/fish.js b/src/fish.js index 947e60f..93edeed 100644 --- a/src/fish.js +++ b/src/fish.js @@ -198,17 +198,18 @@ export default class Fish { scale(-1, 1); image(fishImage, -fishImage.width, 0); if (this.emotion) { - image(emoteImages[this.emotion], - -emoteImages[this.emotion].width - fishImages[this.type-1].width + 15, - -20); + image(speechBubbleImage, -fishImage.width - speechBubbleImage.width, -20); + scale(-1, 1); + image(emoteImages[this.emotion], fishImage.width + 10, -17); } pop(); } else { image(fishImage, this.x, this.y); if (this.emotion) { + image(speechBubbleImage, this.x - speechBubbleImage.width, this.y - 20); image(emoteImages[this.emotion], - this.x - fishImage.width + emoteImages[this.emotion].width/2 + 15, - this.y - 20); + this.x - speechBubbleImage.width + emoteImages[this.emotion].width/2 - 5, + this.y - 17); } } } diff --git a/src/main.js b/src/main.js index 822746c..ced9de2 100644 --- a/src/main.js +++ b/src/main.js @@ -10,7 +10,8 @@ window.NUM_TYPES_FISH = 10; window.bg = null; // The aquarium's background image window.fishImages = []; // The fish images -window.fishImagesSelected = []; +window.fishImagesSelected = []; +window.speechBubbleImage = null; window.emoteImages = { heart: null, happy: null, @@ -44,8 +45,9 @@ function preload() { } // Load emote images + speechBubbleImage = loadImage("assets/speech-bubble-blank.png"); for(let key of Object.keys(emoteImages)) { - emoteImages[key] = loadImage(`assets/speech/speech-bubble-${key}.png`) + emoteImages[key] = loadImage(`assets/emotes/${key}.png`) } // Load food images