private void Start() { mat = GetComponent <Renderer>().material; npcAI = new NPCAI(this); npcAI.InitStateMachine(); }