CHANGED TO MIRROR

This commit is contained in:
DerTyp187
2021-10-25 09:20:01 +02:00
parent bd712107b7
commit e509a919b6
611 changed files with 38291 additions and 1216 deletions

View File

@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MLAPI;
using Mirror;
// https://youtu.be/PmIPqGqp8UY
// https://youtu.be/n-KX8AeGK7E?t=997
@@ -48,7 +48,7 @@ public class PlayerController : NetworkBehaviour
private void Start()
{
if (IsLocalPlayer)
if (isLocalPlayer)
{
controller = GetComponent<CharacterController>();
if (lockCursor)
@@ -65,16 +65,11 @@ public class PlayerController : NetworkBehaviour
}
private void Update()
{
if (IsLocalPlayer)
{
UpdateMouseLook();
Grounded();
UpdateMovement();
}
else
{
playerCamera.gameObject.SetActive(false);
}
if (!isLocalPlayer) return;
UpdateMouseLook();
Grounded();
UpdateMovement();
}
private void Grounded()