| | 1 | | using DCL; |
| | 2 | | using DCL.QuestsController; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class TaskbarNewQuestTooltip : MonoBehaviour |
| | 6 | | { |
| 0 | 7 | | private static readonly int ANIM_STATE_TRIGGER = Animator.StringToHash("ShowDisabledTooltip"); |
| | 8 | | [SerializeField] private Animator animator; |
| | 9 | | [SerializeField] private AudioEvent newQuestAudioEvent; |
| | 10 | |
|
| 0 | 11 | | private void Awake() { QuestsController.i.OnNewQuest += OnNewQuest; } |
| | 12 | |
|
| 0 | 13 | | private void OnDestroy() { QuestsController.i.OnNewQuest -= OnNewQuest; } |
| | 14 | |
|
| | 15 | | private void OnNewQuest(string s) |
| | 16 | | { |
| 0 | 17 | | animator?.SetTrigger(ANIM_STATE_TRIGGER); |
| 0 | 18 | | newQuestAudioEvent.Play(); |
| 0 | 19 | | } |
| | 20 | | } |