コード例 #1
0
ファイル: AnimationComponent.cs プロジェクト: klutch/Loderpit
 public AnimationComponent(int entityId, AnimationCategory animationCategory, AnimationType animationType, int ticksPerFrame)
 {
     _entityId = entityId;
     _animationCategory = animationCategory;
     _animationType = animationType;
     _ticksPerFrame = ticksPerFrame;
     _ticksSinceFrameChange = _ticksPerFrame;
     _shape = new RectangleShape();
 }
コード例 #2
0
 public void PlayAttackAnimation(AnimationCategory animationCategory = AnimationCategory.Physical)
 {
     if (animationCategory == AnimationCategory.Physical)
     {
         animator.SetTrigger("doPhysicalAttack");
     }
     if (animationCategory == AnimationCategory.Projectile)
     {
         animator.SetTrigger("doProjectileAttack");
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 public void Play(bool show)
 {
     isShow      = !show;
     aniCategory = AnimationCategory.Load;
     animate();
 }