void OnCollisionEnter(Collision col) { Player p; if ((p = col.gameObject.GetComponent <Player>()) != null) { Debug.Log("Touched a player"); //Time to do something with entering a pseudo alerted state parentSystem.Alert(col.gameObject); //this.Fsm.ChangeState(new SeekTargetWithPathState(this, this.Fsm, p.gameObject)); } }