From e4381d18b53a082ffc6564124a60e85d4b2afe19 Mon Sep 17 00:00:00 2001 From: changyunjia <905640960@qq.com> Date: Fri, 12 Jun 2026 18:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=BE=E9=89=B4=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Legend/Helper/TextureHelper.cs | 238 +------ Assets/Legend/Manager/HallManager.cs | 41 +- Assets/Legend/ToolKit/LiveVideoManager.cs | 565 --------------- .../Legend/ToolKit/LiveVideoManager.cs.meta | 3 - .../LoveLegendAssets/Shader/Blur.shader | 179 ----- .../LoveLegendAssets/Shader/Blur.shader.meta | 9 - .../LoveLegendAssets/Shader/Mosaic.shader | 57 -- .../Shader/Mosaic.shader.meta | 9 - Assets/Scripts/DataMgr/DataMgr.cs | 3 - Assets/Scripts/MainScene.cs | 18 +- .../ModuleManager/ModuleManagerRegister.cs | 92 +-- Assets/Scripts/ModuleUI/AlbumDetail.meta | 8 - .../ModuleUI/AlbumDetail/AlbumDetailCtrl.cs | 25 - .../AlbumDetail/AlbumDetailCtrl.cs.meta | 11 - .../ModuleUI/AlbumDetail/AlbumDetailModel.cs | 20 - .../AlbumDetail/AlbumDetailModel.cs.meta | 11 - .../ModuleUI/AlbumDetail/AlbumDetailUI.cs | 299 -------- .../AlbumDetail/AlbumDetailUI.cs.meta | 11 - .../ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs | 73 -- .../AlbumDetail/AlbumDetailUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Alubum.meta | 8 - Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs | 25 - .../ModuleUI/Alubum/AlubumCtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs | 20 - .../ModuleUI/Alubum/AlubumModel.cs.meta | 11 - Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs | 494 ------------- .../Scripts/ModuleUI/Alubum/AlubumUI.cs.meta | 11 - .../Scripts/ModuleUI/Alubum/AlubumUICtrl.cs | 73 -- .../ModuleUI/Alubum/AlubumUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Chat.meta | 8 - Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs | 25 - Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Chat/ChatModel.cs | 20 - .../Scripts/ModuleUI/Chat/ChatModel.cs.meta | 11 - Assets/Scripts/ModuleUI/Chat/ChatUI.cs | 352 --------- Assets/Scripts/ModuleUI/Chat/ChatUI.cs.meta | 11 - Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs | 73 -- .../Scripts/ModuleUI/Chat/ChatUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/ChatChoose.meta | 8 - .../ModuleUI/ChatChoose/ChatChooseCtrl.cs | 25 - .../ChatChoose/ChatChooseCtrl.cs.meta | 11 - .../ModuleUI/ChatChoose/ChatChooseModel.cs | 20 - .../ChatChoose/ChatChooseModel.cs.meta | 11 - .../ModuleUI/ChatChoose/ChatChooseUI.cs | 161 ----- .../ModuleUI/ChatChoose/ChatChooseUI.cs.meta | 11 - .../ModuleUI/ChatChoose/ChatChooseUICtrl.cs | 73 -- .../ChatChoose/ChatChooseUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/ChatNumber.meta | 8 - .../ModuleUI/ChatNumber/ChatNumberCtrl.cs | 25 - .../ChatNumber/ChatNumberCtrl.cs.meta | 11 - .../ModuleUI/ChatNumber/ChatNumberModel.cs | 20 - .../ChatNumber/ChatNumberModel.cs.meta | 11 - .../ModuleUI/ChatNumber/ChatNumberUI.cs | 116 --- .../ModuleUI/ChatNumber/ChatNumberUI.cs.meta | 11 - .../ModuleUI/ChatNumber/ChatNumberUICtrl.cs | 73 -- .../ChatNumber/ChatNumberUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/ChatUnlock.meta | 8 - .../ModuleUI/ChatUnlock/ChatUnlockCtrl.cs | 25 - .../ChatUnlock/ChatUnlockCtrl.cs.meta | 11 - .../ModuleUI/ChatUnlock/ChatUnlockModel.cs | 20 - .../ChatUnlock/ChatUnlockModel.cs.meta | 11 - .../ModuleUI/ChatUnlock/ChatUnlockUI.cs | 92 --- .../ModuleUI/ChatUnlock/ChatUnlockUI.cs.meta | 11 - .../ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs | 73 -- .../ChatUnlock/ChatUnlockUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/CurrencyReward.meta | 8 - Assets/Scripts/ModuleUI/Hall/HallUI.cs | 81 +-- Assets/Scripts/ModuleUI/Live.meta | 8 - Assets/Scripts/ModuleUI/Live/LiveCtrl.cs | 25 - Assets/Scripts/ModuleUI/Live/LiveCtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Live/LiveModel.cs | 20 - .../Scripts/ModuleUI/Live/LiveModel.cs.meta | 11 - Assets/Scripts/ModuleUI/Live/LiveUI.cs | 419 ----------- Assets/Scripts/ModuleUI/Live/LiveUI.cs.meta | 11 - Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs | 73 -- .../Scripts/ModuleUI/Live/LiveUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/LiveDetail.meta | 8 - .../ModuleUI/LiveDetail/LiveDetailCtrl.cs | 25 - .../LiveDetail/LiveDetailCtrl.cs.meta | 11 - .../ModuleUI/LiveDetail/LiveDetailModel.cs | 20 - .../LiveDetail/LiveDetailModel.cs.meta | 11 - .../ModuleUI/LiveDetail/LiveDetailUI.cs | 378 ---------- .../ModuleUI/LiveDetail/LiveDetailUI.cs.meta | 11 - .../ModuleUI/LiveDetail/LiveDetailUICtrl.cs | 73 -- .../LiveDetail/LiveDetailUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/LiveUnlock.meta | 8 - .../ModuleUI/LiveUnlock/LiveUnlockCtrl.cs | 25 - .../LiveUnlock/LiveUnlockCtrl.cs.meta | 11 - .../ModuleUI/LiveUnlock/LiveUnlockModel.cs | 20 - .../LiveUnlock/LiveUnlockModel.cs.meta | 11 - .../ModuleUI/LiveUnlock/LiveUnlockUI.cs | 85 --- .../ModuleUI/LiveUnlock/LiveUnlockUI.cs.meta | 11 - .../ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs | 73 -- .../LiveUnlock/LiveUnlockUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/NewEnd.meta | 8 - Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs | 25 - .../ModuleUI/NewEnd/NewEndCtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs | 20 - .../ModuleUI/NewEnd/NewEndModel.cs.meta | 11 - Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs | 674 ------------------ .../Scripts/ModuleUI/NewEnd/NewEndUI.cs.meta | 11 - .../Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs | 73 -- .../ModuleUI/NewEnd/NewEndUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/Play/RainPlayUI.cs | 63 +- .../Scripts/ModuleUI/Play/RainPlayUICtrl.cs | 96 +-- Assets/Scripts/ModuleUI/ScAlbumLock.meta | 8 - .../ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs | 25 - .../ScAlbumLock/ScAlbumLockCtrl.cs.meta | 11 - .../ModuleUI/ScAlbumLock/ScAlbumLockModel.cs | 20 - .../ScAlbumLock/ScAlbumLockModel.cs.meta | 11 - .../ModuleUI/ScAlbumLock/ScAlbumLockUI.cs | 84 --- .../ScAlbumLock/ScAlbumLockUI.cs.meta | 11 - .../ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs | 73 -- .../ScAlbumLock/ScAlbumLockUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/SecretAlbums.meta | 3 - .../ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs | 45 -- .../SecretAlbums/SecretAlbumsCtrl.cs.meta | 3 - .../SecretAlbums/SecretAlbumsModel.cs | 30 - .../SecretAlbums/SecretAlbumsModel.cs.meta | 3 - .../ModuleUI/SecretAlbums/SecretAlbumsUI.cs | 378 ---------- .../SecretAlbums/SecretAlbumsUI.cs.meta | 3 - .../SecretAlbums/SecretAlbumsUICtrl.cs | 74 -- .../SecretAlbums/SecretAlbumsUICtrl.cs.meta | 3 - Assets/Scripts/ModuleUI/SecretAlbumsNext.meta | 3 - .../SecretAlbumsNext/SecretAlbumsNextCtrl.cs | 45 -- .../SecretAlbumsNextCtrl.cs.meta | 3 - .../SecretAlbumsNext/SecretAlbumsNextModel.cs | 30 - .../SecretAlbumsNextModel.cs.meta | 3 - .../SecretAlbumsNext/SecretAlbumsNextUI.cs | 423 ----------- .../SecretAlbumsNextUI.cs.meta | 3 - .../SecretAlbumsNextUICtrl.cs | 74 -- .../SecretAlbumsNextUICtrl.cs.meta | 3 - Assets/Scripts/ModuleUI/SecretDetail.meta | 3 - .../ModuleUI/SecretDetail/SecretDetailCtrl.cs | 45 -- .../SecretDetail/SecretDetailCtrl.cs.meta | 3 - .../SecretDetail/SecretDetailModel.cs | 30 - .../SecretDetail/SecretDetailModel.cs.meta | 3 - .../ModuleUI/SecretDetail/SecretDetailUI.cs | 165 ----- .../SecretDetail/SecretDetailUI.cs.meta | 3 - .../SecretDetail/SecretDetailUICtrl.cs | 74 -- .../SecretDetail/SecretDetailUICtrl.cs.meta | 3 - Assets/Scripts/ModuleUI/SecretUnlockView.meta | 3 - .../SecretUnlockView/SecretUnlockViewCtrl.cs | 45 -- .../SecretUnlockViewCtrl.cs.meta | 3 - .../SecretUnlockView/SecretUnlockViewModel.cs | 30 - .../SecretUnlockViewModel.cs.meta | 3 - .../SecretUnlockView/SecretUnlockViewUI.cs | 210 ------ .../SecretUnlockViewUI.cs.meta | 3 - .../SecretUnlockViewUICtrl.cs | 74 -- .../SecretUnlockViewUICtrl.cs.meta | 3 - Assets/Scripts/ModuleUI/SubUnlock.meta | 8 - .../ModuleUI/SubUnlock/SubUnlockCtrl.cs | 25 - .../ModuleUI/SubUnlock/SubUnlockCtrl.cs.meta | 11 - .../ModuleUI/SubUnlock/SubUnlockModel.cs | 20 - .../ModuleUI/SubUnlock/SubUnlockModel.cs.meta | 11 - .../Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs | 150 ---- .../ModuleUI/SubUnlock/SubUnlockUI.cs.meta | 11 - .../ModuleUI/SubUnlock/SubUnlockUICtrl.cs | 73 -- .../SubUnlock/SubUnlockUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/UnlockLevel.meta | 8 - .../ModuleUI/UnlockLevel/UnlockLevelCtrl.cs | 25 - .../UnlockLevel/UnlockLevelCtrl.cs.meta | 11 - .../ModuleUI/UnlockLevel/UnlockLevelModel.cs | 20 - .../UnlockLevel/UnlockLevelModel.cs.meta | 11 - .../ModuleUI/UnlockLevel/UnlockLevelUI.cs | 248 ------- .../UnlockLevel/UnlockLevelUI.cs.meta | 11 - .../ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs | 73 -- .../UnlockLevel/UnlockLevelUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/UnlockLevelNew.meta | 8 - .../UnlockLevelNew/UnlockLevelNewCtrl.cs | 25 - .../UnlockLevelNew/UnlockLevelNewCtrl.cs.meta | 11 - .../UnlockLevelNew/UnlockLevelNewModel.cs | 20 - .../UnlockLevelNewModel.cs.meta | 11 - .../UnlockLevelNew/UnlockLevelNewUI.cs | 490 ------------- .../UnlockLevelNew/UnlockLevelNewUI.cs.meta | 11 - .../UnlockLevelNew/UnlockLevelNewUICtrl.cs | 73 -- .../UnlockLevelNewUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/UnlockTips.meta | 8 - .../ModuleUI/UnlockTips/UnlockTipsCtrl.cs | 25 - .../UnlockTips/UnlockTipsCtrl.cs.meta | 11 - .../ModuleUI/UnlockTips/UnlockTipsModel.cs | 20 - .../UnlockTips/UnlockTipsModel.cs.meta | 11 - .../ModuleUI/UnlockTips/UnlockTipsUI.cs | 141 ---- .../ModuleUI/UnlockTips/UnlockTipsUI.cs.meta | 11 - .../ModuleUI/UnlockTips/UnlockTipsUICtrl.cs | 73 -- .../UnlockTips/UnlockTipsUICtrl.cs.meta | 11 - Assets/Scripts/ModuleUI/VipClubView.meta | 8 - .../ModuleUI/VipClubView/VipClubViewCtrl.cs | 25 - .../VipClubView/VipClubViewCtrl.cs.meta | 11 - .../ModuleUI/VipClubView/VipClubViewModel.cs | 20 - .../VipClubView/VipClubViewModel.cs.meta | 11 - .../ModuleUI/VipClubView/VipClubViewUI.cs | 393 ---------- .../VipClubView/VipClubViewUI.cs.meta | 11 - .../ModuleUI/VipClubView/VipClubViewUICtrl.cs | 73 -- .../VipClubView/VipClubViewUICtrl.cs.meta | 11 - Assets/Scripts/System/Network/ConfigSystem.cs | 1 - Assets/Scripts/ToolKit/PreDownloadManager.cs | 382 ---------- .../ToolKit/PreDownloadManager.cs.meta | 11 - Assets/Scripts/VideoLoadScheduler.cs | 187 ----- Assets/Scripts/VideoLoadScheduler.cs.meta | 11 - 200 files changed, 89 insertions(+), 11093 deletions(-) delete mode 100644 Assets/Legend/ToolKit/LiveVideoManager.cs delete mode 100644 Assets/Legend/ToolKit/LiveVideoManager.cs.meta delete mode 100644 Assets/Resources/LoveLegendAssets/Shader/Blur.shader delete mode 100644 Assets/Resources/LoveLegendAssets/Shader/Blur.shader.meta delete mode 100644 Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader delete mode 100644 Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader.meta delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail.meta delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Alubum.meta delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Chat.meta delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatModel.cs delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatUI.cs delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/CurrencyReward.meta delete mode 100644 Assets/Scripts/ModuleUI/Live.meta delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveModel.cs delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveUI.cs delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/NewEnd.meta delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock.meta delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock.meta delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/VipClubView.meta delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs.meta delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs delete mode 100644 Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs.meta delete mode 100644 Assets/Scripts/ToolKit/PreDownloadManager.cs delete mode 100644 Assets/Scripts/ToolKit/PreDownloadManager.cs.meta delete mode 100644 Assets/Scripts/VideoLoadScheduler.cs delete mode 100644 Assets/Scripts/VideoLoadScheduler.cs.meta diff --git a/Assets/Legend/Helper/TextureHelper.cs b/Assets/Legend/Helper/TextureHelper.cs index dff20fc..9e3ccbd 100644 --- a/Assets/Legend/Helper/TextureHelper.cs +++ b/Assets/Legend/Helper/TextureHelper.cs @@ -577,45 +577,7 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action(); - var FreeImageLibrary_ = ConfigSystem.GetConfig(); - var ADImageLibrary_ = ConfigSystem.GetConfig(); - var SpecialImageLibrary_ = ConfigSystem.GetConfig(); - var VIPImageLibrary_ = ConfigSystem.GetConfig(); - for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++) - { - GetDecryptedImagePath(levelUnlocks[i].Name, FolderNames.AlbumName); - yield return null; - } - var LevelUnlockListNew = DataMgr.LevelUnlockListNew.Value; - for (int i = 0; i - // { - // if (success) - // { - // GameHelper.ShowTips("save_successed", true); - // onSuccess?.Invoke(); - // } - // else - // { - // Debug.LogWarning("保存到相册失败"); - // } - // - // // 可选:清理临时文件 - // if (File.Exists(tempPath)) - // File.Delete(tempPath); - // }); - } - catch (Exception ex) - { - Debug.LogError($"保存加密图片到相册失败: {ex.Message}"); - } - } - public static void SaveVideoToAlbum(string fileName, Action onSuccess = null) - { - try - { - string localPath = Path.Combine(getResPath(), FolderNames.VideoName, fileName + ".mp4"); - BrigdeIOS.SaveVideoWithCustomDate(localPath); - // File.SetCreationTime(localPath, DateTime.Now); - // File.SetCreationTimeUtc(localPath, DateTime.Now); - // File.SetLastWriteTime(localPath, DateTime.Now); - // File.SetLastWriteTimeUtc(localPath, DateTime.Now); - // // CrazyAsyKit.StartCoroutine(GetSaveVideo(fileName, (isSuccess) => - // // { - // - // // })); - // NativeGallery.SaveVideoToGallery(localPath, "MyAlbum", "my_video.mp4", (bool success, string path) => - // { - // if (success) - // { - // GameHelper.ShowTips("save_successed", true); - // onSuccess?.Invoke(); - // } - // }); - } - catch (Exception ex) - { - Debug.LogError($"保存加密视频到相册失败: {ex.Message}"); - } - } - - - - public static void SetVideoLoader(VideoPlayer player, GLoader loader, string fileName, - Action action = null, bool play = true) - { - - VideoLoadScheduler.EnqueueLoad(player, fileName, loader, videoPlayer => - { - Debug.Log("RendererList------视频加载成功!-" + fileName); - Debug.Log("[绑定播放器 EnqueueLoad]=========1=== "); - if (videoPlayer != null) - { - Debug.Log("视频加载成功!"); - action?.Invoke(videoPlayer); - } - else - { - Debug.Log("视频加载失败!"); - VideoPlayerPool.Instance.ReturnPlayer(player); - action?.Invoke(null); - } - }, play); - } - - public static void SetImageMosaic(GLoader loader, int num = 80) - { - var shader = Resources.Load("LoveLegendAssets/Shader/Mosaic"); - if (shader == null) - { - Debug.LogError("找不到 Shader:Custom/Mosaic。请确保 shader 名称正确并已包含到构建中。"); - return; - } - - var material = new Material(shader); - material.SetFloat("_BlockSize", num); // 假设你 shader 中的 blockSize 参数是这个 - loader.material = material; - } #region 材质处理 - - public static void SetImageBlur(GLoader loader) - { - if (loader == null || loader.isDisposed || loader.texture == null || loader.material.name == "Custom/Blur") return; - if (loader.material != null) MaterialPool.Return(loader.material); - loader.material = MaterialPool.GetBlur(); - } - - public static void CancelImageBlur(GLoader loader) - { - if (loader == null || loader.isDisposed || loader.texture == null || loader.material == null || loader.material.name != "Custom/Blur") return; - - if (loader.material != null) MaterialPool.Return(loader.material); - loader.material = MaterialPool.GetNormal(); - } - #endregion /// @@ -771,78 +607,6 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action(); - if (_spriteRenderer == null) - { - Debug.LogError("'game_bg' 上没有找到 SpriteRenderer 组件!"); - return; - } - } - - if (_spriteRenderer && _spriteRenderer.sprite && _spriteRenderer.sprite.texture.name == fileName) - { - return; - } - - // 调用统一的 SetImgLoader,不需要再自己写下载逻辑 - SetImgLoader(null, fileName, nTex => - { - if (nTex != null && nTex.nativeTexture != null) - { - Debug.Log("背景图片加载成功!"); - - var tex2D = nTex.nativeTexture as Texture2D; - if (tex2D == null) - { - Debug.LogError("NTexture 转换失败!"); - return; - } - tex2D.name = fileName; - // 创建 Sprite - var sprite = Sprite.Create( - tex2D, - new Rect(0, 0, tex2D.width, tex2D.height), - new Vector2(0.5f, 0.5f) - ); - _spriteRenderer.sprite = sprite; - - if (_currentNTexture != null) - { - _currentNTexture.Dispose(); - _currentNTexture = null; - } - if (_currentBackgroundSprite != null) - { - Object.Destroy(_currentBackgroundSprite); - _currentBackgroundSprite = null; - } - - _currentNTexture = nTex; - _currentBackgroundSprite = sprite; - - var currentWidth = _spriteRenderer.sprite.bounds.size.x; - var scaleFactor = 64f / currentWidth; - - // 等比缩放 - _spriteRenderer.transform.localScale = new Vector3(scaleFactor, scaleFactor, 1); - } - else - { - Debug.LogError("背景图片加载失败!"); - } - }, "LevelAlbums/", FolderNames.AlbumName, true, false, true); // ✅ 背景一般是立刻需要的,走优先下载 - } public static void GetCardIcon(bool isLogo = false, UnityAction action = null) diff --git a/Assets/Legend/Manager/HallManager.cs b/Assets/Legend/Manager/HallManager.cs index 31c29db..04c1deb 100644 --- a/Assets/Legend/Manager/HallManager.cs +++ b/Assets/Legend/Manager/HallManager.cs @@ -87,32 +87,29 @@ namespace LoveLegend type = a.type }) .ToList(); - if (GameHelper.IsGiftSwitch()) - { - GameObject.Find("game_bg_a").SetActive(false); - } + //初始化商品 ApplePayManager.Instance.InitProduct(listB, ConfigManager.GameConfig.packageName, PurchasingManager.ApplePaySuccessCallback(appleData)); - if (GameHelper.IsGiftSwitch() && enterGame) - { - if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal) - { - EnterGame(enterGame); - } - else - { - if (!DataMgr.LevelUnlockListNew.Value.Any(x => x.level_ == GameHelper.GetLevel())) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockLevelNewUI_Open, true); - } - else - { - EnterGame(enterGame); - } - } - } + // if (GameHelper.IsGiftSwitch() && enterGame) + // { + // if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal) + // { + // EnterGame(enterGame); + // } + // else + // { + // if (!DataMgr.LevelUnlockListNew.Value.Any(x => x.level_ == GameHelper.GetLevel())) + // { + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockLevelNewUI_Open, true); + // } + // else + // { + // EnterGame(enterGame); + // } + // } + // } TrackKit.TrackLoginFunnel(LoginFunnelEventType.EnterHall); diff --git a/Assets/Legend/ToolKit/LiveVideoManager.cs b/Assets/Legend/ToolKit/LiveVideoManager.cs deleted file mode 100644 index 221bf1b..0000000 --- a/Assets/Legend/ToolKit/LiveVideoManager.cs +++ /dev/null @@ -1,565 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using FairyGUI; -using SGModule.Common.Base; -using Unity.VisualScripting; -using UnityEngine; -using UnityEngine.Networking; -using UnityEngine.Video; - -namespace LoveLegend -{ - public class LiveVideoManager : SingletonMonoBehaviour - { - public static string videoBaseUrl = ""; - - // 封面缓存 - // private readonly Dictionary coverCache = new(); - - // 封面提取队列(避免同时开多个VideoPlayer) - private readonly Queue coverQueue = new(); - - // 已下载视频缓存 - private readonly HashSet downloadedVideos = new(); - - // 当前正在下载的视频,用于去重 - private readonly HashSet downloadingSet = new(); - - // ==== 队列 ==== - - // 普通视频队列和优先队列 - private readonly Queue normalQueue = new(); - private readonly Queue priorityQueue = new(); - private bool isExtracting; - - private Coroutine normalCoroutine; - private Coroutine priorityCoroutine; - - private string videoLocalDir => Path.Combine(TextureHelper.getResPath(), "LiveVideos"); - private string coverLocalDir => Path.Combine(TextureHelper.getResPath(), "LiveVideoCovers"); - - protected override void Awake() - { - base.Awake(); - InitDirs(); - InitCache(); - } - - private void InitDirs() - { - if (!Directory.Exists(videoLocalDir)) - Directory.CreateDirectory(videoLocalDir); - - if (!Directory.Exists(coverLocalDir)) - Directory.CreateDirectory(coverLocalDir); - } - - private void InitCache() - { - var files = Directory.GetFiles(videoLocalDir, "*.mp4"); - foreach (var file in files) - { - var fileName = Path.GetFileNameWithoutExtension(file); - downloadedVideos.Add(fileName); - } - } - - #region 缓存清理 - - public void ClearAllCache() - { - // foreach (var tex in coverCache.Values) - // if (tex != null) - // Destroy(tex); - // coverCache.Clear(); - - if (Directory.Exists(coverLocalDir)) - { - Directory.Delete(coverLocalDir, true); - Directory.CreateDirectory(coverLocalDir); - } - - if (Directory.Exists(videoLocalDir)) - { - Directory.Delete(videoLocalDir, true); - Directory.CreateDirectory(videoLocalDir); - downloadedVideos.Clear(); - } - } - - #endregion - - #region 统一加载视频封面 - - public IEnumerator LoadCover(string fileName, Action callback) - { - Texture2D tex = null; - - var persistentPath = Path.Combine(TextureHelper.getResPath(), "LiveVideoCovers", fileName + ".png"); - if (File.Exists(persistentPath)) - { - tex = LoadTextureFromFile(persistentPath); - if (tex != null) - { - callback?.Invoke(tex); - yield break; - } - } - - var saPath = Path.Combine(Application.streamingAssetsPath, "LiveVideoCovers", fileName + ".jpg"); - -#if UNITY_ANDROID && !UNITY_EDITOR - using (UnityWebRequest www = UnityWebRequestTexture.GetTexture(saPath)) - { - yield return www.SendWebRequest(); - if (www.result == UnityWebRequest.Result.Success) - tex = DownloadHandlerTexture.GetContent(www); - else - Debug.LogWarning($"LoadCover StreamingAssets失败: {www.error}, file: {fileName}"); - } -#else - if (File.Exists(saPath)) - try - { - var data = File.ReadAllBytes(saPath); - tex = new Texture2D(2, 2); - tex.LoadImage(data); - } - catch (Exception e) - { - Debug.LogWarning($"LoadCover StreamingAssets读取失败: {fileName}, error: {e}"); - } -#endif - callback?.Invoke(tex); - } - - #endregion - - - public static IEnumerator LoadVideoToPlayer(VideoPlayer player, string fileName, GLoader loader, - Action onComplete, bool play = true) - { - string localPath = null; - var isDone = false; - Instance.GetVideoLocalPath(fileName, path => - { - localPath = path; - isDone = true; - }); - Debug.Log("LoadVideoToPlayer ------1------" + isDone); - - while (!isDone) - yield return null; - - if (string.IsNullOrEmpty(localPath)) - { - onComplete?.Invoke(null); - yield break; - } - - if (player.IsDestroyed()) - { - onComplete?.Invoke(null); - yield break; - } - - player.source = VideoSource.Url; - Debug.Log("LoadVideoToPlayer diaoyongyici: " + fileName); - player.url = Application.platform == RuntimePlatform.Android && !Application.isEditor - ? localPath - : "file://" + localPath; - - player.isLooping = true; - player.playOnAwake = false; - - var rtWidth = (int)loader.width; - var rtHeight = (int)loader.height; - - var rt = new RenderTexture(rtWidth, rtHeight, 0); - rt.Create(); - - player.targetTexture = rt; - - - if (!loader.isDisposed) - { - Debug.Log("LoadVideoToPlayer loader is isDisposed: "); - loader.texture = new NTexture(rt); - loader.visible = false; - } - - player.Prepare(); - - var timeout = 3f; - var timer = 0f; - while (!player.IsDestroyed() && !player.isPrepared && timer < timeout) - { - yield return null; - timer += Time.deltaTime; - } - - if (player.IsDestroyed()) - { - onComplete?.Invoke(null); - yield break; - } - - if (!player.isPrepared) - { - if (rt != null && !rt.Equals(null)) rt.Release(); - onComplete?.Invoke(null); - yield break; - } - - if (play) - player.Play(); - else - player.Pause(); - - if (!loader.isDisposed) - loader.visible = true; - - onComplete?.Invoke(player); - } - - #region 视频下载队列(支持普通 + 优先 + 硬取消 + 去重) - - public void GetVideoLocalPath(string fileName, Action callback, bool priority = true, int maxRetry = 3, - bool hardCancel = false) - { - var localPath = Path.Combine(videoLocalDir, fileName + ".mp4"); - - // 已下载直接回调 - if (downloadedVideos.Contains(fileName) && File.Exists(localPath)) - { - callback?.Invoke(localPath); - return; - } - - // 去重:如果正在下载中,也直接等待回调 - if (downloadingSet.Contains(fileName)) - { - StartCoroutine(WaitForDownload(fileName, callback)); - return; - } - - var task = new VideoTask - { - FileName = fileName, - LocalPath = localPath, - Callback = callback, - MaxRetry = maxRetry - }; - - if (priority) - { - if (hardCancel) - { - // 硬取消:停止当前优先队列协程,清空队列 - if (priorityCoroutine != null) - { - StopCoroutine(priorityCoroutine); - priorityCoroutine = null; - } - - priorityQueue.Clear(); - } - - priorityQueue.Enqueue(task); - if (priorityCoroutine == null) - priorityCoroutine = StartCoroutine(ProcessPriorityQueue()); - } - else - { - normalQueue.Enqueue(task); - if (normalCoroutine == null) - normalCoroutine = StartCoroutine(ProcessNormalQueue()); - } - } - - // 等待正在下载的视频完成再回调 - private IEnumerator WaitForDownload(string fileName, Action callback) - { - while (downloadingSet.Contains(fileName)) - yield return null; - - var localPath = Path.Combine(videoLocalDir, fileName + ".mp4"); - callback?.Invoke(File.Exists(localPath) ? localPath : null); - } - - // 优先队列协程(单任务) - private IEnumerator ProcessPriorityQueue() - { - while (priorityQueue.Count > 0) - { - var task = priorityQueue.Dequeue(); - yield return DownloadVideoCoroutine(task); - } - - priorityCoroutine = null; - } - - // 普通队列协程(单任务) - private IEnumerator ProcessNormalQueue() - { - while (normalQueue.Count > 0) - { - var task = normalQueue.Dequeue(); - yield return DownloadVideoCoroutine(task); - } - - normalCoroutine = null; - } - - // 核心下载协程 - private IEnumerator DownloadVideoCoroutine(VideoTask task) - { - // 再次检查本地是否已有,避免重复下载 - if (downloadedVideos.Contains(task.FileName) && File.Exists(task.LocalPath)) - { - task.Callback?.Invoke(task.LocalPath); - yield break; - } - - downloadingSet.Add(task.FileName); - - var tmpPath = task.LocalPath + ".downloading"; - var url = videoBaseUrl + "LiveAlbums/" + task.FileName + ".mp4"; - - if (File.Exists(tmpPath)) File.Delete(tmpPath); - - var attempt = 0; - var success = false; - - while (attempt < task.MaxRetry) - { - attempt++; - using (var www = UnityWebRequest.Get(url)) - { - www.downloadHandler = new DownloadHandlerFile(tmpPath, true); - yield return www.SendWebRequest(); - - if (www.result == UnityWebRequest.Result.Success) - { - if (File.Exists(task.LocalPath)) File.Delete(task.LocalPath); - - Debug.Log($"[DownloadVideo] 下载成功,开始解密视频 {task.FileName}"); - Rescrypt.DecryptFile(tmpPath, task.LocalPath); - Debug.Log($"[DownloadVideo] 解密完成,保存路径:{task.LocalPath}"); - - downloadedVideos.Add(task.FileName); - success = true; - break; - } - - Debug.LogWarning($"视频下载失败(第 {attempt} 次): {task.FileName}, {www.error}"); - if (attempt < task.MaxRetry) - yield return new WaitForSeconds(1f); - } - } - - if (!success) - { - Debug.LogError($"视频下载失败,超过最大重试次数:{task.FileName}"); - if (File.Exists(tmpPath)) File.Delete(tmpPath); - } - - downloadingSet.Remove(task.FileName); - task.Callback?.Invoke(success ? task.LocalPath : null); - - LiveVideoMemoryManager.RequestCleanup(); - } - - #endregion - - #region 视频封面 - - // 你的封面逻辑保持不变 - public void GetVideoCover(GLoader loader, string fileName, Action onComplete) - { - // if (coverCache.TryGetValue(fileName, out var cached)) - // { - // onComplete?.Invoke(cached); - // return; - // } - - // var coverPath = Path.Combine(coverLocalDir, fileName + ".png"); - // if (File.Exists(coverPath)) - // { - // var tex = LoadTextureFromFile(coverPath); - // coverCache[fileName] = tex; - // onComplete?.Invoke(tex); - // return; - // } - - StartCoroutine(LoadCover(fileName, onComplete)); - - coverQueue.Enqueue(new CoverTask { FileName = fileName, Callback = onComplete }); - - if (!isExtracting) - ProcessCoverQueue(loader); - } - - private void ProcessCoverQueue(GLoader loader) - { - isExtracting = true; - - while (coverQueue.Count > 0) - { - var task = coverQueue.Dequeue(); - ProcessGetCoverCoroutine(loader, task.FileName, task.Callback); - } - - isExtracting = false; - } - - private void ProcessGetCoverCoroutine(GLoader loader, string fileName, Action callback) - { - TextureHelper.SetImgLoader(loader, fileName, - (a) => { - // coverCache[fileName] = a.nativeTexture as Texture2D; - // callback?.Invoke(coverCache[fileName]); - callback?.Invoke(a.nativeTexture as Texture2D); - }, "LiveAlbums/", FolderNames.VideoCoversName); - } - - private IEnumerator ExtractCoverFromVideo(string fileName, string videoPath, Action callback) - { - var go = new GameObject("LiveVideoCoverExtractor_" + fileName); - var vp = go.AddComponent(); - vp.audioOutputMode = VideoAudioOutputMode.None; - vp.source = VideoSource.Url; - vp.url = Application.platform == RuntimePlatform.Android && !Application.isEditor - ? videoPath - : "file://" + videoPath; - - vp.isLooping = false; - vp.playOnAwake = false; - - var rt = new RenderTexture(389, 583, 0); - vp.targetTexture = rt; - vp.Prepare(); - - var timeout = 5f; - var timer = 0f; - while (!vp.isPrepared && timer < timeout) - { - timer += Time.deltaTime; - yield return null; - } - - if (!vp.isPrepared) - { - Debug.LogWarning($"LiveVideoManager: Video '{fileName}' prepare timeout."); - Destroy(go); - callback?.Invoke(null); - yield break; - } - - vp.Pause(); - yield return new WaitForEndOfFrame(); - - var tex = CaptureFrame(vp); - SaveCover(fileName, tex); - // coverCache[fileName] = tex; - - callback?.Invoke(tex); - Destroy(go); - } - - private Texture2D CaptureFrame(VideoPlayer vp) - { - var rt = vp.targetTexture; - RenderTexture.active = rt; - - var tex = new Texture2D(rt.width, rt.height, TextureFormat.RGB24, false); - tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); - tex.Apply(); - - RenderTexture.active = null; - vp.Stop(); - vp.targetTexture = null; - return tex; - } - - private void SaveCover(string fileName, Texture2D tex) - { - try - { - var pngData = tex.EncodeToPNG(); - var path = Path.Combine(coverLocalDir, fileName + ".png"); - File.WriteAllBytes(path, pngData); - } - catch (Exception e) - { - Debug.LogWarning($"Save cover PNG failed for '{fileName}': {e}"); - } - } - - private Texture2D LoadTextureFromFile(string filePath) - { - try - { - var data = File.ReadAllBytes(filePath); - var tex = new Texture2D(2, 2); - tex.LoadImage(data); - return tex; - } - catch - { - return null; - } - } - - public bool ExistVideo(string fileName) - { - var path = Path.Combine(videoLocalDir, fileName + ".mp4"); - return File.Exists(path); - } - - #endregion - } - - internal class VideoTask - { - public Action Callback; - public string FileName; - public string LocalPath; - public int MaxRetry; - } - - internal class CoverTask - { - public Action Callback; - public string FileName; - } - - internal static class LiveVideoMemoryManager - { - private const int CLEANUP_INTERVAL = 30; - private const int CLEANUP_THRESHOLD = 10; - private static readonly float lastCleanupTime = 0f; - private static int downloadCount; - - public static void RequestCleanup() - { - downloadCount++; - if (downloadCount >= CLEANUP_THRESHOLD || - Time.realtimeSinceStartup - lastCleanupTime > CLEANUP_INTERVAL) - LiveVideoManager.Instance.StartCoroutine(CleanupCoroutine()); - } - - private static IEnumerator CleanupCoroutine() - { - yield return null; - // Debug.Log("[LiveVideoMemoryManager] 清理内存..."); - // yield return Resources.UnloadUnusedAssets(); - // GC.Collect(); - // - // lastCleanupTime = Time.realtimeSinceStartup; - // downloadCount = 0; - } - } -} \ No newline at end of file diff --git a/Assets/Legend/ToolKit/LiveVideoManager.cs.meta b/Assets/Legend/ToolKit/LiveVideoManager.cs.meta deleted file mode 100644 index 027b5e1..0000000 --- a/Assets/Legend/ToolKit/LiveVideoManager.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8989cb844e004fd8b83f722f9b5ee575 -timeCreated: 1754887895 \ No newline at end of file diff --git a/Assets/Resources/LoveLegendAssets/Shader/Blur.shader b/Assets/Resources/LoveLegendAssets/Shader/Blur.shader deleted file mode 100644 index a3cda45..0000000 --- a/Assets/Resources/LoveLegendAssets/Shader/Blur.shader +++ /dev/null @@ -1,179 +0,0 @@ -Shader "Custom/Blur" -{ - Properties - { - [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,0.2) - _BlurSize ("Blur Size", Float) = 5 - _BlurQuality ("Blur Quality", Float ) = 5 - _BlurStrength ("Blur Strength", Float) = 1.2 - - // 新增:FairyGUI的Stencil属性(模板测试用) - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - // 新增:FairyGUI的颜色遮罩和混合模式属性 - _ColorMask ("Color Mask", Float) = 15 - _BlendSrcFactor ("Blend SrcFactor", Float) = 5 - _BlendDstFactor ("Blend DstFactor", Float) = 10 - } - - SubShader - { - Tags { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - // 新增:Stencil模板测试(关键,实现列表边框遮罩) - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - // 统一FairyGUI的渲染状态 - Cull Off - Lighting Off - ZWrite Off - Fog { Mode Off } - Blend [_BlendSrcFactor] [_BlendDstFactor], One One // 替换原有Blend - ColorMask [_ColorMask] // 新增颜色遮罩 - - Pass - { - CGPROGRAM - #pragma multi_compile NOT_CLIPPED CLIPPED SOFT_CLIPPED ALPHA_MASK // 新增:FairyGUI裁剪宏 - #pragma vertex vert - #pragma fragment frag - #include "UnityCG.cginc" - - sampler2D _MainTex; - float4 _MainTex_TexelSize; - fixed4 _Color; - float _BlurSize; - int _BlurQuality; - float _BlurStrength; - - // 新增:FairyGUI裁剪参数(和Image shader一致) - #ifdef CLIPPED - float4 _ClipBox = float4(-2, -2, 0, 0); // 裁剪区域 - #endif - #ifdef SOFT_CLIPPED - float4 _ClipBox = float4(-2, -2, 0, 0); // 软裁剪区域 - float4 _ClipSoftness = float4(0, 0, 0, 0); // 软裁剪过渡 - #endif - - struct appdata_t - { - float4 vertex : POSITION; - float4 color : COLOR; - float2 texcoord : TEXCOORD0; - }; - - struct v2f - { - float4 vertex : SV_POSITION; - fixed4 color : COLOR; - float2 texcoord : TEXCOORD0; - - // 新增:裁剪坐标(用于FairyGUI裁剪计算) - #ifdef CLIPPED - float2 clipPos : TEXCOORD1; - #endif - #ifdef SOFT_CLIPPED - float2 clipPos : TEXCOORD1; - #endif - }; - - v2f vert(appdata_t IN) - { - v2f OUT; - OUT.vertex = UnityObjectToClipPos(IN.vertex); - OUT.texcoord = IN.texcoord; - - // 新增:颜色空间转换(和FairyGUI保持一致) - #if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550) - OUT.color.rgb = GammaToLinearSpace(IN.color.rgb) * _Color.rgb; - OUT.color.a = IN.color.a * _Color.a; - #else - OUT.color = IN.color * _Color; - #endif - - // 新增:计算裁剪坐标(FairyGUI裁剪逻辑) - #ifdef CLIPPED - OUT.clipPos = mul(unity_ObjectToWorld, IN.vertex).xy * _ClipBox.zw + _ClipBox.xy; - #endif - #ifdef SOFT_CLIPPED - OUT.clipPos = mul(unity_ObjectToWorld, IN.vertex).xy * _ClipBox.zw + _ClipBox.xy; - #endif - - return OUT; - } - - - // 高斯模糊权重计算(保留原有功能) - float GaussianWeight(int x, int y, float sigma) - { - return exp(-(x*x + y*y) / (2.0 * sigma * sigma)) / (2.0 * 3.14159 * sigma * sigma); - } - - fixed4 frag(v2f IN) : SV_Target - { - float2 uv = IN.texcoord; - fixed4 col = fixed4(0,0,0,0); - - - // 高斯模糊计算(保留) - float totalWeight = 0.0; - float sigma = _BlurQuality * _BlurStrength; - int range = _BlurQuality * 2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - float weight = GaussianWeight(x, y, sigma); - totalWeight += weight; - float2 offset = float2(x, y) * _BlurSize * _MainTex_TexelSize.xy; - col += tex2D(_MainTex, uv + offset) * weight; - } - } - col /= totalWeight; - - // 新增:FairyGUI裁剪逻辑(关键,适配列表边框裁剪) - #ifdef CLIPPED - float2 factor = abs(IN.clipPos); - if (max(factor.x, factor.y) > 1) col.a = 0; // 硬裁剪 - #endif - #ifdef SOFT_CLIPPED - float2 factor = float2(0,0); - if (IN.clipPos.x < 0) factor.x = (1.0 - abs(IN.clipPos.x)) * _ClipSoftness.x; - else factor.x = (1.0 - IN.clipPos.x) * _ClipSoftness.z; - if (IN.clipPos.y < 0) factor.y = (1.0 - abs(IN.clipPos.y)) * _ClipSoftness.w; - else factor.y = (1.0 - IN.clipPos.y) * _ClipSoftness.y; - col.a *= clamp(min(factor.x, factor.y), 0.0, 1.0); // 软裁剪 - #endif - #ifdef ALPHA_MASK - clip(col.a - 0.001); // 透明通道裁剪 - #endif - - // 应用颜色 tint(和FairyGUI颜色处理保持一致) - col.rgb *= IN.color.rgb; - - return col; - } - - ENDCG - } - } -} \ No newline at end of file diff --git a/Assets/Resources/LoveLegendAssets/Shader/Blur.shader.meta b/Assets/Resources/LoveLegendAssets/Shader/Blur.shader.meta deleted file mode 100644 index 7ef6740..0000000 --- a/Assets/Resources/LoveLegendAssets/Shader/Blur.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6e83f364b956f4127a4fff5375b1b5fb -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader b/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader deleted file mode 100644 index eed5eea..0000000 --- a/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader +++ /dev/null @@ -1,57 +0,0 @@ -Shader "Custom/MosaicTransparent" -{ - Properties - { - _MainTex ("Texture", 2D) = "white" {} - _BlockSize ("Block Size", Float) = 30 - } - SubShader - { - Tags { "Queue" = "Transparent" "RenderType" = "Transparent" } - LOD 100 - - ZWrite Off - Blend SrcAlpha OneMinusSrcAlpha - Cull Off - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #include "UnityCG.cginc" - - sampler2D _MainTex; - float4 _MainTex_ST; - float _BlockSize; - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - }; - - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = TRANSFORM_TEX(v.uv, _MainTex); - return o; - } - - fixed4 frag (v2f i) : SV_Target - { - float2 uv = floor(i.uv * _BlockSize) / _BlockSize + 0.5 / _BlockSize; - fixed4 col = tex2D(_MainTex, uv); - return col; - } - ENDCG - } - } -} diff --git a/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader.meta b/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader.meta deleted file mode 100644 index fc3c920..0000000 --- a/Assets/Resources/LoveLegendAssets/Shader/Mosaic.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1a297746d842d499597aabc2a0ca53c8 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/DataMgr/DataMgr.cs b/Assets/Scripts/DataMgr/DataMgr.cs index e06a227..4209a8b 100644 --- a/Assets/Scripts/DataMgr/DataMgr.cs +++ b/Assets/Scripts/DataMgr/DataMgr.cs @@ -90,9 +90,7 @@ public static partial class DataMgr public static DataStorage> SecretUnlockList = BindDataStorage(DataKeys.SecretUnlockList, @default: new List()); public static DataStorage> SecretUnlockCd = new(DataKeys.SecretUnlockCd, defaultValue: new Dictionary(), cloudSave: false); public static DataStorage> SecretUnlockADs = new(DataKeys.SecretUnlockADs, defaultValue: new Dictionary()); - public static DataStorage> LiveDataList = new(DataKeys.LiveDataList, defaultValue: new List()); public static DataStorage> ApplePayTransactionID = BindDataStorage(DataKeys.ApplePayTransactionID, @default: new List()); - public static DataStorage> LiveDataDic = new(DataKeys.LiveDataDic, defaultValue: new Dictionary()); public static DataStorage> LevelUnlockList = new(DataKeys.LevelUnlockList, defaultValue: new List()); public static DataStorage IsUnlockChat = BindDataStorage(DataKeys.IsUnlockChat, null, -1); public static DataStorage> ChatData = new(DataKeys.ChatData, cloudSave: false); @@ -104,7 +102,6 @@ public static partial class DataMgr public static DataStorage LevelUnlockAD = new(DataKeys.LevelUnlockListAD, defaultValue: -1); public static DataStorage LevelUnlockSpecial = new(DataKeys.LevelUnlockListSpecial, defaultValue: -1); public static DataStorage LevelUnlockVIP = new(DataKeys.LevelUnlockListVIP, defaultValue: -1); - public static DataStorage> LevelUnlockListNew = new(DataKeys.LevelUnlockListNew, defaultValue: new List()); #endregion } diff --git a/Assets/Scripts/MainScene.cs b/Assets/Scripts/MainScene.cs index 978c8c3..d78e645 100644 --- a/Assets/Scripts/MainScene.cs +++ b/Assets/Scripts/MainScene.cs @@ -95,7 +95,7 @@ namespace LoveLegend // Debug.Log("OnLoadingComplete------------"); CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartReady); - if (GameHelper.IsGiftSwitch()) CrazyAsyKit.StartCoroutine(TextureHelper.WriteTempBeforeOpenCoroutine_()); + TimerHelper.mEasy.AddTimer(0.5f, () => { @@ -112,7 +112,7 @@ namespace LoveLegend { if (is_open) return; is_open = true; - PreDownloadManager.InitializeLiveData(); + UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GameLoginUI_Open); ChatHelper.CheckReply(); @@ -120,16 +120,10 @@ namespace LoveLegend if (GameHelper.IsGiftSwitch()) { - // PreDownloadManager.StartDownloadLivePicture(); - // PreDownloadManager.StartDownloadAlbumsPicture(); - // //预下载视频 - // PreDownloadManager.StartDownload(); - - // PreDownloadManager.StartDownloadSecretPicture(); - // DOVirtual.DelayedCall(2, () => - // { - // ApplePayManager.GetVipHistory(); - // }); + DOVirtual.DelayedCall(2, () => + { + ApplePayManager.GetVipHistory(); + }); } } diff --git a/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs b/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs index 390abc4..c191902 100644 --- a/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs +++ b/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs @@ -43,28 +43,8 @@ namespace LoveLegend moduleManager.AddModel(ModelConst.ThreeDaysGiftModel, new ThreeDaysGiftModel()); moduleManager.AddModel(ModelConst.RewardMulNewModel, new RewardMulNewModel()); moduleManager.AddModel(ModelConst.LuckyPackModel, new LuckyPackModel()); - moduleManager.AddModel(ModelConst.NewEndModel, new NewEndModel()); - moduleManager.AddModel(ModelConst.UnlockLevelModel, new UnlockLevelModel()); - moduleManager.AddModel(ModelConst.AlubumModel, new AlubumModel()); - moduleManager.AddModel(ModelConst.AlbumDetailModel, new AlbumDetailModel()); - moduleManager.AddModel(ModelConst.LiveModel, new LiveModel()); - moduleManager.AddModel(ModelConst.LiveDetailModel, new LiveDetailModel()); - moduleManager.AddModel(ModelConst.SecretAlbumsModel, new SecretAlbumsModel()); - moduleManager.AddModel(ModelConst.SecretUnlockModel, new SecretUnlockModel()); - moduleManager.AddModel(ModelConst.SecretAlbumsNextModel, new SecretAlbumsNextModel()); - moduleManager.AddModel(ModelConst.SecretDetailModel, new SecretDetailModel()); - moduleManager.AddModel(ModelConst.VipClubViewModel, new VipClubViewModel()); - moduleManager.AddModel(ModelConst.LiveUnlockModel, new LiveUnlockModel()); - moduleManager.AddModel(ModelConst.SubUnlockModel, new SubUnlockModel()); - moduleManager.AddModel(ModelConst.ScAlbumLockModel, new ScAlbumLockModel()); - moduleManager.AddModel(ModelConst.UnlockTipsModel, new UnlockTipsModel()); moduleManager.AddModel(ModelConst.NetworkErrorTipsModel, new NetworkErrorTipsModel()); moduleManager.AddModel(ModelConst.GoldRewardModel, new GoldRewardModel()); - moduleManager.AddModel(ModelConst.ChatChooseModel, new ChatChooseModel()); - moduleManager.AddModel(ModelConst.ChatModel, new ChatModel()); - moduleManager.AddModel(ModelConst.ChatNumberModel, new ChatNumberModel()); - moduleManager.AddModel(ModelConst.ChatUnlockModel, new ChatUnlockModel()); - moduleManager.AddModel(ModelConst.UnlockLevelNewModel, new UnlockLevelNewModel()); moduleManager.AddModel(ModelConst.BroadcastModel, new BroadcastModel()); moduleManager.AddModel(ModelConst.GamePlayModel, new GamePlayModel()); moduleManager.AddModel(ModelConst.GameAddTimeModel, new GameAddTimeModel()); @@ -109,33 +89,14 @@ namespace LoveLegend moduleManager.AddUICtrl(UICtrlConst.PersonViewUICtrl, new PersonViewUICtrl()); moduleManager.AddUICtrl(UICtrlConst.GuideViewUICtrl, new GuideViewUICtrl()); moduleManager.AddUICtrl(UICtrlConst.TipsViewUICtrl, new TipsViewUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.SecretAlbumsUICtrl, new SecretAlbumsUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.SecretUnlockUICtrl, new SecretUnlockUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.SecretAlbumsNextUICtrl, new SecretAlbumsNextUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.SecretDetailUICtrl, new SecretDetailUICtrl()); + moduleManager.AddUICtrl(UICtrlConst.RecordViewUICtrl, new RecordViewUICtrl()); moduleManager.AddUICtrl(UICtrlConst.ThreeDaysGiftUICtrl, new ThreeDaysGiftUICtrl()); moduleManager.AddUICtrl(UICtrlConst.RewardMulNewUICtrl, new RewardMulNewUICtrl()); moduleManager.AddUICtrl(UICtrlConst.LuckyPackUICtrl, new LuckyPackUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.NewEndUICtrl, new NewEndUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.UnlockLevelUICtrl, new UnlockLevelUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.AlubumUICtrl, new AlubumUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.AlbumDetailUICtrl, new AlbumDetailUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.LiveUICtrl, new LiveUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.LiveDetailUICtrl, new LiveDetailUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.VipClubViewUICtrl, new VipClubViewUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.LiveUnlockUICtrl, new LiveUnlockUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.SubUnlockUICtrl, new SubUnlockUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.ScAlbumLockUICtrl, new ScAlbumLockUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.UnlockTipsUICtrl, new UnlockTipsUICtrl()); moduleManager.AddUICtrl(UICtrlConst.NetworkErrorTipsUICtrl, new NetworkErrorTipsUICtrl()); moduleManager.AddUICtrl(UICtrlConst.GoldRewardUICtrl, new GoldRewardUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.ChatChooseUICtrl, new ChatChooseUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.ChatUICtrl, new ChatUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.ChatNumberUICtrl, new ChatNumberUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.ChatUnlockUICtrl, new ChatUnlockUICtrl()); - moduleManager.AddUICtrl(UICtrlConst.UnlockLevelNewUICtrl, new UnlockLevelNewUICtrl()); moduleManager.AddUICtrl(UICtrlConst.BroadcastUICtrl, new BroadcastUICtrl()); moduleManager.AddUICtrl(UICtrlConst.GamePlayUICtrl, new GamePlayUICtrl()); moduleManager.AddUICtrl(UICtrlConst.GameAddTimeUICtrl, new GameAddTimeUICtrl()); @@ -186,34 +147,9 @@ namespace LoveLegend moduleManager.AddCtrl(CtrlConst.ThreeDaysGiftCtrl, new ThreeDaysGiftCtrl()); moduleManager.AddCtrl(CtrlConst.RewardMulNewCtrl, new RewardMulNewCtrl()); moduleManager.AddCtrl(CtrlConst.LuckyPackCtrl, new LuckyPackCtrl()); - moduleManager.AddCtrl(CtrlConst.NewEndCtrl, new NewEndCtrl()); - moduleManager.AddCtrl(CtrlConst.UnlockLevelCtrl, new UnlockLevelCtrl()); - moduleManager.AddCtrl(CtrlConst.AlubumCtrl, new AlubumCtrl()); - moduleManager.AddCtrl(CtrlConst.AlbumDetailCtrl, new AlbumDetailCtrl()); - moduleManager.AddCtrl(CtrlConst.NewEndCtrl, new NewEndCtrl()); - moduleManager.AddCtrl(CtrlConst.UnlockLevelCtrl, new UnlockLevelCtrl()); - moduleManager.AddCtrl(CtrlConst.SecretAlbumsCtrl, new SecretAlbumsCtrl()); - moduleManager.AddCtrl(CtrlConst.SecretUnlockCtrl, new SecretUnlockCtrl()); - moduleManager.AddCtrl(CtrlConst.SecretAlbumsNextCtrl, new SecretAlbumsNextCtrl()); - moduleManager.AddCtrl(CtrlConst.SecretDetailCtrl, new SecretDetailCtrl()); - moduleManager.AddCtrl(CtrlConst.NewEndCtrl, new NewEndCtrl()); - moduleManager.AddCtrl(CtrlConst.UnlockLevelCtrl, new UnlockLevelCtrl()); - moduleManager.AddCtrl(CtrlConst.AlubumCtrl, new AlubumCtrl()); - moduleManager.AddCtrl(CtrlConst.AlbumDetailCtrl, new AlbumDetailCtrl()); - moduleManager.AddCtrl(CtrlConst.LiveCtrl, new LiveCtrl()); - moduleManager.AddCtrl(CtrlConst.LiveDetailCtrl, new LiveDetailCtrl()); - moduleManager.AddCtrl(CtrlConst.VipClubViewCtrl, new VipClubViewCtrl()); - moduleManager.AddCtrl(CtrlConst.LiveUnlockCtrl, new LiveUnlockCtrl()); - moduleManager.AddCtrl(CtrlConst.SubUnlockCtrl, new SubUnlockCtrl()); - moduleManager.AddCtrl(CtrlConst.ScAlbumLockCtrl, new ScAlbumLockCtrl()); - moduleManager.AddCtrl(CtrlConst.UnlockTipsCtrl, new UnlockTipsCtrl()); + moduleManager.AddCtrl(CtrlConst.NetworkErrorTipsCtrl, new NetworkErrorTipsCtrl()); moduleManager.AddCtrl(CtrlConst.GoldRewardCtrl, new GoldRewardCtrl()); - moduleManager.AddCtrl(CtrlConst.ChatChooseCtrl, new ChatChooseCtrl()); - moduleManager.AddCtrl(CtrlConst.ChatCtrl, new ChatCtrl()); - moduleManager.AddCtrl(CtrlConst.ChatNumberCtrl, new ChatNumberCtrl()); - moduleManager.AddCtrl(CtrlConst.ChatUnlockCtrl, new ChatUnlockCtrl()); - moduleManager.AddCtrl(CtrlConst.UnlockLevelNewCtrl, new UnlockLevelNewCtrl()); moduleManager.AddCtrl(CtrlConst.BroadcastCtrl, new BroadcastCtrl()); moduleManager.AddCtrl(CtrlConst.GamePlayCtrl, new GamePlayCtrl()); moduleManager.AddCtrl(CtrlConst.GameAddTimeCtrl, new GameAddTimeCtrl()); @@ -264,31 +200,9 @@ namespace LoveLegend moduleManager.AddUIType(UIConst.ThreeDaysGiftUI, typeof(ThreeDaysGiftUI)); moduleManager.AddUIType(UIConst.RewardMulNewUI, typeof(RewardMulNewUI)); moduleManager.AddUIType(UIConst.LuckyPackUI, typeof(LuckyPackUI)); - moduleManager.AddUIType(UIConst.SecretAlbumsUI, typeof(SecretAlbumsUI)); - moduleManager.AddUIType(UIConst.SecretUnlockUI, typeof(SecretUnlockUI)); - moduleManager.AddUIType(UIConst.SecretAlbumsNextUI, typeof(SecretAlbumsNextUI)); - moduleManager.AddUIType(UIConst.SecretDetailUI, typeof(SecretDetailUI)); - - moduleManager.AddUIType(UIConst.NewEndUI, typeof(NewEndUI)); - moduleManager.AddUIType(UIConst.UnlockLevelUI, typeof(UnlockLevelUI)); - moduleManager.AddUIType(UIConst.AlubumUI, typeof(AlubumUI)); - moduleManager.AddUIType(UIConst.AlbumDetailUI, typeof(AlbumDetailUI)); - moduleManager.AddUIType(UIConst.LiveUI, typeof(LiveUI)); - moduleManager.AddUIType(UIConst.LiveDetailUI, typeof(LiveDetailUI)); - - moduleManager.AddUIType(UIConst.VipClubViewUI, typeof(VipClubViewUI)); - - moduleManager.AddUIType(UIConst.LiveUnlockUI, typeof(LiveUnlockUI)); - moduleManager.AddUIType(UIConst.SubUnlockUI, typeof(SubUnlockUI)); - moduleManager.AddUIType(UIConst.ScAlbumLockUI, typeof(ScAlbumLockUI)); - moduleManager.AddUIType(UIConst.UnlockTipsUI, typeof(UnlockTipsUI)); moduleManager.AddUIType(UIConst.NetworkErrorTipsUI, typeof(NetworkErrorTipsUI)); moduleManager.AddUIType(UIConst.GoldRewardUI, typeof(GoldRewardUI)); - moduleManager.AddUIType(UIConst.ChatChooseUI, typeof(ChatChooseUI)); - moduleManager.AddUIType(UIConst.ChatUI, typeof(ChatUI)); - moduleManager.AddUIType(UIConst.ChatNumberUI, typeof(ChatNumberUI)); - moduleManager.AddUIType(UIConst.ChatUnlockUI, typeof(ChatUnlockUI)); - moduleManager.AddUIType(UIConst.UnlockLevelNewUI, typeof(UnlockLevelNewUI)); + moduleManager.AddUIType(UIConst.BroadcastUI, typeof(BroadcastUI)); moduleManager.AddUIType(UIConst.GamePlayUI, typeof(GamePlayUI)); moduleManager.AddUIType(UIConst.GameAddTimeUI, typeof(GameAddTimeUI)); diff --git a/Assets/Scripts/ModuleUI/AlbumDetail.meta b/Assets/Scripts/ModuleUI/AlbumDetail.meta deleted file mode 100644 index a52099f..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d0a3a471d4eab4205adfabe3e6e03dfa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs deleted file mode 100644 index 6fd2504..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class AlbumDetailCtrl : BaseCtrl - { - public static AlbumDetailCtrl Instance { get; private set; } - - private AlbumDetailModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.AlbumDetailModel) as AlbumDetailModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs.meta b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs.meta deleted file mode 100644 index a535415..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 742a1554a1ce547a18f4d2fcde5d052a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs deleted file mode 100644 index 89536c3..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class AlbumDetailModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs.meta b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs.meta deleted file mode 100644 index ab5e3d5..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a5b5cfda3c4d14dc6ab5ea147569f119 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs deleted file mode 100644 index 0197712..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs +++ /dev/null @@ -1,299 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using System.Collections.Generic; -using FGUI.LG_albums; -using FGUI.LG_Common; -using SGModule.DataStorage; -using DG.Tweening; -using SGModule.Common.Extensions; -using System.Linq; -using SGModule.NetKit; -namespace LoveLegend -{ - public class AlbumDetailUI : BaseUI - { - private AlbumDetailUICtrl ctrl; - private AlbumDetailModel model; - private FGUI.LG_albums.com_albumsDetail ui; - - public AlbumDetailUI(AlbumDetailUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.AlbumDetailUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_albums"; - uiInfo.assetName = "com_albumsDetail"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.AlbumDetailModel) as AlbumDetailModel; - } - - protected override void OnClose() - { - if (loader != null && !loader.isDisposed && loader.texture != null) - { - loader.texture.Dispose(); - loader.texture = null; - } - loader = null; - - if (new_index != -1) - { - GameDispatcher.Instance.Dispatch(GameMsg.UnlockAlbums, index); - } - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_albums.com_albumsDetail; - } - private List LevelData; - private int new_index = -1; - private int index; - - private GLoader loader = new GLoader(); - protected override void OnOpenBefore(object args) - { - index = (int)args; - Debug.Log(index); - ui.btn_close.SetClick(() => - { - CtrlCloseUI(); - }); - LevelData = ConfigSystem.GetConfig(); - // ui.list_.SetVirtual(); - // ui.list_.itemRenderer = RendererList; - // ui.list_.numItems = GameHelper.GetLevel() - 1; - // ui.list_.ScrollToView(new_index); - - RendererList(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, refrsh); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, refrsh); - } - #endregion - - //初始化页面逻辑 - private void refrsh(object a = null) - { - DOVirtual.DelayedCall(0.5f, () => - { - // ui.list_.numItems = GameHelper.GetLevel() - 1; - RendererList(); - }); - - } - // void RendererList(int index, GObject obj) - void RendererList() - { - - item_albumsDetails item = (item_albumsDetails)ui.com_item; - - loader = item.com_loader.GetChild("loader") as GLoader; - - // if (GameHelper.GetVipPrivilege(Subscription.VipLevel.As())) - // { - // (item.btn_vip as btn_claim_2).have_vip.selectedIndex = 1; - - // } - // if (GameHelper.GetVipPrivilege(Subscription.SLVLevel.As())) - // { - // (item.btn_watch as btn_claim_1).have_vip.selectedIndex = 1; - - // } - - - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - var btn_down_coin = (FGUI.LG_Common.btn_unlock_1)item.btn_download_coin; - btn_down_coin.title = downloadCoinNum.As(); - btn_down_coin.down_load.selectedIndex = GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As()) ? 0 : 1; - - - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - (item.btn_download as FGUI.LG_Common.btn_claim).have_vip.selectedIndex = 1; - item.is_vip.selectedIndex = 1; - } - else - { - item.is_vip.selectedIndex = 0; - } - if (index < GameHelper.GetCommonModel().MultiModal - 1) - { - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, LevelData[index].Name, null, "LevelAlbums/", FolderNames.AlbumName); - item.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - } - else - { - GameHelper.ShowVideoAd("DownloadImage", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - } - }); - } - - }); - btn_down_coin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.download); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == index + 1); - string file_name = ""; - if (levelunlock_ != null) - { - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - item.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - } - else - { - GameHelper.ShowVideoAd("DownloadImage", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - } - }); - } - - }); - btn_down_coin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.download); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - } - else - { - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, LevelData[index].Name, null, "LevelAlbums/", FolderNames.AlbumName); - item.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - } - else - { - GameHelper.ShowVideoAd("DownloadImage", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - } - }); - } - - }); - btn_down_coin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - TextureHelper.SaveImageToAlbum(LevelData[index].Name, FolderNames.AlbumName); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.download); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs.meta b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs.meta deleted file mode 100644 index 381c318..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 47ef18a651dc245c587515925adba37d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs deleted file mode 100644 index 3677dbe..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class AlbumDetailUICtrl : BaseUICtrl - { - private AlbumDetailUI ui; - private AlbumDetailModel model; - - private uint openUIMsg = UICtrlMsg.AlbumDetailUI_Open; - private uint closeUIMsg = UICtrlMsg.AlbumDetailUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.AlbumDetailModel) as AlbumDetailModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new AlbumDetailUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs.meta b/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs.meta deleted file mode 100644 index b1dfd67..0000000 --- a/Assets/Scripts/ModuleUI/AlbumDetail/AlbumDetailUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0ae060ce359f4428b4c82fd96f6f2c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Alubum.meta b/Assets/Scripts/ModuleUI/Alubum.meta deleted file mode 100644 index 70259fd..0000000 --- a/Assets/Scripts/ModuleUI/Alubum.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 835af6bef1d644831a65b4e33ba7fa24 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs b/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs deleted file mode 100644 index 51a0e15..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class AlubumCtrl : BaseCtrl - { - public static AlubumCtrl Instance { get; private set; } - - private AlubumModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.AlubumModel) as AlubumModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs.meta b/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs.meta deleted file mode 100644 index effb1d7..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: afb7ba0a285a24cf6a2b59cbad176778 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs b/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs deleted file mode 100644 index dd13ba3..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class AlubumModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs.meta b/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs.meta deleted file mode 100644 index 1e06950..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a84f029a2173e4a74b9b57cdd492a693 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs b/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs deleted file mode 100644 index 214f243..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs +++ /dev/null @@ -1,494 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using DG.Tweening; -using FairyGUI; -using FGUI.LG_albums; -using UnityEngine; -using System; -using System.Threading; -using System.Threading.Tasks; -namespace LoveLegend - -{ - public class AlubumUI : BaseUI - { - private AlubumUICtrl ctrl; - private AlubumModel model; - private com_albums ui; - private long[] UpDatatime; - - public AlubumUI(AlubumUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.AlubumUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_albums"; - uiInfo.assetName = "com_albums"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - //初始化页面逻辑 - private void InitView(object a = null) - { - UpDatatime = new long[LevelData.Count]; - ImageName = new string[LevelData.Count]; - ui.list_albums.itemRenderer = RendererList; - ui.list_albums.numItems = LevelData.Count; - - InitScroll(); - } - - private void SetItemData(object obj = null) - { - UpDatatime[(int)obj] = 0; - ui.list_albums.RefreshVirtualList(); - } - - #region 生命周期 - - protected override void OnInit() - { - GLoaderPool.Instance.Init(null, 24, 312, 310); - } - - protected override void OnClose() - { - foreach (var t in loader_list) - if (t != null && !t.isDisposed && t.texture != null) - { - t.texture.Dispose(); - t.texture = null; - } - - // 1. 解除 UI 对 Loader 的引用 - for (var i = 0; i < ui.list_albums.numChildren; i++) - { - var item = ui.list_albums.GetChildAt(i) as item_albums; - if (item != null && item.com_loader.loader != null) item.com_loader.loader = null; // 清掉 GLoader 引用 - } - - activeLoaders.Clear(); - _fileIsExist.Clear(); - - GLoaderPool.Instance.DisposeAll(); - - TextureHelper.ClearMaterialPool(); - - // 强制卸载未使用的资源 - Resources.UnloadUnusedAssets(); - MemoryManager.CleanMemoryMonitor(); - } - - protected override void OnBind() - { - ui = baseUI as com_albums; - } - - private List LevelData; - - private readonly List loader_list = new(); - public SmartInvoker invoker; - protected override void OnOpenBefore(object args) - { - invoker = new SmartInvoker(() => - { - for (int i = 0; i < UpDatatime.Length; i++) - { - UpDatatime[i] = 0; - // ImageName[i] = ""; - } - ui.list_albums.RefreshVirtualList(); - }, TimeSpan.FromSeconds(0.2f)); - - LevelData = ConfigSystem.GetConfig(); - ui.list_albums.SetVirtual(); - ui.btn_close1.SetClick(() => { CtrlCloseUI(); }); - InitView(); - } - - - private const int MaxVisibleCount = 18; // 一屏显示18个 - private const int PreloadCount = 3; // 上下各预加载一屏 - private readonly Dictionary activeLoaders = new(); - private readonly Dictionary _fileIsExist = new(); - - private Throttle _throttle; - - private void InitScroll() - { - // ui.list_albums.scrollPane.onScroll.Add(OnScrollUpdate); - ui.list_albums.scrollPane.onScrollEnd.Add(OnScrollEndCB); // 保留结束时的整理 - - OnScrollEnd(); - } - - - private void OnScrollEndCB() - { - // UpdateVisibleAndPreload(); - - OnScrollEnd(); - - // Debug.Log("更新一次"); - } - - private void UpdateVisibleAndPreload() - { - // Debug.Log("[UpdateVisibleAndPreload]--------111111--------- "); - // if (LevelData == null || LevelData.Count == 0) return; - - // var firstVisibleIndex = ui.list_albums.GetFirstChildInView(); - // var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.list_albums.numItems - 1); - - // var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - // var endIndex = Mathf.Min(ui.list_albums.numItems - 1, lastVisibleIndex + PreloadCount); - - // // 回收超出范围 loader - // var keysToRemove = new List(); - // foreach (var kv in activeLoaders) - // { - // var idx = kv.Key; - // if (idx < startIndex || idx > endIndex) - // { - // GLoaderPool.Instance.ReturnLoader(kv.Value); - // var oldItem = ui.list_albums.GetChildAt(idx) as item_albums; - // if (oldItem != null) oldItem.com_loader.loader = null; - // keysToRemove.Add(idx); - // } - // } - - // foreach (var k in keysToRemove) activeLoaders.Remove(k); - - - // // 分配 loader 并加载图片 - // for (var i = startIndex; i <= endIndex; i++) - // { - // if (activeLoaders.ContainsKey(i)) continue; - - // var item = ui.list_albums.GetChildAt(i) as item_albums; - // if (item == null) continue; - - // if (item.com_loader.loader != null && !item.com_loader.loader.isDisposed) - // GLoaderPool.Instance.ReturnLoader(item.com_loader.loader); - - // var loader = GLoaderPool.Instance.GetLoader(); - // item.com_loader.loader = loader; - // item.com_loader.AddChild(loader); - // loader.SetSize(item.com_loader.loader.width, item.com_loader.loader.height); - - // _fileIsExist.TryGetValue(i, out var value); - // if (!value) - // { - // var localPath = Path.Combine(TextureHelper.getResPath(), LevelData[i].Name + ".jpg"); - - // if (File.Exists(localPath)) - // { - // _fileIsExist[i] = true; - // Debug.Log($"[SetImgLoader] 本地存在,直接加载 {LevelData[i].Name}"); - // CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(LevelData[i].Name, loader, null, - // "LevelAlbums/")); - // } - // else - // { - // _fileIsExist[i] = false; - // } - // } - // else - // { - // CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(LevelData[i].Name, loader, null, - // "LevelAlbums/")); - // } - - // activeLoaders[i] = loader; - // } - // Debug.Log($"[ScrollUpdate] active loaders={activeLoaders.Count}, pool={GLoaderPool.Instance.GetPoolCount()}, inUse={GLoaderPool.Instance.GetInUseCount()}"); - } - - private void OnScrollEnd() - { - invoker.Invoke(); - // for (int i = 0; i < UpDatatime.Length; i++) - // { - // UpDatatime[i] = 0; - // // ImageName[i] = ""; - // } - - // DOVirtual.DelayedCall(0.1f, () => - // { - // ui.list_albums.RefreshVirtualList(); - // }); - - // if (LevelData == null || LevelData.Count == 0) return; - - // var firstVisibleIndex = ui.list_albums.GetFirstChildInView(); - // var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.list_albums.numItems - 1); - - // var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - // var endIndex = Mathf.Min(ui.list_albums.numItems - 1, lastVisibleIndex + PreloadCount); - - // // Debug.Log($"[ScrollEnd] start index={startIndex} end index={endIndex}"); - - - // var tasks = new List<(GLoader loader, string fileName, Action callback, string folder)>(); - // // 分配 loader 并加载图片 - // for (var i = startIndex; i <= endIndex; i++) - // { - // _fileIsExist.TryGetValue(i, out var value); - - // if (value) continue; - - // if (GameHelper.GetLevel() < i + 1) continue; - - // var item = ui.list_albums.GetChildAt(i) as item_albums; - // if (item == null) continue; - // if (item.com_loader.loader != null && !item.com_loader.loader.isDisposed) - // GLoaderPool.Instance.ReturnLoader(item.com_loader.loader); - // var loader = GLoaderPool.Instance.GetLoader(); - // item.com_loader.loader = loader; - // item.com_loader.AddChild(loader); - // loader.SetSize(item.com_loader.loader.width, item.com_loader.loader.height); - - // var idx = i; - // tasks.Add((loader, LevelData[i].Name, NTexture => - // { - // if (NTexture != null) _fileIsExist[idx] = true; - // }, "LevelAlbums/")); - - // activeLoaders[i] = loader; - // } - - // if (tasks.Count > 0) TextureHelper.SetImgLoaders(tasks); - } - - private string[] ImageName; - - private void RendererList(int index, GObject obj) - { - // Debug.Log("Render list" ); - - // Debug.Log(JsonConvert.SerializeObject(LevelData[index])); - - item_albums item = (item_albums)obj; - item.text_num.text = (index + 1).ToString(); - if (index < GameHelper.GetCommonModel().MultiModal - 1) - { - item.type_.selectedIndex = 0; - if (GameHelper.GetLevel() > index + 1) - { - item.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.AlbumDetailUI_Open, index); }); - } - else - { - item.SetClick(() => { GameHelper.ShowTips("lv_unlock", true); }); - } - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == index + 1); - if (levelunlock_ != null) - { - item.type_.selectedIndex = levelunlock_.type; - } - else item.type_.selectedIndex = 0; - if (GameHelper.GetLevel() > index + 1) - { - item.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.AlbumDetailUI_Open, index); }); - } - else - { - item.SetClick(() => { GameHelper.ShowTips("lv_unlock", true); }); - } - } - - - if (GameHelper.GetNowTime() < UpDatatime[index] + 1) return; - UpDatatime[index] = GameHelper.GetNowTime(); - // if (!activeLoaders.ContainsValue(item.com_loader.loader)) activeLoaders[index] = item.com_loader.loader; - if (!loader_list.Contains(item.com_loader.GetChild("loader") as GLoader)) - loader_list.Add(item.com_loader.GetChild("loader") as GLoader); - - - if (index < GameHelper.GetCommonModel().MultiModal - 1) - { - if (GameHelper.GetLevel() > index + 1) - { - item.isUnlock.selectedIndex = 1; - if (item.com_loader.loader.texture == null || - item.com_loader.loader.texture.nativeTexture.name != LevelData[index].Name) - { - // item.isUnlock.selectedIndex = 0; - // if (item.com_loader.loader.texture != null) - // { - // item.com_loader.loader.texture.Dispose(); // 释放 GPU 资源 - // item.com_loader.loader.texture = null; // 断开引用 - // } - - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, LevelData[index].Name, - (a) => { Debug.Log(item.com_loader.loader.texture.nativeTexture.name); }, "LevelAlbums/", FolderNames.AlbumName); - - ImageName[index] = LevelData[index].Name; - } - - item.touchable = true; - } - else - { - item.isUnlock.selectedIndex = 0; - // item.touchable = false; - } - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == index + 1); - - if (GameHelper.GetLevel() > index + 1) - { - if (levelunlock_ != null) - { - item.isUnlock.selectedIndex = 1; - - if (item.com_loader.loader.texture == null || item.com_loader.loader.texture.nativeTexture.name != ImageName[index]) - { - - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - ImageName[index] = LevelData[index].Name; - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - ImageName[index] = LevelData[index].Name; - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - ImageName[index] = LevelData[index].Name; - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - ImageName[index] = LevelData[index].Name; - } - - } - - } - else - { - item.isUnlock.selectedIndex = 1; - if (item.com_loader.loader.texture == null || item.com_loader.loader.texture.nativeTexture.name != LevelData[index].Name) - { - TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, LevelData[index].Name, null, "LevelAlbums/", FolderNames.AlbumName); - ImageName[index] = LevelData[index].Name; - } - } - } - else - { - // item.touchable = false; - item.isUnlock.selectedIndex = 0; - } - } - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.UnlockAlbums, SetItemData); - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.UnlockAlbums, SetItemData); - } - - #endregion - } - public class SmartInvoker - { - private readonly Action _action; - private readonly TimeSpan _delay; - private DateTime _lastImmediateInvoke = DateTime.MinValue; - private CancellationTokenSource _cts = null; - private readonly object _lock = new object(); - private bool _hasPending = false; - - public SmartInvoker(Action action, TimeSpan delay) - { - _action = action; - _delay = delay; - } - - public void Invoke() - { - lock (_lock) - { - var now = DateTime.UtcNow; - var timeSinceLast = now - _lastImmediateInvoke; - - if (timeSinceLast >= _delay) - { - _lastImmediateInvoke = now; - _action(); - Debug.Log("diaoyongyiciiiiiiiiiiiiiii"); - } - else - { - _hasPending = true; - _cts?.Cancel(); - _cts = new CancellationTokenSource(); - var token = _cts.Token; - - Task.Delay(_delay, token).ContinueWith(t => - { - if (!t.IsCanceled) - { - lock (_lock) - { - if (_hasPending) - { - _lastImmediateInvoke = DateTime.UtcNow; - _hasPending = false; - _action(); - Debug.Log("diaoyongyiciiiiiiiiiiiiiii"); - } - } - } - }, TaskScheduler.Default); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs.meta b/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs.meta deleted file mode 100644 index 082f38b..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8211638a3a24a4f0f9e093343198e8ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs b/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs deleted file mode 100644 index 4badc0f..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class AlubumUICtrl : BaseUICtrl - { - private AlubumUI ui; - private AlubumModel model; - - private uint openUIMsg = UICtrlMsg.AlubumUI_Open; - private uint closeUIMsg = UICtrlMsg.AlubumUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.AlubumModel) as AlubumModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new AlubumUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs.meta b/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs.meta deleted file mode 100644 index 83591ed..0000000 --- a/Assets/Scripts/ModuleUI/Alubum/AlubumUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a1c15e9bbddc64e5ca24ec7c564207a5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Chat.meta b/Assets/Scripts/ModuleUI/Chat.meta deleted file mode 100644 index ca3bcb6..0000000 --- a/Assets/Scripts/ModuleUI/Chat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6c531c42d4fca4ff7b2785c66a8f93e9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs b/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs deleted file mode 100644 index 7f860a2..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatCtrl : BaseCtrl - { - public static ChatCtrl Instance { get; private set; } - - private ChatModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.ChatModel) as ChatModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs.meta b/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs.meta deleted file mode 100644 index 237c636..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f85819b166c34048b8b0e9ca525fe8e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Chat/ChatModel.cs b/Assets/Scripts/ModuleUI/Chat/ChatModel.cs deleted file mode 100644 index 99a9cf9..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Chat/ChatModel.cs.meta b/Assets/Scripts/ModuleUI/Chat/ChatModel.cs.meta deleted file mode 100644 index d26f7a3..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f469f84c20ba64b5994e844b29a7f2fe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Chat/ChatUI.cs b/Assets/Scripts/ModuleUI/Chat/ChatUI.cs deleted file mode 100644 index 8863bbb..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatUI.cs +++ /dev/null @@ -1,352 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using IgnoreOPS; -using Newtonsoft.Json; -using System.Linq; -using FGUI.LG_AIchat; -using DG.Tweening; -using System.Collections.Generic; -using System; -using System.Linq.Expressions; - -namespace LoveLegend -{ - public class ChatUI : BaseUI - { - private ChatUICtrl ctrl; - private ChatModel model; - private FGUI.LG_AIchat.com_chat ui; - - public ChatUI(ChatUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.ChatUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_AIchat"; - uiInfo.assetName = "com_chat"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatModel) as ChatModel; - } - - protected override void OnClose() - { - ChatHelper.chat_red_list[chat_index] = false; - GameDispatcher.Instance.Dispatch(GameMsg.RefreshRedDot); - UnityManager.ShezhiACT(true); - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_AIchat.com_chat; - } - - protected override void OnOpenBefore(object args) - { - // ChatHelper.GetMessage(1); - // ChatHelper.ResetMessage(1); - if (args != null) chat_index = (int)args; - if (DataMgr.ChatData.Value == null) - { - DataMgr.ChatData.Value = new List(); - } - - if (Screen.safeArea.y != 0) - { - ui.group_.y += Screen.safeArea.y - 15; - } - Debug.Log(JsonConvert.SerializeObject(DataMgr.ChatData.Value)); - ui.btn_close.SetClick(CtrlCloseUI); - ui.type.selectedIndex = ui.btn_tophead.type.selectedIndex = chat_index; - InitView(); - ui.btn_photo.SetClick(() => - { - GameHelper.ShowTips("launching_soon", true); - }); - ui.btn_video.SetClick(() => - { - GameHelper.ShowTips("launching_soon", true); - }); - UnityManager.ShezhiACT(false); - } - public static bool IsSameDay(long timestamp) - { - // 假设时间戳是 Unix 时间戳(秒),如果是毫秒记得除以 1000 - DateTime inputTime = DateTimeOffset.FromUnixTimeSeconds(timestamp).DateTime; - DateTime now = DateTimeOffset.FromUnixTimeSeconds(GameHelper.GetNowTime()).DateTime; - - // 比较年月日是否一致 - return inputTime.Date == now.Date; - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.LiveChange, addNewItem); - GameDispatcher.Instance.AddListener(GameMsg.AddChatNum, setChatNum); - GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, SetTopCurr); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.LiveChange, addNewItem); - GameDispatcher.Instance.RemoveListener(GameMsg.AddChatNum, setChatNum); - GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, SetTopCurr); - } - public void SetTopCurr(object a = null) - { - Debug.Log("??????????"); - var btn_gold = ui.btn_gold as com_gold; - btn_gold.text_gold.text = $"{DataMgr.Coin.Value:N0}"; - - - - } - private void addNewItem(object a = null) - { - _ChatItem = DataMgr.ChatData.Value.FirstOrDefault(c => c.role == ChatType.GetType(chat_index)); - if (_ChatItem.content_list.Count > list_count) - { - if (have_inputani && ChatHelper.unshow_message[chat_index] <= 0) - { - ui.list_.RemoveChildAt(list_count); - have_inputani = false; - } - // else if (have_inputani && ChatHelper.unshow_message[chat_index] > 0) - // { - - // } - for (int i = list_count; i < _ChatItem.content_list.Count; i++) - { - if (_ChatItem.content_list[i].type == 1) - { - item_chatText_left com_msg = (item_chatText_left)UIPackage.CreateObject("LG_AIchat", "item_chatText_left"); - com_msg.text_content.text = _ChatItem.content_list[i].text_content; - // if (chat_index == 0) com_msg.head.url = "ui://tksc66j2ljeg27"; - // else if (chat_index == 1) com_msg.head.url = "ui://tksc66j2ljeg25"; - // else if (chat_index == 2) com_msg.head.url = "ui://tksc66j2ljeg20"; - com_msg.type.selectedIndex = chat_index; - if (ChatHelper.unshow_message[chat_index] <= 0 || (!have_inputani)) ui.list_.AddChild(com_msg); - else ui.list_.AddChildAt(com_msg, ui.list_.numChildren - 1); - } - } - - // if (ChatHelper.unshow_message[chat_index] > 0) - // { - // item_chatText_left com_msg_ = (item_chatText_left)UIPackage.CreateObject("LG_AIchat", "item_chatText_left"); - // com_msg_.t0.Play(-1, 0, null); - // if (chat_index == 0) com_msg_.head.url = "ui://tksc66j2ljeg27"; - // else if (chat_index == 1) com_msg_.head.url = "ui://tksc66j2ljeg25"; - // else if (chat_index == 2) com_msg_.head.url = "ui://tksc66j2ljeg20"; - // ui.list_.AddChild(com_msg_); - // have_inputani = true; - // } - - list_count = _ChatItem.content_list.Count; - ui.list_.ScrollToView(list_count - 1); - } - } - private void setChatNum(object a = null) - { - - if (DataMgr.ChatFreeNumber.Value == 0 && DataMgr.ChatNumber.Value == 0) - { - // ui.have_free.selectedIndex = 1; - // ui.text_remainfreeNum.text = "Free:" + DataMgr.ChatFreeNumber.Value; - // ui.btn_send.state.selectedIndex = 0; - ui.btn_send.title = Language.GetContent("get_more"); - } - else - { - // ui.have_free.selectedIndex = 0; - // ui.text_remainNum.text = ":" + DataMgr.ChatNumber.Value; - // ui.btn_send.state.selectedIndex = 1; - ui.btn_send.title = Language.GetContent("Send"); - } - if (DataMgr.ChatFreeNumber.Value > 0) - { - ui.btn_send.text_remainNum.text = Language.GetContentParams("Free_1", DataMgr.ChatFreeNumber.Value); - } - else - { - ui.btn_send.text_remainNum.text = DataMgr.ChatNumber.Value.ToString(); - } - // if (DataMgr.ChatFreeNumber.Value <= 0 && DataMgr.ChatNumber.Value <= 0) ui.btn_send.title = "Get More"; - // else ui.btn_send.title = "Send"; - - } - - #endregion - private ChatItem _ChatItem; - private int chat_index = 2; - private int list_count = 0; - //初始化页面逻辑 - private void InitView() - { - Debug.Log(DataMgr.ChatData.Value); - SetTopCurr(); - _ChatItem = DataMgr.ChatData.Value.FirstOrDefault(c => c.role == ChatType.GetType(chat_index)); - Debug.Log(JsonConvert.SerializeObject(_ChatItem)); - if (DataMgr.ChatRecoverDays.Value != DateTime.Now.Day) - { - DataMgr.ChatFreeNumber.Value = GameHelper.GetCommonModel().FreeMessages; - DataMgr.ChatRecoverDays.Value = DateTime.Now.Day; - } - setChatNum(); - if (_ChatItem != null) - { - _ChatItem.content_list.RemoveAll(item => !IsSameDay(item.chat_time)); - if (_ChatItem.content_list.Count > 100) - { - _ChatItem.content_list.RemoveRange(0, _ChatItem.content_list.Count - 100); - } - DataMgr.ChatData.Save(); - list_count = _ChatItem.content_list.Count; - Debug.Log(list_count + ".................."); - for (int i = 0; i < _ChatItem.content_list.Count; i++) - { - if (_ChatItem.content_list[i].type == 0) - { - item_chatText_right com_msg = (item_chatText_right)UIPackage.CreateObject("LG_AIchat", "item_chatText_right"); - com_msg.text_content.text = _ChatItem.content_list[i].text_content; - GameHelper.SetSelfAvatar(com_msg.btn_head.load_avatar, DataMgr.PlayerAvatarId.Value); - ui.list_.AddChild(com_msg); - } - else - { - item_chatText_left com_msg = (item_chatText_left)UIPackage.CreateObject("LG_AIchat", "item_chatText_left"); - com_msg.text_content.text = _ChatItem.content_list[i].text_content; - // if (chat_index == 0) com_msg.head.url = "ui://tksc66j2ljeg27"; - // else if (chat_index == 1) com_msg.head.url = "ui://tksc66j2ljeg25"; - // else if (chat_index == 2) com_msg.head.url = "ui://tksc66j2ljeg20"; - com_msg.type.selectedIndex = chat_index; - ui.list_.AddChild(com_msg); - } - } - if (list_count > 3) ui.list_.ScrollToView(list_count - 1); - ChatHelper.CheckReply(); - } - else - { - ChatHelper.GetMessage(chat_index); - DOVirtual.DelayedCall(1, () => - { - ChatHelper.CheckReply(); - }); - } - - // DataMgr.ChatData.Value = ""; - ui.btn_send.SetClick(() => - { - if (DataMgr.ChatFreeNumber.Value > 0 || DataMgr.ChatNumber.Value > 0) - { - if (ui.input_message.text.IsNullOrWhiteSpace()) - { - GameHelper.ShowTips("message_tips", true); - return; - } - Debug.Log(ui.input_message.text.Length); - if (ui.input_message.text.Length > 200) - { - GameHelper.ShowTips("character_limit", true); - return; - } - if (DataMgr.ChatFreeNumber.Value > 0) - { - DataMgr.ChatFreeNumber.Value--; - } - else DataMgr.ChatNumber.Value--; - setChatNum(); - ChatHelper.SendMessage(chat_index, ui.input_message.text); - - list_count++; - DOVirtual.DelayedCall(4, () => - { - Debug.Log("重复一次"); - ChatHelper.CheckReply(); - }); - - if (have_inputani) - { - ui.list_.RemoveChildAt(ui.list_.numItems - 1); - - } - - - item_chatText_right com_msg = (item_chatText_right)UIPackage.CreateObject("LG_AIchat", "item_chatText_right"); - com_msg.text_content.text = ui.input_message.text; - GameHelper.SetSelfAvatar(com_msg.btn_head.load_avatar, DataMgr.PlayerAvatarId.Value); - ui.list_.AddChild(com_msg); - - item_chatText_left com_msg_ = (item_chatText_left)UIPackage.CreateObject("LG_AIchat", "item_chatText_left"); - com_msg_.t0.Play(-1, 0, null); - // if (chat_index == 0) com_msg_.head.url = "ui://tksc66j2ljeg27"; - // else if (chat_index == 1) com_msg_.head.url = "ui://tksc66j2ljeg25"; - // else if (chat_index == 2) com_msg_.head.url = "ui://tksc66j2ljeg20"; - com_msg_.type.selectedIndex = chat_index; - ui.list_.AddChild(com_msg_); - - have_inputani = true; - - - if (_ChatItem == null) - { - _ChatItem = new ChatItem() - { - role = ChatType.GetType(chat_index), - content_list = new List(), - }; - DataMgr.ChatData.Value.Add(_ChatItem); - } - _ChatItem.content_list.Add(new ChatText() - { - type = 0, - text_content = ui.input_message.text, - chat_time = GameHelper.GetNowTime(), - }); - DataMgr.ChatData.Save(); - ui.input_message.text = ""; - ui.list_.ScrollToView(ui.list_.numItems - 1); - - DOVirtual.DelayedCall(1, () => - { - ChatHelper.CheckReply(); - }); - - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatNumberUI_Open); - } - - }); - - } - private bool have_inputani = false; - - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Chat/ChatUI.cs.meta b/Assets/Scripts/ModuleUI/Chat/ChatUI.cs.meta deleted file mode 100644 index cc9cc1d..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 58ebdba9853c84405a4a4b497e81179c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs b/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs deleted file mode 100644 index dfe7f14..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatUICtrl : BaseUICtrl - { - private ChatUI ui; - private ChatModel model; - - private uint openUIMsg = UICtrlMsg.ChatUI_Open; - private uint closeUIMsg = UICtrlMsg.ChatUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatModel) as ChatModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new ChatUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs.meta b/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs.meta deleted file mode 100644 index 9294ead..0000000 --- a/Assets/Scripts/ModuleUI/Chat/ChatUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8deb89af60a64834a3b0153598b0040 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatChoose.meta b/Assets/Scripts/ModuleUI/ChatChoose.meta deleted file mode 100644 index 7fb376c..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dacd1cefc6cec44538462f38924495ef -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs deleted file mode 100644 index c7e150e..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatChooseCtrl : BaseCtrl - { - public static ChatChooseCtrl Instance { get; private set; } - - private ChatChooseModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.ChatChooseModel) as ChatChooseModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs.meta deleted file mode 100644 index 5ec83dc..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9eb2f8cf020ff4c0eb19c2f692b8671a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs deleted file mode 100644 index 4edfee7..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatChooseModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs.meta b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs.meta deleted file mode 100644 index 75a5817..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c92b4256954442228fec21a2bea9c70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs deleted file mode 100644 index 3986761..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs +++ /dev/null @@ -1,161 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using IgnoreOPS; -using SGModule.Common.Extensions; - -namespace LoveLegend -{ - public class ChatChooseUI : BaseUI - { - private ChatChooseUICtrl ctrl; - private ChatChooseModel model; - private FGUI.LG_AIchat.com_chatChoose ui; - - public ChatChooseUI(ChatChooseUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.ChatChooseUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_AIchat"; - uiInfo.assetName = "com_chatChoose"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatChooseModel) as ChatChooseModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_AIchat.com_chatChoose; - } - - protected override void OnOpenBefore(object args) - { - if (Screen.safeArea.y != 0) - { - ui.btn_gold.y += Screen.safeArea.y - 15; - } - InitView(); - ui.btn_close.SetClick(() => - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatChooseUI_Close); - }); - RefreshRed(); - ui.btn_0.SetClick(() => - { - if (DataMgr.IsUnlockChat.Value < 0 && !GameHelper.GetVipPrivilege(Subscription.UnlockAssitant.As()))//未解锁。 - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretUnlockUI_Open, 3); - } - else - { - if (DataMgr.IsUnlockChat.Value == 0) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 3); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUI_Open, 0); - } - } - }); - - - ui.btn_1.SetClick(() => - { - if (DataMgr.IsUnlockChat.Value < 0 && !GameHelper.GetVipPrivilege(Subscription.UnlockAssitant.As()))//未解锁。 - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretUnlockUI_Open, 3); - } - else - { - if (DataMgr.IsUnlockChat.Value == 0) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 3); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUI_Open, 1); - } - } - }); - ui.btn_2.SetClick(() => - { - if (DataMgr.IsUnlockChat.Value < 0 && !GameHelper.GetVipPrivilege(Subscription.UnlockAssitant.As()))//未解锁。 - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretUnlockUI_Open, 3); - } - else - { - if (DataMgr.IsUnlockChat.Value == 0) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 3); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUI_Open, 2); - } - } - }); - } - public void SetTopCurr(object a = null) - { - var btn_gold = ui.btn_gold as com_gold; - btn_gold.text_gold.text = $"{DataMgr.Coin.Value:N0}"; - - - - } - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, SetTopCurr); - GameDispatcher.Instance.AddListener(GameMsg.RefreshRedDot, RefreshRed); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, SetTopCurr); - GameDispatcher.Instance.RemoveListener(GameMsg.RefreshRedDot, RefreshRed); - } - #endregion - private void RefreshRed(object isShow = null) - { - ui.btn_0.red.visible = ChatHelper.GetChatRed(0); - ui.btn_1.red.visible = ChatHelper.GetChatRed(1); - ui.btn_2.red.visible = ChatHelper.GetChatRed(2); - } - //初始化页面逻辑 - private void InitView() - { - SetTopCurr(); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs.meta b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs.meta deleted file mode 100644 index 1caa543..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 83e9ae6711260435092c4e1af2e4ff5c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs deleted file mode 100644 index 28f03b9..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatChooseUICtrl : BaseUICtrl - { - private ChatChooseUI ui; - private ChatChooseModel model; - - private uint openUIMsg = UICtrlMsg.ChatChooseUI_Open; - private uint closeUIMsg = UICtrlMsg.ChatChooseUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatChooseModel) as ChatChooseModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new ChatChooseUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs.meta deleted file mode 100644 index 4ed9a39..0000000 --- a/Assets/Scripts/ModuleUI/ChatChoose/ChatChooseUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d217670d04bcc416790bd6b0d443de38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatNumber.meta b/Assets/Scripts/ModuleUI/ChatNumber.meta deleted file mode 100644 index 71b63b5..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ad5fec9f1e982489eb60757842ee45e9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs deleted file mode 100644 index aa9b8a6..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatNumberCtrl : BaseCtrl - { - public static ChatNumberCtrl Instance { get; private set; } - - private ChatNumberModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.ChatNumberModel) as ChatNumberModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs.meta deleted file mode 100644 index efeae1f..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0f1c72491f98a47f9984461d5b5797ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs deleted file mode 100644 index f72f4bb..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatNumberModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs.meta b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs.meta deleted file mode 100644 index 14c2f85..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b99d4915960364dcf83eda361634c06c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs deleted file mode 100644 index d2a6bc7..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs +++ /dev/null @@ -1,116 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; - -namespace LoveLegend -{ - public class ChatNumberUI : BaseUI - { - private ChatNumberUICtrl ctrl; - private ChatNumberModel model; - private FGUI.LG_AIchat.com_ChatNumber ui; - - public ChatNumberUI(ChatNumberUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.ChatNumberUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_AIchat"; - uiInfo.assetName = "com_ChatNumber"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatNumberModel) as ChatNumberModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_AIchat.com_ChatNumber; - } - - protected override void OnOpenBefore(object args) - { - InitView(); - - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(() => - { - CtrlCloseUI(); - }); - int[] array = GameHelper.GetCommonModel().CoinsAccess; - ui.text_coins.SetVar("coin", array[0].ToString()).FlushVars(); - ui.text_coins.SetVar("num", array[1].ToString()).FlushVars(); - ui.text_ads.SetVar("num", GameHelper.GetCommonModel().AdAccess.ToString()).FlushVars(); - ui.btn_coins.title = array[0].ToString(); - ui.btn_coins.SetClick(() => - { - if (DataMgr.Coin.Value >= array[0]) - { - DataMgr.Coin.Value -= array[0]; - DataMgr.ChatNumber.Value += array[1]; - GameDispatcher.Instance.Dispatch(GameMsg.AddChatNum); - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - CtrlCloseUI(); - GameHelper.ShowTips("more_message", true); - } - else GameHelper.ShowTips("no_enough_gold", true); - }); - - ui.btn_watch.SetClick(() => - { - GameHelper.ShowVideoAd("TaskReward", (issuccess) => - { - if (issuccess) - { - DataMgr.ChatNumber.Value += GameHelper.GetCommonModel().AdAccess; - GameDispatcher.Instance.Dispatch(GameMsg.AddChatNum); - CtrlCloseUI(); - GameHelper.ShowTips("more_message", true); - } - }); - }); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs.meta b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs.meta deleted file mode 100644 index 9b4fbd1..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6aa550f4b878c46b1b94f94bd8344e29 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs deleted file mode 100644 index db8648e..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatNumberUICtrl : BaseUICtrl - { - private ChatNumberUI ui; - private ChatNumberModel model; - - private uint openUIMsg = UICtrlMsg.ChatNumberUI_Open; - private uint closeUIMsg = UICtrlMsg.ChatNumberUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatNumberModel) as ChatNumberModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new ChatNumberUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs.meta deleted file mode 100644 index e533de6..0000000 --- a/Assets/Scripts/ModuleUI/ChatNumber/ChatNumberUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cfc256c0532ea497899ef69ce0fc0e54 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatUnlock.meta b/Assets/Scripts/ModuleUI/ChatUnlock.meta deleted file mode 100644 index 12473d2..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 327b4267fce094111a78bb54bdb1e83c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs deleted file mode 100644 index 859967e..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatUnlockCtrl : BaseCtrl - { - public static ChatUnlockCtrl Instance { get; private set; } - - private ChatUnlockModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.ChatUnlockModel) as ChatUnlockModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs.meta deleted file mode 100644 index cdcd8ac..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c093fabf4fa34bf4a1fb3482d8f9761 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs deleted file mode 100644 index 5ab4cf2..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatUnlockModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs.meta b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs.meta deleted file mode 100644 index 2548fe5..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 47d86987ec02a450ea21d30862f75ef1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs deleted file mode 100644 index f14721a..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs +++ /dev/null @@ -1,92 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using Spine.Unity; -using System; - -namespace LoveLegend -{ - public class ChatUnlockUI : BaseUI - { - private ChatUnlockUICtrl ctrl; - private ChatUnlockModel model; - private FGUI.LG_Unlock.com_chatUnlock ui; - - public ChatUnlockUI(ChatUnlockUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.ChatUnlockUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Unlock"; - uiInfo.assetName = "com_chatUnlock"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatUnlockModel) as ChatUnlockModel; - } - - protected override void OnClose() - { - closeCallback?.Invoke(); - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Unlock.com_chatUnlock; - } - - protected override void OnOpenBefore(object args) - { - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - - private Action closeCallback; - //初始化页面逻辑 - private void InitView() - { - SkeletonAnimation ske_pot = FXManager.Instance.SetFx(ui.ani_parent, Fx_Type.fx_chatunlock, ref closeCallback); - ske_pot.state.SetAnimation(0, "animation", true); - - SkeletonAnimation ske_pot1 = FXManager.Instance.SetFx(ui.ani_parent1, Fx_Type.fx_chatunlock1, ref closeCallback); - ske_pot1.state.SetAnimation(0, "animation", true); - - SkeletonAnimation ske_pot2 = FXManager.Instance.SetFx(ui.ani_parent2, Fx_Type.fx_chatunlock2, ref closeCallback); - ske_pot2.state.SetAnimation(0, "animation", true); - ui.btn_close.SetClick(CtrlCloseUI); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs.meta b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs.meta deleted file mode 100644 index d1b0f45..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d75d7fcc65bbb4bd9bea1bbe54ce9bdd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs deleted file mode 100644 index e01c613..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class ChatUnlockUICtrl : BaseUICtrl - { - private ChatUnlockUI ui; - private ChatUnlockModel model; - - private uint openUIMsg = UICtrlMsg.ChatUnlockUI_Open; - private uint closeUIMsg = UICtrlMsg.ChatUnlockUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ChatUnlockModel) as ChatUnlockModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new ChatUnlockUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs.meta b/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs.meta deleted file mode 100644 index f4ed5c1..0000000 --- a/Assets/Scripts/ModuleUI/ChatUnlock/ChatUnlockUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e758e321c0de44349be76c88070b8e85 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/CurrencyReward.meta b/Assets/Scripts/ModuleUI/CurrencyReward.meta deleted file mode 100644 index 6584eac..0000000 --- a/Assets/Scripts/ModuleUI/CurrencyReward.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b05bab87ee5860d45b1e0e643cda6b64 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Hall/HallUI.cs b/Assets/Scripts/ModuleUI/Hall/HallUI.cs index 36978c1..152dd63 100644 --- a/Assets/Scripts/ModuleUI/Hall/HallUI.cs +++ b/Assets/Scripts/ModuleUI/Hall/HallUI.cs @@ -191,8 +191,6 @@ namespace LoveLegend } } - // ui.bg_loader; - Setbg(); if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview) { ui.btn_chat.visible = true; @@ -207,65 +205,6 @@ namespace LoveLegend } } - void Setbg(object a = null) - { - if (!GameHelper.IsGiftSwitch()) - { - return; - } - - if (GameHelper.GetLevel() - 1 < GameHelper.GetCommonModel().MultiModal) - { - int level_ = GameHelper.GetLevel() - 2; - if (level_ <= 0) level_ = 0; - if (level_ >= ConfigSystem.GetConfig().Count) level_ = ConfigSystem.GetConfig().Count - 1; - TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel() - 1); - if (levelunlock_ != null) - { - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - } - else - { - int level_ = GameHelper.GetLevel() - 1; - if (level_ < 0) level_ = 0; - if (level_ >= ConfigSystem.GetConfig().Count) level_ = ConfigSystem.GetConfig().Count - 1; - TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - } - - if (!loader_list.Contains(ui.bg_loader)) - { - loader_list.Add(ui.bg_loader); - } - } - private List loader_list = new List(); float showResurgence() { @@ -344,7 +283,6 @@ namespace LoveLegend GameDispatcher.Instance.AddListener(GameMsg.RefreshRedDot, RefreshRed); GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, Chang101); GameDispatcher.Instance.AddListener(GameMsg.UpdateNoads, SetBtnAds); - UICtrlDispatcher.Instance.AddListener(UICtrlMsg.AlubumUI_Close, Setbg); GameDispatcher.Instance.AddListener(GameMsg.Update101, Chang101); } @@ -356,7 +294,6 @@ namespace LoveLegend GameDispatcher.Instance.RemoveListener(GameMsg.RefreshRedDot, RefreshRed); GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, Chang101); GameDispatcher.Instance.RemoveListener(GameMsg.UpdateNoads, SetBtnAds); - UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.AlubumUI_Close, Setbg); GameDispatcher.Instance.RemoveListener(GameMsg.Update101, Chang101); } #endregion @@ -770,15 +707,15 @@ namespace LoveLegend } else { - if (!DataMgr.LevelUnlockListNew.Value.Any(x => x.level_ == GameHelper.GetLevel())) - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.UnlockLevelNewUI_Open, true); - } - else - { - GameHelper.gameType = 0; - GameDispatcher.Instance.Dispatch(GameMsg.OpenGame); - } + // if (!DataMgr.LevelUnlockListNew.Value.Any(x => x.level_ == GameHelper.GetLevel())) + // { + // uiCtrlDispatcher.Dispatch(UICtrlMsg.UnlockLevelNewUI_Open, true); + // } + // else + // { + // GameHelper.gameType = 0; + // GameDispatcher.Instance.Dispatch(GameMsg.OpenGame); + // } } } diff --git a/Assets/Scripts/ModuleUI/Live.meta b/Assets/Scripts/ModuleUI/Live.meta deleted file mode 100644 index c120257..0000000 --- a/Assets/Scripts/ModuleUI/Live.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fb7087fd6b2e94143a0c7b911552878c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs b/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs deleted file mode 100644 index a65675e..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveCtrl : BaseCtrl - { - public static LiveCtrl Instance { get; private set; } - - private LiveModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.LiveModel) as LiveModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs.meta b/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs.meta deleted file mode 100644 index 7e6a871..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1dfd5cbd0c9b24c4386fdc8ffbf50be7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Live/LiveModel.cs b/Assets/Scripts/ModuleUI/Live/LiveModel.cs deleted file mode 100644 index 2af1998..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Live/LiveModel.cs.meta b/Assets/Scripts/ModuleUI/Live/LiveModel.cs.meta deleted file mode 100644 index f1669b1..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2707d74e0e92400e9f2707b8bbbcbd9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Live/LiveUI.cs b/Assets/Scripts/ModuleUI/Live/LiveUI.cs deleted file mode 100644 index bb7a311..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveUI.cs +++ /dev/null @@ -1,419 +0,0 @@ -// using System; -using System; -using System.Collections.Generic; -using System.IO; - -// using System.IO; - -using FairyGUI; -using FGUI.LG_Common; -using FGUI.LG_live; -using SGModule.Common.Extensions; -using UnityEngine; -using UnityEngine.Video; - -namespace LoveLegend -{ - public class LiveUI : BaseUI - { - private const int MaxVisibleCount = 6; // 一屏最多6个播放器 - private const int PreloadCount = 2; // 上下各预加载一屏 - private static readonly Dictionary dictionary_ = new(); - private readonly Dictionary activeLoaders = new(); - private readonly Dictionary _fileIsExist = new(); - private LiveUICtrl ctrl; - - private float late_time = 0.1f; - private List LiveConfig; - private LiveModel model; - private com_live ui; - - - private GameObject videoParent; - - public LiveUI(LiveUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.LiveUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_live"; - uiInfo.assetName = "com_live"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - private void UpdateEvent() - { - late_time = 0.1f; - } - - private void Refresh(object param = null) - { - var index = param.As(); - // ui.list_.itemRenderer = RendererList; - // Debug.Log($"LiveConfig.Count==2=== {LiveConfig.Count}"); - // ui.list_.numItems = LiveConfig.Count; - - - if (ui.list_.GetChildAt(index) is item_live item) - { - var livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig[index], index); - item.state.selectedIndex = livedata_.progress >= 100 ? 0 : 1; - item.img_mask.fillAmount = (float)(100 - livedata_.progress) / 100; - BindPlayerToItem(item, index); - - if (LiveConfig[index].SubscribeUnlock == 1) - { - if (livedata_.progress < 100) item.vip.selectedIndex = 1; - else item.vip.selectedIndex = 2; - } - else item.vip.selectedIndex = 0; - } - } - - // 初始化页面逻辑 - private void InitView() - { - } - - #region 生命周期 - - protected override void OnInit() - { - videoParent = new GameObject("VideoPlayerParent"); - VideoPlayerPool.Instance.Init(videoParent, MaxVisibleCount); - } - - protected override void OnClose() - { - // 归还所有播放器 - foreach (var kvp in dictionary_) - VideoPlayerPool.Instance.ReturnPlayer(kvp.Value); - - dictionary_.Clear(); - VideoPlayerPool.Instance.DisposeAll(); - UnityEngine.Object.Destroy(videoParent); - - foreach (var t in loader_list) - if (t != null && !t.isDisposed && t.texture != null) - { - t.texture.Dispose(); - t.texture = null; - } - - MemoryManager.CleanMemoryMonitor(); - activeLoaders.Clear(); - _fileIsExist.Clear(); - - GLoaderPool.Instance.DisposeAll(); - } - - protected override void OnBind() - { - ui = baseUI as com_live; - } - - private readonly List loader_list = new(); - - - protected override void OnOpenBefore(object args) - { - LiveConfig = ConfigSystem.GetConfig(); - - ui.list_.itemRenderer = RendererList; - Debug.Log($"LiveConfig.Count==1=== {LiveConfig.Count}"); - ui.list_.numItems = LiveConfig.Count; - - ui.btn_close.SetClick(() => { CtrlCloseUI(); }); - - InitView(); - - // 滚动过程中实时刷新可见播放器 - ui.list_.scrollPane.onScroll.Add(OnScrollUpdate); - ui.list_.scrollPane.onScrollEnd.Add(OnScrollEnd); - - // 打开页面时初始化一次 - OnScrollEnd(); - } - - private void OnScrollUpdate() - { - if (LiveConfig == null || LiveConfig.Count == 0) return; - var firstVisibleIndex = ui.list_.GetFirstChildInView(); - var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.list_.numItems - 1); - - var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - var endIndex = Mathf.Min(ui.list_.numItems - 1, lastVisibleIndex + PreloadCount); - - // 回收超出范围 loader - var keysToRemove = new List(); - foreach (var kv in activeLoaders) - { - var idx = kv.Key; - if (idx < startIndex || idx > endIndex) - { - GLoaderPool.Instance.ReturnLoader(kv.Value); - var oldItem = ui.list_.GetChildAt(idx) as item_live; - if (oldItem != null) { - (oldItem.img_cover as com_loaderMask_circlle).loader = null; - } - keysToRemove.Add(idx); - } - } - - foreach (var k in keysToRemove) activeLoaders.Remove(k); - - // 分配 loader 并加载图片 - for (var i = startIndex; i <= endIndex; i++) - { - if (activeLoaders.ContainsKey(i)) continue; - - var item = ui.list_.GetChildAt(i) as item_live; - if (item == null) continue; - - if ((item.img_cover as com_loaderMask_circlle).loader != null && !(item.img_cover as com_loaderMask_circlle).loader.isDisposed) - GLoaderPool.Instance.ReturnLoader((item.img_cover as com_loaderMask_circlle).loader); - - var loader = GLoaderPool.Instance.GetLoader(); - (item.img_cover as com_loaderMask_circlle).loader = loader; - item.img_cover.AddChild(loader); - loader.SetSize(item.img_cover.width, item.img_cover.height); - item.img_cover.visible = true; - - _fileIsExist.TryGetValue(i, out var value); - if (!value) - { - var localPath = Path.Combine(TextureHelper.getResPath(), "LiveVideoCovers", LiveConfig[i].Name + "_cover" + ".jpg"); - if (File.Exists(localPath)) - { - _fileIsExist[i] = true; - Debug.Log($"[SetImgLoader] 本地存在,直接加载 {LiveConfig[i].Name + "_cover"}"); - CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(LiveConfig[i].Name + "_cover", loader, null, - "LiveVideoCovers/")); - } - else - { - _fileIsExist[i] = false; - CrazyAsyKit.StartCoroutine(LiveVideoManager.Instance.LoadCover(LiveConfig[i].Name + "_cover", tex => - { - if (tex != null) - { - if (loader != null) - { - loader.texture = new NTexture(tex); - loader.visible = true; - } - } - else - { - Debug.LogWarning("封面获取失败"); - } - })); - } - } - else - { - CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(LiveConfig[i].Name + "_cover", loader, null, - "LiveVideoCovers/")); - } - - activeLoaders[i] = loader; - } - } - - - private HashSet lastVisibleItems = new(); - - private void OnScrollEnd() - { - var tasks = new List<(GLoader loader, string fileName, Action callback, string folder, string localFolder)>(); - var firstVisibleIndex = ui.list_.GetFirstChildInView(); - var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.list_.numItems - 1); - - var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - var endIndex = Mathf.Min(ui.list_.numItems - 1, lastVisibleIndex + PreloadCount); - for (var i = startIndex; i <= endIndex; i++) - { - _fileIsExist.TryGetValue(i, out var value); - - if (value) continue; - if (ui.list_.GetChildAt(i) is item_live item) - { - if ((item.img_cover as com_loaderMask_circlle).loader != null && !(item.img_cover as com_loaderMask_circlle).loader.isDisposed) - GLoaderPool.Instance.ReturnLoader((item.img_cover as com_loaderMask_circlle).loader); - var loader = GLoaderPool.Instance.GetLoader(); - (item.img_cover as com_loaderMask_circlle).loader = loader; - item.img_cover.AddChild(loader); - loader.SetSize(item.img_cover.width, item.img_cover.height); - - var idx = i; - tasks.Add((loader, LiveConfig[i].Name + "_cover", texture => - { - if (texture != null) _fileIsExist[idx] = true; - }, "LiveAlbums/", FolderNames.VideoCoversName)); - - activeLoaders[i] = loader; - } - } - - TextureHelper.SetImgLoaders(tasks); - - Debug.Log($"[OnScrollEnd]==lastVisibleItems=== {lastVisibleItems.Count}"); - VideoLoadScheduler.ClearAll(); - // 1️⃣ 回收上一次的可见播放器 - foreach (var oldItem in lastVisibleItems) - if (dictionary_.TryGetValue(oldItem, out var player)) - { - player.Pause(); - player.targetTexture?.Release(); - VideoPlayerPool.Instance.ReturnPlayer(player); - dictionary_.Remove(oldItem); - oldItem.com_loader.visible = false; - oldItem.img_cover.visible = true; - } - - lastVisibleItems.Clear(); - - - // 2️⃣ 获取当前可见项 - var firstIndex = ui.list_.GetFirstChildInView(); - var lastIndex = Mathf.Min(firstIndex + MaxVisibleCount, ui.list_.numItems); - - HashSet newVisibleItems = new(); - for (var i = firstIndex; i < lastIndex; i++) - { - if (ui.list_.GetChildAt(i) is item_live item) - { - // 分配播放器 - newVisibleItems.Add(item); - if (!dictionary_.ContainsKey(item)) - { - var player = VideoPlayerPool.Instance.GetPlayer(); - if (player != null) - { - dictionary_[item] = player; - BindPlayerToItem(item, i); - } - } - } - } - - // 3️⃣ 保存为“上一次可见项” - lastVisibleItems = newVisibleItems; - } - - private void BindPlayerToItem(item_live item, int index) - { - var data = PreDownloadManager.GetLiveDataByIndex(LiveConfig[index], index); - - Debug.Log($"[绑定播放器 进度] progress==1=== {data.progress}"); - if (data.progress < 100) return; - - var player = dictionary_[item]; - var loader = item.com_loader.GetChild("loader") as GLoader; - item.com_loader.visible = true; - - if (!loader_list.Contains(loader)) loader_list.Add(loader); - - TextureHelper.SetVideoLoader(player, loader, LiveConfig[index].Name, vp => - { - if (vp != null && !item.isDisposed) - { - if (data.progress >= 100) - { - item.img_cover.visible = false; - GameDispatcher.Instance.Dispatch(GameMsg.liveVideoLoaded); - } - } - }); - } - - - private void RendererList(int index, GObject obj) - { - var livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig[index], index); - - var item = (item_live)obj; - - // UI状态显示 - item.state.selectedIndex = livedata_.progress < 100 ? 1 : 0; - - if (LiveConfig[index].SubscribeUnlock == 1) - { - if (livedata_.progress < 100) item.vip.selectedIndex = 1; - else item.vip.selectedIndex = 2; - } - else item.vip.selectedIndex = 0; - - item.img_mask.fillAmount = (float)(100 - livedata_.progress) / 100; - - // 点击事件 - item.SetClick(() => - { - if (GameHelper.GetLevel() < GameHelper.GetCommonModel().UnlockLive[1]) - { - if (DataMgr.IsUnlockLive.Value < 0 && !GameHelper.GetVipPrivilege(Subscription.UnlockLive.As())) - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretUnlockUI_Open, 2); - else if (DataMgr.IsUnlockLive.Value == 0) - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 2); - else - HandleDetailOpen(item, index); - } - else - { - HandleDetailOpen(item, index); - } - }); - } - - private void HandleDetailOpen(item_live item, int index) - { - dictionary_.TryGetValue(item, out var player); - // if (dictionary_.TryGetValue(item, out var player)) - uiCtrlDispatcher.Dispatch(UICtrlMsg.LiveDetailUI_Open, (index, player)); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.LiveChange, Refresh); - HallManager.Instance.UpdateEvent += UpdateEvent; - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.LiveChange, Refresh); - HallManager.Instance.UpdateEvent -= UpdateEvent; - } - - #endregion - } - - public class LiveData - { - public int AD_num; - public int progress; - public int Singleprogress; - public long LiveADTime; - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Live/LiveUI.cs.meta b/Assets/Scripts/ModuleUI/Live/LiveUI.cs.meta deleted file mode 100644 index 574ea86..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cbb17c03db4e0495b9889ddb4645b9a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs b/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs deleted file mode 100644 index b9e1470..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveUICtrl : BaseUICtrl - { - private LiveUI ui; - private LiveModel model; - - private uint openUIMsg = UICtrlMsg.LiveUI_Open; - private uint closeUIMsg = UICtrlMsg.LiveUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.LiveModel) as LiveModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new LiveUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs.meta b/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs.meta deleted file mode 100644 index b1324a6..0000000 --- a/Assets/Scripts/ModuleUI/Live/LiveUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c836b814e852a4eaf80adb503b8602fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveDetail.meta b/Assets/Scripts/ModuleUI/LiveDetail.meta deleted file mode 100644 index ced194f..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0aa401e787e17493f96b7619aec184fe -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs deleted file mode 100644 index ea26c5d..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveDetailCtrl : BaseCtrl - { - public static LiveDetailCtrl Instance { get; private set; } - - private LiveDetailModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.LiveDetailModel) as LiveDetailModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs.meta b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs.meta deleted file mode 100644 index 117b301..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 35b20b630f8bf4c80baf0f2b6fa4f1e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs deleted file mode 100644 index 21f802e..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveDetailModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs.meta b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs.meta deleted file mode 100644 index e9df156..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a6c3a05ddce334b378bf365745a1d482 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs deleted file mode 100644 index 9c7a3d9..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs +++ /dev/null @@ -1,378 +0,0 @@ -using System; -using System.IO; -using FairyGUI; -using FGUI.LG_Common; -using FGUI.LG_live; -using Newtonsoft.Json; -using SGModule.Common.Extensions; -using SGModule.NetKit; -using UnityEngine; -using UnityEngine.Video; -using Object = UnityEngine.Object; - -namespace LoveLegend -{ - public class LiveDetailUI : BaseUI - { - private LiveDetailUICtrl ctrl; - private LiveDetailModel model; - private com_liveDetail ui; - private VideoPlayer video; - - public LiveDetailUI(LiveDetailUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.LiveDetailUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_live"; - uiInfo.assetName = "com_liveDetail"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - //初始化页面逻辑 - private void Updata() - { - if (GameHelper.GetNowTime() < livedata_.LiveADTime) - { - Debug.Log("??????????????????"); - (ui.btn_watchad as btn_claim_4).state.selectedIndex = 1; - (ui.btn_watchad as btn_claim_4).text_time.text = CommonHelper.TimeFormat( - (int)livedata_.LiveADTime - Convert.ToInt32(GameHelper.GetNowTime()), - CountDownType.Hour); - } - else - { - (ui.btn_watchad as btn_claim_4).state.selectedIndex = 0; - if (LiveConfig.AD == livedata_.AD_num + 1) - ui.btn_watchad.title = "+" + (100 - livedata_.progress) + "%"; - else - ui.btn_watchad.title = "+" + livedata_.Singleprogress + "%"; - } - } - - private void InitView() - { - Updata(); - - var btn_down_coin = ((btn_unlock_1)ui.btn_download_coin); - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - (ui.btn_download as btn_claim).have_vip.selectedIndex = 1; - ui.is_vip.selectedIndex = 1; - } - else - { - ui.is_vip.selectedIndex = 0; - btn_down_coin.down_load.selectedIndex = 1; - } - - if (livedata_.progress < 100) - { - ui.state.selectedIndex = 0; - if (LiveConfig.AD == 0) - { - ui.can_speed.selectedIndex = 1; - } - if (LiveConfig.SubscribeUnlock == 1) - { - ui.SubscribeUnlock.selectedIndex = 1; - if (GameHelper.GetVipLevel() > 0) - { - ui.btn_pay.visible = false; - ui.btn_watchad.visible = false; - } - } else - { - ui.SubscribeUnlock.selectedIndex = 0; - } - } - else - { - ui.state.selectedIndex = 1; - ui.SubscribeUnlock.selectedIndex = 0; - if (video != null) video.Play(); - } - - ui.img_mask.fillAmount = (float)(100 - livedata_.progress) / 100; - ui.progress_live.value = (float)livedata_.progress; - - //ui.btn_pay.title = LiveConfig.GoldCoins.ToString(); - Debug.Log(LiveConfig.GoldCoins); - var need_gold = (int)MathF.Ceiling((100f - livedata_.progress) * LiveConfig.GoldCoins / 100); - ui.btn_pay.title = need_gold.ToString(); - - if (LiveConfig.AD == livedata_.AD_num + 1) - ui.btn_watchad.title = "+" + (100 - livedata_.progress) + "%"; - else - ui.btn_watchad.title = "+" + livedata_.Singleprogress + "%"; - - - ui.btn_pay.SetClick(() => - { - if (DataMgr.Coin.Value >= need_gold) - { - DataMgr.Coin.Value -= need_gold; - - livedata_.progress = 100; - DataMgr.LiveDataDic.Value[index] = livedata_; - Debug.Log($"[解锁成功 0] LiveData总数为: {DataMgr.LiveDataDic.Value.Count}"); - DataMgr.LiveDataDic.Save(); - - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - GameDispatcher.Instance.Dispatch(GameMsg.LiveChange, index); - - // HandlePvPlay(); - InitView(); - GameHelper.ShowTips("unlock_success", true); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - - ui.btn_watchad.SetClick(() => - { - if (livedata_.LiveADTime < GameHelper.GetNowTime()) - GameHelper.ShowVideoAd("UnlockLive", isSuccess => - { - if (isSuccess) - { - livedata_.AD_num++; - if (LiveConfig.AD == livedata_.AD_num) - { - livedata_.progress = 100; - GameHelper.ShowTips("unlock_success", true); - } - else - { - livedata_.progress += livedata_.Singleprogress; - } - - DataMgr.LiveDataDic.Value[index] = livedata_; - Debug.Log($"[解锁成功 1] LiveData总数为: {DataMgr.LiveDataDic.Value.Count}"); - DataMgr.LiveDataDic.Save(); - - livedata_.LiveADTime = GameHelper.GetNowTime() + LiveConfig.CD; - SaveData.SaveDataFunc(); - // if (livedata_.progress == 100) HandlePvPlay(); - InitView(); - GameDispatcher.Instance.Dispatch(GameMsg.LiveChange, index); - } - }); - }); - - ui.btn_vip_unlock.SetClick(() => - { - if (GameHelper.GetVipLevel() > 0) - { - livedata_.progress = 100; - DataMgr.LiveDataDic.Value[index] = livedata_; - Debug.Log($"[解锁成功 0] LiveData总数为: {DataMgr.LiveDataDic.Value.Count}"); - DataMgr.LiveDataDic.Save(); - - GameDispatcher.Instance.Dispatch(GameMsg.LiveChange, index); - - HandlePvPlay(); - InitView(); - GameHelper.ShowTips("unlock_success", true); - - string eventName = ADEventTrack.Property.vip_live_unclock_ + (index + 1); - TrackKit.SendEvent(ADEventTrack.VipLive, eventName); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open,2); - TrackKit.SendEvent(ADEventTrack.VipLive, ADEventTrack.Property.vip_live_unclock); - } - }); - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.LiveDetailModel) as LiveDetailModel; - } - - protected override void OnClose() - { - if (video != null) Object.Destroy(video.gameObject); - HallManager.Instance.UpdateSecondEvent -= Updata; - - VideoPlayerHandover.Return(); - // var loader = ui.com_loader.GetChild("loader") as GLoader; - // if (loader?.texture != null) - // { - // loader.texture.Dispose(); - // loader.texture = null; - // } - - } - - protected override void OnBind() - { - ui = baseUI as com_liveDetail; - } - - private void HandlePvPlay() - { - Debug.Log("HandlePvPlay: " + index); - var secondUIRoot = ui.displayObject.gameObject.transform; - var loader = ui.com_loader.GetChild("loader") as GLoader; - - - // 接管播放器 - VideoPlayerHandover.TakeOver(player, secondUIRoot, loader, () => - { - // ui.img_cover.visible = false; - }); - - var localPath = Path.Combine(TextureHelper.getResPath(), "LiveVideos", LiveConfig.Name + ".mp4"); - if (!File.Exists(localPath)) - { - ui.img_cover.visible = true; - setCover(); - } else - { - ui.img_cover.visible = false; - } - } - - private int index; - private VideoPlayer player; - private LiveData livedata_; - private Live LiveConfig; - - protected override void OnOpenBefore(object args) - { - var tuple = ((int index, VideoPlayer player))args; - - index = tuple.index; - player = tuple.player; - if (player != null) - player.audioOutputMode = VideoAudioOutputMode.None; - - // 从配置表取配置(这里还是 List,如果有 Id 字段可改成字典) - LiveConfig = ConfigSystem.GetConfig()[index]; - - livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig, index); - - ui.btn_close.SetClick(() => { CtrlCloseUI(); }); - - - if (livedata_.progress >= 100) - HandlePvPlay(); - else - { - setCover(); - } - var btn_down_coin = ((btn_unlock_1)ui.btn_download_coin); - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - btn_down_coin.title = downloadCoinNum.ToString(); - HallManager.Instance.UpdateSecondEvent += Updata; - - btn_down_coin.SetClick(() => - { - - if (GameHelper.Get101() >= downloadCoinNum) - { - DataMgr.Coin.Value -= downloadCoinNum; - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - TextureHelper.SaveVideoToAlbum(LiveConfig.Name); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - ui.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - TextureHelper.SaveVideoToAlbum(LiveConfig.Name); - else - GameHelper.ShowVideoAd("DownloadLive", isSuccess => - { - if (isSuccess) TextureHelper.SaveVideoToAlbum(LiveConfig.Name); - }); - }); - InitView(); - } - - private void setCover() - { - var coverLoader = ui.img_cover.GetChild("loader") as GLoader; - if (coverLoader?.texture != null) - { - coverLoader.texture.Dispose(); - coverLoader.texture = null; - } - LiveVideoManager.Instance.GetVideoCover(coverLoader, LiveConfig.Name + "_cover", (tex) => - { - if (tex != null && coverLoader != null && !coverLoader.isDisposed) - { - coverLoader.texture = new NTexture(tex) - { - destroyMethod = DestroyMethod.Destroy - }; - coverLoader.visible = true; - } - else - { - Debug.LogError("封面获取失败"); - } - }); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - private void vipLevelChange(object o) - { - InitView(); - } - - private void liveVideoLoaded(object o) - { - HandlePvPlay(); - // InitView(); - } - - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, vipLevelChange);//VIP订阅后更新头像的vip图标 - GameDispatcher.Instance.AddListener(GameMsg.liveVideoLoaded, liveVideoLoaded); - } - - protected override void RemoveListener() - { - HallManager.Instance.UpdateSecondEvent -= Updata; - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, vipLevelChange);//VIP订阅后更新头像的vip图标 - GameDispatcher.Instance.RemoveListener(GameMsg.liveVideoLoaded, liveVideoLoaded); - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs.meta b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs.meta deleted file mode 100644 index 4709f8a..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01d3c04cad33b4561b62c4c347fb230d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs deleted file mode 100644 index 9c7b488..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveDetailUICtrl : BaseUICtrl - { - private LiveDetailUI ui; - private LiveDetailModel model; - - private uint openUIMsg = UICtrlMsg.LiveDetailUI_Open; - private uint closeUIMsg = UICtrlMsg.LiveDetailUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.LiveDetailModel) as LiveDetailModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new LiveDetailUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs.meta b/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs.meta deleted file mode 100644 index cff5355..0000000 --- a/Assets/Scripts/ModuleUI/LiveDetail/LiveDetailUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 547517fcf624749f8918034cdddf3439 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveUnlock.meta b/Assets/Scripts/ModuleUI/LiveUnlock.meta deleted file mode 100644 index 2a2ba34..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f498539405054457d8d286a7a4b42f43 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs deleted file mode 100644 index 470561d..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveUnlockCtrl : BaseCtrl - { - public static LiveUnlockCtrl Instance { get; private set; } - - private LiveUnlockModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.LiveUnlockModel) as LiveUnlockModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs.meta b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs.meta deleted file mode 100644 index 79ce150..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46ac813492896461f8dbc545cca5ab00 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs deleted file mode 100644 index fa38921..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveUnlockModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs.meta b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs.meta deleted file mode 100644 index 4cddb5e..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd80a1535fee24f07b4596aa2b264959 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs deleted file mode 100644 index d741b85..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs +++ /dev/null @@ -1,85 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; - -namespace LoveLegend -{ - public class LiveUnlockUI : BaseUI - { - private LiveUnlockUICtrl ctrl; - private LiveUnlockModel model; - private FGUI.LG_Unlock.com_LiveUnlock ui; - - public LiveUnlockUI(LiveUnlockUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.LiveUnlockUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Unlock"; - uiInfo.assetName = "com_LiveUnlock"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.LiveUnlockModel) as LiveUnlockModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Unlock.com_LiveUnlock; - } - - protected override void OnOpenBefore(object args) - { - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(() => - { - CtrlCloseUI(); - }); - ui.text_unlock.SetVar("num", GameHelper.GetCommonModel().UnlockLive[1].ToString()).FlushVars(); - - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs.meta b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs.meta deleted file mode 100644 index 436578c..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 197cdb189090f453696f748dcd1d99db -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs deleted file mode 100644 index 51e5897..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class LiveUnlockUICtrl : BaseUICtrl - { - private LiveUnlockUI ui; - private LiveUnlockModel model; - - private uint openUIMsg = UICtrlMsg.LiveUnlockUI_Open; - private uint closeUIMsg = UICtrlMsg.LiveUnlockUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.LiveUnlockModel) as LiveUnlockModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new LiveUnlockUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs.meta b/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs.meta deleted file mode 100644 index fe04424..0000000 --- a/Assets/Scripts/ModuleUI/LiveUnlock/LiveUnlockUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52929d3607e234b84a6c9c28a8703118 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/NewEnd.meta b/Assets/Scripts/ModuleUI/NewEnd.meta deleted file mode 100644 index 1651e76..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 77837cfdaa9fc465b832206be0f35ec1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs b/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs deleted file mode 100644 index 0b04bc2..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class NewEndCtrl : BaseCtrl - { - public static NewEndCtrl Instance { get; private set; } - - private NewEndModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.NewEndModel) as NewEndModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs.meta b/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs.meta deleted file mode 100644 index 085a939..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4cb25adad943c4000a9fdcf5b872da17 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs b/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs deleted file mode 100644 index 8f30fa9..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class NewEndModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs.meta b/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs.meta deleted file mode 100644 index 22bdafc..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c0db3836b736c446c9bbe4821de78a17 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs b/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs deleted file mode 100644 index 615918b..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs +++ /dev/null @@ -1,674 +0,0 @@ -using System; -using System.Collections.Generic; -using DG.Tweening; -using FairyGUI; -using FGUI.LG_Common; -using FGUI.LG_End; -using FGUI.ZM_Common_01; -using Newtonsoft.Json; -using Spine.Unity; -using UnityEngine; -using btn_claim = FGUI.LG_Common.btn_claim; -using SGModule.Common.Extensions; -using System.Linq; -using SGModule.NetKit; -namespace LoveLegend -{ - public class NewEndUI : BaseUI - { - private readonly List loader_list = new(); - private readonly List rate_list = new(); - private Action closeCallback; - private NewEndUICtrl ctrl; - - - private List list_1; - private NewEndModel model; - private int next_level; - private int rate_idnex = 3; - private int scroll_number; - private int scroll_type = 1; - private com_newend ui; - - public NewEndUI(NewEndUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.NewEndUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_End"; - uiInfo.assetName = "com_newend"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - private void UnlockLevelsuccess(object a = null) - { - CtrlCloseUI(); - } - - private void endClose() - { - var lv = GameHelper.GetCommonModel().MultiModal; - if (GameHelper.GetLevel() >= GameHelper.GetCommonModel().MultiModal) - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.UnlockLevelNewUI_Open); - is_unlock_level = true; - } - CtrlCloseUI(); - } - - //初始化页面逻辑 - private void InitView() - { - if (GameHelper.IsGiftSwitch()) - { - if (!loader_list.Contains(ui.loader_bgimg)) loader_list.Add(ui.loader_bgimg); - - // TextureHelper.SetImgLoader(ui.loader_bgimg, LevelData.Name, null, "LevelAlbums/"); - if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal) - { - int level_ = GameHelper.GetLevel() - 1; - if (level_ < 0) level_ = 0; - if (level_ >= ConfigSystem.GetConfig().Count) level_ = ConfigSystem.GetConfig().Count - 1; - TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel()); - if (levelunlock_ != null) - { - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - } - else - { - int level_ = GameHelper.GetLevel() - 1; - if (level_ < 0) level_ = 0; - if (level_ >= ConfigSystem.GetConfig().Count) level_ = ConfigSystem.GetConfig().Count - 1; - TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName); - } - } - } - - ui.tetx_level.text = Language.GetContentParams("level", successData_.level); - ui.text_award.text = successData_.ch_number.ToString(); - Debug.Log(JsonConvert.SerializeObject(successData_) + "/////////////////"); - Debug.Log("/////////////////4"); - - // if (!successData_.IsWin) ui.text_award.text = DataMgr.Coin.Value.ToString(); - Debug.Log(GetNextSpecialLevel()); - next_level = GetNextSpecialLevel(); - - var levelUnlock_ = ConfigSystem.GetConfig()[next_level]; - if (levelUnlock_.LeveType == 1) - ui.text_levelType.text = "Special level"; - else if (levelUnlock_.LeveType == 2) ui.text_levelType.text = "VIP level"; - ui.progress_level.max = next_level; - ui.progress_level.value = successData_.level; - // if (successData_.IsLevelSuccess && successData_.level == next_level) - // //打开解锁界面 - // ui.btn_continue.SetClick(() => - // { - // uiCtrlDispatcher.Dispatch(UICtrlMsg.UnlockLevelUI_Open, next_level); - // }); - // else - ui.btn_continue.SetClick(() => - { - endClose(); - }); - ((btn_claim4)ui.btn_claim).title = $"{successData_.ch_number}"; - - var delayTime = successData_.IsLevelSuccess ? 1f : 0f; - if (!successData_.IsWin) - { - delayTime = 0f; - ui.win_lose.selectedIndex = 0; - } - else - { - ui.win_lose.selectedIndex = 1; - } - if (!GameHelper.IsGiftSwitch()) delayTime = 0; - ui.step.selectedIndex = !successData_.IsLevelSuccess || !successData_.IsWin ? 1 : 0; - Debug.Log("/////////////////5"); - DOVirtual.DelayedCall(delayTime, () => - { - Debug.Log(delayTime); - Debug.Log("/////////////////6"); - ui.step.selectedIndex = 1; - var anim_bg = FXManager.Instance.SetFx(ui.GetChild("bg_parent") as GGraph, Fx_Type.fx_end_bg, ref closeCallback); - if (successData_.IsWin) - { - anim_bg.state.SetAnimation(0, "win", false); - anim_bg.state.Complete += (trackEntry) => - { - anim_bg.state.SetAnimation(0, "win_stop", true); - }; - var fireworks = FXManager.Instance.SetFx(ui.GetChild("congra_parent") as GGraph, Fx_Type.fx_win, ref closeCallback); - fireworks.state.SetAnimation(0, "out", true); - - var coin = FXManager.Instance.SetFx(ui.GetChild("coin_parent") as GGraph, Fx_Type.fx_wins, ref closeCallback); - coin.state.SetAnimation(0, "animation", true); - coin.state.Complete += (trackEntry) => - { - coin.state.SetAnimation(0, "animation2", true); - }; - - if (SaveData.GetSaveObject().LargeRewardNum < ConfigSystem.GetCommonConf().FreeClaims) - ((btn_claim3)ui.btn_mult).state.selectedIndex = 1; - else ((btn_claim3)ui.btn_mult).state.selectedIndex = 0; - ui.btn_mult.SetClick(() => - { - if (!GameHelper.GetCloseResult()) return; - if (SaveData.GetSaveObject().LargeRewardNum < ConfigSystem.GetCommonConf().FreeClaims) - { - ui.btn_mult.touchable = ui.btn_claim.touchable = false; - SaveData.SaveDataFunc(); - StartScroll(); - } - else - { - GameHelper.ShowVideoAd("GameEnd", isSuccess => - { - if (isSuccess) - { - ui.btn_mult.touchable = ui.btn_claim.touchable = false; - StartScroll(); - } - }); - } - }); - ui.btn_claim.SetClick(() => - { - if (!GameHelper.GetCloseResult()) return; - ui.btn_mult.touchable = ui.btn_claim.touchable = false; - DOVirtual.DelayedCall(2f, () => { GameHelper.addInterAdnumber(); }); - GetReward(successData_.ch_number); - }); - - AudioManager.Instance.PlayDynamicEffect(AudioConst.Victoriously); - } - else - { - anim_bg.state.SetAnimation(0, "lose", false); - anim_bg.state.Complete += (trackEntry) => - { - anim_bg.state.SetAnimation(0, "lose_stop", true); - }; - - ui.btn_restart.SetClick(() => - { - if (!GameHelper.GetCloseResult()) return; - - GameHelper.addInterAdnumber(); - if (!successData_.IsWin) GameHelper.SetLevelstate(3); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NewEndUI_Close); - }); - } - }); - if (GameHelper.GetVipPrivilege(Subscription.DoubleLevelReward.As())) ((wheel)ui.wheel).have_vip.selectedIndex = 1; - if (successData_.boost_array != null) - { - ((wheel_)ui.wheel.GetChild("wheel_")).t0.Play(Scroll); - ((wheel_)ui.wheel.GetChild("wheel_")).t1.Play(() => - { - rate_idnex++; - ui.btn_mult.title = - GameHelper.Get101Str((decimal)successData_.ch_number * - successData_.boost_array[rate_idnex % 5]); - }); - ui.btn_mult.title = - GameHelper.Get101Str((decimal)successData_.ch_number * successData_.boost_array[rate_idnex]); - - list_1 = new List - { - ((wheel_)ui.wheel.GetChild("wheel_")).item_0, ((wheel_)ui.wheel.GetChild("wheel_")).item_1, - (ui.wheel.GetChild("wheel_") as wheel_).item_2, (ui.wheel.GetChild("wheel_") as wheel_).item_3, - (ui.wheel.GetChild("wheel_") as wheel_).item_4, (ui.wheel.GetChild("wheel_") as wheel_).item_5, - (ui.wheel.GetChild("wheel_") as wheel_).item_6, (ui.wheel.GetChild("wheel_") as wheel_).item_7 - }; - // list_1[2].img_light.visible = true; - - for (var i = 0; i < list_1.Count; i++) - { - list_1[i].type.selectedIndex = (i + scroll_number) % 3; - list_1[i].text_rate.text = "X" + successData_.boost_array[i % successData_.boost_array.Length]; - } - } - } - - private void StartScroll() - { - ((wheel_)ui.wheel.GetChild("wheel_")).t0.timeScale = - ((wheel_)ui.wheel.GetChild("wheel_")).t0.timeScale = 5.0f; - scroll_type = 2; - } - - private void Scroll() - { - if (scroll_type == 1) - { - scroll_number++; - rate_list.Clear(); - for (var i = 0; i < 8; i++) - rate_list.Add(successData_.boost_array[(scroll_number + i) % successData_.boost_array.Length]); - for (var i = 0; i < list_1.Count; i++) - { - list_1[i].type.selectedIndex = (i + scroll_number) % 3; - list_1[i].text_rate.text = "X" + rate_list[i]; - } - - ((wheel_)ui.wheel.GetChild("wheel_")).t1.Play(() => - { - rate_idnex++; - ui.btn_mult.title = GameHelper.Get101Str((decimal)successData_.ch_number * - successData_.boost_array[ - rate_idnex % successData_.boost_array.Length]); - }); - - ((wheel_)ui.wheel.GetChild("wheel_")).t0.Play(Scroll); - } - else - { - scroll_number++; - - rate_list.Clear(); - for (var i = 0; i < 8; i++) - rate_list.Add(successData_.boost_array[(scroll_number + i) % successData_.boost_array.Length]); - - // bool need_return = false; - if (((wheel_)ui.wheel.GetChild("wheel_")).t0.timeScale < 2.2f && - list_1[4].text_rate.text == "X" + successData_.rate) - { - //开始领取 - var reward = successData_.ch_number * successData_.rate; - if (GameHelper.GetVipPrivilege(Subscription.DoubleLevelReward.As())) reward *= 2; - GetReward(reward); - - GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData); - SaveData.GetSaveObject().LargeRewardNum++; - SaveData.SaveDataFunc(); - return; - } - - for (var i = 0; i < list_1.Count; i++) - { - list_1[i].type.selectedIndex = (i + scroll_number) % 3; - list_1[i].text_rate.text = "X" + rate_list[i]; - } - - // if (need_return) - // { - // (ui.wheel.GetChild("wheel_") as wheel_).t0.timeScale = 0; - // return; - // } - - ((wheel_)ui.wheel.GetChild("wheel_")).t1.Play(() => - { - rate_idnex++; - ui.btn_mult.title = GameHelper.Get101Str((decimal)successData_.ch_number * - successData_.boost_array[ - rate_idnex % successData_.boost_array.Length]); - }); - - ((wheel_)ui.wheel.GetChild("wheel_")).t0.Play(Scroll); - ((wheel_)ui.wheel.GetChild("wheel_")).t0.timeScale = - ((wheel_)ui.wheel.GetChild("wheel_")).t0.timeScale - 0.3f; - } - } - - private void GetReward(float awardNum) - { - var startObj = ui.btn_mult; - var endObj = ui.btn_gold; - - var pos = GameHelper.GetUICenterPosition(endObj); - - var rewardData = new RewardData(); - var rewardSingleData = new RewardSingleData(101, (decimal)awardNum, RewardOrigin.Play) - { - startPosition = GameHelper.GetUICenterPosition(startObj), - endPosition = new Vector2(pos.x, pos.y) - }; - - rewardData.AddReward(rewardSingleData); - rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange; - rewardData.AddCompleted(success => - { - if (success) - { - RefreshAwardNum((decimal)awardNum, 101); - - if (successData_.IsLevelSuccess) - { - if (!loader_list.Contains(ui.com_loader.GetChild("loader") as GLoader)) - loader_list.Add(ui.com_loader.GetChild("loader") as GLoader); - - GameDispatcher.Instance.Dispatch(GameMsg.reset_game); - - - if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal) - { - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, LevelData.Name, null, "LevelAlbums/", FolderNames.AlbumName); - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - ui.btn_download_coin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - ui.btn_gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}"; - TextureHelper.SaveImageToAlbum(LevelData.Name, FolderNames.AlbumName); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.download); - endClose(); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - - ui.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(LevelData.Name, FolderNames.AlbumName); - endClose(); - } - else - GameHelper.ShowVideoAd("DownloadImage", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(LevelData.Name, FolderNames.AlbumName); - endClose(); - } - }); - }); - - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel()); - string file_name = ""; - if (levelunlock_ != null) - { - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName); - file_name = _leveldata.Name; - } - } - else - { - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, LevelData.Name, null, - "LevelAlbums/", FolderNames.AlbumName); - } - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - ui.btn_download_coin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - ui.btn_gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}"; - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.download); - endClose(); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - - ui.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - endClose(); - } - else - GameHelper.ShowVideoAd("DownloadImage", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(file_name, FolderNames.AlbumName); - endClose(); - } - }); - }); - } - // TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, LevelData.Name, null, - // "LevelAlbums/"); - - - GameHelper.SetLevel(GameHelper.GetLevel() + 1); - DOVirtual.DelayedCall(1.5f, () => - { - if (GameHelper.IsGiftSwitch()) - { - ui.step.selectedIndex = 2; - } - else - { - CtrlCloseUI(); - } - - - }); - } - else - { - CtrlCloseUI(); - } - } - }); - - GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData); - } - - private void RefreshAwardNum(decimal num = -1, int id = 102) - { - if (num < 0) num = DataMgr.Coin.Value; - var btnCoin = ui.btn_gold as com_gold; - - - var gTextField = btnCoin.text_gold; - CommonHelper.ShowNumAnim(gTextField, num, id); - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.NewEndModel) as NewEndModel; - } - private bool is_unlock_level = false; - protected override void OnClose() - { - GameHelper.SetCloseResult(false); - closeCallback?.Invoke(); - if (!is_unlock_level) - { - if (successData_.IsLevelSuccess && !GameHelper.is_first_login) - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, successData_.IsWin); - else - GameDispatcher.Instance.Dispatch(GameMsg.CheckEnd); - } - - - foreach (var t in loader_list) - if (t != null && !t.isDisposed && t.texture != null) - { - t.texture.Dispose(); - t.texture = null; - } - - loader_list.Clear(); - - MemoryManager.CleanMemoryMonitor(); - } - - protected override void OnBind() - { - ui = baseUI as com_newend; - } - - private LevelUnlock LevelData; - - protected override void OnOpenBefore(object args) - { - if (Screen.safeArea.y != 0) ui.btn_gold.y += 68; - - Debug.Log("//////////////////////0"); - Debug.Log(JsonConvert.SerializeObject(args)); - successData_ = (SuccessData)args; - successData_.ch_number = (int)successData_.ch_number; - - // 修改后的代码 - var levelDataList = ConfigSystem.GetConfig(); - var levelIndex = successData_.level - 1; - - // 确保索引不超出范围,如果超出则使用最后一个元素 - if (levelDataList is { Count: > 0 }) - { - if (levelIndex >= 0 && levelIndex < levelDataList.Count) - LevelData = levelDataList[levelIndex]; - else - // 超出范围后,使用最后一个元素 - LevelData = levelDataList[^1]; - } - else - { - Debug.LogError("LevelUnlockModel DataList is null or empty"); - } - var btnDownCoin = ((btn_unlock_1)ui.btn_download_coin); - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - btnDownCoin.title = downloadCoinNum.ToString(); - ui.btn_gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}"; - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - ((btn_claim)ui.btn_download).have_vip.selectedIndex = 1; - ui.is_vip.selectedIndex = 1; - } - else - { - ui.is_vip.selectedIndex = 0; - btnDownCoin.down_load.selectedIndex = 1; - } - - - if (GameHelper.IsGiftSwitch() && successData_.IsLevelSuccess) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Open); - - GameHelper.PlayGameTimeEvent(1, () => { GameHelper.RequestGameConfig(); }); - } - else - { - GameHelper.SetCloseResult(true); - } - - Debug.Log("//////////////////////3"); - InitView(); - } - - private int GetNextSpecialLevel() - { - var now_level = successData_.level; - var list_ = ConfigSystem.GetConfig(); - for (var i = now_level; i < list_.Count; i++) - if (list_[i].LeveType != 0) - return i; - return 0; - } - - private SuccessData successData_; - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - public void OnUpdate101(object a = null) - { - com_gold btn_gold = ui.btn_gold as com_gold; - btn_gold.text_gold.text = $"{DataMgr.Coin.Value:N0}"; - } - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.UnlockLevelsuccess, UnlockLevelsuccess); - GameDispatcher.Instance.AddListener(GameMsg.Update101, OnUpdate101); - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.UnlockLevelsuccess, UnlockLevelsuccess); - GameDispatcher.Instance.RemoveListener(GameMsg.Update101, OnUpdate101); - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs.meta b/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs.meta deleted file mode 100644 index b6c0eb1..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5cf3070760f564fe1b67d77b88f0489f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs b/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs deleted file mode 100644 index 87dcc5f..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class NewEndUICtrl : BaseUICtrl - { - private NewEndUI ui; - private NewEndModel model; - - private uint openUIMsg = UICtrlMsg.NewEndUI_Open; - private uint closeUIMsg = UICtrlMsg.NewEndUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.NewEndModel) as NewEndModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new NewEndUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs.meta b/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs.meta deleted file mode 100644 index 5871423..0000000 --- a/Assets/Scripts/ModuleUI/NewEnd/NewEndUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b546c5d21d755431e8ed0a77b8784517 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/Play/RainPlayUI.cs b/Assets/Scripts/ModuleUI/Play/RainPlayUI.cs index 0800fd1..2c66f14 100644 --- a/Assets/Scripts/ModuleUI/Play/RainPlayUI.cs +++ b/Assets/Scripts/ModuleUI/Play/RainPlayUI.cs @@ -585,66 +585,9 @@ namespace LoveLegend uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open); }); ui.btn_look_ad.SetClick(() => { LookAd(); }); - Setbg(); } private SpriteRenderer game_bg = GameObject.Find("game_bg").GetComponent(); - public void Setbg(object a = null) - { - if (GameHelper.IsGiftSwitch()) - { - if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal) - { - TextureHelper.setGamebg(ConfigSystem.GetConfig()[GameHelper.GetLevel() - 1].Name); - } - else - { - Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel()); - if (levelunlock_ != null) - { - if (levelunlock_.type == 0) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - FreeImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.setGamebg(_leveldata.Name); - - } - else if (levelunlock_.type == 1) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - ADImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.setGamebg(_leveldata.Name); - } - else if (levelunlock_.type == 2) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - SpecialImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.setGamebg(_leveldata.Name); - } - else if (levelunlock_.type == 3) - { - if (levelunlock_.config_index >= ConfigSystem.GetConfig().Count) levelunlock_.config_index = ConfigSystem.GetConfig().Count - 1; - VIPImageLibrary _leveldata = ConfigSystem.GetConfig()[levelunlock_.config_index]; - TextureHelper.setGamebg(_leveldata.Name); - } - } - else - { - if (game_bg && game_bg.sprite && game_bg.sprite.texture.name != "") - { - return; - } - if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig().Count) - { - TextureHelper.setGamebg(ConfigSystem.GetConfig()[GameHelper.GetLevel() - 1].Name); - } - else - { - TextureHelper.setGamebg(ConfigSystem.GetConfig()[ConfigSystem.GetConfig().Count - 1].Name); - } - } - } - } - } + private void CheckEnd(object a = null) { if (out_list.Count == 0)//是否通关 @@ -778,7 +721,7 @@ namespace LoveLegend } ui.btn_pass.red.visible = SaveData.getRed(); checkThreeGift(); - Setbg(); + if ((!SaveData.GetSaveObject().is_get_packreward || !SaveData.GetSaveObject().is_get_removead) && !SaveData.GetSaveObject().is_autopack_show && GameHelper.showGameUI && Time.time > ConfigSystem.GetCommonConf().Activetimes * 60) { @@ -1031,7 +974,7 @@ namespace LoveLegend SaveData.GetSaveObject().usePropsNum[i] = 0; } - Setbg(); + CheckFeature(); if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview) { diff --git a/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs b/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs index e8caea4..84b7485 100644 --- a/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs +++ b/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs @@ -227,56 +227,56 @@ namespace LoveLegend SaveData.SaveDataFunc(); purch_number = ConfigSystem.GetConfig()[0].Paid_price2.ToString(); } - else if (type.StartsWith("vip_club")) - { - is_maxPay = true; - int startIndex = "vip_club".Length; - string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符 - int suffixNum = int.Parse(suffix); + // else if (type.StartsWith("vip_club")) + // { + // is_maxPay = true; + // int startIndex = "vip_club".Length; + // string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符 + // int suffixNum = int.Parse(suffix); - if (!MaxPayManager.isIOSPay) - { - var days = 0; - switch (suffixNum) - { - case 0: - days = (int)VipDay.Week; - break; - case 1: - days = (int)VipDay.Month; - break; - case 2: - days = (int)VipDay.Year; - break; - } + // if (!MaxPayManager.isIOSPay) + // { + // var days = 0; + // switch (suffixNum) + // { + // case 0: + // days = (int)VipDay.Week; + // break; + // case 1: + // days = (int)VipDay.Month; + // break; + // case 2: + // days = (int)VipDay.Year; + // break; + // } - if (days > 0) - { - // 设置 VIP 到期时间(当前时间戳 + VIP 天数对应的秒数) - if (DataMgr.VipExpirationTime.Value > ServerClock.GetCurrentServerTime()) - { - DataMgr.VipExpirationTime.Value = DataMgr.VipExpirationTime.Value + days * 24 * 60 * 60; - } - else DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + days * 24 * 60 * 60; - } - DataMgr.VipLevel.Value = suffixNum + 1; - } - purch_number = ConfigSystem.GetConfig()[suffixNum].DiscountPrice.ToString(); - GameDispatcher.Instance.Dispatch(GameMsg.BuyVip); - } - else if (type.StartsWith("secret_albnums")) - { - is_maxPay = true; - int startIndex = "secret_albnums".Length; - string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符 - int suffix_num = int.Parse(suffix); - var model = ConfigSystem.GetConfig()[suffix_num]; - if (model.PayType == (int)UnlockPayType.Pay && !GameHelper.isVipUnlock) - { - purch_number = ConfigSystem.GetConfig()[suffix_num].DiscountPrice.ToString(); - } - GameHelper.isVipUnlock = false; - } + // if (days > 0) + // { + // // 设置 VIP 到期时间(当前时间戳 + VIP 天数对应的秒数) + // if (DataMgr.VipExpirationTime.Value > ServerClock.GetCurrentServerTime()) + // { + // DataMgr.VipExpirationTime.Value = DataMgr.VipExpirationTime.Value + days * 24 * 60 * 60; + // } + // else DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + days * 24 * 60 * 60; + // } + // DataMgr.VipLevel.Value = suffixNum + 1; + // } + // purch_number = ConfigSystem.GetConfig()[suffixNum].DiscountPrice.ToString(); + // GameDispatcher.Instance.Dispatch(GameMsg.BuyVip); + // } + // else if (type.StartsWith("secret_albnums")) + // { + // is_maxPay = true; + // int startIndex = "secret_albnums".Length; + // string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符 + // int suffix_num = int.Parse(suffix); + // var model = ConfigSystem.GetConfig()[suffix_num]; + // if (model.PayType == (int)UnlockPayType.Pay && !GameHelper.isVipUnlock) + // { + // purch_number = ConfigSystem.GetConfig()[suffix_num].DiscountPrice.ToString(); + // } + // GameHelper.isVipUnlock = false; + // } UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close); if ((!GameHelper.IsAdModelOfPay() || is_maxPay) && !string.IsNullOrEmpty(purch_number) && decimal.TryParse(purch_number, out decimal revenue)) diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock.meta b/Assets/Scripts/ModuleUI/ScAlbumLock.meta deleted file mode 100644 index 840c9b7..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 50256f88908d6488b92984a59ea4971a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs deleted file mode 100644 index 3fb11ae..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class ScAlbumLockCtrl : BaseCtrl - { - public static ScAlbumLockCtrl Instance { get; private set; } - - private ScAlbumLockModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.ScAlbumLockModel) as ScAlbumLockModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs.meta b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs.meta deleted file mode 100644 index 95cce1d..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e0c7e2a49bd8d42de9b7adc8d32f5721 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs deleted file mode 100644 index 8cd6788..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class ScAlbumLockModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs.meta b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs.meta deleted file mode 100644 index 31e71a2..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a1aa0530c8b9044d49afe9c0134b204b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs deleted file mode 100644 index dc59650..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs +++ /dev/null @@ -1,84 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; - -namespace LoveLegend -{ - public class ScAlbumLockUI : BaseUI - { - private ScAlbumLockUICtrl ctrl; - private ScAlbumLockModel model; - private FGUI.LG_Unlock.com_scAlbumLock ui; - - public ScAlbumLockUI(ScAlbumLockUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.ScAlbumLockUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Unlock"; - uiInfo.assetName = "com_scAlbumLock"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ScAlbumLockModel) as ScAlbumLockModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Unlock.com_scAlbumLock; - } - - protected override void OnOpenBefore(object args) - { - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(() => - { - CtrlCloseUI(); - }); - ui.text_unlock.SetVar("num", GameHelper.GetCommonModel().UnlockSecret[1].ToString()).FlushVars(); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs.meta b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs.meta deleted file mode 100644 index a80ea25..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 14ead2092c60e4b9b94373077d80c9ff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs deleted file mode 100644 index 3701cc2..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class ScAlbumLockUICtrl : BaseUICtrl - { - private ScAlbumLockUI ui; - private ScAlbumLockModel model; - - private uint openUIMsg = UICtrlMsg.ScAlbumLockUI_Open; - private uint closeUIMsg = UICtrlMsg.ScAlbumLockUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.ScAlbumLockModel) as ScAlbumLockModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new ScAlbumLockUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs.meta b/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs.meta deleted file mode 100644 index e8840ea..0000000 --- a/Assets/Scripts/ModuleUI/ScAlbumLock/ScAlbumLockUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 69ce21aa9fd884797b3f6ec98ff0328b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/SecretAlbums.meta b/Assets/Scripts/ModuleUI/SecretAlbums.meta deleted file mode 100644 index 287d643..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: acd607ffb4864a8aafecb22b349a995a -timeCreated: 1753413390 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs deleted file mode 100644 index 2af16d4..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretAlbumsCtrl : BaseCtrl - { - public static SecretAlbumsCtrl Instance { get; private set; } - - private SecretAlbumsModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.SecretAlbumsModel) as SecretAlbumsModel; - } - - protected override void OnDispose() - { - Instance = null; - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs.meta deleted file mode 100644 index 00413d7..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsCtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: e032a4c94b74456cb7ada9cac4c70eaa -timeCreated: 1753413390 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs deleted file mode 100644 index 50ed232..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - - -namespace LoveLegend -{ - public class SecretAlbumsModel : BaseModel - { - #region 生命周期 - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs.meta deleted file mode 100644 index 1a34711..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsModel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 7638ebf1dfa7412298f5099058854ed2 -timeCreated: 1753413390 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs deleted file mode 100644 index a1aa325..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs +++ /dev/null @@ -1,378 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using FairyGUI; -using FGUI.LG_secretAlbums; -using SGModule.NetKit; -using UnityEngine; - -namespace LoveLegend -{ - public class SecretAlbumsUI : BaseUI - { - private const int MaxVisibleCount = 6; // 一屏显示6个 - private const int PreloadCount = 2; // 上下各预加载一屏 - - private readonly Dictionary _fileIsExist = new(); - private readonly Dictionary activeLoaders = new(); - private SecretAlbumsUICtrl ctrl; - private SecretAlbumsModel model; - private com_scAlbums ui; - - public SecretAlbumsUI(SecretAlbumsUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.SecretAlbumsUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_secretAlbums"; - uiInfo.assetName = "com_scAlbums"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - private void UnlockSuccess(object str = null) - { - ui.sc_list.itemRenderer = ItemRender; - ui.sc_list.numItems = _secretData.Count; - } - - - // 初始化页面逻辑 - private void InitView() - { - ui.btn_gold.GetChild("text_gold").text = GameHelper.Get101Str(); - ui.btn_close.SetClick(CtrlCloseUI); - - UnlockSuccess(); - - - // 滚动过程中实时刷新可见播放器 - // ui.sc_list.scrollPane.onScrollEnd.Add(OnScrollEnd); - - // 打开页面时初始化一次 - // OnScrollEnd(); - InitScroll(); - } - - private void InitScroll() - { - ui.sc_list.scrollPane.onScroll.Add(OnScrollUpdate); - ui.sc_list.scrollPane.onScrollEnd.Add(OnScrollEnd); // 保留结束时的整理 - - OnScrollEnd(); - } - - // 滑动过程中实时更新 - private void OnScrollUpdate() - { - UpdateVisibleAndPreload(); - } - - // 核心刷新逻辑 - private void UpdateVisibleAndPreload() - { - if (_secretData == null || _secretData.Count == 0) return; - - var firstVisibleIndex = ui.sc_list.GetFirstChildInView(); - var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.sc_list.numItems - 1); - - var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - var endIndex = Mathf.Min(ui.sc_list.numItems - 1, lastVisibleIndex + PreloadCount); - - // 回收超出范围 loader - var keysToRemove = new List(); - foreach (var kv in activeLoaders) - { - var idx = kv.Key; - if (idx < startIndex || idx > endIndex) - { - GLoaderPool.Instance.ReturnLoader(kv.Value); - var oldItem = ui.sc_list.GetChildAt(idx) as item_scalnums; - if (oldItem != null) oldItem.com_pic.picture = null; - keysToRemove.Add(idx); - } - } - - foreach (var k in keysToRemove) activeLoaders.Remove(k); - - - // 分配 loader 并加载图片 - for (var i = startIndex; i <= endIndex; i++) - { - if (activeLoaders.ContainsKey(i)) continue; - - var item = ui.sc_list.GetChildAt(i) as item_scalnums; - if (item == null) continue; - - if (item.com_pic.picture != null && !item.com_pic.picture.isDisposed) - GLoaderPool.Instance.ReturnLoader(item.com_pic.picture); - - var loader = GLoaderPool.Instance.GetLoader(); - item.com_pic.picture = loader; - item.com_pic.AddChild(loader); - loader.SetSize(item.com_pic.width, item.com_pic.height); - - _fileIsExist.TryGetValue(i, out var value); - if (!value) - { - var localPath = Path.Combine(TextureHelper.getResPath(), _secretData[i].Name + ".jpg"); - - if (File.Exists(localPath)) - { - _fileIsExist[i] = true; - Debug.Log($"[SetImgLoader] 本地存在,直接加载 {_secretData[i].Name}"); - CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(_secretData[i].Name, loader, null, - "SecretAlbums/")); - } - else - { - _fileIsExist[i] = false; - } - } - else - { - CrazyAsyKit.StartCoroutine(TextureHelper.LoadTexture(_secretData[i].Name, loader, null, - "SecretAlbums/")); - } - - activeLoaders[i] = loader; - } - - // Debug.Log($"[ScrollUpdate] active loaders={activeLoaders.Count}, pool={GLoaderPool.Instance.GetPoolCount()}, inUse={GLoaderPool.Instance.GetInUseCount()}"); - } - - private void OnScrollEnd() - { - if (_secretData == null || _secretData.Count == 0) return; - - var firstVisibleIndex = ui.sc_list.GetFirstChildInView(); - var lastVisibleIndex = Mathf.Min(firstVisibleIndex + MaxVisibleCount - 1, ui.sc_list.numItems - 1); - - var startIndex = Mathf.Max(0, firstVisibleIndex - PreloadCount); - var endIndex = Mathf.Min(ui.sc_list.numItems - 1, lastVisibleIndex + PreloadCount); - - // Debug.Log($"[ScrollEnd] start index={startIndex} end index={endIndex}"); - - - var tasks = new List<(GLoader loader, string fileName, Action callback, string folder, string localFolder)>(); - // 分配 loader 并加载图片 - for (var i = startIndex; i <= endIndex; i++) - { - _fileIsExist.TryGetValue(i, out var value); - - if (value) continue; - var item = ui.sc_list.GetChildAt(i) as item_scalnums; - if (item == null) continue; - if (item.com_pic.picture != null && !item.com_pic.picture.isDisposed) - GLoaderPool.Instance.ReturnLoader(item.com_pic.picture); - var loader = GLoaderPool.Instance.GetLoader(); - item.com_pic.picture = loader; - item.com_pic.AddChild(loader); - loader.SetSize(item.com_pic.width, item.com_pic.height); - - var idx = i; - tasks.Add((loader, _secretData[i].Name, texture => - { - if (texture != null) _fileIsExist[idx] = true; - }, "SecretAlbums/", FolderNames.SecretName)); - - activeLoaders[i] = loader; - } - - TextureHelper.SetImgLoaders(tasks); - } - - - private void ItemRender(int index, GObject obj) - { - var item = (item_scalnums)obj; - - item.text_id.text = _secretData[index].id.ToString(); - - var isUnlock = DataMgr.SecretUnlockList.Value.Contains(index); - - item.btn_unlock.pay_type.selectedIndex = _secretData[index].PayType; - - if (_secretData[index].PayType == 0) - item.btn_unlock.title = GameHelper.getPrice((decimal)_secretData[index].DiscountPrice); - else if (_secretData[index].PayType == 1) - item.btn_unlock.title = _secretData[index].GoldCoins.ToString(); - else if (_secretData[index].PayType == 2) item.btn_unlock.title = _secretData[index].AD + "AD"; - - if (isUnlock) - { - item.btn_unlock.pay_type.selectedIndex = 3; - if (_secretData[index].SubscribeUnlock == 1) - { - item.vip.selectedIndex = 1; - item.btn_unlock.pay_type.selectedIndex = 5; - } - item.btn_unlock.title = Language.GetContent("go"); - } - else - { - if (_secretData[index].SubscribeUnlock == 1) - { - item.vip.selectedIndex = 1; - item.btn_unlock.pay_type.selectedIndex = 4; - } - } - - item.btn_null.SetClick(GotoNext); - - item.un_lock.selectedIndex = isUnlock ? 1 : 0; - - item.btn_unlock.SetClick(GotoNext); - - item.peple_num.text = GetPepleNum(_secretData[index].Quantity).ToString(); - - item.hot.selectedIndex = _secretData[index].HotType; - - void GotoNext() - { - var data = new AlbumPreviewData - { - Index = index, - State = _secretData[index].State, - Price = _secretData[index].Price, - PayType = _secretData[index].PayType, - SubscribeUnlock = _secretData[index].SubscribeUnlock, - DiscountPrice = _secretData[index].DiscountPrice, - Name = _secretData[index].Name, - Name2 = _secretData[index].Name2, - GoldCoins = _secretData[index].GoldCoins, - AD = _secretData[index].AD, - CD = _secretData[index].CD - }; - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsNextUI_Open, data); - } - } - - private int GetPepleNum(float quantity) - { - // 获取当前时间 - var now = DateTime.Now; - - // 计算当天已经过去的分钟数(从凌晨 0 点开始算) - var minutesPassedToday = now.Hour * 60 + now.Minute; - - // 计算人数 - var num = Mathf.FloorToInt(quantity * minutesPassedToday); - - return num; - } - - #region 生命周期 - - protected override void OnInit() - { - // 初始化GLoader池,设置最大缓存数 - GLoaderPool.Instance.Init(null, 10, 464, 642); - } - - protected override void OnClose() - { - // 1. 解除 UI 对 Loader 的引用 - for (var i = 0; i < ui.sc_list.numChildren; i++) - { - var item = ui.sc_list.GetChildAt(i) as item_scalnums; - if (item != null && item.com_pic.picture != null) item.com_pic.picture = null; // 清掉 GLoader 引用 - } - - activeLoaders.Clear(); - _fileIsExist.Clear(); - - GLoaderPool.Instance.DisposeAll(); - - TextureHelper.ClearMaterialPool(); - - // 强制卸载未使用的资源 - Resources.UnloadUnusedAssets(); - MemoryManager.CleanMemoryMonitor(); - } - - protected override void OnBind() - { - ui = baseUI as com_scAlbums; - } - - private List _secretData = new(); - - protected override void OnOpenBefore(object args) - { - if (Screen.safeArea.y != 0) - { - ui.btn_gold.y += 68; - ui.btn_close.y += 68; - ui.sc_list.y += 68; - } - - var eventName = GameHelper.IsAdModelOfPay() ? ADEventTrack.Event : ADEventTrack.MaxPayEvent; - TrackKit.SendEvent(eventName, ADEventTrack.Property.shop_show); - - _secretData = ConfigSystem.GetConfig(); - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - public void SetTopCurr(object a = null) - { - ui.btn_gold.GetChild("text_gold").text = GameHelper.Get101Str(); - } - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.UnlockSecretSuccess, UnlockSuccess); - GameDispatcher.Instance.AddListener(GameMsg.Update101, SetTopCurr); - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.UnlockSecretSuccess, UnlockSuccess); - GameDispatcher.Instance.RemoveListener(GameMsg.Update101, SetTopCurr); - } - - #endregion - } - - public class AlbumPreviewData - { - public int AD; - public int CD; - public float DiscountPrice; - public int GoldCoins; - public int Index; - public string Name; - public string Name2; - public int PayType; - public float Price; - public int[] State; - public int SubscribeUnlock; - } - - public enum UnlockPayType - { - Pay = 0, - Coin = 1, - Ad = 2, - None = 3 - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs.meta deleted file mode 100644 index 985a68e..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUI.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a2d8dc086968438880f2c4538a18fb08 -timeCreated: 1753413390 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs deleted file mode 100644 index 295d47a..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretAlbumsUICtrl : BaseUICtrl - { - private SecretAlbumsUI ui; - private SecretAlbumsModel model; - - private uint openUIMsg = UICtrlMsg.SecretAlbumsUI_Open; - private uint closeUIMsg = UICtrlMsg.SecretAlbumsUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretAlbumsModel) as SecretAlbumsModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new SecretAlbumsUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs.meta deleted file mode 100644 index 8b12590..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbums/SecretAlbumsUICtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 0c8b909e2026458696e5861d9978ea0b -timeCreated: 1753413390 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext.meta b/Assets/Scripts/ModuleUI/SecretAlbumsNext.meta deleted file mode 100644 index d4ae5b7..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 435f1de90a3d4e7e8febed410554b270 -timeCreated: 1753432022 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs deleted file mode 100644 index 5014755..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretAlbumsNextCtrl : BaseCtrl - { - public static SecretAlbumsNextCtrl Instance { get; private set; } - - private SecretAlbumsNextModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.SecretAlbumsModel) as SecretAlbumsModel; - } - - protected override void OnDispose() - { - Instance = null; - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs.meta deleted file mode 100644 index 13a8a71..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextCtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 92fd051cb414413f9746bf923fa1ded5 -timeCreated: 1753432022 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs deleted file mode 100644 index d218990..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - - -namespace LoveLegend -{ - public class SecretAlbumsNextModel : BaseModel - { - #region 生命周期 - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs.meta deleted file mode 100644 index 768bb14..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextModel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 37afd637b74d433db6cd57c9bc92bb4b -timeCreated: 1753432022 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs deleted file mode 100644 index 8b03c28..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs +++ /dev/null @@ -1,423 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using DG.Tweening; -using FairyGUI; -using FGUI.LG_secretAlbums; -using SGModule.Common.Helper; -using SGModule.NetKit; -using UnityEngine; - -namespace LoveLegend -{ - public class SecretAlbumsNextUI : BaseUI - { - private SecretAlbumsNextUICtrl ctrl; - private SecretAlbumsNextModel model; - private FGUI.LG_secretAlbums.com_scAlbumPreview ui; - - public SecretAlbumsNextUI(SecretAlbumsNextUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.SecretAlbumsNextUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_secretAlbums"; - uiInfo.assetName = "com_scAlbumPreview"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretAlbumsModel) as SecretAlbumsModel; - } - - protected override void OnClose() - { - HallManager.Instance.UpdateSecondEvent -= UpWatchAdsBtn; - - // 清理 Loader 的材质和贴图 - foreach (var loader in loader_list) - { - if (loader == null || loader.isDisposed) continue; - - // 释放材质到材质池 - if (loader.material != null) - { - TextureHelper.CancelImageBlur(loader); // 自动返回材质池 - loader.material = null; - } - - // 清理 NTexture - if (loader.texture != null) - { - if (loader.texture.destroyMethod == DestroyMethod.Destroy) - loader.texture.Dispose(); // 销毁 NTexture 对象 - loader.texture = null; - } - } - loader_list.Clear(); - - // 强制卸载未使用的资源 - Resources.UnloadUnusedAssets(); - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_secretAlbums.com_scAlbumPreview; - } - - private AlbumPreviewData _albumPreviewData; - - protected override void OnOpenBefore(object args) - { - if (args == null) return; - - _albumPreviewData = (AlbumPreviewData)args; - - InitView(); - - var event_names = ADEventTrack.Property.secret_albums_show + (_albumPreviewData.Index + 1); - - var event_type = _albumPreviewData.PayType == (int)UnlockPayType.Ad ? ADEventTrack.Event : ADEventTrack.MaxPayEvent; - TrackKit.SendEvent(event_type, event_names); - - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success); - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, InitView); - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success); - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, InitView); - } - - #endregion - - void pay_success(object str) - { - string type = (string)str; - string purch_number = ""; - - if (type.StartsWith("secret_albnums")) - { - int startIndex = "secret_albnums".Length; - string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符 - int suffix_num = int.Parse(suffix); - - Log.Info("Secret_pay_success", $"index================:{suffix_num}"); - // 判断是否已存在,避免重复添加 - if (!DataMgr.SecretUnlockList.Value.Contains(suffix_num)) - { - DataMgr.SecretUnlockList.Value.Add(suffix_num); - DataMgr.SecretUnlockList.Save(); - - GameDispatcher.Instance.Dispatch(GameMsg.UnlockSecretSuccess); - } - GameHelper.ShowTips("purchase_succ", true); - InitView(); - } - } - - private List _secretData; - - private bool is_unlock = false; //当前专辑是否解锁 - private List loader_list = new List(); - //初始化页面逻辑 - private void InitView(object a = null) - { - // 先清理上一次的 loader 和任务 - foreach (var l in loader_list) - { - if (l != null && !l.isDisposed) - { - TextureHelper.CancelImageBlur(l); // 放回材质池 - if (l.texture != null) - { - l.texture.Dispose(); - l.texture = null; - } - if (l.material != null) l.material = null; - } - } - loader_list.Clear(); - _tasks.Clear(); - - - //专辑解锁状态 - is_unlock = DataMgr.SecretUnlockList.Value.Contains(_albumPreviewData.Index); - - UpWatchAdsBtn(); - - HallManager.Instance.UpdateSecondEvent += UpWatchAdsBtn; - - ui.btn_close.SetClick(CtrlCloseUI); - - ui.old_price.text = GameHelper.getPrice((decimal)_albumPreviewData.Price); - - ui.btn_pay.title = GameHelper.getPrice((decimal)_albumPreviewData.DiscountPrice); - - - _secretData = SplitStringToList(_albumPreviewData.Name2); - - - ui.list.itemRenderer = ItemRender; - ui.list.numItems = _secretData.Count; - - ui.pay_type.selectedIndex = !is_unlock ? _albumPreviewData.PayType : (int)UnlockPayType.None; - if (is_unlock) - { - ui.pay_type.selectedIndex = (int)UnlockPayType.None; - } - else - { - if (_albumPreviewData.SubscribeUnlock == 1) - { - ui.vip.selectedIndex = 1; - if (GameHelper.GetVipLevel() > 0) - { - ui.has_vip.selectedIndex = 1; - ui.btn_vip.x = 540; - // ui.btn_vip.y -= 10; - } - else - { - ui.has_vip.selectedIndex = 0; - } - } - else - { - ui.vip.selectedIndex = 0; - } - ui.pay_type.selectedIndex = _albumPreviewData.PayType; - } - var _type = "secret_albnums" + _albumPreviewData.Index; - ui.btn_pay.SetClick(() => - { - ApplePayClass maxPayData = new ApplePayClass - { - amount = (int)Math.Round(_albumPreviewData.DiscountPrice * 100), - sku = _type, - currency = "USD" - }; - MaxPayManager.Instance.Buy(maxPayData); - }); - ui.btn_gold.title = _albumPreviewData.GoldCoins.ToString(); - ui.btn_gold.SetClick(() => - { - if (GameHelper.Get101() >= _albumPreviewData.GoldCoins) - { - GameHelper.AddGold(-_albumPreviewData.GoldCoins); - GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, _type); - - string eventName = ADEventTrack.Property.secret_albums_success_ + (_albumPreviewData.Index + 1); - TrackKit.SendEvent(ADEventTrack.SecretAlbums, eventName); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.unlock_secretAlbums_resources); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - - var AdCount = DataMgr.SecretUnlockADs.Value.GetValueOrDefault(_albumPreviewData.Index, 0); - ui.btn_watch.ads.SetVar("ads", AdCount + "/" + _albumPreviewData.AD).FlushVars(); - ui.btn_watch.SetClick(() => - { - - if (AdCount >= _albumPreviewData.AD) - { - GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, _type); - } - else - { - GameHelper.ShowVideoAd("UnlockSecretAlbums", (isSuccess) => - { - if (isSuccess) - { - var adTimes = Convert.ToInt32(GameHelper.GetNowTime()); - DataMgr.SecretUnlockCd.Value[_albumPreviewData.Index] = adTimes + _albumPreviewData.CD; - DataMgr.SecretUnlockCd.Save(); - - var currentAdCount = DataMgr.SecretUnlockADs.Value.GetValueOrDefault(_albumPreviewData.Index, 0); - DataMgr.SecretUnlockADs.Value[_albumPreviewData.Index] = currentAdCount + 1; - DataMgr.SecretUnlockADs.Save(); - - string eventName = ADEventTrack.Property.secret_albums_success_ + (_albumPreviewData.Index + 1); - TrackKit.SendEvent(ADEventTrack.Event, eventName); - - InitView(); - } - }); - } - }); - ui.btn_vip.SetClick(() => - { - TrackKit.SendEvent(ADEventTrack.SecretAlbums, ADEventTrack.Property.secret_albums_click_ + (_albumPreviewData.Index + 1)); - if (GameHelper.GetVipLevel() > 0) - { - GameHelper.isVipUnlock = true; - GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, _type); - - string eventName = ADEventTrack.Property.vip_secret_albums_unclock_ + (_albumPreviewData.Index + 1); - TrackKit.SendEvent(ADEventTrack.VipSecretAlbums, eventName); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open, 2); - TrackKit.SendEvent(ADEventTrack.VipSecretAlbums, ADEventTrack.Property.vip_secret_albums_unclock); - } - }); - } - - private List<(GLoader loader, string fileName, Action callback, string folder, string localFolder)> _tasks = new(); - - private void ItemRender(int index, GObject obj) - { - var item = (item_scAlbumPreview)obj; - var picture = (GLoader)item.com_pic_in.GetChild("picture"); - - if (!loader_list.Contains(picture)) - loader_list.Add(picture); - - var state = GetSafe(_albumPreviewData.State, index); - item.state.selectedIndex = is_unlock ? 0 : state; - - var task = (picture, _secretData[index], (Action)(s => - { - if (picture != null && !picture.isDisposed) - { - if (!is_unlock && state == 1) - TextureHelper.SetImageBlur(picture); - else - TextureHelper.CancelImageBlur(picture); - } - }), $"SecretAlbums/{_albumPreviewData.Name}/", FolderNames.SecretName); - - _tasks.Add(task); - - item.btn_detail.SetClick(() => - { - if (is_unlock) - { - var data = new DetailData - { - Name = _secretData[index], - Name1 = $"SecretAlbums/{_albumPreviewData.Name}/" - }; - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretDetailUI_Open, data); - } - else - { - GameHelper.ShowTips("not_unlocked", true); - } - }); - - if (index == _secretData.Count - 1) - { - TextureHelper.SetImgLoaders(_tasks); - } - } - - - - private void UpWatchAdsBtn() - { - DataMgr.SecretUnlockCd.Value.TryGetValue(_albumPreviewData.Index, out var lastTimes); - - - if (DataMgr.SecretUnlockADs.Value.TryGetValue(_albumPreviewData.Index, out var unlockAdValue) && - unlockAdValue >= _albumPreviewData.AD) - { - ui.btn_watch.can_buy.selectedIndex = 1; - } - else - { - ui.btn_watch.can_buy.selectedIndex = 0; - if (GameHelper.GetNowTime() < lastTimes) - { - ui.btn_watch.enabled = false; - ui.btn_watch.CD.selectedIndex = 1; - ui.btn_watch.watch_cd.text = - CommonHelper.TimeFormat(lastTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour); - } - else - { - ui.btn_watch.enabled = true; - ui.btn_watch.CD.selectedIndex = 0; - - } - } - } - - - // 拆分字符串为列表 - public static List SplitStringToList(string input) - { - if (string.IsNullOrWhiteSpace(input)) - return new List(); - - // 支持英文逗号, 中文逗号,空格 - char[] separators = new char[] { ',', ',', ' ' }; - - return input - .Split(separators, StringSplitOptions.RemoveEmptyEntries) - .Select(s => s.Trim()) // 去掉前后空白 - .ToList(); - } - - /// - /// 安全获取列表或数组中的元素,如果越界则返回最后一个元素;如果为空则返回默认值。 - /// - public static T GetSafe(IList list, int index, T defaultValue = default) - { - if (list == null || list.Count == 0) - return defaultValue; - - if (index < 0) - return list[0]; - - if (index >= list.Count) - return list[list.Count - 1]; - - return list[index]; - } - } - - public class DetailData - { - public string Name; - public string Name1; - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs.meta deleted file mode 100644 index ac39e17..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUI.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4c21755c420b4d22a2aa86f3a3851ce6 -timeCreated: 1753432022 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs deleted file mode 100644 index 90e19aa..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretAlbumsNextUICtrl : BaseUICtrl - { - private SecretAlbumsNextUI ui; - private SecretAlbumsNextModel model; - - private uint openUIMsg = UICtrlMsg.SecretAlbumsNextUI_Open; - private uint closeUIMsg = UICtrlMsg.SecretAlbumsNextUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretAlbumsNextModel) as SecretAlbumsNextModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new SecretAlbumsNextUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs.meta deleted file mode 100644 index 0d7d49b..0000000 --- a/Assets/Scripts/ModuleUI/SecretAlbumsNext/SecretAlbumsNextUICtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 46271cbd15ca4192b9ae9300040f28ad -timeCreated: 1753432022 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail.meta b/Assets/Scripts/ModuleUI/SecretDetail.meta deleted file mode 100644 index 992bf46..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 6352596b5d2742a39b1a5d198848dbca -timeCreated: 1753517102 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs deleted file mode 100644 index da29228..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretDetailCtrl : BaseCtrl - { - public static SecretDetailCtrl Instance { get; private set; } - - private SecretDetailModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.SecretDetailModel) as SecretDetailModel; - } - - protected override void OnDispose() - { - Instance = null; - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs.meta deleted file mode 100644 index b55ca53..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailCtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8adb52e123a146b9bca2f91a9346bf41 -timeCreated: 1753517102 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs deleted file mode 100644 index 8d12713..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - - -namespace LoveLegend -{ - public class SecretDetailModel : BaseModel - { - #region 生命周期 - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs.meta b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs.meta deleted file mode 100644 index 899758e..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailModel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 70914fdb77b643ff9fefe690b05f720e -timeCreated: 1753517102 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs deleted file mode 100644 index b5da33c..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using FairyGUI; -using SGModule.Common.Extensions; -using SGModule.Common.Helper; -using UnityEngine; - -namespace LoveLegend -{ - public class SecretDetailUI : BaseUI - { - private SecretDetailUICtrl ctrl; - private SecretDetailModel model; - private FGUI.LG_secretAlbums.com_secretDetail ui; - - public SecretDetailUI(SecretDetailUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.SecretDetailUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_secretAlbums"; - uiInfo.assetName = "com_secretDetail"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretDetailModel) as SecretDetailModel; - } - - protected override void OnClose() - { - if (_loader != null && !_loader.isDisposed && _loader.texture != null) - { - _loader.texture = null; - } - _loader = null; - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_secretAlbums.com_secretDetail; - } - - private DetailData _pictureName; - - protected override void OnOpenBefore(object args) - { - if (args == null) return; - _pictureName = (DetailData)args; - - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - } - - protected override void RemoveListener() - { - } - - #endregion - - private GLoader _loader = new GLoader(); - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(CtrlCloseUI); - _loader = ui.com_loader.GetChild("loader") as GLoader; - - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _pictureName.Name, null, - _pictureName.Name1, FolderNames.SecretName); - var btnDownCoin = ((FGUI.LG_Common.btn_unlock_1)ui.btn_download_coin); - var downloadCoinNum = ConfigSystem.GetCommonConf().CoinsDownload; - btnDownCoin.title = downloadCoinNum.ToString(); - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - (ui.btn_download as FGUI.LG_Common.btn_claim).have_vip.selectedIndex = 1; - ui.is_vip.selectedIndex = 1; - } - else - { - ui.is_vip.selectedIndex = 0; - btnDownCoin.down_load.selectedIndex = 1; - } - btnDownCoin.SetClick(() => - { - if (GameHelper.Get101() >= downloadCoinNum) - { - GameHelper.AddGold(-downloadCoinNum); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - TextureHelper.SaveImageToAlbum(_pictureName.Name, FolderNames.SecretName); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - - ui.btn_download.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.FreeDownImage.As())) - { - TextureHelper.SaveImageToAlbum(_pictureName.Name, FolderNames.SecretName); - } - else - { - GameHelper.ShowVideoAd("secret_albnums", isSuccess => - { - if (isSuccess) - { - TextureHelper.SaveImageToAlbum(_pictureName.Name, FolderNames.SecretName); - } - }); - } - }); - } - - private void ItemRender(int index, GObject obj) - { - } - - - private int GetPepleNum(float quantity) - { - // 获取当前时间 - DateTime now = DateTime.Now; - - // 计算当天已经过去的分钟数(从凌晨 0 点开始算) - int minutesPassedToday = now.Hour * 60 + now.Minute; - - // 计算人数 - int num = Mathf.FloorToInt(quantity * minutesPassedToday); - - return num; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs.meta b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs.meta deleted file mode 100644 index 888284f..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUI.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 29b4548115424136b933917cce0cf07b -timeCreated: 1753517102 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs deleted file mode 100644 index abf96de..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretDetailUICtrl : BaseUICtrl - { - private SecretDetailUI ui; - private SecretDetailModel model; - - private uint openUIMsg = UICtrlMsg.SecretDetailUI_Open; - private uint closeUIMsg = UICtrlMsg.SecretDetailUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretDetailModel) as SecretDetailModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new SecretDetailUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs.meta deleted file mode 100644 index ce4e66d..0000000 --- a/Assets/Scripts/ModuleUI/SecretDetail/SecretDetailUICtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4dacaf63ed5a4250994be0e0de513d7e -timeCreated: 1753517102 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView.meta b/Assets/Scripts/ModuleUI/SecretUnlockView.meta deleted file mode 100644 index e3bb784..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 7c7ad6fdf066437fb60255d680dfc5e2 -timeCreated: 1753422948 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs deleted file mode 100644 index a808438..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretUnlockCtrl : BaseCtrl - { - public static SecretUnlockCtrl Instance { get; private set; } - - private SecretUnlockModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.SecretUnlockModel) as SecretUnlockModel; - } - - protected override void OnDispose() - { - Instance = null; - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs.meta deleted file mode 100644 index e7a3a05..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewCtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 91bcb57678b444b98dce102dcd143842 -timeCreated: 1753422948 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs deleted file mode 100644 index 1ad8f5b..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - - -namespace LoveLegend -{ - public class SecretUnlockModel : BaseModel - { - #region 生命周期 - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - - } - protected override void RemoveListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs.meta b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs.meta deleted file mode 100644 index 032f05c..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewModel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 06811f7974d0499993774d6452053139 -timeCreated: 1753422948 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs deleted file mode 100644 index 2038a64..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs +++ /dev/null @@ -1,210 +0,0 @@ -using SGModule.NetKit; - -namespace LoveLegend -{ - public class SecretUnlockUI : BaseUI - { - private SecretUnlockUICtrl ctrl; - private SecretUnlockModel model; - private FGUI.LG_Unlock.com_unlockView ui; - - public SecretUnlockUI(SecretUnlockUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.SecretUnlockUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Unlock"; - uiInfo.assetName = "com_unlockView"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretUnlockModel) as SecretUnlockModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Unlock.com_unlockView; - } - - protected override void OnOpenBefore(object args) - { - if (args != null) - { - type = (int)args; - } - InitView(); - } - private int type = 1; - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - } - protected override void RemoveListener() - { - } - #endregion - - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(CtrlCloseUI); - if (type == 1) - { - TrackKit.SendEvent(ADEventTrack.SecretAlbums, ADEventTrack.Property.secret_unlock); - var unlockData = ConfigSystem.GetCommonConf().UnlockSecret; - ui.text_coin.SetVar("coin", unlockData[0].ToString()).FlushVars(); - ui.text_level.SetVar("lv", unlockData[1].ToString()).FlushVars(); - ui.btn_gold.title = unlockData[0].ToString(); - //金币 - ui.btn_gold.SetClick(() => - { - if (GameHelper.Get101() < unlockData[0]) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, true); - } - else - { - DataMgr.IsUnlockSecret.Value = 0; - DataMgr.Coin.Value -= unlockData[0]; - - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsUI_Open); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 1); - TrackKit.SendEvent(ADEventTrack.SecretAlbums, ADEventTrack.Property.secret_coin); - GameHelper.ShowTips("unlock_secret", true); - } - CtrlCloseUI(); - - }); - - } - else if (type == 2) - { - var unlockData = ConfigSystem.GetCommonConf().UnlockLive; - ui.text_coin.SetVar("coin", unlockData[0].ToString()).FlushVars(); - ui.text_level.SetVar("lv", unlockData[1].ToString()).FlushVars(); - ui.btn_gold.title = unlockData[0].ToString(); - //金币 - ui.btn_gold.SetClick(() => - { - if (GameHelper.Get101() < unlockData[0]) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, true); - } - else - { - DataMgr.IsUnlockLive.Value = 0; - DataMgr.Coin.Value -= unlockData[0]; - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 2); - TrackKit.SendEvent(ADEventTrack.Live, ADEventTrack.Property.live_coin); - GameHelper.ShowTips("unlock_live", true); - } - CtrlCloseUI(); - - }); - } - else if (type == 3)//聊天 - { - ui.type.selectedIndex = 1; - - - int unlockData = ConfigSystem.GetCommonConf().UnlockAIAssistant;//xiugai - ui.text_coin.SetVar("coin", unlockData.ToString()).FlushVars(); - // ui.text_level.SetVar("lv", unlockData[1].ToString()).FlushVars(); - ui.btn_gold.title = unlockData.ToString(); - //金币 - ui.btn_gold.SetClick(() => - { - if (GameHelper.Get101() < unlockData) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, true); - } - else - { - DataMgr.IsUnlockChat.Value = 0; - DataMgr.Coin.Value -= unlockData; - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - GameDispatcher.Instance.Dispatch(GameMsg.Update101); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Open, 3); - - TrackKit.SendEvent(ADEventTrack.Chat, ADEventTrack.Property.chat_coin); - - GameHelper.ShowTips("unlocked_assitant", true); - } - CtrlCloseUI(); - - }); - - } - //订阅 - ui.btn_subscribe.SetClick(() => - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.VipClubViewUI_Open); - CtrlCloseUI(); - string event_type = ""; - string event_name = ""; - // string event_type_1 = ""; - if (type == 1) - { - event_type = ADEventTrack.SecretAlbums; - event_name = ADEventTrack.Property.secret_sub; - } - else if (type == 2) - { - event_type = ADEventTrack.Live; - event_name = ADEventTrack.Property.live_sub; - } - else if (type == 3) - { - event_type = ADEventTrack.Chat; - event_name = ADEventTrack.Property.chat_sub; - } - - TrackKit.SendEvent(event_type, event_name); - - - - }); - - //闯关 - ui.btn_play.SetClick(() => - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Close); - GameDispatcher.Instance.Dispatch(GameMsg.OpenGame); - if (type == 1) TrackKit.SendEvent(ADEventTrack.SecretAlbums, ADEventTrack.Property.secret_play); - else TrackKit.SendEvent(ADEventTrack.Live, ADEventTrack.Property.live_play); - CtrlCloseUI(); - }); - } - } -} diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs.meta b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs.meta deleted file mode 100644 index 943e391..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUI.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: be4038294c0e40f3a3412bc7881184a3 -timeCreated: 1753422948 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs deleted file mode 100644 index 36fed71..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - -namespace LoveLegend -{ - public class SecretUnlockUICtrl : BaseUICtrl - { - private SecretUnlockUI ui; - private SecretUnlockModel model; - - private uint openUIMsg = UICtrlMsg.SecretUnlockUI_Open; - private uint closeUIMsg = UICtrlMsg.SecretUnlockUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SecretUnlockModel) as SecretUnlockModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new SecretUnlockUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs.meta b/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs.meta deleted file mode 100644 index d2b2f2d..0000000 --- a/Assets/Scripts/ModuleUI/SecretUnlockView/SecretUnlockViewUICtrl.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2430810078bb48d5b7e605d819ba2cfc -timeCreated: 1753422948 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SubUnlock.meta b/Assets/Scripts/ModuleUI/SubUnlock.meta deleted file mode 100644 index de1692e..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7d2af044ac3bf417e81e8a00191b46f3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs deleted file mode 100644 index 3e9e974..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class SubUnlockCtrl : BaseCtrl - { - public static SubUnlockCtrl Instance { get; private set; } - - private SubUnlockModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.SubUnlockModel) as SubUnlockModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs.meta b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs.meta deleted file mode 100644 index 9704691..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 049e2bdfed97e46d9aacaaf297a8c89e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs deleted file mode 100644 index ebbb470..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class SubUnlockModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs.meta b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs.meta deleted file mode 100644 index 16f8e06..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 955ab31d0977643cd9ffe11228d6e524 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs deleted file mode 100644 index 5cf0ae5..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs +++ /dev/null @@ -1,150 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; - -namespace LoveLegend -{ - public class SubUnlockUI : BaseUI - { - private SubUnlockUICtrl ctrl; - private SubUnlockModel model; - private FGUI.LG_Unlock.com_SubUnlock ui; - - public SubUnlockUI(SubUnlockUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.SubUnlockUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Unlock"; - uiInfo.assetName = "com_SubUnlock"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SubUnlockModel) as SubUnlockModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Unlock.com_SubUnlock; - } - - protected override void OnOpenBefore(object args) - { - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, refrsh); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, refrsh); - } - #endregion - private void refrsh(object a = null) - { - GameHelper.ShowTips("unlock_vip", true); - CtrlCloseUI(); - } - - //初始化页面逻辑 - private void InitView() - { - ui.btn_close.SetClick(() => - { - CtrlCloseUI(); - }); - var vip_list = ConfigSystem.GetConfig(); - ui.text_unlockLive.SetVar("num", GameHelper.GetCommonModel().UnlockLive[1].ToString()).FlushVars(); - ui.text_unlockAlbum.SetVar("num", GameHelper.GetCommonModel().UnlockSecret[1].ToString()).FlushVars(); - ui.btn_vip0.text_price.text = GameHelper.getPrice((decimal)vip_list[0].DiscountPrice); - ui.btn_vip1.text_price.text = GameHelper.getPrice((decimal)vip_list[1].DiscountPrice); - ui.btn_vip2.text_price.text = GameHelper.getPrice((decimal)vip_list[2].DiscountPrice); - - if (GameHelper.GetVipLevel() - 1 >= 0) - { - ui.btn_vip0.enabled = false; - } - - ui.btn_vip0.SetClick(() => - { - string _type = "vip_club" + 0; - ApplePayClass maxPayData = new ApplePayClass - { - amount = (int)System.Math.Round(vip_list[0].DiscountPrice * 100), - sku = PurchasingManager.GetPaySku(PayType.weekly_subscription), - currency = "USD", - shopName = _type - }; - MaxPayManager.Instance.Buy(maxPayData); - }); - - if (GameHelper.GetVipLevel() - 1 >= 1) - { - ui.btn_vip1.enabled = false; - } - - ui.btn_vip1.SetClick(() => - { - string _type = "vip_club" + 1; - ApplePayClass maxPayData = new ApplePayClass - { - amount = (int)System.Math.Round(vip_list[1].DiscountPrice * 100), - sku = PurchasingManager.GetPaySku(PayType.monthly_subscription), - currency = "USD", - shopName = _type - }; - MaxPayManager.Instance.Buy(maxPayData); - }); - - if (GameHelper.GetVipLevel() - 1 >= 2) - { - ui.btn_vip2.enabled = false; - } - - ui.btn_vip2.SetClick(() => - { - string _type = "vip_club" + 2; - ApplePayClass maxPayData = new ApplePayClass - { - amount = (int)System.Math.Round(vip_list[2].DiscountPrice * 100), - sku = PurchasingManager.GetPaySku(PayType.yearly_subscription), - currency = "USD", - shopName = _type - }; - MaxPayManager.Instance.Buy(maxPayData); - }); - - } - - } -} diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs.meta b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs.meta deleted file mode 100644 index 0e8e95b..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fabe169f21e25495691f8eef32677d91 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs deleted file mode 100644 index f8d2891..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class SubUnlockUICtrl : BaseUICtrl - { - private SubUnlockUI ui; - private SubUnlockModel model; - - private uint openUIMsg = UICtrlMsg.SubUnlockUI_Open; - private uint closeUIMsg = UICtrlMsg.SubUnlockUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.SubUnlockModel) as SubUnlockModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new SubUnlockUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs.meta b/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs.meta deleted file mode 100644 index a2e6d5e..0000000 --- a/Assets/Scripts/ModuleUI/SubUnlock/SubUnlockUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ab2a65a4e39f41648d4d0fdf38ab3d2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevel.meta b/Assets/Scripts/ModuleUI/UnlockLevel.meta deleted file mode 100644 index d565744..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: efff2daa5a02e4bd4930ca2c4c3f04ba -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs deleted file mode 100644 index c56add3..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelCtrl : BaseCtrl - { - public static UnlockLevelCtrl Instance { get; private set; } - - private UnlockLevelModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.UnlockLevelModel) as UnlockLevelModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs.meta deleted file mode 100644 index 09b9e72..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ed37101546f24366b2287ba874f9481 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs deleted file mode 100644 index 93f3d5b..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs.meta deleted file mode 100644 index 256e581..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3e5dee4d6067d4289bc107da0d397ce4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs deleted file mode 100644 index e1827a0..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs +++ /dev/null @@ -1,248 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using FGUI.LG_Common; -using DG.Tweening; -using SGModule.NetKit; -using System.Collections.Generic; -using SGModule.Common.Extensions; - -namespace LoveLegend -{ - public class UnlockLevelUI : BaseUI - { - private UnlockLevelUICtrl ctrl; - private UnlockLevelModel model; - private FGUI.LG_End.com_unlockLevel ui; - - public UnlockLevelUI(UnlockLevelUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.UnlockLevelUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_End"; - uiInfo.assetName = "com_unlockLevel"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockLevelModel) as UnlockLevelModel; - } - - protected override void OnClose() - { - for (int i = 0; i < loader_list.Count; i++) - { - if (loader_list[i] != null && !loader_list[i].isDisposed && loader_list[i].texture != null) - { - loader_list[i].texture.Dispose(); - loader_list[i].texture = null; - } - } - loader_list.Clear(); - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_End.com_unlockLevel; - } - private LevelUnlock levelUnlock_; - private int level_; - protected override void OnOpenBefore(object args) - { - level_ = (int)args; - Debug.Log(level_); - - if (!loader_list.Contains(ui.com_loader.GetChild("loader") as GLoader)) - { - loader_list.Add(ui.com_loader.GetChild("loader") as GLoader); - } - - levelUnlock_ = ConfigSystem.GetConfig()[level_]; - TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, levelUnlock_.Name, (s) => - { - TextureHelper.SetImageBlur(ui.com_loader.GetChild("loader") as GLoader); - }, "LevelAlbums/", FolderNames.AlbumName); - InitView(); - if (levelUnlock_.LeveType == 1) - { - TrackKit.SendEvent(ADEventTrack.Special, ADEventTrack.Property.speciallevel); - } - else if (levelUnlock_.LeveType == 2) - { - TrackKit.SendEvent(ADEventTrack.VipLevel, ADEventTrack.Property.viplevel); - } - - } - private List loader_list = new List(); - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, refrsh); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, refrsh); - } - #endregion - private void refrsh(object a = null) - { - DOVirtual.DelayedCall(0.5f, () => - { - InitView(); - }); - - } - //初始化页面逻辑 - private void InitView() - { - - - if (GameHelper.GetVipPrivilege(Subscription.VipLevel.As())) - { - (ui.btn_vip as btn_claim_2).have_vip.selectedIndex = 1; - } - if (GameHelper.GetVipPrivilege(Subscription.SLVLevel.As())) - { - (ui.btn_watch as btn_claim_1).have_vip.selectedIndex = 1; - } - - if (levelUnlock_.LeveType == 1) //特殊关 - { - ui.type.selectedIndex = 0; - ui.btn_pay.title = levelUnlock_.GoldCoins.ToString(); - - ui.btn_pay.SetClick(() => - { - if (DataMgr.Coin.Value >= levelUnlock_.GoldCoins) - { - DataMgr.Coin.Value -= levelUnlock_.GoldCoins; - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - DataMgr.LevelUnlockList.Value.Add(level_); - GameHelper.ShowTips("unlocked", true); - DataMgr.LevelUnlockList.Save(); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - CtrlCloseUI(); - TrackKit.SendEvent(ADEventTrack.Special, ADEventTrack.Property.speciallevelcoin); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - - ui.btn_watch.SetClick(() => //7天都不包含。30天包含特殊,365全部包含 - { - if (GameHelper.GetVipPrivilege(Subscription.SLVLevel.As())) - { - DataMgr.LevelUnlockList.Value.Add(level_); - GameHelper.ShowTips("unlocked", true); - DataMgr.LevelUnlockList.Save(); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - CtrlCloseUI(); - - } - else - { - GameHelper.ShowVideoAd("UnlockSpecialLevel", isSuccess => - { - if (isSuccess) - { - DataMgr.LevelUnlockList.Value.Add(level_); - GameHelper.ShowTips("unlocked", true); - DataMgr.LevelUnlockList.Save(); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - CtrlCloseUI(); - } - TrackKit.SendEvent(ADEventTrack.Special, ADEventTrack.Property.speciallevelvideo); - }); - } - - }); - } - else if (levelUnlock_.LeveType == 2)//vip关 - { - ui.type.selectedIndex = 1; - ui.btn_pay.title = levelUnlock_.GoldCoins.ToString(); - - ui.btn_pay.SetClick(() => - { - if (DataMgr.Coin.Value >= levelUnlock_.GoldCoins) - { - DataMgr.Coin.Value -= levelUnlock_.GoldCoins; - GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); - DataMgr.LevelUnlockList.Value.Add(level_); - GameHelper.ShowTips("unlocked", true); - DataMgr.LevelUnlockList.Save(); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - TrackKit.SendEvent(ADEventTrack.VipLevel, ADEventTrack.Property.viplevelcoin); - CtrlCloseUI(); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open); - } - }); - ui.btn_vip.SetClick(() => - { - if (GameHelper.GetVipPrivilege(Subscription.VipLevel.As())) - { - DataMgr.LevelUnlockList.Value.Add(level_); - GameHelper.ShowTips("unlocked", true); - DataMgr.LevelUnlockList.Save(); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - CtrlCloseUI(); - } - else - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open, 2); - TrackKit.SendEvent(ADEventTrack.VipLevel, ADEventTrack.Property.viplevelsub); - } - - - }); - - - } - ui.btn_close.SetClick(() => - { - GameHelper.SetLevel(GameHelper.GetLevel() + 1); - if (UIManager.Instance.IsExistUI(UIConst.NewEndUI)) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NewEndUI_Close); - } - else - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open); - } - - CtrlCloseUI(); - }); - - } - } -} diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs.meta deleted file mode 100644 index 1075470..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 631ea815252db45da85a29cdbc773808 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs deleted file mode 100644 index d81468a..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelUICtrl : BaseUICtrl - { - private UnlockLevelUI ui; - private UnlockLevelModel model; - - private uint openUIMsg = UICtrlMsg.UnlockLevelUI_Open; - private uint closeUIMsg = UICtrlMsg.UnlockLevelUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockLevelModel) as UnlockLevelModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new UnlockLevelUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs.meta deleted file mode 100644 index 9863093..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevel/UnlockLevelUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b70f920f2c424e619f7e3b2f6d38a92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew.meta b/Assets/Scripts/ModuleUI/UnlockLevelNew.meta deleted file mode 100644 index a515d27..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b56e35ed21987bf4cbff340841530875 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs deleted file mode 100644 index ad867be..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelNewCtrl : BaseCtrl - { - public static UnlockLevelNewCtrl Instance { get; private set; } - - private UnlockLevelNewModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.UnlockLevelNewModel) as UnlockLevelNewModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs.meta deleted file mode 100644 index 7a4cb85..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 75935d72d871f431f934473d998e9072 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs deleted file mode 100644 index d1bc552..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelNewModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs.meta deleted file mode 100644 index 3fcf780..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 836f6d896ac48479fb7f6f996c5fa412 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs deleted file mode 100644 index a8887ef..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs +++ /dev/null @@ -1,490 +0,0 @@ - -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Linq; -using SGModule.Common.Extensions; -using DG.Tweening; -using UnityEngine.UIElements; -using SGModule.NetKit; - -namespace LoveLegend -{ - public class UnlockLevelNewUI : BaseUI - { - private UnlockLevelNewUICtrl ctrl; - private UnlockLevelNewModel model; - private FGUI.LG_End.com_unlockLevelNew ui; - - public UnlockLevelNewUI(UnlockLevelNewUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.UnlockLevelNewUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_End"; - uiInfo.assetName = "com_unlockLevelNew"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockLevelNewModel) as UnlockLevelNewModel; - } - - protected override void OnClose() - { - // for (int i = 0; i < loader_list.Count; i++) - // { - // if (loader_list[i] != null && !loader_list[i].isDisposed && loader_list[i].texture != null) - // { - // loader_list[i].texture = null; - // } - // } - // loader_list.Clear(); - foreach (var loader in loader_list) - { - if (loader == null || loader.isDisposed) continue; - - // 释放材质到材质池 - if (loader.material != null) - { - TextureHelper.CancelImageBlur(loader); // 自动返回材质池 - loader.material = null; - } - - // 清理 NTexture - if (loader.texture != null) - { - loader.texture.Dispose(); // 销毁 NTexture 对象 - loader.texture = null; - } - } - loader_list.Clear(); - } - private List loader_list = new List(); - protected override void OnBind() - { - ui = baseUI as FGUI.LG_End.com_unlockLevelNew; - } - - private bool isHallEnter = false; - protected override void OnOpenBefore(object args) - { - if (args != null) - { - isHallEnter = (bool)args; - } - InitView(); - ui.btn_close.SetClick(() => - { - GameDispatcher.Instance.Dispatch(GameMsg.ExitGame); - uiCtrlDispatcher.Dispatch(UICtrlMsg.NewEndUI_Close); - CtrlCloseUI(); - }); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - #endregion - - #region 消息 - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, RefreshVip); - } - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, RefreshVip); - } - #endregion - private void RefreshVip(object a = null) - { - bool have_special = GameHelper.GetVipPrivilege(Subscription.SLVLevel.As()); - SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockSpecial.Value]; - if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture); - else TextureHelper.CancelImageBlur(ui.item_2.com_pic.picture); - - if (have_special) - { - ui.item_2.btn_unlock.visible = false; - ui.item_2.type.selectedIndex = 0; - ui.item_2.btn_skip.SetClick(() => - { - SelectLevel(2, DataMgr.LevelUnlockSpecial.Value); - }); - } - else - { - ui.item_2.type.selectedIndex = 2; - ui.item_2.btn_unlock.visible = true; - ui.item_2.btn_skip.SetClick(() => - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open); - }); - - if (special_ImageLibrary.GoldCoins > 0) - { - ui.item_2.btn_unlock.pay_type.selectedIndex = 1; - ui.item_2.btn_unlock.title = special_ImageLibrary.GoldCoins.ToString(); - ui.item_2.btn_unlock.SetClick(() => - { - if (DataMgr.Coin.Value >= special_ImageLibrary.GoldCoins) - { - GameHelper.AddGold(-special_ImageLibrary.GoldCoins); - SelectLevel(2, DataMgr.LevelUnlockSpecial.Value); - Debug.Log("///////金币解锁"); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - } - else - { - ui.item_2.btn_unlock.visible = false; - } - } - - bool have_vip = GameHelper.GetVipPrivilege(Subscription.VipLevel.As()); - VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockVIP.Value]; - if (vip_ImageLibrary.State == 1 && !have_vip) TextureHelper.SetImageBlur(ui.item_3.com_pic.picture); - else TextureHelper.CancelImageBlur(ui.item_3.com_pic.picture); - if (have_vip) - { - ui.item_3.btn_unlock.visible = false; - ui.item_3.type.selectedIndex = 0; - ui.item_3.btn_skip.SetClick(() => - { - SelectLevel(3, DataMgr.LevelUnlockVIP.Value); - }); - } - else - { - ui.item_3.type.selectedIndex = 3; - ui.item_3.btn_unlock.visible = true; - ui.item_3.btn_skip.SetClick(() => - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open); - }); - - if (vip_ImageLibrary.GoldCoins > 0) - { - ui.item_3.btn_unlock.pay_type.selectedIndex = 1; - ui.item_3.btn_unlock.title = vip_ImageLibrary.GoldCoins.ToString(); - ui.item_3.btn_unlock.SetClick(() => - { - if (DataMgr.Coin.Value >= vip_ImageLibrary.GoldCoins) - { - GameHelper.AddGold(-vip_ImageLibrary.GoldCoins); - SelectLevel(3, DataMgr.LevelUnlockVIP.Value); - Debug.Log("///////金币解锁"); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - } - else - { - ui.item_3.btn_unlock.visible = false; - } - } - } - - //初始化页面逻辑 - private void InitView() - { - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig()) + ".................."); - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig()) + ".................."); - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig()) + ".................."); - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig()) + ".................."); - - ConfigSystem.GetConfig(); - - loader_list.Add(ui.item_0.com_pic.picture); - loader_list.Add(ui.item_1.com_pic.picture); - loader_list.Add(ui.item_2.com_pic.picture); - loader_list.Add(ui.item_3.com_pic.picture); - - // List free_level_list = new List(); - // List ad_level_list = new List(); - // List special_level_list = new List(); - // List vip_level_list = new List(); - // for (int i = 0; i < DataMgr.LevelUnlockListNew.Value.Count; i++) - // { - // if (DataMgr.LevelUnlockListNew.Value[i].type == 0) free_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - // else if (DataMgr.LevelUnlockListNew.Value[i].type == 1) ad_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - // else if (DataMgr.LevelUnlockListNew.Value[i].type == 2) special_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - // else if (DataMgr.LevelUnlockListNew.Value[i].type == 3) vip_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - // } - int Free_Alubum_0 = PlayerPrefs.GetInt("Free_Alubum_0", -1); - - int AD_Alubum = PlayerPrefs.GetInt("AD_Alubum", -1); - int Spec_Alubum = PlayerPrefs.GetInt("Spec_Alubum", -1); - int Vip_Alubum = PlayerPrefs.GetInt("Vip_Alubum", -1); - - if (DataMgr.LevelUnlockFree.Value < 0) - { - DataMgr.LevelUnlockFree.Value = Free_Alubum_0; - } - - if (DataMgr.LevelUnlockAD.Value < 0) - { - DataMgr.LevelUnlockAD.Value = AD_Alubum; - } - - if (DataMgr.LevelUnlockSpecial.Value < 0) - { - DataMgr.LevelUnlockSpecial.Value = Spec_Alubum; - } - - if (DataMgr.LevelUnlockVIP.Value < 0) - { - DataMgr.LevelUnlockVIP.Value = Vip_Alubum; - } - - - FreeImageLibrary free_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockFree.Value]; - ui.item_0.btn_unlock.pay_type.selectedIndex = 2; - ui.item_0_re.btn_unlock.visible = false; - TextureHelper.SetImgLoader(ui.item_0.com_pic.picture, free_ImageLibrary.Name, (s) => - { - if (free_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_0.com_pic.picture); - }, "LevelAlbums/", FolderNames.AlbumName); - - int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1); - FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetConfig()[Free_Alubum_1]; - TextureHelper.SetImgLoader(ui.item_0_re.com_pic.picture, free_ImageLibrary_re.Name, (s) => - { - if (free_ImageLibrary_re.State == 1) TextureHelper.SetImageBlur(ui.item_0_re.com_pic.picture); - }, "LevelAlbums/", FolderNames.AlbumName); - - ui.item_0.btn_unlock.SetClick(() => - { - PlayerPrefs.SetInt("unlock_refresh", 0); - DataMgr.LevelUnlockFree.Value = Free_Alubum_1; - ui.item_0.visible = false; - ui.item_0_re.visible = true; - }); - - if (PlayerPrefs.GetInt("unlock_refresh", 1) == 1) - { - ui.item_0.visible = true; - ui.item_0_re.visible = false; - } - else - { - ui.item_0.visible = false; - ui.item_0_re.visible = true; - } - - ui.item_0.btn_skip.SetClick(() => - { - SelectLevel(0, DataMgr.LevelUnlockFree.Value); - }); - ui.item_0_re.btn_skip.SetClick(() => - { - SelectLevel(0, DataMgr.LevelUnlockFree.Value); - }); - - - - ADImageLibrary ad_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockAD.Value]; - TextureHelper.SetImgLoader(ui.item_1.com_pic.picture, ad_ImageLibrary.Name, (s) => - { - if (ad_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_1.com_pic.picture); - }, "LevelAlbums/", FolderNames.AlbumName); - - ui.item_1.btn_unlock.pay_type.selectedIndex = 3; - - ui.item_1.btn_skip.SetClick(() => - { - Debug.Log("///////播放广告解锁"); - GameHelper.ShowVideoAd("UnlockLevel", isSuccess => - { - if (isSuccess) - { - SelectLevel(1, DataMgr.LevelUnlockAD.Value); - } - }); - }); - - - bool have_special = GameHelper.GetVipPrivilege(Subscription.SLVLevel.As()); - SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockSpecial.Value]; - TextureHelper.SetImgLoader(ui.item_2.com_pic.picture, special_ImageLibrary.Name, (s) => - { - if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture); - }, "LevelAlbums/", FolderNames.AlbumName); - if (have_special) - { - ui.item_2.btn_unlock.visible = false; - ui.item_2.type.selectedIndex = 0; - ui.item_2.btn_skip.SetClick(() => - { - SelectLevel(2, DataMgr.LevelUnlockSpecial.Value); - }); - } - else - { - ui.item_2.type.selectedIndex = 2; - ui.item_2.btn_unlock.visible = true; - ui.item_2.btn_skip.SetClick(() => - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open); - }); - - if (special_ImageLibrary.GoldCoins > 0) - { - ui.item_2.btn_unlock.pay_type.selectedIndex = 1; - ui.item_2.btn_unlock.title = special_ImageLibrary.GoldCoins.ToString(); - ui.item_2.btn_unlock.SetClick(() => - { - if (DataMgr.Coin.Value >= special_ImageLibrary.GoldCoins) - { - GameHelper.AddGold(-special_ImageLibrary.GoldCoins); - SelectLevel(2, DataMgr.LevelUnlockSpecial.Value); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.unlock_svip); - Debug.Log("///////金币解锁"); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - } - else - { - ui.item_2.btn_unlock.visible = false; - } - } - - bool have_vip = GameHelper.GetVipPrivilege(Subscription.VipLevel.As()); - VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig()[DataMgr.LevelUnlockVIP.Value]; - - TextureHelper.SetImgLoader(ui.item_3.com_pic.picture, vip_ImageLibrary.Name, (s) => - { - if (vip_ImageLibrary.State == 1 && !have_vip) TextureHelper.SetImageBlur(ui.item_3.com_pic.picture); - }, "LevelAlbums/", FolderNames.AlbumName); - if (have_vip) - { - ui.item_3.btn_unlock.visible = false; - ui.item_3.type.selectedIndex = 0; - ui.item_3.btn_skip.SetClick(() => - { - SelectLevel(3, DataMgr.LevelUnlockVIP.Value); - }); - } - else - { - ui.item_3.type.selectedIndex = 3; - ui.item_3.btn_unlock.visible = true; - ui.item_3.btn_skip.SetClick(() => - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.VipClubViewUI_Open); - }); - - if (vip_ImageLibrary.GoldCoins > 0) - { - ui.item_3.btn_unlock.pay_type.selectedIndex = 1; - ui.item_3.btn_unlock.title = vip_ImageLibrary.GoldCoins.ToString(); - ui.item_3.btn_unlock.SetClick(() => - { - if (DataMgr.Coin.Value >= vip_ImageLibrary.GoldCoins) - { - GameHelper.AddGold(-vip_ImageLibrary.GoldCoins); - SelectLevel(3, DataMgr.LevelUnlockVIP.Value); - Debug.Log("///////金币解锁"); - TrackKit.SendEvent(ADEventTrack.Coinsbuy, ADEventTrack.Property.unlock_vip); - } - else - { - GameHelper.ShowTips("no_enough_gold", true); - - uiCtrlDispatcher.Dispatch(UICtrlMsg.BuygoldUI_Open); - - } - }); - } - else - { - ui.item_3.btn_unlock.visible = false; - } - } - - - } - - public void SelectLevel(int type_, int id) - { - - DataMgr.LevelUnlockListNew.Value.Add(new Levelunlock() - { - level_ = GameHelper.GetLevel(), - type = type_, - config_index = id - }); - DataMgr.LevelUnlockListNew.Save(); - DataMgr.LevelUnlockFree.Value = -1; - DataMgr.LevelUnlockAD.Value = -1; - DataMgr.LevelUnlockSpecial.Value = -1; - DataMgr.LevelUnlockVIP.Value = -1; - - PlayerPrefs.SetInt("Free_Alubum_0", -1); - PlayerPrefs.SetInt("Free_Alubum_1", -1); - PlayerPrefs.SetInt("AD_Alubum", -1); - PlayerPrefs.SetInt("Spec_Alubum", -1); - PlayerPrefs.SetInt("Vip_Alubum", -1); - - PlayerPrefs.SetInt("unlock_refresh", 1); - GameDispatcher.Instance.Dispatch(GameMsg.UnlockLevelsuccess); - CtrlCloseUI(); - PreDownloadManager.StartDownloadAlbumsPicture(); - - if (isHallEnter) - { - GameHelper.gameType = 0; - GameDispatcher.Instance.Dispatch(GameMsg.OpenGame, false); - } else - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true); - } - - } - } - public class Levelunlock - { - public int level_; - public int type; - public int config_index; - } -} diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs.meta deleted file mode 100644 index 1abe1dd..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c812adcc84b3941f0824085dcbcd097d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs deleted file mode 100644 index 6b885d3..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockLevelNewUICtrl : BaseUICtrl - { - private UnlockLevelNewUI ui; - private UnlockLevelNewModel model; - - private uint openUIMsg = UICtrlMsg.UnlockLevelNewUI_Open; - private uint closeUIMsg = UICtrlMsg.UnlockLevelNewUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockLevelNewModel) as UnlockLevelNewModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new UnlockLevelNewUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs.meta deleted file mode 100644 index e00d4a6..0000000 --- a/Assets/Scripts/ModuleUI/UnlockLevelNew/UnlockLevelNewUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3818523df5c7a4015b8e005ff5e21c9c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockTips.meta b/Assets/Scripts/ModuleUI/UnlockTips.meta deleted file mode 100644 index f88508d..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ead42b698eb9e454a86289df3e09392e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs deleted file mode 100644 index abc2c54..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockTipsCtrl : BaseCtrl - { - public static UnlockTipsCtrl Instance { get; private set; } - - private UnlockTipsModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs.meta deleted file mode 100644 index cb381a8..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3552f0af8e16e194a8d327c687204be8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs deleted file mode 100644 index 57e5476..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockTipsModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs.meta b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs.meta deleted file mode 100644 index ca4ec6e..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 57115182c7c181f4bbad03d433b3337d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs deleted file mode 100644 index ab4b131..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs +++ /dev/null @@ -1,141 +0,0 @@ -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using SGModule.NetKit; - -namespace LoveLegend -{ - public class UnlockTipsUI : BaseUI - { - private UnlockTipsUICtrl ctrl; - private UnlockTipsModel model; - private FGUI.ZM_Toast_23.com_unclok_tips ui; - - public UnlockTipsUI(UnlockTipsUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.UnlockTipsUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "ZM_Toast_23"; - uiInfo.assetName = "com_unclok_tips"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel; - } - - protected override void OnClose() - { - } - - protected override void OnBind() - { - ui = baseUI as FGUI.ZM_Toast_23.com_unclok_tips; - } - - private int _type = 0; - protected override void OnOpenBefore(object args) - { - if (args == null) - { - return; - } - _type = (int)args; - string key = null; - if (_type == 1) key = "unlocked_secret"; - else if (_type == 2) key = "unlocked_live"; - else if (_type == 3) key = "unlocked_assitant"; - - ui.text_tips.text = Language.GetContent(key);; - - if (_type == 1) - { - if (DataMgr.IsUnlockSecret.Value == 0) - { - DataMgr.IsUnlockSecret.Value = 1; - } - } - else if (_type == 2) - { - if (DataMgr.IsUnlockLive.Value == 0) - { - DataMgr.IsUnlockLive.Value = 1; - } - } - else if (_type == 3) - { - if (DataMgr.IsUnlockChat.Value == 0) - { - DataMgr.IsUnlockChat.Value = 1; - } - } - string event_type = null; - if (_type == 1) event_type = ADEventTrack.Property.secret_albums_unclock; - else if (_type == 2) event_type = ADEventTrack.Property.live_unclock; - else if (_type == 3) event_type = ADEventTrack.Property.chat_unclock; - TrackKit.SendEvent(ADEventTrack.Special, event_type); - - InitView(); - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - } - - protected override void RemoveListener() - { - } - - #endregion - - //初始化页面逻辑 - private void InitView() - { - ui.btn_go.SetClick(OnClick); - ui.btn_close.SetClick(OnClick); - } - - private void OnClick() - { - if (_type == 1) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsUI_Open); - } - else if (_type == 2) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open); - } - else if (_type == 3) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open); - } - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Close); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs.meta b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs.meta deleted file mode 100644 index 57a158b..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a536c9b704d528c4fa9c1b68f7bf9576 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs deleted file mode 100644 index 890c48b..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class UnlockTipsUICtrl : BaseUICtrl - { - private UnlockTipsUI ui; - private UnlockTipsModel model; - - private uint openUIMsg = UICtrlMsg.UnlockTipsUI_Open; - private uint closeUIMsg = UICtrlMsg.UnlockTipsUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new UnlockTipsUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs.meta b/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs.meta deleted file mode 100644 index ef5f173..0000000 --- a/Assets/Scripts/ModuleUI/UnlockTips/UnlockTipsUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 22db9a06cf825574c8b14ee7d2622b2d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/VipClubView.meta b/Assets/Scripts/ModuleUI/VipClubView.meta deleted file mode 100644 index 1073ecd..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b222beb841b55794d843fccdec620cf9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs deleted file mode 100644 index 8dac3c8..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs +++ /dev/null @@ -1,25 +0,0 @@ - - -namespace LoveLegend -{ - public class VipClubViewCtrl : BaseCtrl - { - public static VipClubViewCtrl Instance { get; private set; } - - private VipClubViewModel model; - - #region 生命周期 - protected override void OnInit() - { - Instance = this; - //model = ModuleManager.Instance..GetModel(ModelConst.VipClubViewModel) as VipClubViewModel; - } - - protected override void OnDispose() - { - Instance = null; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs.meta b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs.meta deleted file mode 100644 index e0c0b1b..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewCtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 35aea012e7aaca54188ae41e818e6451 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs deleted file mode 100644 index 10c0853..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace LoveLegend -{ - public class VipClubViewModel : BaseModel - { - #region 生命周期 - - protected override void OnInit() - { - } - - protected override void OnDispose() - { - } - - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs.meta b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs.meta deleted file mode 100644 index 4799ddc..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewModel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1bca6106295c22d4ba4616b26dd8dd20 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs deleted file mode 100644 index df07ef3..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs +++ /dev/null @@ -1,393 +0,0 @@ -using System.Collections.Generic; -using FGUI.ZM_Common_01; -using UnityEngine; -using FairyGUI; -using FGUI.LG_Vip; -using SGModule.Common.Helper; -using SGModule.NetKit; -using SGModule.MarkdownKit; -using Newtonsoft.Json; -using SGModule.ApplePay; -using SGModule.Net; -using System.Linq; -using SGModule.Common.Extensions; - -public enum VipDay -{ - Week = 7, - Month = 30, - Year = 365 -} - -namespace LoveLegend -{ - public class VipClubViewUI : BaseUI - { - private readonly List _vipEquity1 = new(); - - private readonly List _vipEquity2 = new(); - - private List _benefitsList = new List(); - private VipClubViewUICtrl ctrl; - private VipClubViewModel model; - private FGUI.LG_Vip.com_vip ui; - - public VipClubViewUI(VipClubViewUICtrl ctrl) : base(ctrl) - { - uiName = UIConst.VipClubViewUI; - this.ctrl = ctrl; - } - - protected override void SetUIInfo(UIInfo uiInfo) - { - uiInfo.packageName = "LG_Vip"; - uiInfo.assetName = "com_vip"; - uiInfo.layerType = UILayerType.Popup; - uiInfo.isNeedOpenAnim = false; - uiInfo.isNeedCloseAnim = false; - uiInfo.isNeedUIMask = true; - } - - #region 生命周期 - - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.VipClubViewModel) as VipClubViewModel; - } - - protected override void OnClose() - { - if (_loader != null && !_loader.isDisposed && _loader.texture != null) - { - _loader.texture = null; - } - _loader = null; - } - - protected override void OnBind() - { - ui = baseUI as FGUI.LG_Vip.com_vip; - } - - private List vip_list = new List(); - //这个要做下标,或者控制器的索引,所以从0开始(Vip是1,2,3) - private int _level = 2; - - private GLoader _loader = new GLoader(); - protected override void OnOpenBefore(object args) - { - _loader = ui.bg_loader; - SetBenefits(); - if (Screen.safeArea.y != 0) - { - ui.group_.y += 68; - } - if (GameHelper.IsGiftSwitch()) - { - var fileName = GameHelper.GetBackgroundName(4); - TextureHelper.SetImgLoader(ui.bg_loader, fileName, null, "Background/", FolderNames.BackgroundName); - } - - TrackKit.SendEvent(ADEventTrack.Subscription, ADEventTrack.Property.vip_show_page); - - // 检查VIP是否过期 - GameHelper.CheckVipExpiration(); - - _level = GameHelper.GetVipLevel() > 0 ? GameHelper.GetVipLevel() - 1 : 2; - if (args != null) _level = (int)args; - - vip_list = ConfigSystem.GetConfig(); - InitView(); - // ui.text_terms.text= - // Debug.Log(MarkdownDataMgr.TryGetValue("user", out MarkdownData data)); - // Debug.Log(JsonConvert.SerializeObject(data));\ - - ui.btn_terns.SetClick(() => - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); - }); - ui.btn_pri.SetClick(() => - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); - }); - - if (GameHelper.IsGiftSwitch()) - { - int random_ = Random.Range(0, 100); - bool need_open = false; - if (random_ < GameHelper.GetCommonModel().VIPGuideRate) - { - if (GameHelper.GetVipLevel() > 0 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().VIPGuide) - { - - - // List unlocklist = new List(); - if ((GameHelper.GetCommonModel().Live == 1) && - (GameHelper.GetLevel() >= GameHelper.GetCommonModel().LivePreview) && - (GameHelper.GetLevel() < GameHelper.GetCommonModel().UnlockLive[1])) - { - // if (DataMgr.IsUnlockLive.Value < 0) //未解锁。 - // { - // unlocklist.Add(0); - need_open = true; - // } - } - - if ((GameHelper.GetCommonModel().Secret == 1) && - (GameHelper.GetLevel() >= GameHelper.GetCommonModel().SecretPreview) && - (GameHelper.GetLevel() < GameHelper.GetCommonModel().UnlockSecret[1])) - { - // if (DataMgr.IsUnlockSecret.Value < 0) //未解锁。 - // { - // unlocklist.Add(1); - need_open = true; - // } - } - // if ((GameHelper.GetCommonModel().Assitant == 1) && - // (GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)) - // { - // // if (DataMgr.IsUnlockSecret.Value < 0) //未解锁。 - // // { - // // unlocklist.Add(1); - // need_open = true; - // // } - // } - } - - if (need_open) uiCtrlDispatcher.Dispatch(UICtrlMsg.SubUnlockUI_Open); - else if (GameHelper.GetVipLevel() < 0 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().VIPGuide) - { - uiCtrlDispatcher.Dispatch(UICtrlMsg.SubUnlockUI_Open); - } - } - - } - } - - protected override void OnOpen(object args) - { - } - - protected override void OnHide() - { - } - - protected override void OnDisplay(object args) - { - } - - #endregion - - #region 消息 - - protected override void AddListener() - { - GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success); - GameDispatcher.Instance.AddListener(GameMsg.BuyVip, InitView); - } - - protected override void RemoveListener() - { - GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success); - GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, InitView); - } - - #endregion - - void pay_success(object str) - { - string type = (string)str; - string purch_number = ""; - - if (type.StartsWith("vip_club")) - { - InitView(); - } - } - - //初始化页面逻辑 - private void InitView(object a = null) - { - resetVipLevel(); - - ui.btn_week.text_price.text = GameHelper.getPrice((decimal)vip_list[0].DiscountPrice); - ui.btn_month.text_price.text = GameHelper.getPrice((decimal)vip_list[1].DiscountPrice); - ui.btn_year.text_price.text = GameHelper.getPrice((decimal)vip_list[2].DiscountPrice); - ui.btn_week.text_price_old.text = GameHelper.getPrice((decimal)vip_list[0].Price); - ui.btn_month.text_price_old.text = GameHelper.getPrice((decimal)vip_list[1].Price); - ui.btn_year.text_price_old.text = GameHelper.getPrice((decimal)vip_list[2].Price); - - ui.btn_close.SetClick(CtrlCloseUI); - ui.btn_restore.visible = !GameHelper.IsGiftSwitch(); - ui.btn_restore.SetClick(() => - { - ApplePayManager.Instance.AppleRestore((success, message) => - { - Debug.Log($"[barry] restore success message: {message}---- {JsonConvert.SerializeObject(message)}"); - if (success) - { - Debug.Log("[barry] restore success: " + success); - GameHelper.ShowTips("Restore_pur", true); - SaveData.GetSaveObject().have_slot = success; - DataMgr.VipLevel.Value = 3; - DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60; - - InitView(); - } - else - { - GameHelper.ShowTips("recoverable_tips", true); - } - }); - }); - - SetSubBtnState(_level, (int)VipDay.Year); - - ui.btn_week.SetClick(() => { SetSubBtnState(0, (int)VipDay.Week); }); - - ui.btn_month.SetClick(() => { SetSubBtnState(1, (int)VipDay.Month); }); - - ui.btn_year.SetClick(() => { SetSubBtnState(2, (int)VipDay.Year); }); - - - ui.btn_sub.SetClick(() => - { - if (ui.btn_sub.is_buy.selectedIndex == 1) return; - - string _type = "vip_club" + _level; - ApplePayClass maxPayData = new ApplePayClass - { - amount = (int)System.Math.Round(vip_list[_level].DiscountPrice * 100), - sku = PurchasingManager.GetPaySku(GetTypeByIndex(_level)), - currency = "USD", - shopName = _type - }; - MaxPayManager.Instance.Buy(maxPayData); - }); - - - } - - private void resetVipLevel(object obj = null) - { - var lv = GameHelper.GetVipLevel() > 0 ? GameHelper.GetVipLevel() : 0; - ui.vip_lv.selectedIndex = lv; - - - ui.vip_icon_loader.visible = lv > 0; - ui.vip_icon_loader.url = $"ui://LG_Common/vip_{lv}"; - } - - private PayType GetTypeByIndex(int index) - { - return index switch - { - 0 => PayType.weekly_subscription, - 1 => PayType.monthly_subscription, - 2 => PayType.yearly_subscription, - _ => PayType.weekly_subscription - }; - } - - private void SetSubBtnState(int index, int day) - { - Debug.Log($"lvele============{index}"); - - _level = index; - ui.btn_sub.title = Language.GetContentParams("vip_buy", new[] {GameHelper.getPrice((decimal)vip_list[index].DiscountPrice), day.ToString()}); - - ui.btn_week.img_select.visible = index == 0; - ui.btn_month.img_select.visible = index == 1; - ui.btn_year.img_select.visible = index == 2; - - ui.list.itemRenderer = ItemRenderer; - ui.list.numItems = GameHelper.IsGiftSwitch() ? _vipEquity2.Count : _vipEquity1.Count; - - //vip等级(1:7天 2:30天 3:365天) - var selectIndex = 0; - if (_level <= GameHelper.GetVipLevel() - 1) //比如:如果订阅了30天,则30天和7天的订阅按钮隐藏,显示已订阅 - { - selectIndex = 1; - } - - ui.btn_sub.is_buy.selectedIndex = selectIndex; - - } - - private void ItemRenderer(int index, GObject obj) - { - var item = (item_viplist)obj; - // if (index == Subscription.UnlockAssitant.As() - 1) - // { - // item.visible = false; - // return; - // } - if (GameHelper.IsGiftSwitch()) - { - var state = 1; - var equityText = GameHelper.getLanguageByKey(_vipEquity2[index]); - - if (vip_list[_level].SubscriptionBenefits2.Contains(index + 1)) - { - state = 0; - } - - item.title.text = equityText; - item.have.selectedIndex = state; - item.icon_loader.url = $"ui://LG_Vip/icon_{index + 1}"; - } - else - { - // if (vip_list[_level].SubscriptionBenefits1 != null && - // index < vip_list[_level].SubscriptionBenefits1.Length) - // { - // var benefits = vip_list[_level].SubscriptionBenefits1[index] - 1; - // 可以在这里使用 benefits 变量进行后续操作 - var state = 1; - if (vip_list[_level].SubscriptionBenefits1.Contains(_vipEquity1_id_list[index])) - { - state = 0; - } - if (vip_list[_level].SubscriptionBenefits1 != null && - index < vip_list[_level].SubscriptionBenefits1.Length) - { - var benefits = vip_list[_level].SubscriptionBenefits1[index] - 1; - item.title.text = GameHelper.getLanguageByKey(_benefitsList[benefits].key); - } - item.have.selectedIndex = state; - if (index == 0) item.icon_loader.url = $"ui://LG_Vip/icon_3"; - if (index == 1) item.icon_loader.url = $"ui://LG_Vip/icon_5"; - if (index == 2) item.icon_loader.url = $"ui://LG_Vip/icon_6"; - if (index == 3) item.icon_loader.url = $"ui://LG_Vip/icon_6"; - // item.icon_loader.visible = false; - // } - } - } - private void SetBenefits() - { - _benefitsList = ConfigSystem.GetConfig(); - Debug.Log(JsonConvert.SerializeObject(_benefitsList)); - const int vipTypeStandard = 1; - - if (_benefitsList == null) return; - - foreach (var vip in _benefitsList.Where(vip => vip != null)) - { - if (vip.Type == vipTypeStandard) - { - _vipEquity2.Add(vip.key); - } - else - { - _vipEquity1.Add(vip.key); - Debug.Log(JsonConvert.SerializeObject(vip)); - _vipEquity1_id_list.Add(vip.id); - } - } - Debug.Log(JsonConvert.SerializeObject(_vipEquity1_id_list)); - - } - private List _vipEquity1_id_list = new List(); - //Vip权益内容列表 - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs.meta b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs.meta deleted file mode 100644 index 671b8cc..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 44e604fdb0b3e8141ab7f8a06026857e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs deleted file mode 100644 index ba64ed4..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs +++ /dev/null @@ -1,73 +0,0 @@ - - -namespace LoveLegend -{ - public class VipClubViewUICtrl : BaseUICtrl - { - private VipClubViewUI ui; - private VipClubViewModel model; - - private uint openUIMsg = UICtrlMsg.VipClubViewUI_Open; - private uint closeUIMsg = UICtrlMsg.VipClubViewUI_Close; - - #region 生命周期 - protected override void OnInit() - { - //model = ModuleManager.Instance.GetModel(ModelConst.VipClubViewModel) as VipClubViewModel; - } - - protected override void OnDispose() - { - } - - public override void OpenUI(object args = null) - { - if (ui == null) - { - ui = new VipClubViewUI(this); - ui.Open(args); - } - } - - public override void CloseUI(object args = null) - { - if (ui != null && !ui.isClose) - { - ui.Close(); - } - ui = null; - } - #endregion - - #region 消息 - public override uint GetOpenUIMsg(string uiName) - { - return openUIMsg; - } - public override uint GetCloseUIMsg(string uiName) - { - return closeUIMsg; - } - - protected override void AddListener() - { - uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); - uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); - } - protected override void RemoveListener() - { - uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); - uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); - } - - protected override void AddServerListener() - { - - } - protected override void RemoveServerListener() - { - - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs.meta b/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs.meta deleted file mode 100644 index 27dd94d..0000000 --- a/Assets/Scripts/ModuleUI/VipClubView/VipClubViewUICtrl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f70baf7d213912a46b362ce56182c03d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/System/Network/ConfigSystem.cs b/Assets/Scripts/System/Network/ConfigSystem.cs index b2a1119..eed5b6b 100644 --- a/Assets/Scripts/System/Network/ConfigSystem.cs +++ b/Assets/Scripts/System/Network/ConfigSystem.cs @@ -58,7 +58,6 @@ namespace LoveLegend { TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadFinish); //加载完成打点 TextureHelper.imgUrl = LoginKit.Instance.LoginModel.CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/"; - LiveVideoManager.videoBaseUrl = LoginKit.Instance.LoginModel.CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/"; // ParseGameConfig(); UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close); diff --git a/Assets/Scripts/ToolKit/PreDownloadManager.cs b/Assets/Scripts/ToolKit/PreDownloadManager.cs deleted file mode 100644 index 4de438f..0000000 --- a/Assets/Scripts/ToolKit/PreDownloadManager.cs +++ /dev/null @@ -1,382 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Newtonsoft.Json; -using UnityEngine; - -namespace LoveLegend -{ - public static class PreDownloadManager - { - #region Live - - public static void InitializeLiveData() - { - var liveConfigList = ConfigSystem.GetConfig(); - - Debug.Log($"[预下载视频 数据初始化]-0-----{DataMgr.LiveDataDic.Value.Count}"); - - var newData = new Dictionary(); - - for (var i = 0; i < liveConfigList.Count; i++) - { - var oldData = GetLiveDataByIndex(liveConfigList[i], i); - - if (oldData.progress > 0) newData[i] = oldData; - } - - Debug.Log($"[预下载视频 数据初始化]--1----- {newData.Count}"); - DataMgr.LiveDataDic.Value = newData; - } - - public static LiveData GetLiveDataByIndex(Live liveConfig, int i) - { - DataMgr.LiveDataDic.Value.TryGetValue(i, out var oldData); - - oldData ??= new LiveData - { - progress = liveConfig.Progress, - AD_num = 0, - Singleprogress = (100 - liveConfig.Progress) / liveConfig.AD - }; - - if (oldData.progress < liveConfig.Progress) oldData.progress = liveConfig.Progress; - - return oldData; - } - - // 最大同时下载数量 - private const int MaxConcurrentDownloads = 1; - - public static void StartDownload() - { - CrazyAsyKit.StartCoroutine(DownloadVideosCoroutine()); - } - - private static IEnumerator DownloadVideosCoroutine() - { - var liveConfigList = ConfigSystem.GetConfig(); - var liveDic = DataMgr.LiveDataDic.Value; - - var downloadNameList = new List(); - - // 先加入已有进度的视频 - foreach (var kvp in liveDic) - { - var index = kvp.Key; - var data = kvp.Value; - - if (data.progress > 0 && index < liveConfigList.Count) downloadNameList.Add(liveConfigList[index].Name); - } - - Debug.Log($"[init down video]---1---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // 添加不在downloadNameList中的项,最多添加6个 - var addedCount = 0; - for (var i = 0; i < liveConfigList.Count && addedCount < 6; i++) - if (!downloadNameList.Contains(liveConfigList[i].Name)) - { - downloadNameList.Add(liveConfigList[i].Name); - addedCount++; - } - - Debug.Log($"[init down video]---2---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // 当前正在下载的协程数量 - var runningCount = 0; - var currentIndex = 0; - - if (downloadNameList.Count > 0) - { - var name = downloadNameList[currentIndex]; - - var localPath = Path.Combine(TextureHelper.getResPath(), FolderNames.VideoName, name + ".enc"); - Debug.Log($"[预下载 视频 路径]-------localPath===={localPath}"); - - if (!File.Exists(localPath)) - { - Debug.Log("[开始预下载 视频 ]---------------"); - runningCount++; - CrazyAsyKit.StartCoroutine(DownloadSingleVideoCoroutine(name, () => { runningCount--; })); - } - } - - // 等待下一帧再检查 - yield return null; - Debug.Log("[init down video]---All downloads finished---"); - } - - - private static IEnumerator DownloadSingleVideoCoroutine(string name, Action onComplete) - { - var isDone = false; - - LiveVideoManager.Instance.GetVideoLocalPath(name, tex => - { - Debug.Log($"[init down video]----------------{name}"); - isDone = true; - }, false); - - // 等待下载完成 - while (!isDone) yield return null; - - onComplete?.Invoke(); - } - - #endregion - - - #region Picture - - public static void StartDownloadSecretPicture() - { - var liveConfigList = ConfigSystem.GetConfig(); - var liveList = DataMgr.SecretUnlockList.Value; - - var downloadNameList = new List(); - - // 先加入所有可用的图片 - for (var i = 0; i < liveList.Count; i++) - if (liveConfigList[i] != null && !downloadNameList.Contains(liveConfigList[i].Name)) - downloadNameList.Add(liveConfigList[i].Name); - - Debug.Log( - $"[init down picture Secret]---1---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // 添加不在downloadNameList中的项,最多添加6个 - var addedCount = 0; - for (var i = 0; i < liveConfigList.Count && addedCount < 6; i++) - if (!downloadNameList.Contains(liveConfigList[i].Name)) - { - downloadNameList.Add(liveConfigList[i].Name); - addedCount++; - } - - Debug.Log( - $"[init down picture Secret]---2---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - foreach (var name in downloadNameList) - { - var localPath = Path.Combine(TextureHelper.getResPath(), FolderNames.SecretName, name + ".jpg"); - Debug.Log($"[预下载 Secret 路径]-------localPath===={localPath}"); - if (!File.Exists(localPath)) - { - Debug.Log("[开始预下载 Secret ]---------------"); - TextureHelper.SetImgLoader(null, name, - s => - { - Debug.Log($"[init down Secret picture]----------------{name}"); - }, "SecretAlbums/", FolderNames.SecretName, false); - } - } - } - - public static void StartDownloadAlbumsPicture() - { - int Free_Alubum_0 = PlayerPrefs.GetInt("Free_Alubum_0", -1); - int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1); - int AD_Alubum = PlayerPrefs.GetInt("AD_Alubum", -1); - int Spec_Alubum = PlayerPrefs.GetInt("Spec_Alubum", -1); - int Vip_Alubum = PlayerPrefs.GetInt("Vip_Alubum", -1); - - if (Free_Alubum_0 >= 0) return; - - var FreeImageLibrary_ = ConfigSystem.GetConfig(); - var ADImageLibrary_ = ConfigSystem.GetConfig(); - var SpecialImageLibrary_ = ConfigSystem.GetConfig(); - var VIPImageLibrary_ = ConfigSystem.GetConfig(); - - List free_level_list = new List(); - List ad_level_list = new List(); - List special_level_list = new List(); - List vip_level_list = new List(); - for (int i = 0; i < DataMgr.LevelUnlockListNew.Value.Count; i++) - { - if (DataMgr.LevelUnlockListNew.Value[i].type == 0) free_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - else if (DataMgr.LevelUnlockListNew.Value[i].type == 1) ad_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - else if (DataMgr.LevelUnlockListNew.Value[i].type == 2) special_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - else if (DataMgr.LevelUnlockListNew.Value[i].type == 3) vip_level_list.Add(DataMgr.LevelUnlockListNew.Value[i].config_index); - } - - - if (Free_Alubum_0 < 0) - { - HashSet levelIds = new HashSet(free_level_list); - List filtered = ConfigSystem.GetConfig().Where(x => !levelIds.Contains(x.id)).ToList(); - if (filtered.Count > 0) - { - Free_Alubum_0 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id; - } - else - { - Free_Alubum_0 = ConfigSystem.GetConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig().Count)].id; - } - free_level_list.Add(Free_Alubum_0); - Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,"); - } - if (Free_Alubum_1 < 0) - { - HashSet levelIds = new HashSet(free_level_list); - List filtered = ConfigSystem.GetConfig().Where(x => !levelIds.Contains(x.id)).ToList(); - if (filtered.Count > 0) - { - Free_Alubum_1 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id; - } - else - { - Free_Alubum_1 = ConfigSystem.GetConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig().Count)].id; - } - Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,"); - } - - - if (AD_Alubum < 0) - { - HashSet levelIds = new HashSet(ad_level_list); - List filtered = ConfigSystem.GetConfig().Where(x => !levelIds.Contains(x.id)).ToList(); - if (filtered.Count > 0) - { - AD_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id; - } - else - { - AD_Alubum = ConfigSystem.GetConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig().Count)].id; - } - Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,"); - } - - if (Spec_Alubum < 0) - { - HashSet levelIds = new HashSet(special_level_list); - List filtered = ConfigSystem.GetConfig().Where(x => !levelIds.Contains(x.id)).ToList(); - if (filtered.Count > 0) - { - Spec_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id; - } - else - { - Spec_Alubum = ConfigSystem.GetConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig().Count)].id; - } - Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,"); - } - - if (Vip_Alubum < 0) - { - HashSet levelIds = new HashSet(vip_level_list); - List filtered = ConfigSystem.GetConfig().Where(x => !levelIds.Contains(x.id)).ToList(); - if (filtered.Count > 0) - { - Vip_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id; - } - else - { - Vip_Alubum = ConfigSystem.GetConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig().Count)].id; - } - Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,"); - } - PlayerPrefs.SetInt("Free_Alubum_0", Free_Alubum_0); - PlayerPrefs.SetInt("Free_Alubum_1", Free_Alubum_1); - PlayerPrefs.SetInt("AD_Alubum", AD_Alubum); - PlayerPrefs.SetInt("Spec_Alubum", Spec_Alubum); - PlayerPrefs.SetInt("Vip_Alubum", Vip_Alubum); - - var downloadNameList = new List - { - FreeImageLibrary_[Free_Alubum_0].Name, - FreeImageLibrary_[Free_Alubum_1].Name, - ADImageLibrary_[AD_Alubum].Name, - SpecialImageLibrary_[Spec_Alubum].Name, - VIPImageLibrary_[Vip_Alubum].Name - }; - - Debug.Log( - $"[init down picture Album]---1---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // 添加不在downloadNameList中的项,最多添加12个 - // var addedCount = 0; - // for (var i = 0; i < liveConfigList.Count && addedCount < 6; i++) - // if (!downloadNameList.Contains(liveConfigList[i].Name)) - // { - // downloadNameList.Add(liveConfigList[i].Name); - // addedCount++; - // } - - Debug.Log( - $"[init down picture Album]---2---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // int centerIndex = GameHelper.GetLevel(); - // int totalCount = downloadNameList.Count; - - // // 计算起始索引和实际要取的数量 - // int rangeStart = Math.Max(0, centerIndex - 5); - // int rangeEnd = Math.Min(totalCount, centerIndex + 5); - // int rangeCount = rangeEnd - rangeStart; - - // // 获取范围内元素并反转 - // var segment = downloadNameList.GetRange(rangeStart, rangeCount); - // segment.Reverse(); - - // // 移除原始位置的元素 - // downloadNameList.RemoveRange(rangeStart, rangeCount); - - // // 插入反转后的元素到最前面 - // downloadNameList.InsertRange(0, segment); - - - Debug.Log( - $"[init down picture Album]---3---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - foreach (var name in downloadNameList) - { - var localPath = Path.Combine(TextureHelper.getResPath(), FolderNames.AlbumName, name + ".jpg"); - Debug.Log($"[预下载 Albums 路径]-------localPath===={localPath}"); - if (!File.Exists(localPath)) - { - Debug.Log($"[开始预下载 Albums ]--------------name-{name}"); - TextureHelper.SetImgLoader(null, name, - s => - { - Debug.Log($"[init down Album picture]----------------{name}"); - }, "LevelAlbums/", FolderNames.AlbumName, false); - } - } - } - - public static void StartDownloadLivePicture() - { - var liveConfigList = ConfigSystem.GetConfig(); - var liveList = DataMgr.SecretUnlockList.Value; - - var downloadNameList = new List(); - - // 先加入所有可用的图片 - for (var i = 0; i < liveConfigList.Count; i++) - if (liveConfigList[i] != null && !downloadNameList.Contains(liveConfigList[i].Name)) - downloadNameList.Add(liveConfigList[i].Name); - - Debug.Log( - $"[init down picture LiveCover]---1---nameList----------{JsonConvert.SerializeObject(downloadNameList)}"); - - // 添加不在downloadNameList中的项,最多添加6个 - - foreach (var name in downloadNameList) - { - var localPath = Path.Combine(TextureHelper.getResPath(), FolderNames.VideoCoversName, name + "_cover" + ".jpg"); - Debug.Log($"[预下载 Secret 路径]-------localPath===={localPath}"); - if (!File.Exists(localPath)) - { - Debug.Log("[开始预下载 Secret ]---------------"); - TextureHelper.SetImgLoader(null, name + "_cover", - s => - { - Debug.Log($"[init down VideoCovers picture]----------------{name}"); - }, "LiveAlbums/", FolderNames.VideoCoversName, false); - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ToolKit/PreDownloadManager.cs.meta b/Assets/Scripts/ToolKit/PreDownloadManager.cs.meta deleted file mode 100644 index bceb4c8..0000000 --- a/Assets/Scripts/ToolKit/PreDownloadManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f0a11e2b27329409282f78c585416391 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/VideoLoadScheduler.cs b/Assets/Scripts/VideoLoadScheduler.cs deleted file mode 100644 index e4bdfd6..0000000 --- a/Assets/Scripts/VideoLoadScheduler.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using FairyGUI; -using LoveLegend; -using UnityEngine; -using UnityEngine.Video; - -internal class VideoLoadTask -{ - public Coroutine coroutine; - public string fileName; - public bool isCancelled; - public GLoader loader; - public Action onComplete; - public bool play; - public VideoPlayer player; - - // loader 绑定的任务 ID - public string taskId; -} - -internal class VideoLoadScheduler -{ - private const int MaxConcurrent = 1; // 同时加载任务数 - private static readonly Queue taskQueue = new(); - private static readonly List runningTasks = new(); - - /// - /// 入队视频加载任务 - /// - public static void EnqueueLoad(VideoPlayer player, string fileName, GLoader loader, Action onComplete, - bool play = true) - { - // 🔑 检查重复任务 - var isDuplicate = taskQueue.Any(t => t.fileName == fileName && t.loader == loader && !t.isCancelled); - - if (isDuplicate) - { - Debug.LogWarning($"[VideoScheduler] 跳过重复任务: {fileName}, loader={loader.name}"); - return; - } - - // 生成唯一 taskId,绑定到 loader - var taskId = Guid.NewGuid().ToString(); - loader.SetData(taskId); - - var task = new VideoLoadTask - { - fileName = fileName, - loader = loader, - onComplete = onComplete, - play = play, - player = player, - taskId = taskId - }; - - taskQueue.Enqueue(task); - Debug.Log($"[VideoScheduler] 入队视频: {fileName}, taskId={taskId}, queueCount={taskQueue.Count}"); - - TryStartNext(); - } - - - /// - /// 尝试启动队列中的任务 - /// - private static void TryStartNext() - { - Debug.Log($"[VideoScheduler] TryStartNext 调用,queue={taskQueue.Count}, running={runningTasks.Count}"); - - while (taskQueue.Count > 0 && runningTasks.Count < MaxConcurrent) - { - var task = taskQueue.Dequeue(); - - if (task.isCancelled) - { - Debug.Log($"[VideoScheduler] 跳过已取消任务: {task.fileName}, taskId={task.taskId}"); - continue; - } - - Debug.Log($"[VideoScheduler] 启动任务: {task.fileName}, taskId={task.taskId}"); - var co = CrazyAsyKit.StartCoroutine(LoadVideoToPlayer(task.player, task)); - task.coroutine = co; - runningTasks.Add(task); - } - } - - - /// - /// 协程加载视频 - /// - private static IEnumerator LoadVideoToPlayer(VideoPlayer player, VideoLoadTask task) - { - Debug.Log($"[VideoScheduler] 开始加载视频: {task.fileName}, taskId={task.taskId}"); - - var callbackTriggered = false; - - yield return LiveVideoManager.LoadVideoToPlayer(player, task.fileName, task.loader, vp => - { - callbackTriggered = true; - Debug.Log( - $"[VideoScheduler] 回调触发: {task.fileName}, loader taskId={task.loader.GetData()}, current taskId={task.taskId}"); - - if (task.loader.GetData() != task.taskId) - { - Debug.Log($"[VideoScheduler] 任务被覆盖,丢弃: {task.fileName}, taskId={task.taskId}"); - } - else if (task.isCancelled) - { - Debug.Log($"[VideoScheduler] 任务被取消: {task.fileName}, taskId={task.taskId}"); - if (vp != null) vp.Stop(); - task.onComplete?.Invoke(null); - } - else - { - Debug.Log($"[VideoScheduler] 任务完成: {task.fileName}, taskId={task.taskId}"); - task.onComplete?.Invoke(vp); - } - - runningTasks.Remove(task); - Debug.Log($"[VideoScheduler] 移除任务,剩余: {runningTasks.Count}"); - TryStartNext(); - }, task.play); - - // 🔴 兜底:防止 TextureHelper 出错导致回调不触发 - if (!callbackTriggered) - { - Debug.LogWarning($"[VideoScheduler] ⚠️ 没有回调就结束了,强制移除任务: {task.fileName}, taskId={task.taskId}"); - runningTasks.Remove(task); - TryStartNext(); - } - } - - /// - /// 取消某个任务 - /// - public static void CancelTask(VideoLoadTask task) - { - if (task == null) return; - task.isCancelled = true; - if (task.coroutine != null) - CrazyAsyKit.StopCoroutine(task.coroutine); - - if (runningTasks.Remove(task)) - Debug.Log($"[VideoScheduler] 取消并移除任务: {task.fileName}, taskId={task.taskId}"); - - // TryStartNext(); - } - - /// - /// 清理所有任务 - /// - public static void ClearAll() - { - // 倒序遍历,避免索引错乱 - for (int i = runningTasks.Count - 1; i >= 0; i--) - { - CancelTask(runningTasks[i]); - } - - taskQueue.Clear(); - runningTasks.Clear(); - Debug.Log("[VideoScheduler] 所有任务已清理"); - } -} - -/// -/// 扩展方法:GLoader 绑定当前任务 ID -/// -public static class GLoaderExtensions -{ - private static readonly Dictionary loaderTaskMap = new(); - - public static void SetData(this GLoader loader, string taskId) - { - loaderTaskMap[loader] = taskId; - } - - public static string GetData(this GLoader loader) - { - if (loaderTaskMap.TryGetValue(loader, out var taskId)) - return taskId; - return null; - } -} \ No newline at end of file diff --git a/Assets/Scripts/VideoLoadScheduler.cs.meta b/Assets/Scripts/VideoLoadScheduler.cs.meta deleted file mode 100644 index fba91b0..0000000 --- a/Assets/Scripts/VideoLoadScheduler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 103b600da4b91441aa379eb5659ae518 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: