Game Development Reference
In-Depth Information
Creating the pop-up card Prefabs
This game level communicates the learning objectives to the player through the in-
formation cards. This information will be baked onto a single texture in your favorite
external pixel art program. When the player picks up a flag, or presses on the flag
button in the inventory, a pop-up card for the relevant state is displayed as shown in
the following screenshot:
The pop-up card Prefabs can be created by performing the following steps:
1. Create a new
GUITexture
object, and name it
popup_<statename>
.
2. Drag-and-drop an instance of the
TriviaCardScript
to the
GameObject
.
Set the card width and height to
320,320
.
3. Drag-and-drop an instance of
SimpleLifespanScript
to the
GameOb-
ject
. Set the seconds parameter to
4
. This will make sure that if the informa-
tion card disappears, it does not matter if you toggle it off from the inventory
or if the user just lets it time out naturally.
4. Repeat steps 1 to 3 for each of the 50 states.