515151
This commit is contained in:
26
code-csharp/en_US/Enemy_TargetSelectionGlow.cs
Normal file
26
code-csharp/en_US/Enemy_TargetSelectionGlow.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Enemy_TargetSelectionGlow : MonoBehaviour
|
||||
{
|
||||
public bool CurrentlyTargetted;
|
||||
|
||||
[SerializeField]
|
||||
private bool PreviousTarget;
|
||||
|
||||
[SerializeField]
|
||||
private Animator GlowAnimator;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (PreviousTarget != CurrentlyTargetted)
|
||||
{
|
||||
PreviousTarget = CurrentlyTargetted;
|
||||
GlowAnimator.SetBool("Targetted", CurrentlyTargetted);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayGlowSpecializedAnimation(string anim)
|
||||
{
|
||||
GlowAnimator.Play(anim);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user