private void OnTriggerEnter(Collider other) { //Check if enters to plate if (other.tag == "Plate" || other.tag == "BreakPlate") { // Add Force to Rigid to Jump rigid.velocity = new Vector3(0, 10, 0); //Get Next Plate Number int nextNo = other.GetComponent <Plate>().plateNo + 1; _animator.SetTrigger("Ground"); if (nextNo < plateList.Length) { //Automatically Rotate to Next Plate FaceToNextPlate(plateList[nextNo].gameObject.transform); int rand = 0; // Set Jumping Chance wiht AI Level rand = UnityEngine.Random.Range(1, 3 + cpuLvl - AILevel.easy); if (rand == 1) { targetPosition = plateList[nextNo].gameObject.transform.position; targetPosition += new Vector3(0, 0.5f, 0); } } } // End Plate else if (other.tag == "End") { rigid.isKinematic = true; //Land _animator.SetTrigger("Land"); gameUI.AIFinished( ); } }