InitId() public method

public InitId ( int id ) : void
id int
return void
示例#1
0
        private EntityInfo NewEntityInfo(int id)
        {
            EntityInfo entity = null;

            if (m_UnusedEntities.Count > 0)
            {
                entity = m_UnusedEntities.Dequeue();
                entity.Reset();
                entity.InitId(id);
            }
            else
            {
                entity = new EntityInfo(id);
            }
            return(entity);
        }