Initial Commit

This commit is contained in:
2026-03-16 14:38:46 +02:00
commit b8f7327a21
2327 changed files with 253610 additions and 0 deletions
@@ -0,0 +1,55 @@
using UnityEngine;
namespace FlappyBird.Bird
{
/// <summary>
/// Configurable physics and rotation settings for the bird.
/// Create via Assets > Create > FlappyBird > Bird Settings.
/// </summary>
[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;
}
}