Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using FishNet.Object;
- public class Player : NetworkBehaviour
- {
- [SerializeField]
- private GameObject _camera;
- [SerializeField]
- private bool _clientAuth = true;
- public override void OnStartClient()
- {
- base.OnStartClient();
- if (base.IsOwner)
- _camera.SetActive(true);
- }
- public override void OnStartServer()
- {
- base.OnStartServer();
- GamePlayManager.Instance.players.Add(this);
- }
- private void Update()
- {
- if (!base.IsOwner)
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement