public override IEnumerator ReceivePayload(VisualPayload payload) { var gameEventIterator = PopulateGameEventContainer(payload); while (gameEventIterator.MoveNext()) { yield return(null); } if (EventContainer == null) { Debug.LogError("Aborting; EventContainer was null."); yield break; } //var eventContainerMutableObject = MutableObject.FromObject( eventContainer ); var eventContainerMutableObject = EventContainerToMutableObject(EventContainer.Rounds); GameEventsTarget.SetValue(eventContainerMutableObject, payload.Data); var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } }
protected override void OnProcessOutputSchema(MutableObject newSchema) { var roundsList = new List <Round>() { Round.GetTestRound() }; foreach (var entry in GameEventsTarget.GetEntries(newSchema)) { GameEventsTarget.SetValue(EventContainerToMutableObject(roundsList), entry); } Router.TransmitAllSchema(newSchema); }