Update Project

This commit is contained in:
2026-03-20 13:04:43 +02:00
parent 9b587e6cba
commit beae2dea89
2295 changed files with 251259 additions and 33 deletions
@@ -0,0 +1,31 @@
using UnityEngine;
using Zenject;
using FlappyBird.Core;
namespace FlappyBird.Gameplay.Pipes
{
/// <summary>
/// Thin MonoBehaviour ticker — the only pipe-related MonoBehaviour in the scene.
/// Responsibilities:
/// - Forward Update to IPipeSpawner.Tick
/// NO spawn logic lives here.
/// </summary>
public sealed class PipeSpawnerTicker : MonoBehaviour
{
private IPipeSpawner _spawner;
private IGameStateManager _gameStateManager;
[Inject]
private void Construct(IPipeSpawner spawner, IGameStateManager gameStateManager)
{
_spawner = spawner;
_gameStateManager = gameStateManager;
}
private void Update()
{
if (_gameStateManager.CurrentState != GameState.Playing) return;
_spawner.Tick(Time.deltaTime);
}
}
}