示例#1
0
文件: Entity.cs 项目: noxor0/Dota2
        public static Entity CreateWith(uint id, EntityClass clazz, FlatTable table)
        {
            var entity = new Entity(id, clazz);

            foreach (var info in table.Properties)
            {
                entity.Properties.Add(Property.For(info));
            }

            return entity;
        }
示例#2
0
文件: Entity.cs 项目: noxor0/Dota2
        public Entity Copy()
        {
            var copy = new Entity(Id, Class);

            for (var i = 0; i < Properties.Count; ++i)
            {
                if (Properties[i] != null)
                {
                    copy.Properties.Add(Properties[i].Copy());
                }
                else
                {
                    copy.Properties.Add(null);
                }
            }

            return copy;
        }
示例#3
0
 public Slot(Entity entity)
 {
     Entity = entity;
     Live = true;
     Baselines = new Entity[2];
 }