Hi if someone could help me translate this code into C# that would be appreciated I have already tried the m2h translator , thanks in advance
private var shooting = false;
var shotSpacer = 0.1; //time between shots in burst
var burstSpacer = 0; //how long after a firing burst you must wait to fire another
var burstShots = 3; //number of shots in a burst
private var remainingShots : int;
var projectile : Rigidbody; //your bullet object
var speed = 5;
function Update () {
if(Input.GetButtonDown("Fire1") && !shooting){
BurstFire ();
}
}
function BurstFire () {
shooting = true;
remainingShots = burstShots;
InvokeRepeating("Fire", 0, shotSpacer);
yield WaitForSeconds(burstSpacer);
shooting = false;
}
function Fire () {
if(remainingShots > 0){
clone = Instantiate(projectile, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection( Vector3 (0, 0, speed));
remainingShots --;
}else{
CancelInvoke();
}
}
{ }