当前位置: 首页>>代码示例>>C#>>正文


C# ApplyTween类代码示例

本文整理汇总了C#中ApplyTween的典型用法代码示例。如果您正苦于以下问题:C# ApplyTween类的具体用法?C# ApplyTween怎么用?C# ApplyTween使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ApplyTween类属于命名空间,在下文中一共展示了ApplyTween类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateTargets

 //call correct set target method and set tween application delegate:
 void GenerateTargets()
 {
     switch (type) {
         case "value":
             switch (method) {
                 case "float":
                     GenerateFloatTargets();
                     apply = new ApplyTween(ApplyFloatTargets);
                 break;
             case "vector2":
                     GenerateVector2Targets();
                     apply = new ApplyTween(ApplyVector2Targets);
                 break;
             case "vector3":
                     GenerateVector3Targets();
                     apply = new ApplyTween(ApplyVector3Targets);
                 break;
             case "color":
                     GenerateColorTargets();
                     apply = new ApplyTween(ApplyColorTargets);
                 break;
             case "rect":
                     GenerateRectTargets();
                     apply = new ApplyTween(ApplyRectTargets);
                 break;
             }
         break;
         case "color":
             switch (method) {
                 case "to":
                     GenerateColorToTargets();
                     apply = new ApplyTween(ApplyColorToTargets);
                 break;
             }
         break;
         case "audio":
             switch (method) {
                 case "to":
                     GenerateAudioToTargets();
                     apply = new ApplyTween(ApplyAudioToTargets);
                 break;
             }
         break;
         case "move":
             switch (method) {
                 case "to":
                     //using a path?
                     if(tweenArguments.Contains("path")){
                         GenerateMoveToPathTargets();
                         apply = new ApplyTween(ApplyMoveToPathTargets);
                     }else{ //not using a path?
                         GenerateMoveToTargets();
                         apply = new ApplyTween(ApplyMoveToTargets);
                     }
                 break;
                 case "by":
                 case "add":
                     GenerateMoveByTargets();
                     apply = new ApplyTween(ApplyMoveByTargets);
                 break;
             }
         break;
         case "scale":
             switch (method){
                 case "to":
                     GenerateScaleToTargets();
                     apply = new ApplyTween(ApplyScaleToTargets);
                 break;
                 case "by":
                     GenerateScaleByTargets();
                     apply = new ApplyTween(ApplyScaleToTargets);
                 break;
                 case "add":
                     GenerateScaleAddTargets();
                     apply = new ApplyTween(ApplyScaleToTargets);
                 break;
             }
         break;
         case "rotate":
             switch (method) {
                 case "to":
                     GenerateRotateToTargets();
                     apply = new ApplyTween(ApplyRotateToTargets);
                 break;
                 case "add":
                     GenerateRotateAddTargets();
                     apply = new ApplyTween(ApplyRotateAddTargets);
                 break;
                 case "by":
                     GenerateRotateByTargets();
                     apply = new ApplyTween(ApplyRotateAddTargets);
                 break;
             }
         break;
         case "shake":
             switch (method) {
                 case "position":
                     GenerateShakePositionTargets();
                     apply = new ApplyTween(ApplyShakePositionTargets);
//.........这里部分代码省略.........
开发者ID:hyf042,项目名称:BakeryGirl-chess,代码行数:101,代码来源:iTween.cs

示例2: GenerateTargets

    //call correct set target method and set tween application delegate:
    void GenerateTargets()
    {
        switch (type) {
            case "value":
                switch (method) {
                    case "float":
                        GenerateFloatTargets();
                        apply = new ApplyTween(ApplyFloatTargets);
                    break;
                case "vector2":
                        GenerateVector2Targets();
                        apply = new ApplyTween(ApplyVector2Targets);
                    break;
                case "vector3":
                        GenerateVector3Targets();
                        apply = new ApplyTween(ApplyVector3Targets);
                    break;
                case "color":
                        GenerateColorTargets();
                        apply = new ApplyTween(ApplyColorTargets);
                    break;
                case "rect":
                        GenerateRectTargets();
                        apply = new ApplyTween(ApplyRectTargets);
                    break;
                }
            break;
            case "property":
                switch (method) {
                    case "morph":
                        GenerateMorphTargets();
                        apply = new ApplyTween(ApplyPropertyMorphTargets);
                        break;
                    case "float":
                        GenerateFloatTargets();
                        apply = new ApplyTween(ApplyPropertyFloatTargets);
                    break;
                case "vector2":
                        GenerateVector2Targets();
                        apply = new ApplyTween(ApplyPropertyVector2Targets);
                    break;
                case "vector3":
                        GenerateVector3Targets();
                        apply = new ApplyTween(ApplyPropertyVector3Targets);
                    break;
                case "color":
                        GenerateColorTargets();
                        apply = new ApplyTween(ApplyPropertyColorTargets);
                    break;
                case "rect":
                        GenerateRectTargets();
                        apply = new ApplyTween(ApplyPropertyRectTargets);
                    break;
                }
            break;
            case "color":
                switch (method) {
                    case "to":
                        GenerateColorToTargets();
                        apply = new ApplyTween(ApplyColorToTargets);
                    break;
                }
            break;
            case "audio":
                switch (method) {
                    case "to":
                        GenerateAudioToTargets();
                        apply = new ApplyTween(ApplyAudioToTargets);
                    break;
                }
            break;
            case "move":
                switch (method) {
                    case "to":
                        //using a path?
                        if(tweenArguments.Contains("path")){
                            GenerateMoveToPathTargets();
                            apply = new ApplyTween(ApplyMoveToPathTargets);
                        }else{ //not using a path?
                            GenerateMoveToTargets();
                            apply = new ApplyTween(ApplyMoveToTargets);
                        }
                    break;
                    case "by":
                    case "add":
                        GenerateMoveByTargets();
                        apply = new ApplyTween(ApplyMoveByTargets);
                    break;
                }
            break;
            case "scale":
                switch (method){
                    case "to":
                        GenerateScaleToTargets();
                        apply = new ApplyTween(ApplyScaleToTargets);
                    break;
                    case "by":
                        GenerateScaleByTargets();
                        apply = new ApplyTween(ApplyScaleToTargets);
//.........这里部分代码省略.........
开发者ID:xuwei2048,项目名称:Animator_Timeline,代码行数:101,代码来源:AMTween.cs


注:本文中的ApplyTween类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。