예제 #1
0
 void HandleEffect(SuckHPEffect effect, LooksInfo looks)
 {
     if (effect.Status == EffectStatus.WaitForRender)
     {
         if (looks.CurState == LooksInfo.State.Loaded)
         {
             var trans = EntityManager.GetComponentObject <Transform>(looks.LooksEntity);
             EffectUtil.SetHitEffectColor(trans, new Color(1, 0.23f, 0, 1), true);
             effect.Status = EffectStatus.Rendering;
         }
     }
     else if (effect.Status == EffectStatus.Rendering)
     {
         long curTime = TimeEx.ServerTime;
         if (curTime >= effect.EndTime)
         {
             if (looks.CurState == LooksInfo.State.Loaded)
             {
                 var trans = EntityManager.GetComponentObject <Transform>(looks.LooksEntity);
                 EffectUtil.SetHitEffectColor(trans, new Color(1, 0.23f, 0, 0), false);
             }
             effect.Status = EffectStatus.None;
         }
     }
 }
예제 #2
0
 void HandleEffect(ParticleEffects effect, LooksInfo looks)
 {
 }