private void OnTriggerEnter(Collider other) { // If the other colliding object is the pinecone, then call the state machine's ending script. if (other.tag == "Pinecone") { _stateMachine.SetGoalStatus(true); } }