任务系统一半多,商城筛选功能,一些细节和免费包
This commit is contained in:
@@ -2485,9 +2485,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 9209391586188457348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 3.5}
|
||||
m_SizeDelta: {x: 84, y: 107}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4953888595604622927
|
||||
@@ -2562,9 +2562,9 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -45.5}
|
||||
m_AnchoredPosition: {x: 118.5, y: -117.50053}
|
||||
m_SizeDelta: {x: 237, y: 144}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &11903364479572129
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3028,8 +3028,8 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: -6726115822594207860, guid: 4ff010a6a12e2c1459b8693607095e21, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
@@ -3115,11 +3115,11 @@ RectTransform:
|
||||
- {fileID: 3689223780715248708}
|
||||
m_Father: {fileID: 8079540942653106974}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 6.0999985, y: -11.7}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 3.4}
|
||||
m_SizeDelta: {x: 237, y: 86}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9066257676768141630
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3421,8 +3421,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -5.339966, y: 0.000019073486}
|
||||
m_SizeDelta: {x: 16.775, y: 25.1625}
|
||||
m_AnchoredPosition: {x: 1.02, y: 0.000019073486}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5184938500494465621
|
||||
CanvasRenderer:
|
||||
@@ -3445,14 +3445,14 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.24705882, g: 0.2901961, b: 0.3372549, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -7770052838922911145, guid: cfb305efbe7c8c4408085867d5209768, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 81c13879952e72d408a0cfa362ebfd02, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -4034,8 +4034,8 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: -6726115822594207860, guid: 4ff010a6a12e2c1459b8693607095e21, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
@@ -4334,7 +4334,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4386699895607034587
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4432,7 +4432,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 451, y: -52}
|
||||
m_AnchoredPosition: {x: 451, y: -43}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &786756074167547563
|
||||
@@ -4455,7 +4455,7 @@ MonoBehaviour:
|
||||
m_ChildAlignment: 0
|
||||
m_StartCorner: 0
|
||||
m_StartAxis: 0
|
||||
m_CellSize: {x: 188, y: 36.7}
|
||||
m_CellSize: {x: 50, y: 50}
|
||||
m_Spacing: {x: 20, y: 18}
|
||||
m_Constraint: 1
|
||||
m_ConstraintCount: 3
|
||||
@@ -4493,7 +4493,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 6.100006, y: -9.2}
|
||||
m_AnchoredPosition: {x: 15.5, y: -16.5}
|
||||
m_SizeDelta: {x: 19, y: 17}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &8302545596642335859
|
||||
@@ -4825,6 +4825,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
player_SO: {fileID: 11400000, guid: a59c019c71199384eaac0703299047c8, type: 2}
|
||||
playerCoins_legacy: {fileID: 7376147910533281946}
|
||||
putPrefabsHere: {fileID: 6773918330215714056}
|
||||
settings_launch: {fileID: 865676738076373517}
|
||||
userInfo_launch: {fileID: 1502937460034745443}
|
||||
@@ -4861,7 +4862,7 @@ MonoBehaviour:
|
||||
uiSceneName: UI_UI
|
||||
musicPicFadeTime: 0.25
|
||||
showLevel_prefab: {fileID: 775714823646948286, guid: 4c26aec0fc471c24d94487eff6821e14, type: 3}
|
||||
store_prefab: {fileID: 0}
|
||||
store_prefab: {fileID: 3878406062860244594, guid: d94caf56bd6dff64fa606eeeb6e06fa9, type: 3}
|
||||
settings_prefab: {fileID: 4801108313180107556, guid: 8db6dd820b152984980f7fd2124138c3, type: 3}
|
||||
userInfo_prefab: {fileID: 0}
|
||||
email_prefab: {fileID: 3756075665884320709, guid: 41f4ea31b64f18d48aeef21b79930a6c, type: 3}
|
||||
@@ -4996,81 +4997,6 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5252340762442355171
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1406487017777146792}
|
||||
- component: {fileID: 5423049842164886235}
|
||||
- component: {fileID: 7245051247299556331}
|
||||
m_Layer: 5
|
||||
m_Name: Image (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1406487017777146792
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5252340762442355171}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1858607040280804733}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000049591064}
|
||||
m_SizeDelta: {x: 12.5919, y: 14.2488}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5423049842164886235
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5252340762442355171}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7245051247299556331
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5252340762442355171}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.24705882, g: 0.2901961, b: 0.3372549, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 8147908939353441651, guid: cfb305efbe7c8c4408085867d5209768, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5343413001911633717
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5722,7 +5648,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &9209391586188457348
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5839,8 +5765,8 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: -6726115822594207860, guid: 4ff010a6a12e2c1459b8693607095e21, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
@@ -6462,9 +6388,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 9209391586188457348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20.100006, y: 3.5}
|
||||
m_SizeDelta: {x: 82, y: 107}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &3945772172327520090
|
||||
@@ -6522,7 +6448,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &7514224236584078014
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7280,7 +7206,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5311400505464405760}
|
||||
- {fileID: 1406487017777146792}
|
||||
m_Father: {fileID: 1216734273723155318}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
@@ -7678,9 +7603,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 9209391586188457348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 10.050003, y: 3.5}
|
||||
m_SizeDelta: {x: 84, y: 107}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &3586857079069254382
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -12,6 +12,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
{
|
||||
[Header("player unique so")]
|
||||
public Player_SO player_SO;
|
||||
public Text playerCoins_legacy;
|
||||
[Header("put prefabs here")]
|
||||
public GameObject putPrefabsHere;
|
||||
[Header("son buttons")]
|
||||
@@ -97,6 +98,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
// cached reference to the settings instance to ensure only one exists
|
||||
private GameObject settingsInstance;
|
||||
private GameObject storeInstance;
|
||||
private GameObject showLevelInstance;
|
||||
private GameObject emailInstance;
|
||||
private GameObject noticeInstance;
|
||||
@@ -119,6 +121,10 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
void Start()
|
||||
{
|
||||
PlayerEconomyLedger.EnsureInstance().AttachPlayerData(player_SO);
|
||||
PlayerEconomyLedger.EnsureInstance().OnCoinsChanged += HandleCoinsChanged;
|
||||
UpdatePlayerCoinsLegacyText(PlayerEconomyLedger.EnsureInstance().GetCoins());
|
||||
|
||||
if (button_Music == null)
|
||||
{
|
||||
var btn = transform.Find("Button_Music") as RectTransform;
|
||||
@@ -132,15 +138,14 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
}
|
||||
instantiateSettings = () => ToggleSettingsPrefab();
|
||||
instantiateUserInfo = () => { gNotice.recommendation.display("功能即将上线,敬请期待"); };
|
||||
instantiateStore = () => InstantiatePrefab(store_prefab);
|
||||
instantiateStore = () => ShowStorePrefab();
|
||||
instantiateShowLevel = () => { gNotice.error.display("功能即将下线,禁止访问"); };
|
||||
// instantiateShowLevel = () => ShowLevelPrefab();
|
||||
instantiateEmail = () => { gNotice.warning.display("此版本该功能暂不可用"); };
|
||||
// instantiateEmail = () => ShowEmailPrefab();
|
||||
instantiateNotice = () => { gNotice.warning.display("此版本该功能暂不可用"); };
|
||||
instantiateEmail = () => ShowEmailPrefab();
|
||||
instantiateNotice = () => { gNotice.warning.display("姝ょ増鏈鍔熻兘鏆備笉鍙敤"); };
|
||||
// instantiateNotice = () => ShowNoticePrefab();
|
||||
navGuideAction = () => ToggleGuideDisplay();
|
||||
instantiateMarket = () => { gNotice.alarm.display("商店未开放"); };
|
||||
instantiateMarket = () => ShowStorePrefab();
|
||||
|
||||
if (settings_launch != null)
|
||||
settings_launch.onClick.AddListener(instantiateSettings);
|
||||
@@ -412,6 +417,22 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
home_navButton.onClick.RemoveListener(navHomeAction);
|
||||
if (settings_navButton != null && navSettingsAction != null)
|
||||
settings_navButton.onClick.RemoveListener(navSettingsAction);
|
||||
|
||||
if (PlayerEconomyLedger.Instance != null)
|
||||
PlayerEconomyLedger.Instance.OnCoinsChanged -= HandleCoinsChanged;
|
||||
}
|
||||
|
||||
private void HandleCoinsChanged(int coinAmount)
|
||||
{
|
||||
UpdatePlayerCoinsLegacyText(coinAmount);
|
||||
}
|
||||
|
||||
private void UpdatePlayerCoinsLegacyText(int coinAmount)
|
||||
{
|
||||
if (playerCoins_legacy != null)
|
||||
{
|
||||
playerCoins_legacy.text = coinAmount.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleGuideDisplay()
|
||||
@@ -595,6 +616,12 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
CloseInfoPanels(showLevelInstance);
|
||||
}
|
||||
|
||||
private void ShowStorePrefab()
|
||||
{
|
||||
ShowPrefab(store_prefab, ref storeInstance);
|
||||
CloseInfoPanels(storeInstance);
|
||||
}
|
||||
|
||||
private void ShowEmailPrefab()
|
||||
{
|
||||
ShowPrefab(email_prefab, ref emailInstance);
|
||||
@@ -631,6 +658,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
private void CloseInfoPanels(GameObject keep)
|
||||
{
|
||||
CloseInstance(ref storeInstance, keep);
|
||||
CloseInstance(ref showLevelInstance, keep);
|
||||
CloseInstance(ref emailInstance, keep);
|
||||
CloseInstance(ref noticeInstance, keep);
|
||||
@@ -950,3 +978,4 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user