结局界面

This commit is contained in:
yangjing 2022-02-10 12:26:52 +08:00
parent cddac0a9e1
commit 9658ceeeb0
19 changed files with 745 additions and 3721 deletions

File diff suppressed because it is too large Load Diff

View File

@ -582,250 +582,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &1203140506473995672
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 981190536}
m_Modifications:
- target: {fileID: 539047986927620544, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Name
value: PanelEndings
objectReference: {fileID: 0}
- target: {fileID: 539047986927620544, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1203140507750364827, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1203140507750364827, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1203140507750364827, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 1203140507750364827, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -350
objectReference: {fileID: 0}
- target: {fileID: 3349172543246073073, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3349172543246073073, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3349172543246073073, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 3349172543246073073, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -530
objectReference: {fileID: 0}
- target: {fileID: 3615627925362506792, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3615627925362506792, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3615627925362506792, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 3615627925362506792, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -470
objectReference: {fileID: 0}
- target: {fileID: 6648755888490672841, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6648755888490672841, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6648755888490672841, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 6648755888490672841, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -410
objectReference: {fileID: 0}
- target: {fileID: 8810702551704374714, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8810702551704374714, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8810702551704374714, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 8810702551704374714, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -650
objectReference: {fileID: 0}
- target: {fileID: 9067327633351047075, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9067327633351047075, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9067327633351047075, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 225
objectReference: {fileID: 0}
- target: {fileID: 9067327633351047075, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -590
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 25cbbba289b6a49d6916bc6215534770, type: 3}
--- !u!1001 &1549853548646788175
PrefabInstance:
m_ObjectHideFlags: 0
@ -1019,7 +775,7 @@ PrefabInstance:
RectTransform:
m_CorrespondingSourceObject: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
m_PrefabInstance: {fileID: 1203140506473995672}
m_PrefabInstance: {fileID: 9139824453546146422}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1969282075732289138
PrefabInstance:
@ -1145,6 +901,55 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6ebd5f76171ee4e0b8d96b2eae97c251, type: 3}
--- !u!1 &4612204363566831793 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5815201018659226921, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
m_PrefabInstance: {fileID: 9139824453546146422}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4612204363566831794
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4612204363566831793}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8359181633431606601}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!224 &4946020809530057780 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6887168216434345711, guid: 841ca4be8d96342da81473d244f04f57,
@ -1356,6 +1161,18 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 1969282075732289138}
m_PrefabAsset: {fileID: 0}
--- !u!114 &8359181633431606601 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7256335300793534673, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
m_PrefabInstance: {fileID: 9139824453546146422}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4612204363566831793}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &9049642900195122466
PrefabInstance:
m_ObjectHideFlags: 0
@ -1480,3 +1297,137 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8385fb91fee3f4c06b62f2d911f48b3b, type: 3}
--- !u!1001 &9139824453546146422
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 981190536}
m_Modifications:
- target: {fileID: 539047986927620544, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Name
value: PanelEndings
objectReference: {fileID: 0}
- target: {fileID: 539047986927620544, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 539047986927620545, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5815201018659226921, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: m_Name
value: Btn_Mask
objectReference: {fileID: 0}
- target: {fileID: 7574580997828261420, guid: 25cbbba289b6a49d6916bc6215534770,
type: 3}
propertyPath: mBtnMask
value:
objectReference: {fileID: 4612204363566831794}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 25cbbba289b6a49d6916bc6215534770, type: 3}

View File

@ -36,6 +36,7 @@ public class PlayerData : StorageBase<PlayerData>
}
[SerializeField] private Dictionary<int, List<int>> mEndingDic = new Dictionary<int, List<int>>();
[SerializeField] private Dictionary<int, List<int>> mEndingAdTipDic = new Dictionary<int, List<int>>();
public void UnlockNewLevel()
{
@ -74,8 +75,25 @@ public class PlayerData : StorageBase<PlayerData>
public bool HasUnlockedEnding(int pLevelID, int pEndingID)
{
bool tUnlocked = mEndingDic.ContainsKey(pLevelID) && mEndingDic[pLevelID].Contains(pEndingID);
return mEndingDic.ContainsKey(pLevelID) && mEndingDic[pLevelID].Contains(pEndingID);
}
return tUnlocked;
public void AddEndingAdTip(int pLevelID, int pEndingID)
{
if (!mEndingAdTipDic.ContainsKey(pLevelID))
{
mEndingAdTipDic[pLevelID] = new List<int>();
}
if (!mEndingAdTipDic[pLevelID].Contains(pEndingID))
{
mEndingAdTipDic[pLevelID].Add(pEndingID);
Save();
}
}
public bool HasWatchedEndingAdTip(int pLevelID, int pEndingID)
{
return mEndingAdTipDic.ContainsKey(pLevelID) && mEndingAdTipDic[pLevelID].Contains(pEndingID);
}
}

