User prompt
daire çok az aşağıya insin
User prompt
arkaplanı en arkaya atalım
User prompt
arkaplanı ekleyelim
User prompt
tebrikler yazısı yazdıktan 2 saniye sonra kaybolsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
skor her 100 arttığında tebrikler yazısı gelsin
User prompt
+1 birazdaha aşağıda yazsın
User prompt
+1 biraz daha aşağıda gelsin
User prompt
skorun biraz altında küçük bir +1 yazısı her tıklanılsığında gelsin
User prompt
skora 1 eklensin her tıklanışta
User prompt
"imlecde nereye tıklandıysa +1 yazı oraya gelsin" sil
User prompt
imlecde nereye tıklandıysa +1 yazısı oraya gelsin
User prompt
her tıklandığında +1 yazısı gelsin
User prompt
+1 yzısı dairenin içinde nereye tıklandıysa orada görünsünü sil
User prompt
+1 yazısı dairenin içinde nereye tıklandıysa orada gözüksün
User prompt
+1 yazısı dairenin içinde görülsün
User prompt
her tıklamada küçük +1 yazsın
User prompt
her tıklamada T sesi çıksın
User prompt
her daireye tıklandığında t sesi gelsin
Initial prompt
click
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> //<Write entity 'classes' with empty functions for important behavior here> var ClickableCircle = Container.expand(function () { var self = Container.call(this); var circleGraphics = self.attachAsset('circle', { anchorX: 0.5, anchorY: 0.5 }); self.down = function (x, y, obj) { // Increase score on click LK.setScore(LK.getScore() + 1); // Update score text scoreTxt.setText(LK.getScore()); // Play sound 't' on click LK.getSound('t').play(); var scoreText = game.addChild(new ScoreText()); scoreText.x = 2048 / 2; scoreText.y = scoreTxt.y + scoreTxt.height + 100; scoreText.alpha = 1; // Check if score is a multiple of 100 if (LK.getScore() % 100 === 0) { var congratsText = new Text2('Congratulations!', { size: 200, fill: 0xFFFFFF }); congratsText.anchor.set(0.5, 0); congratsText.x = 2048 / 2; congratsText.y = 2732 / 2; game.addChild(congratsText); // Add a tween to fade out the 'Congratulations!' text after 2 seconds tween(congratsText, { alpha: 0 }, { duration: 2000 }); } }; }); var ScoreText = Text2.expand(function () { var self = Text2.call(this, '+1', { size: 100, fill: 0xFFFFFF }); self.anchor.set(0.5, 0); self.alpha = 0; self.update = function () { if (self.alpha > 0) { self.alpha -= 0.01; self.y -= 1; } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ //<Write game logic code here, including initializing arrays and variables> var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var circle = game.addChild(new ClickableCircle()); circle.x = 2048 / 2; circle.y = 2732 / 2 + 50; // Add the background image to the game var background = game.addChildAt(LK.getAsset('arkaplan', { anchorX: 0.5, anchorY: 0.5 }), 0); background.x = 2048 / 2; background.y = 2732 / 2; game.update = function () { // Game logic updates };
===================================================================
--- original.js
+++ change.js
@@ -78,9 +78,9 @@
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var circle = game.addChild(new ClickableCircle());
circle.x = 2048 / 2;
-circle.y = 2732 / 2;
+circle.y = 2732 / 2 + 50;
// Add the background image to the game
var background = game.addChildAt(LK.getAsset('arkaplan', {
anchorX: 0.5,
anchorY: 0.5