Game Development Reference
In-Depth Information
The left_label style is cloned to create the next element.
5.
Change its Name to
right_label
and its Alignment to Upper Right.
In the CreditsGUI script, change the
// title
label as follows:
6.
GUI.Label(new Rect (x, y, 300, 60), "Game Design","left_label");
In the CreditsGUI script, change the
person
label as follows:
7.
GUI.Label(new Rect (x, y, 300, 60), "your name here", "right_label");
Move the
y+= yOffset
line from below the Game Design label line to above it:
8.
y+= yOffset;
// title
GUI.Label(new Rect (x, y, 300, 60), "Game Design","left_label");
9.
Save the script, and click Play to see the results.
10.
Stop Play mode.
11.
Add some prefabs if you wish (Figure
10-38
).
Figure 10-38.
The Credits screen