youvsvirus / youvsvirus-unity

Unity version of the you vs virus game.
GNU General Public License v3.0
1 stars 1 forks source link

Text handling in mask level start screen #119

Open holke opened 4 years ago

holke commented 4 years ago

The start screen of the mask level has 3 texts stating the number of needed masks (8). If we want to change this number in the future, we will need to manually change these texts. This is error prone.

I tried to implement a solution but found it to be more difficult as i thought, so i stopped since i needed the time to actually finish the level.

What i thought was: Have one script where we can enter the number of masks as a public variable. And all text scripts call this script to ask for the variable. However, this would then require each text object to have an own script with its text and asking the variable script for the number of masks. This increases the number of scripts needed and seems a bit of an overhead.

Is there a more unity like way? Say, can we somehow access public variables in text fields?

This may be related to the way we would implement a german version of the texts.