Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created March 11, 2025 16:36
Show Gist options
  • Save todorok1/541b8fbd32186aff1944334dbef38928 to your computer and use it in GitHub Desktop.
Save todorok1/541b8fbd32186aff1944334dbef38928 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第44回 キャラクターの移動を行うクラスの基底クラス
/// <summary>
/// アニメーションを停止します。
/// </summary>
public virtual void StopAnimation()
{
if (_animator != null)
{
_animator.speed = 0;
}
}
/// <summary>
/// アニメーションを再開します。
/// </summary>
public virtual void ResumeAnimation()
{
if (_animator != null)
{
_animator.speed = 1;
}
}
/// <summary>
/// キャラクターの移動を停止します。
/// </summary>
public virtual void StopMoving()
{
_isMovingPaused = true;
}
/// <summary>
/// キャラクターの移動を再開します。
/// </summary>
public virtual void ResumeMoving()
{
_isMovingPaused = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment