Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: t is undefined' in or related to this line: 'var planetGraphics = self.createAsset(details.planet, {' Line Number: 677
Code edit (12 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: t is undefined' in or related to this line: 'var planetGraphics = self.createAsset(details.planet, {' Line Number: 677
Code edit (6 edits merged)
Please save this source code
User prompt
In the ship's update function, it should emit a rocket flame particle downward, while the ship's direction is not 0
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
In the fruit constructor, set the default graphic's rotation to face toward the planet
Code edit (3 edits merged)
Please save this source code
User prompt
In the Inventory class, display a BorderedText underneath the slots which says: "Cannot grow on this planet" and toggle its visibility in the refreshAllowed slot based on `allowedTypes.includes(itemType)`
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: baseNode is undefined' in or related to this line: 'if (!baseNode.tryAction()) {' Line Number: 163
User prompt
Fix Bug: 'ReferenceError: type is not defined' in or related to this line: 'selector.toggleAllowed(allowedTypes.includes(type));' Line Number: 839
Code edit (6 edits merged)
Please save this source code
User prompt
add an empty background container to the planet (created before the graphic is set). When transitionPlanets is called, the ship should be added to the new planet's background as a child
Code edit (1 edits merged)
Please save this source code
User prompt
Create a new InventorySelector class. The selector and cross assets should be moved into there and replaced with this class
User prompt
Add a cross asset to the inventory. It should be added to the same parent as the selector
User prompt
Remove the console.log
Code edit (4 edits merged)
Please save this source code
User prompt
plant class refreshGraphics should also randomly flip the x scale
Code edit (5 edits merged)
Please save this source code
User prompt
When the farmGraphics are clicked, call the tryPlantFruit function
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -535,25 +535,25 @@
}
});
});
var Planet = ConfigContainer.expand(function (planetName, config, barren) {
- var self = ConfigContainer.call(this);
+ var self = ConfigContainer.call(this, config);
var details = PLANET_DETAILS[planetName];
var perimeter = MATH_2_PI * details.radius;
var numPlots = Math.floor(perimeter / (PLOT_SIZE + PLOT_GAP));
var numNodes = numPlots * 4;
var nodes = [];
var fruitList = [];
var background = self.addChild(new Container());
- var planetGraphics = self.createAsset(details.image, {
+ var planetGraphics = self.createAsset(planetName, {
anchorX: 0.5,
anchorY: 0.5
});
planetGraphics.scale.set(2 * details.radius / 1000);
;
self.update = update;
self.name = planetName;
- self.barren = barren;
+ self.barren = !!barren;
self.nodes = nodes;
self.background = background;
self.radius = details.radius;
self.fruitList = fruitList;
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.