diff --git a/Assets/Art/Level/3/animation/3.controller b/Assets/Art/Level/3/animation/3.controller index e8fcadf3..742cd0cd 100644 --- a/Assets/Art/Level/3/animation/3.controller +++ b/Assets/Art/Level/3/animation/3.controller @@ -82,7 +82,7 @@ AnimatorStateMachine: m_Position: {x: -20, y: 420, z: 0} - serializedVersion: 1 m_State: {fileID: 3836889060777042707} - m_Position: {x: 0, y: 590, z: 0} + m_Position: {x: 140, y: 520, z: 0} - serializedVersion: 1 m_State: {fileID: -6102885615661990480} m_Position: {x: -30, y: 570, z: 0} @@ -191,8 +191,7 @@ AnimatorState: m_Name: 2_2_2 m_Speed: 1 m_CycleOffset: 0 - m_Transitions: - - {fileID: 1485549772310524228} + m_Transitions: [] m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -374,8 +373,7 @@ AnimatorState: m_Name: 0 m_Speed: 1 m_CycleOffset: 0 - m_Transitions: - - {fileID: 869676249508705306} + m_Transitions: [] m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -569,50 +567,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1101 &869676249508705306 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: [] - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 7665055686205544356} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &1485549772310524228 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: [] - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 3836889060777042707} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 1 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &3369929957660876854 AnimatorState: serializedVersion: 6 diff --git a/Assets/Scripts/Game/GameLogic.cs b/Assets/Scripts/Game/GameLogic.cs index ba200fbd..df643941 100644 --- a/Assets/Scripts/Game/GameLogic.cs +++ b/Assets/Scripts/Game/GameLogic.cs @@ -64,6 +64,7 @@ public class GameLogic : MonoBehaviour if (tEndingID >= 0) { PlayerData.Instance.AddEnding(PlayerData.Instance.CurrentLevelID, tEndingID); + PlayerData.Instance.UnlockNewLevel(); EndingData tEdData = tLvData.Endings[tEndingID]; tUIResult.Init(PlayerData.Instance.CurrentLevelID, tEdData.EndingName, tEdData.IsGoodEnding, false); diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index f3146442..c25e0c0a 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -14,4 +14,10 @@ public class GameManager : D_MonoSingleton { SceneManager.LoadScene("Game"); } + + public void NextLevel() + { + PlayerData.Instance.CurrentLevel++; + LoadGame(); + } } \ No newline at end of file diff --git a/Assets/Scripts/Storage/PlayerData.cs b/Assets/Scripts/Storage/PlayerData.cs index 52bb4ff0..f3d2baaf 100644 --- a/Assets/Scripts/Storage/PlayerData.cs +++ b/Assets/Scripts/Storage/PlayerData.cs @@ -18,6 +18,15 @@ public class PlayerData : StorageBase } [SerializeField]private int mCurrentLevel = 1; + public int UnlockedLevel + { + get + { + return mUnlockedLevel; + } + } + [SerializeField] private int mUnlockedLevel = 1; + public int CurrentLevelID { get @@ -28,6 +37,14 @@ public class PlayerData : StorageBase [SerializeField] private Dictionary> mEndingDic = new Dictionary>(); + public void UnlockNewLevel() + { + if (mUnlockedLevel < GameConfig.Instance.LevelSort.Count) + { + mUnlockedLevel++; + } + } + public bool AddEnding(int pLevelID, int pEndingID) { if (!mEndingDic.ContainsKey(pLevelID)) diff --git a/Assets/Scripts/UI/PanelGame.cs b/Assets/Scripts/UI/PanelGame.cs index 987b78dd..d66a10f2 100644 --- a/Assets/Scripts/UI/PanelGame.cs +++ b/Assets/Scripts/UI/PanelGame.cs @@ -106,6 +106,10 @@ public class PanelGame : BasePanel { mGobPlay.SetActive(false); mGobOpMask.SetActive(true); + for (int i = 0; i < mBtnSlots.Length; i++) + { + mBtnSlots[i].ShowCurrent(false); + } mAni.ReadyPlay(0.5f); TimerManager.Instance.Schedule(Action, 0.5f); diff --git a/Assets/Scripts/UI/PanelResult.cs b/Assets/Scripts/UI/PanelResult.cs index 8bfd5965..e7b82082 100644 --- a/Assets/Scripts/UI/PanelResult.cs +++ b/Assets/Scripts/UI/PanelResult.cs @@ -60,7 +60,7 @@ public class PanelResult : BasePanel private void OnClickNext() { - GameManager.Instance.LoadGame(); + GameManager.Instance.NextLevel(); } private void OnClickChoose()