Exemplo n.º 1
0
    private void Update()
    {
        if ((nextShotInSeconds -= Time.deltaTime) > 0)
        {
            return;
        }
        nextShotInSeconds = fireRate;

        PathedProjectile projectile = (PathedProjectile)Instantiate(Projectile, transform.position, transform.rotation);

        projectile.Initalize(destination, speed);
    }