using UnityEngine; namespace FlappyBird.Bird { /// /// Configurable physics and rotation settings for the bird. /// Create via Assets > Create > FlappyBird > Bird Settings. /// [CreateAssetMenu(fileName = "BirdSettings", menuName = "FlappyBird/Bird Settings")] public class BirdSettings : ScriptableObject { [Header("Jump")] [Tooltip("Upward force applied on each tap.")] public float jumpForce = 5f; [Tooltip("Vertical velocity applied before jump force. Useful for snappier flaps.")] public float jumpStartVelocity = 0f; [Tooltip("Maximum upward speed after a jump.")] public float maxRiseVelocity = 8f; [Tooltip("How much current falling speed is preserved when jumping. 0 = reset fall fully.")] [Range(0f, 1f)] public float fallVelocityCarryover = 0f; [Header("Movement")] [Tooltip("Gravity scale while the bird is active.")] public float activeGravityScale = 1f; [Tooltip("Extra gravity applied while the bird is falling.")] public float fallGravityMultiplier = 1.5f; [Tooltip("Extra gravity applied while the bird is rising.")] public float riseGravityMultiplier = 1f; [Tooltip("Terminal fall velocity clamp (negative value).")] public float maxFallVelocity = -10f; [Header("Rotation")] [Tooltip("Maximum rotation angle when moving upward (degrees).")] public float maxUpAngle = 30f; [Tooltip("Maximum rotation angle when falling (degrees, negative = nose-down).")] public float maxDownAngle = -90f; [Tooltip("Vertical speed used to reach max upward angle.")] public float upAngleVelocity = 5f; [Tooltip("Vertical speed used to reach max downward angle.")] public float downAngleVelocity = -10f; [Tooltip("Degrees per second for rotation lerp towards target angle.")] public float rotationSpeed = 360f; } }