using System; using UnityEngine; using UnityEngine.AI; // ReSharper disable once CheckNamespace namespace BlueWaterProject { public class TycoonNpc : MonoBehaviour { private NpcStateMachine stateMachine; private NavMeshAgent agent; private Transform visaualLook; private TycoonMapInfo mapInfo; private void Awake() { agent = GetComponent(); agent.updateRotation = false; mapInfo = GameObject.Find("MapInfo").GetComponent(); } private void Start() { stateMachine = gameObject.AddComponent(); var findTableState = new FindTableState(agent,mapInfo); stateMachine.ChangeState(findTableState); } } }