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);
// Menü başlığı (ilk ekranda sadece bu görünsün)
var startMsg = new Text2('Menü', {
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;
var startAfterDiffMsg = undefined;
// 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 * 0.5;
minInterval = 500;
maxInterval = 1200;
} else if (mode === 'normal') {
noteSpeed = 18 * 0.76;
minInterval = 250;
maxInterval = 600;
} else if (mode === 'hard') {
noteSpeed = 18 * 0.95;
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);
// Menü başlığını kaldır
if (startMsg && startMsg.parent) startMsg.parent.removeChild(startMsg);
// Yeni: Başlamak için dokunun mesajı göster ve oyunu başlatmak için dokunuş bekle
if (typeof startAfterDiffMsg !== "undefined" && startAfterDiffMsg.parent) {
startAfterDiffMsg.parent.removeChild(startAfterDiffMsg);
}
startAfterDiffMsg = new Text2('Başlamak için dokunun', {
size: 120,
fill: 0xFFD700,
align: 'center'
});
startAfterDiffMsg.anchor.set(0.5, 0.5);
startAfterDiffMsg.x = 2048 / 2;
startAfterDiffMsg.y = 2732 / 2;
game.addChild(startAfterDiffMsg);
// Geçici olarak dokunma handlerı ekle
game.down = function (x, y, obj) {
if (startAfterDiffMsg && startAfterDiffMsg.parent) {
startAfterDiffMsg.parent.removeChild(startAfterDiffMsg);
}
// Oyun başlatılsın
startGame();
// Oyun başladıktan sonra dokunma handlerını kaldır
game.down = function (x, y, obj) {};
};
}
// 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;
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
@@ -125,13 +125,13 @@
noteSpeed = 18 * 0.5;
minInterval = 500;
maxInterval = 1200;
} else if (mode === 'normal') {
- noteSpeed = 18 * 0.8;
+ noteSpeed = 18 * 0.76;
minInterval = 250;
maxInterval = 600;
} else if (mode === 'hard') {
- noteSpeed = 18 * 1.5;
+ noteSpeed = 18 * 0.95;
minInterval = 120;
maxInterval = 300;
}
// Butonları kaldır
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