My script:
using UnityEngine;
using System.Collections;
public class Gun : MonoBehaviour {
public Transform muzzle;
public Projectile projectile;
public float msBetweenShots = 100;
public float muzzleVelocity = 35;
float nextShotTime;
public void Shoot() {
if (Time.time > nextShotTime) {
nextShotTime = Time.time + msBetweenShots / 1000;
Projectile newProjectile = Instantiate (projectile, muzzle.position, muzzle.position) as Projectile;
newProjectile.SetSpeed (muzzleVelocity);
}
}
}
: Second last line wont work, says it cant convert.
Any ideas as to whats wrong?