所持金0時に直接広告視聴ポップアップを出す処理を追加
This commit is contained in:
parent
d5a79cae10
commit
3bf5ec9381
|
|
@ -18,9 +18,12 @@ public class KitchenManager : MonoBehaviour
|
||||||
[SerializeField] private KitchenView kitchenView;
|
[SerializeField] private KitchenView kitchenView;
|
||||||
[SerializeField] private BulkOrderIndicatorView orderIndicatorView;
|
[SerializeField] private BulkOrderIndicatorView orderIndicatorView;
|
||||||
|
|
||||||
|
private readonly Subject<Unit> showAdDialogSubject = new Subject<Unit>();
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
showAdDialogSubject.AddTo(this);
|
||||||
SoundManager.Instance.PlayBGM("bgm_Main");
|
SoundManager.Instance.PlayBGM("bgm_Main");
|
||||||
var gameData = GameDataManager.GameData;
|
var gameData = GameDataManager.GameData;
|
||||||
|
|
||||||
|
|
@ -106,7 +109,9 @@ public class KitchenManager : MonoBehaviour
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
kitchenView.Initialize();
|
kitchenView.Initialize();
|
||||||
adButton.OnClickAsObservable().ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ =>
|
adButton.OnClickAsObservable()
|
||||||
|
.Merge(showAdDialogSubject)
|
||||||
|
.ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ =>
|
||||||
{
|
{
|
||||||
// 動画視聴POP
|
// 動画視聴POP
|
||||||
GetRewardDialog.ShowCoinDialog(() =>
|
GetRewardDialog.ShowCoinDialog(() =>
|
||||||
|
|
@ -137,6 +142,7 @@ public class KitchenManager : MonoBehaviour
|
||||||
// 所持金0救済
|
// 所持金0救済
|
||||||
adButton.gameObject.SetActive(true);
|
adButton.gameObject.SetActive(true);
|
||||||
kitchenView.SetTiredAnimation();
|
kitchenView.SetTiredAnimation();
|
||||||
|
showAdDialogSubject.OnNext(Unit.Default);
|
||||||
}
|
}
|
||||||
else if (remaining > 0 || gameData.isFirstPlay)
|
else if (remaining > 0 || gameData.isFirstPlay)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue