PlayerScore.cs 370 B

123456789101112131415161718
  1. using UnityEngine;
  2. namespace Mirror.Examples.NetworkRoom
  3. {
  4. public class PlayerScore : NetworkBehaviour
  5. {
  6. [SyncVar]
  7. public int index;
  8. [SyncVar]
  9. public uint score;
  10. void OnGUI()
  11. {
  12. GUI.Box(new Rect(10f + (index * 110), 10f, 100f, 25f), $"P{index}: {score:0000000}");
  13. }
  14. }
  15. }