To call a method in a component in another object
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class peng : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D collision)
{
if(collision.tag=="tou")
{
GameObject.Find("Gamemangen").GetComponent<Gamemange>().GameOver();
}
}
}