Bladeren bron

conflict with phaser files solved | some documentation was added to ease the understanding of the code during this process | pt-br translation corrections | fixed some redundant assets | some GUI changes

lairaalmas 6 jaren geleden
bovenliggende
commit
5df0a88dc5
100 gewijzigde bestanden met toevoegingen van 437 en 207 verwijderingen
  1. 0 1
      README.md
  2. 10 0
      TEMPORARIOS/CODIGO DO TEXT FIELD PARA ADAPTAR.js
  3. 0 0
      TEMPORARIOS/backup.zip
  4. BIN
      TEMPORARIOS/funcoes-do-phaser.odt
  5. 74 103
      index.html
  6. 59 0
      js/auxiliar.js
  7. 111 72
      js/boot.js
  8. 53 10
      js/circleOne.js
  9. 26 8
      js/menu.js
  10. 52 10
      js/squareOne.js
  11. 52 3
      js/squareTwo.js
  12. 0 0
      resource/img/airballoon_base.png
  13. 0 0
      resource/img/airballoon_upper.png
  14. 0 0
      resource/img/bg.jpg
  15. 0 0
      resource/img/bg_map.png
  16. 0 0
      resource/img/birch.png
  17. 0 0
      resource/img/cloud.png
  18. BIN
      resource/img/es_PE/airballoon_base.png
  19. BIN
      resource/img/es_PE/airballoon_upper.png
  20. BIN
      resource/img/es_PE/birch.png
  21. BIN
      resource/img/es_PE/farm.png
  22. BIN
      resource/img/es_PE/flag.png
  23. BIN
      resource/img/es_PE/garage.png
  24. BIN
      resource/img/es_PE/house.png
  25. BIN
      resource/img/es_PE/kid/lost.png
  26. BIN
      resource/img/es_PE/kid/run.png
  27. BIN
      resource/img/es_PE/kid/walk.png
  28. BIN
      resource/img/es_PE/place_a.png
  29. BIN
      resource/img/es_PE/place_b.png
  30. BIN
      resource/img/es_PE/rock.png
  31. BIN
      resource/img/es_PE/school.png
  32. BIN
      resource/img/es_PE/sign.png
  33. BIN
      resource/img/es_PE/tractor/frame-0.png
  34. BIN
      resource/img/es_PE/tractor/frame-1.png
  35. BIN
      resource/img/es_PE/tractor/frame-2.png
  36. BIN
      resource/img/es_PE/tractor/frame-3.png
  37. BIN
      resource/img/es_PE/tractor/frame-4.png
  38. BIN
      resource/img/es_PE/tractor/frame-5.png
  39. BIN
      resource/img/es_PE/tractor/frame-6.png
  40. BIN
      resource/img/es_PE/tractor/frame-7.png
  41. BIN
      resource/img/es_PE/tractor/frame-8.png
  42. BIN
      resource/img/es_PE/tractor/frame-9.png
  43. BIN
      resource/img/es_PE/tractor/frame.png
  44. BIN
      resource/img/es_PE/tree.png
  45. BIN
      resource/img/es_PE/tree2.png
  46. BIN
      resource/img/es_PE/tree3.png
  47. BIN
      resource/img/es_PE/tree4.png
  48. 0 0
      resource/img/farm.png
  49. 0 0
      resource/img/flag.png
  50. 0 0
      resource/img/floor.png
  51. BIN
      resource/img/fr_FR/airballoon_base.png
  52. BIN
      resource/img/fr_FR/airballoon_upper.png
  53. BIN
      resource/img/fr_FR/birch.png
  54. BIN
      resource/img/fr_FR/farm.png
  55. BIN
      resource/img/fr_FR/flag.png
  56. BIN
      resource/img/fr_FR/garage.png
  57. BIN
      resource/img/fr_FR/house.png
  58. BIN
      resource/img/fr_FR/kid/lost.png
  59. BIN
      resource/img/fr_FR/kid/run.png
  60. BIN
      resource/img/fr_FR/kid/walk.png
  61. BIN
      resource/img/fr_FR/place_a.png
  62. BIN
      resource/img/fr_FR/place_b.png
  63. BIN
      resource/img/fr_FR/rock.png
  64. BIN
      resource/img/fr_FR/school.png
  65. BIN
      resource/img/fr_FR/sign.png
  66. BIN
      resource/img/fr_FR/tractor/frame-0.png
  67. BIN
      resource/img/fr_FR/tractor/frame-1.png
  68. BIN
      resource/img/fr_FR/tractor/frame-2.png
  69. BIN
      resource/img/fr_FR/tractor/frame-3.png
  70. BIN
      resource/img/fr_FR/tractor/frame-4.png
  71. BIN
      resource/img/fr_FR/tractor/frame-5.png
  72. BIN
      resource/img/fr_FR/tractor/frame-6.png
  73. BIN
      resource/img/fr_FR/tractor/frame-7.png
  74. BIN
      resource/img/fr_FR/tractor/frame-8.png
  75. BIN
      resource/img/fr_FR/tractor/frame-9.png
  76. BIN
      resource/img/fr_FR/tractor/frame.png
  77. BIN
      resource/img/fr_FR/tree.png
  78. BIN
      resource/img/fr_FR/tree2.png
  79. BIN
      resource/img/fr_FR/tree3.png
  80. BIN
      resource/img/fr_FR/tree4.png
  81. 0 0
      resource/img/game/five-s.png
  82. 0 0
      resource/img/game/four-c.png
  83. 0 0
      resource/img/game/four-s.png
  84. 0 0
      resource/img/game/one-c.png
  85. 0 0
      resource/img/game/one-s.png
  86. 0 0
      resource/img/game/three-c.png
  87. 0 0
      resource/img/game/three-s.png
  88. 0 0
      resource/img/game/two-c.png
  89. 0 0
      resource/img/game/two-s.png
  90. 0 0
      resource/img/garage.png
  91. 0 0
      resource/img/help/arrow.png
  92. 0 0
      resource/img/help/double.png
  93. 0 0
      resource/img/help/down.png
  94. 0 0
      resource/img/help/error.png
  95. 0 0
      resource/img/help/ok.png
  96. 0 0
      resource/img/help/pointer.png
  97. 0 0
      resource/img/house.png
  98. 0 0
      resource/img/kid/lost.png
  99. 0 0
      resource/img/kid/run.png
  100. 0 0
      resource/img/en_US/kid/walk.png

+ 0 - 1
README.md

@@ -1 +0,0 @@
-# iFractions

+ 10 - 0
TEMPORARIOS/CODIGO DO TEXT FIELD PARA ADAPTAR.js

@@ -0,0 +1,10 @@
+nameField: function(){
+    var x = document.createElement("INPUT");
+    x.setAttribute("type","text");
+    x.setAttribute("value","Entre seu nome");
+    
+    //var temp = game.add.???(x);
+    //temp.anchor.setTo(0.5);
+    
+    //document.body.appendChild(x);
+}, 

backup.zip → TEMPORARIOS/backup.zip


BIN
TEMPORARIOS/funcoes-do-phaser.odt


+ 74 - 103
index.html

@@ -1,119 +1,90 @@
-<!DOCTYPE html>  
+
+<!DOCTYPE html>
+
 <html>
+    
     <head>  
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-        <title> Fractions </title>
+        <title> iFractions </title>
         <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
-        <script type="text/javascript" src="js/phaser.min.js"></script>
+        
+        <script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script>
+        
         <script type="text/javascript" src="js/boot.js"></script>
         <script type="text/javascript" src="js/menu.js"></script>
         <script type="text/javascript" src="js/circleOne.js"></script>
         <script type="text/javascript" src="js/squareOne.js"></script>
         <script type="text/javascript" src="js/squareTwo.js"></script>
+        <script type="text/javascript" src="js/auxiliar.js"></script>
+    
     </head>
 
     <body>
 
-    <div class="container">
-    	<div class="clearfix"></div>
-        <div class="panel panel-primary">
-          <div class="panel-heading">FRACTIONS GAME</div>
-          <div class="panel-body">
-            <center>
-                <div id="fractions-game" style="padding: 0 auto 0 auto;"></div>
-            </center>
-          </div>
-        </div>
-        <div class="panel panel-info">
-          <div class="panel-heading">COOPERATION TEAM</div>
-          <div class="panel-body">
-            <center>
-                <ul>
-                  <li><strong>BRAZIL:</strong> Le&ocirc;nidas de Oliveira Brand&atilde;o (IME-USP)</li>
-                  <li><strong>PERU:</strong> Manuel Ibarra and Cristhian Serrano (EAPIIS-UNAMBA)</li>
-                  <li><strong>FRANCE:</strong> Jean-Marc (MOCAH-UPMC)</li>
-                </ul>
-            </center>
-          </div>
-        </div>
-        <div class="panel panel-default">
-          <div class="panel-heading">BASED ON</div>
-          <div class="panel-body">
-            <center>
-                <ul>
-                  <li><strong>iLM </strong>(interactive Learning Modules) </li>
-                  <li><strong>Six facets of Serious Game Design</strong>:<br>
-Pedagogical Objectives; Domain Simulation; Interactions with the Simulation; Problems and Progression; Decorum and Conditions of Use.
-</li>
-                </ul>
-            </center>
-          </div>
-        </div>
-        <div class="panel panel-danger">
-          <div class="panel-heading">TECHNOLOGY</div>
-          <div class="panel-body">
-            <center>
-                <ul>
-                  <li> We used <strong>HTML5</strong>, <strong>CSS</strong> and the <strong>Javascript</strong> Library <a href="http://phaser.io/" target="_blank"><strong>Phaser.io</strong></a> </li>
-                </ul>
-            </center>
-          </div>
-        </div>
-    </div>
+	    <div class="container">
+	    	<div class="clearfix"></div>
+	        
+	        <div class="panel panel-primary">
+	          <div class="panel-heading">IFRACTIONS GAME</div>
+	          <div class="panel-body">
+	            <center>
+	            	<!-- fractions-game é o id que puxa o canvas do phaser -->
+	                <div id="fractions-game" style="padding: 0 auto 0 auto;"></div>
+	            </center>
+	          </div>
+	        </div>
+	        
+	        <div class="panel panel-info">
+	          <div class="panel-heading">TEAM</div>
+	          <div class="panel-body">
+	            <center>
+	                <ul>
+	                  <li><strong>BRAZIL:</strong> Le&ocirc;nidas de Oliveira Brand&atilde;o (IME-USP)</li>
+	                  <li><strong>PERU:</strong> Manuel Ibarra and Cristhian Serrano (EAPIIS-UNAMBA)</li>
+	                  <li><strong>FRANCE:</strong> Jean-Marc (MOCAH-UPMC)</li>
+	                </ul>
+	            </center>
+	          </div>
+	        </div>
+	        
+	        <div class="panel panel-default">
+	          <div class="panel-heading">BASED ON</div>
+	          <div class="panel-body">
+	            <center>
+	                <ul>
+	                  <li><strong>iLM </strong>(interactive Learning Modules) </li>
+	                  <li><strong>Six facets of Serious Game Design</strong>: Pedagogical Objectives; Domain Simulation; Interactions with the Simulation;<br>Problems and Progression; Decorum and Conditions of Use.</li>
+	                </ul>
+	            </center>
+	          </div>
+	        </div>
+	        
+	        <div class="panel panel-danger">
+	          <div class="panel-heading">TECHNOLOGY</div>
+	          <div class="panel-body">
+	            <center>
+	                <ul>
+	                  <li> We used <strong>HTML5</strong>, <strong>CSS</strong> and the <strong>Javascript</strong> library <a href="http://phaser.io/" target="_blank"><strong>Phaser.io</strong></a> </li>
+	                </ul>
+	            </center>
+	          </div>
+	        </div>
+
+	        <!--
+			<div class="panel panel-danger">
+	          <div class="panel-heading">TESTE</div>
+	          <div class="panel-body">
+	            <center>
+			        <form action="" method="">
+						<legend>DIGITE SEU NOME</legend>
+						><input type="name_textfield" name="name" value="" size="22" maxlength="20"><<br><br>
+					</form>
+				</center>
+			</div>
+			-->
+
+	    </div>
         
     </body>
 
