Holistic Game Development with Unity by de Byl Penny

Holistic Game Development with Unity by de Byl Penny

Author:de Byl, Penny
Language: eng
Format: mobi
ISBN: 9780240819334
Publisher: Taylor & Francis
Published: 2011-11-22T16:00:00+00:00


GUI.Label(Rect (20,20,200,100), "Winner: " +winner);

if(GUI.Button (Rect (50,60,100,30), "Play Again"))

{

//reset the game

winner ="";

GameObject.Find("Car Prefab").transform.position =

playerLocation;

GameObject.Find("Player2").transform.position =

npcLocation;

GameObject.Find("Player2").GetComponent("waypoints").

currentWP =0;

}

GUI.EndGroup ();

}

}

function Update () {

}

Step 14. The preceding script uses the name of the colliding object to display the winner on the screen. Currently, both the Car Prefab and the Player2's elements are named the same. Select each chassis collider in the Hierarchy and give them different names in the Inspector.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.