Переглянути джерело

Update 'src/js/menus/preMenu_lang.js'

Adjusts to remove directory "./src" (it does not make sense in installation of iFractions)
Removed /* */ comments from internal code (they are reserve to isolate long blocks during depuration process)
leo 8 місяців тому
батько
коміт
aef64aee71
1 змінених файлів з 13 додано та 26 видалено
  1. 13 26
      src/js/menus/preMenu_lang.js

+ 13 - 26
src/js/menus/preMenu_lang.js

@@ -7,9 +7,8 @@
  * @namespace
  */
 const langState = {
-  /**
-   * Main code
-   */
+
+  /// Main code
   create: function () {
     renderBackground('plain');
 
@@ -59,11 +58,8 @@ const langState = {
     }
   },
 
-  /**
-   * Calls state that loads selected language
-   *
-   * @param {string} selectedLang language selected by player
-   */
+  /// Calls state that loads selected language
+  //  @param {string} selectedLang language selected by player
   setLang: function (selectedLang) {
     // Saves language name e.g 'pt_BR'
     langString = selectedLang;
@@ -72,11 +68,8 @@ const langState = {
     game.state.start('loadLang');
   },
 
-  /**
-   * Called by mouse click event
-   *
-   * @param {object} mouseEvent contains the mouse click coordinates
-   */
+  /// Called by mouse click event
+  //  @param {object} mouseEvent contains the mouse click coordinates
   onInputDown: function (mouseEvent) {
     const x = game.math.getMouse(mouseEvent).x;
     const y = game.math.getMouse(mouseEvent).y;
@@ -93,11 +86,8 @@ const langState = {
     });
   },
 
-  /**
-   * Called by mouse move event
-   *
-   * @param {object} mouseEvent contains the mouse move coordinates
-   */
+  /// Called by mouse move event
+  //  @param {object} mouseEvent contains the mouse move coordinates
   onInputOver: function (mouseEvent) {
     const x = game.math.getMouse(mouseEvent).x;
     const y = game.math.getMouse(mouseEvent).y;
@@ -124,17 +114,14 @@ const langState = {
  *  @namespace
  */
 const loadLangState = {
-  /**
-   * Preloads media for current state
-   */
+
+  /// Preloads media for current state
   preload: function () {
     // LOADING MEDIA : selected language
-    game.load.lang('src/assets/lang/' + langString);
+    game.load.lang('assets/lang/' + langString); // deploy of iFraction must use only files under "./src" from Git
   },
 
-  /**
-   * Main code
-   */
+  /// Main code
   create: function () {
     if (isDebugMode) console.log('Language: ' + langString);
 
@@ -146,4 +133,4 @@ const loadLangState = {
       game.state.start('menu'); // If changing language during the game ('lang' >> >> 'menu')
     }
   },
-};
+};