void OnTriggerEnter(Collider other) { if (other.tag == "Directory") { direct = other.GetComponent<Directory>(); direct.RightArmIn = true; } if (other.tag == "Back") { other.gameObject.SendMessage("Backward"); } if (other.tag == "Image") { img = other.GetComponent<ImageIcon>(); img.RightArmIn = true; imge = other.gameObject; } if (other.tag == "ImageViewer") { imge.gameObject.SendMessage("Stop"); } if (other.tag == "Presentation") { present = other.GetComponent<PresentationIcon>(); present.RightArmIn = true; } if (other.tag == "Car Presentation") { networkScript = GameObject.Find("AppManager").GetComponent<NetworkScript2>(); //networkScript.isLevelToLoadReceived = false; Application.LoadLevel(2); } if(other.tag == "Close"){ imageIcon = GameObject.Find("Image Icon(Clone)").GetComponent<ImageIcon>(); Invoke("InvokeClose", 1.0f); } if(other.tag == "Chart"){ startPos = new Vector3 (transform.position.x, transform.position.y, transform.position.z); isSizeChanged = false; Debug.Log(startPos); } if (other.tag == "Controlled") { TakeP = other.GetComponent<TakenParametrs>(); defaulted = transform.eulerAngles.y; defaultAngle = other.transform.eulerAngles.y; TakeP.fstfinger = true; renderer.material.color = Color.green; } if(other.tag == "ChartClose"){ Debug.Log("CloseChart-----------------------------"); Invoke("InvokeCloseChart", 1.0f); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Directory") { direct = other.GetComponent <Directory>(); direct.RightArmIn = true; } if (other.tag == "Back") { other.gameObject.SendMessage("Backward"); } if (other.tag == "Image") { img = other.GetComponent <ImageIcon>(); img.RightArmIn = true; imge = other.gameObject; } if (other.tag == "ImageViewer") { imge.gameObject.SendMessage("Stop"); } if (other.tag == "Presentation") { present = other.GetComponent <PresentationIcon>(); present.RightArmIn = true; } if (other.tag == "Car Presentation") { networkScript = GameObject.Find("AppManager").GetComponent <NetworkScript2>(); //networkScript.isLevelToLoadReceived = false; Application.LoadLevel(2); } if (other.tag == "Close") { imageIcon = GameObject.Find("Image Icon(Clone)").GetComponent <ImageIcon>(); Invoke("InvokeClose", 1.0f); } if (other.tag == "Chart") { startPos = new Vector3(transform.position.x, transform.position.y, transform.position.z); isSizeChanged = false; Debug.Log(startPos); } if (other.tag == "Controlled") { TakeP = other.GetComponent <TakenParametrs>(); defaulted = transform.eulerAngles.y; defaultAngle = other.transform.eulerAngles.y; TakeP.fstfinger = true; renderer.material.color = Color.green; } if (other.tag == "ChartClose") { Debug.Log("CloseChart-----------------------------"); Invoke("InvokeCloseChart", 1.0f); } }