Example #1
0
        private static void SetInfo(IPoolObject obj, IPoolObjectOwner owner, Type t)
        {
            PoolObjInfo o = Instance.infos.Find((i) => { return(i.content == obj); });

            if (o == null)
            {
                o = Instance.infoCreater.Get();
                Instance.infos.Add(o);
            }
            o.owner   = owner;
            o.type    = t;
            o.content = obj;
        }
Example #2
0
        public static void Set(IPoolObject obj, IPoolObjectOwner owner, IEventArgs arg)
        {
            PoolObjInfo o = Instance.infos.Find((i) => { return(i.content == obj && i.owner == owner); });

            if (o == null)
            {
                Log.L("Not Find Same IPoolObject");
            }
            else
            {
                SetOne(o, arg);
            }
        }
Example #3
0
        public static void Clear(IPoolObject obj, IEventArgs arg, bool ignoreRun = true)
        {
            PoolObjInfo o = Instance.infos.Find((i) => { return(i.content == obj); });

            if (o == null)
            {
                Log.L("Not Find Same IPoolObject");
            }
            else
            {
                ClearOne(o, arg, ignoreRun);
            }
        }
Example #4
0
        public void Clear(IPoolObjectOwner owner, IEventArgs arg, bool ignoreRun = true)
        {
            PoolObjInfo o = infos.Find((i) => { return(i.owner == owner); });

            if (o == null)
            {
                Log.L("Not Find Same IPoolObject");
            }
            else
            {
                ClearOne(o, arg, ignoreRun);
            }
        }
Example #5
0
        public void Set(IPoolObject obj, IEventArgs arg)
        {
            PoolObjInfo o = infos.Find((i) => { return(i.content == obj); });

            if (o == null)
            {
                Log.L("Not Find Same IPoolObject");
            }
            else
            {
                SetOne(o, arg);
            }
        }
Example #6
0
 private static void ClearOne(PoolObjInfo o, IEventArgs arg, bool ignoreRun = true)
 {
     if (Instance[o.type].IsRunning(o.content))
     {
         if (ignoreRun)
         {
             return;
         }
         Set(o.type, o.content, o.owner, arg);
     }
     Instance[o.type].Clear(o.content, arg);
     Instance.infos.Remove(o);
     Instance.infoCreater.Set(o);
 }
Example #7
0
 private static void SetOne(PoolObjInfo o, IEventArgs arg)
 {
     Instance[o.type].Set(o.content, arg);
 }
Example #8
0
 private void SetOne(PoolObjInfo o, IEventArgs arg)
 {
     this[o.type].Set(o.content, arg);
 }