コード例 #1
0
        void OnTakeDamageHandler(TakeDamageData data)
        {
            if (data.go == null)
            {
                return;
            }

            switch (data.spriteEffectType)
            {
            case SpriteEffectType.Blink:
                StartCoroutine(DoBlink(data.go, MatBlink, data.spriteEffectDuration));
                break;

            case SpriteEffectType.BlinkDark:
                StartCoroutine(DoBlink(data.go, MatBinkDark, data.spriteEffectDuration));
                break;

            case SpriteEffectType.NeonColor:
                StartCoroutine(SwapMat(data.go, MatNeon, data.spriteEffectDuration));
                break;

            default:
                break;
            }
        }
コード例 #2
0
        void OnTakeDamageHandler(TakeDamageData data)
        {
            if (data.go == null)
            {
                return;
            }

            switch (data.spriteEffectType)
            {
            case SpriteEffectType.Blink:
                StartCoroutine(DoBlink(data.go, MatBlink));
                break;

            case SpriteEffectType.BlinkDark:
                StartCoroutine(DoBlink(data.go, MatBinkDark));
                break;

            default:
                break;
            }
        }
コード例 #3
0
 public void OnTakeDamage(TakeDamageData data)
 {
     OnTakeDamageHandler?.Invoke(data);
 }
コード例 #4
0
 // TODO: chang ethis datatype to a dedicated one
 public void OnSpriteEffect(TakeDamageData data)
 {
     OnSpriteEffectHandler?.Invoke(data);
 }