User prompt
Top asset ekle
User prompt
3 adet top assetinden oluşan can barını sağ üst köşeye ekle.
User prompt
Add collect sound assrt
User prompt
Add collect sound.
User prompt
Oyunu kaybedince bir ses çalsın.
User prompt
Kaybedince Veli Veli diye bir ses çaktı.
User prompt
Kaybedince araya Vili Vili diye bir ses girsin.
User prompt
Orta mot sıfır nokta yetmiş ekşi olsun.
User prompt
Zor modda, zor modda biraz daha az gelsin.
User prompt
Zor modu 0.85x yap
User prompt
Ormodu 0.85x yap.
User prompt
modus 0.90'a düşük
User prompt
Skor üç yüz yerine beş yüzle bitsin.
User prompt
Arka mod 0.5x Orta mod 0.75x Zor mod 1x olsun
User prompt
Kolay mod 0.10x, orta mod 0.50x, zor mod 0.85x
User prompt
Kolay mod 0.5x Orta mod 0.76x Zor mod 0.95x
User prompt
Kolay mod 0.5x, orta mod 0.80x, zor mod 0.1.5x
User prompt
kolay mod 0.5x orta mod 1x zor mod 2x olsun
User prompt
0.5x orta mod 0.75x zor mod 1x olsun
User prompt
ilk mod seçiminde menü yaz başka birşey yazma ve mod seçiminden sonra bu menü yazısını kaldır
User prompt
Kolay, zor ve orta moddan sonra başlamak için dokunun diye bir yazı olsun bekletsin.
User prompt
Kolay mod 0.5x Orta mod 1x Zor mod 3x olsun
User prompt
Kolay, Normal ve Zor modları Kolay Mod 1x, Orta Mod 3x, Zor Mod 5x şeklinde hızlandır.
User prompt
Meme yakalama Başlamak için dokun yazısına dokunduğumda yazı ortadan kalksın ve oyun başlasın.
User prompt
Meme yakalama Başlamak için ekrana dokun yazısına dokunduğumda ortadan kalsın ve oyunu başlatsın.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Müzik parçası (düşen kutu) sınıfı var MusicNote = Container.expand(function (assetType) { var self = Container.call(this); // Asseti ekle ve ortala, parametreye göre asset seç var note = self.attachAsset(assetType || 'musicNote', { anchorX: 0.5, anchorY: 0.5 }); // Hız (zorluk moduna göre ayarlanır) self.speed = typeof noteSpeed !== 'undefined' ? noteSpeed : 18; // Tıklanıp tıklanmadığını takip et self.collected = false; // Her frame çağrılır self.update = function () { self.y += self.speed; }; // Tıklama/dokunma olayı self.down = function (x, y, obj) { // Sadece ilk tıklamada çalışsın if (self.collected) return; self.collected = true; // Skoru artır LK.setScore(LK.getScore() + 10); scoreTxt.setText(LK.getScore()); // 300 puana ulaşıldıysa oyunu kazan if (LK.getScore() >= 300) { LK.showYouWin(); } // Kısa bir animasyonla kaybolsun tween(self, { alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); // Diziden silinecek, ana döngüde } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x181818 }); /**** * Game Code ****/ // Arka planı ekle var background = LK.getAsset('background', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 1, scaleY: 1 }); game.addChild(background); // Başlangıç mesajı // Oyun alanında başka bir şey yok, sadece notalar ve skor var.; var startMsg = new Text2('Meme Yakalama\nBaşlamak için ekrana dokun!', { size: 120, fill: 0xFFD700, align: 'center' }); startMsg.anchor.set(0.5, 0.5); startMsg.x = 2048 / 2; startMsg.y = 2732 / 2; game.addChild(startMsg); // Oyun başlatılana kadar notalar gelmesin, skor sıfırlanmasın var gameStarted = false; // Zorluk modları: kolay, normal, zor var difficulty = null; var noteSpeed = 18; // default // minInterval ve maxInterval zorluk seçimine göre ayarlanacak // Zorluk seçimi için mesajlar var easyBtn = new Text2('Kolay', { size: 100, fill: 0x00FF00, align: 'center' }); easyBtn.anchor.set(0.5, 0.5); easyBtn.x = 2048 / 2 - 350; easyBtn.y = 2732 / 2 + 250; var normalBtn = new Text2('Normal', { size: 100, fill: 0xFFFF00, align: 'center' }); normalBtn.anchor.set(0.5, 0.5); normalBtn.x = 2048 / 2; normalBtn.y = 2732 / 2 + 250; var hardBtn = new Text2('Zor', { size: 100, fill: 0xFF0000, align: 'center' }); hardBtn.anchor.set(0.5, 0.5); hardBtn.x = 2048 / 2 + 350; hardBtn.y = 2732 / 2 + 250; game.addChild(easyBtn); game.addChild(normalBtn); game.addChild(hardBtn); // Zorluk seçimi fonksiyonu function selectDifficulty(mode) { if (gameStarted) return; difficulty = mode; // Hız ve interval ayarları if (mode === 'easy') { noteSpeed = 18 * 1; minInterval = 500; maxInterval = 1200; } else if (mode === 'normal') { noteSpeed = 18 * 3; minInterval = 250; maxInterval = 600; } else if (mode === 'hard') { noteSpeed = 18 * 5; minInterval = 120; maxInterval = 300; } // Butonları kaldır if (easyBtn.parent) easyBtn.parent.removeChild(easyBtn); if (normalBtn.parent) normalBtn.parent.removeChild(normalBtn); if (hardBtn.parent) hardBtn.parent.removeChild(hardBtn); startGame(); } // Butonlara dokunma olayları easyBtn.down = function (x, y, obj) { selectDifficulty('easy'); }; normalBtn.down = function (x, y, obj) { selectDifficulty('normal'); }; hardBtn.down = function (x, y, obj) { selectDifficulty('hard'); }; // Not ve zamanlayıcıyı başlatan fonksiyon function startGame() { if (gameStarted) return; gameStarted = true; if (startMsg && startMsg.parent) startMsg.parent.removeChild(startMsg); LK.setScore(0); scoreTxt.setText('0'); missedNotes = 0; // Güzel bir müzik başlat LK.playMusic('musicId', { fade: { start: 0, end: 1, duration: 1000 } }); scheduleNextNote(); } // Ekrana ilk dokunuşta oyunu başlat game.down = function (x, y, obj) { // Artık ilk dokunuşta oyun başlamıyor, zorluk seçimiyle başlıyor }; // Not spawn ve zamanlayıcıyı başlatmayı engelle // scheduleNextNote(); // Müzik parçası için renkli bir kutu şeklinde asset // Animasyonlar için tween eklentisi // Skor başlığı var scoreLabel = new Text2('Skor', { size: 70, fill: 0xFFD700, align: 'center' }); scoreLabel.anchor.set(0.5, 1); LK.gui.top.addChild(scoreLabel); scoreLabel.y = 80; var scoreTxt = new Text2('0', { size: 120, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); // Skor üstte ortada, menüyle çakışmasın diye biraz aşağıda LK.gui.top.addChild(scoreTxt); scoreTxt.y = 40 + scoreLabel.height; // Düşen notaların tutulduğu dizi var notes = []; // Kaçırılan nota sayısı var missedNotes = 0; // Yeni nota oluşturma fonksiyonu function spawnNote() { // Rastgele bir nota asseti seç (dokuz seçenek) var noteTypes = ['musicNote', 'musicNote2', 'musicNote3', 'musicNote4', 'musicNote5', 'musicNote6', 'musicNote7', 'musicNote8', 'musicNote9']; var noteType = noteTypes[Math.floor(Math.random() * noteTypes.length)]; var note = new MusicNote(noteType); note.speed = typeof noteSpeed !== 'undefined' ? noteSpeed : 18; // Rastgele x (ekranın kenarına taşmasın) var margin = 180; note.x = margin + Math.random() * (2048 - 2 * margin); // Y: Menüyle çakışmasın diye -100 yerine -320'den başlat (yüksekliği kadar yukarıdan) note.y = -320; note.scaleX = 1; note.scaleY = 1; note.alpha = 1; note.collected = false; notes.push(note); game.addChild(note); } // Notaların rastgele aralıklarla gelmesi için zamanlayıcı var minInterval = 500; var maxInterval = 1200; var noteTimer = null; function scheduleNextNote() { var interval = minInterval + Math.random() * (maxInterval - minInterval); noteTimer = LK.setTimeout(function () { spawnNote(); scheduleNextNote(); }, interval); } // scheduleNextNote(); // Oyun güncelleme döngüsü game.update = function () { for (var i = notes.length - 1; i >= 0; i--) { var note = notes[i]; // Not güncelle note.update(); // Ekranın dışına çıktıysa veya toplandıysa sil if (note.y - note.height / 2 > 2732 + 50 || note.collected) { // Eğer kaçırıldıysa ve toplanmadıysa, kaçırılanları say if (!note.collected && note.y - note.height / 2 > 2732 + 50) { missedNotes++; // 3 nota kaçırılırsa oyunu bitir if (missedNotes >= 3) { LK.showGameOver(); return; } } note.destroy(); notes.splice(i, 1); } } }; // Oyun sıfırlanırken zamanlayıcıyı temizle game.destroy = function () { if (noteTimer) LK.clearTimeout(noteTimer); // Müziği durdur LK.stopMusic(); }; // Oyun başladığında ilk skor sıfırlansın // LK.setScore(0); // scoreTxt.setText('0'); // Oyun alanında başka bir şey yok, sadece notalar ve skor var.
===================================================================
--- original.js
+++ change.js
@@ -13,10 +13,10 @@
var note = self.attachAsset(assetType || 'musicNote', {
anchorX: 0.5,
anchorY: 0.5
});
- // Hız (modlara göre ayarlanacak, default 18)
- self.speed = MusicNote.prototype._speed !== undefined ? MusicNote.prototype._speed : 18;
+ // Hız (zorluk moduna göre ayarlanır)
+ self.speed = typeof noteSpeed !== 'undefined' ? noteSpeed : 18;
// Tıklanıp tıklanmadığını takip et
self.collected = false;
// Her frame çağrılır
self.update = function () {
@@ -70,118 +70,95 @@
scaleX: 1,
scaleY: 1
});
game.addChild(background);
-// Mod seçimi için UI
-var modeSelected = false;
-var gameMode = "normal"; // default
-var gameStarted = false;
-var modeTitle = new Text2('Zorluk Seç!', {
+// Başlangıç mesajı
+// Oyun alanında başka bir şey yok, sadece notalar ve skor var.;
+var startMsg = new Text2('Meme Yakalama\nBaşlamak için ekrana dokun!', {
size: 120,
fill: 0xFFD700,
align: 'center'
});
-modeTitle.anchor.set(0.5, 0.5);
-modeTitle.x = 2048 / 2;
-modeTitle.y = 700;
-game.addChild(modeTitle);
+startMsg.anchor.set(0.5, 0.5);
+startMsg.x = 2048 / 2;
+startMsg.y = 2732 / 2;
+game.addChild(startMsg);
+// Oyun başlatılana kadar notalar gelmesin, skor sıfırlanmasın
+var gameStarted = false;
+// Zorluk modları: kolay, normal, zor
+var difficulty = null;
+var noteSpeed = 18; // default
+// minInterval ve maxInterval zorluk seçimine göre ayarlanacak
+// Zorluk seçimi için mesajlar
var easyBtn = new Text2('Kolay', {
size: 100,
fill: 0x00FF00,
align: 'center'
});
easyBtn.anchor.set(0.5, 0.5);
-easyBtn.x = 2048 / 2;
-easyBtn.y = 1100;
-game.addChild(easyBtn);
+easyBtn.x = 2048 / 2 - 350;
+easyBtn.y = 2732 / 2 + 250;
var normalBtn = new Text2('Normal', {
size: 100,
- fill: 0xFFD700,
+ fill: 0xFFFF00,
align: 'center'
});
normalBtn.anchor.set(0.5, 0.5);
normalBtn.x = 2048 / 2;
-normalBtn.y = 1400;
-game.addChild(normalBtn);
+normalBtn.y = 2732 / 2 + 250;
var hardBtn = new Text2('Zor', {
size: 100,
fill: 0xFF0000,
align: 'center'
});
hardBtn.anchor.set(0.5, 0.5);
-hardBtn.x = 2048 / 2;
-hardBtn.y = 1700;
+hardBtn.x = 2048 / 2 + 350;
+hardBtn.y = 2732 / 2 + 250;
+game.addChild(easyBtn);
+game.addChild(normalBtn);
game.addChild(hardBtn);
-// Mod seçimi için tıklama olayları
+// Zorluk seçimi fonksiyonu
+function selectDifficulty(mode) {
+ if (gameStarted) return;
+ difficulty = mode;
+ // Hız ve interval ayarları
+ if (mode === 'easy') {
+ noteSpeed = 18 * 1;
+ minInterval = 500;
+ maxInterval = 1200;
+ } else if (mode === 'normal') {
+ noteSpeed = 18 * 3;
+ minInterval = 250;
+ maxInterval = 600;
+ } else if (mode === 'hard') {
+ noteSpeed = 18 * 5;
+ minInterval = 120;
+ maxInterval = 300;
+ }
+ // Butonları kaldır
+ if (easyBtn.parent) easyBtn.parent.removeChild(easyBtn);
+ if (normalBtn.parent) normalBtn.parent.removeChild(normalBtn);
+ if (hardBtn.parent) hardBtn.parent.removeChild(hardBtn);
+ startGame();
+}
+// Butonlara dokunma olayları
easyBtn.down = function (x, y, obj) {
- if (modeSelected) return;
- modeSelected = true;
- gameMode = "easy";
- removeModeUI();
- showStartMsg();
+ selectDifficulty('easy');
};
normalBtn.down = function (x, y, obj) {
- if (modeSelected) return;
- modeSelected = true;
- gameMode = "normal";
- removeModeUI();
- showStartMsg();
+ selectDifficulty('normal');
};
hardBtn.down = function (x, y, obj) {
- if (modeSelected) return;
- modeSelected = true;
- gameMode = "hard";
- removeModeUI();
- showStartMsg();
+ selectDifficulty('hard');
};
-function removeModeUI() {
- if (modeTitle && modeTitle.parent) modeTitle.parent.removeChild(modeTitle);
- if (easyBtn && easyBtn.parent) easyBtn.parent.removeChild(easyBtn);
- if (normalBtn && normalBtn.parent) normalBtn.parent.removeChild(normalBtn);
- if (hardBtn && hardBtn.parent) hardBtn.parent.removeChild(hardBtn);
-}
-// Başlangıç mesajı
-var startMsg = null;
-function showStartMsg() {
- startMsg = new Text2('Meme Yakalama\nBaşlamak için ekrana dokun!', {
- size: 120,
- fill: 0xFFD700,
- align: 'center'
- });
- startMsg.anchor.set(0.5, 0.5);
- startMsg.x = 2048 / 2;
- startMsg.y = 2732 / 2;
- game.addChild(startMsg);
- // Ekrana dokununca yazı kaybolsun ve oyun başlasın
- startMsg.down = function (x, y, obj) {
- if (!gameStarted) {
- if (startMsg && startMsg.parent) startMsg.parent.removeChild(startMsg);
- startGame();
- }
- };
-}
// Not ve zamanlayıcıyı başlatan fonksiyon
function startGame() {
if (gameStarted) return;
gameStarted = true;
if (startMsg && startMsg.parent) startMsg.parent.removeChild(startMsg);
LK.setScore(0);
scoreTxt.setText('0');
missedNotes = 0;
- // Modlara göre hız ve interval ayarla
- if (gameMode === "easy") {
- MusicNote.prototype._speed = 8;
- minInterval = 900;
- maxInterval = 1700;
- } else if (gameMode === "normal") {
- MusicNote.prototype._speed = 14;
- minInterval = 600;
- maxInterval = 1300;
- } else if (gameMode === "hard") {
- MusicNote.prototype._speed = 24;
- minInterval = 350;
- maxInterval = 800;
- }
// Güzel bir müzik başlat
LK.playMusic('musicId', {
fade: {
start: 0,
@@ -192,12 +169,9 @@
scheduleNextNote();
}
// Ekrana ilk dokunuşta oyunu başlat
game.down = function (x, y, obj) {
- if (!gameStarted) {
- startGame();
- return;
- }
+ // Artık ilk dokunuşta oyun başlamıyor, zorluk seçimiyle başlıyor
};
// Not spawn ve zamanlayıcıyı başlatmayı engelle
// scheduleNextNote();
// Müzik parçası için renkli bir kutu şeklinde asset
@@ -228,8 +202,9 @@
// Rastgele bir nota asseti seç (dokuz seçenek)
var noteTypes = ['musicNote', 'musicNote2', 'musicNote3', 'musicNote4', 'musicNote5', 'musicNote6', 'musicNote7', 'musicNote8', 'musicNote9'];
var noteType = noteTypes[Math.floor(Math.random() * noteTypes.length)];
var note = new MusicNote(noteType);
+ note.speed = typeof noteSpeed !== 'undefined' ? noteSpeed : 18;
// Rastgele x (ekranın kenarına taşmasın)
var margin = 180;
note.x = margin + Math.random() * (2048 - 2 * margin);
// Y: Menüyle çakışmasın diye -100 yerine -320'den başlat (yüksekliği kadar yukarıdan)
Arkaplanı kaldır
arkaplan temizle
arkaplan temizle
meme silah uzatan kedi. In-Game asset. 2d. High contrast. No shadows
regular show modecaı. In-Game asset. 2d. High contrast. No shadows
kaka yüzü. In-Game asset. 2d. High contrast. No shadows
kalp. In-Game asset. 2d. High contrast. No shadows
meme chill guy face. In-Game asset. 2d. High contrast. No shadows
minecraft chiken jokey. In-Game asset. 2d. High contrast. No shadows
halay çeken insan. In-Game asset. 2d. High contrast. No shadows