add scrollgame dialog
This commit is contained in:
parent
4113d441ac
commit
49062bda5d
|
|
@ -242,12 +242,12 @@ MonoBehaviour:
|
||||||
m_GameObject: {fileID: 360429215}
|
m_GameObject: {fileID: 360429215}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 7ac380b2956543a6a6b17c6150b154c0, type: 3}
|
m_Script: {fileID: 11500000, guid: f9b7ce7a0eb445e3bd8061a9a9b950ab, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
backgroundAnimator: {fileID: 780755706}
|
backgroundAnimator: {fileID: 780755706}
|
||||||
closeButton: {fileID: 393391861}
|
closeButton: {fileID: 393391861}
|
||||||
updateMessageText: {fileID: 575189313}
|
messageText: {fileID: 575189313}
|
||||||
--- !u!1 &393391858
|
--- !u!1 &393391858
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using System;
|
||||||
|
using I2.Loc;
|
||||||
|
using UniRx;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace MyGame.Scenes.Main.Scripts
|
||||||
|
{
|
||||||
|
public class ScrollGameLockDialog : MonoBehaviour
|
||||||
|
{
|
||||||
|
private static readonly string CallbackTag = "MiniGameNotReleasedDialogCallback";
|
||||||
|
private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger");
|
||||||
|
private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger");
|
||||||
|
|
||||||
|
[SerializeField] private Animator backgroundAnimator;
|
||||||
|
[SerializeField] private Button closeButton;
|
||||||
|
[SerializeField] private Text messageText;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
closeButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
||||||
|
{
|
||||||
|
LocalCacheManager.Load<Action>(CallbackTag, null)?.Invoke();
|
||||||
|
LocalCacheManager.Remove(CallbackTag);
|
||||||
|
transform.parent.SetLocalScale(0);
|
||||||
|
backgroundAnimator.SetTrigger(CloseTrigger);
|
||||||
|
this.CallWaitForSeconds(.25f, () =>
|
||||||
|
{
|
||||||
|
TransitionManager.Instance.UnloadScene(GameScenes.MiniGameNotReleased);
|
||||||
|
});
|
||||||
|
}).AddTo(this);
|
||||||
|
|
||||||
|
messageText.text = string.Format("店舗レベル{0}で解放されるよ\n特別なレシピや材料が手に入るかも…?", Const.ScrollGameAvailableLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowDialog(Action onClose = null){
|
||||||
|
LocalCacheManager.Save(CallbackTag, onClose);
|
||||||
|
TransitionManager.Instance.LoadSceneAdditive(GameScenes.MiniGameNotReleased);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f9b7ce7a0eb445e3bd8061a9a9b950ab
|
||||||
|
timeCreated: 1656304568
|
||||||
|
|
@ -54,7 +54,7 @@ public class FooterManager : MonoBehaviour
|
||||||
.ThrottleFirst(TimeSpan.FromSeconds(.2f))
|
.ThrottleFirst(TimeSpan.FromSeconds(.2f))
|
||||||
.Subscribe(_ =>
|
.Subscribe(_ =>
|
||||||
{
|
{
|
||||||
// dialog
|
ScrollGameLockDialog.ShowDialog();
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51,6 +51,7 @@ public enum GameScenes
|
||||||
CustomizeExplanation,
|
CustomizeExplanation,
|
||||||
MiniGame,
|
MiniGame,
|
||||||
WatchMovieMiniGame,
|
WatchMovieMiniGame,
|
||||||
|
MiniGameNotReleased
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SceneType
|
public enum SceneType
|
||||||
|
|
|
||||||
|
|
@ -143,4 +143,7 @@ EditorBuildSettings:
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/MyGame/Scenes/MiniGame/WatchMovieMiniGame.unity
|
path: Assets/MyGame/Scenes/MiniGame/WatchMovieMiniGame.unity
|
||||||
guid: e39bbcad90cf4704f9164a3d6d574a76
|
guid: e39bbcad90cf4704f9164a3d6d574a76
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/MyGame/Scenes/Main/MiniGameNotReleased.unity
|
||||||
|
guid: 90b87b644a26a22468ecc4e2c51dc9df
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue