From d3d139c145e4fd6f7663da7eeaa6f1b3fe55fc9f Mon Sep 17 00:00:00 2001 From: kimura Date: Mon, 29 Nov 2021 15:03:03 +0900 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E9=87=8F=E3=82=92Editor=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/CustomerFlow.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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(); } }