Exemplo n.º 1
0
        private IEnumerator SendNoneSelected()
        {
            foreach (var payload in UnSelectedList)
            {
                payload.VisualData.Bound.ClearBounds();

                var iterator = NoneSelectedState.Transmit(payload);
                while (iterator.MoveNext())
                {
                    yield return(null);
                }
            }
        }
Exemplo n.º 2
0
        public IEnumerator TransmitAll()
        {
            IEnumerator iterator;

            if (SelectedList.Count > 0)
            {
                foreach (var payload in UnSelectedList)
                {
                    payload.VisualData.Bound.ClearBounds();

                    iterator = NormalState.Transmit(payload);
                    while (iterator.MoveNext())
                    {
                        yield return(null);
                    }
                }
            }
            else
            {
                foreach (var payload in UnSelectedList)
                {
                    payload.VisualData.Bound.ClearBounds();

                    iterator = NoneSelectedState.Transmit(payload);
                    while (iterator.MoveNext())
                    {
                        yield return(null);
                    }
                }
            }

            foreach (var payload in SelectedList)
            {
                payload.VisualData.Bound.ClearBounds();

                iterator = SelectedState.Transmit(payload);
                while (iterator.MoveNext())
                {
                    yield return(null);
                }
            }

            iterator = TransmitMultiStates();
            while (iterator.MoveNext())
            {
                yield return(null);
            }
        }
Exemplo n.º 3
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            var elementList = EntryField.GetFirstValue(newSchema) as IEnumerable <MutableObject>;

            if (elementList == null)
            {
                Debug.LogError("This isn't a valid schema!  The entries field is empty!");
            }

            var singleSchema = elementList.First();
            var multiSchema  = new MutableObject();

            multiSchema.Add("Entries", elementList);

            NormalState.TransmitSchema(singleSchema);
            SelectedState.TransmitSchema(singleSchema);
            NoneSelectedState.TransmitSchema(singleSchema);

            NormalStateMulti.TransmitSchema(multiSchema);
            SelectedStateMulti.TransmitSchema(multiSchema);
            NoneSelectedStateMulti.TransmitSchema(multiSchema);
        }
Exemplo n.º 4
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            var entry = EntryField.GetEntries(newSchema);

            var foundEntries = entry.ToList();

            if (!foundEntries.Any())
            {
                Debug.Log("No valid entries in " + EntryField.AbsoluteKey);
                Router.TransmitAllSchema(new MutableObject());
                return;
            }

            MutableObject outMutable = null;

            foreach (var foundEntry in EntryField.GetEntries(newSchema))
            {
                outMutable = foundEntry.Last();
                break;
            }

            NormalState.TransmitSchema(outMutable);
            SelectedState.TransmitSchema(outMutable);
            NoneSelectedState.TransmitSchema(outMutable);

            var multiSchema = new MutableObject()
            {
                { "Entries", new List <MutableObject> {
                      outMutable
                  } }
            };

            NormalStateMulti.TransmitSchema(multiSchema);
            SelectedStateMulti.TransmitSchema(multiSchema);
            NoneSelectedStateMulti.TransmitSchema(multiSchema);
        }