Code edit (2 edits merged)
Please save this source code
User prompt
Create an instance of the Inventory class and add it to the LK.gui.top container with anchor of 1,.5
User prompt
Create an Inventory class which contains a 2x5 grid of inventory slots. Make sure the 2 and the 5 are pulled from global variables called INVENTORY_ROWS and INVENTORY_COLS
User prompt
Create an InventorySlot class which takes x,y and index parameters in its constructor
Code edit (12 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: messageStatValues is not defined' in or related to this line: 'self.addChild(new BorderedText(messageStatValues.map(mapKey).join('\n'), {' Line Number: 396
User prompt
Replace the TODO comment in saveStats with an implementation. Iterate through the stats object copying all keys and associated values to the winningStats object
Code edit (1 edits merged)
Please save this source code
User prompt
transitionPlanets should call the background's refresh function
User prompt
The Background's refresh function rotates the backgroundGraphics by 90 degrees (in radians)
Code edit (1 edits merged)
Please save this source code
User prompt
add a new `refresh` function to the `Background` class.
User prompt
Set the background opacity to .5
Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.attachAsset is not a function' in this line: 'var backgroundGraphics = self.attachAsset('background', {' Line Number: 407
Code edit (1 edits merged)
Please save this source code
User prompt
the background should be positioned in the middle of the screen and be sized to it's width
Code edit (1 edits merged)
Please save this source code
User prompt
Add a background image to the game
Code edit (2 edits merged)
Please save this source code
User prompt
In the Planet's createNodes functions, there should be a 20% chance of creating a PlantWeed with a random stage (between 0-3) and attach it to the node
User prompt
PlantWeed should have a graphic with id defined as: `'plant0Stage'+stage`
Code edit (2 edits merged)
Please save this source code
User prompt
Create a new Plant class, and a new PlantWeed class that inherits from the Plant class
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -238,9 +238,12 @@
var nodeX = radius * Math.cos(angle);
var nodeY = radius * Math.sin(angle);
var rotation = angle + MATH_HALF_PI;
var node = self.addChild(new PlantNode(nodeX, nodeY, rotation));
- if (i !== 0 && i % 4 === 0) {
+ if (Math.random() < 0.2) {
+ var stage = Math.floor(Math.random() * 4);
+ node.plant = node.addChild(new PlantWeed(stage));
+ } else if (i !== 0 && i % 4 === 0) {
node.farm = node.addChild(new Farm());
}
nodes.push(node);
}
pixel art of a tiny planet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a planet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of an alien currency symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a planet made of gold ore. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
plain black background with stars. 2d repeating Texture.
pixel art of a asteroid. Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a cute alien farmer, side view. Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a rocky explosion.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art flame particle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a large white, empty, rectangular, speech bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a red chevron. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art of yellow grapes. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.