public void Execute(Queue <iTweenChainParameter> methodQueue) { if (methodQueue.Count > 0) { iTweenChainParameter param = methodQueue.Peek(); param.hashtable = ConvertHashKeyLowercase(param.hashtable); Hashtable modifiedHashtable = new Hashtable(param.hashtable); modifiedHashtable["oncomplete"] = "ExecuteInProgress"; modifiedHashtable["oncompletetarget"] = gameObject; modifiedHashtable["oncompleteparams"] = methodQueue; System.Type.GetType("iTween").GetMethod(param.methodName, new[] { typeof(GameObject), typeof(Hashtable) }).Invoke(null, new object[] { param.targetGameObject, modifiedHashtable }); } }
private void ExecuteInProgress(Queue <iTweenChainParameter> methodQueue) { iTweenChainParameter param = methodQueue.Dequeue(); if (param.hashtable.ContainsKey("oncomplete")) { GameObject target = param.targetGameObject; if (param.hashtable.ContainsKey("oncompletetarget")) { target = (GameObject)param.hashtable["oncompletetarget"]; } target.SendMessage((string)param.hashtable["oncomplete"], (object)param.hashtable["oncompleteparams"], SendMessageOptions.DontRequireReceiver); } Execute(methodQueue); }