キッチンのリワードデバッグ外した/ 獲得コイン数変更
This commit is contained in:
parent
9d19db4a34
commit
83eb91027b
|
|
@ -13,7 +13,7 @@ public class KitchenManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static readonly string ArchivedCallbackTag = "KitchenCancelCallback";
|
public static readonly string ArchivedCallbackTag = "KitchenCancelCallback";
|
||||||
private static readonly double refreshWaitTime = 300;
|
private static readonly double refreshWaitTime = 300;
|
||||||
private static readonly int RewardCoin = 30;
|
[SerializeField] int refreshRewardCoin = 100;
|
||||||
[SerializeField] private Button cookingButton;
|
[SerializeField] private Button cookingButton;
|
||||||
[SerializeField] private Button adButton;
|
[SerializeField] private Button adButton;
|
||||||
[SerializeField] private KitchenView kitchenView;
|
[SerializeField] private KitchenView kitchenView;
|
||||||
|
|
@ -24,6 +24,8 @@ public class KitchenManager : MonoBehaviour
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
resetRefreshTimer.AddTo(this);
|
||||||
|
|
||||||
// レシピの表示
|
// レシピの表示
|
||||||
cookingButton.OnClickAsObservable().Subscribe(_ =>
|
cookingButton.OnClickAsObservable().Subscribe(_ =>
|
||||||
{
|
{
|
||||||
|
|
@ -44,16 +46,14 @@ public class KitchenManager : MonoBehaviour
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
kitchenView.Initialize();
|
kitchenView.Initialize();
|
||||||
kitchenView.SetNormalAnimation();
|
adButton.OnClickAsObservable().ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ =>
|
||||||
adButton.gameObject.SetActive(false);
|
|
||||||
adButton.OnClickAsObservable().Subscribe(_ =>
|
|
||||||
{
|
{
|
||||||
// 動画視聴POP
|
// 動画視聴POP
|
||||||
GetRewardDialog.ShowCoinDialog(() =>
|
GetRewardDialog.ShowCoinDialog(() =>
|
||||||
{
|
{
|
||||||
CoinGetDialog.ShowDialog(RewardCoin, () =>
|
CoinGetDialog.ShowDialog(refreshRewardCoin, () =>
|
||||||
{
|
{
|
||||||
CoinManager.Instance.AddCoinWithEffect(RewardCoin);
|
CoinManager.Instance.AddCoinWithEffect(refreshRewardCoin);
|
||||||
gameData.Coin = CoinManager.Instance.OwnCoin;
|
gameData.Coin = CoinManager.Instance.OwnCoin;
|
||||||
gameData.kitchenRefreshTime = DateTime.UtcNow.AddSeconds(refreshWaitTime).ToBinary();
|
gameData.kitchenRefreshTime = DateTime.UtcNow.AddSeconds(refreshWaitTime).ToBinary();
|
||||||
GameDataManager.SaveGameData();
|
GameDataManager.SaveGameData();
|
||||||
|
|
@ -66,7 +66,7 @@ public class KitchenManager : MonoBehaviour
|
||||||
.Subscribe(time =>
|
.Subscribe(time =>
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
time = 5;
|
Debug.Log($"remaining: {time}");
|
||||||
#endif
|
#endif
|
||||||
adButton.gameObject.SetActive(false);
|
adButton.gameObject.SetActive(false);
|
||||||
kitchenView.SetNormalAnimation();
|
kitchenView.SetNormalAnimation();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue