流量をEditor編集に対応
This commit is contained in:
parent
cb6601de8a
commit
d3d139c145
|
|
@ -11,10 +11,17 @@ public class CustomerFlow : MonoBehaviour
|
||||||
private readonly Subject<IObservable<Unit>> adStartObservable = new Subject<IObservable<Unit>>();
|
private readonly Subject<IObservable<Unit>> adStartObservable = new Subject<IObservable<Unit>>();
|
||||||
private IObservable<bool> tastingCustomerObservable;
|
private IObservable<bool> tastingCustomerObservable;
|
||||||
private static readonly float checkHeartInterval = 1f;
|
private static readonly float checkHeartInterval = 1f;
|
||||||
// 歩行者の出現間隔
|
|
||||||
private static readonly float walkerInterval = 60f / 6;
|
[Header("1分間あたりの歩行者数")]
|
||||||
// 試食で来るお客さん間隔
|
[SerializeField] private float walkerInterval = 60f / 6;
|
||||||
private static readonly float tastingCustomerInterval = 5f;
|
|
||||||
|
[Header("宣伝時間(秒)")]
|
||||||
|
[SerializeField] private float adWalkerDuration = 60f;
|
||||||
|
[Header("宣伝で来るお客さんの数")]
|
||||||
|
[SerializeField] private int adWalkerCount = 20;
|
||||||
|
|
||||||
|
[Header("試食のお客さん出現間隔(秒)")]
|
||||||
|
[SerializeField] private float tastingCustomerInterval = 5f;
|
||||||
|
|
||||||
public IObservable<bool> Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, tastingCustomerObservable);
|
public IObservable<bool> Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, tastingCustomerObservable);
|
||||||
|
|
||||||
|
|
@ -85,8 +92,8 @@ public class CustomerFlow : MonoBehaviour
|
||||||
|
|
||||||
private IObservable<Unit> AdWalkerTimer()
|
private IObservable<Unit> AdWalkerTimer()
|
||||||
{
|
{
|
||||||
return Observable.Interval(TimeSpan.FromSeconds(3f))
|
return Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(adWalkerDuration/adWalkerCount))
|
||||||
.Take(TimeSpan.FromSeconds(60f))
|
.Take(TimeSpan.FromSeconds(adWalkerDuration))
|
||||||
.AsUnitObservable();
|
.AsUnitObservable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue