Example #1
0
 public static void FlashSpriteLerp(GameObject obj, Color color, float duration)
 {
     if (obj.GetComponent <_GEffect.FlashSpriteClass> () == null)
     {
         obj.AddComponent <_GEffect.FlashSpriteClass> ();
         _GEffect.FlashSpriteClass flashSprite = obj.GetComponent <_GEffect.FlashSpriteClass> ();
         flashSprite.flashColor      = color;
         flashSprite.speed           = duration;
         flashSprite.flashSpriteEnum = _GEffect.FlashSpriteClass.FlashSpriteType.Lerp;
     }
 }
Example #2
0
    public static void FlashSprite(GameObject obj, Color color, float duration, int flashCount)
    {
        if (obj.GetComponent <_GEffect.FlashSpriteClass> () == null)
        {
            obj.AddComponent <_GEffect.FlashSpriteClass> ();
            _GEffect.FlashSpriteClass flashSprite = obj.GetComponent <_GEffect.FlashSpriteClass> ();

            flashSprite.flashColor      = color;
            flashSprite.duration        = duration;
            flashSprite.flashCount      = flashCount;
            flashSprite.flashSpriteEnum = _GEffect.FlashSpriteClass.FlashSpriteType.Multiple;
        }
    }