示例#1
0
 public async Task <byte[]> GetTextureAsync(int worldId, string textureName)
 {
     using (var context = new ObjectPathContext())
     {
         return(await _textureLocator.GetResourceAsync(await context.Textures.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == textureName)));
     }
 }
示例#2
0
 public async Task <Animation> GetAnimationAsync(int worldId, string animationName)
 {
     using (var context = new ObjectPathContext())
     {
         return(await _animationLocator.GetResourceAsync(await context.Animations.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == animationName)));
     }
 }
示例#3
0
 public async Task <Model> GetModelAsync(int worldId, string modelName)
 {
     using (var context = new ObjectPathContext())
     {
         return(await _modelLocator.GetResourceAsync(await context.Models.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == modelName)));
     }
 }