void Update () { counter += Time.deltaTime; if ( counter >= lifeTime ) { SpawnManager.Instance().Destroy(gameObject); } transform.position = transform.position + speed * Time.deltaTime * transform.forward; }