void Update () { if (transform.position.z + 20 < _player.transform.position.z) { if (!controller.IsLive() && _wall == null) { GenerateWall(); } } }