How do I access a boolean from another class in c#?

This is my code and Im trying to access bool Press(line 3) in another script.

using UnityEngine;

public class Runner : MonoBehaviour {

public static float distanceTraveled;
private static int boosts;
public static bool Press = false;

public float acceleration;
public Vector3 boostVelocity, jumpVelocity;
public float gameOverY;

private bool touchingPlatform;
private Vector3 startPosition;

void Start () {
	GameEventManager.GameStart += GameStart;
	GameEventManager.GameOver += GameOver;
	startPosition = transform.localPosition;
	renderer.enabled = false;
	rigidbody.isKinematic = true;
	enabled = false;
}

public static void Update () {
	if(Press == true){
		if(touchingPlatform){
			rigidbody.AddForce(jumpVelocity, ForceMode.VelocityChange);
			touchingPlatform = false;
		}
		else if(boosts > 0){
			rigidbody.AddForce(boostVelocity, ForceMode.VelocityChange);
			boosts -= 1;
			GUIManager.SetBoosts(boosts);
		}
	}
	distanceTraveled = transform.localPosition.x;
	GUIManager.SetDistance(distanceTraveled);
	
	if(transform.localPosition.y < gameOverY){
		GameEventManager.TriggerGameOver();
	}
}

void FixedUpdate () {
	if(touchingPlatform){
		rigidbody.AddForce(acceleration, 0f, 0f, ForceMode.Acceleration);
	}
}

void OnCollisionEnter () {
	touchingPlatform = true;
}

void OnCollisionExit () {
	touchingPlatform = false;
}

private void GameStart () {
	boosts = 0;
	GUIManager.SetBoosts(boosts);
	distanceTraveled = 0f;
	GUIManager.SetDistance(distanceTraveled);
	transform.localPosition = startPosition;
	renderer.enabled = true;
	rigidbody.isKinematic = false;
	enabled = true;
}

private void GameOver () {
	renderer.enabled = false;
	rigidbody.isKinematic = true;
	enabled = false;
}

public static void AddBoost(){
	boosts += 1;
	GUIManager.SetBoosts(boosts);
}

}

And here is my other code…

using UnityEngine;
using System.Collections;

public class Jump : MonoBehaviour {

void OnMouseDown(){
	Runner.GetComponent<Runner>().Press = true;
}

void OnMouseUp(){
	Runner.GetComponent<Runner>().Press = false;
}

}

Unity Keeps giving my this error:

Assets/Jump.cs(7,24): error CS0120: An object is required to access non-static member ‘UnityEngine.Component.GetComponent(System.Type)’

Assets/Jump.cs(11,24): error CS0120: An object is required to access non-static member ‘UnityEngine.Component.GetComponent(System.Type)’

Thanks in advanced!

Welcome to unity answers. For the futur please do not post huge walls of code. Only post the relevant parts.

To the question:
The bool press is marked as static. This means it does not belong to the instance of your runner class. It belongs to the class itself.

To access a static variable, you simply need to type Runner.Press.

The way you tried is the correct way for nonstatic variables.

I don’t know how you want to use your script, but in most cases it is better not to make your variables static. If you have more than one runners in your scene the static keyword will mess stuff up, since every instance of the runner script uses the same press variable. This would case every runner to jump simultaniously.