WM/WatermelonCollect.cs

Component attached to a game object that listens for trigger collisions and handles collecting a watermelon. On trigger enter it increments a WMCount on ScoreManager, sets WMcollect flag, and plays a sound. On update it destroys the game object if WMcollect is true.

Reflection
using Sandbox; 

public sealed class WatermelonCollect : Component, Component.ITriggerListener
{
	[Property] public SoundEvent melon { get; set; }
	void ITriggerListener.OnTriggerEnter( Collider collision )
	{

		ScoreManager.WMCount += 1;
		ScoreManager.WMcollect = true;
		GameObject.PlaySound( melon );

	}
	protected override void OnUpdate()
	{
		
		if ( ScoreManager.WMcollect)
		{
			GameObject.Destroy();
			
		}
	}
	
}