販売シーンカスタマイズ対応

This commit is contained in:
kimura 2022-05-13 15:09:13 +09:00
parent 59a69ad714
commit 7be9641b8e
3 changed files with 738 additions and 1707 deletions

View File

@ -12,8 +12,9 @@ using UnityEngine.UI;
public class MarketManager : MonoBehaviour
{
private static readonly double refreshWaitTime = 300;
[SerializeField] private MarketView marketView;
[SerializeField] private GameObject closeSign;
[SerializeField] private ShopStockView stockView;
private ShopStockView stockView;
[SerializeField] private MarketCartView cartView;
[SerializeField] private BrotherBlueView blueView;
[SerializeField] private IncreaseCustomerButtonView rewardButtonView;
@ -39,6 +40,10 @@ public class MarketManager : MonoBehaviour
SoundManager.Instance.PlayBGM("bgm_marketing");
var gameData = GameDataManager.GameData;
// カスタマイズ読み込み
marketView.SetAllItem();
stockView = marketView.GetTarget(ShopCustomizeCategory.Category4).GetComponentInChildren<ShopStockView>();
if (!gameData.FinishedFlags.HasFlag(TutorialFlag.FirstPlay))
{

View File

@ -1,4 +1,5 @@
using System;
using System.Linq;
using UniRx;
using UnityEngine;
using UnityEngine.UI;
@ -29,8 +30,18 @@ namespace MyGame.Scenes.marketing.Scripts
target.DestroyAllChildrens();
Instantiate(customizeData.GetPrefab(), target);
}
public void SetAllItem()
{
var settings = GameDataManager.GameData.ShopCustomizeSettings;
var customizeDataList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopCustomizeData>(Const.ShopCustomizeDataSheet);
foreach (var category in (ShopCustomizeCategory[])Enum.GetValues(typeof(ShopCustomizeCategory)))
{
SetItem(customizeDataList.First(data => data.id == settings.GetSetting(category)));
}
}
private Transform GetTarget(ShopCustomizeCategory category)
public Transform GetTarget(ShopCustomizeCategory category)
{
switch (category)
{

File diff suppressed because it is too large Load Diff