コード例 #1
0
 public void Update(double gameTime)
 {
     if (currentAnimation == null)
     {
         return;
     }
     counter += gameTime;
     if (counter > currentAnimation.AnimationCooldown)
     {
         var drawFrame = currentAnimation.GetNewAnimationState();
         var sprite    = Owner.GetComponent <Sprite>();
         sprite.UpdateDrawFrame(drawFrame);
         counter = 0;
     }
 }