Code edit (1 edits merged)
Please save this source code
User prompt
In the top right corner of the screen it should say little orange “Glaud”.
User prompt
x ekseninde de
User prompt
baya rttır y ekseninde arayı
User prompt
x ekeseninde arayı dah dahad açok arttuır
User prompt
tüm boruların arsını x ekseninde arttır
User prompt
ama kuşun geçebileceği kadar iki boru arasında başluk olmalı y ekseninde
User prompt
bak mantıklı ola zemin üstünde kalan alanda kuşun rahtlıkla geçebileceği boşluklar olmalı
User prompt
pipe ile zemin şimdi pipeler zemin üstünden geçerek duruyor amaç zeminin bulunduğu katmanı ön plana çıkarmak
User prompt
zemin pipe nin üstünde olsun
User prompt
zemin daha üstte olsun
User prompt
doğru ayarlamanlazım 2500 altını ekranda yok y ekseninde bunu unutma boşluklar 2500 üstünde olmalı
User prompt
y ekseninde iki boru arasını daha da aç
User prompt
dahada yükseğe çıksın kuş tıklayınca
User prompt
tıklayınca kuş daha yükseğe uçsun
User prompt
tıklayınca kuş daha yükseğe uçsun
User prompt
x ekseninde iki boru arsında 5000 pikcel olmalı
User prompt
her yeni oluşacak boru arasında 1000 pikcel olmalı x ekseninde
User prompt
ekran hareket ediyor onlar ekranın yeni gelen yerinde olmalı yani sol tarfta oluşmalılar sonra ekran onları görmeli
User prompt
pipeler sayaçtan sonra oluşmalı yani sayacın x konumundan sonra olmalılar
User prompt
bak arlarda korşılıklı borular olmalı ve borular arasından kuş geçmeli hareket ederken
User prompt
pipe nin y kordinatı 0 olsun
User prompt
y 50 oolsun pipe
User prompt
y 100 olsun
User prompt
y 500 olsun
/**** * Classes ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Bird class to handle the bird's behavior var Bird = Container.expand(function () { var self = Container.call(this); var birdGraphics = self.attachAsset('bird', { anchorX: 0.5, anchorY: 0.5 }); self.velocity = 0; self.gravity = 0.5; self.lift = -10; self.update = function () { self.velocity += self.gravity; self.y += self.velocity; // Prevent bird from going off the top of the screen if (self.y < 0) { self.y = 0; self.velocity = 0; } }; self.flap = function () { self.velocity = self.lift; }; }); // Pipe class to handle the pipe's behavior var Pipe = Container.expand(function () { var self = Container.call(this); var pipeGraphics = self.attachAsset('pipe', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { self.x -= 2; }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB, // Sky blue background width: 4096, height: 5464 }); /**** * Game Code ****/ var ground = game.addChild(LK.getAsset('ground', { anchorX: 0.5, anchorY: 0.5, x: 2048, y: 2500 })); // Initialize game variables var bird; var pipes = []; var pipeSpacing = 600; var pipeGap = 400; var score = 0; var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); // Add a pipe at position (0,0) var pipe = game.addChild(new Pipe()); pipe.x = 1000; pipe.y = 0; pipes.push(pipe); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Create a start screen var startScreen = new Container(); var startText = new Text2('Tap to start', { size: 150, fill: 0xFFFFFF }); startText.anchor.set(0.5, 0.5); startText.x = 2048 / 2; startText.y = 2732 / 2; startScreen.addChild(startText); game.addChild(startScreen); // Handle screen tap to start the game startScreen.down = function (x, y, obj) { if (!bird) { bird = game.addChild(new Bird()); bird.x = 2048 / 4; bird.y = 2732 / 2; game.removeChild(startScreen); } }; // Handle screen tap to make the bird flap game.down = function (x, y, obj) { if (bird) { bird.flap(); bird.y -= 300; // Make the bird fly even higher when clicked } }; // Update game logic game.update = function () { if (typeof document !== 'undefined' && document.hidden) { return; } if (bird) { bird.update(); } // Add new pipes periodically if (LK.ticks % 120 == 0) { var pipeTop = game.addChild(new Pipe()); pipeTop.x = 2048; // position pipe on the left side of the screen pipeTop.y = Math.random() * (2732 - pipeGap); pipes.push(pipeTop); var pipeBottom = game.addChild(new Pipe()); pipeBottom.x = 2048; // position pipe on the left side of the screen pipeBottom.y = pipeTop.y + pipeTop.height + pipeGap + 2500; // Increase the gap between pipes on the y-axis pipes.push(pipeBottom); } for (var i = 0; i < pipes.length; i++) { pipes[i].update(); if (bird && (bird.intersects(ground) || bird.intersects(pipes[i]))) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } // Remove pipe if it's off the screen if (pipes[i].x < -pipes[i].width) { game.removeChild(pipes[i]); pipes.splice(i, 1); i--; } } };
===================================================================
--- original.js
+++ change.js