User prompt
dansçıları çoğalt
User prompt
2 saniye sırayla ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
daha hızlı görünsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
rakamlar ve harfler daha yavaş görünsn ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
kedi ve köepeği çıkar
User prompt
dans eden köpek ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
dans eden kedi ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
green screen içinden geçsin ve görünsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
içinden 2 saniye aralıklarla b r g ve 1 2 3 4 5 karışık geçsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
green screen resmi daha aşşağıda olsun
User prompt
green screen rengi yeşil değil beyaz olsun
User prompt
green screen rengi açık mor olsun
User prompt
daha büyük ve yukarda olsunlar
User prompt
1 2 3 yukarda 4 5 altında olsun
User prompt
daha büyük
User prompt
b r ve g butonları daha büyük olsun ve masanın azıcık daha üstünde olsun
User prompt
green screen aşşğıda olsun
User prompt
green screen görünsün
User prompt
green scren aşşağıda dursun
User prompt
2 saniye aralıkla yazsın
User prompt
bir saniye aralıkla yazsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
ekranda birinci seviyede sırasıyla R 3 G 4 4 5 B R yazsın
User prompt
boydan uzat
User prompt
dj masasını ekranın üstüne doğru getirt ve büyült
User prompt
masayı büyült
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var DJButton = Container.expand(function (buttonType, value) {
var self = Container.call(this);
var buttonGraphics;
if (buttonType === 'number') {
buttonGraphics = self.attachAsset('numberButton', {
anchorX: 0.5,
anchorY: 0.5
});
} else if (buttonType === 'blue') {
buttonGraphics = self.attachAsset('blueButton', {
anchorX: 0.5,
anchorY: 0.5
});
} else if (buttonType === 'red') {
buttonGraphics = self.attachAsset('redButton', {
anchorX: 0.5,
anchorY: 0.5
});
} else if (buttonType === 'green') {
buttonGraphics = self.attachAsset('greenButton', {
anchorX: 0.5,
anchorY: 0.5
});
}
var buttonText = new Text2(value.toString(), {
size: 40,
fill: 0xFFFFFF
});
buttonText.anchor.set(0.5, 0.5);
self.addChild(buttonText);
self.buttonType = buttonType;
self.value = value;
self.isPressed = false;
self.press = function () {
if (!self.isPressed) {
self.isPressed = true;
tween(buttonGraphics, {
scaleX: 0.9,
scaleY: 0.9
}, {
duration: 100,
onFinish: function onFinish() {
tween(buttonGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 100,
onFinish: function onFinish() {
self.isPressed = false;
}
});
}
});
}
};
self.down = function (x, y, obj) {
self.press();
game.handleButtonPress(self.buttonType, self.value);
};
return self;
});
var Dancer = Container.expand(function () {
var self = Container.call(this);
var dancerGraphics = self.attachAsset('dancer', {
anchorX: 0.5,
anchorY: 1
});
self.state = 'neutral'; // neutral, happy, angry
self.isAnimating = false;
self.setHappy = function () {
if (self.state !== 'happy') {
self.state = 'happy';
dancerGraphics.tint = 0xffaa00;
self.startDanceAnimation();
}
};
self.setAngry = function () {
if (self.state !== 'angry') {
self.state = 'angry';
dancerGraphics.tint = 0x990000;
self.stopDanceAnimation();
}
};
self.setNeutral = function () {
self.state = 'neutral';
dancerGraphics.tint = 0xff6600;
self.stopDanceAnimation();
};
self.startDanceAnimation = function () {
if (!self.isAnimating) {
self.isAnimating = true;
self.danceLoop();
}
};
self.stopDanceAnimation = function () {
self.isAnimating = false;
tween.stop(self, {
scaleX: true,
scaleY: true,
rotation: true
});
self.scaleX = 1;
self.scaleY = 1;
self.rotation = 0;
};
self.danceLoop = function () {
if (!self.isAnimating) return;
tween(self, {
scaleX: 1.1,
scaleY: 0.9,
rotation: 0.1
}, {
duration: 300,
easing: tween.easeInOut,
onFinish: function onFinish() {
if (!self.isAnimating) return;
tween(self, {
scaleX: 0.9,
scaleY: 1.1,
rotation: -0.1
}, {
duration: 300,
easing: tween.easeInOut,
onFinish: function onFinish() {
if (!self.isAnimating) return;
tween(self, {
scaleX: 1,
scaleY: 1,
rotation: 0
}, {
duration: 200,
easing: tween.easeInOut,
onFinish: function onFinish() {
self.danceLoop();
}
});
}
});
}
});
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x220044
});
/****
* Game Code
****/
// Sounds
// Musical note decoration
// Dancers
// Buttons
// DJ Console and decorative elements
// Game variables
var dancers = [];
var djButtons = [];
var currentPrompt = null;
var promptSequence = [];
var gameSpeed = 2000; // ms between prompts
var consecutiveCorrect = 0;
var maxMistakes = 5;
var currentMistakes = 0;
var isGameActive = true;
// UI elements
var scoreText = new Text2('Score: 0', {
size: 60,
fill: 0xFFFFFF
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
var mistakesText = new Text2('Mistakes: 0/5', {
size: 40,
fill: 0xFF4444
});
mistakesText.anchor.set(1, 0);
mistakesText.x = LK.gui.topRight.x - 20;
mistakesText.y = 20;
LK.gui.topRight.addChild(mistakesText);
// Create DJ table
var djTable = game.addChild(LK.getAsset('djTable', {
anchorX: 0.5,
anchorY: 1,
x: 1024,
y: 2200
}));
// Add white stripes to DJ table
for (var i = 0; i < 4; i++) {
var stripe = djTable.addChild(LK.getAsset('whiteStripe', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: -400 + i * 120
}));
}
// Create green screen
var greenScreen = djTable.addChild(LK.getAsset('greenScreen', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 200
}));
greenScreen.tint = 0xffffff; // White color
var promptText = new Text2('', {
size: 80,
fill: 0x000000
});
promptText.anchor.set(0.5, 0.5);
promptText.alpha = 0; // Start hidden
greenScreen.addChild(promptText);
// Add decorative knobs
for (var i = 0; i < 6; i++) {
var knob = djTable.addChild(LK.getAsset('knob', {
anchorX: 0.5,
anchorY: 0.5,
x: -600 + i * 120,
y: -450
}));
}
// Add piano keys
for (var i = 0; i < 12; i++) {
var key = djTable.addChild(LK.getAsset('key', {
anchorX: 0.5,
anchorY: 0.5,
x: -300 + i * 35,
y: -150
}));
}
// Add headphones
var headphones = djTable.addChild(LK.getAsset('headphones', {
anchorX: 0.5,
anchorY: 0.5,
x: -750,
y: -350
}));
// Add musical notes decoration
for (var i = 0; i < 8; i++) {
var note = djTable.addChild(LK.getAsset('musicalNote', {
anchorX: 0.5,
anchorY: 0.5,
x: -800 + i * 80,
y: -100
}));
}
// Create numbered buttons (1-5) in two rows: 1,2,3 on top, 4,5 on bottom
for (var i = 1; i <= 5; i++) {
var numberButton = new DJButton('number', i);
if (i <= 3) {
// Top row: buttons 1, 2, 3
numberButton.x = djTable.x + 300 + (i - 1) * 120;
numberButton.y = djTable.y - 320;
} else {
// Bottom row: buttons 4, 5
numberButton.x = djTable.x + 360 + (i - 4) * 120;
numberButton.y = djTable.y - 200;
}
game.addChild(numberButton);
djButtons.push(numberButton);
}
// Create colored buttons
var colorButtons = [{
type: 'blue',
color: 'B'
}, {
type: 'red',
color: 'R'
}, {
type: 'green',
color: 'G'
}];
for (var i = 0; i < colorButtons.length; i++) {
var colorButton = new DJButton(colorButtons[i].type, colorButtons[i].color);
colorButton.x = djTable.x - 450 + i * 180;
colorButton.y = djTable.y - 220;
game.addChild(colorButton);
djButtons.push(colorButton);
}
// Create dancers
for (var i = 0; i < 15; i++) {
var dancer = new Dancer();
dancer.x = 100 + i * 130;
dancer.y = 800;
game.addChild(dancer);
dancers.push(dancer);
}
// Generate prompt from predefined sequence
var level1Sequence = ['B', 'R', 'G', '1', '2', '3', '4', '5'];
var sequenceIndex = 0;
function generatePrompt() {
// Shuffle and pick random element from sequence
var shuffledSequence = level1Sequence.slice();
for (var i = shuffledSequence.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = shuffledSequence[i];
shuffledSequence[i] = shuffledSequence[j];
shuffledSequence[j] = temp;
}
return shuffledSequence[0];
}
// Show new prompt
function showPrompt() {
if (!isGameActive) return;
currentPrompt = generatePrompt();
promptText.setText(currentPrompt);
// Make prompt text visible and animate it sliding through the screen
promptText.alpha = 1;
promptText.x = -greenScreen.width / 2 - 100; // Start from left side outside screen
promptText.y = 0; // Center vertically
// Animate text sliding from left to right through the green screen
tween(promptText, {
x: greenScreen.width / 2 + 100 // End at right side outside screen
}, {
duration: 1000,
easing: tween.linear,
onFinish: function onFinish() {
// After animation, reset position and hide text
promptText.x = 0;
promptText.alpha = 0;
}
});
// Flash screen effect
tween(greenScreen, {
tint: 0xffffff
}, {
duration: 100,
onFinish: function onFinish() {
tween(greenScreen, {
tint: 0xffffff
}, {
duration: 100,
onFinish: function onFinish() {
greenScreen.tint = 0xffffff;
}
});
}
});
}
// Handle button press
game.handleButtonPress = function (buttonType, value) {
if (!isGameActive || !currentPrompt) return;
var isCorrect = false;
if (buttonType === 'number' && currentPrompt === value.toString()) {
isCorrect = true;
} else if (buttonType === 'blue' && currentPrompt === 'B') {
isCorrect = true;
} else if (buttonType === 'red' && currentPrompt === 'R') {
isCorrect = true;
} else if (buttonType === 'green' && currentPrompt === 'G') {
isCorrect = true;
}
if (isCorrect) {
LK.getSound('correctSound').play();
LK.setScore(LK.getScore() + 10);
consecutiveCorrect++;
// Make dancers happy
for (var i = 0; i < dancers.length; i++) {
dancers[i].setHappy();
}
// Increase speed every 5 correct answers
if (consecutiveCorrect % 5 === 0) {
gameSpeed = Math.max(800, gameSpeed - 200);
}
} else {
LK.getSound('wrongSound').play();
currentMistakes++;
consecutiveCorrect = 0;
// Make dancers angry
for (var i = 0; i < dancers.length; i++) {
dancers[i].setAngry();
}
// Check game over
if (currentMistakes >= maxMistakes) {
isGameActive = false;
LK.showGameOver();
return;
}
}
// Update UI
scoreText.setText('Score: ' + LK.getScore());
mistakesText.setText('Mistakes: ' + currentMistakes + '/' + maxMistakes);
// Clear current prompt
currentPrompt = null;
promptText.setText('');
// Reset dancers to neutral after a delay
LK.setTimeout(function () {
if (isGameActive) {
for (var i = 0; i < dancers.length; i++) {
dancers[i].setNeutral();
}
}
}, 1000);
};
// Game timer for prompts
var promptTimer = LK.setInterval(function () {
showPrompt();
}, 2000);
// Start the game
LK.playMusic('gameMusic');
LK.setTimeout(function () {
showPrompt();
}, 2000);
game.update = function () {
// Game logic handled by timers and events
}; ===================================================================
--- original.js
+++ change.js
@@ -288,11 +288,11 @@
game.addChild(colorButton);
djButtons.push(colorButton);
}
// Create dancers
-for (var i = 0; i < 7; i++) {
+for (var i = 0; i < 15; i++) {
var dancer = new Dancer();
- dancer.x = 200 + i * 240;
+ dancer.x = 100 + i * 130;
dancer.y = 800;
game.addChild(dancer);
dancers.push(dancer);
}
gri mor bir masa üzerinde tuşlar var dj stilinde. In-Game asset. 2d. High contrast. No shadows
etrafı sarı işleme çerçeveli beyaz. In-Game asset. 2d. High contrast. No shadows
dansöz kıyafetli ayakta duran elleri havada dans eden bir kedi. In-Game asset. 2d. High contrast. No shadows
bomb. In-Game asset. 2d. High contrast. No shadows