Example #1
0
 public MaterialLocation(Engine.Resources.Resource resource, MaterialParserManager parent)
 {
     this.parent     = parent;
     LocName         = resource.LocName;
     Recursive       = resource.Recursive;
     ArchiveType     = resource.ArchiveType;
     loaded          = false;
     transformedName = transformName(resource.LocName);
 }
 public void resourceRemoved(ResourceGroup group, Engine.Resources.Resource resource)
 {
     foreach (var loc in materialLocations)
     {
         if (loc.represents(resource))
         {
             loc.removeGroup(group);
         }
     }
 }
        public void resourceAdded(ResourceGroup group, Engine.Resources.Resource resource)
        {
            var location = materialLocations.Where(l => l.represents(resource)).FirstOrDefault();

            if (location == null)
            {
                location = new MaterialLocation(resource, this);
                materialLocations.Add(location);
            }
            location.addGroup(group);
        }
 public void resourceRemoved(ResourceGroup group, Engine.Resources.Resource resource)
 {
     materialParser.resourceRemoved(group, resource);
 }
Example #5
0
 internal bool represents(Engine.Resources.Resource resource)
 {
     return(this.transformedName == transformName(resource.LocName));
 }
 public void resourceRemoved(ResourceGroup group, Engine.Resources.Resource resource)
 {
     materialParser.resourceRemoved(group, resource);
     ogreResourceManager.removeResourceLocation(resource.LocName, group.FullName);
 }
 public void resourceAdded(ResourceGroup group, Engine.Resources.Resource resource)
 {
     materialParser.resourceAdded(group, resource);
     ogreResourceManager.addResourceLocation(resource.LocName, resource.ArchiveType, group.FullName, resource.Recursive);
 }