Exemple #1
0
        private void TweenSet(EasyTweenObject tweenObject)
        {
            for (int i = 0; i < tweenObject.subTweens.Count; i++)
            {
                EasyTweenSubObject subObject = tweenObject.subTweens[i];

                //Action callbackAction = null;

                if (tweenObject.callbackName != "--NONE--" && tweenObject.hasCallback)
                {
                    //callbackAction = (Action)Delegate.CreateDelegate(typeof(Action), tweenObject.callbackComponent, tweenObject.callbackName);
                }

                switch (subObject.variableType)
                {
                case "Int32":
                    //int tempInt = Mathf.RoundToInt(subObject.targetValue.x);
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempInt, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Single":
                    //float tempFloat = subObject.targetValue.x;
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempFloat, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Vector2":
                    //Vector2 tempVector2 = new Vector2(subObject.targetValue.x, subObject.targetValue.y);
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempVector2, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Vector3":
                    //Vector3 tempVector3 = new Vector3(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z);
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempVector3, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Vector4":
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, subObject.targetValue, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Rect":
                    //Rect tempRect = new Rect(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z, subObject.targetValue.w);
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempRect, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;

                case "Color":
                    //Color tempColor = new Color(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z, subObject.targetValue.w);
                    //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempColor, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                    break;
                }
            }
        }
Exemple #2
0
        private void TweenSet(EasyTweenObject tweenObject)
        {
            for (int i = 0; i < tweenObject.subTweens.Count; i++)
            {
				EasyTweenSubObject subObject = tweenObject.subTweens[i];

                //Action callbackAction = null;

                if (tweenObject.callbackName != "--NONE--" && tweenObject.hasCallback)
                {
                    //callbackAction = (Action)Delegate.CreateDelegate(typeof(Action), tweenObject.callbackComponent, tweenObject.callbackName);
                }

                switch (subObject.variableType)
                {
                    case "Int32":
                        //int tempInt = Mathf.RoundToInt(subObject.targetValue.x);
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempInt, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Single":
                        //float tempFloat = subObject.targetValue.x;
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempFloat, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Vector2":
                        //Vector2 tempVector2 = new Vector2(subObject.targetValue.x, subObject.targetValue.y);
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempVector2, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Vector3":
                        //Vector3 tempVector3 = new Vector3(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z);
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempVector3, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Vector4":
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, subObject.targetValue, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Rect":
                        //Rect tempRect = new Rect(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z, subObject.targetValue.w);
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempRect, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                    case "Color":
                        //Color tempColor = new Color(subObject.targetValue.x, subObject.targetValue.y, subObject.targetValue.z, subObject.targetValue.w);
                        //TweenManager.AutoTween(tweenObject.targetGameObject, subObject.targetComponent, subObject.targetVariableName, tempColor, tweenObject.duration, tweenObject.delay, tweenObject.tweenType, tweenObject.customCurve, subObject.modifyParameters, callbackAction);
                        break;
                }
            }
        }