User prompt
Remove the earth
User prompt
Remove the player and lava
User prompt
Make me the worst game you could ever mske
User prompt
Make me a trash can
User prompt
Make me a virus for the character
User prompt
Make me the weirdest game in the world
User prompt
Make me earth
User prompt
When the player touches the lava lose all the points
User prompt
Add lava
Initial prompt
3D game
===================================================================
--- original.js
+++ change.js
@@ -12,8 +12,19 @@
self.update = function () {
// Character update logic
};
});
+// Class for the earth
+var Earth = Container.expand(function () {
+ var self = Container.call(this);
+ var earthGraphics = self.attachAsset('earth', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.update = function () {
+ // Earth update logic
+ };
+});
// Class for the lava
var Lava = Container.expand(function () {
var self = Container.call(this);
var lavaGraphics = self.attachAsset('lava', {
@@ -45,8 +56,12 @@
/****
* Game Code
****/
+// Create and position the earth
+var earth = game.addChild(new Earth());
+earth.x = 2048 / 2;
+earth.y = 2732 / 2;
// Initialize arrays and variables
var objects3D = [];
var score = 0;
// Create and position the main character
@@ -111,5 +126,7 @@
character.y = y;
};
game.up = function (x, y, obj) {
// No action needed on up event
-};
\ No newline at end of file
+};
+// Update the earth
+earth.update();
\ No newline at end of file