Ejemplo n.º 1
0
 public static void Despawn(PoolRef obj)
 {
     if (Instance)
     {
         Instance.DoDespawn(obj.Ref);
     }
 }
Ejemplo n.º 2
0
                //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);
                }
Ejemplo n.º 3
0
            /// <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);
            }
Ejemplo n.º 4
0
 public PoolRef(PoolRef other)
 {
     ptr = other.ptr;
     cachedPool = Pool.Instance;
     cachedObj = other.cachedObj;
 }
Ejemplo n.º 5
0
 protected virtual void Awake()
 {
     tran     = GetComponent <Transform>();
     pool_ref = GetComponent <PoolRef>();
 }
Ejemplo n.º 6
0
 public PoolRef(PoolRef other)
 {
     ptr        = other.ptr;
     cachedPool = Pool.Instance;
     cachedObj  = other.cachedObj;
 }