diff --git a/unity/Assets/Scripts/DragonMovement.cs b/unity/Assets/Scripts/DragonMovement.cs index 2c4e452..5cf001e 100644 --- a/unity/Assets/Scripts/DragonMovement.cs +++ b/unity/Assets/Scripts/DragonMovement.cs @@ -4,6 +4,8 @@ using UnityEngine; public class DragonMovement : MonoBehaviour { + const bool ROTATE_WITH_FLAP = false; + [SerializeField] KeyCode FlapKey; Rigidbody2D _rigidbody; float _flapTime = 0f; @@ -206,6 +208,7 @@ public class DragonMovement : MonoBehaviour { _flapTime = FlapLength; _animator.Play("fly"); + transform.eulerAngles = new Vector3(-45f, transform.eulerAngles.y, transform.eulerAngles.z); ShowNormalAmmo(); } @@ -258,6 +261,10 @@ public class DragonMovement : MonoBehaviour _flapTime = 0f; } } + else if (_flapTime > 0 && ROTATE_WITH_FLAP) + { + transform.eulerAngles = new Vector3(0f, 0f, 30f); + } else { transform.rotation = Quaternion.identity;