User prompt
Also add the gradient backround and answer button styling
User prompt
Make the loading screen fast
User prompt
Make the game visible
User prompt
Remove the black background
User prompt
Make the game look more cool
User prompt
Add backgrounds
User prompt
Make the game harder with multiple different questions
User prompt
Position the answer text to the centre of each answer button
User prompt
Make the answer buttons bigger to press
User prompt
Generate new questions each time they play the game
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'self.color = new Graphics();' Line Number: 11
User prompt
Add button colors
Initial prompt
GameKahoot
===================================================================
--- original.js
+++ change.js
@@ -14,8 +14,12 @@
color: 0x0000ff,
shape: 'box',
glow: true
});
+ self.color.filters = [new filters.GlowFilter({
+ distance: 15,
+ outerStrength: 2
+ })];
self.addChildAt(self.color, 0);
self.text.anchor.set(0.5, 0.5);
self.text.x = self.color.width / 2;
self.text.y = self.color.height / 2;
@@ -48,8 +52,9 @@
dropShadowColor: "#000000",
dropShadowBlur: 4,
dropShadowDistance: 6
});
+ self.text.filters = [new filters.DropShadowFilter()];
self.text.anchor.set(0.5, 0.5);
self.addChild(self.text);
self.setText = function (text) {
self.text.setText(text);
@@ -66,8 +71,14 @@
/****
* Game Code
****/
+var background = game.attachAsset('background', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2
+});
// Function to generate random questions with different operations
function generateQuestions() {
var questions = [];
var operations = ['+', '-', '*', '/'];