Merge branch 'main' of https://github.com/progtime-net/DangerousD
This commit is contained in:
commit
4b855c2036
1 changed files with 12 additions and 0 deletions
|
@ -31,6 +31,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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue