/// <summary>
        ///
        /// </summary>
        public static void InitializeTypes()
        {
            if (Initializer == null)
            {
                throw new ArgumentNullException(nameof(Initializer));
            }

            CacheList.Clear();
            var types = Initializer.GetTypeInfos().ToList();

            types.ForEach(InitializeType);
        }
示例#2
0
    void IPoolDespawn.OnDespawned()
    {
        isSpawning = false;

        foreach (var ent in mSpawnedEntities)
        {
            if (ent)
            {
                EntityRegisterCallbacks(ent, false);
            }
        }

        mSpawnedEntities.Clear();
    }
示例#3
0
        public override void Reset()
        {
            base.Reset();

            foreach (var subEntity in _subEntities)
            {
                subEntity.Reset();
            }

            _outLookup.Clear();
            _inputBuffer.Clear();
            _hashMemory.Clear();
            State = Hash.Identity;
        }
示例#4
0
        public void CacheRemAndAdd()
        {
            var list = new CacheList <UserFriend>();

            list.AddRange(new[]
            {
                new UserFriend()
                {
                    UserId = 1001
                },
                new UserFriend()
                {
                    UserId = 1002
                },
            });

            var temp = list.ToArray();

            list.Clear();
            list.AddRange(temp);
        }
示例#5
0
 public override void Reset()
 {
     base.Reset();
     _inOutHashMemory.Clear();
 }