Skip to content

Commit 7dce6f2

Browse files
whitespace fixes
1 parent 75c748c commit 7dce6f2

File tree

7 files changed

+60
-43
lines changed

7 files changed

+60
-43
lines changed

Assets/Scripts/Gameplay/Action/Input/AoeActionInput.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class AoeActionInput : BaseActionInput
1919

2020
[SerializeField]
2121
GameObject m_OutOfRangeVisualization;
22-
22+
2323
[SerializeField]
2424
InputActionReference m_PointAction;
2525

@@ -82,6 +82,7 @@ void Update()
8282
};
8383
m_SendInput(data);
8484
}
85+
8586
Destroy(gameObject);
8687
return;
8788
}

Assets/Scripts/Gameplay/DebugCheats/DebugCheatsManager.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public class DebugCheatsManager : NetworkBehaviour
2929
[SerializeField]
3030
[Tooltip("Boss to spawn. Make sure this is included in the NetworkManager's list of prefabs!")]
3131
NetworkObject m_BossPrefab;
32-
32+
3333
[SerializeField]
3434
InputActionReference m_ToggleCheatsAction;
35-
35+
3636
SwitchedDoor m_SwitchedDoor;
3737

3838
SwitchedDoor SwitchedDoor
@@ -43,6 +43,7 @@ SwitchedDoor SwitchedDoor
4343
{
4444
m_SwitchedDoor = FindAnyObjectByType<SwitchedDoor>();
4545
}
46+
4647
return m_SwitchedDoor;
4748
}
4849
}
@@ -160,7 +161,6 @@ void ServerKillTargetRpc(RpcParams serverRpcParams = default)
160161
UnityEngine.Debug.Log($"Target {targetId} has no IDamageable component or cannot be damaged.");
161162
}
162163
}
163-
164164
}
165165
}
166166

@@ -177,6 +177,7 @@ void ServerKillAllEnemiesRpc(RpcParams serverRpcParams = default)
177177
}
178178
}
179179
}
180+
180181
PublishCheatUsedMessage(serverRpcParams.Receive.SenderClientId, "KillAllEnemies");
181182
}
182183

@@ -211,6 +212,7 @@ void ServerHealPlayerRpc(RpcParams serverRpcParams = default)
211212
damageable.ReceiveHP(null, baseHp);
212213
}
213214
}
215+
214216
PublishCheatUsedMessage(serverRpcParams.Receive.SenderClientId, "HealPlayer");
215217
}
216218
}
@@ -227,6 +229,7 @@ void ServerToggleSuperSpeedRpc(RpcParams serverRpcParams = default)
227229
break;
228230
}
229231
}
232+
230233
PublishCheatUsedMessage(clientId, "ToggleSuperSpeed");
231234
}
232235

@@ -242,6 +245,7 @@ void ServerToggleTeleportModeRpc(RpcParams serverRpcParams = default)
242245
break;
243246
}
244247
}
248+
245249
PublishCheatUsedMessage(serverRpcParams.Receive.SenderClientId, "ToggleTeleportMode");
246250
}
247251

Assets/Scripts/Gameplay/UI/HeroActionBar.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,23 @@ void RegisterInputSender(ClientPlayerAvatar clientPlayerAvatar)
133133
{
134134
GameDataSource.Instance.TryGetActionPrototypeByID(m_InputSender.actionState1.actionID, out action1);
135135
}
136+
136137
UpdateActionButton(m_ButtonInfo[ActionButtonType.BasicAction], action1);
137138

138139
Action action2 = null;
139140
if (m_InputSender.actionState2 != null)
140141
{
141142
GameDataSource.Instance.TryGetActionPrototypeByID(m_InputSender.actionState2.actionID, out action2);
142143
}
144+
143145
UpdateActionButton(m_ButtonInfo[ActionButtonType.Special1], action2);
144146

145147
Action action3 = null;
146148
if (m_InputSender.actionState3 != null)
147149
{
148150
GameDataSource.Instance.TryGetActionPrototypeByID(m_InputSender.actionState3.actionID, out action3);
149151
}
152+
150153
UpdateActionButton(m_ButtonInfo[ActionButtonType.Special2], action3);
151154
}
152155

@@ -165,6 +168,7 @@ void DeregisterInputSender()
165168
{
166169
m_InputSender.action1ModifiedCallback -= Action1ModifiedCallback;
167170
}
171+
168172
m_InputSender = null;
169173
}
170174

@@ -177,7 +181,7 @@ void Awake()
177181
[ActionButtonType.Special2] = new ActionButtonInfo(ActionButtonType.Special2, m_SpecialAction2Button, this),
178182
[ActionButtonType.EmoteBar] = new ActionButtonInfo(ActionButtonType.EmoteBar, m_EmoteBarButton, this),
179183
};
180-
184+
181185
m_ToggleEmoteBarAction.action.performed += OnToggleEmoteBarPerformed;
182186

