Enemy not jumping using Raycast

I am building an endless running game in which the main character is being followed by a bull.
so the bull should jump platforms like the main character but instead its flying right way.
Any help

public class S : MonoBehaviour

{
public LayerMask GroundLayer;

private Transform tr;

bool jumped;

GameObject player,platform;

void Start () {

	player = GameObject.FindGameObjectWithTag("Player");
	tr = transform;
	jumped = false;
}

public float maxspeed=8f;

void FixedUpdate () {
	
			//float move = Input.GetAxis ("Horizontal");

			rigidbody2D.velocity = new Vector2 (1 * maxspeed, rigidbody2D.velocity.y);

			if (Physics.Raycast (tr.position, -tr.up, 20f) && !jumped) { // if no ground below

					if (jumped) {
							Debug.Log ("JUMP");
					} else { 
							jumped = true;
							Debug.Log ("False Jump");
					}
			} 
			else 
	
			{
					Debug.Log ("else");
					jump ();
			}

	//jumped = false;
	//if (!hit.collider) {
	//	jump();
	//}
	
	
	
	
}	void Update () {

	//transform.LookAt (player.transform);
	//transform.Translate (0,0,8*Time.deltaTime);

}

void jump()

{

	rigidbody2D.AddForce (new Vector2 (0f, 450f));
	jumped=false;
}

}

You’ve structured your logic so that your call to Jump() on line 20 is in the ‘else’ clause of the Raycast(). This means that your object will jump any time the Raycast() fails. In other words, any time the ground is further than 20 unites away. Seems to me that you want to move line 20 to line 13 and get rid of the whole else clause (lines 16 - 21).

More Simplified Question.And the Game screen if it helps.
I want the bull to jump on the platforms automatically.
alt text

This is the Code.

using UnityEngine;
using System.Collections;

public class S : MonoBehaviour {

private Transform tr;
bool jumped;
GameObject player;
    public float maxspeed=8f;
void Start () {

	player = GameObject.FindGameObjectWithTag("Player");
	tr = transform;
	jumped = false;// How Should i use the flag to make it jump at appropraitae time
}

     void FixedUpdate () {
	
		

			rigidbody2D.velocity = new Vector2 (1 * maxspeed, rigidbody2D.velocity.y);

			if (!Physics.Raycast (tr.position, -tr.up, 20f)) { // if no ground below
							jump ();
							Debug.Log ("Bull Jump");
					}
		
}	void Update () {

}

void jump()

{

	rigidbody2D.AddForce (new Vector2 (0f, 450f));
	jumped=true;
}

}