< Summary

Class:TaskbarNewQuestTooltip
Assembly:TaskbarHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/TaskbarHUD/TaskbarNewQuestTooltip.cs
Covered lines:3
Uncovered lines:3
Coverable lines:6
Total lines:20
Line coverage:50% (3 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TaskbarNewQuestTooltip()0%110100%
Awake()0%110100%
OnDestroy()0%110100%
OnNewQuest(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/TaskbarHUD/TaskbarNewQuestTooltip.cs

#LineLine coverage
 1using DCL;
 2using DCL.QuestsController;
 3using UnityEngine;
 4
 5public class TaskbarNewQuestTooltip : MonoBehaviour
 6{
 17    private static readonly int ANIM_STATE_TRIGGER = Animator.StringToHash("ShowDisabledTooltip");
 8    [SerializeField] private Animator animator;
 9    [SerializeField] private AudioEvent newQuestAudioEvent;
 10
 2211    private void Awake() { QuestsController.i.OnNewQuest += OnNewQuest; }
 12
 2213    private void OnDestroy() { QuestsController.i.OnNewQuest -= OnNewQuest; }
 14
 15    private void OnNewQuest(string s)
 16    {
 017        animator?.SetTrigger(ANIM_STATE_TRIGGER);
 018        newQuestAudioEvent.Play();
 019    }
 20}