If someone can translate this to C# I’d greatly appreciate it.
var LookAtTarget: Transform;
var damp=6.0;
var BulletPrefab: Transform;
var savedTime=0;
var delayTime=2f;
function Update ()
{
if(LookAtTarget)
{
var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position);
var seconds: int = Time.time;
Shoot(seconds);
}
}
function Shoot(seconds)
{
if (seconds == savedTime)
{
var bullet = Instantiate(BulletPrefab ,transform.Find ("SpawnPoint").transform.position ,
Quaternion.identity);
bullet.GetComponent.<Rigidbody>().AddForce(transform.up *1000);
savedTime=seconds+delayTime;
}
}