Skip to content

Commit ca173a7

Browse files
fix: correct variable names used for initialization (external PR #145) (#150)
* fix: swapped variable names in ShipControl.cs (#145) Co-authored-by: Fernando Cortez <[email protected]> * changelog addition --------- Co-authored-by: alexia6119 <[email protected]>
1 parent 7c54df8 commit ca173a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Basic/2DSpaceShooter/Assets/Scripts/ShipControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public override void OnNetworkSpawn()
152152
}
153153
Energy.OnValueChanged += OnEnergyChanged;
154154
Health.OnValueChanged += OnHealthChanged;
155-
OnEnergyChanged(0, Health.Value);
156-
OnHealthChanged(0, Energy.Value);
155+
OnEnergyChanged(0, Energy.Value);
156+
OnHealthChanged(0, Health.Value);
157157

158158
SetPlayerName(PlayerName.Value.ToString().ToUpper());
159159
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
- Upgraded to Netcode for GameObjects v1.7.1 (#147)
1414
- Upgraded sample to 2022.3.14f1 LTS (#147)
1515

16+
### Fixed
17+
- Corrected the variables used for initialization of Health and Energy (#150)
18+
1619
### Client Driven
1720

1821
#### Changed

0 commit comments

Comments
 (0)