Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 private AudioControllerEventData(AudioControlMethod audioControlMethod)
 {
     AudioControlMethod = audioControlMethod;
 }
Esempio n. 3
0
 public static AudioControllerEventData Create(AudioControlMethod audioControlMethod) =>
 new AudioControllerEventData(audioControlMethod);