修改
This commit is contained in:
parent
1a47dff2cf
commit
a8e51b832b
@ -11,91 +11,91 @@ SpriteAtlasAsset:
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_ImporterData:
|
||||
packables:
|
||||
- {fileID: 21300000, guid: f9a0616831825894485c16a2ac08a7e0, type: 3}
|
||||
- {fileID: 21300000, guid: fa9c1f5a0bd828a49974be032fb75f53, type: 3}
|
||||
- {fileID: 21300000, guid: 7f19a8cd463a4704194fa0155f1a2dfe, type: 3}
|
||||
- {fileID: 21300000, guid: 18be04495a5b32d44a5e023b96256fdf, type: 3}
|
||||
- {fileID: 21300000, guid: 27b1070c36bd9e84f8dbceff02004fec, type: 3}
|
||||
- {fileID: 21300000, guid: 5e7003925033853438585b937fc3f6ff, type: 3}
|
||||
- {fileID: 21300000, guid: 5ff8d85e750d8544dbd09bfd87a6d547, type: 3}
|
||||
- {fileID: 21300000, guid: 175eb033ed0c4b84d98f531b29175fec, type: 3}
|
||||
- {fileID: 21300000, guid: 607631c933ffd2f47a2378b79f76e5bb, type: 3}
|
||||
- {fileID: 21300000, guid: 913e9044f6df7f646bcda3e74b4acac3, type: 3}
|
||||
- {fileID: 21300000, guid: cba07afea1014e34182660aebf39abdf, type: 3}
|
||||
- {fileID: 21300000, guid: f832746edeeecf141a7d907c2381e9e0, type: 3}
|
||||
- {fileID: 21300000, guid: d4e414f0197fdb14f9f1c5cc1c1f22ab, type: 3}
|
||||
- {fileID: 21300000, guid: e56040b5c4abc1046851d912f4004f2b, type: 3}
|
||||
- {fileID: 21300000, guid: a2ff094edec89cf499ce95b80e93359a, type: 3}
|
||||
- {fileID: 21300000, guid: ee39da6dc1ff1104e8dfb17bb32204b4, type: 3}
|
||||
- {fileID: 21300000, guid: 207de470efbbbd14a959ac3b2b4af1d9, type: 3}
|
||||
- {fileID: 21300000, guid: 726767a62ca4f69479f67bb224ad8d68, type: 3}
|
||||
- {fileID: 21300000, guid: c69f306c0e64ed548a06af8c9f49c519, type: 3}
|
||||
- {fileID: 21300000, guid: 6809f2449ef6774469571faf4a335e45, type: 3}
|
||||
- {fileID: 21300000, guid: 954a5c14b2c505f43beb4f2393a5d965, type: 3}
|
||||
- {fileID: 21300000, guid: 4c1f6761c3255fb46a6d467ccde4f746, type: 3}
|
||||
- {fileID: 21300000, guid: 497802daf8a87374da0b112ce0dc8275, type: 3}
|
||||
- {fileID: 21300000, guid: 8ab818cb19c9a694782c71cfd19c828b, type: 3}
|
||||
- {fileID: 21300000, guid: 8f32e590b1396324fb932e4625e05c85, type: 3}
|
||||
- {fileID: 21300000, guid: 68dc6183919b51f4ca0905240924f248, type: 3}
|
||||
- {fileID: 21300000, guid: a828b047d5f21b04cbdd08d8285abd2a, type: 3}
|
||||
- {fileID: 21300000, guid: bf0a16a0d8eff9c40aea344b528e24fa, type: 3}
|
||||
- {fileID: 21300000, guid: cc62386d42a5b8143934e45e2dd2d42f, type: 3}
|
||||
- {fileID: 21300000, guid: 1ea3699016ca47249bdfcf34ab236815, type: 3}
|
||||
- {fileID: 21300000, guid: 2bc24c7b22b5a4d4290eaa702a6b0ad7, type: 3}
|
||||
- {fileID: 21300000, guid: de1d8b3092af98c4e9792756a4d2f049, type: 3}
|
||||
- {fileID: 21300000, guid: 02363c215137bdb42aa5ecbe4e6d8d8c, type: 3}
|
||||
- {fileID: 21300000, guid: e7c198240c1bad340b7772546cacf421, type: 3}
|
||||
- {fileID: 21300000, guid: 348ca331739e02c4d996bd2834298dd6, type: 3}
|
||||
- {fileID: 21300000, guid: 409947b7a8172574f8894b7f218478b6, type: 3}
|
||||
- {fileID: 21300000, guid: 0ed14168c05069841b14ddd6decdb900, type: 3}
|
||||
- {fileID: 21300000, guid: 0c1dc1f99c7844749b11caa8b39d8b4e, type: 3}
|
||||
- {fileID: 21300000, guid: 6afcbee2bc0808f428fe3397d6dc42fa, type: 3}
|
||||
- {fileID: 21300000, guid: 87fab78b737a92346bc1fc963a5db45d, type: 3}
|
||||
- {fileID: 21300000, guid: 7972fefc93fd66444827e42cc96634c6, type: 3}
|
||||
- {fileID: 21300000, guid: 6d0b106c0ebb73b408da135fe36d1401, type: 3}
|
||||
- {fileID: 21300000, guid: 1f5d608380f3df54ca5cacc7d5c35d34, type: 3}
|
||||
- {fileID: 21300000, guid: 1615ba88e238016459b3b9261f4a23be, type: 3}
|
||||
- {fileID: 21300000, guid: 43d8f9b4b4fd2354ab1b1a37ec2a0835, type: 3}
|
||||
- {fileID: 21300000, guid: b0795a45b06c4814a92ad8fa72327321, type: 3}
|
||||
- {fileID: 21300000, guid: 118bd4b892826964493c8be5a905a766, type: 3}
|
||||
- {fileID: 21300000, guid: b7a1cbfec9985a746bc3cfb081e780d2, type: 3}
|
||||
- {fileID: 21300000, guid: f572b08953884cc4c9f3f1b122f2b980, type: 3}
|
||||
- {fileID: 21300000, guid: 8235eefc38f3caf49aef5540033cbefc, type: 3}
|
||||
- {fileID: 21300000, guid: be721820470290342aa5d36cdab0385c, type: 3}
|
||||
- {fileID: 21300000, guid: c1d729a7db669024cbab022aa80edf21, type: 3}
|
||||
- {fileID: 21300000, guid: 129202cda1248f24b8abe918c9c72f06, type: 3}
|
||||
- {fileID: 21300000, guid: 8a8e7b277beaaaf45973aba3d5db041e, type: 3}
|
||||
- {fileID: 21300000, guid: 1fb9ba7be3bd78d4d8f92defbaf20658, type: 3}
|
||||
- {fileID: 21300000, guid: b30ad2e932f7f3d408b8c1815e2ab2bd, type: 3}
|
||||
- {fileID: 21300000, guid: f1f4bd8bbce68cc4f9cdaf5019440d51, type: 3}
|
||||
- {fileID: 21300000, guid: dead25ee2e0535748be6f42c97c50afc, type: 3}
|
||||
- {fileID: 21300000, guid: d3d86a4b3f94ba94aa9ee76bbcab6453, type: 3}
|
||||
- {fileID: 21300000, guid: fd494f650c0d03b47b69996d7364eb75, type: 3}
|
||||
- {fileID: 21300000, guid: 144abc3890e516748aa52331705bd3b5, type: 3}
|
||||
- {fileID: 21300000, guid: 0d87c0aa00237734da08f058ae9c8c14, type: 3}
|
||||
- {fileID: 21300000, guid: 78f378447785d1349b27225f96fdc505, type: 3}
|
||||
- {fileID: 21300000, guid: 7869740bf9c7e804aa4e48248c218348, type: 3}
|
||||
- {fileID: 21300000, guid: c86dc12695fb566468d62e3729ee9ef2, type: 3}
|
||||
- {fileID: 21300000, guid: 84f20a357f00204409e1f70710267f28, type: 3}
|
||||
- {fileID: 21300000, guid: baddbc879a995fb47ac2220003dd9e91, type: 3}
|
||||
- {fileID: 21300000, guid: 9d54f507682aaf248a51d3149bdea388, type: 3}
|
||||
- {fileID: 21300000, guid: ac368b136f165584f92a1086db53dc27, type: 3}
|
||||
- {fileID: 21300000, guid: 71923c055d598bb42b9c6476ba88c34e, type: 3}
|
||||
- {fileID: 21300000, guid: b861989be892249489863e86567d03a2, type: 3}
|
||||
- {fileID: 21300000, guid: 7e2e22e7ab6afd04fa90f6ad4630cb32, type: 3}
|
||||
- {fileID: 21300000, guid: dd3f4ec164d520741a42f1a55dd35ab1, type: 3}
|
||||
- {fileID: 21300000, guid: 4b27ab58cc02a8f468cf32e5f9a6f511, type: 3}
|
||||
- {fileID: 21300000, guid: 8cfeb7e0053f8c64894326e715e3ab17, type: 3}
|
||||
- {fileID: 21300000, guid: f613fab028d7cf8469ed37a4909c0947, type: 3}
|
||||
- {fileID: 21300000, guid: a1eea4a65a538784d895a6f92447e3bb, type: 3}
|
||||
- {fileID: 21300000, guid: cf319f80f8bdf904aa00ab53bd4c9040, type: 3}
|
||||
- {fileID: 21300000, guid: 7f93f7d8b5c83d040a890c22063d1fe1, type: 3}
|
||||
- {fileID: 21300000, guid: 948a0ae253c48d54c930188e3ab241e7, type: 3}
|
||||
- {fileID: 21300000, guid: ecbc50ead194f7a4fb95266b47c6bf79, type: 3}
|
||||
- {fileID: 21300000, guid: d2983e0e76a3d06489a7c3e089e1de22, type: 3}
|
||||
- {fileID: 21300000, guid: 161b54a2b92c1744db4d578ae5696ebb, type: 3}
|
||||
- {fileID: 21300000, guid: baaa99d5f81536e49b207e46fac3ce30, type: 3}
|
||||
- {fileID: 21300000, guid: f1f4bd8bbce68cc4f9cdaf5019440d51, type: 3}
|
||||
- {fileID: 21300000, guid: f613fab028d7cf8469ed37a4909c0947, type: 3}
|
||||
- {fileID: 21300000, guid: dead25ee2e0535748be6f42c97c50afc, type: 3}
|
||||
- {fileID: 21300000, guid: 1615ba88e238016459b3b9261f4a23be, type: 3}
|
||||
- {fileID: 21300000, guid: cc62386d42a5b8143934e45e2dd2d42f, type: 3}
|
||||
- {fileID: 21300000, guid: b7a1cbfec9985a746bc3cfb081e780d2, type: 3}
|
||||
- {fileID: 21300000, guid: baddbc879a995fb47ac2220003dd9e91, type: 3}
|
||||
- {fileID: 21300000, guid: 7bf05f80deecf2f43914ec6bb8749439, type: 3}
|
||||
- {fileID: 21300000, guid: 409947b7a8172574f8894b7f218478b6, type: 3}
|
||||
- {fileID: 21300000, guid: baaa99d5f81536e49b207e46fac3ce30, type: 3}
|
||||
- {fileID: 21300000, guid: 207de470efbbbd14a959ac3b2b4af1d9, type: 3}
|
||||
- {fileID: 21300000, guid: c1d729a7db669024cbab022aa80edf21, type: 3}
|
||||
- {fileID: 21300000, guid: ee39da6dc1ff1104e8dfb17bb32204b4, type: 3}
|
||||
- {fileID: 21300000, guid: d4e414f0197fdb14f9f1c5cc1c1f22ab, type: 3}
|
||||
- {fileID: 21300000, guid: 4c1f6761c3255fb46a6d467ccde4f746, type: 3}
|
||||
- {fileID: 21300000, guid: 5e7003925033853438585b937fc3f6ff, type: 3}
|
||||
- {fileID: 21300000, guid: f9a0616831825894485c16a2ac08a7e0, type: 3}
|
||||
- {fileID: 21300000, guid: 1ea3699016ca47249bdfcf34ab236815, type: 3}
|
||||
- {fileID: 21300000, guid: ac368b136f165584f92a1086db53dc27, type: 3}
|
||||
- {fileID: 21300000, guid: 1f5d608380f3df54ca5cacc7d5c35d34, type: 3}
|
||||
- {fileID: 21300000, guid: 8a8e7b277beaaaf45973aba3d5db041e, type: 3}
|
||||
- {fileID: 21300000, guid: 913e9044f6df7f646bcda3e74b4acac3, type: 3}
|
||||
- {fileID: 21300000, guid: a1eea4a65a538784d895a6f92447e3bb, type: 3}
|
||||
- {fileID: 21300000, guid: a9a0f00a04da2784baa9dc0fea583357, type: 3}
|
||||
- {fileID: 21300000, guid: 118bd4b892826964493c8be5a905a766, type: 3}
|
||||
- {fileID: 21300000, guid: b0795a45b06c4814a92ad8fa72327321, type: 3}
|
||||
- {fileID: 21300000, guid: 607631c933ffd2f47a2378b79f76e5bb, type: 3}
|
||||
- {fileID: 21300000, guid: f832746edeeecf141a7d907c2381e9e0, type: 3}
|
||||
- {fileID: 21300000, guid: cf319f80f8bdf904aa00ab53bd4c9040, type: 3}
|
||||
- {fileID: 21300000, guid: de1d8b3092af98c4e9792756a4d2f049, type: 3}
|
||||
- {fileID: 21300000, guid: fd494f650c0d03b47b69996d7364eb75, type: 3}
|
||||
- {fileID: 21300000, guid: cba07afea1014e34182660aebf39abdf, type: 3}
|
||||
- {fileID: 21300000, guid: 5ff8d85e750d8544dbd09bfd87a6d547, type: 3}
|
||||
- {fileID: 21300000, guid: 02363c215137bdb42aa5ecbe4e6d8d8c, type: 3}
|
||||
- {fileID: 21300000, guid: 348ca331739e02c4d996bd2834298dd6, type: 3}
|
||||
- {fileID: 21300000, guid: e7c198240c1bad340b7772546cacf421, type: 3}
|
||||
- {fileID: 21300000, guid: 8ab818cb19c9a694782c71cfd19c828b, type: 3}
|
||||
- {fileID: 21300000, guid: 7e2e22e7ab6afd04fa90f6ad4630cb32, type: 3}
|
||||
- {fileID: 21300000, guid: c69f306c0e64ed548a06af8c9f49c519, type: 3}
|
||||
- {fileID: 21300000, guid: bf0a16a0d8eff9c40aea344b528e24fa, type: 3}
|
||||
- {fileID: 21300000, guid: 6809f2449ef6774469571faf4a335e45, type: 3}
|
||||
- {fileID: 21300000, guid: 7f93f7d8b5c83d040a890c22063d1fe1, type: 3}
|
||||
- {fileID: 21300000, guid: 8f32e590b1396324fb932e4625e05c85, type: 3}
|
||||
- {fileID: 21300000, guid: 7f19a8cd463a4704194fa0155f1a2dfe, type: 3}
|
||||
- {fileID: 21300000, guid: 0d87c0aa00237734da08f058ae9c8c14, type: 3}
|
||||
- {fileID: 21300000, guid: 71923c055d598bb42b9c6476ba88c34e, type: 3}
|
||||
- {fileID: 21300000, guid: 9d54f507682aaf248a51d3149bdea388, type: 3}
|
||||
- {fileID: 21300000, guid: 8235eefc38f3caf49aef5540033cbefc, type: 3}
|
||||
- {fileID: 21300000, guid: b30ad2e932f7f3d408b8c1815e2ab2bd, type: 3}
|
||||
- {fileID: 21300000, guid: 78f378447785d1349b27225f96fdc505, type: 3}
|
||||
- {fileID: 21300000, guid: a828b047d5f21b04cbdd08d8285abd2a, type: 3}
|
||||
- {fileID: 21300000, guid: c86dc12695fb566468d62e3729ee9ef2, type: 3}
|
||||
- {fileID: 21300000, guid: 129202cda1248f24b8abe918c9c72f06, type: 3}
|
||||
- {fileID: 21300000, guid: 948a0ae253c48d54c930188e3ab241e7, type: 3}
|
||||
- {fileID: 21300000, guid: 2bc24c7b22b5a4d4290eaa702a6b0ad7, type: 3}
|
||||
- {fileID: 21300000, guid: 161b54a2b92c1744db4d578ae5696ebb, type: 3}
|
||||
- {fileID: 21300000, guid: e56040b5c4abc1046851d912f4004f2b, type: 3}
|
||||
- {fileID: 21300000, guid: be721820470290342aa5d36cdab0385c, type: 3}
|
||||
- {fileID: 21300000, guid: 68dc6183919b51f4ca0905240924f248, type: 3}
|
||||
- {fileID: 21300000, guid: 0c1dc1f99c7844749b11caa8b39d8b4e, type: 3}
|
||||
- {fileID: 21300000, guid: fa9c1f5a0bd828a49974be032fb75f53, type: 3}
|
||||
- {fileID: 21300000, guid: b861989be892249489863e86567d03a2, type: 3}
|
||||
- {fileID: 21300000, guid: 497802daf8a87374da0b112ce0dc8275, type: 3}
|
||||
- {fileID: 21300000, guid: f572b08953884cc4c9f3f1b122f2b980, type: 3}
|
||||
- {fileID: 21300000, guid: 18be04495a5b32d44a5e023b96256fdf, type: 3}
|
||||
- {fileID: 21300000, guid: 87fab78b737a92346bc1fc963a5db45d, type: 3}
|
||||
- {fileID: 21300000, guid: 175eb033ed0c4b84d98f531b29175fec, type: 3}
|
||||
- {fileID: 21300000, guid: 84f20a357f00204409e1f70710267f28, type: 3}
|
||||
- {fileID: 21300000, guid: 726767a62ca4f69479f67bb224ad8d68, type: 3}
|
||||
- {fileID: 21300000, guid: 8cfeb7e0053f8c64894326e715e3ab17, type: 3}
|
||||
- {fileID: 21300000, guid: 6afcbee2bc0808f428fe3397d6dc42fa, type: 3}
|
||||
- {fileID: 21300000, guid: 7972fefc93fd66444827e42cc96634c6, type: 3}
|
||||
- {fileID: 21300000, guid: 27b1070c36bd9e84f8dbceff02004fec, type: 3}
|
||||
- {fileID: 21300000, guid: d2983e0e76a3d06489a7c3e089e1de22, type: 3}
|
||||
- {fileID: 21300000, guid: d3d86a4b3f94ba94aa9ee76bbcab6453, type: 3}
|
||||
- {fileID: 21300000, guid: a2ff094edec89cf499ce95b80e93359a, type: 3}
|
||||
- {fileID: 21300000, guid: 954a5c14b2c505f43beb4f2393a5d965, type: 3}
|
||||
- {fileID: 21300000, guid: 0ed14168c05069841b14ddd6decdb900, type: 3}
|
||||
- {fileID: 21300000, guid: dd3f4ec164d520741a42f1a55dd35ab1, type: 3}
|
||||
- {fileID: 21300000, guid: 7869740bf9c7e804aa4e48248c218348, type: 3}
|
||||
- {fileID: 21300000, guid: 43d8f9b4b4fd2354ab1b1a37ec2a0835, type: 3}
|
||||
- {fileID: 21300000, guid: 1fb9ba7be3bd78d4d8f92defbaf20658, type: 3}
|
||||
- {fileID: 21300000, guid: 6d0b106c0ebb73b408da135fe36d1401, type: 3}
|
||||
m_IsVariant: 0
|
||||
m_ScriptablePacker: {fileID: 0}
|
||||
|
||||
@ -58,7 +58,7 @@ SpriteAtlasImporter:
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableRotation: 0
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 1
|
||||
secondaryTextureSettings: {}
|
||||
|
||||
@ -11,8 +11,8 @@ SpriteAtlasAsset:
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_ImporterData:
|
||||
packables:
|
||||
- {fileID: 21300000, guid: 0d6ea64d3c7f3034abff9bebe364db13, type: 3}
|
||||
- {fileID: 21300000, guid: f01b7a3fc0f4e824882239176818d72d, type: 3}
|
||||
- {fileID: 21300000, guid: 0d6ea64d3c7f3034abff9bebe364db13, type: 3}
|
||||
- {fileID: 21300000, guid: 252e7aae10cf6c64e84fe81966b3fc8b, type: 3}
|
||||
- {fileID: 21300000, guid: c7f54aa88f902f24182d8259d502555a, type: 3}
|
||||
m_IsVariant: 0
|
||||
|
||||
@ -58,7 +58,7 @@ SpriteAtlasImporter:
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableRotation: 0
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 1
|
||||
secondaryTextureSettings: {}
|
||||
|
||||
@ -58,7 +58,7 @@ SpriteAtlasImporter:
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableRotation: 0
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 1
|
||||
secondaryTextureSettings: {}
|
||||
|
||||
@ -58,7 +58,7 @@ SpriteAtlasImporter:
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableRotation: 0
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 1
|
||||
secondaryTextureSettings: {}
|
||||
|
||||
@ -240,6 +240,129 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &453805642
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 453805643}
|
||||
- component: {fileID: 453805646}
|
||||
- component: {fileID: 453805645}
|
||||
- component: {fileID: 453805644}
|
||||
m_Layer: 5
|
||||
m_Name: TestViewHolder (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &453805643
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 453805642}
|
||||
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: 2553447207363733383}
|
||||
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}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &453805644
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 453805642}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7e92b092d584bb39e5239463f064cbe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Interactable: 0
|
||||
m_Mode: 1
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TransitionData:
|
||||
targetGraphic: {fileID: 453805645}
|
||||
transition: 1
|
||||
colors:
|
||||
m_NormalColor: {r: 0.9847498, g: 1, b: 0, a: 1}
|
||||
m_HighlightedColor: {r: 0, g: 1, b: 0.12997723, a: 1}
|
||||
m_PressedColor: {r: 1, g: 0, b: 0, a: 1}
|
||||
m_SelectedColor: {r: 0.23380716, g: 0.033018887, b: 1, a: 1}
|
||||
m_DisabledColor: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 0.5}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
spriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
animationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_ChildTransitions: []
|
||||
m_UXGroup: {fileID: 0}
|
||||
hoverAudioClip: {fileID: 0}
|
||||
clickAudioClip: {fileID: 0}
|
||||
m_SelectionState: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &453805645
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 453805642}
|
||||
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: 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: 0}
|
||||
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!222 &453805646
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 453805642}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &961739749
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -434,7 +557,7 @@ PrefabInstance:
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 3110666966229274110, guid: 9368ff38b2090b2468f8358242026e4b, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1625966373}
|
||||
addedObject: {fileID: 2553447207363733383}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 9368ff38b2090b2468f8358242026e4b, type: 3}
|
||||
--- !u!224 &1496268632 stripped
|
||||
@ -442,116 +565,190 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 3110666966229274110, guid: 9368ff38b2090b2468f8358242026e4b, type: 3}
|
||||
m_PrefabInstance: {fileID: 1496268631}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1625966372
|
||||
PrefabInstance:
|
||||
--- !u!1 &526598952644250733
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1496268632}
|
||||
m_Modifications:
|
||||
- target: {fileID: 526598954257632073, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: UILoadUpdateWindow
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6405902671848519776, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: _scrollbar
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6405902671848519776, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
propertyPath: _showScrollBar
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
--- !u!224 &1625966373 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3}
|
||||
m_PrefabInstance: {fileID: 1625966372}
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2553447207363733383}
|
||||
- component: {fileID: 4801502738679186807}
|
||||
- component: {fileID: 1839643557661772062}
|
||||
- component: {fileID: 3878109914955847118}
|
||||
- component: {fileID: 4801502738679186808}
|
||||
m_Layer: 5
|
||||
m_Name: UILoadUpdateWindow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &881789250601706820
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5796037856364799285}
|
||||
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, g: 0, b: 0, 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: 0}
|
||||
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!114 &1839643557661772062
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 526598952644250733}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 55
|
||||
--- !u!224 &2553447207363733383
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 526598952644250733}
|
||||
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:
|
||||
- {fileID: 4895621795333603157}
|
||||
- {fileID: 453805643}
|
||||
m_Father: {fileID: 1496268632}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3878109914955847118
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 526598952644250733}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 330876e70d2a63a46b715c69efd1c482, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
AnimationFlow: {fileID: 0}
|
||||
mImgBackGround: {fileID: 881789250601706820}
|
||||
--- !u!223 &4801502738679186807
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 526598952644250733}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 1
|
||||
m_AdditionalShaderChannelsFlag: -1
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &4801502738679186808
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 526598952644250733}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 505f6b3030031c24f994c1d4b93fbe20, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
btnTest: {fileID: 453805644}
|
||||
selected: 0
|
||||
--- !u!224 &4895621795333603157
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5796037856364799285}
|
||||
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: 2553447207363733383}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &5796037856364799285
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4895621795333603157}
|
||||
- component: {fileID: 8962701528096896734}
|
||||
- component: {fileID: 881789250601706820}
|
||||
m_Layer: 5
|
||||
m_Name: Img@BackGround
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!222 &8962701528096896734
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5796037856364799285}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -13,33 +13,9 @@ public class TestMono : MonoBehaviour
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (GUILayout.Button("ShowUI10"))
|
||||
{
|
||||
Profiler.BeginSample("ShowUI10");
|
||||
GameApp.UI.ShowUI("UILoadUpdate", 10);
|
||||
Profiler.EndSample();
|
||||
EditorApplication.isPaused = true;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("ShowUI100"))
|
||||
{
|
||||
GameApp.UI.ShowUI<UILoadUpdate>(100);
|
||||
}
|
||||
|
||||
|
||||
if (GUILayout.Button("ShowUI1000"))
|
||||
{
|
||||
GameApp.UI.ShowUI<UILoadUpdate>(1000);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("HideUI"))
|
||||
{
|
||||
GameApp.UI.CloseUI<UILoadUpdate>();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Fire"))
|
||||
{
|
||||
// GameApp.Event.Fire(this, AssetPatchStatesChangeEventArgs.Create(EPatchStates.PatchDone));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,67 +12,6 @@ using UnityEngine;
|
||||
[Window(UILayer.UI, false)]
|
||||
public class UILoadUpdate : UITabWindow<ui_UILoadUpdateWindow>
|
||||
{
|
||||
private LoopAdapter<string> typeAdapter;
|
||||
private UITestCardWidget _uiTestCardWidget;
|
||||
|
||||
protected override async UniTask OnInitializeAsync()
|
||||
{
|
||||
Log.Info("OnInitlize");
|
||||
typeAdapter = new LoopAdapter<string>(baseui.ScrollViewTestList);
|
||||
typeAdapter.SetOnItemClick(OnItemClick);
|
||||
baseui.ScrollViewTestList.SetAdapter(typeAdapter);
|
||||
baseui.ScrollViewTestList.OnIndexChanged += index => { Debug.Log("Index Changed"); };
|
||||
|
||||
baseui.ScrollViewTestList.OnMoveingChanged += () => { Debug.Log("Scroll Changed"); };
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnItemClick(string obj)
|
||||
{
|
||||
var index = 100 + ((typeAdapter.ChoiceIndex + 1) * 10) + typeAdapter.ChoiceIndex;
|
||||
baseui.ScrollViewTestList.ScrollTo(index, true);
|
||||
}
|
||||
|
||||
protected override void OnRegisterEvent(EventListenerProxy proxy)
|
||||
{
|
||||
base.OnRegisterEvent(proxy);
|
||||
// proxy.Subscribe(AssetPatchStatesChangeEventArgs.EventId, SetPatchStates);
|
||||
}
|
||||
|
||||
private void SetPatchStates(object sender, GameEventArgs e)
|
||||
{
|
||||
Debug.Log("收到信息");
|
||||
}
|
||||
|
||||
protected override void OnOpen()
|
||||
{
|
||||
base.OnOpen();
|
||||
List<string> para = new List<string>();
|
||||
int count = 5;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
para.Add(i.ToString());
|
||||
}
|
||||
|
||||
typeAdapter.SetList(para);
|
||||
baseui.ScrollViewTestList.ScrollTo(100 * typeAdapter.GetRealCount());
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
Log.Info("OnClose");
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
Log.Info("OnDestroy");
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using AlicizaX.UI.RecyclerView;
|
||||
using Sirenix.OdinInspector;
|
||||
using AlicizaX.UI.Runtime;
|
||||
namespace GameLogic.UI
|
||||
@ -17,18 +16,6 @@ namespace GameLogic.UI
|
||||
private Image mImgBackGround;
|
||||
public Image ImgBackGround => mImgBackGround;
|
||||
|
||||
[SerializeField]
|
||||
[ReadOnly]
|
||||
[HideLabel]
|
||||
private RecyclerView mScrollViewTestList;
|
||||
public RecyclerView ScrollViewTestList => mScrollViewTestList;
|
||||
|
||||
[SerializeField]
|
||||
[ReadOnly]
|
||||
[HideLabel]
|
||||
private Image mImgTestccc;
|
||||
public Image ImgTestccc => mImgTestccc;
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
29
Client/Assets/UITestMono.cs
Normal file
29
Client/Assets/UITestMono.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class UITestMono : MonoBehaviour
|
||||
{
|
||||
public UXButton btnTest;
|
||||
public bool selected;
|
||||
|
||||
[Sirenix.OdinInspector.Button]
|
||||
public void DoSelect()
|
||||
{
|
||||
btnTest.SetSelect(selected, true);
|
||||
}
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
btnTest.onValueChanged.AddListener(OnvalueChanged);
|
||||
}
|
||||
|
||||
private void OnvalueChanged(bool arg0)
|
||||
{
|
||||
Debug.Log($"ValueChanged {arg0}");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
}
|
||||
}
|
||||
2
Client/Assets/UITestMono.cs.meta
Normal file
2
Client/Assets/UITestMono.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 505f6b3030031c24f994c1d4b93fbe20
|
||||
1
Client/Assets/uielementconfig.txt
Normal file
1
Client/Assets/uielementconfig.txt
Normal file
@ -0,0 +1 @@
|
||||
[{"uiElementRegex":"Rect","componentType":"RectTransform"},{"uiElementRegex":"Obj","componentType":"GameObject"},{"uiElementRegex":"Tf","componentType":"Transform"},{"uiElementRegex":"Btn","componentType":"UXButton"},{"uiElementRegex":"Slider","componentType":"Slider"},{"uiElementRegex":"Img","componentType":"UXImage"},{"uiElementRegex":"RImg","componentType":"RawImage"},{"uiElementRegex":"Scrollbar","componentType":"Scrollbar"},{"uiElementRegex":"ScrollRect","componentType":"ScrollRect"},{"uiElementRegex":"GLayout","componentType":"GridLayoutGroup"},{"uiElementRegex":"HLayout","componentType":"HorizontalLayoutGroup"},{"uiElementRegex":"VLayout","componentType":"VerticalLayoutGroup"},{"uiElementRegex":"Text","componentType":"TMPro.TextMeshProUGUI"},{"uiElementRegex":"TogGroup","componentType":"UXGroup"},{"uiElementRegex":"Mask2D","componentType":"RectMask2D"},{"uiElementRegex":"Video","componentType":"Video.VideoPlayer"},{"uiElementRegex":"Input","componentType":"TMPro.TMP_InputField"},{"uiElementRegex":"CanvasGroup","componentType":"CanvasGroup"},{"uiElementRegex":"ScrollView","componentType":"RecyclerView"},{"uiElementRegex":"Drag","componentType":"UXDraggable"}]
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1df2552bb1d632e4882a02c71379f0bb
|
||||
guid: cd96f3d9dd2a90d40a81a1d4319ce8f2
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@ -196,6 +196,40 @@ namespace AlicizaX.Audio.Runtime
|
||||
return audioAgent;
|
||||
}
|
||||
|
||||
public static AudioAgent Create(AudioClip clip, AudioCategory audioCategory)
|
||||
{
|
||||
AudioAgent audioAgent = new AudioAgent();
|
||||
audioAgent.Init(audioCategory);
|
||||
audioAgent.SetAudioClip(clip);
|
||||
return audioAgent;
|
||||
}
|
||||
|
||||
public void SetAudioClip(AudioClip clip)
|
||||
{
|
||||
if (_source == null)
|
||||
return;
|
||||
|
||||
Stop(false);
|
||||
|
||||
if (_audioData != null)
|
||||
{
|
||||
AudioData.DeAlloc(_audioData);
|
||||
_audioData = null;
|
||||
}
|
||||
|
||||
_source.clip = clip;
|
||||
if (clip != null)
|
||||
{
|
||||
_source.Play();
|
||||
_audioAgentRuntimeState = AudioAgentRuntimeState.Playing;
|
||||
_duration = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_audioAgentRuntimeState = AudioAgentRuntimeState.End;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化音频代理辅助器。
|
||||
/// </summary>
|
||||
|
||||
@ -11,8 +11,7 @@ namespace AlicizaX.Audio.Runtime
|
||||
[Serializable]
|
||||
public class AudioCategory
|
||||
{
|
||||
[SerializeField]
|
||||
private AudioMixer audioMixer = null;
|
||||
[SerializeField] private AudioMixer audioMixer = null;
|
||||
|
||||
public List<AudioAgent> AudioAgents;
|
||||
private readonly AudioMixerGroup _audioMixerGroup;
|
||||
@ -112,6 +111,50 @@ namespace AlicizaX.Audio.Runtime
|
||||
}
|
||||
}
|
||||
|
||||
public AudioAgent Play(AudioClip clip)
|
||||
{
|
||||
if (!_bEnable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int freeChannel = -1;
|
||||
float duration = -1;
|
||||
|
||||
for (int i = 0; i < AudioAgents.Count; i++)
|
||||
{
|
||||
if (AudioAgents[i].IsFree)
|
||||
{
|
||||
freeChannel = i;
|
||||
break;
|
||||
}
|
||||
else if (AudioAgents[i].Duration > duration)
|
||||
{
|
||||
duration = AudioAgents[i].Duration;
|
||||
freeChannel = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (freeChannel >= 0)
|
||||
{
|
||||
if (AudioAgents[freeChannel] == null)
|
||||
{
|
||||
AudioAgents[freeChannel] = AudioAgent.Create(clip, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
AudioAgents[freeChannel].SetAudioClip(clip);
|
||||
}
|
||||
|
||||
return AudioAgents[freeChannel];
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Here is no channel to play audio clip");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 播放音频。
|
||||
/// </summary>
|
||||
|
||||
@ -457,6 +457,25 @@ namespace AlicizaX.Audio.Runtime
|
||||
}
|
||||
}
|
||||
|
||||
public AudioAgent Play(AudioType type, AudioClip clip, bool bLoop = false, float volume = 1.0f)
|
||||
{
|
||||
if (_bUnityAudioDisabled)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
AudioAgent audioAgent = _audioCategories[(int)type].Play(clip);
|
||||
{
|
||||
if (audioAgent != null)
|
||||
{
|
||||
audioAgent.IsLoop = bLoop;
|
||||
audioAgent.Volume = volume;
|
||||
}
|
||||
|
||||
return audioAgent;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 停止某类声音播放。
|
||||
/// </summary>
|
||||
|
||||
@ -96,6 +96,7 @@ namespace AlicizaX.Audio.Runtime
|
||||
/// <param name="bInPool">是否支持资源池。</param>
|
||||
public AudioAgent Play(AudioType type, string path, bool bLoop = false, float volume = 1.0f, bool bAsync = false, bool bInPool = false);
|
||||
|
||||
public AudioAgent Play(AudioType type,AudioClip clip,bool loop=false,float volume = 1.0f);
|
||||
/// <summary>
|
||||
/// 停止某类声音播放。
|
||||
/// </summary>
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 2914534c6657af23bbad62a00fbb86c602070cbe
|
||||
Subproject commit 8d5c2e0e012b5589f47ee3abd466d00196a98722
|
||||
@ -22,6 +22,12 @@
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.alicizax.unity.network",
|
||||
"expression": "",
|
||||
"define": "ALICIZAX_NETWORK"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
#if ALICIZAX_NETWORK
|
||||
using AlicizaX.Network.Runtime;
|
||||
using AlicizaX;
|
||||
|
||||
@ -22,3 +22,5 @@ public static partial class GameApp
|
||||
|
||||
internal static INetworkModule _network;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -23,7 +23,9 @@ internal static class GameAppStaticMemberReset
|
||||
GameApp._event = null;
|
||||
GameApp._fsm = null;
|
||||
GameApp._localization = null;
|
||||
#if ALICIZAX_NETWORK
|
||||
GameApp._network = null;
|
||||
#endif
|
||||
GameApp._objectPool = null;
|
||||
GameApp._resource = null;
|
||||
GameApp._scene = null;
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bdb20201b2e1164e996135c914b1fea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "AlicizaX.UI.Extension.Editor",
|
||||
"rootNamespace": "AlicizaX.UI.Extension.Editor",
|
||||
"references": [
|
||||
"GUID:6546d7765b4165b40850b3667f981c26",
|
||||
"GUID:760f1778adc613f49a4394fb41ff0bbc",
|
||||
"GUID:75b6f2078d190f14dbda4a5b747d709c",
|
||||
"GUID:a19b414bea3b97240a91aeab9a8eab36",
|
||||
"GUID:83a193b118cfbef48a344187e07f53bb",
|
||||
"GUID:acfef7cabed3b0a42b25edb1cd4fa259",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 313320016f75fd24e9885858267ed35c
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9fd90c759c54481924b9549fa2d0330
|
||||
timeCreated: 1743598816
|
||||
@ -1,37 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace AlicizaX.UI.Extension.Editor
|
||||
{
|
||||
internal static class MenuExtension
|
||||
{
|
||||
[MenuItem("GameObject/UX/UXTextMeshPro", false, -1)]
|
||||
private static void CreateUxTextMeshProUx()
|
||||
{
|
||||
GameObject selectionObject = Selection.activeGameObject;
|
||||
var gameObject = new GameObject("UXTextMeshPro", typeof(UXTextMeshPro));
|
||||
gameObject.transform.SetParent(selectionObject.transform);
|
||||
var rectTransform = gameObject.GetComponent<RectTransform>();
|
||||
var uxTextMeshPro = gameObject.GetComponent<UXTextMeshPro>();
|
||||
uxTextMeshPro.text = "UXTextMeshPro";
|
||||
rectTransform.anchoredPosition = Vector2.zero;
|
||||
rectTransform.localPosition = Vector3.zero;
|
||||
rectTransform.pivot = new Vector2(0.5f, 0.5f);
|
||||
rectTransform.localScale = Vector3.one;
|
||||
Selection.activeGameObject = gameObject;
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UX/RecyclerView", false, -1)]
|
||||
private static void CreateUxRecyclerView()
|
||||
{
|
||||
GameObject selectionObject = Selection.activeGameObject;
|
||||
if (selectionObject == null) return;
|
||||
const string prefabPath = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab";
|
||||
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(prefabPath);
|
||||
GameObject instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab, selectionObject.transform);
|
||||
PrefabUtility.UnpackPrefabInstance(instance, PrefabUnpackMode.Completely, InteractionMode.UserAction);
|
||||
Selection.activeGameObject = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a33cf28b887a48c3970fca2a7720b876
|
||||
timeCreated: 1743598823
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2856fb53117f4988b9585025859c4075
|
||||
timeCreated: 1748497429
|
||||
@ -1,472 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AlicizaX.UI.RecyclerView;
|
||||
using UnityEngine.UI;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
[CustomEditor(typeof(RecyclerView))]
|
||||
public class RecyclerViewEditor : Editor
|
||||
{
|
||||
// Layout Manager
|
||||
private SerializedProperty _layoutManagerTypeName;
|
||||
private SerializedProperty _layoutManager;
|
||||
private List<string> _layoutTypeNames = new List<string>();
|
||||
private int _selectedLayoutIndex;
|
||||
|
||||
// Scroller
|
||||
private SerializedProperty scroll;
|
||||
private SerializedProperty _scroller;
|
||||
private SerializedProperty _scrollerTypeName;
|
||||
private List<Type> _scrollerTypes = new List<Type>();
|
||||
private List<string> _scrollerTypeNames;
|
||||
private int _selectedScrollerIndex;
|
||||
|
||||
// Base Properties
|
||||
private SerializedProperty direction;
|
||||
private SerializedProperty alignment;
|
||||
private SerializedProperty content;
|
||||
private SerializedProperty spacing;
|
||||
private SerializedProperty padding;
|
||||
private SerializedProperty snap;
|
||||
private SerializedProperty scrollSpeed;
|
||||
private SerializedProperty wheelSpeed;
|
||||
private SerializedProperty templates;
|
||||
|
||||
private SerializedProperty _showScrollBar;
|
||||
private SerializedProperty _scrollbar;
|
||||
|
||||
private const string NoneOptionName = "None";
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Layout Manager
|
||||
_layoutManagerTypeName = serializedObject.FindProperty("_layoutManagerTypeName");
|
||||
_layoutManager = serializedObject.FindProperty("_layoutManager");
|
||||
RefreshLayoutTypes();
|
||||
|
||||
// Scroller
|
||||
scroll = serializedObject.FindProperty("scroll");
|
||||
_scroller = serializedObject.FindProperty("_scroller");
|
||||
_scrollerTypeName = serializedObject.FindProperty("_scrollerTypeName");
|
||||
RefreshScrollerTypes();
|
||||
SyncExistingScroller();
|
||||
|
||||
// Base Properties
|
||||
direction = serializedObject.FindProperty("direction");
|
||||
alignment = serializedObject.FindProperty("alignment");
|
||||
content = serializedObject.FindProperty("content");
|
||||
spacing = serializedObject.FindProperty("spacing");
|
||||
padding = serializedObject.FindProperty("padding");
|
||||
snap = serializedObject.FindProperty("snap");
|
||||
scrollSpeed = serializedObject.FindProperty("scrollSpeed");
|
||||
wheelSpeed = serializedObject.FindProperty("wheelSpeed");
|
||||
templates = serializedObject.FindProperty("templates");
|
||||
_showScrollBar = serializedObject.FindProperty("_showScrollBar");
|
||||
_scrollbar = serializedObject.FindProperty("_scrollbar");
|
||||
}
|
||||
|
||||
#region Layout Manager
|
||||
|
||||
void RefreshLayoutTypes()
|
||||
{
|
||||
_layoutTypeNames.Clear();
|
||||
_layoutTypeNames.Add(NoneOptionName);
|
||||
|
||||
// 获取所有实现ILayoutManager的非Mono类型
|
||||
var types = AlicizaX.Utility.Assembly.GetRuntimeTypes(typeof(ILayoutManager));
|
||||
foreach (var type in types)
|
||||
{
|
||||
if (!typeof(MonoBehaviour).IsAssignableFrom(type))
|
||||
{
|
||||
_layoutTypeNames.Add(type.FullName);
|
||||
}
|
||||
}
|
||||
|
||||
_selectedLayoutIndex = Mathf.Clamp(
|
||||
_layoutTypeNames.IndexOf(_layoutManagerTypeName.stringValue),
|
||||
0,
|
||||
_layoutTypeNames.Count - 1
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Scroller
|
||||
|
||||
void RefreshScrollerTypes()
|
||||
{
|
||||
_scrollerTypes = TypeCache.GetTypesDerivedFrom<IScroller>()
|
||||
.Where(t => t.IsSubclassOf(typeof(MonoBehaviour)))
|
||||
.ToList();
|
||||
|
||||
_scrollerTypeNames = _scrollerTypes
|
||||
.Select(t => t.FullName)
|
||||
.Prepend(NoneOptionName)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
void SyncExistingScroller()
|
||||
{
|
||||
var rv = target as RecyclerView;
|
||||
if (rv == null) return;
|
||||
|
||||
var existing = rv.GetComponent<IScroller>();
|
||||
if (existing != null)
|
||||
{
|
||||
_scrollerTypeName.stringValue = existing.GetType().FullName;
|
||||
_selectedScrollerIndex = _scrollerTypeNames.IndexOf(_scrollerTypeName.stringValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedScrollerIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
bool isPlaying = Application.isPlaying;
|
||||
|
||||
DrawLayoutManagerSection(isPlaying);
|
||||
DrawBaseSettings(isPlaying);
|
||||
DrawScrollerSettings(isPlaying);
|
||||
DrawTemplatesSection();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#region Drawing Methods
|
||||
|
||||
void DrawLayoutManagerSection(bool isPlaying)
|
||||
{
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
{
|
||||
EditorGUILayout.LabelField("Layout Manager", EditorStyles.boldLabel);
|
||||
|
||||
using (new EditorGUI.DisabledScope(isPlaying))
|
||||
{
|
||||
// 强制允许选择空值
|
||||
int newIndex = EditorGUILayout.Popup("Layout Type", _selectedLayoutIndex, _layoutTypeNames.ToArray());
|
||||
if (newIndex != _selectedLayoutIndex)
|
||||
{
|
||||
_selectedLayoutIndex = newIndex; // 立即更新索引
|
||||
UpdateLayoutManager(newIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// 显示布局属性或警告
|
||||
if (_layoutManager.managedReferenceValue != null)
|
||||
{
|
||||
EditorGUILayout.Space(3);
|
||||
DrawManagedProperties(_layoutManager);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Need Choose LayoutManager", MessageType.Error);
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DrawBaseSettings(bool isPlaying)
|
||||
{
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
{
|
||||
EditorGUILayout.LabelField("Base Settings", EditorStyles.boldLabel);
|
||||
|
||||
using (new EditorGUI.DisabledScope(isPlaying))
|
||||
{
|
||||
EditorGUILayout.PropertyField(direction);
|
||||
EditorGUILayout.PropertyField(alignment);
|
||||
EditorGUILayout.PropertyField(content);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.LabelField("Spacing", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(spacing);
|
||||
EditorGUILayout.PropertyField(padding);
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.LabelField("Scrolling", EditorStyles.boldLabel);
|
||||
|
||||
using (new EditorGUI.DisabledScope(isPlaying))
|
||||
{
|
||||
bool prevScrollValue = scroll.boolValue;
|
||||
EditorGUILayout.PropertyField(scroll);
|
||||
|
||||
if (scroll.boolValue != prevScrollValue)
|
||||
{
|
||||
HandleScrollToggle();
|
||||
if (!scroll.boolValue)
|
||||
{
|
||||
ClearScrollBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (scroll.boolValue)
|
||||
{
|
||||
using (new EditorGUI.DisabledScope(isPlaying))
|
||||
{
|
||||
bool prevShowScrollBarValue = _showScrollBar.boolValue;
|
||||
EditorGUILayout.PropertyField(_showScrollBar);
|
||||
|
||||
if (_showScrollBar.boolValue != prevShowScrollBarValue)
|
||||
{
|
||||
HandleScrollBarToggle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EditorGUILayout.PropertyField(snap);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DrawScrollerSettings(bool isPlaying)
|
||||
{
|
||||
if (!scroll.boolValue) return;
|
||||
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
{
|
||||
EditorGUILayout.LabelField("Scroller Settings", EditorStyles.boldLabel);
|
||||
|
||||
using (new EditorGUI.DisabledScope(isPlaying))
|
||||
{
|
||||
int newIndex = EditorGUILayout.Popup("Scroller Type", _selectedScrollerIndex, _scrollerTypeNames.ToArray());
|
||||
if (newIndex != _selectedScrollerIndex)
|
||||
{
|
||||
UpdateScroller(newIndex);
|
||||
}
|
||||
}
|
||||
|
||||
var rv = target as RecyclerView;
|
||||
if (rv != null)
|
||||
{
|
||||
var scrollerComponent = rv.GetComponent<IScroller>();
|
||||
if (scrollerComponent != null)
|
||||
{
|
||||
DrawComponentProperties(scrollerComponent as MonoBehaviour, "Scroller Properties");
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Must choose to use a Scroller.", MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(3);
|
||||
EditorGUILayout.PropertyField(scrollSpeed);
|
||||
EditorGUILayout.PropertyField(wheelSpeed);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DrawComponentProperties(MonoBehaviour component, string header = null)
|
||||
{
|
||||
if (component == null) return;
|
||||
|
||||
EditorGUILayout.Space(3);
|
||||
if (!string.IsNullOrEmpty(header))
|
||||
{
|
||||
EditorGUILayout.LabelField(header, EditorStyles.boldLabel);
|
||||
}
|
||||
|
||||
SerializedObject so = new SerializedObject(component);
|
||||
so.Update();
|
||||
|
||||
SerializedProperty prop = so.GetIterator();
|
||||
bool enterChildren = true;
|
||||
while (prop.NextVisible(enterChildren))
|
||||
{
|
||||
enterChildren = false;
|
||||
if (prop.name == "m_Script") continue;
|
||||
EditorGUILayout.PropertyField(prop, true);
|
||||
}
|
||||
|
||||
so.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
void DrawTemplatesSection()
|
||||
{
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.PropertyField(templates, new GUIContent("Item Templates"), true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update Handlers
|
||||
|
||||
void UpdateLayoutManager(int selectedIndex)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 强制清空逻辑
|
||||
if (selectedIndex == 0)
|
||||
{
|
||||
_layoutManager.managedReferenceValue = null;
|
||||
_layoutManagerTypeName.stringValue = "";
|
||||
_selectedLayoutIndex = 0; // 确保索引同步
|
||||
return;
|
||||
}
|
||||
|
||||
// 有效性检查
|
||||
if (selectedIndex < 0 || selectedIndex >= _layoutTypeNames.Count)
|
||||
{
|
||||
Debug.LogError($"Invalid layout index: {selectedIndex}");
|
||||
_selectedLayoutIndex = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
string typeName = _layoutTypeNames[selectedIndex];
|
||||
Type type = AlicizaX.Utility.Assembly.GetType(typeName);
|
||||
|
||||
if (type != null && typeof(ILayoutManager).IsAssignableFrom(type))
|
||||
{
|
||||
_layoutManager.managedReferenceValue = Activator.CreateInstance(type);
|
||||
_layoutManagerTypeName.stringValue = typeName;
|
||||
_selectedLayoutIndex = selectedIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Invalid layout type: {typeName}");
|
||||
_selectedLayoutIndex = 0;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"Layout Manager Error: {e.Message}");
|
||||
_layoutManager.managedReferenceValue = null;
|
||||
_layoutManagerTypeName.stringValue = "";
|
||||
_selectedLayoutIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateScroller(int selectedIndex)
|
||||
{
|
||||
try
|
||||
{
|
||||
var rv = target as RecyclerView;
|
||||
if (rv == null) return;
|
||||
|
||||
Undo.RecordObjects(new UnityEngine.Object[] { rv, this }, "Update Scroller");
|
||||
|
||||
// 移除旧组件
|
||||
var oldScroller = rv.GetComponent<IScroller>();
|
||||
if (oldScroller != null)
|
||||
{
|
||||
Undo.DestroyObjectImmediate(oldScroller as MonoBehaviour);
|
||||
}
|
||||
|
||||
if (selectedIndex == 0)
|
||||
{
|
||||
// 清除序列化引用
|
||||
_scroller.objectReferenceValue = null;
|
||||
_scrollerTypeName.stringValue = "";
|
||||
return;
|
||||
}
|
||||
|
||||
// 添加新组件
|
||||
Type selectedType = _scrollerTypes[selectedIndex - 1];
|
||||
var newScroller = Undo.AddComponent(rv.gameObject, selectedType) as IScroller;
|
||||
|
||||
// 同步到序列化属性
|
||||
_scroller.objectReferenceValue = newScroller as MonoBehaviour;
|
||||
_scrollerTypeName.stringValue = selectedType.FullName;
|
||||
_selectedScrollerIndex = selectedIndex;
|
||||
|
||||
// 立即应用修改
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
EditorUtility.SetDirty(rv); // 标记对象需要保存
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"Scroller Error: {e}");
|
||||
_selectedScrollerIndex = 0;
|
||||
_scrollerTypeName.stringValue = "";
|
||||
_scroller.objectReferenceValue = null;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleScrollToggle()
|
||||
{
|
||||
var rv = target as RecyclerView;
|
||||
if (rv == null) return;
|
||||
|
||||
if (!scroll.boolValue)
|
||||
{
|
||||
// Remove scroller component
|
||||
var scrollerComponent = rv.GetComponent<IScroller>();
|
||||
if (scrollerComponent != null)
|
||||
{
|
||||
Undo.DestroyObjectImmediate(scrollerComponent as MonoBehaviour);
|
||||
}
|
||||
|
||||
_scrollerTypeName.stringValue = "";
|
||||
_selectedScrollerIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleScrollBarToggle()
|
||||
{
|
||||
var rv = target as RecyclerView;
|
||||
if (rv == null) return;
|
||||
if (_showScrollBar.boolValue)
|
||||
{
|
||||
Direction direction = (Direction)this.direction.enumValueIndex;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
const string path = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab";
|
||||
InstantiateScrollBar(path, rv.transform);
|
||||
}
|
||||
else if (direction == Direction.Horizontal)
|
||||
{
|
||||
const string path = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab";
|
||||
InstantiateScrollBar(path, rv.transform);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearScrollBar();
|
||||
}
|
||||
}
|
||||
|
||||
void ClearScrollBar()
|
||||
{
|
||||
_showScrollBar.boolValue = false;
|
||||
if (_scrollbar.objectReferenceValue != null)
|
||||
{
|
||||
Scrollbar scrollbar = _scrollbar.objectReferenceValue as Scrollbar;
|
||||
_scrollbar.objectReferenceValue = null;
|
||||
Object.DestroyImmediate(scrollbar.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
void DrawManagedProperties(SerializedProperty property)
|
||||
{
|
||||
SerializedProperty iterator = property.Copy();
|
||||
bool enterChildren = true;
|
||||
|
||||
while (iterator.NextVisible(enterChildren))
|
||||
{
|
||||
enterChildren = false;
|
||||
if (iterator.name == "m_Script") continue;
|
||||
EditorGUILayout.PropertyField(iterator, true);
|
||||
}
|
||||
}
|
||||
|
||||
void InstantiateScrollBar(string path, Transform parent)
|
||||
{
|
||||
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
||||
GameObject instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab, parent);
|
||||
PrefabUtility.UnpackPrefabInstance(instance, PrefabUnpackMode.Completely, InteractionMode.UserAction);
|
||||
_scrollbar.objectReferenceValue = instance.GetComponent<Scrollbar>();
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a05527bf8840412aa310698d13cb3196
|
||||
timeCreated: 1748497433
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4491d5adb2174f42907cd6bd579711ef
|
||||
timeCreated: 1748503337
|
||||
@ -1,176 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1235572201494389031
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 953826052447570581}
|
||||
- component: {fileID: 409256563818501030}
|
||||
- component: {fileID: 4967247000384896254}
|
||||
- component: {fileID: 2527097672867102998}
|
||||
- component: {fileID: 144409482669617178}
|
||||
m_Layer: 5
|
||||
m_Name: ScrollView
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &953826052447570581
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235572201494389031}
|
||||
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:
|
||||
- {fileID: 7227160576944475251}
|
||||
m_Father: {fileID: 0}
|
||||
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}
|
||||
m_SizeDelta: {x: 250, y: 400}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &409256563818501030
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235572201494389031}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4967247000384896254
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235572201494389031}
|
||||
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.6886792, g: 0.6886792, b: 0.6886792, 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: 0}
|
||||
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!114 &2527097672867102998
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235572201494389031}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7efd8e83d2092b347952108134dc37eb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
direction: 1
|
||||
alignment: 1
|
||||
content: {fileID: 7227160576944475251}
|
||||
spacing: {x: 0, y: 0}
|
||||
padding: {x: 0, y: 0}
|
||||
scroll: 1
|
||||
snap: 0
|
||||
scrollSpeed: 10
|
||||
wheelSpeed: 30
|
||||
templates: []
|
||||
_scrollerTypeName: AlicizaX.UI.RecyclerView.Scroller
|
||||
_scroller: {fileID: 144409482669617178}
|
||||
_layoutManagerTypeName: AlicizaX.UI.RecyclerView.LinearLayoutManager
|
||||
_layoutManager:
|
||||
rid: 6528754475160043629
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 6528754475160043629
|
||||
type: {class: LinearLayoutManager, ns: AlicizaX.UI.RecyclerView, asm: AlicizaX.UI.Extension}
|
||||
data:
|
||||
testValue: 0
|
||||
--- !u!114 &144409482669617178
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235572201494389031}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7b7de4cb3a1546e4a9ade6b8dbf8af92, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &9220717789715235424
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7227160576944475251}
|
||||
- component: {fileID: 2326586106184642263}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7227160576944475251
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9220717789715235424}
|
||||
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: 953826052447570581}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2326586106184642263
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9220717789715235424}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ed07b7776718d548804a6d7b5539205
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,252 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2002449542824361868
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 488252331187428264}
|
||||
- component: {fileID: 2101354351137448834}
|
||||
- component: {fileID: 8235216341801835209}
|
||||
- component: {fileID: 8283467313266023839}
|
||||
- component: {fileID: 3358419500410988058}
|
||||
m_Layer: 0
|
||||
m_Name: horizontal
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &488252331187428264
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2002449542824361868}
|
||||
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:
|
||||
- {fileID: 7124834573134617791}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -40, y: 10}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &2101354351137448834
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2002449542824361868}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8235216341801835209
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2002449542824361868}
|
||||
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.3773585, g: 0.3773585, b: 0.3773585, 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: 0}
|
||||
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!114 &8283467313266023839
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2002449542824361868}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
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: 2326542036480137540}
|
||||
m_HandleRect: {fileID: 193229221570547880}
|
||||
m_Direction: 0
|
||||
m_Value: 0
|
||||
m_Size: 0.4
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &3358419500410988058
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2002449542824361868}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 682cfe39b0fffe544be8d5c11eb369e5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &4575532730663240958
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 193229221570547880}
|
||||
- component: {fileID: 1924433296360427437}
|
||||
- component: {fileID: 2326542036480137540}
|
||||
m_Layer: 0
|
||||
m_Name: Handle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &193229221570547880
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4575532730663240958}
|
||||
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: 7124834573134617791}
|
||||
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_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1924433296360427437
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4575532730663240958}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2326542036480137540
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4575532730663240958}
|
||||
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: 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: 0}
|
||||
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 &6761444411709800685
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7124834573134617791}
|
||||
m_Layer: 0
|
||||
m_Name: SlidingArea
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7124834573134617791
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6761444411709800685}
|
||||
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:
|
||||
- {fileID: 193229221570547880}
|
||||
m_Father: {fileID: 488252331187428264}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98998c9d3c2263646be3f24d0996a493
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,252 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &220331575378582965
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7591792402052135596}
|
||||
- component: {fileID: 2150618277400837422}
|
||||
- component: {fileID: 3952935497572886421}
|
||||
- component: {fileID: 2116943976852970174}
|
||||
- component: {fileID: 4776801802864796469}
|
||||
m_Layer: 5
|
||||
m_Name: vertical
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7591792402052135596
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 220331575378582965}
|
||||
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:
|
||||
- {fileID: 6760799037446078325}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 10, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &2150618277400837422
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 220331575378582965}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3952935497572886421
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 220331575378582965}
|
||||
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.3207547, g: 0.3207547, b: 0.3207547, 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: 0}
|
||||
m_Type: 1
|
||||
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!114 &2116943976852970174
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 220331575378582965}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
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: 2198892040955573086}
|
||||
m_HandleRect: {fileID: 2839511060116175760}
|
||||
m_Direction: 3
|
||||
m_Value: 0
|
||||
m_Size: 0.515
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &4776801802864796469
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 220331575378582965}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 682cfe39b0fffe544be8d5c11eb369e5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &2110970298716295489
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2839511060116175760}
|
||||
- component: {fileID: 1084884340137269109}
|
||||
- component: {fileID: 2198892040955573086}
|
||||
m_Layer: 5
|
||||
m_Name: Handle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2839511060116175760
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2110970298716295489}
|
||||
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: 6760799037446078325}
|
||||
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_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1084884340137269109
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2110970298716295489}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2198892040955573086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2110970298716295489}
|
||||
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: 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: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
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 &8790787763373649645
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6760799037446078325}
|
||||
m_Layer: 5
|
||||
m_Name: Sliding Area
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6760799037446078325
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8790787763373649645}
|
||||
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:
|
||||
- {fileID: 2839511060116175760}
|
||||
m_Father: {fileID: 7591792402052135596}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e657950d0fd9fd443a1cb9d16c3fa86e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c397bc7b14cfb8439960f6f74c953ca
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 420 B |
@ -1,117 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a01ce47da31a2e0438fd8d38b203c0d5
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 782 B |
@ -1,117 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 337b039db051cab44819dc51e6af1f43
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 487 B |
@ -1,117 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42b2d97a2cb439b4395c6dca63357d89
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a2c1fc8ad7d457abaf67dae3d5005de
|
||||
timeCreated: 1738832149
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ae5a45a9c60593458ff7937ccef2268
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,49 +0,0 @@
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
namespace UnityEngine.UI
|
||||
{
|
||||
[CustomEditor(typeof(UXTextMeshPro), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI
|
||||
{
|
||||
private SerializedProperty text;
|
||||
private SerializedProperty localizationID;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
text = serializedObject.FindProperty("m_text");
|
||||
localizationID = serializedObject.FindProperty("m_localizationID");
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
bool isPlay = Application.isPlaying;
|
||||
|
||||
|
||||
// Key选择逻辑
|
||||
EditorGUILayout.PropertyField(localizationID);
|
||||
|
||||
//
|
||||
// // 显示预览信息
|
||||
// EditorGUI.BeginDisabledGroup(true);
|
||||
// {
|
||||
// EditorGUILayout.PropertyField(localizationID);
|
||||
// if (!string.IsNullOrEmpty(localizationID.stringValue))
|
||||
// {
|
||||
// var entry = _entries.Find(e => e.ID == localizationID.stringValue);
|
||||
// if (entry != null)
|
||||
// {
|
||||
// EditorGUILayout.TextField("当前文本预览", entry.ChineseSimplified);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// EditorGUI.EndDisabledGroup();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
base.OnInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45cc6be3b51ee2045b0c57c17e665f4c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f770d49c712145179c9d1e9d6cd6b141
|
||||
timeCreated: 1744275046
|
||||
@ -1,309 +0,0 @@
|
||||
// UXButtonEditor.cs
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEditor.AnimatedValues;
|
||||
using UnityEditor.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(UXButton), true)]
|
||||
public class UXButtonEditor : Editor
|
||||
{
|
||||
private SerializedProperty m_Interactable;
|
||||
private SerializedProperty m_Mode;
|
||||
private SerializedProperty m_OnValueChanged;
|
||||
private SerializedProperty m_OnClick;
|
||||
private SerializedProperty m_UXGroup;
|
||||
|
||||
private SerializedProperty m_TransitionData;
|
||||
|
||||
private SerializedProperty m_ChildTransitions;
|
||||
|
||||
private SerializedProperty m_ButtonUISounds;
|
||||
|
||||
private bool m_ShowChildTransitions = true;
|
||||
private Dictionary<int, bool> m_ChildTransitionFoldouts = new Dictionary<int, bool>();
|
||||
private UXGroup group;
|
||||
private int m_ButtonMode;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
m_Interactable = serializedObject.FindProperty("m_Interactable");
|
||||
m_UXGroup = serializedObject.FindProperty("m_UXGroup");
|
||||
m_Mode = serializedObject.FindProperty("m_Mode");
|
||||
m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged");
|
||||
m_OnClick = serializedObject.FindProperty("m_OnClick");
|
||||
m_TransitionData = serializedObject.FindProperty("m_TransitionData");
|
||||
m_ChildTransitions = serializedObject.FindProperty("m_ChildTransitions");
|
||||
m_ButtonUISounds = serializedObject.FindProperty("m_ButtonUISounds");
|
||||
m_ChildTransitionFoldouts.Clear();
|
||||
group = (UXGroup)m_UXGroup.objectReferenceValue;
|
||||
m_ButtonMode = m_Mode.enumValueIndex;
|
||||
}
|
||||
|
||||
private void ResetEventProperty(SerializedProperty property)
|
||||
{
|
||||
SerializedProperty persistentCalls = property.FindPropertyRelative("m_PersistentCalls");
|
||||
SerializedProperty calls = persistentCalls.FindPropertyRelative("m_Calls");
|
||||
calls.arraySize = 0;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUI.BeginDisabledGroup(EditorApplication.isPlaying);
|
||||
EditorGUILayout.PropertyField(m_Mode);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
EditorGUILayout.PropertyField(m_Interactable);
|
||||
|
||||
GUILayout.Space(1);
|
||||
DrawSelfTransition();
|
||||
|
||||
GUILayout.Space(5);
|
||||
DrawChildTransitions();
|
||||
|
||||
|
||||
EditorGUILayout.PropertyField(m_ButtonUISounds);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (m_Mode.enumValueIndex != m_ButtonMode)
|
||||
{
|
||||
if (m_ButtonMode == (int)ButtonModeType.Normal)
|
||||
{
|
||||
ResetEventProperty(m_OnValueChanged);
|
||||
m_UXGroup.objectReferenceValue = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetEventProperty((m_OnClick));
|
||||
}
|
||||
|
||||
m_ButtonMode = m_Mode.enumValueIndex;
|
||||
}
|
||||
|
||||
if (m_Mode.enumValueIndex == (int)ButtonModeType.Toggle)
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_UXGroup);
|
||||
UXGroup newGroup = (UXGroup)m_UXGroup.objectReferenceValue;
|
||||
if (newGroup != group)
|
||||
{
|
||||
UXButton self = target as UXButton;
|
||||
if (group != null)
|
||||
{
|
||||
group.UnregisterButton(self);
|
||||
}
|
||||
|
||||
group = newGroup;
|
||||
if (newGroup != null)
|
||||
{
|
||||
newGroup.RegisterButton(self);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.PropertyField(m_OnValueChanged);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.PropertyField(m_OnClick);
|
||||
}
|
||||
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
private void DrawChildTransitions()
|
||||
{
|
||||
m_ShowChildTransitions = EditorGUILayout.Foldout(m_ShowChildTransitions, "Child Transitions", true);
|
||||
if (!m_ShowChildTransitions)
|
||||
return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
// 列表控制按钮
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (GUILayout.Button("Add Child Transition", GUILayout.Width(150)))
|
||||
{
|
||||
m_ChildTransitions.arraySize++;
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 遍历列表元素
|
||||
for (int i = 0; i < m_ChildTransitions.arraySize; i++)
|
||||
{
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// 获取当前元素的SerializedProperty
|
||||
SerializedProperty element = m_ChildTransitions.GetArrayElementAtIndex(i);
|
||||
|
||||
// 初始化折叠状态
|
||||
if (!m_ChildTransitionFoldouts.ContainsKey(i))
|
||||
m_ChildTransitionFoldouts[i] = true;
|
||||
|
||||
// 折叠标题
|
||||
string elementTitle = $"Child Transition {i}";
|
||||
if (element.FindPropertyRelative("targetGraphic").objectReferenceValue != null)
|
||||
elementTitle += $" ({element.FindPropertyRelative("targetGraphic").objectReferenceValue.name})";
|
||||
|
||||
m_ChildTransitionFoldouts[i] = EditorGUILayout.Foldout(m_ChildTransitionFoldouts[i], elementTitle, true);
|
||||
|
||||
if (m_ChildTransitionFoldouts[i])
|
||||
{
|
||||
// 绘制单个TransitionData
|
||||
DrawTransitionData(element);
|
||||
|
||||
// 删除按钮
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
var orginColor = GUI.backgroundColor;
|
||||
GUI.backgroundColor = Color.red;
|
||||
if (GUILayout.Button("Remove", GUILayout.Width(80)))
|
||||
{
|
||||
m_ChildTransitions.DeleteArrayElementAtIndex(i);
|
||||
m_ChildTransitionFoldouts.Remove(i);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
break; // 删除后退出当前循环
|
||||
}
|
||||
|
||||
GUI.backgroundColor = orginColor;
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.Space(5);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
private void DrawTransitionData(SerializedProperty transitionData)
|
||||
{
|
||||
SerializedProperty targetGraphic = transitionData.FindPropertyRelative("targetGraphic");
|
||||
SerializedProperty transition = transitionData.FindPropertyRelative("transition");
|
||||
SerializedProperty colorBlock = transitionData.FindPropertyRelative("colors");
|
||||
SerializedProperty spriteState = transitionData.FindPropertyRelative("spriteState");
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
// 绘制目标图形
|
||||
EditorGUILayout.PropertyField(targetGraphic);
|
||||
|
||||
// 获取当前transition类型
|
||||
var currentTransition = GetTransition(transition);
|
||||
|
||||
// 绘制transition类型
|
||||
EditorGUILayout.PropertyField(transition);
|
||||
|
||||
// 显示警告信息
|
||||
var graphic = targetGraphic.objectReferenceValue as Graphic;
|
||||
switch (currentTransition)
|
||||
{
|
||||
case Selectable.Transition.ColorTint:
|
||||
if (graphic == null)
|
||||
EditorGUILayout.HelpBox("需要Graphic组件来使用颜色过渡", MessageType.Warning);
|
||||
break;
|
||||
|
||||
case Selectable.Transition.SpriteSwap:
|
||||
if (!(graphic is Image))
|
||||
EditorGUILayout.HelpBox("需要Image组件来使用精灵切换", MessageType.Warning);
|
||||
break;
|
||||
}
|
||||
|
||||
// 绘制对应类型的属性
|
||||
switch (currentTransition)
|
||||
{
|
||||
case Selectable.Transition.ColorTint:
|
||||
CheckAndSetColorDefaults(colorBlock, targetGraphic);
|
||||
EditorGUILayout.PropertyField(colorBlock);
|
||||
break;
|
||||
|
||||
case Selectable.Transition.SpriteSwap:
|
||||
EditorGUILayout.PropertyField(spriteState);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
void CheckAndSetColorDefaults(SerializedProperty colorBlock, SerializedProperty targetGraphic)
|
||||
{
|
||||
bool isDirty = false;
|
||||
string[] colorProps = new string[] { "m_NormalColor", "m_HighlightedColor", "m_PressedColor", "m_SelectedColor", "m_DisabledColor" };
|
||||
foreach (var propName in colorProps)
|
||||
{
|
||||
SerializedProperty prop = colorBlock.FindPropertyRelative(propName);
|
||||
Color color = prop.colorValue;
|
||||
if (color.r == 0 && color.g == 0 && color.b == 0 && color.a == 0)
|
||||
{
|
||||
isDirty = true;
|
||||
if (prop.name == "m_PressedColor")
|
||||
{
|
||||
prop.colorValue = new Color(0.7843137f, 0.7843137f, 0.7843137f, 1.0f);
|
||||
}
|
||||
else if (prop.name == "m_DisabledColor")
|
||||
{
|
||||
prop.colorValue = new Color(0.7843137f, 0.7843137f, 0.7843137f, 0.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
prop.colorValue = Color.white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SerializedProperty fadeDuration = colorBlock.FindPropertyRelative("m_FadeDuration");
|
||||
SerializedProperty m_ColorMultiplier = colorBlock.FindPropertyRelative("m_ColorMultiplier");
|
||||
if (isDirty)
|
||||
{
|
||||
m_ColorMultiplier.floatValue = 1f;
|
||||
fadeDuration.floatValue = 0.1f;
|
||||
}
|
||||
|
||||
var graphic = targetGraphic.objectReferenceValue as Graphic;
|
||||
if (graphic != null)
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
Color color = colorBlock.FindPropertyRelative("m_NormalColor").colorValue;
|
||||
graphic.canvasRenderer.SetColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSelfTransition()
|
||||
{
|
||||
EditorGUILayout.LabelField("Main Transition", EditorStyles.boldLabel);
|
||||
SerializedProperty targetGraphic = m_TransitionData.FindPropertyRelative("targetGraphic");
|
||||
var graphic = targetGraphic.objectReferenceValue as Graphic;
|
||||
if (graphic == null)
|
||||
{
|
||||
graphic = (target as UXButton).GetComponent<Graphic>();
|
||||
targetGraphic.objectReferenceValue = graphic;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
DrawTransitionData(m_TransitionData);
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
|
||||
static Selectable.Transition GetTransition(SerializedProperty transition)
|
||||
{
|
||||
return (Selectable.Transition)transition.enumValueIndex;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a6fb65845fb481293f57b30b1bfcb3b
|
||||
timeCreated: 1744275051
|
||||
@ -1,29 +0,0 @@
|
||||
// using UnityEditor;
|
||||
//
|
||||
// #if UNITY_EDITOR
|
||||
// [CustomEditor(typeof(UXGroup))]
|
||||
// public class UXGroupEditor : Editor
|
||||
// {
|
||||
// private SerializedProperty m_AllowSwitchOff;
|
||||
// private SerializedProperty m_Buttons;
|
||||
// private SerializedProperty m_OnSelectedChanged;
|
||||
//
|
||||
// private void OnEnable()
|
||||
// {
|
||||
// m_AllowSwitchOff = serializedObject.FindProperty("m_AllowSwitchOff");
|
||||
// m_Buttons = serializedObject.FindProperty("m_Buttons");
|
||||
// m_OnSelectedChanged = serializedObject.FindProperty("onSelectedChanged");
|
||||
// }
|
||||
//
|
||||
// public override void OnInspectorGUI()
|
||||
// {
|
||||
// serializedObject.Update();
|
||||
//
|
||||
// EditorGUILayout.PropertyField(m_AllowSwitchOff);
|
||||
// EditorGUILayout.PropertyField(m_Buttons, true);
|
||||
// EditorGUILayout.PropertyField(m_OnSelectedChanged);
|
||||
//
|
||||
// serializedObject.ApplyModifiedProperties();
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d66e1f78170d455c93d71e71ee8f735a
|
||||
timeCreated: 1744275087
|
||||
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [2023] [ALianBlank of copyright owner][alianblank@outlook.com][https://alianblank.com/]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7171839096c9ab141a0fa296b7558c5f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "AlicizaX.UI.Extension",
|
||||
"rootNamespace": "AlicizaX.UI.Extension",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:5553d74549d54e74cb548b3ab58a8483",
|
||||
"GUID:75b6f2078d190f14dbda4a5b747d709c",
|
||||
"GUID:a19b414bea3b97240a91aeab9a8eab36",
|
||||
"GUID:198eb6af143bbc4488e2779d96697e06",
|
||||
"GUID:80ecb87cae9c44d19824e70ea7229748",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:33661e06c33d31b4c9223810bf503247",
|
||||
"GUID:e9c35c8938f782649bb7e670099ca425"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 760f1778adc613f49a4394fb41ff0bbc
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc3fb1c1caf6fbd40a900ca46f204e07
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,236 +0,0 @@
|
||||
// using UnityEngine;
|
||||
//
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using Cysharp.Threading.Tasks;
|
||||
// using Cysharp.Threading.Tasks.Triggers;
|
||||
// using TMPro;
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.Pool;
|
||||
// using System.Threading;
|
||||
// using System.Runtime.CompilerServices;
|
||||
// using Cysharp.Text;
|
||||
//
|
||||
// namespace text
|
||||
// {
|
||||
// public static class ZeroGCTypewriterPro
|
||||
// {
|
||||
// #region 核心结构体
|
||||
//
|
||||
// private struct TypewriterHandle : IEquatable<TypewriterHandle>
|
||||
// {
|
||||
// public int InstanceID;
|
||||
// public int Version;
|
||||
//
|
||||
// public bool Equals(TypewriterHandle other) =>
|
||||
// InstanceID == other.InstanceID && Version == other.Version;
|
||||
// }
|
||||
//
|
||||
// private struct TypewriterJob
|
||||
// {
|
||||
// public TypewriterHandle Handle;
|
||||
// public TMP_Text Target;
|
||||
// public string Content;
|
||||
// public float Speed;
|
||||
// public int LoopCount;
|
||||
// public Action<int> OnUpdate;
|
||||
// public Action OnComplete;
|
||||
// public CancellationToken ExternalToken;
|
||||
// }
|
||||
//
|
||||
// #endregion
|
||||
//
|
||||
// #region 状态管理
|
||||
//
|
||||
// private static readonly Dictionary<int, ActiveJob> activeJobs =
|
||||
// new Dictionary<int, ActiveJob>(32);
|
||||
//
|
||||
// private struct ActiveJob
|
||||
// {
|
||||
// public int Version;
|
||||
// public CancellationTokenSource Cts;
|
||||
// }
|
||||
//
|
||||
// private static readonly ObjectPool<CancellationTokenSource> ctsPool =
|
||||
// ObjectPool<CancellationTokenSource>(
|
||||
// createFunc: () => new CancellationTokenSource(),
|
||||
// actionOnRelease: cts => cts.Cancel(),
|
||||
// collectionCheck: false
|
||||
// );
|
||||
//
|
||||
// #endregion
|
||||
//
|
||||
// #region 公开接口
|
||||
//
|
||||
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// public static void Play(
|
||||
// this TMP_Text text,
|
||||
// string content,
|
||||
// float charsPerSecond = 30,
|
||||
// int loopCount = 0,
|
||||
// Action<int> onUpdate = null,
|
||||
// Action onComplete = null,
|
||||
// CancellationToken externalToken = default)
|
||||
// {
|
||||
// var instanceID = text.GetInstanceID();
|
||||
//
|
||||
// // 停止当前任务(如果有)
|
||||
// if (activeJobs.TryGetValue(instanceID, out var existingJob))
|
||||
// {
|
||||
// ctsPool.Release(existingJob.Cts);
|
||||
// activeJobs.Remove(instanceID);
|
||||
// }
|
||||
//
|
||||
// // 从对象池获取CTS
|
||||
// var cts = ctsPool.Get();
|
||||
// var linkedToken = CombineTokens(
|
||||
// text.GetCancellationTokenOnDestroy(),
|
||||
// externalToken,
|
||||
// cts.Token
|
||||
// );
|
||||
//
|
||||
// // 创建新任务
|
||||
// var newVersion = activeJobs.TryGetValue(instanceID, out var job) ? job.Version + 1 : 1;
|
||||
//
|
||||
// activeJobs[instanceID] = new ActiveJob
|
||||
// {
|
||||
// Version = newVersion,
|
||||
// Cts = cts
|
||||
// };
|
||||
//
|
||||
// RunJob(new TypewriterJob
|
||||
// {
|
||||
// Handle = new TypewriterHandle
|
||||
// {
|
||||
// InstanceID = instanceID,
|
||||
// Version = newVersion
|
||||
// },
|
||||
// Target = text,
|
||||
// Content = content,
|
||||
// Speed = Mathf.Max(0.01f, charsPerSecond),
|
||||
// LoopCount = loopCount,
|
||||
// OnUpdate = onUpdate,
|
||||
// OnComplete = onComplete,
|
||||
// ExternalToken = linkedToken
|
||||
// }).Forget();
|
||||
// }
|
||||
//
|
||||
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// public static void Stop(this TMP_Text text)
|
||||
// {
|
||||
// var instanceID = text.GetInstanceID();
|
||||
// if (activeJobs.TryGetValue(instanceID, out var job))
|
||||
// {
|
||||
// ctsPool.Release(job.Cts);
|
||||
// activeJobs.Remove(instanceID);
|
||||
// ResetTextState(text);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// #endregion
|
||||
//
|
||||
// #region 核心逻辑
|
||||
//
|
||||
// private static async UniTaskVoid RunJob(TypewriterJob job)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// var target = job.Target;
|
||||
// using (var sb = ZString.CreateStringBuilder())
|
||||
// {
|
||||
// sb.Append(job.Content);
|
||||
// target.text = sb.ToString();
|
||||
// target.ForceMeshUpdate();
|
||||
//
|
||||
// int currentLoop = 0;
|
||||
// var chars = sb.AsSpan();
|
||||
// var interval = 1f / job.Speed;
|
||||
// var timer = 0f;
|
||||
//
|
||||
// while (IsLoopValid(currentLoop, job.LoopCount))
|
||||
// {
|
||||
// target.maxVisibleCharacters = 0;
|
||||
//
|
||||
// for (int i = 0; i < chars.Length; i++)
|
||||
// {
|
||||
// // 版本校验
|
||||
// if (!IsHandleValid(job.Handle)) return;
|
||||
//
|
||||
// // 基于时间的更新
|
||||
// timer += Time.deltaTime;
|
||||
// var required = (int)(timer * job.Speed);
|
||||
//
|
||||
// if (required > i)
|
||||
// {
|
||||
// target.maxVisibleCharacters = required;
|
||||
// job.OnUpdate?.Invoke(required);
|
||||
// }
|
||||
//
|
||||
// await UniTask.Yield(PlayerLoopTiming.Update, job.ExternalToken);
|
||||
// }
|
||||
//
|
||||
// currentLoop++;
|
||||
// timer = 0f;
|
||||
// job.OnComplete?.Invoke();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// finally
|
||||
// {
|
||||
// if (IsHandleValid(job.Handle))
|
||||
// {
|
||||
// activeJobs.Remove(job.Handle.InstanceID);
|
||||
// ResetTextState(job.Target);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// #endregion
|
||||
//
|
||||
// #region 工具方法
|
||||
//
|
||||
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// private static bool IsHandleValid(TypewriterHandle handle)
|
||||
// {
|
||||
// return activeJobs.TryGetValue(handle.InstanceID, out var job) &&
|
||||
// job.Version == handle.Version;
|
||||
// }
|
||||
//
|
||||
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
// private static bool IsLoopValid(int current, int max) =>
|
||||
// max < 0 || current <= max;
|
||||
//
|
||||
// private static CancellationToken CombineTokens(
|
||||
// CancellationToken token1,
|
||||
// CancellationToken token2,
|
||||
// CancellationToken token3)
|
||||
// {
|
||||
// if (token1.CanBeCanceled && token2.CanBeCanceled && token3.CanBeCanceled)
|
||||
// return CancellationTokenSource.CreateLinkedTokenSource(
|
||||
// token1, token2, token3).Token;
|
||||
//
|
||||
// if (token1.CanBeCanceled && token2.CanBeCanceled)
|
||||
// return CancellationTokenSource.CreateLinkedTokenSource(
|
||||
// token1, token2).Token;
|
||||
//
|
||||
// return token1.CanBeCanceled ? token1 : token2;
|
||||
// }
|
||||
//
|
||||
// private static void ResetTextState(TMP_Text text)
|
||||
// {
|
||||
// if (text != null)
|
||||
// {
|
||||
// text.maxVisibleCharacters = int.MaxValue;
|
||||
// text.SetVerticesDirty();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static CancellationToken GetCancellationTokenOnDestroy(this TMP_Text text)
|
||||
// {
|
||||
// return text.gameObject.GetCancellationTokenOnDestroy();
|
||||
// }
|
||||
//
|
||||
// #endregion
|
||||
// }
|
||||
//
|
||||
// }
|
||||
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd18a7ac84917984dbbf48f71872add9
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20aaf5daa7c6f1144be40271786f5aca
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c55a613d7aa2a27448539712f0cf3875
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,196 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class Adapter<T> : IAdapter
|
||||
{
|
||||
protected RecyclerView recyclerView;
|
||||
|
||||
protected List<T> list;
|
||||
protected Action<T> onItemClick;
|
||||
|
||||
protected int choiceIndex = -1;
|
||||
public int ChoiceIndex
|
||||
{
|
||||
get => choiceIndex;
|
||||
set
|
||||
{
|
||||
SetChoiceIndex(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Adapter(RecyclerView recyclerView) : this(recyclerView, new List<T>(), null)
|
||||
{
|
||||
}
|
||||
|
||||
public Adapter(RecyclerView recyclerView, List<T> list) : this(recyclerView, list, null)
|
||||
{
|
||||
}
|
||||
|
||||
public Adapter(RecyclerView recyclerView, List<T> list, Action<T> onItemClick)
|
||||
{
|
||||
this.recyclerView = recyclerView;
|
||||
this.list = list;
|
||||
this.onItemClick = onItemClick;
|
||||
}
|
||||
|
||||
public virtual int GetItemCount()
|
||||
{
|
||||
return list == null ? 0 : list.Count;
|
||||
}
|
||||
|
||||
public virtual int GetRealCount()
|
||||
{
|
||||
return GetItemCount();
|
||||
}
|
||||
|
||||
public virtual string GetViewName(int index)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public virtual void OnBindViewHolder(ViewHolder viewHolder, int index)
|
||||
{
|
||||
if (index < 0 || index >= GetItemCount()) return;
|
||||
|
||||
T data = list[index];
|
||||
|
||||
viewHolder.BindViewData(data);
|
||||
viewHolder.BindItemClick(data, t =>
|
||||
{
|
||||
SetChoiceIndex(index);
|
||||
onItemClick?.Invoke(data);
|
||||
});
|
||||
viewHolder.BindChoiceState(index == choiceIndex);
|
||||
}
|
||||
|
||||
public virtual void NotifyDataChanged()
|
||||
{
|
||||
recyclerView.RequestLayout();
|
||||
recyclerView.Refresh();
|
||||
}
|
||||
|
||||
public virtual void SetList(List<T> list)
|
||||
{
|
||||
this.list = list;
|
||||
recyclerView.Reset();
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public T GetData(int index)
|
||||
{
|
||||
if (index < 0 || index >= GetItemCount()) return default;
|
||||
|
||||
return list[index];
|
||||
}
|
||||
|
||||
public void Add(T item)
|
||||
{
|
||||
list.Add(item);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void AddRange(IEnumerable<T> collection)
|
||||
{
|
||||
list.AddRange(collection);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
list.Insert(index, item);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void InsertRange(int index, IEnumerable<T> collection)
|
||||
{
|
||||
list.InsertRange(index, collection);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Remove(T item)
|
||||
{
|
||||
int index = list.IndexOf(item);
|
||||
RemoveAt(index);
|
||||
}
|
||||
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= GetItemCount()) return;
|
||||
|
||||
list.RemoveAt(index);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void RemoveRange(int index, int count)
|
||||
{
|
||||
list.RemoveRange(index, count);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void RemoveAll(Predicate<T> match)
|
||||
{
|
||||
list.RemoveAll(match);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
list.Clear();
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Reverse(int index, int count)
|
||||
{
|
||||
list.Reverse(index, count);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Reverse()
|
||||
{
|
||||
list.Reverse();
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void Sort(Comparison<T> comparison)
|
||||
{
|
||||
list.Sort(comparison);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void SetOnItemClick(Action<T> onItemClick)
|
||||
{
|
||||
this.onItemClick = onItemClick;
|
||||
}
|
||||
|
||||
protected void SetChoiceIndex(int index)
|
||||
{
|
||||
if (index == choiceIndex) return;
|
||||
|
||||
if (choiceIndex != -1)
|
||||
{
|
||||
if (TryGetViewHolder(choiceIndex, out var viewHolder))
|
||||
{
|
||||
viewHolder.BindChoiceState(false);
|
||||
}
|
||||
}
|
||||
|
||||
choiceIndex = index;
|
||||
|
||||
if (choiceIndex != -1)
|
||||
{
|
||||
if (TryGetViewHolder(choiceIndex, out var viewHolder))
|
||||
{
|
||||
viewHolder.BindChoiceState(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryGetViewHolder(int index, out ViewHolder viewHolder)
|
||||
{
|
||||
viewHolder = recyclerView.ViewProvider.GetViewHolder(index);
|
||||
return viewHolder != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2fe0ab8191b4944db29445f6f796a50
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,128 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class GroupAdapter : Adapter<GroupData>
|
||||
{
|
||||
private readonly List<GroupData> showList = new();
|
||||
private string groupViewName;
|
||||
|
||||
public GroupAdapter(RecyclerView recyclerView, string groupViewName) : base(recyclerView)
|
||||
{
|
||||
this.groupViewName = groupViewName;
|
||||
}
|
||||
|
||||
public GroupAdapter(RecyclerView recyclerView, List<GroupData> list) : base(recyclerView, list)
|
||||
{
|
||||
}
|
||||
|
||||
public GroupAdapter(RecyclerView recyclerView, List<GroupData> list, Action<GroupData> onItemClick) : base(recyclerView, list, onItemClick)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetItemCount()
|
||||
{
|
||||
return showList.Count;
|
||||
}
|
||||
|
||||
public override string GetViewName(int index)
|
||||
{
|
||||
return showList[index].viewName;
|
||||
}
|
||||
|
||||
public override void OnBindViewHolder(ViewHolder viewHolder, int index)
|
||||
{
|
||||
if (index < 0 || index >= GetItemCount()) return;
|
||||
|
||||
GroupData data = showList[index];
|
||||
|
||||
viewHolder.BindViewData(data);
|
||||
viewHolder.BindItemClick(data, t =>
|
||||
{
|
||||
if (data.viewName == groupViewName)
|
||||
{
|
||||
data.bExpand = !data.bExpand;
|
||||
NotifyDataChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetChoiceIndex(index);
|
||||
onItemClick?.Invoke(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override void NotifyDataChanged()
|
||||
{
|
||||
foreach (var data in list)
|
||||
{
|
||||
CreateGroup(data.type);
|
||||
}
|
||||
|
||||
var groupList = showList.FindAll(data => data.viewName == groupViewName);
|
||||
for (int i = 0; i < groupList.Count; i++)
|
||||
{
|
||||
int index = showList.IndexOf(groupList[i]);
|
||||
Collapse(index);
|
||||
if (groupList[i].bExpand)
|
||||
{
|
||||
Expand(index);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var group in groupList)
|
||||
{
|
||||
if (list.FindAll(data => data.type == group.type).Count == 0)
|
||||
{
|
||||
showList.Remove(group);
|
||||
}
|
||||
}
|
||||
|
||||
base.NotifyDataChanged();
|
||||
}
|
||||
|
||||
public override void SetList(List<GroupData> list)
|
||||
{
|
||||
showList.Clear();
|
||||
base.SetList(list);
|
||||
}
|
||||
|
||||
private void CreateGroup(int type)
|
||||
{
|
||||
var groupData = showList.Find(data => data.type == type && data.viewName == groupViewName);
|
||||
if (groupData == null)
|
||||
{
|
||||
groupData = new GroupData(type, groupViewName, type.ToString());
|
||||
showList.Add(groupData);
|
||||
}
|
||||
}
|
||||
|
||||
public void Expand(int index)
|
||||
{
|
||||
var expandList = list.FindAll(data => data.type == showList[index].type);
|
||||
showList.InsertRange(index + 1, expandList);
|
||||
}
|
||||
|
||||
public void Collapse(int index)
|
||||
{
|
||||
var collapseList = showList.FindAll(data => data.type == showList[index].type && data.viewName != groupViewName);
|
||||
showList.RemoveRange(index + 1, collapseList.Count);
|
||||
}
|
||||
}
|
||||
|
||||
public class GroupData
|
||||
{
|
||||
public bool bExpand;
|
||||
public int type;
|
||||
public string viewName;
|
||||
public string name;
|
||||
|
||||
public GroupData(int type, string viewName, string name)
|
||||
{
|
||||
this.type = type;
|
||||
this.viewName = viewName;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1afc560670c303d42b28cc143ed25a8f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,15 +0,0 @@
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public interface IAdapter
|
||||
{
|
||||
int GetItemCount();
|
||||
|
||||
int GetRealCount();
|
||||
|
||||
string GetViewName(int index);
|
||||
|
||||
void OnBindViewHolder(ViewHolder viewHolder, int index);
|
||||
|
||||
void NotifyDataChanged();
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc979439548585f4097747c34ed12270
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class LoopAdapter<T> : Adapter<T>
|
||||
{
|
||||
public LoopAdapter(RecyclerView recyclerView) : base(recyclerView)
|
||||
{
|
||||
}
|
||||
|
||||
public LoopAdapter(RecyclerView recyclerView, List<T> list) : base(recyclerView, list)
|
||||
{
|
||||
}
|
||||
|
||||
public LoopAdapter(RecyclerView recyclerView, List<T> list, Action<T> onItemClick) : base(recyclerView, list, onItemClick)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetItemCount()
|
||||
{
|
||||
return int.MaxValue;
|
||||
}
|
||||
|
||||
public override int GetRealCount()
|
||||
{
|
||||
return list == null ? 0 : list.Count;
|
||||
}
|
||||
|
||||
public override void OnBindViewHolder(ViewHolder viewHolder, int index)
|
||||
{
|
||||
index %= list.Count;
|
||||
base.OnBindViewHolder(viewHolder, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 852ebd0fa448a374aad55404886bfaae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class MixedAdapter : Adapter<MixedData>
|
||||
{
|
||||
public MixedAdapter(RecyclerView recyclerView) : base(recyclerView)
|
||||
{
|
||||
}
|
||||
|
||||
public MixedAdapter(RecyclerView recyclerView, List<MixedData> list) : base(recyclerView, list)
|
||||
{
|
||||
}
|
||||
|
||||
public MixedAdapter(RecyclerView recyclerView, List<MixedData> list, Action<MixedData> onItemClick) : base(recyclerView, list, onItemClick)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetViewName(int index)
|
||||
{
|
||||
return list[index].viewName;
|
||||
}
|
||||
}
|
||||
|
||||
public class MixedData
|
||||
{
|
||||
public string viewName;
|
||||
public string name;
|
||||
public string icon;
|
||||
public int number;
|
||||
public int percent;
|
||||
|
||||
public MixedData(string viewName, string name, string icon, int number, int percent)
|
||||
{
|
||||
this.viewName = viewName;
|
||||
this.name = name;
|
||||
this.icon = icon;
|
||||
this.number = number;
|
||||
this.percent = percent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c335290acc1c8b45aa87e6fc2b00b0c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,192 +0,0 @@
|
||||
using System;
|
||||
|
||||
public class EaseUtil
|
||||
{
|
||||
public static double EaseInSine(float x)
|
||||
{
|
||||
return 1 - Math.Cos(x * Math.PI / 2);
|
||||
}
|
||||
|
||||
public static double EaseOutSine(float x)
|
||||
{
|
||||
return Math.Sin(x * Math.PI / 2);
|
||||
}
|
||||
|
||||
public static double EaseInOutSine(float x)
|
||||
{
|
||||
return -(Math.Cos(Math.PI * x) - 1) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInQuad(float x)
|
||||
{
|
||||
return x * x;
|
||||
}
|
||||
|
||||
public static double EaseOutQuad(float x)
|
||||
{
|
||||
return 1 - (1 - x) * (1 - x);
|
||||
}
|
||||
|
||||
public static double EaseInOutQuad(float x)
|
||||
{
|
||||
return x < 0.5 ? 2 * x * x : 1 - Math.Pow(-2 * x + 2, 2) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInQuart(float x)
|
||||
{
|
||||
return Math.Pow(x, 4);
|
||||
}
|
||||
|
||||
public static double EaseOutQuart(float x)
|
||||
{
|
||||
return 1 - Math.Pow(1 - x, 4);
|
||||
}
|
||||
|
||||
public static double EaseInOutQuart(float x)
|
||||
{
|
||||
return x < 0.5 ? 8 * x * x * x * x : 1 - Math.Pow(-2 * x + 2, 4) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInCubic(float x)
|
||||
{
|
||||
return Math.Pow(x, 3);
|
||||
}
|
||||
|
||||
public static double EaseOutCubic(float x)
|
||||
{
|
||||
return 1 - Math.Pow(1 - x, 3);
|
||||
}
|
||||
|
||||
public static double EaseInOutCubic(float x)
|
||||
{
|
||||
return x < 0.5f ? 4 * x * x * x : 1 - Math.Pow(-2 * x + 2, 3) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInQuint(float x)
|
||||
{
|
||||
return Math.Pow(x, 5);
|
||||
}
|
||||
|
||||
public static double EaseOutQuint(float x)
|
||||
{
|
||||
return 1 - Math.Pow(1 - x, 5);
|
||||
}
|
||||
|
||||
public static double EaseInOutQuint(float x)
|
||||
{
|
||||
return x < 0.5f ? 16 * Math.Pow(x, 5) : 1 - Math.Pow(-2 * x + 2, 5) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInExpo(float x)
|
||||
{
|
||||
return x == 0 ? 0 : Math.Pow(2, 10 * x - 10);
|
||||
}
|
||||
|
||||
public static double EaseOutExpo(float x)
|
||||
{
|
||||
return x == 1 ? 1 : 1 - Math.Pow(2, -10 * x);
|
||||
}
|
||||
|
||||
public static double EaseInOutExpo(float x)
|
||||
{
|
||||
return x == 0 ? 0 :
|
||||
x == 1 ? 1 :
|
||||
x < 0.5 ? Math.Pow(2, 20 * x - 10) / 2 :
|
||||
(2 - Math.Pow(2, -20 * x + 10)) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInCirc(float x)
|
||||
{
|
||||
return 1 - Math.Sqrt(1 - Math.Pow(x, 2));
|
||||
}
|
||||
|
||||
public static double EaseOutCirc(float x)
|
||||
{
|
||||
return Math.Sqrt(1 - Math.Pow(x - 1, 2));
|
||||
}
|
||||
|
||||
public static double EaseInOutCirc(float x)
|
||||
{
|
||||
return x < 0.5 ? (1 - Math.Sqrt(1 - Math.Pow(2 * x, 2))) / 2 : (Math.Sqrt(1 - Math.Pow(-2 * x + 2, 2)) + 1) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInBack(float x)
|
||||
{
|
||||
double c1 = 1.70158;
|
||||
double c3 = c1 + 1;
|
||||
|
||||
return c3 * x * x * x - c1 * x * x;
|
||||
}
|
||||
|
||||
public static double EaseOutBack(float x)
|
||||
{
|
||||
double c1 = 1.70158;
|
||||
double c3 = c1 + 1;
|
||||
|
||||
return 1 + c3 * Math.Pow(x - 1, 3) + c1 * Math.Pow(x - 1, 2);
|
||||
}
|
||||
|
||||
public static double EaseInOutBack(float x)
|
||||
{
|
||||
double c1 = 1.70158;
|
||||
double c2 = c1 * 1.525;
|
||||
|
||||
return x < 0.5 ?
|
||||
Math.Pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 :
|
||||
(Math.Pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;
|
||||
}
|
||||
|
||||
public static double EaseInElastic(float x)
|
||||
{
|
||||
double c4 = 2 * Math.PI / 3;
|
||||
return x == 0 ? 0 : x == 1 ? 1 : -Math.Pow(2, 10 * x - 10) * Math.Sin((x * 10 - 10.75) * c4);
|
||||
}
|
||||
|
||||
public static double EaseOutElastic(float x)
|
||||
{
|
||||
double c4 = 2 * Math.PI / 3;
|
||||
return x == 0 ? 0 : x == 1 ? 1 : Math.Pow(2, -10 * x) * Math.Sin((x * 10 - 0.75) * c4) + 1;
|
||||
}
|
||||
|
||||
public static double EaseInOutElastic(float x)
|
||||
{
|
||||
double c5 = 2 * Math.PI / 4.5;
|
||||
return x == 0 ? 0 :
|
||||
x == 1 ? 1 :
|
||||
x < 0.5 ? -(Math.Pow(2, 20 * x - 10) * Math.Sin((20 * x - 11.125) * c5)) / 2 :
|
||||
Math.Pow(2, -20 * x + 10) * Math.Sin((20 * x - 11.125) * c5) / 2 + 1;
|
||||
}
|
||||
|
||||
public static double EaseInBounce(float x)
|
||||
{
|
||||
return 1 - EaseOutBounce(1 - x);
|
||||
}
|
||||
|
||||
public static double EaseOutBounce(float x)
|
||||
{
|
||||
double n1 = 7.5625;
|
||||
double d1 = 2.75;
|
||||
|
||||
if (x < 1 / d1)
|
||||
{
|
||||
return n1 * x * x;
|
||||
}
|
||||
else if (x < 2 / d1)
|
||||
{
|
||||
return n1 * (x -= (float)(1.5 / d1)) * x + 0.75;
|
||||
}
|
||||
else if (x < 2.5 / d1)
|
||||
{
|
||||
return n1 * (x -= (float)(2.25 / d1)) * x + 0.9375;
|
||||
}
|
||||
else
|
||||
{
|
||||
return n1 * (x -= (float)(2.625 / d1)) * x + 0.984375;
|
||||
}
|
||||
}
|
||||
|
||||
public static double EaseInOutBounce(float x)
|
||||
{
|
||||
return x < 0.5 ? (1 - EaseOutBounce(1 - 2 * x)) / 2 : (1 + EaseOutBounce(2 * x - 1)) / 2;
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d42e2db77425447490cb9f68003e818b
|
||||
timeCreated: 1741771999
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2c36f0a0862000438099a52b9b5e69c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
[Serializable]
|
||||
public class AlignableLinearLayoutManager : LinearLayoutManager
|
||||
{
|
||||
[SerializeField] private float alignmentCount = 0f; // 对齐比例 (0=顶部, 1=底部, 0.5=居中)
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
float position;
|
||||
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position = index * (lineHeight + spacing.y) - ScrollPosition ;
|
||||
return new Vector2(0, position + padding.y);
|
||||
}
|
||||
|
||||
position = index * (lineHeight + spacing.x) - ScrollPosition ;
|
||||
var a = new Vector2(position + padding.x, 0);
|
||||
return a;
|
||||
}
|
||||
|
||||
public override float IndexToPosition(int index)
|
||||
{
|
||||
if (index < 0 || index >= adapter.GetItemCount()) return 0;
|
||||
|
||||
float len, viewLength, position;
|
||||
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
len = index * (lineHeight + spacing.y) - ((lineHeight + spacing.y) * alignmentCount);
|
||||
viewLength = viewportSize.y;
|
||||
position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = index * (lineHeight + spacing.x);
|
||||
viewLength = viewportSize.x;
|
||||
position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5cb3f76e0f84a7aa75959e194f524b5
|
||||
timeCreated: 1748588163
|
||||
@ -1,117 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class CircleLayoutManager : LayoutManager
|
||||
{
|
||||
private float radius;
|
||||
private float intervalAngle;
|
||||
|
||||
private new CircleDirection direction;
|
||||
[SerializeField]
|
||||
private float initalAngle;
|
||||
|
||||
|
||||
public CircleLayoutManager(CircleDirection direction = CircleDirection.Positive)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public CircleLayoutManager()
|
||||
{
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentSize()
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(0);
|
||||
radius = (Mathf.Min(viewportSize.x, viewportSize.y) - Mathf.Min(size.x, size.y)) / 2f - Mathf.Max(padding.x, padding.y);
|
||||
intervalAngle = adapter.GetItemCount() > 0 ? 360f / adapter.GetItemCount() : 0;
|
||||
|
||||
return viewportSize;
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentOffset()
|
||||
{
|
||||
return Vector2.zero;
|
||||
}
|
||||
|
||||
public override Vector2 CalculateViewportOffset()
|
||||
{
|
||||
return Vector2.zero;
|
||||
}
|
||||
|
||||
public override void Layout(ViewHolder viewHolder, int index)
|
||||
{
|
||||
viewHolder.RectTransform.anchoredPosition3D = CalculatePosition(index);
|
||||
}
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
float angle = index * intervalAngle;
|
||||
angle = direction == CircleDirection.Positive ? angle : -angle;
|
||||
angle += initalAngle + ScrollPosition;
|
||||
float radian = angle * (Mathf.PI / 180f);
|
||||
float x = radius * Mathf.Sin(radian);
|
||||
float y = radius * Mathf.Cos(radian);
|
||||
|
||||
return new Vector2(x, y);
|
||||
}
|
||||
|
||||
public override int GetStartIndex()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override int GetEndIndex()
|
||||
{
|
||||
return adapter.GetItemCount() - 1;
|
||||
}
|
||||
|
||||
public override bool IsFullVisibleStart(int index) => false;
|
||||
|
||||
public override bool IsFullInvisibleStart(int index) => false;
|
||||
|
||||
public override bool IsFullVisibleEnd(int index) => false;
|
||||
|
||||
public override bool IsFullInvisibleEnd(int index) => false;
|
||||
|
||||
public override bool IsVisible(int index) => true;
|
||||
|
||||
public override float IndexToPosition(int index)
|
||||
{
|
||||
float position = index * intervalAngle;
|
||||
|
||||
return -position;
|
||||
}
|
||||
|
||||
public override int PositionToIndex(float position)
|
||||
{
|
||||
int index = Mathf.RoundToInt(position / intervalAngle);
|
||||
return -index;
|
||||
}
|
||||
|
||||
public override void DoItemAnimation()
|
||||
{
|
||||
List<ViewHolder> viewHolders = viewProvider.ViewHolders;
|
||||
for (int i = 0; i < viewHolders.Count; i++)
|
||||
{
|
||||
float angle = i * intervalAngle + initalAngle;
|
||||
angle = direction == CircleDirection.Positive ? angle + ScrollPosition : angle - ScrollPosition;
|
||||
float delta = (angle - initalAngle) % 360;
|
||||
delta = delta < 0 ? delta + 360 : delta;
|
||||
delta = delta > 180 ? 360 - delta : delta;
|
||||
float scale = delta < intervalAngle ? (1.4f - delta / intervalAngle) : 1;
|
||||
scale = Mathf.Max(scale, 1);
|
||||
|
||||
viewHolders[i].RectTransform.localScale = Vector3.one * scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CircleDirection
|
||||
{
|
||||
Positive,
|
||||
Negative
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 158658be786595e46a209d2b2162b4e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,131 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class GridLayoutManager : LayoutManager
|
||||
{
|
||||
private Vector2 cellSize;
|
||||
|
||||
public GridLayoutManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public GridLayoutManager(int unit = 1)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentSize()
|
||||
{
|
||||
cellSize = viewProvider.CalculateViewSize(0);
|
||||
|
||||
int row = Mathf.CeilToInt(adapter.GetItemCount() / (float)unit);
|
||||
float len;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
len = row * (cellSize.y + spacing.y) - spacing.y;
|
||||
return new Vector2(contentSize.x, len + padding.y * 2);
|
||||
}
|
||||
|
||||
len = row * (cellSize.x + spacing.x) - spacing.x;
|
||||
return new Vector2(len, contentSize.y + padding.x * 2);
|
||||
}
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
int row = index / unit;
|
||||
int column = index % unit;
|
||||
float x, y;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
x = column * (cellSize.x + spacing.x);
|
||||
y = row * (cellSize.y + spacing.y) - ScrollPosition;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = row * (cellSize.x + spacing.x) - ScrollPosition;
|
||||
y = column * (cellSize.y + spacing.y);
|
||||
}
|
||||
|
||||
return new Vector2(x + padding.x, y + padding.y);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentOffset()
|
||||
{
|
||||
float width, height;
|
||||
if (alignment == Alignment.Center)
|
||||
{
|
||||
width = Mathf.Min(contentSize.x, viewportSize.x);
|
||||
height = Mathf.Min(contentSize.y, viewportSize.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = viewportSize.x;
|
||||
height = viewportSize.y;
|
||||
}
|
||||
|
||||
return new Vector2((width - cellSize.x) / 2, (height - cellSize.y) / 2);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateViewportOffset()
|
||||
{
|
||||
float width, height;
|
||||
if (alignment == Alignment.Center)
|
||||
{
|
||||
width = Mathf.Min(contentSize.x, viewportSize.x);
|
||||
height = Mathf.Min(contentSize.y, viewportSize.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = viewportSize.x;
|
||||
height = viewportSize.y;
|
||||
}
|
||||
|
||||
return new Vector2((width - cellSize.x) / 2, (height - cellSize.y) / 2);
|
||||
}
|
||||
|
||||
public override int GetStartIndex()
|
||||
{
|
||||
float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x;
|
||||
int index = Mathf.FloorToInt(ScrollPosition / len) * unit;
|
||||
return Mathf.Max(0, index);
|
||||
}
|
||||
|
||||
public override int GetEndIndex()
|
||||
{
|
||||
float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x;
|
||||
int index = Mathf.FloorToInt((ScrollPosition + viewLength) / len) * unit;
|
||||
return Mathf.Min(index, adapter.GetItemCount() - 1);
|
||||
}
|
||||
|
||||
public override float IndexToPosition(int index)
|
||||
{
|
||||
int row = index / unit;
|
||||
float len, viewLength, position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
len = row * (cellSize.y + spacing.y);
|
||||
viewLength = viewportSize.y;
|
||||
position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = row * (cellSize.x + spacing.x);
|
||||
viewLength = viewportSize.x;
|
||||
position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
public override int PositionToIndex(float position)
|
||||
{
|
||||
float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x;
|
||||
int index = Mathf.RoundToInt(position / len);
|
||||
|
||||
return index * unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e4f9a076f276cd4a8db0055fd37e220
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,115 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public interface ILayoutManager
|
||||
{
|
||||
/// <summary>
|
||||
/// 滚动时,刷新整个页面的布局
|
||||
/// </summary>
|
||||
void UpdateLayout();
|
||||
|
||||
/// <summary>
|
||||
/// 为 ViewHolder 设置布局
|
||||
/// </summary>
|
||||
/// <param name="viewHolder"></param>
|
||||
/// <param name="index"></param>
|
||||
void Layout(ViewHolder viewHolder, int index);
|
||||
|
||||
/// <summary>
|
||||
/// 设置 Content 大小
|
||||
/// </summary>
|
||||
void SetContentSize();
|
||||
|
||||
/// <summary>
|
||||
/// 计算 Content 的大小
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Vector2 CalculateContentSize();
|
||||
|
||||
/// <summary>
|
||||
/// 计算第 index 个 ViewHolder 到顶部的距离
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
Vector2 CalculatePosition(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 计算 ViewHolder 相对于内容长度的偏移
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Vector2 CalculateContentOffset();
|
||||
|
||||
/// <summary>
|
||||
/// 计算 ViewHolder 相对于视口的偏移
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Vector2 CalculateViewportOffset();
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前显示的第一个 ViewHolder 下标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
int GetStartIndex();
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前显示的最后一个 ViewHolder 下标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
int GetEndIndex();
|
||||
|
||||
/// <summary>
|
||||
/// 数据下标转换成在布局中对应的位置
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
float IndexToPosition(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 在布局中的位置转换成数据下标
|
||||
/// </summary>
|
||||
/// <param name="position"></param>
|
||||
/// <returns></returns>
|
||||
int PositionToIndex(float position);
|
||||
|
||||
/// <summary>
|
||||
/// 滚动时,item 对应的动画
|
||||
/// </summary>
|
||||
void DoItemAnimation();
|
||||
|
||||
/// <summary>
|
||||
/// 判断第一个 ViewHolder 是否完全可见
|
||||
/// </summary>
|
||||
/// <param name="index">数据的真实下标</param>
|
||||
/// <returns></returns>
|
||||
bool IsFullVisibleStart(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 判断第一个 ViewHolder 是否完全不可见
|
||||
/// </summary>
|
||||
/// <param name="index">数据的真实下标</param>
|
||||
/// <returns></returns>
|
||||
bool IsFullInvisibleStart(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 判定最后一个 ViewHolder 是否完全可见
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
bool IsFullVisibleEnd(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 判定最后一个 ViewHolder 是否完全不可见
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
bool IsFullInvisibleEnd(int index);
|
||||
|
||||
/// <summary>
|
||||
/// 判定第 index ViewHolder是否可见
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
bool IsVisible(int index);
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09e4099cf54916a41b7da73277ab988a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,248 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class LayoutManager : ILayoutManager
|
||||
{
|
||||
protected Vector2 viewportSize;
|
||||
|
||||
public Vector2 ViewportSize
|
||||
{
|
||||
get => viewportSize;
|
||||
private set => viewportSize = value;
|
||||
}
|
||||
|
||||
protected Vector2 contentSize;
|
||||
|
||||
public Vector2 ContentSize
|
||||
{
|
||||
get => contentSize;
|
||||
private set => contentSize = value;
|
||||
}
|
||||
|
||||
protected Vector2 contentOffset;
|
||||
|
||||
public Vector2 ContentOffset
|
||||
{
|
||||
get => contentOffset;
|
||||
private set => contentOffset = value;
|
||||
}
|
||||
|
||||
protected Vector2 viewportOffset;
|
||||
|
||||
public Vector2 ViewportOffset
|
||||
{
|
||||
get => viewportOffset;
|
||||
private set => viewportOffset = value;
|
||||
}
|
||||
|
||||
protected IAdapter adapter;
|
||||
|
||||
public IAdapter Adapter
|
||||
{
|
||||
get => adapter;
|
||||
set => adapter = value;
|
||||
}
|
||||
|
||||
protected ViewProvider viewProvider;
|
||||
|
||||
public ViewProvider ViewProvider
|
||||
{
|
||||
get => viewProvider;
|
||||
set => viewProvider = value;
|
||||
}
|
||||
|
||||
protected RecyclerView recyclerView;
|
||||
|
||||
public virtual RecyclerView RecyclerView
|
||||
{
|
||||
get => recyclerView;
|
||||
set => recyclerView = value;
|
||||
}
|
||||
|
||||
protected Direction direction;
|
||||
|
||||
public Direction Direction
|
||||
{
|
||||
get => direction;
|
||||
set => direction = value;
|
||||
}
|
||||
|
||||
protected Alignment alignment;
|
||||
|
||||
public Alignment Alignment
|
||||
{
|
||||
get => alignment;
|
||||
set => alignment = value;
|
||||
}
|
||||
|
||||
protected Vector2 spacing;
|
||||
|
||||
public Vector2 Spacing
|
||||
{
|
||||
get => spacing;
|
||||
set => spacing = value;
|
||||
}
|
||||
|
||||
protected Vector2 padding;
|
||||
|
||||
public Vector2 Padding
|
||||
{
|
||||
get => padding;
|
||||
set => padding = value;
|
||||
}
|
||||
|
||||
protected int unit = 1;
|
||||
|
||||
public int Unit
|
||||
{
|
||||
get => unit;
|
||||
set => unit = value;
|
||||
}
|
||||
|
||||
protected bool canScroll;
|
||||
|
||||
public bool CanScroll
|
||||
{
|
||||
get => canScroll;
|
||||
set => canScroll = value;
|
||||
}
|
||||
|
||||
public float ScrollPosition => recyclerView.GetScrollPosition();
|
||||
|
||||
public LayoutManager()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetContentSize()
|
||||
{
|
||||
viewportSize = recyclerView.GetComponent<RectTransform>().rect.size;
|
||||
contentSize = CalculateContentSize();
|
||||
contentOffset = CalculateContentOffset();
|
||||
viewportOffset = CalculateViewportOffset();
|
||||
}
|
||||
|
||||
public void UpdateLayout()
|
||||
{
|
||||
foreach (var viewHolder in viewProvider.ViewHolders)
|
||||
{
|
||||
Layout(viewHolder, viewHolder.Index);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Layout(ViewHolder viewHolder, int index)
|
||||
{
|
||||
Vector2 pos = CalculatePosition(index);
|
||||
Vector3 position = direction == Direction.Vertical ? new Vector3(pos.x - contentOffset.x, -pos.y + contentOffset.y, 0) : new Vector3(pos.x - contentOffset.x, -pos.y + contentOffset.y, 0);
|
||||
viewHolder.RectTransform.anchoredPosition3D = position;
|
||||
}
|
||||
|
||||
public abstract Vector2 CalculateContentSize();
|
||||
|
||||
public abstract Vector2 CalculatePosition(int index);
|
||||
|
||||
public abstract Vector2 CalculateContentOffset();
|
||||
|
||||
public abstract Vector2 CalculateViewportOffset();
|
||||
|
||||
public abstract int GetStartIndex();
|
||||
|
||||
public abstract int GetEndIndex();
|
||||
|
||||
public abstract float IndexToPosition(int index);
|
||||
|
||||
public abstract int PositionToIndex(float position);
|
||||
|
||||
public virtual void DoItemAnimation()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool IsFullVisibleStart(int index)
|
||||
{
|
||||
Vector2 vector2 = CalculatePosition(index);
|
||||
float position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
return position + GetOffset() >= 0;
|
||||
}
|
||||
|
||||
public virtual bool IsFullInvisibleStart(int index)
|
||||
{
|
||||
Vector2 vector2 = CalculatePosition(index + unit);
|
||||
float position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
return position + GetOffset() < 0;
|
||||
}
|
||||
|
||||
public virtual bool IsFullVisibleEnd(int index)
|
||||
{
|
||||
Vector2 vector2 = CalculatePosition(index + unit);
|
||||
float position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
return position + GetOffset() <= viewLength;
|
||||
}
|
||||
|
||||
public virtual bool IsFullInvisibleEnd(int index)
|
||||
{
|
||||
Vector2 vector2 = CalculatePosition(index);
|
||||
float position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
return position + GetOffset() > viewLength;
|
||||
}
|
||||
|
||||
public virtual bool IsVisible(int index)
|
||||
{
|
||||
float position, viewLength;
|
||||
viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
|
||||
Vector2 vector2 = CalculatePosition(index);
|
||||
position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
if (position + GetOffset() > 0 && position + GetOffset() <= viewLength)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
vector2 = CalculatePosition(index + unit);
|
||||
position = direction == Direction.Vertical ? vector2.y : vector2.x;
|
||||
if (position + GetOffset() > 0 && position + GetOffset() <= viewLength)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected virtual float GetFitContentSize()
|
||||
{
|
||||
float len;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
len = alignment == Alignment.Center ? Mathf.Min(contentSize.y, viewportSize.y) : viewportSize.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = alignment == Alignment.Center ? Mathf.Min(contentSize.x, viewportSize.x) : viewportSize.x;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
protected virtual float GetOffset()
|
||||
{
|
||||
return direction == Direction.Vertical ? -contentOffset.y + viewportOffset.y : -contentOffset.x + viewportOffset.x;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Direction
|
||||
{
|
||||
Vertical,
|
||||
Horizontal,
|
||||
Custom,
|
||||
}
|
||||
|
||||
public enum Alignment
|
||||
{
|
||||
Left,
|
||||
Center,
|
||||
Top
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 959827c7e00900b47844bd9482d829ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,108 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class LinearLayoutManager : LayoutManager
|
||||
{
|
||||
protected float lineHeight;
|
||||
|
||||
public LinearLayoutManager()
|
||||
{
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentSize()
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(0);
|
||||
lineHeight = direction == Direction.Vertical ? size.y : size.x;
|
||||
|
||||
int index = adapter.GetItemCount();
|
||||
float position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position = index * (lineHeight + spacing.y) - spacing.y;
|
||||
return new Vector2(contentSize.x, position + padding.y * 2);
|
||||
}
|
||||
|
||||
position = index * (lineHeight + spacing.x) - spacing.x;
|
||||
return new Vector2(position + padding.x * 2, contentSize.y);
|
||||
}
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
float position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position = index * (lineHeight + spacing.y) - ScrollPosition;
|
||||
return new Vector2(0, position + padding.y);
|
||||
}
|
||||
|
||||
position = index * (lineHeight + spacing.x) - ScrollPosition;
|
||||
return new Vector2(position + padding.x, 0);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentOffset()
|
||||
{
|
||||
float len = GetFitContentSize();
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
return new Vector2(0, (len - lineHeight) / 2);
|
||||
}
|
||||
|
||||
return new Vector2((len - lineHeight) / 2, 0);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateViewportOffset()
|
||||
{
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
return new Vector2(0, (viewportSize.y - lineHeight) / 2);
|
||||
}
|
||||
|
||||
return new Vector2((viewportSize.x - lineHeight) / 2, 0);
|
||||
}
|
||||
|
||||
public override int GetStartIndex()
|
||||
{
|
||||
float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x;
|
||||
int index = Mathf.FloorToInt(ScrollPosition / len);
|
||||
return Mathf.Max(0, index);
|
||||
}
|
||||
|
||||
public override int GetEndIndex()
|
||||
{
|
||||
float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x;
|
||||
int index = Mathf.FloorToInt((ScrollPosition + viewLength) / len);
|
||||
return Mathf.Min(index, adapter.GetItemCount() - 1);
|
||||
}
|
||||
|
||||
public override float IndexToPosition(int index)
|
||||
{
|
||||
if (index < 0 || index >= adapter.GetItemCount()) return 0;
|
||||
|
||||
float len, viewLength, position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
len = index * (lineHeight + spacing.y);
|
||||
viewLength = viewportSize.y;
|
||||
position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = index * (lineHeight + spacing.x);
|
||||
viewLength = viewportSize.x;
|
||||
position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
public override int PositionToIndex(float position)
|
||||
{
|
||||
float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x;
|
||||
int index = Mathf.RoundToInt(position / len);
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36d9270c4a025694397715d3c16cde7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,136 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class MixedLayoutManager : LayoutManager
|
||||
{
|
||||
public MixedLayoutManager() { }
|
||||
|
||||
public override Vector2 CalculateContentSize()
|
||||
{
|
||||
int index = adapter.GetItemCount();
|
||||
float position = 0;
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
position += GetLength(i);
|
||||
}
|
||||
|
||||
return direction == Direction.Vertical ?
|
||||
new Vector2(contentSize.x, position - spacing.y + padding.y * 2) :
|
||||
new Vector2(position - spacing.x + padding.x * 2, contentSize.y);
|
||||
}
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
// TODO 优化点,将 position 定义成全局变量
|
||||
float position = 0;
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
position += GetLength(i);
|
||||
}
|
||||
position -= ScrollPosition;
|
||||
return direction == Direction.Vertical ? new Vector2(0, position + padding.y) : new Vector2(position + padding.x, 0);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentOffset()
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(0);
|
||||
float len = GetFitContentSize();
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
return new Vector2(0, (len - size.y) / 2);
|
||||
}
|
||||
return new Vector2((len - size.x) / 2, 0);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateViewportOffset()
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(0);
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
return new Vector2(0, (viewportSize.y - size.y) / 2);
|
||||
}
|
||||
return new Vector2((viewportSize.x - size.x) / 2, 0);
|
||||
}
|
||||
|
||||
public override int GetStartIndex()
|
||||
{
|
||||
float position = 0;
|
||||
float contentPosition = ScrollPosition;
|
||||
int itemCount = adapter.GetItemCount();
|
||||
for (int i = 0; i < itemCount; i++)
|
||||
{
|
||||
position += GetLength(i);
|
||||
|
||||
if (position > contentPosition)
|
||||
{
|
||||
return Mathf.Max(0, i);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override int GetEndIndex()
|
||||
{
|
||||
float position = 0;
|
||||
float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x;
|
||||
int itemCount = adapter.GetItemCount();
|
||||
for (int i = 0; i < itemCount; i++)
|
||||
{
|
||||
position += GetLength(i);
|
||||
|
||||
if (position > ScrollPosition + viewLength)
|
||||
{
|
||||
return Mathf.Min(i, adapter.GetItemCount() - 1); ;
|
||||
}
|
||||
}
|
||||
return itemCount - 1;
|
||||
}
|
||||
|
||||
private float GetLength(int index)
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(index);
|
||||
if (index < adapter.GetItemCount() - 1)
|
||||
{
|
||||
size += spacing;
|
||||
}
|
||||
float len = direction == Direction.Vertical ? size.y : size.x;
|
||||
return len;
|
||||
}
|
||||
|
||||
public override float IndexToPosition(int index)
|
||||
{
|
||||
Vector2 position = CalculatePosition(index);
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position.y = Mathf.Max(0, position.y);
|
||||
position.y = Mathf.Min(position.y, contentSize.y - viewportSize.y);
|
||||
return position.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
position.x = Mathf.Max(0, position.x);
|
||||
position.x = Mathf.Min(position.x, contentSize.x - viewportSize.x);
|
||||
return position.x;
|
||||
}
|
||||
}
|
||||
|
||||
public override int PositionToIndex(float position)
|
||||
{
|
||||
float len = 0;
|
||||
|
||||
int itemCount = adapter.GetItemCount();
|
||||
for (int i = 0; i < itemCount; i++)
|
||||
{
|
||||
len += GetLength(i);
|
||||
|
||||
if (len >= position)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d296ceb3ab7786f43a94281a728d5205
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class PageLayoutManager : LinearLayoutManager
|
||||
{
|
||||
[SerializeField]
|
||||
private float minScale;
|
||||
|
||||
public PageLayoutManager()
|
||||
{
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentSize()
|
||||
{
|
||||
Vector2 size = viewProvider.CalculateViewSize(0);
|
||||
lineHeight = direction == Direction.Vertical ? size.y : size.x;
|
||||
|
||||
int index = adapter.GetItemCount();
|
||||
float position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position = index * (lineHeight + spacing.y) - spacing.y;
|
||||
position += viewportSize.y - lineHeight;
|
||||
return new Vector2(contentSize.x, position + padding.y * 2);
|
||||
}
|
||||
|
||||
position = index * (lineHeight + spacing.x) - spacing.x;
|
||||
position += viewportSize.x - lineHeight;
|
||||
return new Vector2(position + padding.x * 2, contentSize.y);
|
||||
}
|
||||
|
||||
public override Vector2 CalculatePosition(int index)
|
||||
{
|
||||
float position;
|
||||
if (direction == Direction.Vertical)
|
||||
{
|
||||
position = index * (lineHeight + spacing.y) - ScrollPosition;
|
||||
return new Vector2(0, position + padding.y);
|
||||
}
|
||||
|
||||
position = index * (lineHeight + spacing.x) - ScrollPosition;
|
||||
return new Vector2(position + padding.x, 0);
|
||||
}
|
||||
|
||||
public override Vector2 CalculateContentOffset()
|
||||
{
|
||||
return Vector2.zero;
|
||||
}
|
||||
|
||||
public override Vector2 CalculateViewportOffset()
|
||||
{
|
||||
return Vector2.zero;
|
||||
}
|
||||
|
||||
protected override float GetOffset()
|
||||
{
|
||||
float offset = direction == Direction.Vertical ? viewportSize.y - lineHeight : viewportSize.x - lineHeight;
|
||||
return offset / 2;
|
||||
}
|
||||
|
||||
public override int PositionToIndex(float position)
|
||||
{
|
||||
float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x;
|
||||
float pos = IndexToPosition(recyclerView.CurrentIndex);
|
||||
// 根据是前划还是后划,来加减偏移量
|
||||
int index = position > pos ? Mathf.RoundToInt(position / len + 0.25f) : Mathf.RoundToInt(position / len - 0.25f);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
public override void DoItemAnimation()
|
||||
{
|
||||
List<ViewHolder> viewHolders = viewProvider.ViewHolders;
|
||||
for (int i = 0; i < viewHolders.Count; i++)
|
||||
{
|
||||
float viewPos = direction == Direction.Vertical ? -viewHolders[i].RectTransform.anchoredPosition.y : viewHolders[i].RectTransform.anchoredPosition.x;
|
||||
float scale = 1 - Mathf.Min(Mathf.Abs(viewPos) * 0.0006f, 1f);
|
||||
scale = Mathf.Max(scale, minScale);
|
||||
|
||||
viewHolders[i].RectTransform.localScale = Vector3.one * scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4fccdae6dae870c42bc27f435a94e621
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a9bb27da68d4451a7d79cdb7abc1506
|
||||
timeCreated: 1748431180
|
||||
@ -1,16 +0,0 @@
|
||||
namespace SimpleObjectPool
|
||||
{
|
||||
|
||||
|
||||
internal interface IMixedObjectFactory<T> where T : class
|
||||
{
|
||||
T Create(string typeName);
|
||||
|
||||
void Destroy(string typeName, T obj);
|
||||
|
||||
void Reset(string typeName, T obj);
|
||||
|
||||
bool Validate(string typeName, T obj);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30f89ee61eb3f0949b5300bd9b7cc577
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,12 +0,0 @@
|
||||
namespace SimpleObjectPool
|
||||
{
|
||||
using System;
|
||||
|
||||
internal interface IMixedObjectPool<T> : IDisposable where T : class
|
||||
{
|
||||
T Allocate(string typeName);
|
||||
|
||||
void Free(string typeName, T obj);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f4c13a4827ebad4a9ff08e636fbc67e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,33 +0,0 @@
|
||||
namespace SimpleObjectPool
|
||||
{
|
||||
|
||||
|
||||
internal interface IObjectFactory<T> where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建对象
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
T Create();
|
||||
|
||||
/// <summary>
|
||||
/// 销毁对象
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
void Destroy(T obj);
|
||||
|
||||
/// <summary>
|
||||
/// 重置对象
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
void Reset(T obj);
|
||||
|
||||
/// <summary>
|
||||
/// 验证对象
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
bool Validate(T obj);
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user