User prompt
item e her tıkladığımda background değişecek "back1,2,3,4,5,6,7,8,9" bunlardan rastgele biri olacak
User prompt
item e her tıkladığımda background değişecek "back1,2,3,4,5,6,7,8,9" bunlardan rastgele biri olacak
User prompt
"spawner" assetsini görünmez yap
User prompt
item3 spawnerin içinde kalacak her zaman. ben tıkladığımda konumu rastgele değişecek, bunla ilgili olan eski kodları tamamen silip yenisini yaz ve aynı olmasın farklılıklar yap
User prompt
her levelde item, ekranın rastgele bir yerine ışınlanacak
User prompt
item1 değiş item3
User prompt
her levelde yeri değişecek itemin, kaybolmayacak !
User prompt
item sadece spawnerin içinde spawn olabilecek
User prompt
item e tıklayınca kaybolmasın "spawner" in herhangi bir yerine spawn olsun
Code edit (1 edits merged)
Please save this source code
User prompt
itemler sadece "spawner" resminin içinde spawn olacak ekranın başka tarafında spawn olmayacak !
User prompt
hani ? dediğimi yapmadın
User prompt
item1'in konumu her zaman spawnerin içinde olacak
User prompt
arka plan resimleri her zaman "spawner" resminin arkasında kalacak (katman bakımından)
User prompt
tamam bu dediğini yap
User prompt
"spawner" assetsi her zaman ekranda kalacak
User prompt
Spawn item1 only inside the spawner asset
User prompt
item1 sadece spawner assetinin içinde spawn olacak
User prompt
spawner her bölümde gözükecek
User prompt
spawner sürekli ekranda kalacak
User prompt
Please fix the bug: 'The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.setChildIndex(background, 0);' Line Number: 37
User prompt
arka plan en alt katmanda kalsın diğer objeler onun üstünde olacak
User prompt
spawner ekranda gözüksün istiyorum
User prompt
spawnlerin görünmezliğini true yap
User prompt
katman olarak en üstte spawner olsun
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ var currentLevel = 1; var spawner = game.attachAsset('spawner', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, visible: false }); game.addChild(spawner); var background = game.attachAsset('back8', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 500, scaleX: 1, scaleY: 1 }); game.setChildIndex(spawner, game.children.length - 1); var item3 = game.attachAsset('item3', { anchorX: 0.5, anchorY: 0.5, x: Math.random() * 2048, y: Math.random() * 2732 }); item3.down = function (x, y, obj) { // Change the position of item3 within the spawner item3.x = spawner.x + Math.random() * spawner.width - spawner.width / 2; item3.y = spawner.y + Math.random() * spawner.height - spawner.height / 2; // Change the background image var backgrounds = ['back1', 'back2', 'back3', 'back4', 'back5', 'back6', 'back7', 'back8', 'back9']; var randomBackground = backgrounds[Math.floor(Math.random() * backgrounds.length)]; background.destroy(); background = game.attachAsset(randomBackground, { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 500, scaleX: 1, scaleY: 1 }); };
===================================================================
--- original.js
+++ change.js
@@ -38,6 +38,14 @@
item3.y = spawner.y + Math.random() * spawner.height - spawner.height / 2;
// Change the background image
var backgrounds = ['back1', 'back2', 'back3', 'back4', 'back5', 'back6', 'back7', 'back8', 'back9'];
var randomBackground = backgrounds[Math.floor(Math.random() * backgrounds.length)];
- background.changeAsset(randomBackground);
+ background.destroy();
+ background = game.attachAsset(randomBackground, {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2 - 500,
+ scaleX: 1,
+ scaleY: 1
+ });
};
\ No newline at end of file
dağınık bir yatak odası, odanın içinden görünüm 3d renkli
dağınık bir oturma odası, odanın içinden görünüm. 3d renkli anime, çizgi film
dağınık bir mutfak, odanın içinden görünüm. 3d renkli anime, çizgi film
dağınık bir mutfak, odanın içinden görünüm. 3d renkli anime, çizgi film
dağınık bir oturma odası, odanın içinden görünüm. 3d renkli anime, çizgi film
dağınık bir yatak odası, odanın içinden görünüm 3d renkli, çizgi film
dağınık bir yatak odası, odanın içinden görünüm 3d renkli, çizgi film