Game Development Reference
In-Depth Information
public npcCondition initialScore {
6. If there is a playerData component on the player, then compute the score
delta as the absolute value of the score minus the original score as shown in
the following code:
if (p != null)
{
float playerScore = Mathf.Abs
(p.GetComponent<playerData>().score -
(initialScore as floatData)._floatData);
if ((int)playerScore >= scoreAdded )
rval = true;
}
Congratulations! You have now created the condition for npcDecisionMgr , which
will check for the number of points that have been earned in a given level.
Search WWH ::




Custom Search