Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }