Esempio n. 1
0
 public object Invoke(HotfixObject rHotfixObj, string rMethodName, params object[] rArgs)
 {
     if (mApp == null)
     {
         return(null);
     }
     return(mApp.Invoke(rHotfixObj, rMethodName, rArgs));
 }
Esempio n. 2
0
 public override object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs)
 {
     if (mApp == null || rHotfixObj == null)
     {
         return(null);
     }
     return(this.mApp.Invoke(rParentType, rMethodName, rHotfixObj.Object, rArgs));
 }
        public async Task Initialize()
        {
            // 加载Hotfix端的代码
            this.MainLogicHotfixObj = HotfixManager.Instance.Instantiate(this.MainLogicScript);

            // 加载Hotfix端的代码
            await(HotfixManager.Instance.Invoke(this.MainLogicHotfixObj, "Initialize") as Task);
        }
Esempio n. 4
0
 protected void InitHotfixMB()
 {
     if (mMBHotfixObj == null && !string.IsNullOrEmpty(mHotfixName))
     {
         this.mParentType  = string.Format(this.mParentType, this.mHotfixName);
         this.mMBHotfixObj = HotfixManager.Instance.Instantiate(this.mHotfixName);
         this.mMBHotfixObj.InvokeParent(this.mParentType, "Awake_Proxy", this.gameObject, this.mObjects);
     }
 }
Esempio n. 5
0
        public override object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs)
        {
            if (mApp == null)
            {
                return(null);
            }
            Type rObjType = mApp.GetType(rParentType);

            return(ReflectionAssist.MethodMember(rHotfixObj.Object, rMethodName, ReflectionAssist.flags_method_inst, rArgs));
        }
Esempio n. 6
0
        public override HotfixObject Instantiate(string rTypeName, params object[] rArgs)
        {
            if (mApp == null)
            {
                return(null);
            }
            var rObject = new HotfixObject(this, rTypeName);

            rObject.Object = Activator.CreateInstance(mApp.GetType(rTypeName), rArgs);
            return(rObject);
        }
Esempio n. 7
0
        public override HotfixObject Instantiate(string rTypeName, params object[] rArgs)
        {
            if (mApp == null)
            {
                return(null);
            }
            var rObject = new HotfixObject(this, rTypeName);

            rObject.Object = this.mApp.Instantiate(rTypeName, rArgs);
            return(rObject);
        }
Esempio n. 8
0
        protected virtual void OnDestroy()
        {
            if (mMBHotfixObj != null)
            {
                mMBHotfixObj.InvokeParent(this.mParentType, "OnDestroy_Proxy");
            }

            if (mObjects != null)
            {
                mObjects.Clear();
            }

            mMBHotfixObj = null;
            mObjects     = null;
        }
Esempio n. 9
0
 public virtual object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs)
 {
     return(null);
 }