diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs index 4d46afdf..f123b44a 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs @@ -11,10 +11,17 @@ public class CustomerFlow : MonoBehaviour private readonly Subject> adStartObservable = new Subject>(); private IObservable tastingCustomerObservable; private static readonly float checkHeartInterval = 1f; - // 歩行者の出現間隔 - private static readonly float walkerInterval = 60f / 6; - // 試食で来るお客さん間隔 - private static readonly float tastingCustomerInterval = 5f; + + [Header("1分間あたりの歩行者数")] + [SerializeField] private float walkerInterval = 60f / 6; + + [Header("宣伝時間(秒)")] + [SerializeField] private float adWalkerDuration = 60f; + [Header("宣伝で来るお客さんの数")] + [SerializeField] private int adWalkerCount = 20; + + [Header("試食のお客さん出現間隔(秒)")] + [SerializeField] private float tastingCustomerInterval = 5f; public IObservable Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, tastingCustomerObservable); @@ -85,8 +92,8 @@ public class CustomerFlow : MonoBehaviour private IObservable AdWalkerTimer() { - return Observable.Interval(TimeSpan.FromSeconds(3f)) - .Take(TimeSpan.FromSeconds(60f)) + return Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(adWalkerDuration/adWalkerCount)) + .Take(TimeSpan.FromSeconds(adWalkerDuration)) .AsUnitObservable(); } }