-    
-        
-    <script type="text/javascript">
-        // Initialize the game
-        var game = new Phaser.Game(900, 600, Phaser.CANVAS, 'fractions-game');
-        
-        hip = "143.107.45.11"; //Host ip
-        name = ""; //player name
-        lang = ""; //language
-        var timer, totalTime;
-            // Game One 
-         onePosition = 0; //Map position
-         oneMove = false; //Move to next position
-         oneDifficulty = 0; //From one to five 
-         oneOperator= ""; //Plus; Minus; Mixed
-         oneLabel= false; //Show block label
-         oneShape = ""; //Circle; square
-         oneType = ""; // A - Place distance; B - Select blocks
-         oneMenu = true;
-            // Game Two
-         twoPosition = 0; //Map position
-         twoMove = false; //Move to next position
-         twoDifficulty = 0; //From one to five 
-         twoOperator= ""; //Plus; Minus; Mixed
-         twoLabel= false; //Show block label
-         twoShape = ""; //Circle; square
-         twoType = ""; // A - Normal position; B - Random position
-         twoMenu= true;
-        
-        //adding game states (scenes)
-        game.state.add('boot', bootState);  
-        game.state.add('load', loadState); 
-        game.state.add('name', nameState);
-        game.state.add('menu', menuState);  
-        
-        game.state.add('menuCOne', menuCircleOne);
-        game.state.add('mapCOne', mapCircleOne);
-        game.state.add('gameCOne', gameCircleOne);
-        game.state.add('endCOne', endCircleOne);
-                
-        game.state.add('menuSOne', menuSquareOne);
-        game.state.add('mapSOne', mapSquareOne);
-        game.state.add('gameSOne', gameSquareOne);
-        game.state.add('endSOne', endSquareOne);
-        
-        game.state.add('menuSTwo', menuSquareTwo);
-        game.state.add('mapSTwo', mapSquareTwo);
-        game.state.add('gameSTwo', gameSquareTwo);
-        game.state.add('endSTwo', endSquareTwo);
-        
-        //starting to boot game
-        game.state.start('boot');
-    </script>
-    </html>
+</html>

+ 59 - 0
js/auxiliar.js

@@ -0,0 +1,59 @@
+
+    var timer, totalTime;
+
+    // Initialize the game
+    var game = new Phaser.Game(
+        900, 
+        600, 
+        Phaser.CANVAS,
+        'fractions-game'
+    );
+
+    hip = "143.107.45.11"; //Host ip
+    name = ""; //player name
+    lang = ""; //language
+
+    // Game One 
+    onePosition = 0; //Map position
+    oneMove = false; //Move to next position
+    oneDifficulty = 0; //From one to five 
+    oneOperator= ""; //Plus; Minus; Mixed
+    oneLabel= false; //Show block label
+    oneShape = ""; //Circle; square
+    oneType = ""; // A - Place distance; B - Select blocks
+    oneMenu = true;
+
+    // Game Two
+    twoPosition = 0; //Map position
+    twoMove = false; //Move to next position
+    twoDifficulty = 0; //From one to five 
+    twoOperator= ""; //Plus; Minus; Mixed
+    twoLabel= false; //Show block label
+    twoShape = ""; //Circle; square
+    twoType = ""; // A - Normal position; B - Random position
+    twoMenu= true;
+
+    //adding game states (scenes)
+    game.state.add('boot', bootState); // boot.js
+    game.state.add('load', loadState); // boot.js
+    game.state.add('name', nameState); // boot.js
+
+    game.state.add('menu', menuState); // menu.js
+
+    game.state.add('menuCOne', menuCircleOne); // circleOne.js
+    game.state.add('mapCOne', mapCircleOne); // circleOne.js
+    game.state.add('gameCOne', gameCircleOne); // circleOne.js
+    game.state.add('endCOne', endCircleOne); // circleOne.js
+
+    game.state.add('menuSOne', menuSquareOne); // squareOne.js
+    game.state.add('mapSOne', mapSquareOne); // squareOne.js
+    game.state.add('gameSOne', gameSquareOne); // squareOne.js
+    game.state.add('endSOne', endSquareOne); // squareOne.js
+
+    game.state.add('menuSTwo', menuSquareTwo); // squareTwo.js
+    game.state.add('mapSTwo', mapSquareTwo); // squareTwo.js
+    game.state.add('gameSTwo', gameSquareTwo); // squareTwo.js
+    game.state.add('endSTwo', endSquareTwo); // squareTwo.js
+
+    //starting to boot game
+    game.state.start('boot');

+ 111 - 72
js/boot.js

