I have the following script and I am realy needing help geting it coverted over to c# most of my other scripts are c# and there not wanting to comunicate with js very well so I would like to switch this last script over to c#.
var explosion : GameObject;
var missile : GameObject;
function FixedUpdate () {
rigidbody.AddForce (transform.TransformDirection (Vector3.forward) * 200.0);
Destroy (missile, .5);
}
function OnCollisionEnter(collision : Collision) {
var contact : ContactPoint = collision.contacts[0];
var thisExplosion : GameObject = Instantiate (explosion, contact.point + (contact.normal * 5.0) , Quaternion.identity);
if (collision.gameObject.tag == "enemy")
{
Destroy (collision.gameObject);
}
if (collision.gameObject.tag == "metor")
{
Destroy (collision.gameObject);
//Quest1.Counter +=1;
}
if (collision.gameObject.tag == "mothership")
{
Destroy (collision.gameObject);
}
Destroy (thisExplosion, 2.0);
Destroy (gameObject);
}