User prompt
- If hunger score is 100, the status is "Happy" - if hunger score is between 90 to 70 it is "Neutral"- if hunger score is between 70 to 50 it is "Hungry"- if the hunger score is below 50 it is "Sad"
User prompt
If hunger score is 100, the status is "Happy", if between 90 to 70 it is "Neutral", if between 70 to 50 it is "Hungry" and if below 50 it is "Sad"
User prompt
Decrease hunger score by 10 every 10 seconds but increase by 10 if Feedbutton is pressed
User prompt
decrease hunger score by 10 every 10 seconds but if the feedbutton is pressed once, the score increase by 10
User prompt
Each time feedButton is pressed, the hunger score increase by 10
User prompt
Increase hunger score by 10 once feed button is pressed
User prompt
decrease hunger score by 10 every 10 seconds
User prompt
Can you move timer more to the left
User prompt
Show a timer on the top right
User prompt
Change status color to black
User prompt
Change hunger colour to black
User prompt
Align the grey transparent background behind level
User prompt
Align the grey transparent background behind hunger score
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var background = new Graphics();' Line Number: 51
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var background = new Graphics();' Line Number: 28
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var background = new Graphics();' Line Number: 3
User prompt
Add a grey transparent background behind hunger, level and status
User prompt
Can you match the size of hunger score to level
User prompt
Increase the size of hunger score and make it bold
User prompt
Can you match the hunger level size to level
User prompt
Can you match the size of level to status
User prompt
Can you make the status bigger and in bold
User prompt
Make the level font bigger and in bold
User prompt
Make the level is black colour
User prompt
Increase the distance between the feed button and dance button
var HungerDisplay = Container.expand(function () { var self = Container.call(this); var hungerText = new Text2('Hunger: 100', { size: 100, fill: "#ffffff", align: 'center', font: 'bold' }); hungerText.anchor.set(0.5, 0); hungerText.y = 200; self.addChild(hungerText); self.hunger = 100; self.updateHunger = function () { self.hunger -= 10; hungerText.setText('Hunger: ' + self.hunger); }; }); var StatusDisplay = Container.expand(function () { var self = Container.call(this); var statusText = new Text2('Status: Neutral', { size: 100, fill: "#ffffff", align: 'center', font: 'bold' }); statusText.anchor.set(0.5, 0); statusText.y = 100; self.addChild(statusText); self.updateStatus = function (newStatus) { statusText.setText('Status: ' + newStatus); }; }); var LevelDisplay = Container.expand(function () { var self = Container.call(this); var levelText = new Text2('Level: 1', { size: 100, fill: "#ffffff", align: 'center', font: 'bold' }); levelText.anchor.set(0.5, 0); levelText.y = 50; self.addChild(levelText); self.level = 1; self.updateLevel = function () { self.level++; levelText.setText('Level: ' + self.level); }; }); var DanceButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.createAsset('danceButton', 'Dance Button Graphics', 0.5, 0.5); self.on('down', function () { self.emit('danceBuckmon'); }); }); var FeedButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.createAsset('feedButton', 'Feed Button Graphics', 0.5, 0.5); self.on('down', function () { self.emit('feedBuckmon'); }); }); var Buckmon = Container.expand(function () { var self = Container.call(this); self.hungerStatus = 100; var buckmonGraphics = self.createAsset('buckmon', 'Buckmon Graphics', .5, .5); self.feed = function () { self.emit('updateStatus', 'Happy'); }; self.dance = function () { self.emit('updateStatus', 'Neutral'); }; self.chat = function () { var chatBubble = self.createAsset('chatBubble', 'Chat Bubble Graphics', 0.5, -0.5); chatBubble.y = -self.height; self.addChild(chatBubble); var chatText = new Text2('Let\'s Krump!', { size: 80, fill: "#ffffff", align: 'center' }); chatText.anchor.set(0.5, 0.5); chatText.y = -self.height * 0.5; chatBubble.addChild(chatText); LK.setTimeout(function () { chatBubble.destroy(); }, 3000); }; }); var Game = Container.expand(function () { var self = Container.call(this); var danceButton = self.addChild(new DanceButton()); danceButton.x = 2048 / 2 + 300; danceButton.y = 2732 - 200; danceButton.on('danceBuckmon', function () { buckmon.dance(); }); var background = self.createAsset('background', 'Game Background', 0, 0); background.width = 2048; background.height = 2732; self.addChildAt(background, 0); var buckmon = self.addChild(new Buckmon()); buckmon.x = 2048 / 2; buckmon.y = 2732 / 2; buckmon.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); if (pos.x < buckmon.x + buckmon.width / 2 && pos.x > buckmon.x - buckmon.width / 2) { if (pos.y < buckmon.y) { buckmon.feed(); } else if (pos.y > buckmon.y && pos.y < buckmon.y + buckmon.height / 2) { buckmon.dance(); } else if (pos.y > buckmon.y + buckmon.height / 2) { buckmon.chat(); } } }); var feedButton = self.addChild(new FeedButton()); feedButton.x = 2048 / 2 - 300; feedButton.y = 2732 - 200; feedButton.on('feedBuckmon', function () { buckmon.feed(); }); var hungerDisplay = self.addChild(new HungerDisplay()); hungerDisplay.x = 2048 / 2; hungerDisplay.y = 250; var statusDisplay = self.addChild(new StatusDisplay()); statusDisplay.x = 2048 / 2; statusDisplay.y = 150; var levelDisplay = self.addChild(new LevelDisplay()); levelDisplay.x = 2048 / 2; levelDisplay.y = 0; buckmon.on('updateStatus', function (status) { statusDisplay.updateStatus(status); }); var hungerDecreaseInterval = LK.setInterval(function () { hungerDisplay.updateHunger(); }, 60000); var levelIncreaseInterval = LK.setInterval(function () { levelDisplay.updateLevel(); }, 300000); LK.on('tick', function () {}); });
===================================================================
--- original.js
+++ change.js
@@ -1,8 +1,8 @@
var HungerDisplay = Container.expand(function () {
var self = Container.call(this);
var hungerText = new Text2('Hunger: 100', {
- size: 80,
+ size: 100,
fill: "#ffffff",
align: 'center',
font: 'bold'
});
A cute monster wearing a snapback and Timberland shoes in Chibi style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A boombox icon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A fried chicken thigh icon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A forest with boombox, dance floor and mirror Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.