2 次代碼提交 34c1b6cf5a ... 799eb06ecf

作者 SHA1 備註 提交日期
  Pedro Tonini Rosenberg Schneider 799eb06ecf ✨ Add data for the Acrofony levels 3 年之前
  Pedro Tonini Rosenberg Schneider 7078f10201 🐛 Fix code layout to play nice with older version of JavaScript 3 年之前

+ 15 - 10
src/elements/EelementSelector.js

@@ -1,15 +1,20 @@
 class EelementSelector extends Object2D
 {
-    /** @type {Button} */
-    backButton = null;
-    /** @type {Button} */
-    earthButton = null;
-    /** @type {Button} */
-    waterButton = null;
-    /** @type {Button} */
-    fireButton = null;
-    /** @type {Button} */
-    airButton = null;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Button} */
+        this.backButton = null;
+        /** @type {Button} */
+        this.earthButton = null;
+        /** @type {Button} */
+        this.waterButton = null;
+        /** @type {Button} */
+        this.fireButton = null;
+        /** @type {Button} */
+        this.airButton = null;
+    }
 
     _setup()
     {

+ 23 - 18
src/elements/earth/EarthMinigameSelector.js

@@ -1,23 +1,28 @@
 class EarthMinigameSelector extends Object2D
 {
-    /** @type {Button} */
-    backButton = null;
-    /** @type {Button} */
-    foodHuntButton = null;
-    /** @type {Button} */
-    letterHuntButton = null;
-    /** @type {Button} */
-    acrofonyButton = null;
-    /** @type {Button} */
-    valise1Button = null;
-    /** @type {Button} */
-    valise2Button = null;
-    /** @type {Button} */
-    valise3Button = null;
-    /** @type {Button} */
-    rebusButton = null;
-    /** @type {Button} */
-    guessButton = null;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Button} */
+        this.backButton = null;
+        /** @type {Button} */
+        this.foodHuntButton = null;
+        /** @type {Button} */
+        this.letterHuntButton = null;
+        /** @type {Button} */
+        this.acrofonyButton = null;
+        /** @type {Button} */
+        this.valise1Button = null;
+        /** @type {Button} */
+        this.valise2Button = null;
+        /** @type {Button} */
+        this.valise3Button = null;
+        /** @type {Button} */
+        this.rebusButton = null;
+        /** @type {Button} */
+        this.guessButton = null;
+    }
 
     _setup()
     {

+ 323 - 0
src/elements/earth/acrofony/AcrofonyLevels.js

@@ -0,0 +1,323 @@
+var ACROFONY_LEVELS = {
+    tutorial:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Rrelógio",
+        syllable: ["RE", "LO", "GI"],
+    },
+
+    level1:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Dedo",
+        syllable: ["DE", "DO", "DA"],
+    },
+
+    level2:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Cueca",
+        syllable: ["CU", "E", "CA"],
+    },
+
+    level3:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Tigre",
+        syllable: ["TI", "GRE", "TO"],
+    },
+
+    level4:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Abelha",
+        syllable: ["A", "BE", "LHA"],
+    },
+
+    level5:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Macaco",
+        syllable: ["MA", "CA", "CO"],
+    },
+
+    level6:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Tomate",
+        syllable: ["TO", "MA", "TE"],
+    },
+
+    level7:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Óculos",
+        syllable: ["Ó", "CU", "LOS"],
+    },
+
+    level8:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Casa",
+        syllable: ["CA", "CO", "SA"],
+    },
+
+    level9:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Unha",
+        syllable: ["U", "O", "NHA"],
+    },
+
+    level10:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Vaca",
+        syllable: ["VA", "VE", "CA"],
+    },
+
+    level11:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Foca",
+        syllable: ["FO", "FA", "CA"],
+    },
+
+    level12:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Mesa",
+        syllable: ["ME", "MA", "SA"],
+    },
+
+    level13:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Cavalo",
+        syllable: ["CA", "LO", "VA"],
+    },
+
+    level14:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Juba",
+        syllable: ["JU", "BA", "UVA"],
+    },
+
+    level15:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Pena",
+        syllable: ["PE", "NE", "NA"],
+    },
+
+    level16:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Rato",
+        syllable: ["RA", "RU", "TO"],
+    },
+
+    level17:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Maçã",
+        syllable: ["MA", "MI", "ÇÃ"],
+    },
+
+    level18:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Chave",
+        syllable: ["CHA", "VO", "VE"],
+    },
+
+    level19:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Dominó",
+        syllable: ["DO", "MI", "NÓ"],
+    },
+
+    level20:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Toalha",
+        syllable: ["TO", "A", "LHA"],
+    },
+
+    level21:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Mato",
+        syllable: ["MA", "TO", "TU"],
+    },
+
+    level22:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Telefone",
+        syllable: ["TE", "LE", "FO"],
+    },
+
+    level23:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Avião",
+        syllable: ["A", "VI", "ÃO"],
+    },
+
+    level24:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Banana",
+        syllable: ["BA", "NA", "NE"],
+    },
+
+    level25:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Cadeira",
+        syllable: ["CA", "DEI", "RA"],
+    },
+
+    level26:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Xícara",
+        syllable: ["XÍ", "CA", "RA"],
+    },
+
+    level27:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Baleia",
+        syllable: ["BA", "LEI", "A"],
+    },
+
+    level28:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Tatu",
+        syllable: ["TA", "TU", "TO"],
+    },
+
+    level29:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Tapete",
+        syllable: ["TA", "PE", "TE"],
+    },
+
+    level30:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Anel",
+        syllable: ["A", "NEL", "LA"],
+    },
+
+    level31:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Batata",
+        syllable: ["BA", "TA", "TO"],
+    },
+
+    level32:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Caju",
+        syllable: ["CA", "JU", "JO"],
+    },
+
+    level33:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Tesoura",
+        syllable: ["TE", "SOU", "RA"],
+    },
+
+    level34:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Cebola",
+        syllable: ["CE", "BO", "LA"],
+    },
+
+    level35:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Noiva",
+        syllable: ["NO", "VA", "VI"],
+    },
+
+    level36:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Uva",
+        syllable: ["U", "O", "VA"],
+    },
+
+    level37:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Raio",
+        syllable: ["RA", "TO", "IO"],
+    },
+
+    level38:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Macaco",
+        syllable: ["MA", "CO", "CA"],
+    },
+
+    level39:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Caju",
+        syllable: ["RA", "TO", "TA"],
+    },
+
+    level40:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Cutia",
+        syllable: ["CU", "TI", "A"],
+    },
+
+    level41:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Jacaré",
+        syllable: ["JA", "CA", "RÉ"],
+    },
+
+    level42:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Janela",
+        syllable: ["JA", "NE", "LA"],
+    },
+
+    level43:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Bule",
+        syllable: ["BU", "LE", "LO"],
+    },
+
+    level44:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Bala",
+        syllable: ["BA", "BO", "LA"],
+    },
+
+    level45:
+    {
+        path: "assets/textures/glasses.png",
+        name: "Rei",
+        syllable: ["RE", "LO", "GI"],
+    },
+}

