< Summary

Class:AudioEvent_WithPitchIncrement
Assembly:Audio
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Audio/AudioEvent_WithPitchIncrement.cs
Covered lines:3
Uncovered lines:2
Coverable lines:5
Total lines:18
Line coverage:60% (3 of 5)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Initialize(...)0%110100%
ResetPitch()0%2100%
OnEventPlay()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Audio/AudioEvent_WithPitchIncrement.cs

#LineLine coverage
 1using UnityEngine;
 2
 3[CreateAssetMenu(fileName = "AudioEventWithPitchIncrement", menuName = "AudioEvents/AudioEvent - With pitch increment")]
 4public class AudioEvent_WithPitchIncrement : AudioEvent
 5{
 6    [SerializeField]
 7    float pitchIncrement;
 8
 9    public override void Initialize(AudioContainer audioContainer)
 10    {
 5111        base.Initialize(audioContainer);
 5112        OnPlay += OnEventPlay;
 5113    }
 14
 015    public void ResetPitch() { SetPitch(initialPitch); }
 16
 017    void OnEventPlay() { SetPitch(pitch + pitchIncrement); }
 18}