Game Development Reference
In-Depth Information
Next, we check whether the enemy node's name is enemy just to verify that we are
using the correct node. Then, we use a foreach loop to go through each node with-
in the child nodes of the enemy node. Next, we assign the placeholder variables to
the associating data from the nodes.
To finish loading our data, we assign each of the placeholder variables to our current
GameObject in the enemies' array. Our code will load the correct data for each of the
enemies and the data from the XML because we use the iterator from the first for
loop to choose the correct data from each of the arrays.
Search WWH ::




Custom Search