Advertisement
johnnygoodguy2000

EnemyDamageFlash.cs

Dec 25th, 2024
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | Gaming | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class EnemyDamagedFlash : MonoBehaviour
  6. {
  7.     [SerializeField] private float flashDuration;
  8.  
  9.     [SerializeField] private Color flashColor;
  10.  
  11.     [SerializeField] private int numberOfFlashes;
  12.  
  13.     private Sprite_Flash _spriteFlash;
  14.  
  15.     private void Awake()
  16.     {
  17.         _spriteFlash = GetComponent<Sprite_Flash>();
  18.     }
  19.  
  20.     public void StartFlash()
  21.     {
  22.         _spriteFlash.StartFlash(flashDuration, flashColor, numberOfFlashes);
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement