process TODO.md step 10

This commit is contained in:
SepComet
2026-03-29 12:43:57 +08:00
parent c5fbd8e36d
commit fbc09186f3
21 changed files with 913 additions and 19 deletions
+30
View File
@@ -50,6 +50,36 @@ public static class ClientGameplayInputFlow
TargetId = targetId ?? string.Empty
};
}
public static void SendShootInput(
MessageManager messageManager,
string playerId,
long tick,
Vector3 aimDirection,
string targetId = "")
{
if (messageManager == null)
{
throw new System.ArgumentNullException(nameof(messageManager));
}
SendShootInput(messageManager, CreateShootInput(playerId, tick, aimDirection, targetId));
}
public static void SendShootInput(MessageManager messageManager, ShootInput message)
{
if (messageManager == null)
{
throw new System.ArgumentNullException(nameof(messageManager));
}
if (message == null)
{
throw new System.ArgumentNullException(nameof(message));
}
messageManager.SendMessage(message, MessageType.ShootInput);
}
}
public class MovementComponent : MonoBehaviour
+3 -2
View File
@@ -215,12 +215,13 @@ public class NetworkManager : MonoBehaviour
public void SendShootInput(string playerId, Vector3 direction, long tick = 0, string targetId = "")
{
SendShootInput(ClientGameplayInputFlow.CreateShootInput(playerId, tick, direction, targetId));
ClientGameplayInputFlow.SendShootInput(_networkRuntime.MessageManager, playerId, tick, direction, targetId);
Debug.Log($"PlayerShootSeq: {_sequence++}");
}
public void SendShootInput(ShootInput message)
{
_networkRuntime.MessageManager.SendMessage(message, MessageType.ShootInput);
ClientGameplayInputFlow.SendShootInput(_networkRuntime.MessageManager, message);
Debug.Log($"PlayerShootSeq: {_sequence++}");
}