店舗レベルごとのレシピ開放対応
This commit is contained in:
parent
9b3af3217b
commit
b2cd3cf34c
|
|
@ -20,12 +20,13 @@ public class KitchenManager : MonoBehaviour
|
|||
TransitionManager.Instance.LoadSceneAdditive(GameScenes.Recipe);
|
||||
});
|
||||
|
||||
// スプレッドシート対応
|
||||
// レシピIDが一覧で入っている
|
||||
// データ
|
||||
var gameData = GameDataManager.GameData;
|
||||
CoinManager.Instance.ChangeCoin(gameData.coin);
|
||||
|
||||
var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopLevelData>(Const.ShopLevelDataSheet);
|
||||
HeartMeter.Instance.Initialize(shopLevelList);
|
||||
HeartMeter.Instance.SetHeart(gameData.Heart);
|
||||
|
||||
SetData();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
|
@ -42,8 +43,6 @@ public class KitchenManager : MonoBehaviour
|
|||
gameData.MyRecipes = new[]
|
||||
{
|
||||
1,
|
||||
2,
|
||||
13,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,31 +47,9 @@ public class Market : MonoBehaviour
|
|||
var gameData = GameDataManager.GameData;
|
||||
CoinManager.Instance.ChangeCoin(gameData.coin);
|
||||
|
||||
var shopLevelList = new List<(int level, int heart, int tenMinCustomer)>
|
||||
{
|
||||
(1, 0, 10),
|
||||
(2, 10, 15),
|
||||
(3, 30, 20),
|
||||
(4, 50, 25),
|
||||
(5, 80, 30),
|
||||
(6, 130, 35),
|
||||
(7, 210, 40),
|
||||
(8, 320, 45),
|
||||
(9, 470, 50),
|
||||
(10, 650, 55),
|
||||
(11, 870, 60),
|
||||
(12, 1120, 65),
|
||||
(13, 1420, 70),
|
||||
(14, 1870, 75),
|
||||
(15, 2470, 80),
|
||||
(16, 3170, 85),
|
||||
(17, 4070, 90),
|
||||
(18, 5470, 95),
|
||||
(19, 7070, 100),
|
||||
(20, 9070, 105),
|
||||
};
|
||||
|
||||
HeartMeter.Instance.Initialize(shopLevelList.Select(x => x.heart).ToList());
|
||||
var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopLevelData>(Const.ShopLevelDataSheet);
|
||||
var shopLevelToCustomerList = shopLevelList.Select(shopLevel => (level:shopLevel.shopLevel, tenMinCustomer:shopLevel.customer));
|
||||
HeartMeter.Instance.Initialize(shopLevelList);
|
||||
HeartMeter.Instance.SetHeart(gameData.Heart);
|
||||
|
||||
// 在庫数表示
|
||||
|
|
@ -302,7 +280,7 @@ public class Market : MonoBehaviour
|
|||
|
||||
// お客さん出現タイマー(店舗レベル連動
|
||||
var changeCustomerFlowObservable = HeartMeter.Instance.ShopLevel
|
||||
.Select(x => (float)60 * 10 / shopLevelList.First(y => y.level == x).tenMinCustomer); // 10分間期待値から来客の間隔を算出
|
||||
.Select(x => (float)60 * 10 / shopLevelToCustomerList.First(y => y.level == x).tenMinCustomer); // 10分間期待値から来客の間隔を算出
|
||||
var customerObservable = changeCustomerFlowObservable
|
||||
.Select(x => Observable.Interval(TimeSpan.FromSeconds(x))
|
||||
.Select(_ =>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ public class HeartMeter : SingletonMonoBehaviour<HeartMeter>
|
|||
compositeDisposable.AddTo(this);
|
||||
}
|
||||
|
||||
public void Initialize(List<int> list)
|
||||
public void Initialize(List<ShopLevelData> shopLevelDataList)
|
||||
{
|
||||
levelList = list;
|
||||
levelList = shopLevelDataList.Select(shopLevelData => shopLevelData.heart).ToList();
|
||||
compositeDisposable.Clear();
|
||||
shopLevel.Subscribe(x =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue