private void AssertAudioEvent(EventMessages eventMessages, AudioControlMethod audioControlMethod, Action <AudioSource> callback) { Assert.NotNull(eventMessages); Assert.AreEqual(2, eventMessages.Count); Assert.IsInstanceOf <AudioSource>(eventMessages[1].Sender); Assert.IsInstanceOf <AudioControllerEventData>(eventMessages[1].EventData); Assert.NotNull(eventMessages[1].EventData); Assert.AreEqual(audioControlMethod, ((AudioControllerEventData)eventMessages[1].EventData).AudioControlMethod); callback(eventMessages[1].Sender as AudioSource); HasAssert = true; }
private AudioControllerEventData(AudioControlMethod audioControlMethod) { AudioControlMethod = audioControlMethod; }
public static AudioControllerEventData Create(AudioControlMethod audioControlMethod) => new AudioControllerEventData(audioControlMethod);