Skip to content

Commit fb30a9d

Browse files
committed
Address review comments
1 parent f748587 commit fb30a9d

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

HKMP/Api/Client/IClientManager.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,5 @@ public interface IClientManager {
9494
/// <summary>
9595
/// Event that is called when HKMP modifies the game's time scale.
9696
/// </summary>
97-
delegate void SetTimeScale(float timeScale);
98-
99-
/// <summary>
100-
/// Event that is called when HKMP modifies the game's time scale.
101-
/// </summary>
102-
event SetTimeScale OnSetTimeScale;
97+
event Action<float> SetTimeScaleEvent;
10398
}

HKMP/Game/Client/ClientManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public string Username {
134134
public event Action<IClientPlayer> PlayerLeaveSceneEvent;
135135

136136
/// <inheritdoc />
137-
public event IClientManager.SetTimeScale OnSetTimeScale;
137+
public event Action<float> SetTimeScaleEvent;
138138

139139
/// <inheritdoc />
140140
public Team Team => _playerManager.LocalPlayerTeam;
@@ -188,7 +188,7 @@ ModSettings modSettings
188188

189189
_entityManager = new EntityManager(netClient);
190190

191-
_pauseManager = new PauseManager(netClient, timeScale => OnSetTimeScale?.Invoke(timeScale));
191+
_pauseManager = new PauseManager(netClient, timeScale => SetTimeScaleEvent?.Invoke(timeScale));
192192
_pauseManager.RegisterHooks();
193193

194194
new FsmPatcher().RegisterHooks();

HKMP/Game/Client/PauseManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
using System;
12
using System.Collections;
23
using System.Reflection;
34
using GlobalEnums;
4-
using Hkmp.Api.Client;
55
using Hkmp.Networking.Client;
66
using Modding;
77
using UnityEngine;
@@ -20,9 +20,9 @@ internal class PauseManager {
2020
/// <summary>
2121
/// Hook for time scale changes.
2222
/// </summary>
23-
private readonly IClientManager.SetTimeScale _onSetTimeScale;
23+
private readonly Action<float> _onSetTimeScale;
2424

25-
public PauseManager(NetClient netClient, IClientManager.SetTimeScale onSetTimeScale) {
25+
public PauseManager(NetClient netClient, Action<float> onSetTimeScale) {
2626
_netClient = netClient;
2727
_onSetTimeScale = onSetTimeScale;
2828
}

0 commit comments

Comments
 (0)