本文整理汇总了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);
//.........这里部分代码省略.........
示例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);
//.........这里部分代码省略.........