販売シーンカスタマイズ対応
This commit is contained in:
parent
59a69ad714
commit
7be9641b8e
|
|
@ -12,8 +12,9 @@ using UnityEngine.UI;
|
||||||
public class MarketManager : MonoBehaviour
|
public class MarketManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
private static readonly double refreshWaitTime = 300;
|
private static readonly double refreshWaitTime = 300;
|
||||||
|
[SerializeField] private MarketView marketView;
|
||||||
[SerializeField] private GameObject closeSign;
|
[SerializeField] private GameObject closeSign;
|
||||||
[SerializeField] private ShopStockView stockView;
|
private ShopStockView stockView;
|
||||||
[SerializeField] private MarketCartView cartView;
|
[SerializeField] private MarketCartView cartView;
|
||||||
[SerializeField] private BrotherBlueView blueView;
|
[SerializeField] private BrotherBlueView blueView;
|
||||||
[SerializeField] private IncreaseCustomerButtonView rewardButtonView;
|
[SerializeField] private IncreaseCustomerButtonView rewardButtonView;
|
||||||
|
|
@ -40,6 +41,10 @@ public class MarketManager : MonoBehaviour
|
||||||
SoundManager.Instance.PlayBGM("bgm_marketing");
|
SoundManager.Instance.PlayBGM("bgm_marketing");
|
||||||
var gameData = GameDataManager.GameData;
|
var gameData = GameDataManager.GameData;
|
||||||
|
|
||||||
|
// カスタマイズ読み込み
|
||||||
|
marketView.SetAllItem();
|
||||||
|
stockView = marketView.GetTarget(ShopCustomizeCategory.Category4).GetComponentInChildren<ShopStockView>();
|
||||||
|
|
||||||
if (!gameData.FinishedFlags.HasFlag(TutorialFlag.FirstPlay))
|
if (!gameData.FinishedFlags.HasFlag(TutorialFlag.FirstPlay))
|
||||||
{
|
{
|
||||||
if (TutorialManager.Instance.Index == 3)
|
if (TutorialManager.Instance.Index == 3)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
@ -30,7 +31,17 @@ namespace MyGame.Scenes.marketing.Scripts
|
||||||
Instantiate(customizeData.GetPrefab(), target);
|
Instantiate(customizeData.GetPrefab(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Transform GetTarget(ShopCustomizeCategory category)
|
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)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transform GetTarget(ShopCustomizeCategory category)
|
||||||
{
|
{
|
||||||
switch (category)
|
switch (category)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue