Gonna move to server authority
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Examples.Benchmark
|
||||
{
|
||||
public class PlayerMovement : NetworkBehaviour
|
||||
{
|
||||
public float speed = 5;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (!isLocalPlayer) return;
|
||||
|
||||
float h = Input.GetAxis("Horizontal");
|
||||
float v = Input.GetAxis("Vertical");
|
||||
|
||||
Vector3 dir = new Vector3(h, 0, v);
|
||||
transform.position += dir.normalized * (Time.deltaTime * speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Examples.Benchmark
|
||||
{
|
||||
public class PlayerMovement : NetworkBehaviour
|
||||
{
|
||||
public float speed = 5;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (!isLocalPlayer) return;
|
||||
|
||||
float h = Input.GetAxis("Horizontal");
|
||||
float v = Input.GetAxis("Vertical");
|
||||
|
||||
Vector3 dir = new Vector3(h, 0, v);
|
||||
transform.position += dir.normalized * (Time.deltaTime * speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user