Пример #1
0
 public SpriteColorWatch(SpriteColorComponent colorComponent, TweenFloat tween, Vector3 scale, int stage)
 {
     ColorComponent = colorComponent;
     Tween          = tween;
     Scale          = scale;
     Stage          = stage;
 }
Пример #2
0
 private void CheckTagColor(Entity entity, SpriteColorComponent colorComponent, TagTypes tagType)
 {
     if (colorComponent == null)
     {
         return;
     }
     if (entity.Tags.IsStunned || tagType == TagTypes.Stun)
     {
         colorComponent.BaseColor = _stunColor;
     }
     else if (entity.Tags.IsConfused || tagType == TagTypes.Confuse)
     {
         colorComponent.BaseColor = _confusedColor;
     }
     else if (entity.Tags.IsSlowed || tagType == TagTypes.Slow)
     {
         colorComponent.BaseColor = _frozenColor;
     }
     else
     {
         colorComponent.BaseColor = Color.white;
     }
     if (colorComponent.AnimatingColor)
     {
         return;
     }
     colorComponent.UpdateBaseColor();
 }
Пример #3
0
 public SpriteColorWatch(SpriteColorComponent colorComponent, SpriteRendererComponent renderer, TweenFloat tween, Vector3 scale)
 {
     ColorComponent = colorComponent;
     Tween          = tween;
     Scale          = scale;
     Renderer       = renderer;
     Stage          = 0;
 }
Пример #4
0
        private void StartColorDamageTween(SpriteColorComponent colorComponent)
        {
            colorComponent.AnimatingColor = true;
            colorComponent.UpdateCurrentColor(Color.red);
            var tween = _floatPool.New();

            tween.Restart(1, colorComponent.DmgMaxScale);
            _colorList.Add(new SpriteColorWatch(colorComponent, tween, colorComponent.Renderer.transform.localScale));
        }