@@ -1,4 +1,31 @@
+
+var nameLbl;
+
+/*
+    var bootState = {
+        preload: function(){},
+        create: function(){},
+        setLang: function(){}
+    };
+    
+    var loadState = {
+        preload: function(){},
+        preload: function(){},
+        create: function(){}
+    };
+        
+    var nameState = {
+        preload: function(){},
+        create: function(){},
+        clearName: function(){},
+        keyPressed: function( char ){},
+        ready: function(){}
+    };
+*/
+
+// choose language screen
 var bootState = {
+    
     preload: function () {
         //Progress bar image
         game.load.image('progressBar', 'resource/img/global/pgbar.png');
@@ -8,40 +35,45 @@ var bootState = {
         game.load.image('flag_US', 'resource/img/flag/UNST.jpg');
         game.load.image('flag_FR', 'resource/img/flag/FRAN.jpg');
     },
+
     create: function() {
+
         //game settings
         game.stage.backgroundColor = '#cce5ff';
-        
         game.physics.startSystem(Phaser.Physics.ARCADE);
         var style = { font: '28px Arial', fill: '#00804d', align: 'center' };
-        
+
         //generating language selection
-         //pt_BR
-        var title1 = game.add.text(this.game.world.centerX - 220, this.game.world.centerY - 100, 'FRACÇÕES', style);
+
+        //pt_BR
+        var title1 = game.add.text(this.game.world.centerX - 220, this.game.world.centerY - 100, 'FRAÇÕES  ', style);
         title1.anchor.setTo(1, 0.5);
         var flag1 = game.add.sprite(this.game.world.centerX - 220, this.game.world.centerY - 100, 'flag_BR');       
         flag1.anchor.setTo(0, 0.5);
         flag1.inputEnabled = true;
         flag1.input.useHandCursor = true;
         flag1.events.onInputDown.add(this.setLang,{lang:'pt_BR'});
-         //es_PE
-        var title2 = game.add.text(this.game.world.centerX + 200, this.game.world.centerY - 100, 'FRACCIONES', style);
+
+        //es_PE
+        var title2 = game.add.text(this.game.world.centerX + 200, this.game.world.centerY - 100, 'FRACCIONES  ', style);
         title2.anchor.setTo(1, 0.5);
         var flag2 = game.add.sprite(this.game.world.centerX + 200, this.game.world.centerY - 100, 'flag_PE');       
         flag2.anchor.setTo(0, 0.5);
         flag2.inputEnabled = true;
         flag2.input.useHandCursor = true;
         flag2.events.onInputDown.add(this.setLang,{lang:'es_PE'});
-         //en_US
-        var title3 = game.add.text(this.game.world.centerX - 220, this.game.world.centerY + 100, 'FRACTIONS', style);
+
+        //en_US
+        var title3 = game.add.text(this.game.world.centerX - 220, this.game.world.centerY + 100, 'FRACTIONS  ', style);
         title3.anchor.setTo(1, 0.5);
         var flag3 = game.add.sprite(this.game.world.centerX - 220, this.game.world.centerY + 100, 'flag_US');       
         flag3.anchor.setTo(0, 0.5);
         flag3.inputEnabled = true;
         flag3.input.useHandCursor = true;
         flag3.events.onInputDown.add(this.setLang,{lang:'en_US'});
-         //fr_FR
-        var title4 = game.add.text(this.game.world.centerX + 200, this.game.world.centerY + 100, 'FRACTIONS', style);
+
+        //fr_FR
+        var title4 = game.add.text(this.game.world.centerX + 200, this.game.world.centerY + 100, 'FRACTIONS  ', style);
         title4.anchor.setTo(1, 0.5);
         var flag4 = game.add.sprite(this.game.world.centerX + 200, this.game.world.centerY + 100, 'flag_FR');       
         flag4.anchor.setTo(0, 0.5);
@@ -57,10 +89,13 @@ var bootState = {
         //start resource loading
         game.state.start('load');
     }
+
 };
 
+// loading screen (+loading assets)
 var loadState = {
     
+    //called on setPreloadImage
     preload: function () {
         //Progress bar image
         game.load.image('progressBar', 'resource/img/global/pgbar.png');
@@ -82,88 +117,89 @@ var loadState = {
         game.load.json('dictionary', 'resource/lang/'+lang+'.json');
                 
         // Loading global assets (sprites and images)
-        var baseimg = 'resource/img/global/';
+        var imgsrc = 'resource/img/';
         
-        game.load.image('bgimage', baseimg+'bg.jpg');
-        game.load.image('bgmap', baseimg+'bg_map.png');
-        game.load.image('cloud', baseimg+'cloud.png');
-        game.load.image('floor', baseimg+'floor.png');
-        game.load.image('road', baseimg+'road.png');
+        game.load.image('bgimage', imgsrc+'bg.jpg');
+        game.load.image('bgmap', imgsrc+'bg_map.png');
+        game.load.image('cloud', imgsrc+'cloud.png');
+        game.load.image('floor', imgsrc+'floor.png');
+        game.load.image('road', imgsrc+'road.png');
         
          //games list buttons
-        game.load.image('game1c', baseimg+'game/one-c.png');
-		game.load.image('game2c', baseimg+'game/two-c.png');
-		game.load.image('game3c', baseimg+'game/three-c.png');
-		game.load.image('game4c', baseimg+'game/four-c.png');
-        game.load.image('game1s', baseimg+'game/one-s.png');
-		game.load.image('game2s', baseimg+'game/two-s.png');
-		game.load.image('game3s', baseimg+'game/three-s.png');
-		game.load.image('game4s', baseimg+'game/four-s.png');
-		game.load.image('game5s', baseimg+'game/five-s.png');
+        game.load.image('game1c', imgsrc+'game/one-c.png');
+		game.load.image('game2c', imgsrc+'game/two-c.png');
+		game.load.image('game3c', imgsrc+'game/three-c.png');
+		game.load.image('game4c', imgsrc+'game/four-c.png');
+        game.load.image('game1s', imgsrc+'game/one-s.png');
+		game.load.image('game2s', imgsrc+'game/two-s.png');
+		game.load.image('game3s', imgsrc+'game/three-s.png');
+		game.load.image('game4s', imgsrc+'game/four-s.png');
+		game.load.image('game5s', imgsrc+'game/five-s.png');
          //header menu
-        game.load.image('back', baseimg+'menu/back.png');
-        game.load.image('home', baseimg+'menu/home.png');
-        game.load.image('info', baseimg+'menu/info.png');
-        game.load.image('world', baseimg+'menu/language.png');
-        game.load.image('list', baseimg+'menu/menu.png');
-        game.load.image('help', baseimg+'menu/help.png');
-        game.load.image('pgbar', baseimg+'menu/progressBar.png');
-        game.load.image('block', baseimg+'menu/block.png');
-        game.load.image('eraser', baseimg+'menu/eraser.png');
+        game.load.image('back', imgsrc+'menu/back.png');
+        game.load.image('home', imgsrc+'menu/home.png');
+        game.load.image('info', imgsrc+'menu/info.png');
+        game.load.image('world', imgsrc+'menu/language.png');
+        game.load.image('list', imgsrc+'menu/menu.png');
+        game.load.image('help', imgsrc+'menu/help.png');
+        game.load.image('pgbar', imgsrc+'menu/progressBar.png');
+        game.load.image('block', imgsrc+'menu/block.png');
+        game.load.image('eraser', imgsrc+'menu/eraser.png');
          //operators
-		game.load.image('add', baseimg+'operator/add.png');
-		game.load.image('subtract', baseimg+'operator/subtract.png');
-		game.load.image('separator', baseimg+'operator/separator.png');
-		game.load.image('equal', baseimg+'operator/equal.png');
+		game.load.image('add', imgsrc+'operator/add.png');
+		game.load.image('subtract', imgsrc+'operator/subtract.png');
+		game.load.image('separator', imgsrc+'operator/separator.png');
+		game.load.image('equal', imgsrc+'operator/equal.png');
          //helpers
-		game.load.image('h_arrow', baseimg+'help/arrow.png');
-		game.load.image('h_double', baseimg+'help/double.png');
-		game.load.image('h_error', baseimg+'help/error.png');
-		game.load.image('h_ok', baseimg+'help/ok.png');
-        game.load.image('down', baseimg+'help/down.png');        
-        game.load.image('pointer', baseimg+'help/pointer.png');
+		game.load.image('h_arrow', imgsrc+'help/arrow.png');
+		game.load.image('h_double', imgsrc+'help/double.png');
+		game.load.image('h_error', imgsrc+'help/error.png');
+		game.load.image('h_ok', imgsrc+'help/ok.png');
+        game.load.image('down', imgsrc+'help/down.png');        
+        game.load.image('pointer', imgsrc+'help/pointer.png');
         
-        // Loading assets based on lang
-        var basesrc = 'resource/img/'+lang+'/';
+        // Loading assets based on lang        
+        game.load.spritesheet('kid_run', imgsrc+'kid/run.png', 82, 178, 12);
+        game.load.spritesheet('kid_walk', imgsrc+'kid/walk.png', 78, 175, 24);
+        game.load.spritesheet('kid_lost', imgsrc+'kid/lost.png', 72, 170, 6);
+        game.load.spritesheet('tractor', imgsrc+'tractor/frame.png', 201, 144, 10);
+        game.load.image('balloon', imgsrc+'airballoon_upper.png');
+        game.load.image('balloon_basket', imgsrc+'airballoon_base.png');
+        game.load.image('birch', imgsrc+'birch.png');
+        game.load.image('flag', imgsrc+'flag.png');
+        game.load.image('house', imgsrc+'house.png');
+        game.load.image('place_a', imgsrc+'place_a.png');
+        game.load.image('place_b', imgsrc+'place_b.png');
+        game.load.image('garage', imgsrc+'garage.png');
+        game.load.image('farm', imgsrc+'farm.png');
+        game.load.image('rock', imgsrc+'rock.png');
+        game.load.image('school', imgsrc+'school.png');
+        game.load.image('sign', imgsrc+'sign.png');
+        game.load.image('tree1', imgsrc+'tree.png');
+        game.load.image('tree2', imgsrc+'tree2.png');
+        game.load.image('tree3', imgsrc+'tree3.png');
+        game.load.image('tree4', imgsrc+'tree4.png');
         
-        game.load.spritesheet('kid_run', basesrc+'kid/run.png', 82, 178, 12);
-        game.load.spritesheet('kid_walk', basesrc+'kid/walk.png', 78, 175, 24);
-        game.load.spritesheet('kid_lost', basesrc+'kid/lost.png', 72, 170, 6);
-        game.load.spritesheet('tractor', basesrc+'tractor/frame.png', 201, 144, 10);
-        game.load.image('balloon', basesrc+'airballoon_upper.png');
-        game.load.image('balloon_basket', basesrc+'airballoon_base.png');
-        game.load.image('birch', basesrc+'birch.png');
-        game.load.image('flag', basesrc+'flag.png');
-        game.load.image('house', basesrc+'house.png');
-        game.load.image('place_a', basesrc+'place_a.png');
-        game.load.image('place_b', basesrc+'place_b.png');
-        game.load.image('garage', basesrc+'garage.png');
-        game.load.image('farm', basesrc+'farm.png');
-        game.load.image('rock', basesrc+'rock.png');
-        game.load.image('school', basesrc+'school.png');
-        game.load.image('sign', basesrc+'sign.png');
-        game.load.image('tree1', basesrc+'tree.png');
-        game.load.image('tree2', basesrc+'tree2.png');
-        game.load.image('tree3', basesrc+'tree3.png');
-        game.load.image('tree4', basesrc+'tree4.png');
-        
-                
         // Loadind Sound Effects
         game.load.audio('sound_ok', ['resource/fx/ok.ogg', 'resource/fx/ok.mp3']);
         game.load.audio('sound_error', ['resource/fx/error.ogg', 'resource/fx/error.mp3']);
         game.load.audio('sound_beep', ['resource/fx/beep.ogg', 'resource/fx/beep.mp3']);
         
     },
+
     create: function() {  
         game.state.start('name');
     }
 };
 
-var nameLbl;
+// type name screen
 var nameState = {
+
     preload: function () {
         //textbox
+
     },
+
     create: function() {
         //game settings
         game.stage.backgroundColor = '#cce5ff';
@@ -187,7 +223,7 @@ var nameState = {
         nameBox.drawRect(0, 0, 400, 100);
         nameBox.alpha = 0.5;
         nameBox.endFill();
-        
+
         nameLbl = game.add.text(this.game.world.centerX, this.game.world.centerY, "", styleName);
         nameLbl.anchor.setTo(0.5);
         
@@ -215,19 +251,22 @@ var nameState = {
         
         game.input.keyboard.addCallbacks(this, null, null, this.keyPress);
         
+
     },
-    
+
     clearName: function(){
         nameLbl.text  = "";
     },
     
     keyPress: function(char) {
+
         var RegExpression = /^[a-zA-Z\s]*$/; 
 
         if (RegExpression.test(char)) {
             nameLbl.text += char;
         }        
     },
+
     ready: function(){
         //var txt = nameLbl.text.trim;
         console.log(nameLbl.text.length);
@@ -235,7 +274,6 @@ var nameState = {
             nameLbl.text  = "";
             return;
         }
-        
         name = nameLbl.text.trim();
         console.log("name is " + name);
         
@@ -265,4 +303,5 @@ var nameState = {
         }
         
     }
+
 };

+ 53 - 10
js/circleOne.js

@@ -1,9 +1,50 @@
+
+/*
+    var menuCircleOne = {
+        create: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadMap: function(){}
+    };
+
+    var mapCircleOne = {
+        create: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadGame: function()
+    };
+
+    var gameCircleOne = {
+        create: function(){},
+        updateCounter: function(){},
+        overCircle: function(){},
+        outCircle: function(){},
+        clickCircle: function(){},
+        setPlace: function(){},
+        postScore: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        viewHelp: function(){},
+        checkOverlap: function(){}
+    };
+
+    var endCircleOne = {
+        create: function(){},
+        update: function(){},
+        verPrincipal: function(){},
+        verMenu: function(){}
+    };
+*/
+
 // Kid and Circle states, games 1 and 2
 
 /****************************** MENU ****************************/
+
 var stairsPlus, stairsMinus, stairsMixed;
 
-var menuCircleOne={
+var menuCircleOne = {
     create: function() {
         
         // Creating sound variable
@@ -192,8 +233,9 @@ var menuCircleOne={
     
 };
 
-/****************************** MAP ****************************/
-var mapCircleOne={
+/****************************** MAP *****************************/
+
+var mapCircleOne = {
     create: function() {
         
         // Creating sound variable
@@ -382,23 +424,20 @@ var mapCircleOne={
 };
 
 /****************************** GAME ****************************/
+
 var okSound, errorSound; //sounds
 var startX; //start position
-
 var clicked, hideLabels, animate, checkCollide, result, hasFigure; //control variables
 var fly, flyCounter, flyend; //flyvariables
 var trace; //circle trace
 var kid_walk, balloon, basket;
-
 //Balloon and blocks control
 var maxBlocks, blockSize, blocks, numBlocks, curBlock, blockDirection, blockDistance, blockLabel, blockSeparator, blockAngle, blockTraceColor, endPosition;
-
 var balloonPlace, fractionClicked, fractionIndex, numPlus, endIndex;
-
 var okImg, errorImg;
-
 var detail;
-var gameCircleOne={
+
+var gameCircleOne = {
     create: function() {
         
         //timer
@@ -692,6 +731,7 @@ var gameCircleOne={
         }
 
     },
+
     outCircle: function(){
         if(!clicked){
             for(var i=0;i<=this.indice;i++){
@@ -756,6 +796,7 @@ var gameCircleOne={
             }
         }
     },
+
     postScore: function (){
         
         var abst = "numCircles:"+numBlocks+", valCircles: " + detail+" balloonX: " + basket.x + ", selIndex: " + fractionIndex;
@@ -966,8 +1007,10 @@ var gameCircleOne={
     }
     
 };
+
 /****************************** END ****************************/
-var endCircleOne={
+
+var endCircleOne = {
     create: function() {  
         
         // Creating sound variable

+ 26 - 8
js/menu.js

@@ -1,10 +1,22 @@
+
 var menu1, menu2, menu3, menu4;
 var m_info, m_world, m_menu, m_back, m_help;
 var beepSound;
-
 var words;
 var lbl_game;
-var menuState={
+
+/*
+    var menuState = {
+        create: function(){},
+        loadGame: function(){},
+        showTitle: function(){},
+        clearTitle: function(){},
+        showOption: function(){},
+        loadState: function(){}
+    }
+*/
+
+var menuState = {
     create: function() {
         
         // Creating sound variable
@@ -151,19 +163,20 @@ var menuState={
             game.state.start('menuSTwo');
         }
     },
+
     showTitle: function(){
         
         var title = "";
         var type = "";
         
         if( (this.num==1 || this.num==2) ){
-            type = "A";
+            type = "I";
         }
         if( (this.num==3 || this.num==4) ){
-            type = "B";
+            type = "II";
         }
         if( this.num==5 && this.shape=="Square"){
-            type = "C";
+            type = "III";
         }
         
         if(this.shape=="Circle"){
@@ -173,17 +186,22 @@ var menuState={
         }
         
         if(type!=""){
-            title  += ", "+words.mode_name+ " "+type;
+          //circ/quad  ,   modo                 A/B/C
+          //title  += ", "+words.mode_name+ " "+type;
+            title  += " " + type;
         }
         
         if(this.label){
-            title += ", " + words.with_name + " " + words.label_name;
+                     //-    sem/com               legendas
+          //title += "- " + words.with_name + " " + words.label_name;
+            title += " - " + words.with_name + " " + words.label_name;
         }else{
-            title += ", " + words.without_name + " " + words.label_name;
+            title += " - " + words.without_name + " " + words.label_name;
         }
         
         lbl_game.text = title;
     },
+
     clearTitle: function(){
         lbl_game.text = "";
     },

+ 52 - 10
js/squareOne.js

@@ -1,8 +1,49 @@
+
+/*
+    var menuSquareOne = {
+        create: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadMap: function(){}
+    };
+
+    var mapSquareOne = {
+        create: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadGame: function()
+    };
+
+    var gameSquareOne = {
+        create: function(){},
+        updateCounter: function(){},
+        overSquare: function(){},
+        outSquare: function(){},
+        clickSquare: function(){},
+            //setPlace: function(){},
+        postScore: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        viewHelp: function(){},
+            //checkOverlap: function(){}
+    };
+
+    var endSquareOne = {
+        create: function(){},
+        update: function(){},
+        verPrincipal: function(){},
+        verMenu: function(){}
+    };
+*/
+
 // Tractor and Square states
 
 /****************************** MENU ****************************/
 var stairsRight, stairsLeft;
-var menuSquareOne={
+
+var menuSquareOne = {
     create: function() {
         
         // Creating sound variable
@@ -150,7 +191,8 @@ var menuSquareOne={
 };
 
 /****************************** MAP ****************************/
-var mapSquareOne={
+
+var mapSquareOne = {
     create: function() {
                 
         // Creating sound variable
@@ -339,22 +381,18 @@ var mapSquareOne={
 };
 
 /****************************** GAME ****************************/
-var clicked, hideLabels, animate, checkCollide, result, move, moveCounter, moveEnd, hasFigure;
 
+var clicked, hideLabels, animate, checkCollide, result, move, moveCounter, moveEnd, hasFigure;
 var startX, tractor, arrow;
-
 var maxBlocks, blocks, numBlocks, curBlock, blockDirection, blockDistance, blockLabel, blockSeparator;
-
 var blockWidth, endPosition, blockIndex;
-
 var floorBlocks, floorIndex, floorCount, floorClicked;
 var arrowPlace, fractionClicked, fractionIndex;
-
 var okImg, errorImg;
 var curFloor;
-
 var detail;
-var gameSquareOne={
+
+var gameSquareOne = {
     create: function() {  
         
         //timer
@@ -698,6 +736,7 @@ var gameSquareOne={
             }
         }
     },
+
     outSquare: function(){
         if(!clicked){
             if(oneType=="A"){
@@ -773,6 +812,7 @@ var gameSquareOne={
             }
         }
     },
+
     postScore: function (){
         
         var abst = "numBlocks:"+numBlocks+", valBlocks: " + detail+" blockIndex: " + blockIndex + ", floorIndex: " + floorIndex;
@@ -952,8 +992,10 @@ var gameSquareOne={
     }
     
 };
+
 /****************************** END ****************************/
-var endSquareOne={
+
+var endSquareOne = {
     create: function() {  
         
         // Creating sound variable

+ 52 - 3
js/squareTwo.js

@@ -1,6 +1,50 @@
+/*
+    var menuSquareTwo = {
+        create: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadMap: function(){}
+    };
+
+    var mapSquareTwo = {
+        create: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+        loadGame: function()
+    };
+
+    var gameSquareTwo = {
+        create: function(){},
+        updateCounter: function(){},
+        overSquare: function(){},
+        outSquare: function(){},
+        clickSquare: function(){},
+            //setPlace: function(){},
+        postScore: function(){},
+        update: function(){},
+        showOption: function(){},
+        loadState: function(){},
+    
+        loadGame: function(){}
+        getRndDivisor
+            //viewHelp: function(){},
+            //checkOverlap: function(){}
+    };
+
+    var endSquareTwo = {
+        create: function(){},
+        update: function(){},
+        verPrincipal: function(){},
+        verMenu: function(){}
+    };
+*/
+
 // Fractions Comparison Square states
+
 /****************************** MENU ****************************/
-var menuSquareTwo={
+
+var menuSquareTwo = {
     create: function() {
         
         // Creating sound variable
@@ -160,6 +204,7 @@ var menuSquareTwo={
 };
 
 /****************************** MAP ****************************/
+
 var mapSquareTwo={
     create: function() {
                 
@@ -355,6 +400,7 @@ var mapSquareTwo={
 };
 
 /****************************** GAME ****************************/
+
 var sizeA, sizeB, valueA, valueB;
 var clickA, clickB, animateA, animateB, result, animate, cDelay, eDelay;
 var blocksA, blocksB, auxblqA, auxblqB;
@@ -363,7 +409,7 @@ var kid, kidDirection, equals, counter, endCounter;
 var xA, yA, xB, yB, blockW, blockH;
 var okImg, errorImg;
 
-var gameSquareTwo={
+var gameSquareTwo = {
     create: function() {  
         
         //timer
@@ -635,6 +681,7 @@ var gameSquareTwo={
             fractionB.setText(this.indice +1);
         }
     },
+
     outSquare: function(){
         if(!clickA && this.who=="A"){
             for(var i=0;i<=this.indice;i++){
@@ -828,8 +875,10 @@ var gameSquareTwo={
     }
     
 };
+
 /****************************** END ****************************/
-var endSquareTwo={
+
+var endSquareTwo = {
     create: function() {  
         
         // Creating sound variable

resource/img/en_US/airballoon_base.png → resource/img/airballoon_base.png


resource/img/en_US/airballoon_upper.png → resource/img/airballoon_upper.png


resource/img/global/bg.jpg → resource/img/bg.jpg


resource/img/global/bg_map.png → resource/img/bg_map.png


resource/img/en_US/birch.png → resource/img/birch.png


resource/img/global/cloud.png → resource/img/cloud.png


BIN
resource/img/es_PE/airballoon_base.png


BIN
resource/img/es_PE/airballoon_upper.png


BIN
resource/img/es_PE/birch.png


BIN
resource/img/es_PE/farm.png


BIN
resource/img/es_PE/flag.png


BIN
resource/img/es_PE/garage.png


BIN
resource/img/es_PE/house.png


BIN
resource/img/es_PE/kid/lost.png


BIN
resource/img/es_PE/kid/run.png


BIN
resource/img/es_PE/kid/walk.png


BIN
resource/img/es_PE/place_a.png


BIN
resource/img/es_PE/place_b.png


BIN
resource/img/es_PE/rock.png


BIN
resource/img/es_PE/school.png


BIN
resource/img/es_PE/sign.png


BIN
resource/img/es_PE/tractor/frame-0.png


BIN
resource/img/es_PE/tractor/frame-1.png


BIN
resource/img/es_PE/tractor/frame-2.png


BIN
resource/img/es_PE/tractor/frame-3.png


BIN
resource/img/es_PE/tractor/frame-4.png


BIN
resource/img/es_PE/tractor/frame-5.png


BIN
resource/img/es_PE/tractor/frame-6.png


BIN
resource/img/es_PE/tractor/frame-7.png


BIN
resource/img/es_PE/tractor/frame-8.png


BIN
resource/img/es_PE/tractor/frame-9.png


BIN
resource/img/es_PE/tractor/frame.png


BIN
resource/img/es_PE/tree.png


BIN
resource/img/es_PE/tree2.png


BIN
resource/img/es_PE/tree3.png


BIN
resource/img/es_PE/tree4.png


resource/img/en_US/farm.png → resource/img/farm.png


resource/img/en_US/flag.png → resource/img/flag.png


resource/img/global/floor.png → resource/img/floor.png


BIN
resource/img/fr_FR/airballoon_base.png


BIN
resource/img/fr_FR/airballoon_upper.png


BIN
resource/img/fr_FR/birch.png


BIN
resource/img/fr_FR/farm.png


BIN
resource/img/fr_FR/flag.png


BIN
resource/img/fr_FR/garage.png


BIN
resource/img/fr_FR/house.png


BIN
resource/img/fr_FR/kid/lost.png


BIN
resource/img/fr_FR/kid/run.png


BIN
resource/img/fr_FR/kid/walk.png


BIN
resource/img/fr_FR/place_a.png


BIN
resource/img/fr_FR/place_b.png


BIN
resource/img/fr_FR/rock.png


BIN
resource/img/fr_FR/school.png


BIN
resource/img/fr_FR/sign.png


BIN
resource/img/fr_FR/tractor/frame-0.png


BIN
resource/img/fr_FR/tractor/frame-1.png


BIN
resource/img/fr_FR/tractor/frame-2.png


BIN
resource/img/fr_FR/tractor/frame-3.png


BIN
resource/img/fr_FR/tractor/frame-4.png


BIN
resource/img/fr_FR/tractor/frame-5.png


BIN
resource/img/fr_FR/tractor/frame-6.png


BIN
resource/img/fr_FR/tractor/frame-7.png


BIN
resource/img/fr_FR/tractor/frame-8.png


BIN
resource/img/fr_FR/tractor/frame-9.png


BIN
resource/img/fr_FR/tractor/frame.png


BIN
resource/img/fr_FR/tree.png


BIN
resource/img/fr_FR/tree2.png


BIN
resource/img/fr_FR/tree3.png


BIN
resource/img/fr_FR/tree4.png


resource/img/global/game/five-s.png → resource/img/game/five-s.png


resource/img/global/game/four-c.png → resource/img/game/four-c.png


resource/img/global/game/four-s.png → resource/img/game/four-s.png


resource/img/global/game/one-c.png → resource/img/game/one-c.png


resource/img/global/game/one-s.png → resource/img/game/one-s.png


resource/img/global/game/three-c.png → resource/img/game/three-c.png


resource/img/global/game/three-s.png → resource/img/game/three-s.png


resource/img/global/game/two-c.png → resource/img/game/two-c.png


resource/img/global/game/two-s.png → resource/img/game/two-s.png


resource/img/en_US/garage.png → resource/img/garage.png


resource/img/global/help/arrow.png → resource/img/help/arrow.png


resource/img/global/help/double.png → resource/img/help/double.png


resource/img/global/help/down.png → resource/img/help/down.png


resource/img/global/help/error.png → resource/img/help/error.png


resource/img/global/help/ok.png → resource/img/help/ok.png


resource/img/global/help/pointer.png → resource/img/help/pointer.png


resource/img/en_US/house.png → resource/img/house.png


resource/img/en_US/kid/lost.png → resource/img/kid/lost.png


resource/img/en_US/kid/run.png → resource/img/kid/run.png


+ 0 - 0
resource/img/en_US/kid/walk.png


Some files were not shown because too many files changed in this diff