This commit is contained in:
vis2k 2022-12-22 11:02:47 +01:00
parent 4434ab1be3
commit a8bb5e3647

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;