Problem with collision of two of the same objects

In my game I have a bunch of ball like objects floating around the scene. I want it so that when these objects collide they go from two objects of specified masses to one object of the sum of their masses. The problem I am having is that when they collide the triggerEnter method is called by both of them. Here is my code in C#

void OnTriggerEnter2D (Collider2D other)
{

	if (other.name.Contains ("Food")) 
	{
		var foodTransform = Instantiate(food) as Transform;
		foodTransform.position = transform.position;
		FoodScript f = foodTransform.GetComponent<FoodScript>();
		f.Direction = Direction;
		f.mass = mass + (int)(other.gameObject.transform.localScale.x / 0.02f);
		f.speed = speed;
		foodTransform.localScale = new Vector3 (f.mass * 0.02f, f.mass * 0.02f, 1f);

		Destroy(gameObject);
		Destroy(other.gameObject);

	}

This at the moment results in two new objects both of the correct size, but one continues bouncing around where as the other is created in the position of the collision but does not move as the original object that would have created it is destroyed before the script of this object is started. I do not know how to handle this so that this goes from two objects to one. Can someone help me with this problem?

Off the top of my head, you could add a boolean flag to the class, assuming the two classes are the same, or if they are not, create a new base class, and derive the collidable classes from it. In the base class, add the boolean flag. In either case, set the flag to true when the collision occurs, and in the collision code check that the flag of the other object is false before doing the combination. That way, the first object to hit the TriggerEnter code will do the combining, and the other object will ignore it. Another option (maybe) is to use DestroyImmediate instead of Destroy. I’m not sure if DestroyImmediate will still prevent the TriggerEnter from happening on the destroyed object…it could possible just crash. Good luck.