var shine : GameObject;
var clone : GameObject;
var move : Transform = float (1,0,1);
function Start () {
}
function Update () {
//if(Input.GetMouseButtonDown(0))
//{
//Invoke ("Spawn", Random.Range( 0, 1));
//Destroy(GameObject.Find("Shine(Clone)"), 3);
//}
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast (ray, 100)) {
Debug.Log("Pressed left click.");
Instantiate (shine, Input.mousePosition,Quaternion.identity);
print ("Hit something");
}
if(Input.GetMouseButtonDown (0))
move.shine.Vector3(camera.nearClipPlane = 0.1);
Destroy(GameObject.Find("Shine(Clone)"), 3);
if(Input.GetMouseButtonDown(1))
{
Debug.Log(“Pressed right click.”);
}
if(Input.GetMouseButtonDown(2))
{
Debug.Log(“Pressed middle click.”);
}
}