Code edit (1 edits merged)
Please save this source code
User prompt
Add two new planet classes: PlanetBlue and PlanetOmni
Code edit (2 edits merged)
Please save this source code
User prompt
Create a new planet called PlanetRed
Code edit (5 edits merged)
Please save this source code
User prompt
call the planet's update method from the global on tick callback
User prompt
in the planet update method increase the rotation by the spin value
User prompt
Planet and PlanetGrey should have a self.spin of 0 and 0.01 respectively
Code edit (1 edits merged)
Please save this source code
User prompt
add an update function to the planet class
User prompt
Instead of creating a farm on the first plot, create a ship
User prompt
a planet should randomize its rotation in it's constructor
User prompt
Set the width of the farm graphics to the PLOT_SIZE
Code edit (1 edits merged)
Please save this source code
User prompt
Remove the farm and ship functions
Code edit (1 edits merged)
Please save this source code
User prompt
farm creation should happen in the planet class
User prompt
Remove the tick logic for ships and farms
User prompt
PlanetGrey should no longer create it's own asset
User prompt
PlanetGrey should take in 2 parameters; x and y. But should pass x, y, PLANET_RADIUS_GREY and 'planetGrey' to the Planet constructor
User prompt
Planet should take in 4 parameters; x, y, radius and assetName
User prompt
Remove the tint for the grey planet
User prompt
Planet should return self at the bottom
User prompt
Fix Bug: 'TypeError: self is undefined' in this line: 'var planetGreyGraphics = self.createAsset('planetGrey', 'Grey Planet asset', 0.5, 0.5);' Line Number: 40
User prompt
the starter planet should be of PlanetGrey type
===================================================================
--- original.js
+++ change.js
@@ -85,15 +85,19 @@
var GAME_TICKS = 60;
var GAME_WIDTH = 2048;
var GAME_HEIGHT = 2732;
var PLANET_RADIUS_GREY = 200;
+var PLANET_RADIUS_RED = 400;
+var PLANET_RADIUS_BLUE = 350;
+var PLANET_RADIUS_OMNI = 500;
var PLANET_SPIN_GREY = 0.001;
-var PLANET_RADIUS_RED = 350;
var PLANET_SPIN_RED = -0.0002;
+var PLANET_SPIN_BLUE = 0.001;
+var PLANET_SPIN_OMNI = 0.005;
var PLOT_SIZE = 100; // Size of each farm plot
var PLOT_GAP = 40;
;
-var planet = game.addChild(new PlanetRed(GAME_WIDTH / 2, GAME_HEIGHT / 2));
+var planet = game.addChild(new PlanetBlue(GAME_WIDTH / 2, GAME_HEIGHT / 2));
;
LK.on('tick', function () {
planet.update();
});
\ No newline at end of file
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.