예제 #1
0
        public override IEnumerator Run(InstructionGraph graph, InstructionStore variables, int iteration)
        {
            _status.Reset();

            if (ResolveObject(variables, Object, out Object obj))
            {
                if (obj is GameObject gameObject)
                {
                    VariableBinding.UpdateBinding(gameObject, Group, WaitForCompletion ? _status : null);
                }
                else if (obj is InterfaceControl control)
                {
                    VariableBinding.UpdateBinding(control.gameObject, Group, WaitForCompletion ? _status : null);

                    foreach (var dependency in control.DependentObjects)
                    {
                        VariableBinding.UpdateBinding(dependency, Group, WaitForCompletion ? _status : null);
                    }
                }
                else if (obj is Component component)
                {
                    VariableBinding.UpdateBinding(component.gameObject, Group, WaitForCompletion ? _status : null);
                }
            }

            if (WaitForCompletion)
            {
                while (!_status.IsFinished())
                {
                    yield return(null);
                }
            }

            graph.GoTo(Next, nameof(Next));
        }
예제 #2
0
        public override IEnumerator Run(InstructionGraph graph, InstructionStore variables, int iteration)
        {
            if (ResolveObject(variables, Object, out BindingRoot root))
            {
                root.Value = Binding.GetValue(variables);
                VariableBinding.UpdateBinding(root.gameObject, null, null);
            }

            graph.GoTo(Next, nameof(Next));
            yield break;
        }
예제 #3
0
        private void Initialize(bool isSelectionRequired, bool resetIndex)
        {
            IsSelectionRequired = isSelectionRequired;
            IsClosing           = false;

            _selectedItem = null;

            if (resetIndex && _menu.Items.Count > 0)
            {
                _menu.FocusedItem = _menu.Items[0];
            }

            OnInitialize();

            VariableBinding.UpdateBinding(gameObject, null, null);
        }