自動調理の完成通知を実装
This commit is contained in:
parent
13390f1298
commit
9eb3569047
|
|
@ -7374,6 +7374,7 @@ MonoBehaviour:
|
||||||
- {fileID: 758194584}
|
- {fileID: 758194584}
|
||||||
- {fileID: 278785268}
|
- {fileID: 278785268}
|
||||||
autoCookButton: {fileID: 249665956}
|
autoCookButton: {fileID: 249665956}
|
||||||
|
notifyIcon: {fileID: 3664916832445709977}
|
||||||
--- !u!1 &2124297503
|
--- !u!1 &2124297503
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -7994,6 +7995,11 @@ PrefabInstance:
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6498465124467203549, guid: caaa748dbeed576499e8cae74d33f689,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6969874152703327186, guid: caaa748dbeed576499e8cae74d33f689,
|
- target: {fileID: 6969874152703327186, guid: caaa748dbeed576499e8cae74d33f689,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
|
@ -8076,6 +8082,12 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: caaa748dbeed576499e8cae74d33f689, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: caaa748dbeed576499e8cae74d33f689, type: 3}
|
||||||
|
--- !u!1 &3664916832445709977 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6302295283707553864, guid: caaa748dbeed576499e8cae74d33f689,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3664916832445709976}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!224 &3664916832445709978 stripped
|
--- !u!224 &3664916832445709978 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3664916832844628215, guid: caaa748dbeed576499e8cae74d33f689,
|
m_CorrespondingSourceObject: {fileID: 3664916832844628215, guid: caaa748dbeed576499e8cae74d33f689,
|
||||||
|
|
|
||||||
|
|
@ -1104,6 +1104,7 @@ MonoBehaviour:
|
||||||
saleButton: {fileID: 3508757909112374925}
|
saleButton: {fileID: 3508757909112374925}
|
||||||
productManagementButton: {fileID: 4134779366559125937}
|
productManagementButton: {fileID: 4134779366559125937}
|
||||||
stockNotifyIcon: {fileID: 2430043917671370164}
|
stockNotifyIcon: {fileID: 2430043917671370164}
|
||||||
|
kitchenNotifyIcon: {fileID: 4699855437215309545}
|
||||||
--- !u!1 &3310671341662576997
|
--- !u!1 &3310671341662576997
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -4080,15 +4081,15 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f8587bb162250fa48947d648e934781e, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: f8587bb162250fa48947d648e934781e, type: 3}
|
||||||
--- !u!224 &3233636912317429793 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 8136263580696535353, guid: f8587bb162250fa48947d648e934781e,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 6632112567178762520}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &2430043917671370164 stripped
|
--- !u!1 &2430043917671370164 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 9056949049436837036, guid: f8587bb162250fa48947d648e934781e,
|
m_CorrespondingSourceObject: {fileID: 9056949049436837036, guid: f8587bb162250fa48947d648e934781e,
|
||||||
type: 3}
|
type: 3}
|
||||||
m_PrefabInstance: {fileID: 6632112567178762520}
|
m_PrefabInstance: {fileID: 6632112567178762520}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!224 &3233636912317429793 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8136263580696535353, guid: f8587bb162250fa48947d648e934781e,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6632112567178762520}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ namespace MyGame.Scenes.Main.Scripts
|
||||||
[SerializeField] private Animator cookAnimator;
|
[SerializeField] private Animator cookAnimator;
|
||||||
[SerializeField] private GameObject[] progressImages;
|
[SerializeField] private GameObject[] progressImages;
|
||||||
[SerializeField] private Button autoCookButton;
|
[SerializeField] private Button autoCookButton;
|
||||||
|
[SerializeField] private GameObject notifyIcon;
|
||||||
|
|
||||||
public IObservable<Unit> Button => autoCookButton.OnClickAsObservable().TakeUntilDestroy(this);
|
public IObservable<Unit> Button => autoCookButton.OnClickAsObservable().TakeUntilDestroy(this);
|
||||||
private IDisposable timerDisposable;
|
private IDisposable timerDisposable;
|
||||||
|
|
@ -31,6 +32,18 @@ namespace MyGame.Scenes.Main.Scripts
|
||||||
SetProgress(0f);
|
SetProgress(0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CheckNotify()
|
||||||
|
{
|
||||||
|
notifyIcon.SetActive(CheckComplete());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool CheckComplete()
|
||||||
|
{
|
||||||
|
var gameData = GameDataManager.GameData;
|
||||||
|
var remainingTime = DateTime.FromBinary(gameData.AutoCookFinishTime).Subtract(DateTime.UtcNow);
|
||||||
|
return gameData.AutoCookProducts.Length != 0 && remainingTime.TotalSeconds <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void SetActive(bool active)
|
public void SetActive(bool active)
|
||||||
{
|
{
|
||||||
autoCookButton.gameObject.SetActive(active);
|
autoCookButton.gameObject.SetActive(active);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using MyGame.Scenes.Main.Scripts;
|
||||||
using MyGame.Scripts;
|
using MyGame.Scripts;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
@ -13,6 +14,7 @@ public class FooterManager : MonoBehaviour
|
||||||
[SerializeField] private FooterButton saleButton;
|
[SerializeField] private FooterButton saleButton;
|
||||||
[SerializeField] private FooterButton productManagementButton;
|
[SerializeField] private FooterButton productManagementButton;
|
||||||
[SerializeField] private GameObject stockNotifyIcon;
|
[SerializeField] private GameObject stockNotifyIcon;
|
||||||
|
[SerializeField] private GameObject kitchenNotifyIcon;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
@ -37,6 +39,7 @@ public class FooterManager : MonoBehaviour
|
||||||
TransitionManager.Instance.LoadScene(x);
|
TransitionManager.Instance.LoadScene(x);
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
|
kitchenNotifyIcon.SetActive(AutoCookView.CheckComplete());
|
||||||
stockNotifyIcon.SetActive(Shopping.CheckEarnedRecipe());
|
stockNotifyIcon.SetActive(Shopping.CheckEarnedRecipe());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue