public static void Despawn(PoolRef obj) { if (Instance) { Instance.DoDespawn(obj.Ref); } }
//Methods /// <summary> /// See the base. /// </summary> public override bool Equals(object obj) { if (obj == null) { return(false); } PoolRef cmpSettings = obj as PoolRef; if (_reservoirInstanceIdx != cmpSettings._reservoirInstanceIdx || _poolIdx != cmpSettings._poolIdx ) { return(false); } return(true); }
/// <summary> /// Creates the deep copy instance of this instance /// </summary> public MapperSettings DeepClone() { MapperSettings clonnedMapper = new MapperSettings(); foreach (KeyValuePair <string, List <PoolRef> > keyValuePair in Map) { List <PoolRef> clonnedList = new List <PoolRef>(keyValuePair.Value.Count); foreach (PoolRef ap in keyValuePair.Value) { PoolRef clonnedAP = new PoolRef { _reservoirInstanceIdx = ap._reservoirInstanceIdx, _poolIdx = ap._poolIdx }; clonnedList.Add(clonnedAP); } clonnedMapper.Map.Add(keyValuePair.Key, clonnedList); } return(clonnedMapper); }
public PoolRef(PoolRef other) { ptr = other.ptr; cachedPool = Pool.Instance; cachedObj = other.cachedObj; }
protected virtual void Awake() { tran = GetComponent <Transform>(); pool_ref = GetComponent <PoolRef>(); }