User prompt
Oyun Başlangıçında 2 seçenek olsun ve insanlar seçim yapa bilsinler 1 ci seçenek "Namazov Style" 2 ci secenek "Vusal istili" ama insanlar sadece 2 ci seceneyi sece bilsinler
User prompt
bitiş ekranında oyuncu 200 skoru geçemezse "Boyunu Yere Soxum" yazılsın
User prompt
eğer oyuncu 200 skoru geçemezse ekrana game over ekranı gelsin ama game over yerine Boyunu Yere Soxum Sen Uduzdun yazılsın
User prompt
eğer oyuncu 200 skoru geçerse you win ekranı gelsin
User prompt
saniye sayacı ekranın sağ üstunde olsun
User prompt
ama eğer 10 saniye içerisinde 200 skoru geçerse oyun bittiğinde ekranda "Sizde Artiq vusal istilini secdiniz" yazılsın
User prompt
eğer 10 saniye içerisinde 200 skor yapamazsa game over yazılsın
User prompt
10 saniyelik saniye sayacı olsun
User prompt
Arkaplan bütün ekranı kaplasın
User prompt
Yeni bir Arka plan asseti ekle ve bütün ekranı kaplasın
User prompt
Please fix the bug: 'game.setBackgroundImage is not a function' in or related to this line: 'game.setBackgroundImage('background');' Line Number: 67
User prompt
Arka plan oluştur
User prompt
skor arttıkça ses 21 çalsın
User prompt
eğer müşteriden başka bir yere dokunursak game over yazısı çıksın
User prompt
sadece müşterinin saçına bastığımda skor tabelasında +1 puan gelsin
User prompt
add background
User prompt
benim değiştirebileceğim yeni bir arka plan asseti ekle
User prompt
müşteriyi biraz aşağı çek
User prompt
müşteriyi biraz sola çek
User prompt
müşteri berberin solunda olsun
User prompt
müşteri berberin önünde olsun
User prompt
Please fix the bug: 'ReferenceError: clients is not defined' in or related to this line: 'for (var i = clients.length - 1; i >= 0; i--) {' Line Number: 71
User prompt
müşterinin sayını azalt
User prompt
müşterilerin sayını azalt 1 e indir
User prompt
1 tane müşteri olsun
/**** * Classes ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Class for the Barber var Barber = Container.expand(function () { var self = Container.call(this); var barberGraphics = self.attachAsset('barber', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2; // Method to handle cutting hair self.cutHair = function (client) { if (client.hairLength > 0) { client.hairLength -= 1; LK.setScore(LK.getScore() + 10); } }; }); // Class for the Client var Client = Container.expand(function () { var self = Container.call(this); var clientGraphics = self.attachAsset('client', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2 - 400; self.y = 2732 / 2 + 100; self.hairLength = 5; // Initial hair length // Method to check if the client is satisfied self.isSatisfied = function () { return self.hairLength === 0; }; self.down = function (x, y, obj) { if (self.hairLength > 0) { self.hairLength -= 1; LK.setScore(LK.getScore() + 1); LK.getSound('21').play(); } }; }); // Class for the Game Options var GameOptions = Container.expand(function () { var self = Container.call(this); self.option1 = "Namazov Style"; self.option2 = "Vusal istili"; self.selectedOption = null; // Method to select an option self.selectOption = function (option) { if (option === self.option2) { self.selectedOption = option; } else { console.log("You can only select the second option!"); } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundImage: 'background' }); /**** * Game Code ****/ // Add new background asset // Add the background to the game var background = game.addChild(LK.getAsset('background', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0, width: 2048, height: 2732 })); // Initialize game options and select the second option var gameOptions = new GameOptions(); gameOptions.selectOption(gameOptions.option2); // Initialize barber var barber = game.addChild(new Barber()); // Initialize clients array and add a client var clients = []; clients.push(game.addChild(new Client())); // Score display var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); scoreTxt.anchor.set(1, 0); LK.gui.topRight.addChild(scoreTxt); // Handle game updates game.update = function () { // Check for satisfied clients for (var i = clients.length - 1; i >= 0; i--) { if (clients[i].isSatisfied()) { clients[i].destroy(); clients.splice(i, 1); // Add a new client clients.push(game.addChild(new Client())); } } // Update score display scoreTxt.setText(LK.getScore()); }; // Handle touch events game.down = function (x, y, obj) { var touchedClient = false; for (var i = 0; i < clients.length; i++) { if (barber.intersects(clients[i])) { barber.cutHair(clients[i]); touchedClient = true; } } if (!touchedClient) { LK.showGameOver(); } }; // Create a 10 second timer var timer = LK.setTimeout(function () { if (LK.getScore() < 200) { LK.showGameOver("Boyunu Yere Soxum"); } else if (LK.getScore() >= 200) { LK.showYouWin("Sizde Artiq vusal istilini secdiniz"); } }, 10000);
===================================================================
--- original.js
+++ change.js
@@ -41,8 +41,23 @@
LK.getSound('21').play();
}
};
});
+// Class for the Game Options
+var GameOptions = Container.expand(function () {
+ var self = Container.call(this);
+ self.option1 = "Namazov Style";
+ self.option2 = "Vusal istili";
+ self.selectedOption = null;
+ // Method to select an option
+ self.selectOption = function (option) {
+ if (option === self.option2) {
+ self.selectedOption = option;
+ } else {
+ console.log("You can only select the second option!");
+ }
+ };
+});
/****
* Initialize Game
****/
@@ -62,8 +77,11 @@
y: 0,
width: 2048,
height: 2732
}));
+// Initialize game options and select the second option
+var gameOptions = new GameOptions();
+gameOptions.selectOption(gameOptions.option2);
// Initialize barber
var barber = game.addChild(new Barber());
// Initialize clients array and add a client
var clients = [];
sakallı ve az bıyıklı güneş gözlüklü 26 lı yaşlarda bir beyefendi ayak üstünde dursun üzerinde önlük olsun. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
100x140 barber background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows