User prompt
The costumes should be on the character in the same way as they are on the selection screen, there should be no difference after the game starts
User prompt
The costumes should look like they are stuck to the character.
User prompt
Remove the selected costumes from the middle of the screen after the game starts so that they are only on the character you are playing.
User prompt
When the game starts, the selected costumes should be on the characters. Forget the previously prepared costumes. We will use these new costumes.
User prompt
costumes always move in integration with the characters (including the selection screen)
User prompt
Show the costumes we wear on the character selection screen
User prompt
Let's add it to the costume assets as in the example you said.
User prompt
a little further down
User prompt
just a little bit down
User prompt
Kostümler daha düzenli görünmeli ki hepsini ekranda görebilelim.
User prompt
Think like a jumping human head instead of a jumping bird and design your costumes accordingly.
User prompt
"Touch the screen to jump" text should not be on the selection screen, it should be there softly when the game starts after selecting the character
User prompt
have a crown instead of a hat and all costumes make the same movements as the character (including bending)
User prompt
Add a costume section so that when we click on it, we can dress the character in costumes
User prompt
Put the speed option in a small way on the top right of the screen and adjust the speed from there
User prompt
Put the speed option in a small way on the top right of the screen and adjust the speed from there, it will disappear when the game starts
User prompt
Put the speed adjustment in a small way on the top right of the screen
User prompt
The game should speed up over time and this should be a feature that can be adjusted on the selection screen.
User prompt
Make the text "Zıplamak için Ekrana Dokunn" a little smaller
User prompt
change tap to flap hold to float text to"Zıplamak için Ekrana Dokunn"
User prompt
Make that sound immediately after selecting the character
User prompt
Play sound after selecting characters on selection screen
User prompt
When you tap on the characters on the selection screen, they will grow a little bigger. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
The characters on the selection screen should move a little up and a little down slowly. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
add "starsound" sound to selection screen
/**** * Plugins ****/ var storage = LK.import("@upit/storage.v1"); var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Bird = Container.expand(function (birdType, costumeId) { var self = Container.call(this); // Default to 'bird' if not specified var assetId = birdType === 'bird2' ? 'bird2' : 'bird'; var birdGraphics = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5 }); // Costume overlay logic if (typeof costumeId !== "number") costumeId = 0; // Costume overlay logic self.costumeSprites = []; if (typeof costumeId !== "number") costumeId = 0; if (costumeId === 1) { // Taç (crown) - use three ellipses and a box to simulate a crown var crownBase = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); crownBase.width = 80; crownBase.height = 22; crownBase.y = -110; crownBase.tint = 0xf7d900; // gold self.addChild(crownBase); self.costumeSprites.push(crownBase); // Crown spikes (three ellipses) var spike1 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); spike1.width = 18; spike1.height = 38; spike1.x = -28; spike1.y = -130; spike1.tint = 0xf7d900; self.addChild(spike1); self.costumeSprites.push(spike1); var spike2 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); spike2.width = 18; spike2.height = 48; spike2.x = 0; spike2.y = -140; spike2.tint = 0xf7d900; self.addChild(spike2); self.costumeSprites.push(spike2); var spike3 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); spike3.width = 18; spike3.height = 38; spike3.x = 28; spike3.y = -130; spike3.tint = 0xf7d900; self.addChild(spike3); self.costumeSprites.push(spike3); // Crown jewels (small ellipses) var jewel1 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); jewel1.width = 10; jewel1.height = 10; jewel1.x = -28; jewel1.y = -140; jewel1.tint = 0x00bfff; // blue self.addChild(jewel1); self.costumeSprites.push(jewel1); var jewel2 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); jewel2.width = 10; jewel2.height = 10; jewel2.x = 0; jewel2.y = -152; jewel2.tint = 0xff0000; // red self.addChild(jewel2); self.costumeSprites.push(jewel2); var jewel3 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 1 }); jewel3.width = 10; jewel3.height = 10; jewel3.x = 28; jewel3.y = -140; jewel3.tint = 0x00ff00; // green self.addChild(jewel3); self.costumeSprites.push(jewel3); } if (costumeId === 2) { // Gözlük (glasses) - use two ellipses as glasses var glass1 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 0.5 }); glass1.width = 40; glass1.height = 40; glass1.x = -35; glass1.y = -10; glass1.tint = 0x222222; self.addChild(glass1); self.costumeSprites.push(glass1); var glass2 = LK.getAsset('particle', { anchorX: 0.5, anchorY: 0.5 }); glass2.width = 40; glass2.height = 40; glass2.x = 35; glass2.y = -10; glass2.tint = 0x222222; self.addChild(glass2); self.costumeSprites.push(glass2); } self.xSpeed = 10.9375; self.ySpeed = -20; self.gravity = 1; self.lift = -15; self.flap = function () { self.ySpeed = self.lift * 1.5; LK.getSound('flap').play(); }; self._update_migrated = function () { if (game.isMouseDown) { self.ySpeed += self.gravity / 3; } else { self.ySpeed += self.gravity; } self.y += self.ySpeed; self.x += self.xSpeed; if (self.y <= 0 || self.y >= 2732) { self.speed = -self.speed; } var targetRotation = Math.atan2(self.ySpeed, self.xSpeed * self.scale.x) / 2; birdGraphics.rotation += (targetRotation - birdGraphics.rotation) / 10; // Make all costume overlays follow the bird's movement, scale, and rotation if (self.costumeSprites && self.costumeSprites.length) { for (var i = 0; i < self.costumeSprites.length; i++) { var sprite = self.costumeSprites[i]; // Match scale and rotation to birdGraphics sprite.scale.x = birdGraphics.scale.x; sprite.scale.y = birdGraphics.scale.y; sprite.rotation = birdGraphics.rotation; } } }; self.flip = function () { self.scale.x *= -1; }; }); var Obstacle = Container.expand(function () { var self = Container.call(this); var obstacleShadow = self.attachAsset('obstacleShadow', { anchorX: 0.5, anchorY: 0.5 }); obstacleShadow.rotation = Math.PI / 4; var obstacleShadow2 = self.attachAsset('obstacleShadow2', { anchorX: 0.5, anchorY: 0.5 }); obstacleShadow2.rotation = Math.PI / 4; obstacleShadow2.y = -7; var obstacleGraphics = self.attachAsset('obstacle', { anchorX: 0.5, anchorY: 0.5 }); obstacleGraphics.rotation = Math.PI / 4; self.speed = 5; self._move_migrated = function (speed) { self.y += speed; }; }); var Wall = Container.expand(function () { var self = Container.call(this); var wallGraphics = self.attachAsset('wall', { anchorX: 0.5, anchorY: 0.5 }); }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var tutorialTextWhite = new Text2('Zıplamak için\nEkrana Dokunn', { size: 110, fill: '#ffb6e6', //{B} // light pink font: 'Impact', align: 'center' }); tutorialTextWhite.anchor.set(.5, 1); tutorialTextWhite.x = -4; tutorialTextWhite.y = -62; LK.gui.bottom.addChild(tutorialTextWhite); var tutorialText = new Text2('Zıplamak için\nEkrana Dokunn', { size: 110, fill: '#e75480', //{G} // vivid pink font: 'Impact', dropShadow: true, dropShadowColor: '#ffb6e6', //{J} // light pink shadow dropShadowBlur: 5, dropShadowDistance: 7, dropShadowAngle: 0, align: 'center' }); tutorialText.anchor.set(.5, 1); tutorialText.y = -50; LK.gui.bottom.addChild(tutorialText); game.score = 0; game.obstacleSpeed = 5; // Default value, will be overwritten by selection screen game.obstacleSpeedIncrease = 0.005; game.checkObstacleCollision = function (obstacles) { for (var i = 0; i < obstacles.length; i++) { obstacles[i]._move_migrated(); var dist = Math.sqrt(Math.pow(bird.x - obstacles[i].x, 2) + Math.pow(bird.y - obstacles[i].y, 2)); if (dist < 280) { LK.setScore(game.score); LK.getSound('gameOverJingle').play(); LK.effects.flashScreen(0xff0000, 600); LK.setTimeout(function () { LK.showGameOver(); }, 2700); //{W} // Set to 2.7 seconds return; } } }; game.setBackgroundColor(0xffe0f0); // very light pink background var record = typeof storage.record === 'number' ? storage.record : 0; var scoreText = new Text2('0', { size: 150, fill: '#e75480', //{V} // vivid pink font: 'Impact', dropShadow: true, dropShadowColor: '#ffb6e6', //{Y} // light pink shadow dropShadowBlur: 5, dropShadowDistance: 7, dropShadowAngle: 0 }); scoreText.anchor.set(.5, 0); LK.gui.top.addChild(scoreText); var scoreText2 = new Text2('0', { size: 150, fill: '#ffb6e6', //{14} // light pink font: 'Impact' }); scoreText2.anchor.set(.5, 0); scoreText2.x = -4; scoreText2.y = -5; LK.gui.top.addChild(scoreText2); // Record (high score) text var recordText = new Text2('REKOR: ' + record, { size: 80, fill: '#e75480', font: 'Impact', dropShadow: true, dropShadowColor: '#ffb6e6', dropShadowBlur: 5, dropShadowDistance: 7, dropShadowAngle: 0 }); recordText.anchor.set(0.5, 0); recordText.y = 140; LK.gui.top.addChild(recordText); LK.gui.top.addChild(scoreText); // Character select state var characterSelected = false; var selectedBirdType = null; var bird = null; // Create character select UI var selectText = new Text2('Hangimizle oynamak istersin', { size: 80, fill: '#e75480', //{17} // vivid pink font: 'Impact', align: 'center' }); selectText.anchor.set(0.5, 1); selectText.x = 0; selectText.y = -200; LK.gui.center.addChild(selectText); // --- Speed selection UI (Top Right) --- var speedOptions = [{ label: "Yavaş", value: 0.003 }, { label: "Normal", value: 0.005 }, { label: "Hızlı", value: 0.009 }]; var selectedSpeedIndex = 1; // Default to "Normal" // Small speed display at top right var speedDisplayText = new Text2('Hız: ' + speedOptions[selectedSpeedIndex].label, { size: 60, fill: '#e75480', font: 'Impact', align: 'center' }); speedDisplayText.anchor.set(1, 0); // Top right speedDisplayText.x = -40; // Padding from right edge speedDisplayText.y = 20; speedDisplayText.interactive = true; LK.gui.topRight.addChild(speedDisplayText); // Add left/right arrows for speed selection var speedLeftArrow = new Text2('<', { size: 60, fill: '#e75480', font: 'Impact' }); speedLeftArrow.anchor.set(1, 0); speedLeftArrow.x = -170; speedLeftArrow.y = 20; speedLeftArrow.interactive = true; LK.gui.topRight.addChild(speedLeftArrow); var speedRightArrow = new Text2('>', { size: 60, fill: '#e75480', font: 'Impact' }); speedRightArrow.anchor.set(1, 0); speedRightArrow.x = 0; speedRightArrow.y = 20; speedRightArrow.interactive = true; LK.gui.topRight.addChild(speedRightArrow); function updateSpeedDisplay() { speedDisplayText.setText('Hız: ' + speedOptions[selectedSpeedIndex].label); } // Only allow speed change before character is selected speedLeftArrow.down = function () { if (characterSelected) return; if (selectedSpeedIndex > 0) { selectedSpeedIndex--; updateSpeedDisplay(); } }; speedRightArrow.down = function () { if (characterSelected) return; if (selectedSpeedIndex < speedOptions.length - 1) { selectedSpeedIndex++; updateSpeedDisplay(); } }; speedDisplayText.down = function () { // Optional: cycle through speeds by tapping the label itself if (characterSelected) return; selectedSpeedIndex = (selectedSpeedIndex + 1) % speedOptions.length; updateSpeedDisplay(); }; // --- End speed selection UI (Top Right) --- var bird1Preview = LK.getAsset('bird', { anchorX: 0.5, anchorY: 0.5 }); bird1Preview.x = -200; bird1Preview.y = 200; bird1Preview.scaleX = 2; bird1Preview.scaleY = 2; LK.gui.center.addChild(bird1Preview); // Animate bird1Preview up and down function animateBird1PreviewDown() { tween(bird1Preview, { y: 240 }, { duration: 1200, easing: tween.sineInOut, onFinish: animateBird1PreviewUp }); } function animateBird1PreviewUp() { tween(bird1Preview, { y: 160 }, { duration: 1200, easing: tween.sineInOut, onFinish: animateBird1PreviewDown }); } animateBird1PreviewDown(); var bird2Preview = LK.getAsset('bird2', { anchorX: 0.5, anchorY: 0.5 }); bird2Preview.x = 200; bird2Preview.y = 200; bird2Preview.scaleX = 2; bird2Preview.scaleY = 2; LK.gui.center.addChild(bird2Preview); // --- Costume section button (center, below birds) --- var costumeButton = new Text2('Kostümler', { size: 80, fill: '#e75480', font: 'Impact', align: 'center' }); costumeButton.anchor.set(0.5, 0); costumeButton.x = 0; costumeButton.y = 420; costumeButton.interactive = true; LK.gui.center.addChild(costumeButton); var costumePanelOpen = false; // Animate bird2Preview up and down function animateBird2PreviewDown() { tween(bird2Preview, { y: 240 }, { duration: 1200, easing: tween.sineInOut, onFinish: animateBird2PreviewUp }); } function animateBird2PreviewUp() { tween(bird2Preview, { y: 160 }, { duration: 1200, easing: tween.sineInOut, onFinish: animateBird2PreviewDown }); } animateBird2PreviewUp(); // Add touch/click handlers for selection bird1Preview.interactive = true; bird2Preview.interactive = true; // Costume selection state var selectedCostume = 0; var costumePanel = null; var costumeOptions = [{ name: "Klasik", id: 0 }, { name: "Şapka", id: 1 }, { name: "Gözlük", id: 2 }]; // Costume panel UI function showCostumePanel() { if (costumePanelOpen) return; costumePanelOpen = true; costumePanel = new Container(); // Panel background var panelBg = LK.getAsset('obstacleShadow2', { anchorX: 0.5, anchorY: 0.5 }); panelBg.width = 700; panelBg.height = 350; panelBg.x = 0; panelBg.y = 600; costumePanel.addChild(panelBg); // Costume option buttons var optionSpacing = 220; for (var i = 0; i < costumeOptions.length; i++) { (function (idx) { var opt = costumeOptions[idx]; var btn = new Text2(opt.name, { size: 70, fill: selectedCostume === opt.id ? '#e75480' : '#ffb6e6', font: 'Impact', align: 'center' }); btn.anchor.set(0.5, 0.5); btn.x = (idx - 1) * optionSpacing; btn.y = 600; btn.interactive = true; btn.down = function () { selectedCostume = opt.id; // Refresh panel to show selection LK.gui.center.removeChild(costumePanel); costumePanelOpen = false; showCostumePanel(); }; costumePanel.addChild(btn); })(i); } // Close button var closeBtn = new Text2('Kapat', { size: 60, fill: '#e75480', font: 'Impact' }); closeBtn.anchor.set(0.5, 0.5); closeBtn.x = 0; closeBtn.y = 800; closeBtn.interactive = true; closeBtn.down = function () { LK.gui.center.removeChild(costumePanel); costumePanelOpen = false; }; costumePanel.addChild(closeBtn); LK.gui.center.addChild(costumePanel); } // Costume button handler costumeButton.down = function () { if (!costumePanelOpen) { showCostumePanel(); } }; bird1Preview.down = function (x, y, obj) { if (!characterSelected) { // Play a sound immediately after selecting a character LK.getSound('startsound').play(); // Animate scale up, then back to normal tween(bird1Preview, { scaleX: 2.4, scaleY: 2.4 }, { duration: 120, easing: tween.sineInOut, onFinish: function onFinish() { tween(bird1Preview, { scaleX: 2, scaleY: 2 }, { duration: 120, easing: tween.sineInOut, onFinish: function onFinish() { selectedBirdType = 'bird'; startGameWithSelectedBird(); } }); } }); } }; bird2Preview.down = function (x, y, obj) { if (!characterSelected) { // Play a sound immediately after selecting a character LK.getSound('startsound').play(); // Animate scale up, then back to normal tween(bird2Preview, { scaleX: 2.4, scaleY: 2.4 }, { duration: 120, easing: tween.sineInOut, onFinish: function onFinish() { tween(bird2Preview, { scaleX: 2, scaleY: 2 }, { duration: 120, easing: tween.sineInOut, onFinish: function onFinish() { selectedBirdType = 'bird2'; startGameWithSelectedBird(); } }); } }); } }; function startGameWithSelectedBird() { characterSelected = true; // Remove selection UI LK.gui.center.removeChild(selectText); LK.gui.center.removeChild(bird1Preview); LK.gui.center.removeChild(bird2Preview); if (costumeButton && LK.gui.center.children.indexOf(costumeButton) !== -1) { LK.gui.center.removeChild(costumeButton); } if (costumePanel && LK.gui.center.children.indexOf(costumePanel) !== -1) { LK.gui.center.removeChild(costumePanel); } // Remove speed selection UI (top right) LK.gui.topRight.removeChild(speedDisplayText); LK.gui.topRight.removeChild(speedLeftArrow); LK.gui.topRight.removeChild(speedRightArrow); // Play a sound after selecting a character // (Moved to down handler for immediate feedback) // Add the selected bird to the game bird = game.addChild(new Bird(selectedBirdType, selectedCostume)); bird.x = 1024; bird.y = 1366; // Apply selected speed game.obstacleSpeedIncrease = speedOptions[selectedSpeedIndex].value; // Continue with the rest of the game setup leftWall = game.addChild(new Wall()); leftWall.x = 0; leftWall.y = 1366; rightWall = game.addChild(new Wall()); rightWall.x = 2048; rightWall.y = 1366; leftObstacles = []; rightObstacles = []; obstacleSpawnRandomness = 120; obstacleSpawnRandomnessDecrease = 0.025 * (2 / 3); obstacleSpawnY = -500; leftObstacleSpawnTime = Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness; rightObstacleSpawnTime = Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness; game.isMouseDown = false; } // Only allow input after character is selected game.down = function (x, y, obj) { if (characterSelected && bird) { bird.flap(); game.isMouseDown = true; } }; game.up = function (x, y, obj) { if (characterSelected) { game.isMouseDown = false; } }; game.update = function () { if (!characterSelected || !bird) { // Don't run gameplay logic until a bird is selected return; } bird._update_migrated(); if (game.score > 2) { tutorialText.y += 5; tutorialTextWhite.y += 5; } scoreText.setText(game.score); scoreText2.setText(game.score); // Update record if needed if (game.score > record) { record = game.score; storage.record = record; recordText.setText('REKOR: ' + record); } game.obstacleSpeed += game.obstacleSpeedIncrease; obstacleSpawnRandomness -= obstacleSpawnRandomnessDecrease; if (obstacleSpawnRandomness < 20) { obstacleSpawnRandomness = 20; } if (LK.ticks >= leftObstacleSpawnTime) { var newObstacle = game.addChildAt(new Obstacle(), 0); newObstacle.x = 0; newObstacle.y = obstacleSpawnY; leftObstacles.push(newObstacle); leftObstacleSpawnTime += Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness; } if (LK.ticks >= rightObstacleSpawnTime) { var newObstacle = game.addChildAt(new Obstacle(), 0); newObstacle.x = 2048; newObstacle.y = -newObstacle.height; rightObstacles.push(newObstacle); rightObstacleSpawnTime += Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness; } if (bird.intersects(leftWall) && bird.xSpeed < 0 || bird.intersects(rightWall) && bird.xSpeed > 0) { bird.xSpeed = -bird.xSpeed; bird.flip(); game.score++; LK.setScore(game.score); LK.getSound('bounce').play(); } for (var i = leftObstacles.length - 1; i >= 0; i--) { leftObstacles[i]._move_migrated(game.obstacleSpeed); if (leftObstacles[i].y > 3232) { leftObstacles[i].destroy(); leftObstacles.splice(i, 1); } } for (var i = rightObstacles.length - 1; i >= 0; i--) { rightObstacles[i]._move_migrated(game.obstacleSpeed); if (rightObstacles[i].y > 3232) { rightObstacles[i].destroy(); rightObstacles.splice(i, 1); } } game.checkObstacleCollision(leftObstacles); game.checkObstacleCollision(rightObstacles); if (bird.y < 0 || bird.y > 2732) { LK.setScore(game.score); LK.getSound('gameOverJingle').play(); LK.effects.flashScreen(0xff0000, 600); LK.setTimeout(function () { LK.showGameOver(); }, 2700); //{28} // Set to 2.7 seconds return; } };
===================================================================
--- original.js
+++ change.js
@@ -16,19 +16,91 @@
anchorY: 0.5
});
// Costume overlay logic
if (typeof costumeId !== "number") costumeId = 0;
+ // Costume overlay logic
+ self.costumeSprites = [];
+ if (typeof costumeId !== "number") costumeId = 0;
if (costumeId === 1) {
- // Şapka (hat) - use a simple ellipse as a hat
- var hat = LK.getAsset('particle', {
+ // Taç (crown) - use three ellipses and a box to simulate a crown
+ var crownBase = LK.getAsset('particle', {
anchorX: 0.5,
anchorY: 1
});
- hat.width = 80;
- hat.height = 40;
- hat.y = -110;
- hat.tint = 0x222222;
- self.addChild(hat);
+ crownBase.width = 80;
+ crownBase.height = 22;
+ crownBase.y = -110;
+ crownBase.tint = 0xf7d900; // gold
+ self.addChild(crownBase);
+ self.costumeSprites.push(crownBase);
+ // Crown spikes (three ellipses)
+ var spike1 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ spike1.width = 18;
+ spike1.height = 38;
+ spike1.x = -28;
+ spike1.y = -130;
+ spike1.tint = 0xf7d900;
+ self.addChild(spike1);
+ self.costumeSprites.push(spike1);
+ var spike2 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ spike2.width = 18;
+ spike2.height = 48;
+ spike2.x = 0;
+ spike2.y = -140;
+ spike2.tint = 0xf7d900;
+ self.addChild(spike2);
+ self.costumeSprites.push(spike2);
+ var spike3 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ spike3.width = 18;
+ spike3.height = 38;
+ spike3.x = 28;
+ spike3.y = -130;
+ spike3.tint = 0xf7d900;
+ self.addChild(spike3);
+ self.costumeSprites.push(spike3);
+ // Crown jewels (small ellipses)
+ var jewel1 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ jewel1.width = 10;
+ jewel1.height = 10;
+ jewel1.x = -28;
+ jewel1.y = -140;
+ jewel1.tint = 0x00bfff; // blue
+ self.addChild(jewel1);
+ self.costumeSprites.push(jewel1);
+ var jewel2 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ jewel2.width = 10;
+ jewel2.height = 10;
+ jewel2.x = 0;
+ jewel2.y = -152;
+ jewel2.tint = 0xff0000; // red
+ self.addChild(jewel2);
+ self.costumeSprites.push(jewel2);
+ var jewel3 = LK.getAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ jewel3.width = 10;
+ jewel3.height = 10;
+ jewel3.x = 28;
+ jewel3.y = -140;
+ jewel3.tint = 0x00ff00; // green
+ self.addChild(jewel3);
+ self.costumeSprites.push(jewel3);
}
if (costumeId === 2) {
// Gözlük (glasses) - use two ellipses as glasses
var glass1 = LK.getAsset('particle', {
@@ -40,8 +112,9 @@
glass1.x = -35;
glass1.y = -10;
glass1.tint = 0x222222;
self.addChild(glass1);
+ self.costumeSprites.push(glass1);
var glass2 = LK.getAsset('particle', {
anchorX: 0.5,
anchorY: 0.5
});
@@ -50,8 +123,9 @@
glass2.x = 35;
glass2.y = -10;
glass2.tint = 0x222222;
self.addChild(glass2);
+ self.costumeSprites.push(glass2);
}
self.xSpeed = 10.9375;
self.ySpeed = -20;
self.gravity = 1;
@@ -72,8 +146,18 @@
self.speed = -self.speed;
}
var targetRotation = Math.atan2(self.ySpeed, self.xSpeed * self.scale.x) / 2;
birdGraphics.rotation += (targetRotation - birdGraphics.rotation) / 10;
+ // Make all costume overlays follow the bird's movement, scale, and rotation
+ if (self.costumeSprites && self.costumeSprites.length) {
+ for (var i = 0; i < self.costumeSprites.length; i++) {
+ var sprite = self.costumeSprites[i];
+ // Match scale and rotation to birdGraphics
+ sprite.scale.x = birdGraphics.scale.x;
+ sprite.scale.y = birdGraphics.scale.y;
+ sprite.rotation = birdGraphics.rotation;
+ }
+ }
};
self.flip = function () {
self.scale.x *= -1;
};
Dusty pink wall with hearts inside . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat Let the hearts be hearts of vibrant colors and various pink emojis and let the wall be square
powder pink square. In-Game asset. 2d. High contrast. No shadows
pixel sun glasses . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
brown beard. In-Game asset. 2d. High contrast. No shadows
king crown. In-Game asset. 2d. High contrast. No shadows
bıyık. In-Game asset. 2d. High contrast. No shadows
gri tonlarında şapka. In-Game asset. 2d. High contrast. No shadows
red rose realistic. In-Game asset. 2d. High contrast. No shadows
Daisy Bouquet Realistic. In-Game asset. 2d. High contrast. No shadows
pink flower bouquet realistic. In-Game asset. 2d. High contrast. No shadows