User prompt
Fix Bug: 'ReferenceError: playerGraphics is not defined' in this line: 'player.removeChild(playerGraphics);' Line Number: 70
User prompt
Do what you said above
User prompt
Fix Bug: 'ReferenceError: shapeTxt is not defined' in this line: 'shapeTxt.setText(self.shape);' Line Number: 47
User prompt
Add a curent shape display in the left side of the screen
User prompt
Why does it never get to the circle?
User prompt
Display the curent shape in the left corner of the screen
User prompt
Now it only displays the square, not the circle and the triangle. Fix it so it corectly cycles through all 3 shapes
User prompt
It does not work anymore. The shape doesn't cycle corectly and it get's stuck to a specific one
User prompt
It never gets to the third shape
User prompt
Set the initial shape to square when the game begins. Also fix the shape changing because now it never gets to circle.
User prompt
The player still never gets to the triangle.
User prompt
It is stuck right now. Don't forget that on each click the next shape should come (square - triangle- circle) and then take the series from the begining
User prompt
Almost everything works now but the player never gets to the circle shape
User prompt
The player is now displaying more textures at the same time. Make it so it only displays the current shape
User prompt
Fix Bug: 'TypeError: playerGraphics.setTexture is not a function' in this line: 'playerGraphics.setTexture(LK.getAsset('circleAsset', 'Player Graphics', .5, .5));' Line Number: 36
User prompt
It still does not work. Nothing is happening when I press click
User prompt
Make it so it displays the changes by changing the player to the shapes specific asset.
User prompt
The player shape is still not changing
User prompt
Make it so the change happens when the players presses the left click
User prompt
Now make it so on each click the player, changes it's shape to one of the 3 defined earlier. The default one should be square, then the next click changes it to triangle, the next to circle, then back to square and so on.
User prompt
Stop the spawning of new entites and clear the screen of any curent entities other than the player
User prompt
Create assets for each of the shapes, so the player can differentiate it.
User prompt
Fix Bug: 'TypeError: shapes[a].containsPoint is not a function' in this line: 'if (shapes[a] && shapes[a].containsPoint({' Line Number: 86
User prompt
Fix Bug: 'TypeError: window is undefined' in this line: 'var newShape = new window[shapeType]();' Line Number: 67
User prompt
Fix Bug: 'ReferenceError: Shape is not defined' in this line: 'var newShape = new Shape();' Line Number: 66
===================================================================
--- original.js
+++ change.js
@@ -31,19 +31,19 @@
self.score += 1;
};
self.changeShape = function () {
if (self.shape === 'square') {
+ self.shape = 'triangle';
+ self.removeChild(playerGraphics);
+ playerGraphics = self.createAsset('triangleAsset', 'Player Graphics', .5, .5);
+ } else if (self.shape === 'triangle') {
self.shape = 'circle';
self.removeChild(playerGraphics);
playerGraphics = self.createAsset('circleAsset', 'Player Graphics', .5, .5);
- } else if (self.shape === 'circle') {
+ } else {
self.shape = 'square';
self.removeChild(playerGraphics);
playerGraphics = self.createAsset('squareAsset', 'Player Graphics', .5, .5);
- } else {
- self.shape = 'triangle';
- self.removeChild(playerGraphics);
- playerGraphics = self.createAsset('triangleAsset', 'Player Graphics', .5, .5);
}
};
});
var Game = Container.expand(function () {