AddDelegateOfAnimetionsEnd

This commit is contained in:
Timofey06 2023-08-16 19:34:11 +03:00
parent d0442c2534
commit 48106c2bdf

View file

@ -10,6 +10,7 @@ namespace DangerousD.GameCore.Graphics
{ {
public class GraphicsComponent public class GraphicsComponent
{ {
public Action actionOfAnimationEnd;
private List<AnimationContainer> animations; private List<AnimationContainer> animations;
private List<Texture2D> textures; private List<Texture2D> textures;
private List<string> texturesNames; private List<string> texturesNames;
@ -115,9 +116,11 @@ namespace DangerousD.GameCore.Graphics
if (!currentAnimation.IsCycle) if (!currentAnimation.IsCycle)
{ {
currentAnimation = neitralAnimation; currentAnimation = neitralAnimation;
actionOfAnimationEnd();
} }
currentFrame = 0; currentFrame = 0;
} }
buildSourceRectangle(); buildSourceRectangle();