Files
Flappy-Bird-AI-Driven-Result/Assets/Scripts/Gameplay/Bird/IBirdController.cs
T
2026-03-16 14:38:46 +02:00

31 lines
1012 B
C#

namespace FlappyBird.Bird
{
/// <summary>
/// Contract for the bird physics controller service.
/// Separates logic from the MonoBehaviour view layer.
/// </summary>
public interface IBirdController
{
/// <summary>Attaches the spawned bird view to the controller.</summary>
void Bind(BirdView view);
/// <summary>Initializes the bird at the given spawn position and freezes physics.</summary>
void Initialize();
/// <summary>Applies an upward impulse and enables physics simulation.</summary>
void Jump();
/// <summary>Reports a lethal collision from the view layer.</summary>
void HandleCollision();
/// <summary>
/// Enables or disables input processing.
/// Pass false to freeze the bird before the first tap.
/// </summary>
void SetInputEnabled(bool enabled);
/// <summary>Called every fixed-update tick to apply rotation.</summary>
void FixedTick();
}
}