User prompt
arkaya eğlenceli ve rahatlatıcı bir müzik koy ve her eşya toplandığında dın dın tarzı ses koy ama bomba alındığında patlama sesi yap
User prompt
eşya sayısını %50 arttır ve etrafa dağılsın eşyalar yani her tarafta olsu
User prompt
nadir öğe sayısını azalt ve bomba sayını arttır
User prompt
eşya sayısını %35 oranında arttır
User prompt
ve güneş varsa hava aydınlık mavi tonlarında olsun ama ay gelince hava kararsın ve nadir öğeleri koymayı unutma ve %50 oranında eşyaların hızını arttır ve kuşlar eğer bir eşyaya çarparsa kuşlar ölsün bunada efekt koy ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
arka plana bulut ve güneş koyarmısın hatta zaman geçtikçe güneş ay'a dönsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
eşyaları %25 daha hızlandır
User prompt
eşyaların düşme hızını %15 daha arttır
User prompt
ve nadir öğe sayısını birazcık arttır
User prompt
sadece kuş olsun ve kuşlar havadaki eşyalara çarpınca o eşyalar silinsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
eşyalar %10 oranında daha hızlansın ve arka plana kuş,uçak gibi havada bululabilen şeyler koy ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bombaların sayısı fazla olsun , eşyaların düşme hızı %15 oranında hızlansın ve arka planı güzelleştir
User prompt
kırmızıların boyutu yeşiller ile aynı olsun ve kırmızı alınınca patlama efekti yap ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
kırmızı renki bombada koyarmısın ve mouseyi sol tıka basmadan aşağıdaki mouseyi takip etsin ve sarıların sayısı çok az olsun
Code edit (1 edits merged)
Please save this source code
User prompt
Sky Catcher
Initial prompt
yukarıdan eşyalar düşsün ve biz aşağıdan o düşen eşyaları yakalayalım ve bazı eşyalar nadir olsun kazanıldığında ekstra puan versin aralara bombada koy bomba alınınca skor sıfırlansın
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var FallingItem = Container.expand(function (itemType) {
var self = Container.call(this);
self.itemType = itemType || 'common';
self.fallSpeed = 3;
var assetName = 'commonItem';
self.points = 15;
if (self.itemType === 'rare') {
assetName = 'rareItem';
self.points = 75;
} else if (self.itemType === 'bomb') {
assetName = 'bomb';
self.points = 0;
}
var itemGraphics = self.attachAsset(assetName, {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
self.y += self.fallSpeed;
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 1.0
});
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
var player = game.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - 50;
var fallingItems = [];
var dragNode = null;
var gameSpeed = 1;
var itemSpawnRate = 90;
var scoreTxt = new Text2('0', {
size: 100,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
scoreTxt.y = 100;
function spawnItem() {
var itemType = 'common';
var rand = Math.random();
if (rand < 0.05) {
itemType = 'bomb';
} else if (rand < 0.08) {
itemType = 'rare';
}
var newItem = new FallingItem(itemType);
newItem.x = Math.random() * (2048 - 100) + 50;
newItem.y = -50;
newItem.fallSpeed = 3 + gameSpeed * 0.5;
newItem.lastY = newItem.y;
newItem.lastIntersecting = false;
fallingItems.push(newItem);
game.addChild(newItem);
}
function handleMove(x, y, obj) {
player.x = x;
if (player.x < 60) player.x = 60;
if (player.x > 2048 - 60) player.x = 2048 - 60;
}
game.move = handleMove;
game.down = function (x, y, obj) {
handleMove(x, y, obj);
};
game.up = function (x, y, obj) {};
game.update = function () {
// Spawn items
if (LK.ticks % Math.max(30, itemSpawnRate - Math.floor(gameSpeed * 10)) == 0) {
spawnItem();
}
// Increase game speed gradually
if (LK.ticks % 600 == 0) {
gameSpeed += 0.2;
}
// Update falling items
for (var i = fallingItems.length - 1; i >= 0; i--) {
var item = fallingItems[i];
if (item.lastY === undefined) item.lastY = item.y;
if (item.lastIntersecting === undefined) item.lastIntersecting = false;
// Remove items that fall off screen
if (item.lastY < 2732 + 100 && item.y >= 2732 + 100) {
item.destroy();
fallingItems.splice(i, 1);
continue;
}
// Check collision with player
var currentIntersecting = item.intersects(player);
if (!item.lastIntersecting && currentIntersecting) {
if (item.itemType === 'bomb') {
// Create explosion effect by scaling the bomb before destroying it
tween(item, {
scaleX: 3,
scaleY: 3,
alpha: 0
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
// Item will be destroyed below anyway
}
});
LK.setScore(0);
LK.effects.flashScreen(0xFF0000, 500);
LK.getSound('bomb').play();
} else {
LK.setScore(LK.getScore() + item.points);
if (item.itemType === 'rare') {
LK.effects.flashObject(player, 0xFFD700, 300);
LK.getSound('rare').play();
} else {
LK.getSound('collect').play();
}
}
scoreTxt.setText(LK.getScore());
item.destroy();
fallingItems.splice(i, 1);
continue;
}
item.lastY = item.y;
item.lastIntersecting = currentIntersecting;
}
}; ===================================================================
--- original.js
+++ change.js
@@ -111,8 +111,20 @@
// Check collision with player
var currentIntersecting = item.intersects(player);
if (!item.lastIntersecting && currentIntersecting) {
if (item.itemType === 'bomb') {
+ // Create explosion effect by scaling the bomb before destroying it
+ tween(item, {
+ scaleX: 3,
+ scaleY: 3,
+ alpha: 0
+ }, {
+ duration: 300,
+ easing: tween.easeOut,
+ onFinish: function onFinish() {
+ // Item will be destroyed below anyway
+ }
+ });
LK.setScore(0);
LK.effects.flashScreen(0xFF0000, 500);
LK.getSound('bomb').play();
} else {
bomba. In-Game asset. 2d. High contrast. No shadows
gümüş yuvarlak top. In-Game asset. 2d. High contrast. No shadows
dikdörtgen bir biçimde ağzı açık karton kutu gerçekçi olsun. In-Game asset. 2d. High contrast. No shadows
altın külçe gerçekçi. In-Game asset. 2d. High contrast. No shadows