User prompt
remove glow graphics from candy
User prompt
Add glow effect on candy without filters
User prompt
make candy glowing without filters
User prompt
remove glowing from candy
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'self.glow = new filters.GlowFilter();' Line Number: 74
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'self.glow = new filters.GlowFilter();' Line Number: 74
User prompt
make candy glowing
User prompt
make all buttons bigger
User prompt
Create two buttons at the bottom of screen. The first one is "Automation" and the second one is "Evolution"
User prompt
Rename Upgrade to "Basic Upgrade"
User prompt
create a function to format numbers into shorter version with suffix, so 1350 will convert to 1.35K, 18923700 will convert to 1,89M
User prompt
subtract half of candy size from position when create popUpNumber
User prompt
set anchor of incometext to 0.5 0.5
User prompt
offset incomeText in popupnumber so it center at the top left
User prompt
anchor scoretext at top center
User prompt
make the text anchored center
User prompt
make popup text bigger to a font size 50
User prompt
remove all backgrounds
User prompt
make background 3 not moving but rotation around the screen center
User prompt
Change alpha to 0.5 for abackground layer 3
User prompt
make backgrounds twice the width of the screen
User prompt
make backgrounds the size of game screen
User prompt
create a function which updates every 1/60 seconds. Move backgrounds there
User prompt
make a parallax background with 3 elements
User prompt
make an animated background for game
===================================================================
--- original.js
+++ change.js
@@ -1,57 +1,4 @@
-var BackgroundLayer3 = Container.expand(function () {
- var self = Container.call(this);
- var backgroundGraphics = self.createAsset('background3', 'Background Graphics 3', 0, 0);
- backgroundGraphics.width = 4096;
- backgroundGraphics.height = 2732;
- backgroundGraphics.alpha = 0.5;
- self.move = function () {
- var centerX = 2048 / 2;
- var centerY = 2732 / 2;
- var radius = 1024;
- var angle = 0;
- var speed = 0.01;
- self.x = centerX + radius * Math.cos(angle);
- self.y = centerY + radius * Math.sin(angle);
- angle += speed;
- };
-});
-var BackgroundLayer2 = Container.expand(function () {
- var self = Container.call(this);
- var backgroundGraphics = self.createAsset('background2', 'Background Graphics 2', 0, 0);
- backgroundGraphics.width = 4096;
- backgroundGraphics.height = 2732;
- self.move = function () {
- backgroundGraphics.x -= 2;
- if (backgroundGraphics.x <= -2048) {
- backgroundGraphics.x = 0;
- }
- };
-});
-var BackgroundLayer1 = Container.expand(function () {
- var self = Container.call(this);
- var backgroundGraphics = self.createAsset('background1', 'Background Graphics 1', 0, 0);
- backgroundGraphics.width = 4096;
- backgroundGraphics.height = 2732;
- self.move = function () {
- backgroundGraphics.x -= 1;
- if (backgroundGraphics.x <= -2048) {
- backgroundGraphics.x = 0;
- }
- };
-});
-var AnimatedBackground = Container.expand(function () {
- var self = Container.call(this);
- var backgroundGraphics = self.createAsset('background', 'Background Graphics', 0, 0);
- backgroundGraphics.width = 4096;
- backgroundGraphics.height = 2732;
- self.move = function () {
- backgroundGraphics.x -= 1;
- if (backgroundGraphics.x <= -2048) {
- backgroundGraphics.x = 0;
- }
- };
-});
var PopUpNumber = Container.expand(function () {
var self = Container.call(this);
self.incomeText = new Text2('Income', {
size: 50,
@@ -109,11 +56,8 @@
var Game = Container.expand(function () {
var self = Container.call(this);
var score = 0;
var clickPower = 1;
- var backgroundLayer1 = self.addChild(new BackgroundLayer1());
- var backgroundLayer2 = self.addChild(new BackgroundLayer2());
- var backgroundLayer3 = self.addChild(new BackgroundLayer3());
var candy = self.addChild(new Candy());
var upgrade = self.addChild(new Upgrade());
candy.x = 2048 / 2;
candy.y = 2732 / 2;
@@ -136,13 +80,9 @@
var direction = Math.random() * Math.PI * 2;
popUpNumber.fly(direction);
popUpNumber.setText('🍬' + clickPower);
});
- LK.on('tick', function () {
- backgroundLayer1.move();
- backgroundLayer2.move();
- backgroundLayer3.move();
- });
+ LK.on('tick', function () {});
upgrade.on('down', function (obj) {
if (score >= 10) {
score -= 10;
clickPower += 1;