diff --git a/Assets/Prefabs/King/King.prefab b/Assets/Prefabs/King/King.prefab index e00b620..74553d0 100644 --- a/Assets/Prefabs/King/King.prefab +++ b/Assets/Prefabs/King/King.prefab @@ -153,7 +153,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3173415395305450996} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3} m_Name: diff --git a/Assets/Scripts/KingScripts/KingMove.cs b/Assets/Scripts/KingScripts/KingMove.cs index 8da7902..1fe548a 100644 --- a/Assets/Scripts/KingScripts/KingMove.cs +++ b/Assets/Scripts/KingScripts/KingMove.cs @@ -1,8 +1,9 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using MLAPI; -public class KingMove : MonoBehaviour +public class KingMove : NetworkBehaviour { public float speed = 240.0f; @@ -33,6 +34,9 @@ public class KingMove : MonoBehaviour // Update is called once per frame void Update() { + + if (!IsLocalPlayer) { return; } + float translation = Input.GetAxis("KingMove") * speed; // Make it move 10 meters per second instead of 10 meters per frame...