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; }
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); } }
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); } }
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); } }
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); } }
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); }
private static void SetOne(PoolObjInfo o, IEventArgs arg) { Instance[o.type].Set(o.content, arg); }
private void SetOne(PoolObjInfo o, IEventArgs arg) { this[o.type].Set(o.content, arg); }