183187
ClientPlayerAvatar.LocalClientSpawned += RegisterInputSender;
@@ -203,13 +207,13 @@ void OnDisable()
203207
void OnDestroy()
204208
{
205209
DeregisterInputSender();
206-
210+
207211
m_ToggleEmoteBarAction.action.performed -= OnToggleEmoteBarPerformed;
208212

209213
ClientPlayerAvatar.LocalClientSpawned -= RegisterInputSender;
210214
ClientPlayerAvatar.LocalClientDespawned -= DeregisterInputSender;
211215
}
212-
216+
213217
void OnToggleEmoteBarPerformed(InputAction.CallbackContext obj)
214218
{
215219
if (obj.performed)

Assets/Scripts/Gameplay/UI/UITooltipDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class UITooltipDetector : MonoBehaviour, IPointerEnterHandler, IPointerEx
1818
{
1919
[SerializeField]
2020
InputActionReference m_PointAction;
21-
21+
2222
[SerializeField]
2323
[Tooltip("The actual Tooltip that should be triggered")]
2424
UITooltipPopup m_TooltipPopup;

Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ClientInputSender : NetworkBehaviour
2424
//upstream network conservation. This matters when holding down your mouse button to move.
2525
const float k_MoveSendRateSeconds = 0.04f; //25 fps.
2626

27-
const float k_TargetMoveTimeout = 0.45f; //prevent moves for this long after targeting someone (helps prevent walking to the guy you clicked).
27+
const float k_TargetMoveTimeout = 0.45f; //prevent moves for this long after targeting someone (helps prevent walking to the guy you clicked).
2828

2929
float m_LastSentMove;
3030

@@ -75,12 +75,12 @@ public class ClientInputSender : NetworkBehaviour
7575
/// </summary>
7676
public enum SkillTriggerStyle
7777
{
78-
None, //no skill was triggered.
79-
MouseClick, //skill was triggered via mouse-click implying you should do a raycast from the mouse position to find a target.
80-
Keyboard, //skill was triggered via a Keyboard press, implying target should be taken from the active target.
78+
None, //no skill was triggered.
79+
MouseClick, //skill was triggered via mouse-click implying you should do a raycast from the mouse position to find a target.
80+
Keyboard, //skill was triggered via a Keyboard press, implying target should be taken from the active target.
8181
KeyboardRelease, //represents a released key.
82-
UI, //skill was triggered from the UI, and similar to Keyboard, target should be inferred from the active target.
83-
UIRelease, //represents letting go of the mouse-button on a UI button
82+
UI, //skill was triggered from the UI, and similar to Keyboard, target should be inferred from the active target.
83+
UIRelease, //represents letting go of the mouse-button on a UI button
8484
}
8585

8686
bool IsReleaseStyle(SkillTriggerStyle style)
@@ -150,6 +150,7 @@ public override void OnNetworkSpawn()
150150
if (!IsClient || !IsOwner)
151151
{
152152
enabled = false;
153+
153154
// dont need to do anything else if not the owner
154155
return;
155156
}
@@ -162,17 +163,19 @@ public override void OnNetworkSpawn()
162163
{
163164
actionState1 = new ActionState() { actionID = action1.ActionID, selectable = true };
164165
}
166+
165167
if (CharacterClass.Skill2 &&
166168
GameDataSource.Instance.TryGetActionPrototypeByID(CharacterClass.Skill2.ActionID, out var action2))
167169
{
168170
actionState2 = new ActionState() { actionID = action2.ActionID, selectable = true };
169171
}
172+
170173
if (CharacterClass.Skill3 &&
171174
GameDataSource.Instance.TryGetActionPrototypeByID(CharacterClass.Skill3.ActionID, out var action3))
172175
{
173176
actionState3 = new ActionState() { actionID = action3.ActionID, selectable = true };
174177
}
175-
178+
176179
m_Action1.action.started += OnAction1Started;
177180
m_Action1.action.canceled += OnAction1Canceled;
178181
m_Action2.action.started += OnAction2Started;
@@ -202,7 +205,7 @@ public override void OnNetworkDespawn()
202205
{
203206
m_TargetServerCharacter.NetLifeState.LifeState.OnValueChanged -= OnTargetLifeStateChanged;
204207
}
205-
208+
206209
m_Action1.action.started -= OnAction1Started;
207210
m_Action1.action.canceled -= OnAction1Canceled;
208211
m_Action2.action.started -= OnAction2Started;
@@ -468,7 +471,7 @@ void PopulateSkillRequest(Vector3 hitPoint, ActionID actionID, ref ActionRequest
468471
//there is a bug where the direction is flipped if the hitPos and current position are almost the same,
469472
//so we use the character's direction instead.
470473
float directionLength = offset.magnitude;
471-
Vector3 direction = 1.0f/*epsilon*/ <= directionLength ? (offset / directionLength) : m_PhysicsWrapper.Transform.forward;
474+
Vector3 direction = 1.0f /*epsilon*/ <= directionLength ? (offset / directionLength) : m_PhysicsWrapper.Transform.forward;
472475

473476
switch (actionConfig.Logic)
474477
{
@@ -518,52 +521,52 @@ public void RequestAction(ActionID actionID, SkillTriggerStyle triggerStyle, ulo
518521
m_ActionRequestCount++;
519522
}
520523
}
521-
524+
522525
void OnAction1Started(InputAction.CallbackContext obj)
523526
{
524527
RequestAction(actionState1.actionID, SkillTriggerStyle.Keyboard);
525528
}
526-
529+
527530
void OnAction1Canceled(InputAction.CallbackContext obj)
528531
{
529532
RequestAction(actionState1.actionID, SkillTriggerStyle.KeyboardRelease);
530533
}
531-
534+
532535
void OnAction2Started(InputAction.CallbackContext obj)
533536
{
534537
RequestAction(actionState2.actionID, SkillTriggerStyle.Keyboard);
535538
}
536-
539+
537540
void OnAction2Canceled(InputAction.CallbackContext obj)
538541
{
539542
RequestAction(actionState2.actionID, SkillTriggerStyle.KeyboardRelease);
540543
}
541-
544+
542545
void OnAction3Started(InputAction.CallbackContext obj)
543546
{
544547
RequestAction(actionState3.actionID, SkillTriggerStyle.Keyboard);
545548
}
546-
549+
547550
void OnAction3Canceled(InputAction.CallbackContext obj)
548551
{
549552
RequestAction(actionState3.actionID, SkillTriggerStyle.KeyboardRelease);
550553
}
551-
554+
552555
void OnAction5Performed(InputAction.CallbackContext obj)
553556
{
554557
RequestAction(GameDataSource.Instance.Emote1ActionPrototype.ActionID, SkillTriggerStyle.Keyboard);
555558
}
556-
559+
557560
void OnAction6Performed(InputAction.CallbackContext obj)
558561
{
559562
RequestAction(GameDataSource.Instance.Emote2ActionPrototype.ActionID, SkillTriggerStyle.Keyboard);
560563
}
561-
564+
562565
void OnAction7Performed(InputAction.CallbackContext obj)
563566
{
564567
RequestAction(GameDataSource.Instance.Emote3ActionPrototype.ActionID, SkillTriggerStyle.Keyboard);
565568
}
566-
569+
567570
void OnAction8Performed(InputAction.CallbackContext obj)
568571
{
569572
RequestAction(GameDataSource.Instance.Emote4ActionPrototype.ActionID, SkillTriggerStyle.Keyboard);
@@ -580,7 +583,7 @@ void Update()
580583
{
581584
RequestAction(CharacterClass.Skill1.ActionID, SkillTriggerStyle.MouseClick);
582585
}
583-
586+
584587
if (m_TargetAction.action.WasPressedThisFrame())
585588
{
586589
RequestAction(GameDataSource.Instance.GeneralTargetActionPrototype.ActionID, SkillTriggerStyle.MouseClick);
@@ -609,19 +612,19 @@ void UpdateAction1()
609612
actionState1.actionID = GameDataSource.Instance.DropActionPrototype.ActionID;
610613
}
611614
else if ((m_ServerCharacter.TargetId.Value != 0
612-
&& selection != null
613-
&& selection.TryGetComponent(out PickUpState pickUpState))
614-
)
615+
&& selection != null
616+
&& selection.TryGetComponent(out PickUpState pickUpState))
617+
)
615618
{
616619
// special case: targeting a pickup-able item or holding a pickup object
617620

618621
actionState1.actionID = GameDataSource.Instance.PickUpActionPrototype.ActionID;
619622
}
620623
else if (m_ServerCharacter.TargetId.Value != 0
621-
&& selection != null
622-
&& selection.NetworkObjectId != m_ServerCharacter.NetworkObjectId
623-
&& selection.TryGetComponent(out ServerCharacter charState)
624-
&& !charState.IsNpc)
624+
&& selection != null
625+
&& selection.NetworkObjectId != m_ServerCharacter.NetworkObjectId
626+
&& selection.TryGetComponent(out ServerCharacter charState)
627+
&& !charState.IsNpc)
625628
{
626629
// special case: when we have a player selected, we change the meaning of the basic action
627630
// we have another player selected! In that case we want to reflect that our basic Action is a Revive, not an attack!

0 commit comments

Comments
 (0)