How to add function to gameobject as separate script correctly?

I have script attached to gameObject. But I want to take function DisappearNow() and add as separate script. It should be simple but I still puzzled. How do I call to it from main script? Do I have (is it a must) to create new class or do i just copy DisappearNow function and add? When I create new script it creates new class. But do I have to create a new class for every little snippet of code? So if i have 20 functions, there will be 20 classes?
I tried to look through Unity scripting videos but can not find answer.
Could someone give example?

public class MainScriptUnitWarior: MonoBehaviour {
	void Start () {

	}

	void DisappearNow() {
      Destroy(this.gameObject);
	}

}

Thank you!

Yes, if you want to attach behaviour to an object, that has to exist in it’s own script.

That being said, there are some things you could do differently.

First of all, an object doesn’t have to destroy itself. You could keep a reference to this object in another script, and destroy it (or do whatever you want with it) there. You could have a private, inner class that you add to the object, so it doesn’t create clutter.

You can also have several classes in a single file, although unless the secondary classes are only used in the context of the main class for that file, it’ll get really messy fast.