コード例 #1
0
 public TiledObjectGroup(XmlElement xmlElement) : base(xmlElement)
 {
     foreach(XmlElement xObject in xmlElement.ChildNodes)
     {
         var o = new TiledObject(xObject);
         Objects.Add(o);
     }
 }
コード例 #2
0
        private static Entity CreateEntity(TiledObject @object)
        {
            var entityType = Util.GetTypeFromAllAssemblies(@object.Type);
            var entity = (Entity)Activator.CreateInstance(entityType);

            entity.Name = @object.Name;
            entity.X = @object.X;
            entity.Y = @object.Y;

            return entity;
        }