scripting_poster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scripting_poster [2019/10/20 11:06]
thorfinio created
scripting_poster [2019/10/20 11:11] (current)
thorfinio
Line 76: Line 76:
         //fill textfield with custom data about the player         //fill textfield with custom data about the player
         customField.text = LocalizationManager.GLV("​Hi,"​) + playerManager.playerName + System.Environment.NewLine;​         customField.text = LocalizationManager.GLV("​Hi,"​) + playerManager.playerName + System.Environment.NewLine;​
-        customField.text += LocalizationManager.GLV("​Your health is: "​+playerManager.healthManager.statValue);​+        customField.text += LocalizationManager.GLV("​Your health is: ")+playerManager.healthManager.statValue.toString();
     }     }
 The above example will just show off a poster (defined in the posterSpriteName property of the json poster file), and then will implement a custom behaviour deined in the Prepare method of the custom poster class, which is creating a brand new text field into the poster and is filling it with data about the player.\\ The above example will just show off a poster (defined in the posterSpriteName property of the json poster file), and then will implement a custom behaviour deined in the Prepare method of the custom poster class, which is creating a brand new text field into the poster and is filling it with data about the player.\\
Line 125: Line 125:
           //fill textfield with custom data about the player           //fill textfield with custom data about the player
           customField.text = LocalizationManager.GLV("​Hi,"​) + playerManager.playerName + System.Environment.NewLine;​           customField.text = LocalizationManager.GLV("​Hi,"​) + playerManager.playerName + System.Environment.NewLine;​
-          customField.text += LocalizationManager.GLV("​Your health is: "​+playerManager.healthManager.statValue);​+          customField.text += LocalizationManager.GLV("​Your health is: ")+playerManager.healthManager.statValue.toString();
       }       }
   }   }
  • scripting_poster.txt
  • Last modified: 2019/10/20 11:11
  • by thorfinio