This commit is contained in:
vis2k 2022-12-22 11:02:47 +01:00
parent 6c101c5c85
commit a668c78f68

View File

@ -5,9 +5,10 @@ namespace Mirror.Examples.SyncDir // ".SyncDirection" would overshadow the enum
public class Player : NetworkBehaviour public class Player : NetworkBehaviour
{ {
public TextMesh textMesh; public TextMesh textMesh;
[SyncVar] public int health;
public Color localColor = Color.white; public Color localColor = Color.white;
[SyncVar] public int health;
public override void OnStartLocalPlayer() public override void OnStartLocalPlayer()
{ {
textMesh.color = localColor; textMesh.color = localColor;