Ejemplo n.º 1
0
 public 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.ILObject, rArgs));
 }
Ejemplo n.º 2
0
 public override object Invoke(HotfixObject rHotfixObj, string rMethodName, params object[] rArgs)
 {
     if (mApp == null || rHotfixObj == null)
     {
         return(null);
     }
     return(this.mApp.Invoke(rHotfixObj.TypeName, rMethodName, rHotfixObj.Object, rArgs));
 }
Ejemplo n.º 3
0
        public IEnumerator Initialize()
        {
            // 加载Hotfix端的代码
            this.MainLogicHotfixObj = HotfixApp.Instance.Instantiate(this.MainLogicScript);

            // 加载Hotfix端的代码
            yield return(HotfixApp.Instance.Invoke(this.MainLogicHotfixObj, "Initialize") as IEnumerator);
        }
Ejemplo n.º 4
0
 public object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs)
 {
     if (mApp == null)
     {
         return(null);
     }
     return(mApp.InvokeParent(rHotfixObj, rParentType, rMethodName, rArgs));
 }
        public async Task Initialize()
        {
            // 加载Hotfix端的代码
            this.MainLogicHotfixObj = HotfixManager.Instance.Instantiate(this.MainLogicScript);

            // 加载Hotfix端的代码
            await(HotfixManager.Instance.Invoke(this.MainLogicHotfixObj, "Initialize") as Task);
        }
Ejemplo n.º 6
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);
     }
 }
Ejemplo n.º 7
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));
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
0
        protected virtual void OnDestroy()
        {
            if (mMBHotfixObj != null)
            {
                mMBHotfixObj.InvokeParent(this.mParentType, "OnDestroy_Proxy");
            }

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

            mMBHotfixObj = null;
            mObjects     = null;
        }
Ejemplo n.º 11
0
        public HotfixObject CreateInstance(string rTypeName, params object[] rArgs)
        {
            if (mApp == null)
            {
                return(null);
            }
            HotfixObject rObject = new HotfixObject(mApp, rTypeName);

            if (rObject == null)
            {
                return(rObject);
            }

            rObject.CreateInstance(rArgs);
            return(rObject);
        }
Ejemplo n.º 12
0
 public virtual object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs)
 {
     return(null);
 }