User prompt
arka planı güncelleyemiyorum
User prompt
arka plan için assets kısmına texture ekle ve ben oradan textureyi değiştirebileyim
User prompt
arka planı değiştirilebilir yap
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'font')' in or related to this line: 'baraj.txt.style.font = "Arial Black";' Line Number: 600
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'fill')' in or related to this line: 'btn.txt.style.fill = answerTextColors[i];' Line Number: 583
User prompt
bu ekranı Kim milyoner olmak ister temasında yap
User prompt
(q: "Halil Söyletmez'in Vine döneminde en çok bilinen karakteri kimdir?", a: ["Fiko", "Memo", "Cengo", "Deli Mi Ne"],) bu sorudan 2 tane var o yüzden ikisini de değiştip farklı sorular yap
User prompt
biraz cilala ve soru sayısı diğerlerinden fazla olan influencerlerin sorularını azalt onlar yerine başka influencerler koy
Code edit (4 edits merged)
Please save this source code
User prompt
(q: "Melih Abuaf'ın (Melih Abuaf'la Bilim) en çok izlenen videosu hangi bilimsel konudadır?", a: ["Kuantum Fiziği", "Manyetizma", "Işık Hızı", "Beyin"],) bu soryu da 2 kere yazmışsın birini değiştir
User prompt
(q: "Duygu Köseoğlu'nun Twitch yayınlarında en çok oynadığı oyun hangisidir?", a: ["League of Legends", "Valorant", "Minecraft", "Among Us"],) bu soruyu ilki kere yazmışsın farklı sorular yaz
User prompt
Barış özcan, Elraenn , Danla Bilic ve Orkun Işıtmak ile ilgili çok soru var onları azalt
Code edit (5 edits merged)
Please save this source code
User prompt
bi kaç soruyu değiştir farkılı kişiler farkı influencerler hakkında da sorular sor hep "Elraenn,Danla,Barış özcan,Orkun Işıtmak olmasın farklı farklı olsun
Code edit (1 edits merged)
Please save this source code
User prompt
35. soru müzikli bir soru olsun müzik çalsın eğer soruyu bilemezse müziği durdur. Soruyu eğer bilirse Müziği durdurrum diğer soruya geçsin
Code edit (1 edits merged)
Please save this source code
User prompt
(q: "Orkun Işıtmak'ın en çok izlenen prank videosu hangisidir?", a: ["Prank 1", "Prank 2", "Prank 3", "Prank 4"],),(q: "Danla Bilic'in en çok izlenen challenge videosu hangisidir?", a: ["Challenge 1", "Challenge 2", "Challenge 3", "Challenge 4"],),(q: "Barış Özcan'ın en çok izlenen eğitim videosu hangisidir?", a: ["Eğitim 1", "Eğitim 2", "Eğitim 3", "Eğitim 4"],),(q: "Barış Özcan'ın en çok izlenen kısa filmi hangisidir?", a: ["Kısa Film 1", "Kısa Film 2", "Kısa Film 3", "Kısa Film 4"],),(q: "CZN Burak'ın en çok izlenen kahvaltı videosu hangisidir?", a: ["Kahvaltı 1", "Kahvaltı 2", "Kahvaltı 3", "Kahvaltı 4"],),( "Elraenn'in en çok izlenen komik videosu hangisidir?", a: ["Komik 1", "Komik 2", "Komik 3", "Komik 4"],),(q: "Orkun Işıtmak'ın en çok izlenen vlog videosu hangisidir?", a: ["Vlog 1", "Vlog 2", "Vlog 3", "Vlog 4"],),(q: "Elraenn'in en çok izlenen eğlence yayını hangisidir?", a: ["Eğlence 1", "Eğlence 2", "Eğlence 3", "Eğlence 4"],),(: "Orkun Işıtmak'ın en çok izlenen sosyal deney videosu hangisidir?", a: ["Deney 1", "Deney 2", "Deney 3", "Deney 4"],),(q: "Enes Batur'un en çok izlenen şaka videosu hangisidir?", a: ["Şaka 1", "Şaka 2", "Şaka 3", "Şaka 4"],),(q: "Danla Bilic'in en çok izlenen soru-cevap videosu hangisidir?", a: ["Soru 1", "Soru 2", "Soru 3", "Soru 4"],) bu tür soruların hepsini düzlt
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Answer Button Class var AnswerButton = Container.expand(function () { var self = Container.call(this); // assetId: 'answerA', 'answerB', etc. // label: 'A', 'B', 'C', 'D' // onPress: function self.init = function (assetId, label, onPress) { var btn = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5 }); self.btn = btn; self.label = label; self.onPress = onPress; // Answer text var txt = new Text2('', { size: 80, fill: "#fff", font: "Arial" }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; self.addChild(txt); self.txt = txt; // For touch feedback self.isEnabled = true; }; // Set answer text self.setText = function (text) { self.txt.setText(text); }; // Enable/disable button self.setEnabled = function (enabled) { self.isEnabled = enabled; self.btn.alpha = enabled ? 1 : 0.5; }; // Touch event self.down = function (x, y, obj) { if (!self.isEnabled) { return; } if (typeof self.onPress === 'function') { self.onPress(); } }; return self; }); // Baraj Indicator Class var BarajIndicator = Container.expand(function () { var self = Container.call(this); var circle = self.attachAsset('baraj', { anchorX: 0.5, anchorY: 0.5 }); self.circle = circle; var txt = new Text2('', { size: 60, fill: "#000", font: "Arial" }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; self.addChild(txt); self.txt = txt; self.setText = function (text) { self.txt.setText(text); }; return self; }); /**** * Questions Data ****/ // Each question: {q: "Soru", a: ["A", "B", "C", "D"], correct: 0-3} // Question Box Class var QuestionBox = Container.expand(function () { var self = Container.call(this); var box = self.attachAsset('questionBox', { anchorX: 0.5, anchorY: 0.5 }); self.box = box; var txt = new Text2('', { size: 70, fill: "#222", font: "Arial" }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; self.addChild(txt); self.txt = txt; self.setText = function (text) { // Auto-shrink text to fit inside the question box, and allow multi-line var maxWidth = self.box.width * 0.92; // leave some margin var maxHeight = self.box.height * 0.92; var minFontSize = 28; var fontSize = 70; var lineHeight = 1.1; var originalText = text; // Try to split long questions into multiple lines at spaces function splitToLines(str, fontSize) { var words = str.split(' '); var lines = []; var current = ''; for (var i = 0; i < words.length; i++) { var testLine = current.length > 0 ? current + ' ' + words[i] : words[i]; self.txt.setText(testLine); if (self.txt.width > maxWidth && current.length > 0) { lines.push(current); current = words[i]; } else { current = testLine; } } if (current.length > 0) { lines.push(current); } return lines; } if (self.txt && self.txt.style) { self.txt.style.size = fontSize; self.txt.style.lineHeight = lineHeight; } self.txt.setText(text); // Shrink font size if needed, and split to lines if still too wide while ((self.txt.width > maxWidth || self.txt.height > maxHeight) && fontSize > minFontSize) { fontSize -= 2; if (self.txt && self.txt.style) { self.txt.style.size = fontSize; self.txt.style.lineHeight = lineHeight; } // Try to split to lines if still too wide var lines = splitToLines(originalText, fontSize); self.txt.setText(lines.join('\n')); } // Final check: if still too tall, reduce lineHeight while (self.txt.height > maxHeight && lineHeight > 0.8) { lineHeight -= 0.05; if (self.txt && self.txt.style) { self.txt.style.lineHeight = lineHeight; } self.txt.setText(self.txt.text); // reapply } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xf7f7f7 }); /**** * Game Code ****/ // Background texture asset (replace 'bg1' with your own texture id as needed) // Each question: {q: "Soru", a: ["A", "B", "C", "D"], correct: 0-3} /**** * Questions Data ****/ // --- No update needed, all logic is event-driven --- // --- Touch: prevent accidental double tap on answer buttons --- // (Handled by isLocked flag above); // --- Background Change Functionality --- // Call this function with a color (hex or number) to change the background color dynamically // Or call with a texture id (e.g. 'bg1') to set a background image var backgroundImageNode = null; function setBackground(bg) { // Remove previous background image if any if (backgroundImageNode && backgroundImageNode.parent) { backgroundImageNode.parent.removeChild(backgroundImageNode); backgroundImageNode = null; } // If bg is a string and matches a loaded image asset, use as texture var isImage = false; if (typeof bg === "string") { // Try to get the asset, but only treat as image if asset is an image var asset = LK.getAsset(bg, { anchorX: 0, anchorY: 0 }); if (asset && asset.texture) { isImage = true; } } if (isImage) { backgroundImageNode = LK.getAsset(bg, { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732, scaleX: 1, scaleY: 1 }); // Insert as first child so it's behind everything if (game.children && game.children.length > 0) { game.addChildAt(backgroundImageNode, 0); } else { game.addChild(backgroundImageNode); } // Optionally, set background color to transparent so image is visible game.setBackgroundColor(0x00000000); } else { // Otherwise, treat as color var color = bg; if (typeof color === "string" && color[0] === "#") { // Convert hex string to number color = parseInt(color.slice(1), 16); } game.setBackgroundColor(color); } } // State // 100 soruluk, yeni barajlar eklenmiş ve örnek sorularla doldurulmuş dizi var questions = [ // 1. Baraj (1. soru) - Kullanıcı ekleyecek { q: "Orkun Işıtmak hangi videoda Tarlabaşın'da dayak yemiştir", a: ["EN EĞLENCELİ OYUN !! - Scribblenauts : Unlimited", "30 GÜN BOKS YAPMAK!", "Acılı Ev Turu", "Ucuz Orta Pahalı Dayak"], correct: 1 }, // 2-4 Ava tarafından yazıldı (değiştirildi: farklı influencerlar) { q: "Ruhi Çenet'in en çok izlenen videosu hangi konudadır?", a: ["Kuzey Kore", "Mars", "Dünyanın En Tehlikeli Yolu", "Çernobil"], correct: 0 }, { q: "Meryem Can'ın YouTube kanalında en çok hangi içerik türü öne çıkar?", a: ["Vlog", "Deney", "Makyaj", "Challenge"], correct: 3 }, { q: "YAPYAP kanalının kurucusu kimdir?", a: ["Melih Abuaf", "Cem korkmaz", "Fırat Sobutay", "Alper Rende"], correct: 0 }, // 2. Baraj (5. soru) - Kullanıcı ekleyecek { q: "Ali Biçim kanalının en çok izlenen videosu nedir", a: ["MCT 'IN SAÇLARINI DÜZLEŞTİRDİK ", "Gacı Olimpiyatları", "Telefon Kulübesi", "Fruit Ninja"], correct: 0 }, // 6-9 Ava tarafından yazıldı { q: "CZN Burak'ın gerçek adı nedir?", a: ["Burak Özdemir", "Burak Yılmaz", "Burak Can", "Burak Kaya"], correct: 0 }, { q: "Enes Batur'un en çok izlenen videosu hangisidir?", a: ["Parodi", "Vlog", "Şaka", "Oyun"], correct: 0 }, { q: "Merve Özkaynak'ın YouTube kanalında en çok izlenen video türü hangisidir?", a: ["Makyaj", "Anne-Çocuk", "Alışveriş", "Vlog"], correct: 0 }, { q: "Berkcan Güven'in (BEGE) en çok izlenen müzik videosu hangisidir?", a: ["Yeniden", "Neresi?", "İleri", "Yeniden (Remix)"], correct: 0 }, // 3. Baraj (10. soru) - Kullanıcı ekleyecek { q: "Eray'ın lakabı nedir", a: ["kurt", "Ayı", "Boğa", "Kangal"], correct: 3 }, // 11-14 Ava tarafından yazıldı { q: "Danla Bilic'in en çok izlenen makyaj videosu hangisidir?", a: ["Smokey Eye", "Doğal Makyaj", "Gece Makyajı", "Gelin Makyajı"], correct: 0 }, { q: "Fırat Sobutay saçını hangi yıl ektirdi?", a: ["2019", "2017", "2020", "2018"], correct: 0 }, { q: "Enes Batur'un ilk filmi hangi yılda vizyona girdi?", a: ["2016", "2017", "2018", "2019"], correct: 2 }, { q: "Mete Özbey (Easter Gamers TV) hangi oyun türünde içerik üretmektedir?", a: ["Simülasyon", "FPS", "Strateji", "Spor"], correct: 0 }, // 4. Baraj (15. soru) - Kullanıcı ekleyecek { q: "At0m kanalının içerikleri nedir?", a: ["Bilim", "Eğlence", "Game Develop", "Yemek"], correct: 2 }, // 16-19 Ava tarafından yazıldı { q: "Duygu Köseoğlu'nun YouTube kanalında en çok hangi içerik türüyle tanınır?", a: ["Oyun", "Vlog", "Teknoloji", "Makyaj"], correct: 0 }, { q: "Merve Yalçın'ın TikTok'ta viral olan dans videosunda hangi şarkı kullanılmıştır?", a: ["Savage Love", "Dance Monkey", "Say So", "Blinding Lights"], correct: 2 }, { q: "Mert Güler'in Instagram'da en çok paylaştığı içerik türü nedir?", a: ["Motivasyon", "Yemek", "Spor", "Teknoloji"], correct: 0 }, { q: "CZN Burak'ın en çok izlenen Instagram videosu hangisidir?", a: ["Kebap", "Tatlı", "Şov", "Yemek"], correct: 0 }, // 5. Baraj (20. soru) - Kullanıcı ekleyecek { q: "(Kral bi SG) Repliği ile aklımıza kazının kişi kimdir?", a: ["Porçay", "Sadece Enes", "Enes batur", "NDNG Baturay"], correct: 2 }, // 21-24 Ava tarafından yazıldı { q: "Duygu Köseoğlu'nun YouTube kanalında en çok izlenen video türü hangisidir?", a: ["Oyun", "Vlog", "Teknoloji", "Makyaj"], correct: 0 }, { q: "Elraenn'in en uzun yayını kaç saat sürmüştür?", a: ["12", "18", "24", "30"], correct: 2 }, { q: "Orkun Işıtmak'ın en çok izlenen challenge videosu hangisidir?", a: ["24 Saat", "Korku Evi", "Şaka", "Vlog"], correct: 1 }, { q: "Enes Baturun Dolunay şarkısı kaç Mn dinlenmiştir?", a: ["2", "50", "150", "170"], correct: 3 }, // 6. Baraj (25. soru) - Kullanıcı ekleyecek { q: "Hangilerinin bir respect Şarkısı vardır?", a: ["Halil Söyletmez,Burak Göngör", "Barış Özcan,Ruhi Çenet", "Orkun ışıtmak,Enes batur", "İbrahim tilaver,Çakal"], correct: 0 }, // 26-29 Ava tarafından yazıldı { q: "Melih Abuaf'ın (Melih Abuaf'la Bilim) en çok izlenen videosu hangi bilimsel konudadır?", a: ["Kuantum Fiziği", "Manyetizma", "Işık Hızı", "Beyin"], correct: 2 }, { q: "CZN Burak'ın en çok izlenen tatlı videosu hangisidir?", a: ["Baklava", "Künefe", "Sütlaç", "Kazandibi"], correct: 0 }, { q: "Enes Batur'un en çok izlenen parodi videosu hangisidir?", a: ["Ed Sheeran ''Shape of You'' PARODİ", "Sorry PARODİ ft. Enes Batur & Baturay", "Youtuberların Düşüşü '' Despacito'' Parodi", "Parodi 4"], correct: 0 }, { q: "hangi youtuber diss şarkısında beyaz maske kullanmıştır?", a: ["Kafalar", "Orkun Işıtmak", "Enes Batur", "Berk Muhammed"], correct: 0 }, // 7. Baraj (30. soru) - Kullanıcı ekleyecek { q: "Böbrekçi olarak bilinen influencer kimdir?", a: ["Orkun Işıtmak", "Ruhi Çenet", "At0m", "Meryem can"], correct: 1 }, // 31-34 Ava tarafından yazıldı { q: "Yusuf Aktaş (Reynmen)'in en çok izlenen şarkısı hangisidir?", a: ["Ela", "Derdim Olsun", "Leila", "Kaçamak"], correct: 1 }, { q: "Orkun Işıtmak'ın ilk videosu nedir?", a: ["Minecraft", "Dream Of Aces - Grand'pa Aces", "Sevgilime kışkırtma", "Ucuz Orta Pahalı Hamburger"], correct: 1 }, { q: "Elraenn'in en çok izlenen eğlence videosu hangisidir?", a: ["Twitch Yayıncılarıyla Among Us", "En Komik Anlar Derlemesi", "PUBG Mobile Challenge", "GTA 5 Roleplay"], correct: 1 }, { q: "Orkun Işıtmak'ın en çok izlenen sosyal deney videosu hangisidir?", a: ["Sokakta Para Dağıttım", "Görme Engelliye Yardım Ettim", "Yabancılara Türkçe Öğrettim", "Ünlü Gibi Davrandım"], correct: 0 }, // 8. Baraj (35. soru) - Kullanıcı ekleyecek { q: "Dinlediğiniz müzik kime aittir?", a: ["Elraenn", "Cordiseps", "Burak oyunda", "qpuenn"], correct: 1 }, // 36-39 Ava tarafından yazıldı { q: "Merve Özkaynak'ın YouTube kanalında en çok izlenen video türü hangisidir?", a: ["Makyaj", "Anne-Çocuk", "Alışveriş", "Vlog"], correct: 0 }, { q: "Barış Özcan'ın 'Sanat ve Bilim' başlıklı videosunda hangi sanat akımından detaylıca bahsetmiştir?", a: ["Kübizm", "Dadaizm", "Sürrealizm", "Empresyonizm"], correct: 2 }, { q: "CZN Burak'ın sosyal medyada viral olan dev baklava yapımı videosunda kullandığı ana malzeme nedir?", a: ["Fıstık", "Ceviz", "Badem", "Fındık"], correct: 0 }, { q: "Elraenn'in Twitch'te en çok izlenen sohbet yayınında hangi ünlü yayıncı ile birlikte yayın yapmıştır?", a: ["Jahrein", "Pqueen", "wtcN", "Kendine Müzisyen"], correct: 1 }, // 9. Baraj (40. soru) - Kullanıcı ekleyecek { q: "LeHamam kanalındaki ikilinin ismi nedir?", a: ["Muhammed,Fatih", "İbrahim,Emirhan", "Emre,Kerem", "Atakan, Ataberk"], correct: 2 }, // 41-44 Ava tarafından yazıldı { q: "Enes Batur'un en çok izlenen şaka videosu hangisidir?", a: ["Kız Arkadaşıma Şaka Yaptım", "Annemle 24 Saat Takas", "Evde Saklambaç", "Arkadaşlarımı Korkuttum"], correct: 1 }, { q: "Ekin Kollama'nın YouTube kanalında en çok izlenen video serisi hangisidir?", a: ["Korku Oyunları", "Vlog", "Sosyal Deney", "Soru-Cevap"], correct: 0 }, { q: "Ruhi Çenet'in en çok izlenen gezi videosu hangi ülke hakkındadır?", a: ["Kuzey Kore", "Hindistan", "Japonya", "Brezilya"], correct: 0 }, { q: "CZN Burak'ın en çok izlenen kebap videosu hangisidir?", a: ["1 Metrelik Adana Kebap", "Dev Urfa Kebap", "100 Kişilik Kebap", "Kebap Şov"], correct: 2 }, // 10. Baraj (45. soru) - Kullanıcı ekleyecek { q: "Bu kişilerden hangisi Vine ile hayatımıza girip şimdi kickte yayın açmakta?", a: ["Ataberk Doğan", "Reynmen", "Kaanflix", "Porçay"], correct: 0 }, // 46-49 Ava tarafından yazıldı { q: "Elraenn'in YouTube'da en çok izlenen oyun videosunda oynadığı oyun hangisidir?", a: ["Minecraft", "GTA V", "CS:GO", "Rust"], correct: 1 }, { q: "Orkun Işıtmak'ın en çok izlenen şaka (prank) videosunda hangi ünlü YouTuber'a şaka yapmıştır?", a: ["Enes Batur", "Ruhi Çenet", "Danla Bilic", "Meryem Can"], correct: 0 }, { q: "Danla Bilic'in en çok izlenen challenge videosunda hangi makyaj malzemesiyle makyaj yapmıştır?", a: ["Sadece ruj", "Sadece fondöten", "Sadece maskara", "Sadece allık"], correct: 0 }, { q: "Barış Özcan'ın en çok izlenen eğitim videosunda hangi bilimsel konuyu işlemiştir?", a: ["Kuantum fiziği", "Yapay zeka", "Uzay yolculuğu", "Beyin ve bilinç"], correct: 1 }, { q: "Barış Özcan'ın en çok izlenen kısa filminde ana tema nedir?", a: ["Zaman yolculuğu", "Yapay zeka", "Sanat ve insan", "Hayal gücü"], correct: 3 }, { q: "CZN Burak'ın en çok izlenen kahvaltı videosunda hangi geleneksel Türk yemeğini yapmıştır?", a: ["Menemen", "Sucuklu yumurta", "Serpme kahvaltı", "Katmer"], correct: 0 }, { q: "Meryem Can'ın en çok izlenen sosyal deney videosu hangi konuda?", a: ["Yardımlaşma", "Korku", "Yemek", "Teknoloji"], correct: 0 }, { q: "Melih Abuaf'ın (Melih Abuaf'la Bilim) en çok izlenen deney videosu hangi element ile ilgilidir?", a: ["Helyum", "Oksijen", "Azot", "Karbon"], correct: 0 }, { q: "Elraenn'in en çok izlenen eğlence yayını hangi oyunla ilgilidir?", a: ["Among Us", "GTA V", "VALORANT", "PUBG"], correct: 1 }, { q: "Orkun Işıtmak'ın en çok izlenen sosyal deney videosunda hangi konuda deney yapmıştır?", a: ["Sokakta para dağıtmak", "Görme engelliye yardım", "Ünlü gibi davranmak", "Yabancılara Türkçe öğretmek"], correct: 0 }, { q: "Enes Batur'un en çok izlenen şaka videosunda kime şaka yapmıştır?", a: ["Annesine", "Kız arkadaşına", "Babasına", "Arkadaşına"], correct: 1 }, { q: "Danla Bilic'in en çok izlenen soru-cevap videosunda en çok sorulan konu nedir?", a: ["Makyaj sırları", "Özel hayatı", "YouTube kariyeri", "Arkadaşlık ilişkileri"], correct: 0 }, { q: "Orkun Işıtmak'ın en çok izlenen şaka (prank) videosunda hangi mekanda çekim yapılmıştır?", a: ["Alışveriş merkezi", "Sokak", "Ev", "Okul"], correct: 0 }, { q: "Danla Bilic'in en çok izlenen challenge videosunda hangi ünlüyle birlikte video çekmiştir?", a: ["Aleyna Tilki", "Berkay", "Demet Akalın", "Ece Seçkin"], correct: 0 }, { q: "Barış Özcan'ın en çok izlenen eğitim videosunda hangi teknolojik gelişmeden bahsetmiştir?", a: ["Yapay zeka", "Kuantum bilgisayarlar", "Mars yolculuğu", "Blockchain"], correct: 1 }, { q: "Enes Batur'un en çok izlenen vlog videosunda hangi ünlüyle birlikte video çekmiştir?", a: ["Orkun Işıtmak", "Danla Bilic", "CZN Burak", "Barış Özcan"], correct: 0 }, { q: "Danla Bilic'in en çok izlenen röportaj videosunda hangi soruya verdiği cevap viral olmuştur?", a: ["Makyaj sırları", "İlk aşkı", "YouTube'a başlama hikayesi", "En sevdiği yemek"], correct: 2 }, { q: "Barış Özcan'ın en çok izlenen kısa filminde hangi bilimsel kavram işlenmiştir?", a: ["Kuantum dolanıklık", "Zamanın göreceliği", "Yapay zeka", "Simülasyon teorisi"], correct: 1 }, { q: "CZN Burak'ın en çok izlenen kahvaltı videosunda hangi ülkenin kahvaltısı hazırlanmıştır?", a: ["Türkiye", "Mısır", "İtalya", "Fransa"], correct: 0 }, { q: "Elraenn'in en çok izlenen komik videosunda hangi yayıncıyla birlikte yayın yapmıştır?", a: ["Jahrein", "Pqueen", "wtcN", "Kendine Müzisyen"], correct: 1 }, { q: "Orkun Işıtmak'ın en çok izlenen vlog videosunda hangi şehirde çekim yapmıştır?", a: ["İstanbul", "Ankara", "İzmir", "Antalya"], correct: 0 }, { q: "Danla Bilic'in en çok izlenen makyaj ürünüyle ilgili videosunda hangi markayı kullanmıştır?", a: ["MAC", "Maybelline", "L'Oréal", "Golden Rose"], correct: 0 }, { q: "Barış Özcan'ın en çok izlenen motivasyon konuşmasında hangi anahtar kelimeyi vurgulamıştır?", a: ["Hayal", "Başarı", "Çaba", "İlham"], correct: 0 }, { q: "Elraenn'in en çok izlenen eğlence yayını hangi konsepttedir?", a: ["Oyun", "Sohbet", "Yemek", "Müzik"], correct: 1 }, { q: "Orkun Işıtmak'ın en çok izlenen sosyal deney videosunda hangi sosyal mesaj verilmiştir?", a: ["Yardımlaşma", "Empati", "Toplumsal farkındalık", "Dostluk"], correct: 0 }, // 21. Baraj (100. soru) - Kullanıcı ekleyecek { q: "Hangi kadın yayıncı Mansur yavaşla yayın açmıştır", a: ["Pquenn", "Nemesis", "Limon abla", "Eldorina"], correct: 0 }]; // Yeni baraj indeksleri: 5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 var barajIndexes = [4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 89, 94, 99]; var currentQuestion = 0; var lastBarajPassed = -1; // -1 means no baraj passed yet var answerButtons = []; var questionBox = null; var barajIndicators = []; var isLocked = false; // Prevent double input // Prizes for baraj levels (örnek, 20 baraj) var barajPrizes = ["5.000 TL", "10.000 TL", "20.000 TL", "40.000 TL", "80.000 TL", "160.000 TL", "320.000 TL", "640.000 TL", "1.250.000 TL", "2.500.000 TL", "5.000.000 TL", "10.000.000 TL", "20.000.000 TL", "40.000.000 TL", "80.000.000 TL", "160.000.000 TL", "320.000.000 TL", "640.000.000 TL", "1.250.000.000 TL", "2.500.000.000 TL"]; // --- Layout constants --- // Kim Milyoner Olmak İster teması için renkler ve düzen var centerX = 2048 / 2; var questionY = 420; var answerStartY = 1100; var answerGap = 220; // --- GUI: Soru Numarası ve Baraj Ödülü (üstte, temaya uygun altın renkli çerçeveyle) --- var questionNumTxt = new Text2('', { size: 80, fill: "#fff", font: "Arial Black" }); questionNumTxt.anchor.set(0.5, 0); questionNumTxt.x = LK.gui.width / 2; questionNumTxt.y = 20; LK.gui.top.addChild(questionNumTxt); var barajPrizeTxt = new Text2('', { size: 70, fill: 0xFFD700, font: "Arial Black" }); barajPrizeTxt.anchor.set(0.5, 0); barajPrizeTxt.x = LK.gui.width / 2; barajPrizeTxt.y = 110; LK.gui.top.addChild(barajPrizeTxt); // --- Büyük dairesel logo (arka plan efekti) --- var millionaireLogo = LK.getAsset('baraj', { anchorX: 0.5, anchorY: 0.5, scaleX: 8, scaleY: 8, x: centerX, y: 900 }); millionaireLogo.alpha = 0.08; game.addChild(millionaireLogo); // --- Soru Kutusu (büyük, koyu mavi, altın çerçeveli) --- questionBox = new QuestionBox(); questionBox.x = centerX; questionBox.y = questionY; game.addChild(questionBox); // --- Cevap Butonları (A, B, C, D) - Temaya uygun renkler ve düzen --- var answerAssetIds = ['answerA', 'answerB', 'answerC', 'answerD']; var answerColors = [0x1e2952, 0x1e2952, 0x1e2952, 0x1e2952]; var answerTextColors = ["#FFD700", "#FFD700", "#FFD700", "#FFD700"]; for (var i = 0; i < 4; i++) { var btn = new AnswerButton(); btn.init(answerAssetIds[i], String.fromCharCode(65 + i), function (idx) { return function () { handleAnswer(idx); }; }(i)); btn.x = centerX; btn.y = answerStartY + i * answerGap; btn.btn.tint = answerColors[i]; if (btn.txt && btn.txt.style) { btn.txt.style.fill = answerTextColors[i]; btn.txt.style.font = "Arial Black"; btn.txt.style.size = 70; } btn.originalColor = answerColors[i]; game.addChild(btn); answerButtons.push(btn); } // --- Baraj Göstergeleri (sağda, altın renkli, büyük ve parlak) --- for (var i = 0; i < barajIndexes.length; i++) { var baraj = new BarajIndicator(); baraj.setText(String(barajIndexes[i] + 1)); baraj.x = 2048 - 120; baraj.y = 180 + i * 120; baraj.circle.tint = 0xffd700; baraj.circle.alpha = 0.85; if (baraj.txt && baraj.txt.style) { baraj.txt.style.font = "Arial Black"; baraj.txt.style.fill = "#1e2952"; } game.addChild(baraj); barajIndicators.push(baraj); } // --- Show Question --- function showQuestion(idx) { isLocked = false; var q = questions[idx]; questionBox.setText(q.q); for (var i = 0; i < 4; i++) { answerButtons[i].setText(q.a[i]); answerButtons[i].setEnabled(true); } // Update question number questionNumTxt.setText("Soru: " + (idx + 1) + " / 50"); questionNumTxt.x = LK.gui.width / 2; questionNumTxt.y = 20; // Update baraj prize if (lastBarajPassed >= 0) { barajPrizeTxt.setText("Baraj: " + barajPrizes[lastBarajPassed]); } else { barajPrizeTxt.setText("Baraj: -"); } barajPrizeTxt.x = LK.gui.width / 2; barajPrizeTxt.y = 110; // Highlight baraj indicators for (var i = 0; i < barajIndicators.length; i++) { // If this is the current baraj question, highlight as gold if (barajIndexes[i] === idx) { barajIndicators[i].circle.alpha = 1; barajIndicators[i].circle.tint = 0xffd700; } // If this baraj was passed correctly, make it green else if (barajIndexes[i] < currentQuestion && barajIndexes[i] <= lastBarajPassed) { barajIndicators[i].circle.alpha = 1; barajIndicators[i].circle.tint = 0x32cd32; } // Not yet reached or not passed else { barajIndicators[i].circle.alpha = 0.5; barajIndicators[i].circle.tint = 0xffd700; } } // 35. soru için müzik başlat if (idx === 34) { LK.playMusic('musicId'); } else { LK.stopMusic(); } } // --- Handle Answer --- function handleAnswer(selectedIdx) { if (isLocked) { return; } isLocked = true; var q = questions[currentQuestion]; var correctIdx = q.correct; // Disable all buttons for (var i = 0; i < 4; i++) { answerButtons[i].setEnabled(false); } // Animate correct/incorrect if (selectedIdx === correctIdx) { // Correct: flash green // 35. soru ise müziği durdur if (currentQuestion === 34) { LK.stopMusic(); } tween(answerButtons[selectedIdx].btn, { tint: 0x32cd32 }, { duration: 200, onFinish: function onFinish() { tween(answerButtons[selectedIdx].btn, { tint: answerButtons[selectedIdx].originalColor }, { duration: 200 }); } }); // Check if baraj var isBaraj = false; for (var i = 0; i < barajIndexes.length; i++) { if (barajIndexes[i] === currentQuestion) { lastBarajPassed = i; isBaraj = true; break; } } // Next question or win LK.setTimeout(function () { if (currentQuestion === questions.length - 1) { // Win! LK.showYouWin(); } else { currentQuestion++; showQuestion(currentQuestion); } }, 600); } else { // Incorrect: flash red tween(answerButtons[selectedIdx].btn, { tint: 0xdc143c }, { duration: 200, onFinish: function onFinish() { tween(answerButtons[selectedIdx].btn, { tint: answerButtons[selectedIdx].originalColor }, { duration: 200 }); } }); // Also flash correct answer green tween(answerButtons[q.correct].btn, { tint: 0x32cd32 }, { duration: 200, onFinish: function onFinish() { tween(answerButtons[q.correct].btn, { tint: answerButtons[q.correct].originalColor }, { duration: 200 }); } }); // Show game over after short delay LK.setTimeout(function () { // 35. soruda yanlış cevap verildiyse müziği durdur if (currentQuestion === 34) { LK.stopMusic(); } // Baraj sorusu mu? var isBaraj = false; for (var i = 0; i < barajIndexes.length; i++) { if (barajIndexes[i] === currentQuestion) { isBaraj = true; break; } } // Baraj sorusunda yanlışsa, son barajı tut var prize; if (isBaraj) { // Baraj sorusunda yanlışsa, bir önceki barajı tutarız var lastPrizeIdx = lastBarajPassed >= 0 ? lastBarajPassed : -1; prize = lastPrizeIdx >= 0 ? barajPrizes[lastPrizeIdx] : "0 TL"; } else { // Baraj sorusu değilse, puan sıfırlanır prize = "0 TL"; } LK.showGameOver("Yanlış cevap! Kazandığın ödül: " + prize); }, 900); } } // --- Start Game --- function startGame() { currentQuestion = 0; lastBarajPassed = -1; showQuestion(currentQuestion); } startGame(); // --- No update needed, all logic is event-driven --- // --- Touch: prevent accidental double tap on answer buttons --- // (Handled by isLocked flag above)
===================================================================
--- original.js
+++ change.js
@@ -183,9 +183,20 @@
backgroundImageNode.parent.removeChild(backgroundImageNode);
backgroundImageNode = null;
}
// If bg is a string and matches a loaded image asset, use as texture
- if (typeof bg === "string" && LK.getAsset && LK.getAsset(bg, {})) {
+ var isImage = false;
+ if (typeof bg === "string") {
+ // Try to get the asset, but only treat as image if asset is an image
+ var asset = LK.getAsset(bg, {
+ anchorX: 0,
+ anchorY: 0
+ });
+ if (asset && asset.texture) {
+ isImage = true;
+ }
+ }
+ if (isImage) {
backgroundImageNode = LK.getAsset(bg, {
anchorX: 0,
anchorY: 0,
x: 0,