お客さんの購入テーブルとセレブ客の出現確率を更新
This commit is contained in:
parent
05cd34e727
commit
2969c2d950
|
|
@ -18,14 +18,17 @@ public enum ShopState
|
|||
public class Market : SingletonMonoBehaviour<Market>
|
||||
{
|
||||
public static readonly int ShopStockCount = 20;
|
||||
private static readonly int SpecialOrderCount = 5;
|
||||
private static readonly (int want, float weight)[] CustomerWeightTable = {
|
||||
(1, 70f),
|
||||
(2, 20f),
|
||||
(3, 3f),
|
||||
(4, 1.5f),
|
||||
(5, .5f),
|
||||
(1, 75f),
|
||||
(2, 15f),
|
||||
(3, 3.5f),
|
||||
(4, 1.25f),
|
||||
(5, .25f),
|
||||
(0, 5f),
|
||||
};
|
||||
private static readonly float walkerSpecialRate = .01f;
|
||||
private static readonly float customerSpecialRate = .01f;
|
||||
|
||||
[SerializeField] private CustomerFlow customerFlow;
|
||||
[SerializeField] private GameObject orderPosisionObject;
|
||||
|
|
@ -340,10 +343,11 @@ public class Market : SingletonMonoBehaviour<Market>
|
|||
|
||||
public static (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer)
|
||||
{
|
||||
var isSpecial = isCustomer ? Random.value < .01f : Random.value < .03f;
|
||||
var specialRate = isCustomer ? walkerSpecialRate : customerSpecialRate;
|
||||
var isSpecial = Random.value < specialRate;
|
||||
|
||||
// セレブは5個購入固定
|
||||
return isSpecial ? (true, 5) : (false, GetOrderCount());
|
||||
return isSpecial ? (true, specialOrderCount: SpecialOrderCount) : (false, GetOrderCount());
|
||||
}
|
||||
|
||||
// お客さん出現パターン確率計算と行動パターン計算
|
||||
|
|
|
|||
Loading…
Reference in New Issue