TestConstractorToStableObjects
This commit is contained in:
parent
d7921124e1
commit
9d28f9ac4d
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue