カスタマイズ機能チュートリアル対応
This commit is contained in:
parent
8fcc3bc8be
commit
43f26fe8be
|
|
@ -171,6 +171,7 @@ public class DebugOptionManager : MonoBehaviour
|
|||
|
||||
resetShopCustomizeButton.OnClickAsObservable().Subscribe(_ =>
|
||||
{
|
||||
gameData.FinishedFlags &= ~TutorialFlag.ShopCustomize;
|
||||
gameData.ShopCustomizeLevel = 1;
|
||||
gameData.ShopCustomizePoint = 0;
|
||||
gameData.ShopCustomizeCoin = 0;
|
||||
|
|
|
|||
|
|
@ -897,6 +897,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2062451052}
|
||||
- component: {fileID: 2062451053}
|
||||
m_Layer: 5
|
||||
m_Name: Window
|
||||
m_TagString: Untagged
|
||||
|
|
@ -925,3 +926,17 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 126}
|
||||
m_SizeDelta: {x: 882, y: 900}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2062451053
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2062451051}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2c9f1da19b6645aba2dd31af17ba8e48, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
backgroundAnimator: {fileID: 1361525442}
|
||||
closeButton: {fileID: 1019858970}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MyGame.Scripts;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -18,6 +19,12 @@ namespace MyGame.Scenes.marketing.Scripts
|
|||
var customizeLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopCustomizeLevelData>(Const.ShopCustomizeLevelDataSheet);
|
||||
var customizeBonusList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopCustomizeBonusData>(Const.ShopCustomizeBonusDataSheet);
|
||||
|
||||
if (!gameData.FinishedFlags.HasFlag(TutorialFlag.ShopCustomize))
|
||||
{
|
||||
gameData.FinishedFlags |= TutorialFlag.ShopCustomize;
|
||||
GameDataManager.SaveGameData();
|
||||
ShopCustomizeTutorialDialog.ShowDialog();
|
||||
}
|
||||
customizeView.SetLevel(gameData.ShopCustomizeLevel);
|
||||
customizeView.OnCloseObservable.Subscribe(_ =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using I2.Loc;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace MyGame.Scenes.marketing.Scripts
|
||||
{
|
||||
public class ShopCustomizeTutorialDialog : MonoBehaviour
|
||||
{
|
||||
private static readonly string CallbackTag = "ShopCustomizeTutorialDialogCallback";
|
||||
private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger");
|
||||
private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger");
|
||||
|
||||
[SerializeField] private Animator backgroundAnimator;
|
||||
[SerializeField] private Button closeButton;
|
||||
|
||||
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.CustomizeExplanation);
|
||||
});
|
||||
}).AddTo(this);
|
||||
}
|
||||
|
||||
public static void ShowDialog(Action onClose = null){
|
||||
LocalCacheManager.Save(CallbackTag, onClose);
|
||||
TransitionManager.Instance.LoadSceneAdditive(GameScenes.CustomizeExplanation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2c9f1da19b6645aba2dd31af17ba8e48
|
||||
timeCreated: 1652753561
|
||||
|
|
@ -48,6 +48,7 @@ public enum GameScenes
|
|||
CustomizationPurchase,
|
||||
CustomizationDetails,
|
||||
Customize,
|
||||
CustomizeExplanation,
|
||||
}
|
||||
|
||||
public enum SceneType
|
||||
|
|
|
|||
|
|
@ -131,4 +131,7 @@ EditorBuildSettings:
|
|||
- enabled: 1
|
||||
path: Assets/MyGame/Scenes/marketing/Customize.unity
|
||||
guid: 2f8b60ae067f8414da2feece40afcc8c
|
||||
- enabled: 1
|
||||
path: Assets/MyGame/Scenes/marketing/CustomizeExplanation.unity
|
||||
guid: dd7c837547bf89f489bc36b6a2ebbca4
|
||||
m_configObjects: {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue