角色控制修改

This commit is contained in:
2025-10-09 22:10:48 +08:00
parent e60822137f
commit 290c08325d
15 changed files with 743 additions and 105 deletions

View File

@@ -29,33 +29,6 @@ namespace NBF
#region
#region
private static readonly int InputHorizontalHash = Animator.StringToHash("InputHorizontal");
private static readonly int InputVerticalHash = Animator.StringToHash("InputVertical");
private static readonly int InputMagnitudeHash = Animator.StringToHash("InputMagnitude");
private static readonly int IsSprintingHash = Animator.StringToHash("IsSprinting");
public float InputHorizontal
{
get => Animator.GetFloat(InputHorizontalHash);
set => Animator.SetFloat(InputHorizontalHash, value);
}
public float InputVertical
{
get => Animator.GetFloat(InputVerticalHash);
set => Animator.SetFloat(InputVerticalHash, value);
}
public float InputMagnitude
{
get => Animator.GetFloat(InputMagnitudeHash);
set => Animator.SetFloat(InputMagnitudeHash, value);
}
public bool IsSprinting
{
get => Animator.GetBool(IsSprintingHash);
set => Animator.SetBool(IsSprintingHash, value);
}

View File

@@ -39,6 +39,7 @@ namespace NBF
private static void OnConnectComplete()
{
Log.Debug("连接成功");
// 心跳
Session.AddComponent<SessionHeartbeatComponent>().Start(HeartbeatInterval);
}