public async void Ship(ShipSignal signal) { _trackFactory.Create(); await UniTask.DelayFrame(30); _signalBus.Fire(new SoundSignal(Sound.Ship)); }
private void DecodeLoad(ushort channelId) { var position = ReceiveUint(); var index = new TrackIndex { ChannelId = channelId, Position = position }; var type = DecodeTrackType(); var description = ReceiveString(); var duration = 0U; if (type.HasAudio()) { duration = ReceiveUint(); } var text = ""; if (type.HasText()) { text = ReceiveString(); } var track = TrackFactory.Create(type, description, duration, text); Dispatch(new MarkerChangeArgs(channelId, MarkerType.Position, 0U)); Dispatch(new TrackLoadArgs(index, track)); }
protected override void DecodeItem(byte channelId) { // The client version of this command gets the item information. var position = ReceiveUint(); var index = new TrackIndex { ChannelId = channelId, Position = position }; var type = DecodeTrackType(); var description = ReceiveString(); var entry = TrackFactory.Create(type, description); Dispatch(new TrackAddArgs(index, entry)); }
public void Tag_Is_Converted_Correctly(string transponderData, string wantedTag) { var result = uut.Create(transponderData); Assert.That(result.Tag, Is.EqualTo(wantedTag)); }
public void TestTrackFactory_Text() { var track = TrackFactory.Create(TrackType.Text, "Genesis", 32767, "ABACAB"); Assert.Equal("e|l|a|i|T|Genesis|0|ABACAB", track.Summarise()); }
public void TestTrackFactory_Null() { var track = TrackFactory.Create(TrackType.Void, SpecialTrackDescriptions.None); Assert.Equal("e|l|a|i|t|--NONE--|0|", track.Summarise()); }
public void TestTrackFactory_Loading() { var track = TrackFactory.Create(TrackType.Void, SpecialTrackDescriptions.Loading); Assert.Equal("e|L|a|i|t|Loading|0|", track.Summarise()); }
public void TestTrackFactory_LoadFailed() { var track = TrackFactory.Create(TrackType.Void, SpecialTrackDescriptions.LoadFailed); Assert.Equal("E|l|a|i|t|Load failed|0|", track.Summarise()); }
public void TestTrackFactory_AudioLibrary() { var track = TrackFactory.Create(TrackType.Library, "Genesis", 2753, "ABACAB"); Assert.Equal("e|l|A|I|t|Genesis|2753|", track.Summarise()); }