View File

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SettingData : StorageBase<SettingData>
{
public bool IsMusicOn
{
get
{
return mIsMusicOn;
}
set
{
mIsMusicOn = value;
Save();
}
}
[SerializeField] private bool mIsMusicOn;
public bool IsSoundOn
{
get
{
return mIsSoundOn;
}
set
{
mIsSoundOn = value;
Save();
}
}
[SerializeField] private bool mIsSoundOn;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2288f98da12dc434aae7a0d68be88901
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,52 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class EndingCell : MonoBehaviour
{
[SerializeField] Text mTxtEndingName;
[SerializeField] GameObject mGobCheck;
[SerializeField] GameObject mGobGood;
[SerializeField] Button mBtnTip;
[SerializeField] Button mBtnAdTip;
private int mLevelID;
private int mEndingID;
private EndingData mEdData;
private void Awake()
{
UIUtils.BindBtn(mBtnTip, OnClickTip);
UIUtils.BindBtn(mBtnAdTip, OnClickAdTip);
}
public void Init(int pLevelID, int pEndingID)
{
mLevelID = pLevelID;
mEndingID = pEndingID;
mEdData = GameConfig.Instance.GetLevelData(mLevelID).Endings[pEndingID];
mTxtEndingName.text = mEdData.EndingName;
mGobCheck.SetActive(PlayerData.Instance.HasUnlockedEnding(mLevelID, mEndingID));
mGobGood.SetActive(mEdData.IsGoodEnding);
bool tHasWatchedAdTip = PlayerData.Instance.HasWatchedEndingAdTip(mLevelID, mEndingID);
mBtnTip.gameObject.SetActive(tHasWatchedAdTip);
mBtnAdTip.gameObject.SetActive(!tHasWatchedAdTip);
}
private void OnClickTip()
{
}
private void OnClickAdTip()
{
PlayerData.Instance.AddEndingAdTip(mLevelID, mEndingID);
mBtnTip.gameObject.SetActive(true);
mBtnAdTip.gameObject.SetActive(false);
OnClickTip();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 25e35fcda8fba42f4bd05484c0f41f8b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelCell : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e589fd1db4863417d81be566c2027e60
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PanelEndings : BasePanel
{
[SerializeField] Button mBtnMask;
[SerializeField] RectTransform mRctBg;
[SerializeField] GameObject mGobComplete;
[SerializeField] Transform mCtnEndings;
[SerializeField] GameObject mTplEndingCell;
private int mLevelID;
private LevelData mLvData;
private List<EndingCell> mEndingList = new List<EndingCell>();
private List<EndingCell> mAvailableCells = new List<EndingCell>();
private void Awake()
{
UIUtils.BindBtn(mBtnMask, OnClickMask);
}
public void Init(int pLevelID)
{
mLevelID = pLevelID;
mLvData = GameConfig.Instance.GetLevelData(pLevelID);
mRctBg.sizeDelta = new Vector2(mRctBg.sizeDelta.x, 150 + mLvData.Endings.Count * 60);
mGobComplete.SetActive(PlayerData.Instance.EndingCountOfLevel(mLevelID) == mLvData.Endings.Count);
RefreshEndingList();
}
private void RefreshEndingList()
{
ClearCells();
for (int i = 0; i < mLvData.Endings.Count; i++)
{
EndingCell tCell = GetNewCell();
mEndingList.Add(tCell);
tCell.Init(mLevelID, i);
}
}
private EndingCell GetNewCell()
{
EndingCell tCell = null;
if (mAvailableCells.Count <= mEndingList.Count)
{
tCell = Instantiate(mTplEndingCell, mCtnEndings).GetComponent<EndingCell>();
tCell.transform.localScale = Vector3.one;
mAvailableCells.Add(tCell);
}
tCell = mAvailableCells[mEndingList.Count];
tCell.gameObject.SetActive(true);
return tCell;
}
private void ClearCells()
{
mEndingList.Clear();
for (int i = 0; i < mAvailableCells.Count; i++)
{
mAvailableCells[i].gameObject.SetActive(false);
}
}
private void OnClickMask()
{
Close();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 741067eec3eb640ab9247b4afaa129c1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -99,7 +99,8 @@ public class PanelGame : BasePanel
private void OnClickEndings()
{
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
}
private void OnClickPlay()

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PanelLevel : BasePanel
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2e9cc35539f7641c388c46189f4a1e96
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PanelMain : BasePanel
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 223c879ea2e184cdeb13aba4a76624b0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -70,6 +70,7 @@ public class PanelResult : BasePanel
private void OnClickEndings()
{
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
}
}

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PanelSettings : BasePanel
{
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 991cbe78974e044eaa5c72df761e2864
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: