Example #1
0
        public override TaskStatus OnUpdate()
        {
            try
            {
                if (_Method == null)
                {
                    _Method = CreateDelegate();
                }

                return(_Method());
            }
            catch (Exception e)
            {
                Debug.LogError(e);
                return(TaskStatus.Failure);
            }
        }
Example #2
0
        public override void OnFixedUpdate()
        {
            try
            {
                if (method == null)
                {
                    method = (NoArgMethod)Delegate.CreateDelegate(typeof(NoArgMethod), sharedObject.Value, methodName);
                }

                method();
            }
            catch (Exception e)
            {
                Debug.Log(e);
            }

            fixedUpdating = false;
        }