public AnimationComponent(int entityId, AnimationCategory animationCategory, AnimationType animationType, int ticksPerFrame) { _entityId = entityId; _animationCategory = animationCategory; _animationType = animationType; _ticksPerFrame = ticksPerFrame; _ticksSinceFrameChange = _ticksPerFrame; _shape = new RectangleShape(); }
public void PlayAttackAnimation(AnimationCategory animationCategory = AnimationCategory.Physical) { if (animationCategory == AnimationCategory.Physical) { animator.SetTrigger("doPhysicalAttack"); } if (animationCategory == AnimationCategory.Projectile) { animator.SetTrigger("doProjectileAttack"); } }
public void Play(int delX, int delY, int duration) { this.scaledue = duration; this.scalecount = duration / timer1.Interval; this.scaleX = base.Width + delX; this.scaleY = base.Height + delY; aniCategory = AnimationCategory.Scale; if (!timer1.Enabled) { this.timer1.Start(); } }
public void Play(bool show) { isShow = !show; aniCategory = AnimationCategory.Load; animate(); }