• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# iTween.EaseType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: StartIt

	// Use this for initialization
	public IEnumerator StartIt (float delayModifier) {
		yield return new WaitForSeconds(time * (1f - delayModifier));
		time = time * delayModifier;
		easeType = iTween.EaseType.easeInCubic;
		Hashtable hash = new Hashtable();
		hash.Add("oncomplete", "AnimationFinished");
		hash.Add("time", time);
		hash.Add("isLocal", true);
		hash.Add("position", localPositionToMoveTo);
		hash.Add("easetype", easeType);
		iTween.MoveTo(gameObject, hash);
		
		transform.localScale = new Vector3(delayModifier * delayModifier * delayModifier * delayModifier * 10f, 3f, 3f);
		easeType = iTween.EaseType.easeOutCubic;
		hash = new Hashtable();
		hash.Add("oncomplete", "AnimationFinished");
		hash.Add("time", time);
		hash.Add("isLocal", true);
		hash.Add("scale", new Vector3(delayModifier * delayModifier * .5f, 1f, 1f));
		hash.Add("easetype", easeType);
		iTween.ScaleTo(gameObject, hash);
		particleSystem.startSize *= delayModifier;
		particleSystem.Play();
	}
开发者ID:Master-Machines,项目名称:MusicEngine,代码行数:25,代码来源:TweenToPosition.cs


示例2: EaseType

 public iTweener EaseType(iTween.EaseType easeType)
 {
     _easeType = easeType;
     return this;
 }
开发者ID:rmarx,项目名称:ReverseRPG,代码行数:5,代码来源:iTweener.cs


