Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****** Donations are greatly appreciated. ******
- //****** You can donate directly to Jesse through paypal at https://www.paypal.me/JEtzler ******
- function Update () {
- var hit: RaycastHit;
- if(Input.GetMouseButtonDown(1) &&
- Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), hit,
- Mathf.Infinity)) {
- if(hit.collider.CompareTag("minion")){
- Debug.Log("select enemy1");
- n = hit.collider.gameObject;
- n.gameObject.tag = "minionSelected";
- n.renderer.materials[0].shader = Shader.Find ("Unlit/Texture");
- n.renderer.materials[1].shader = Shader.Find ("Unlit/Texture");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement