Boolean from other class

Hello, I have two classes. The first have a trigger and the second have a parameter. Please, I need to conect the two classes to when I enter on the trigger, I can change the parameter.

void OnTriggerEnter(Collider other)
	{
		if (other.transform.tag == "mytag")
		{

			
			myboolean = true;
			if(myboolean == true)
			{
					
			}
		}
	}

My other class:

transform.Translate(Vector3.forward * Time.deltaTime * speed);

I need to change the translate direccion on trigger enter.

Thank You!!

I reread you question but still didn’t 100% understand what you want, sorry.
And none of these are classes, these are methods.

Just make the speed variable negative if myboolean = true. Otherwise, it’s positive.