示例3: RetrieveArgs

    //grab and set generic, neccesary iTween arguments:
    void RetrieveArgs()
    {
        foreach (Hashtable item in tweens) {
            if((GameObject)item["target"] == gameObject){
                tweenArguments=item;
                break;
            }
        }

        id=(string)tweenArguments["id"];
        type=(string)tweenArguments["type"];
        /* GFX47 MOD START */
        _name=(string)tweenArguments["name"];
        /* GFX47 MOD END */
        method=(string)tweenArguments["method"];

        if(tweenArguments.Contains("time")){
            time=(float)tweenArguments["time"];
        }else{
            time=Defaults.time;
        }

        //do we need to use physics, is there a rigidbody?
        if(rigidbody != null){
            physics=true;
        }

        if(tweenArguments.Contains("delay")){
            delay=(float)tweenArguments["delay"];
        }else{
            delay=Defaults.delay;
        }

        if(tweenArguments.Contains("namedcolorvalue")){
            //allows namedcolorvalue to be set as either an enum(C# friendly) or a string(JS friendly), string case usage doesn't matter to further increase usability:
            if(tweenArguments["namedcolorvalue"].GetType() == typeof(NamedValueColor)){
                namedcolorvalue=(NamedValueColor)tweenArguments["namedcolorvalue"];
            }else{
                try {
                    namedcolorvalue=(NamedValueColor)Enum.Parse(typeof(NamedValueColor),(string)tweenArguments["namedcolorvalue"],true);
                } catch {
                    Debug.LogWarning("iTween: Unsupported namedcolorvalue supplied! Default will be used.");
                    namedcolorvalue = iTween.NamedValueColor._Color;
                }
            }
        }else{
            namedcolorvalue=Defaults.namedColorValue;
        }

        if(tweenArguments.Contains("looptype")){
            //allows loopType to be set as either an enum(C# friendly) or a string(JS friendly), string case usage doesn't matter to further increase usability:
            if(tweenArguments["looptype"].GetType() == typeof(LoopType)){
                loopType=(LoopType)tweenArguments["looptype"];
            }else{
                try {
                    loopType=(LoopType)Enum.Parse(typeof(LoopType),(string)tweenArguments["looptype"],true);
                } catch {
                    Debug.LogWarning("iTween: Unsupported loopType supplied! Default will be used.");
                    loopType = iTween.LoopType.none;
                }
            }
        }else{
            loopType = iTween.LoopType.none;
        }

        if(tweenArguments.Contains("easetype")){
            //allows easeType to be set as either an enum(C# friendly) or a string(JS friendly), string case usage doesn't matter to further increase usability:
            if(tweenArguments["easetype"].GetType() == typeof(EaseType)){
                easeType=(EaseType)tweenArguments["easetype"];
            }else{
                try {
                    easeType=(EaseType)Enum.Parse(typeof(EaseType),(string)tweenArguments["easetype"],true);
                } catch {
                    Debug.LogWarning("iTween: Unsupported easeType supplied! Default will be used.");
                    easeType=Defaults.easeType;
                }
            }
        }else{
            easeType=Defaults.easeType;
        }

        if(tweenArguments.Contains("space")){
            //allows space to be set as either an enum(C# friendly) or a string(JS friendly), string case usage doesn't matter to further increase usability:
            if(tweenArguments["space"].GetType() == typeof(Space)){
                space=(Space)tweenArguments["space"];
            }else{
                try {
                    space=(Space)Enum.Parse(typeof(Space),(string)tweenArguments["space"],true);
                } catch {
                    Debug.LogWarning("iTween: Unsupported space supplied! Default will be used.");
                    space = Defaults.space;
                }
            }
        }else{
            space = Defaults.space;
        }

        if(tweenArguments.Contains("islocal")){
            isLocal = (bool)tweenArguments["islocal"];
//.........这里部分代码省略.........
开发者ID:hyf042,项目名称:BakeryGirl-chess,代码行数:101,代码来源:iTween.cs


示例4: setEaseType

 override public void setEaseType(iTween.EaseType value)
 {
     m_easeType = value;
 }
开发者ID:zhutaorun,项目名称:unitygame,代码行数:4,代码来源:ITweenAniBase.cs


示例5: RetrieveArgs

 private void RetrieveArgs()
 {
     foreach (Hashtable hashtable in iTween.tweens)
     {
         if ((GameObject)hashtable["target"] == base.gameObject)
         {
             this.tweenArguments = hashtable;
             break;
         }
     }
     this.id = (string)this.tweenArguments["id"];
     this.type = (string)this.tweenArguments["type"];
     this._name = (string)this.tweenArguments["name"];
     this.method = (string)this.tweenArguments["method"];
     if (this.tweenArguments.Contains("time"))
     {
         this.time = (float)this.tweenArguments["time"];
     }
     else
     {
         this.time = iTween.Defaults.time;
     }
     if (base.GetComponent<Rigidbody>() != null)
     {
         this.physics = true;
     }
     if (this.tweenArguments.Contains("delay"))
     {
         this.delay = (float)this.tweenArguments["delay"];
     }
     else
     {
         this.delay = iTween.Defaults.delay;
     }
     if (this.tweenArguments.Contains("namedcolorvalue"))
     {
         if (this.tweenArguments["namedcolorvalue"].GetType() == typeof(iTween.NamedValueColor))
         {
             this.namedcolorvalue = (iTween.NamedValueColor)((int)this.tweenArguments["namedcolorvalue"]);
         }
         else
         {
             try
             {
                 this.namedcolorvalue = (iTween.NamedValueColor)((int)Enum.Parse(typeof(iTween.NamedValueColor), (string)this.tweenArguments["namedcolorvalue"], true));
             }
             catch
             {
                 UnityEngine.Debug.LogWarning("iTween: Unsupported namedcolorvalue supplied! Default will be used.");
                 this.namedcolorvalue = iTween.NamedValueColor._Color;
             }
         }
     }
     else
     {
         this.namedcolorvalue = iTween.Defaults.namedColorValue;
     }
     if (this.tweenArguments.Contains("looptype"))
     {
         if (this.tweenArguments["looptype"].GetType() == typeof(iTween.LoopType))
         {
             this.loopType = (iTween.LoopType)((int)this.tweenArguments["looptype"]);
         }
         else
         {
             try
             {
                 this.loopType = (iTween.LoopType)((int)Enum.Parse(typeof(iTween.LoopType), (string)this.tweenArguments["looptype"], true));
             }
             catch
             {
                 UnityEngine.Debug.LogWarning("iTween: Unsupported loopType supplied! Default will be used.");
                 this.loopType = iTween.LoopType.none;
             }
         }
     }
     else
     {
         this.loopType = iTween.LoopType.none;
     }
     if (this.tweenArguments.Contains("easetype"))
     {
         if (this.tweenArguments["easetype"].GetType() == typeof(iTween.EaseType))
         {
             this.easeType = (iTween.EaseType)((int)this.tweenArguments["easetype"]);
         }
         else
         {
             try
             {
                 this.easeType = (iTween.EaseType)((int)Enum.Parse(typeof(iTween.EaseType), (string)this.tweenArguments["easetype"], true));
             }
             catch
             {
                 UnityEngine.Debug.LogWarning("iTween: Unsupported easeType supplied! Default will be used.");
                 this.easeType = iTween.Defaults.easeType;
             }
         }
     }
     else
//.........这里部分代码省略.........
开发者ID:GameDiffs,项目名称:TheForest,代码行数:101,代码来源:iTween.cs


示例6: BaseSetting

	public BaseSetting()
	{
		onStart = false;
		time = 1;
		delay = 0;
		easeType = iTween.EaseType.linear;
		loopType = iTween.LoopType.none;
	}
开发者ID:K-Yoshiki,项目名称:menko,代码行数:8,代码来源:AttachedTween.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# idwinterpolant类代码示例发布时间:2022-05-24
下一篇:
C# iTextSharp类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap