コード例 #1
0
 public static void Despawn(PoolRef obj)
 {
     if (Instance)
     {
         Instance.DoDespawn(obj.Ref);
     }
 }
コード例 #2
0
ファイル: StateMachineSettings.cs プロジェクト: lulzzz/NET
                //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);
                }
コード例 #3
0
ファイル: StateMachineSettings.cs プロジェクト: lulzzz/NET
            /// <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);
            }
コード例 #4
0
 public PoolRef(PoolRef other)
 {
     ptr = other.ptr;
     cachedPool = Pool.Instance;
     cachedObj = other.cachedObj;
 }
コード例 #5
0
 protected virtual void Awake()
 {
     tran     = GetComponent <Transform>();
     pool_ref = GetComponent <PoolRef>();
 }
コード例 #6
0
 public PoolRef(PoolRef other)
 {
     ptr        = other.ptr;
     cachedPool = Pool.Instance;
     cachedObj  = other.cachedObj;
 }