private void Stop(GameObject parent, MyPoolManager pool, IDictionary<GameObject, GameObject> buffMap) { if (pool == null) { return; } var buff = buffMap[parent]; buffMap.Remove(parent); pool.Return(buff); StopBuff(buff); }
// Use this for initialization void Start() { Instance = this; }
public MyClass(MyPoolManager manager) { this.manager = manager; }
private float Take(GameObject parent, MyPoolManager pool, IDictionary<GameObject, GameObject> buffMap) { if (pool == null) { return 0f; } if (!buffMap.ContainsKey(parent)) { buffMap[parent] = pool.Take(); } var buff = buffMap[parent]; buff.SetActive(true); SetParent(buff, parent); return Initialize(buffMap[parent]); }
// Use this for initialization void Start () { Instance = this; }