public void LookRotation(Transform character, Transform camera) { float yRot = 0f; float xRot = 0f; if (character.CompareTag("Player1")) { character = player1.transform; Camera camera1 = GameObject.FindGameObjectWithTag("p1c").GetComponent<Camera>(); camera = camera1.transform; yRot = CrossPlatformInputManager.GetAxis("P1Mouse X") * XSensitivity; xRot = CrossPlatformInputManager.GetAxis("P1Mouse Y") * YSensitivity; } if (character.CompareTag("Player2")) { character = player2.transform; Camera camera2 = GameObject.FindGameObjectWithTag("p2c").GetComponent<Camera>(); camera = camera2.transform; yRot = CrossPlatformInputManager.GetAxis("P2Mouse X") * XSensitivity; xRot = CrossPlatformInputManager.GetAxis("P2Mouse Y") * YSensitivity; } if (character.CompareTag("Player3")) { character = player3.transform; Camera camera3 = GameObject.FindGameObjectWithTag("p3c").GetComponent<Camera>(); camera = camera3.transform; yRot = CrossPlatformInputManager.GetAxis("P3Mouse X") * XSensitivity; xRot = CrossPlatformInputManager.GetAxis("P3Mouse Y") * YSensitivity; } if (character.CompareTag("Lich")) { //character = lich.transform; //camera = lich.GetComponent<Camera>().transform; yRot = CrossPlatformInputManager.GetAxis("P4Mouse X") * XSensitivity; xRot = CrossPlatformInputManager.GetAxis("P4Mouse Y") * YSensitivity; yRot = CrossPlatformInputManager.GetAxis("LichMouse X") * XSensitivity; xRot = CrossPlatformInputManager.GetAxis("LichMouse Y") * YSensitivity; } m_CharacterTargetRot *= Quaternion.Euler (0f, yRot, 0f); m_CameraTargetRot *= Quaternion.Euler (-xRot, 0f, 0f); if(clampVerticalRotation) m_CameraTargetRot = ClampRotationAroundXAxis (m_CameraTargetRot); if(smooth) { character.localRotation = Quaternion.Slerp (character.localRotation, m_CharacterTargetRot, smoothTime * Time.deltaTime); camera.localRotation = Quaternion.Slerp (camera.localRotation, m_CameraTargetRot, smoothTime * Time.deltaTime); } else { character.localRotation = m_CharacterTargetRot; camera.localRotation = m_CameraTargetRot; } }
private static bool CheckIfClientSideOnly(Transform prefabToSpawn) { //add a list of tags in here that should define their prefab as client side only if (prefabToSpawn.CompareTag("SpawnClientSideOnly") || prefabToSpawn.CompareTag("explosion")) { return true; } return false; }
public static bool UnityEngineTransformMCall(object objSelf, string functionName, List <CQ_Value> param, out CQ_Value returnValue, bool mustEqual) { UnityEngine.Transform obj = (UnityEngine.Transform)objSelf; if (param.Count == 1 && functionName == "SetParent" && MatchType(param, new Type[] { typeof(UnityEngine.Transform) }, mustEqual)) { returnValue = null; obj.SetParent((UnityEngine.Transform)param[0].ConvertTo(typeof(UnityEngine.Transform))); return(true); } if (param.Count == 2 && functionName == "SetParent" && MatchType(param, new Type[] { typeof(UnityEngine.Transform), typeof(bool) }, mustEqual)) { returnValue = null; obj.SetParent((UnityEngine.Transform)param[0].ConvertTo(typeof(UnityEngine.Transform)), (bool)param[1].ConvertTo(typeof(bool))); return(true); } if (param.Count == 2 && functionName == "SetPositionAndRotation" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Quaternion) }, mustEqual)) { returnValue = null; obj.SetPositionAndRotation((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Quaternion)param[1].ConvertTo(typeof(UnityEngine.Quaternion))); return(true); } if (param.Count == 1 && functionName == "Translate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = null; obj.Translate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 2 && functionName == "Translate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Space) }, mustEqual)) { returnValue = null; obj.Translate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Space)param[1].ConvertTo(typeof(UnityEngine.Space))); return(true); } if (param.Count == 3 && functionName == "Translate" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = null; obj.Translate((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 4 && functionName == "Translate" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float), typeof(UnityEngine.Space) }, mustEqual)) { returnValue = null; obj.Translate((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float)), (UnityEngine.Space)param[3].ConvertTo(typeof(UnityEngine.Space))); return(true); } if (param.Count == 2 && functionName == "Translate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Transform) }, mustEqual)) { returnValue = null; obj.Translate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Transform)param[1].ConvertTo(typeof(UnityEngine.Transform))); return(true); } if (param.Count == 4 && functionName == "Translate" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float), typeof(UnityEngine.Transform) }, mustEqual)) { returnValue = null; obj.Translate((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float)), (UnityEngine.Transform)param[3].ConvertTo(typeof(UnityEngine.Transform))); return(true); } if (param.Count == 1 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = null; obj.Rotate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 2 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Space) }, mustEqual)) { returnValue = null; obj.Rotate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Space)param[1].ConvertTo(typeof(UnityEngine.Space))); return(true); } if (param.Count == 3 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = null; obj.Rotate((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 4 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float), typeof(UnityEngine.Space) }, mustEqual)) { returnValue = null; obj.Rotate((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float)), (UnityEngine.Space)param[3].ConvertTo(typeof(UnityEngine.Space))); return(true); } if (param.Count == 2 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(float) }, mustEqual)) { returnValue = null; obj.Rotate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (float)param[1].ConvertTo(typeof(float))); return(true); } if (param.Count == 3 && functionName == "Rotate" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(float), typeof(UnityEngine.Space) }, mustEqual)) { returnValue = null; obj.Rotate((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (float)param[1].ConvertTo(typeof(float)), (UnityEngine.Space)param[2].ConvertTo(typeof(UnityEngine.Space))); return(true); } if (param.Count == 3 && functionName == "RotateAround" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3), typeof(float) }, mustEqual)) { returnValue = null; obj.RotateAround((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Vector3)param[1].ConvertTo(typeof(UnityEngine.Vector3)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "LookAt" && MatchType(param, new Type[] { typeof(UnityEngine.Transform) }, mustEqual)) { returnValue = null; obj.LookAt((UnityEngine.Transform)param[0].ConvertTo(typeof(UnityEngine.Transform))); return(true); } if (param.Count == 2 && functionName == "LookAt" && MatchType(param, new Type[] { typeof(UnityEngine.Transform), typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = null; obj.LookAt((UnityEngine.Transform)param[0].ConvertTo(typeof(UnityEngine.Transform)), (UnityEngine.Vector3)param[1].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 2 && functionName == "LookAt" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = null; obj.LookAt((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (UnityEngine.Vector3)param[1].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 1 && functionName == "LookAt" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = null; obj.LookAt((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 1 && functionName == "TransformDirection" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformDirection((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "TransformDirection" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformDirection((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "InverseTransformDirection" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformDirection((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "InverseTransformDirection" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformDirection((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "TransformVector" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformVector((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "TransformVector" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformVector((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "InverseTransformVector" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformVector((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "InverseTransformVector" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformVector((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "TransformPoint" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformPoint((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "TransformPoint" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.TransformPoint((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "InverseTransformPoint" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformPoint((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3))); return(true); } if (param.Count == 3 && functionName == "InverseTransformPoint" && MatchType(param, new Type[] { typeof(float), typeof(float), typeof(float) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Vector3); returnValue.value = obj.InverseTransformPoint((float)param[0].ConvertTo(typeof(float)), (float)param[1].ConvertTo(typeof(float)), (float)param[2].ConvertTo(typeof(float))); return(true); } if (param.Count == 0 && functionName == "DetachChildren") { returnValue = null; obj.DetachChildren(); return(true); } if (param.Count == 0 && functionName == "SetAsFirstSibling") { returnValue = null; obj.SetAsFirstSibling(); return(true); } if (param.Count == 0 && functionName == "SetAsLastSibling") { returnValue = null; obj.SetAsLastSibling(); return(true); } if (param.Count == 1 && functionName == "SetSiblingIndex" && MatchType(param, new Type[] { typeof(int) }, mustEqual)) { returnValue = null; obj.SetSiblingIndex((int)param[0].ConvertTo(typeof(int))); return(true); } if (param.Count == 0 && functionName == "GetSiblingIndex") { returnValue = new CQ_Value(); returnValue.type = typeof(int); returnValue.value = obj.GetSiblingIndex(); return(true); } if (param.Count == 1 && functionName == "Find" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Transform); returnValue.value = obj.Find((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 1 && functionName == "IsChildOf" && MatchType(param, new Type[] { typeof(UnityEngine.Transform) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(bool); returnValue.value = obj.IsChildOf((UnityEngine.Transform)param[0].ConvertTo(typeof(UnityEngine.Transform))); return(true); } if (param.Count == 1 && functionName == "FindChild" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Transform); returnValue.value = obj.Find((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 2 && functionName == "RotateAround" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(float) }, mustEqual)) { returnValue = null; obj.RotateAround((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (float)param[1].ConvertTo(typeof(float))); return(true); } if (param.Count == 2 && functionName == "RotateAroundLocal" && MatchType(param, new Type[] { typeof(UnityEngine.Vector3), typeof(float) }, mustEqual)) { returnValue = null; obj.RotateAroundLocal((UnityEngine.Vector3)param[0].ConvertTo(typeof(UnityEngine.Vector3)), (float)param[1].ConvertTo(typeof(float))); return(true); } if (param.Count == 1 && functionName == "GetChild" && MatchType(param, new Type[] { typeof(int) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Transform); returnValue.value = obj.GetChild((int)param[0].ConvertTo(typeof(int))); return(true); } if (param.Count == 0 && functionName == "GetChildCount") { returnValue = new CQ_Value(); returnValue.type = typeof(int); returnValue.value = obj.GetChildCount(); return(true); } if (param.Count == 1 && functionName == "GetComponent" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component); returnValue.value = obj.GetComponent((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 1 && functionName == "GetComponent" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component); returnValue.value = obj.GetComponent((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 2 && functionName == "GetComponentInChildren" && MatchType(param, new Type[] { typeof(System.Type), typeof(bool) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component); returnValue.value = obj.GetComponentInChildren((System.Type)param[0].ConvertTo(typeof(System.Type)), (bool)param[1].ConvertTo(typeof(bool))); return(true); } if (param.Count == 1 && functionName == "GetComponentInChildren" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component); returnValue.value = obj.GetComponentInChildren((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 1 && functionName == "GetComponentsInChildren" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component[]); returnValue.value = obj.GetComponentsInChildren((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 2 && functionName == "GetComponentsInChildren" && MatchType(param, new Type[] { typeof(System.Type), typeof(bool) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component[]); returnValue.value = obj.GetComponentsInChildren((System.Type)param[0].ConvertTo(typeof(System.Type)), (bool)param[1].ConvertTo(typeof(bool))); return(true); } if (param.Count == 1 && functionName == "GetComponentInParent" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component); returnValue.value = obj.GetComponentInParent((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 1 && functionName == "GetComponentsInParent" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component[]); returnValue.value = obj.GetComponentsInParent((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 2 && functionName == "GetComponentsInParent" && MatchType(param, new Type[] { typeof(System.Type), typeof(bool) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component[]); returnValue.value = obj.GetComponentsInParent((System.Type)param[0].ConvertTo(typeof(System.Type)), (bool)param[1].ConvertTo(typeof(bool))); return(true); } if (param.Count == 1 && functionName == "GetComponents" && MatchType(param, new Type[] { typeof(System.Type) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(UnityEngine.Component[]); returnValue.value = obj.GetComponents((System.Type)param[0].ConvertTo(typeof(System.Type))); return(true); } if (param.Count == 1 && functionName == "CompareTag" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(bool); returnValue.value = obj.CompareTag((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 3 && functionName == "SendMessageUpwards" && MatchType(param, new Type[] { typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.SendMessageUpwards((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object)), (UnityEngine.SendMessageOptions)param[2].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 2 && functionName == "SendMessageUpwards" && MatchType(param, new Type[] { typeof(string), typeof(object) }, mustEqual)) { returnValue = null; obj.SendMessageUpwards((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object))); return(true); } if (param.Count == 1 && functionName == "SendMessageUpwards" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = null; obj.SendMessageUpwards((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 2 && functionName == "SendMessageUpwards" && MatchType(param, new Type[] { typeof(string), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.SendMessageUpwards((string)param[0].ConvertTo(typeof(string)), (UnityEngine.SendMessageOptions)param[1].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 3 && functionName == "SendMessage" && MatchType(param, new Type[] { typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.SendMessage((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object)), (UnityEngine.SendMessageOptions)param[2].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 2 && functionName == "SendMessage" && MatchType(param, new Type[] { typeof(string), typeof(object) }, mustEqual)) { returnValue = null; obj.SendMessage((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object))); return(true); } if (param.Count == 1 && functionName == "SendMessage" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = null; obj.SendMessage((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 2 && functionName == "SendMessage" && MatchType(param, new Type[] { typeof(string), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.SendMessage((string)param[0].ConvertTo(typeof(string)), (UnityEngine.SendMessageOptions)param[1].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 3 && functionName == "BroadcastMessage" && MatchType(param, new Type[] { typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.BroadcastMessage((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object)), (UnityEngine.SendMessageOptions)param[2].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 2 && functionName == "BroadcastMessage" && MatchType(param, new Type[] { typeof(string), typeof(object) }, mustEqual)) { returnValue = null; obj.BroadcastMessage((string)param[0].ConvertTo(typeof(string)), (object)param[1].ConvertTo(typeof(object))); return(true); } if (param.Count == 1 && functionName == "BroadcastMessage" && MatchType(param, new Type[] { typeof(string) }, mustEqual)) { returnValue = null; obj.BroadcastMessage((string)param[0].ConvertTo(typeof(string))); return(true); } if (param.Count == 2 && functionName == "BroadcastMessage" && MatchType(param, new Type[] { typeof(string), typeof(UnityEngine.SendMessageOptions) }, mustEqual)) { returnValue = null; obj.BroadcastMessage((string)param[0].ConvertTo(typeof(string)), (UnityEngine.SendMessageOptions)param[1].ConvertTo(typeof(UnityEngine.SendMessageOptions))); return(true); } if (param.Count == 0 && functionName == "ToString") { returnValue = new CQ_Value(); returnValue.type = typeof(string); returnValue.value = obj.ToString(); return(true); } if (param.Count == 0 && functionName == "GetInstanceID") { returnValue = new CQ_Value(); returnValue.type = typeof(int); returnValue.value = obj.GetInstanceID(); return(true); } if (param.Count == 0 && functionName == "GetHashCode") { returnValue = new CQ_Value(); returnValue.type = typeof(int); returnValue.value = obj.GetHashCode(); return(true); } if (param.Count == 1 && functionName == "Equals" && MatchType(param, new Type[] { typeof(object) }, mustEqual)) { returnValue = new CQ_Value(); returnValue.type = typeof(bool); returnValue.value = obj.Equals((object)param[0].ConvertTo(typeof(object))); return(true); } if (param.Count == 0 && functionName == "GetType") { returnValue = new CQ_Value(); returnValue.type = typeof(System.Type); returnValue.value = obj.GetType(); return(true); } returnValue = null; return(false); }