Example #1
0
 /// <summary>
 /// Sets the named color value.
 ///<para></para> for which color of a shader to use. Uses "_Color" by default.
 /// </summary>
 /// <param name="namedValueColor">Named value color.</param>
 public iTweenHashBuilder SetNamedColorValue(iTween.NamedValueColor namedValueColor)
 {
     hashTable.Add("namedcolorvalue", namedValueColor);
     return(this);
 }
Example #2
0
 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
     {
         this.easeType = iTween.Defaults.easeType;
     }
     if (this.tweenArguments.Contains("space"))
     {
         if (this.tweenArguments["space"].GetType() == typeof(Space))
         {
             this.space = (Space)((int)this.tweenArguments["space"]);
         }
         else
         {
             try
             {
                 this.space = (Space)((int)Enum.Parse(typeof(Space), (string)this.tweenArguments["space"], true));
             }
             catch
             {
                 UnityEngine.Debug.LogWarning("iTween: Unsupported space supplied! Default will be used.");
                 this.space = iTween.Defaults.space;
             }
         }
     }
     else
     {
         this.space = iTween.Defaults.space;
     }
     if (this.tweenArguments.Contains("islocal"))
     {
         this.isLocal = (bool)this.tweenArguments["islocal"];
     }
     else
     {
         this.isLocal = iTween.Defaults.isLocal;
     }
     if (this.tweenArguments.Contains("ignoretimescale"))
     {
         this.useRealTime = (bool)this.tweenArguments["ignoretimescale"];
     }
     else
     {
         this.useRealTime = iTween.Defaults.useRealTime;
     }
     this.GetEasingFunction();
 }