Advertisement
Wyv3rn

Untitled

Feb 18th, 2023
760
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using FishNet.Object;
  5.  
  6. public class Player : NetworkBehaviour
  7. {
  8.     [SerializeField]
  9.     private GameObject _camera;
  10.     [SerializeField]
  11.     private bool _clientAuth = true;
  12.  
  13.     public override void OnStartClient()
  14.     {
  15.         base.OnStartClient();
  16.         if (base.IsOwner)
  17.             _camera.SetActive(true);
  18.     }
  19.  
  20.  
  21.     public override void OnStartServer()
  22.     {
  23.         base.OnStartServer();
  24.         GamePlayManager.Instance.players.Add(this);
  25.     }
  26.  
  27.  
  28.     private void Update()
  29.     {
  30.         if (!base.IsOwner)
  31.             return;
  32.  
  33.     }
  34.  
  35. }
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement