diff --git a/DangerousD.sln b/DangerousD.sln index a0ee3ad..284e0d8 100644 --- a/DangerousD.sln +++ b/DangerousD.sln @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DangerousD", "DangerousD\Da EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnimationsFileCreator", "AnimationsFileCreator\AnimationsFileCreator.csproj", "{CE9485FC-F4C6-4E0D-8B8E-1843AA20CEDE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonogameLibrary", "MonogameLibrary\MonogameLibrary.csproj", "{52ED99EF-9769-4587-8BD8-54D6B98E3E7E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonogameLibrary", "MonogameLibrary\MonogameLibrary.csproj", "{52ED99EF-9769-4587-8BD8-54D6B98E3E7E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -19,6 +19,14 @@ Global {1FC12F81-0E55-4142-83BD-23496EF29DC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FC12F81-0E55-4142-83BD-23496EF29DC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {1FC12F81-0E55-4142-83BD-23496EF29DC6}.Release|Any CPU.Build.0 = Release|Any CPU + {CE9485FC-F4C6-4E0D-8B8E-1843AA20CEDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE9485FC-F4C6-4E0D-8B8E-1843AA20CEDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE9485FC-F4C6-4E0D-8B8E-1843AA20CEDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE9485FC-F4C6-4E0D-8B8E-1843AA20CEDE}.Release|Any CPU.Build.0 = Release|Any CPU + {52ED99EF-9769-4587-8BD8-54D6B98E3E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52ED99EF-9769-4587-8BD8-54D6B98E3E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52ED99EF-9769-4587-8BD8-54D6B98E3E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52ED99EF-9769-4587-8BD8-54D6B98E3E7E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DangerousD/GameCore/Graphics/GraphicsComponent.cs b/DangerousD/GameCore/Graphics/GraphicsComponent.cs index 7419a3f..bf85d28 100644 --- a/DangerousD/GameCore/Graphics/GraphicsComponent.cs +++ b/DangerousD/GameCore/Graphics/GraphicsComponent.cs @@ -26,7 +26,7 @@ namespace DangerousD.GameCore.Graphics lastInterval = 1; lastAnimationId = null; LoadAnimations(animationsId); - LoadTextures(); + } private void LoadAnimations(List animationsId) @@ -37,7 +37,7 @@ namespace DangerousD.GameCore.Graphics animations.Add( GameManager.builder.animations.Find(x => x.Id == id)); } } - private void LoadTextures() + public void LoadContent(ContentManager content) { textures = new List(); texturesNames = new List(); @@ -47,7 +47,7 @@ namespace DangerousD.GameCore.Graphics if (!texturesNames.Contains(animation.TextureName)) { texturesNames.Add(animation.TextureName); - textures.Add(TextureManager.GetTexture(animation.TextureName)); + textures.Add(content.Load(animation.TextureName)); } }