Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerator TurnAroundAndShoot()
- {
- _shootingBack = true;
- bool sweepingRight = true;
- Debug.Log("Entering turn around");
- // Turn until reversed
- while (_turret.transform.eulerAngles.z < 180f && transform.position.y > GameManager.dBound)
- {
- _turret.transform.Rotate(Vector3.forward * Time.deltaTime * _rotationSpeed);
- Debug.Log($"Rotation: {_turret.transform.eulerAngles.z}");
- yield return new WaitForSeconds(0.1f);
- }
- Debug.Log("Exiting");
- // Rotate back
- this.transform.rotation = Quaternion.identity;
- Debug.Log(transform.rotation.eulerAngles);
- _shootingBack = false;
- yield break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement