diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png new file mode 100644 index 00000000..95d4d7e5 Binary files /dev/null and b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png differ diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png.meta b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png.meta new file mode 100644 index 00000000..b78df60b --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_defo_Dither.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: eec1c209826c64ee992031fcf2063f7b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png new file mode 100644 index 00000000..d5908209 Binary files /dev/null and b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png differ diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png.meta b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png.meta new file mode 100644 index 00000000..a5c97ebf --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/marketing/marketing_cart_logo_defo_Dither.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 4717ef924abc849e18f0fa060a7420d3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png new file mode 100644 index 00000000..16310c44 Binary files /dev/null and b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png differ diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png.meta b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png.meta new file mode 100644 index 00000000..46678143 --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_b_defo.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 689a549b288e841bd8ccd6abedae2cf4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png new file mode 100644 index 00000000..6e9539be Binary files /dev/null and b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png differ diff --git a/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png.meta b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png.meta new file mode 100644 index 00000000..815099de --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/marketing/ui_marketing_StockMeter_defo.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 86062d3d3af094019a8a3cb208366af5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 9 + spritePivot: {x: 0.58631194, y: 0.515432} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Resources/DontDestroyObject.prefab b/popcorn/Assets/MyGame/Resources/DontDestroyObject.prefab index 8c3507c9..39f06e78 100644 --- a/popcorn/Assets/MyGame/Resources/DontDestroyObject.prefab +++ b/popcorn/Assets/MyGame/Resources/DontDestroyObject.prefab @@ -240,9 +240,10 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 3320409656134683753} + - component: {fileID: 680149628799017792} + - component: {fileID: 7815373139353427344} - component: {fileID: 6660189001731691529} - component: {fileID: 3170654326839881890} - - component: {fileID: 680149628799017792} m_Layer: 0 m_Name: MarketManager m_TagString: Untagged @@ -265,6 +266,37 @@ Transform: m_Father: {fileID: 3667080857874733261} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &680149628799017792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8739647597683206087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 772e0346311a433fb714573f207813d2, type: 3} + m_Name: + m_EditorClassIdentifier: + walkerInterval: 10 + adWalkerDuration: 60 + adWalkerCount: 20 + tastingCustomerInterval: 5 +--- !u!114 &7815373139353427344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8739647597683206087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 573c945685b348baa1a1ba6aeeb38714, type: 3} + m_Name: + m_EditorClassIdentifier: + specialOrderCount: 5 + walkerSpecialRate: 0.01 + customerSpecialRate: 0.01 --- !u!114 &6660189001731691529 MonoBehaviour: m_ObjectHideFlags: 0 @@ -280,6 +312,7 @@ MonoBehaviour: customerFlow: {fileID: 680149628799017792} orderPosisionObject: {fileID: 8461447348824790522} customerData: {fileID: 3170654326839881890} + customerSetting: {fileID: 7815373139353427344} customerControllerPrefab: {fileID: 5715829407227760309, guid: 6fbb038c9aae840f2bea57bce30740f7, type: 3} --- !u!114 &3170654326839881890 @@ -317,18 +350,6 @@ MonoBehaviour: - {fileID: 1134751513859088931, guid: 09a4786fa1ab00e4b9c5bf9cebf256bc, type: 3} specialCustomerList: - {fileID: 5301193561386860206, guid: 72f4243f8f258bc48b42e3ae5e1ba2b5, type: 3} ---- !u!114 &680149628799017792 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8739647597683206087} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 772e0346311a433fb714573f207813d2, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &8914311020904666258 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs b/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs index 4efee0e3..477083da 100644 --- a/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs +++ b/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs @@ -46,7 +46,7 @@ public class Title : MonoBehaviour .Subscribe(t => { // 一般客orセレブ - var (isSpecial, orderCount) = Market.GetCustomerData(false); + var (isSpecial, orderCount) = Market.Instance.GetCustomerData(false); // 複数パターンある場合ChooseRandom var prefab = isSpecial ? customerData.ChooseSpecialPrefab() : customerData.ChooseNormalPrefab(); 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(); } } diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs new file mode 100644 index 00000000..c7d0495c --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs @@ -0,0 +1,45 @@ +using System.Linq; +using UnityEngine; + +namespace MyGame.Scenes.marketing.Scripts +{ + public class CustomerSetting : MonoBehaviour + { + [SerializeField] private int specialOrderCount = 5; + [SerializeField] private float walkerSpecialRate = .01f; + [SerializeField] private float customerSpecialRate = .01f; + + private static readonly (int want, float weight)[] CustomerWeightTable = { + (1, 75f), + (2, 15f), + (3, 3.5f), + (4, 1.25f), + (5, .25f), + (0, 5f), + }; + + public (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer) + { + var specialRate = isCustomer ? walkerSpecialRate : customerSpecialRate; + var isSpecial = Random.value < specialRate; + + // セレブは5個購入固定 + return isSpecial ? (true, specialOrderCount) : (false, GetOrderCount()); + } + + // お客さん出現パターン確率計算と行動パターン計算 + private static int GetOrderCount() + { + var randomPoint = Random.value * CustomerWeightTable.Sum(x => x.weight); + foreach (var value in CustomerWeightTable) + { + if (randomPoint < value.weight) + { + return value.want; + } + randomPoint -= value.weight; + } + return CustomerWeightTable.Last().want; + } + } +} \ No newline at end of file diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs.meta b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs.meta new file mode 100644 index 00000000..fb06dcd3 --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 573c945685b348baa1a1ba6aeeb38714 +timeCreated: 1638163510 \ No newline at end of file diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs index cc086b3f..c1aa1e62 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; +using MyGame.Scenes.marketing.Scripts; using TMPro; using UniRx; using UniRx.Triggers; @@ -18,21 +19,15 @@ 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, 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; + + // 購入時アニメーションタイミング + private static readonly float waitSellTime = 1.5f; + private static readonly float waitRefillTime = 1f; [SerializeField] private CustomerFlow customerFlow; [SerializeField] private GameObject orderPosisionObject; [SerializeField] private CustomerData customerData; + [SerializeField] private CustomerSetting customerSetting; [SerializeField] private CustomerController customerControllerPrefab; public List DisplayFlavors => displayFlavors; @@ -229,13 +224,13 @@ public class Market : SingletonMonoBehaviour } } - this.CallWaitForSeconds(1.5f, () => + this.CallWaitForSeconds(waitSellTime, () => { sellObservable.OnNext(coin); sellOrderSubject.OnNext(orders); CheckStock(gameData.ShopStock); - this.CallWaitForSeconds(1f, () => + this.CallWaitForSeconds(waitRefillTime, () => { refillSubject.OnNext((isReorder, refillList)); foreach (var controller in customers) @@ -341,28 +336,9 @@ public class Market : SingletonMonoBehaviour } - public static (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer) + public (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer) { - var specialRate = isCustomer ? walkerSpecialRate : customerSpecialRate; - var isSpecial = Random.value < specialRate; - - // セレブは5個購入固定 - return isSpecial ? (true, specialOrderCount: SpecialOrderCount) : (false, GetOrderCount()); - } - - // お客さん出現パターン確率計算と行動パターン計算 - private static int GetOrderCount() - { - var randomPoint = Random.value * CustomerWeightTable.Sum(x => x.weight); - foreach (var value in CustomerWeightTable) - { - if (randomPoint < value.weight) - { - return value.want; - } - randomPoint -= value.weight; - } - return CustomerWeightTable.Last().want; + return customerSetting.GetCustomerData(isCustomer); } private CustomerController SpawnCustomer() diff --git a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity index c3ef16b8..29716e06 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity @@ -1760,7 +1760,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 438315598} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.72, y: -2.45, z: 0} + m_LocalPosition: {x: 3.68, y: -2.45, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 699827849} @@ -1809,7 +1809,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 4 - m_Sprite: {fileID: 21300000, guid: 19e47aa2657cc1f47adfca0ad007a309, type: 3} + m_Sprite: {fileID: 21300000, guid: 86062d3d3af094019a8a3cb208366af5, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -2072,7 +2072,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 456610254} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.32, y: 0.19, z: 0} + m_LocalPosition: {x: -0.22, y: 0.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 438315599} @@ -2117,7 +2117,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 2 - m_Sprite: {fileID: 21300000, guid: 39338f73bd1e4f443958fdf6e03d345b, type: 3} + m_Sprite: {fileID: 21300000, guid: 689a549b288e841bd8ccd6abedae2cf4, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -7395,7 +7395,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 5 - m_Sprite: {fileID: 21300000, guid: 7dd324e32c7db624e8c74fea88f45ca7, type: 3} + m_Sprite: {fileID: 21300000, guid: 1c2a241c79997427ba36c3cb6e5e3eba, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -13696,7 +13696,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1806801954} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.188, y: -0.97, z: 0} + m_LocalPosition: {x: -0.188, y: -1.039, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 438315599} @@ -19141,7 +19141,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1987982869} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.39, y: 3.05, z: 0} + m_LocalPosition: {x: -0.39, y: 3.08, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1482901211} @@ -19186,7 +19186,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 6 - m_Sprite: {fileID: 21300000, guid: cee29e082ddcf9743ab95cb745d03b2f, type: 3} + m_Sprite: {fileID: 21300000, guid: 4717ef924abc849e18f0fa060a7420d3, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0