Beispiel #1
0
        /// <summary>
        /// 进行自动化任务(状态)
        /// </summary>
        private void DoAutomaticTaskOfState(Type type, FiniteStateBase finiteState)
        {
            if (_isAutomate)
            {
                FieldInfo[] fieldInfos = AutomaticTask.GetAutomaticFields(type);
                AutomaticTask.ApplyObjectPath(finiteState, fieldInfos);

                if (_isSupportedDataDriver)
                {
                    AutomaticTask.ApplyDataBinding(finiteState, fieldInfos);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 进行自动化任务(数据)
        /// </summary>
        private void DoAutomaticTaskOfData(FSMDataBase fsmData)
        {
            if (_isAutomate)
            {
                FieldInfo[] fieldInfos = AutomaticTask.GetAutomaticFields(fsmData.GetType());
                AutomaticTask.ApplyObjectPath(fsmData, fieldInfos);

                if (_isSupportedDataDriver)
                {
                    AutomaticTask.ApplyDataBinding(fsmData, fieldInfos);
                }
            }
        }
        /// <summary>
        /// 初始化
        /// </summary>
        public virtual void OnInit()
        {
            if (IsAutomate)
            {
                FieldInfo[] fieldInfos = AutomaticTask.GetAutomaticFields(GetType());
                AutomaticTask.ApplyObjectPath(this, fieldInfos);

                if (IsSupportedDataDriver)
                {
                    AutomaticTask.ApplyDataBinding(this, fieldInfos);
                }
            }
        }
Beispiel #4
0
        protected virtual void Awake()
        {
            useGUILayout = false;

            if (IsAutomate)
            {
                FieldInfo[] fieldInfos = AutomaticTask.GetAutomaticFields(GetType());
                AutomaticTask.ApplyObjectPath(this, fieldInfos);

                if (IsSupportedDataDriver)
                {
                    AutomaticTask.ApplyDataBinding(this, fieldInfos);
                }
            }
        }