Exemplo n.º 1
0
        public void Update(Object[] args)
        {
            if (StartMethod != null)
            {
                foreach (var instance in StartList)
                {
                    var node = instance.Node;

                    if (node != null && node.IsEnabled())
                    {
                        if (node.Scene != null)
                        {
                            StartMethod.Invoke(instance, null);
                        }
                    }
                }

                // TODO: need to handle delayed starts when node isn't enabled
                StartList.Clear();
            }

            if (UpdateMethod != null)
            {
                foreach (var instance in Instances)
                {
                    bool remove = false;

                    var node = instance.Node;

                    if (node != null && node.IsEnabled())
                    {
                        if (node.Scene != null)
                        {
                            UpdateMethod.Invoke(instance, args);
                        }
                        else
                        {
                            remove = true;
                        }
                    }
                    else
                    {
                        remove = true;
                    }

                    if (remove)
                    {
                        RemoveList.Add(instance);
                    }
                }
            }

            foreach (var instance in RemoveList)
            {
                Instances.Remove(instance);
            }

            RemoveList.Clear();
        }
Exemplo n.º 2
0
            public string GetUpdate(ArchAngel.Interfaces.Scripting.DatabaseChanges.IChangedTable table)
            {
                object[] parms = new object[] { table };
                string   body  = (string)UpdateMethod.Invoke(null, parms);

                if (body.StartsWith("          "))
                {
                    body = body.Substring(10);
                }

                return(body);
            }
 public void RefreshUI(InputField[] inputs, object value)
 {
     UpdateUIMethod.Invoke(inputs, value);
 }
Exemplo n.º 4
0
 public void Update(float deltaTime)
 {
     _update?.Invoke(deltaTime);
 }
Exemplo n.º 5
0
 public void Update()
 {
     UpdateMethod?.Invoke();
 }