-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Creating E-Learning Games with Unity
By :
Just as we saw in Chapter 7, Mission Two – Testing a Player's Learning, when we created listData npcCondition which wrapped a list of GameObjects used to track racers in the race, we will need to create another type of wrapper in this mission; one for the initial score of the player. We can create this list with the following steps:
Copy and paste listData.cs into the folder named Chapter9. Rename the copy floatData as shown in the following screenshot:

Update the declaration in the script to match the new name of the file.
Replace the list<GameObject> _listData variable with the following line of code:
public float _floatData;
Congratulations! You have now created a second npcCondition data wrapper. An instance of this will be required by the logic of this level to compute the points scored.
Change the font size
Change margin width
Change background colour