TestConstractorToStableObjects

This commit is contained in:
Timofey06 2023-08-15 01:26:37 +03:00
parent d7921124e1
commit 9d28f9ac4d

View file

@ -30,6 +30,18 @@ namespace DangerousD.GameCore.Graphics
LoadAnimations(animationsId,neitralAnimationId);
}
public GraphicsComponent(Texture2D texture)
{
textures.Add(texture);
AnimationContainer animationContainer = new AnimationContainer();
animationContainer.StartSpriteRectangle = new Rectangle(0, 0, texture.Width, texture.Height);
animationContainer.TextureFrameInterval = 0;
animationContainer.TextureName=texture.Name;
animationContainer.IsCycle = true;
animationContainer.FramesCount = 1;
animationContainer.FrameTime = new List<Tuple<int, int>>() { new Tuple<int, int>(0, 10) };
animationContainer.Id = texture.Name;
}
private void LoadAnimations(List<string> animationsId, string neitralAnimationId)
{