diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs index 2f85242d..cc086b3f 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs @@ -18,14 +18,17 @@ public enum ShopState public class Market : SingletonMonoBehaviour { 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 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()); } // お客さん出現パターン確率計算と行動パターン計算