+ 45 - 0
src/elements/earth/acrofony/acrofonyleveldata.txt

@@ -0,0 +1,45 @@
+DEDO        DE DO DA
+CUECA       CU E CA
+TIGRE       TI GRE TO
+ABELHA      A BE LHA
+MACACO      MA CA CO
+TOMATE      TO MA TE
+ÓCULOS      Ó CU LOS
+CASA        CA CO SA
+UNHA        U O NHA
+VACA        VA VE CA
+FOCA        FO FA CA
+MESA        ME MA SA
+CAVALO      CA LO VA
+JUBA        JU BA UVA
+PENA        PE NE NA
+RATO        RA RU TO
+MAÇÃ        MA MI ÇÃ
+CHAVE       CHA VO VE
+DOMINÓ      DO MI NÓ
+TOALHA      TO A LHA
+MATO        MA TO TU
+TELEFONE    TE LE FO
+AVIÃO       A VI ÃO
+BANANA      BA NA NE
+CADEIRA     CA DEI RA
+XÍCARA      XÍ CA RA
+BALEIA      BA LEI A
+TATU        TA TU TO
+TAPETE      TA PE TE
+ANEL        A NEL LA
+BATATA      BA TA TO
+CAJU        CA JU JO
+TESOURA     TE SOU RA
+CEBOLA      CE BO LA
+NOIVA       NO VA VI
+UVA         U O VA
+RAIO        RA TO IO
+MACACO      MA CO CA
+RATO        RA TO TA
+CUTIA       CU TI A
+JACARÉ      JA CA RÉ
+JANELA      JA NE LA
+BULE        BU LE LO
+BALA        BA BO LA
+REI         RE LO GI

+ 7 - 2
src/elements/earth/foodHunt/FoodHuntBasket.js

@@ -1,7 +1,12 @@
 class FoodHuntBasket extends Object2D
 {
-    /** @type {FoodHuntPlayer} */
-    player = null;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {FoodHuntPlayer} */
+        this.player = null;
+    }
 
     _update( /** @type {Number} */ delta)
     {

+ 21 - 16
src/elements/earth/foodHunt/FoodHuntDialogue.js

@@ -1,23 +1,28 @@
 class FoodHuntDialogue extends Object2D
 {
-    /** @type {String} */
-    text1 = "Você conhece alguma árvore que dá tantos frutos diferentes assim?";
-    /** @type {String} */
-    text2 = " Já ouviu falar na grande árvore do Tamoromu? Converse com sua professora."
+    constructor(name)
+    {
+        super(name);
+        
+        /** @type {String} */
+        this.text1 = "Você conhece alguma árvore que dá tantos frutos diferentes assim?";
+        /** @type {String} */
+        this.text2 = " Já ouviu falar na grande árvore do Tamoromu? Converse com sua professora."
 
-    /** @type {Number} */
-    bgOpacity = 0;
-    /** @type {Number} */
-    text1Opacity = 0;
-    /** @type {Number} */
-    text2Opacity = 0;
+        /** @type {Number} */
+        this.bgOpacity = 0;
+        /** @type {Number} */
+        this.text1Opacity = 0;
+        /** @type {Number} */
+        this.text2Opacity = 0;
 
-    /** @type {Button} */
-    continueButton = null;
-    /** @type {Tween} */
-    tween = null;
-    /** @type {Timer} */
-    buttonTimer = null;
+        /** @type {Button} */
+        this.continueButton = null;
+        /** @type {Tween} */
+        this.tween = null;
+        /** @type {Timer} */
+        this.buttonTimer = null;
+    }
 
     _initSignals()
     {

+ 18 - 13
src/elements/earth/foodHunt/FoodHuntFruit.js

@@ -1,18 +1,23 @@
 class FoodHuntFruit extends Object2D
 {
-    /** @type {Number} */
-    G = 10;
-
-    /** @type {FoodHuntBasket} */
-    basket = null;
-    /** @type {Color} */
-    color = new Color(0, 0, 0);
-    /** @type {Number} */
-    r = 50;
-    /** @type {Number} */
-    fallVel = 0;
-    /** @type {Boolean} */
-    collected = false;
+    constructor(name)
+    {
+        super(name);
+        
+        /** @type {Number} */
+        this.G = 10;
+    
+        /** @type {FoodHuntBasket} */
+        this.basket = null;
+        /** @type {Color} */
+        this.color = new Color(0, 0, 0);
+        /** @type {Number} */
+        this.r = 50;
+        /** @type {Number} */
+        this.fallVel = 0;
+        /** @type {Boolean} */
+        this.collected = false;
+    }
 
     _initSignals()
     {

+ 35 - 30
src/elements/earth/foodHunt/FoodHuntGame.js

@@ -1,35 +1,40 @@
 class FoodHuntGame extends Object2D
 {
-    /** @type {Button} */
-    backButton = null;
-
-    /** @type {FoodHuntPlayer} */
-    player = null;
-    /** @type {FoodHuntTree} */
-    tree = null;
-    /** @type {Object2D} */
-    fruits = null;
-    /** @type {FoodHuntBasket} */
-    basket = null;
-    /** @type {FoodHuntDialogue} */
-    dialogue = null;
-
-    /** @type {Timer} */
-    initialTimer = null;
-    /** @type {Timer} */
-    gameTimer = null;
-    /** @type {Timer} */
-    fruitsTimer = null;
-    /** @type {Timer} */
-    endGameTimer = null;
-
-    /** @type {Boolean} */
-    gameStarted = false;
-    /** @type {Boolean} */
-    gameEnded = false;
-
-    /** @type {Number} */
-    points = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Button} */
+        this.backButton = null;
+    
+        /** @type {FoodHuntPlayer} */
+        this.player = null;
+        /** @type {FoodHuntTree} */
+        this.tree = null;
+        /** @type {Object2D} */
+        this.fruits = null;
+        /** @type {FoodHuntBasket} */
+        this.basket = null;
+        /** @type {FoodHuntDialogue} */
+        this.dialogue = null;
+    
+        /** @type {Timer} */
+        this.initialTimer = null;
+        /** @type {Timer} */
+        this.gameTimer = null;
+        /** @type {Timer} */
+        this.fruitsTimer = null;
+        /** @type {Timer} */
+        this.endGameTimer = null;
+    
+        /** @type {Boolean} */
+        this.gameStarted = false;
+        /** @type {Boolean} */
+        this.gameEnded = false;
+    
+        /** @type {Number} */
+        this.points = 0;
+    }
 
     _setup()
     {

+ 7 - 2
src/elements/earth/foodHunt/FoodHuntPlayer.js

@@ -1,7 +1,12 @@
 class FoodHuntPlayer extends Object2D
 {
-    /** @type {Number} */
-    direction = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Number} */
+        this.direction = 0;
+    }
 
     _setup()
     {

+ 19 - 14
src/elements/earth/letterHunt/LetterHuntDialogue.js

@@ -1,19 +1,24 @@
 class LetterHuntDialogue extends Object2D
 {
-    /** @type {String} */
-    text = ``;
-
-    /** @type {Number} */
-    bgOpacity = 0;
-    /** @type {Number} */
-    textOpacity = 0;
+    constructor(name)
+    {
+        super(name);
 
-    /** @type {Button} */
-    continueButton = null;
-    /** @type {Tween} */
-    tween = null;
-    /** @type {Timer} */
-    buttonTimer = null;
+        /** @type {String} */
+        this.text = ``;
+    
+        /** @type {Number} */
+        this.bgOpacity = 0;
+        /** @type {Number} */
+        this.textOpacity = 0;
+    
+        /** @type {Button} */
+        this.continueButton = null;
+        /** @type {Tween} */
+        this.tween = null;
+        /** @type {Timer} */
+        this.buttonTimer = null;
+    }
 
     _initSignals()
     {
@@ -43,7 +48,7 @@ class LetterHuntDialogue extends Object2D
 
     _draw( /** @type {number} */ delta, /** @type {p5.Graphics} */ db)
     {
-        this.text = `ACABOU O JOGO!\nVOCÊ GANHOU ${this.parent.points} PONTOS!`;
+        this.text = `ACABOU O JOGO!\n\nVOCÊ GANHOU ${this.parent.points} PONTOS!`;
         db.noStroke();
         db.fill(0, this.bgOpacity);
         db.rectMode(CENTER);

+ 26 - 21
src/elements/earth/letterHunt/LetterHuntGame.js

@@ -1,26 +1,31 @@
 class LetterHuntGame extends Object2D
 {
-    /** @type {Button} */
-    backButton = null;
-    /** @type {Object2D} */
-    plants = null;
-    /** @type {LetterHuntDialogue} */
-    dialogue = null;
-    /** @type {Timer} */
-    initialTimer = null;
-    /** @type {Timer} */
-    roundTimer = null;
-    /** @type {Timer} */
-    gameTimer = null;
-
-    /** @type {Boolean} */
-    gameStarted = false;
-    /** @type {Boolean} */
-    gameEnded = false;
-    /** @type {Number} */
-    points = 0;
-    /** @type {String} */
-    answerLetter = "";
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Button} */
+        this.backButton = null;
+        /** @type {Object2D} */
+        this.plants = null;
+        /** @type {LetterHuntDialogue} */
+        this.dialogue = null;
+        /** @type {Timer} */
+        this.initialTimer = null;
+        /** @type {Timer} */
+        this.roundTimer = null;
+        /** @type {Timer} */
+        this.gameTimer = null;
+
+        /** @type {Boolean} */
+        this.gameStarted = false;
+        /** @type {Boolean} */
+        this.gameEnded = false;
+        /** @type {Number} */
+        this.points = 0;
+        /** @type {String} */
+        this.answerLetter = "";
+    }
 
     _setup()
     {

+ 20 - 15
src/elements/earth/letterHunt/LetterHuntPlant.js

@@ -1,21 +1,26 @@
 class LetterHuntPlant extends Object2D
 {
-    /** @type {String} */
-    letter = "";
-
-    /** @type {Area2D} */
-    area = null;
-    /** @type {Boolean} */
-    mouseOver = false;
-    /** @type {Boolean} */
-    mosueIsDown = false;
-    /** @type {Boolean} */
-    selected = false;
-    /** @type {Boolean} */
-    selectable = true;
+    constructor(name)
+    {
+        super(name);
 
-    /** @type {Number} */
-    growSpeed = 2;
+        /** @type {String} */
+        this.letter = "";
+    
+        /** @type {Area2D} */
+        this.area = null;
+        /** @type {Boolean} */
+        this.mouseOver = false;
+        /** @type {Boolean} */
+        this.mosueIsDown = false;
+        /** @type {Boolean} */
+        this.selected = false;
+        /** @type {Boolean} */
+        this.selectable = true;
+    
+        /** @type {Number} */
+        this.growSpeed = 2;
+    }
 
     _initSignals()
     {

+ 9 - 4
src/elements/earth/rebus/game/RebusCardVisualEffect.js

@@ -21,10 +21,15 @@
 
 class RebusCardVisualEffect extends Object2D
 {
-    /** @type {number} */
-    glowIterations = 7;
-    /** @type {number} */
-    glowAmount = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {number} */
+        this.glowIterations = 7;
+        /** @type {number} */
+        this.glowAmount = 0;
+    }
 
     _draw( /** @type {number} */ delta, /** @type {p5.Graphics} */ db)
     {

+ 17 - 12
src/elements/earth/rebus/game/RebusGame.js

@@ -21,19 +21,24 @@
 
 class RebusGame extends Object2D
 {
-    /** @type {Object} */
-    levelData = null;
-    /** @type {Boolean} */
-    gameFinished = false;
-    /** @type {number} */
-    points = 3;
+    constructor(name)
+    {
+        super(name);
 
-    /** @type {Button} */
-    backButton = null;
-    /** @type {Button} */
-    continueButton = null;
-    /** @type {Button} */
-    timer = null;
+        /** @type {Object} */
+        this.levelData = null;
+        /** @type {Boolean} */
+        this.gameFinished = false;
+        /** @type {number} */
+        this.points = 3;
+    
+        /** @type {Button} */
+        this.backButton = null;
+        /** @type {Button} */
+        this.continueButton = null;
+        /** @type {Button} */
+        this.timer = null;
+    }
 
     _setup()
     {

+ 12 - 7
src/elements/earth/rebus/game/RebusGameVisualEffects.js

@@ -21,19 +21,24 @@
 
 class RebusGameVisualEffects extends Object2D
 {
-    /** @type {String} */
-    suffix = "";
-    /** @type {number} */
-    bgOpacity = 0;
-    /** @type {number} */
-    textOpacity = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {String} */
+        this.suffix = "";
+        /** @type {number} */
+        this.bgOpacity = 0;
+        /** @type {number} */
+        this.textOpacity = 0;
+    }
 
     _draw( /** @type {number} */ delta, /** @type {p5.Graphics} */ db)
     {
         if (this.parent.gameFinished)
         {
             db.noStroke();
-            db.fill(0, min(this.bgOpacity +=  75 * delta, 200));
+            db.fill(0, min(this.bgOpacity += 75 * delta, 200));
             db.rectMode(CENTER);
             db.rect(db.width / 2, db.height / 2, 1800, 600, 40, 40);
             db.textAlign(CENTER, CENTER);

+ 29 - 24
src/elements/earth/rebus/game/RebusOptionCard.js

@@ -21,30 +21,35 @@
 
 class RebusOptionCard extends Object2D
 {
-    /** @type {TextureRes} */
-    thumb = null;
-    /** @type {String} */
-    imgName = "";
-    /** @type {Boolean} */
-    isAnswer = false;
-    /** @type {Boolean} */
-    selected = false;
-    /** @type {Boolean} */
-    selectable = true;
-
-    /** @type {Color} */
-    fillColor = new Color(200, 200, 200);
-    /** @type {Boolean} */
-    mouseOver = false;
-    /** @type  {Boolean} */
-    mousePress = false;
-
-    /** @type {Boolean} */
-    tweenStarted = false;
-    /** @type {Tween} */
-    tween = null;
-    /** @type {Timer} */
-    timer = null;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {TextureRes} */
+        this.thumb = null;
+        /** @type {String} */
+        this.imgName = "";
+        /** @type {Boolean} */
+        this.isAnswer = false;
+        /** @type {Boolean} */
+        this.selected = false;
+        /** @type {Boolean} */
+        this.selectable = true;
+    
+        /** @type {Color} */
+        this.fillColor = new Color(200, 200, 200);
+        /** @type {Boolean} */
+        this.mouseOver = false;
+        /** @type  {Boolean} */
+        this.mousePress = false;
+    
+        /** @type {Boolean} */
+        this.tweenStarted = false;
+        /** @type {Tween} */
+        this.tween = null;
+        /** @type {Timer} */
+        this.timer = null;
+    }
 
     _initSignals()
     {

+ 13 - 8
src/elements/earth/rebus/game/RebusQuestionCard.js

@@ -21,15 +21,20 @@
 
 class RebusQuestionCard extends Object2D
 {
-    /** @type {TextureRes} */
-    thumb = null;
-    /** @type {String} */
-    imgName = "";
+    constructor(name)
+    {
+        super(name);
 
-    /** @type {Color} */
-    fillColor = new Color(200, 200, 200);
-    /** @type {Tween} */
-    tween = null;
+        /** @type {TextureRes} */
+        this.thumb = null;
+        /** @type {String} */
+        this.imgName = "";
+    
+        /** @type {Color} */
+        this.fillColor = new Color(200, 200, 200);
+        /** @type {Tween} */
+        this.tween = null;
+    }
 
     _setup()
     {

+ 7 - 2
src/elements/earth/rebus/level_selector/RebusLevelButton.js

@@ -21,8 +21,13 @@
 
 class RebusLevelButton extends Button
 {
-    /** @type {Object} */
-    levelData = null;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Object} */
+        this.levelData = null;
+    }
 
     _initSignals()
     {

+ 14 - 9
src/elements/earth/rebus/level_selector/RebusLevelSelector.js

@@ -21,16 +21,21 @@
 
 class RebusLevelSelector extends Object2D
 {
-    /** @type {Object} */
-    gridMargins = {
-        left: 0,
-        right: 0,
-        up: 500,
-        down: 0
-    };
+    constructor(name)
+    {
+        super(name);
 
-    /** @type {number} */
-    gridCols = 5;
+        /** @type {Object} */
+        this.gridMargins = {
+            left: 0,
+            right: 0,
+            up: 500,
+            down: 0
+        };
+    
+        /** @type {number} */
+        this.gridCols = 5;
+    }
 
     _setup()
     {

+ 27 - 20
src/elements/earth/rebus/tutorial/RebusTutorial.js

@@ -21,26 +21,33 @@
 
 class RebusTutorial extends Object2D
 {
-    /** @type {Object} */
-    levelData = null;
-    /** @type {Boolean} */
-    gameFinished = false;
-    /** @type {Number} */
-    points = 3;
-
-    /** @type {Button} */
-    backButton = null;
-    continueButton = null;
-    timer = null;
-
-    /** @type {Number} */
-    tutorialStep = 0;
-    /** @type {Array} */
-    questionCards = [];
-    /** @type {Array} */
-    optionCards = [];
-    /** @type {Number} */
-    answerIdx = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {Object} */
+        this.levelData = null;
+        /** @type {Boolean} */
+        this.gameFinished = false;
+        /** @type {Number} */
+        this.points = 3;
+    
+        /** @type {Button} */
+        this.backButton = null;
+        /** @type {Button} */
+        this.continueButton = null;
+        /** @type {Timer} */
+        this.timer = null;
+    
+        /** @type {Number} */
+        this.tutorialStep = 0;
+        /** @type {Array} */
+        this.questionCards = [];
+        /** @type {Array} */
+        this.optionCards = [];
+        /** @type {Number} */
+        this.answerIdx = 0;
+    }
 
     _setup()
     {

+ 11 - 6
src/elements/earth/rebus/tutorial/RebusTutorialVisualEffects.js

@@ -21,12 +21,17 @@
 
 class RebusTutorialVisualEffects extends Object2D
 {
-    /** @type {String} */
-    text = "";
-    /** @type {Number} */
-    bgOpacity = 0;
-    /** @type {Number} */
-    textOpacity = 0;
+    constructor(name)
+    {
+        super(name);
+
+        /** @type {String} */
+        this.text = "";
+        /** @type {Number} */
+        this.bgOpacity = 0;
+        /** @type {Number} */
+        this.textOpacity = 0;
+    }
 
     _draw( /** @type {number} */ delta, /** @type {p5.Graphics} */ db)
     {