diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index 6d22dee7..965adc66 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -374,6 +374,23 @@ 239D0FAD2BFCB88D002977CE /* XPRoomAnchorRankEnterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FA52BFCB88D002977CE /* XPRoomAnchorRankEnterView.m */; }; 239D0FB02BFD8C4D002977CE /* MSRoomSetingBackdropVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FAF2BFD8C4D002977CE /* MSRoomSetingBackdropVC.m */; }; 239D0FB32BFD8C67002977CE /* MSRoomSetingBackdropCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FB22BFD8C67002977CE /* MSRoomSetingBackdropCell.m */; }; + 239D0FC92C045F92002977CE /* MSRoomGameVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FC62C045F92002977CE /* MSRoomGameVC.m */; }; + 239D0FCC2C045FC9002977CE /* MSTabbarRoomGameVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FCB2C045FC9002977CE /* MSTabbarRoomGameVC.m */; }; + 239D0FCF2C046048002977CE /* MSTabbarRoomGameHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FCE2C046048002977CE /* MSTabbarRoomGameHeadView.m */; }; + 239D0FD22C046EAD002977CE /* MSTabbarRoomGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FD12C046EAD002977CE /* MSTabbarRoomGameView.m */; }; + 239D0FD52C0475E6002977CE /* MSTabbarBeginGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FD42C0475E6002977CE /* MSTabbarBeginGameView.m */; }; + 239D0FD82C047DD8002977CE /* MSTabbarRoomGameModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FD72C047DD8002977CE /* MSTabbarRoomGameModel.m */; }; + 239D0FDB2C047F24002977CE /* MSTabbarRoomGameCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FDA2C047F24002977CE /* MSTabbarRoomGameCell.m */; }; + 239D0FE12C04850A002977CE /* MSRoomGameHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FE02C04850A002977CE /* MSRoomGameHeadView.m */; }; + 239D0FE42C048700002977CE /* MSRoomGameHeadAvatarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FE32C048700002977CE /* MSRoomGameHeadAvatarView.m */; }; + 239D0FE72C049D61002977CE /* MSRoomGameMsgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FE62C049D61002977CE /* MSRoomGameMsgView.m */; }; + 239D0FEA2C04A9EE002977CE /* MSRoomGameSendMsgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FE92C04A9EE002977CE /* MSRoomGameSendMsgView.m */; }; + 239D0FED2C057362002977CE /* Api+MSRoomGameApi.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FEC2C057362002977CE /* Api+MSRoomGameApi.m */; }; + 239D0FF02C057470002977CE /* MSRoomGamePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FEF2C057470002977CE /* MSRoomGamePresenter.m */; }; + 239D0FF42C05B9D2002977CE /* MSRoomGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FF32C05B9D2002977CE /* MSRoomGameView.m */; }; + 239D0FF72C05BD2A002977CE /* MSRoomGameVictoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FF62C05BD2A002977CE /* MSRoomGameVictoryView.m */; }; + 239D0FFA2C05BE9B002977CE /* MSRoomGameVictoryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FF92C05BE9B002977CE /* MSRoomGameVictoryCell.m */; }; + 239D0FFD2C05D086002977CE /* MSRoomGameQuitGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239D0FFC2C05D086002977CE /* MSRoomGameQuitGameView.m */; }; 23A03F2D2B4408CD0094227A /* pi_room_lucky_gift.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23A03F2C2B4408CD0094227A /* pi_room_lucky_gift.svga */; }; 23A439742AA1CF7C002E6039 /* XPNewHomeHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */; }; 23A7FB692BDDEDFA00411860 /* MSRoomGameWebVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23A7FB682BDDEDFA00411860 /* MSRoomGameWebVC.m */; }; @@ -2262,6 +2279,41 @@ 239D0FAF2BFD8C4D002977CE /* MSRoomSetingBackdropVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomSetingBackdropVC.m; sourceTree = ""; }; 239D0FB12BFD8C67002977CE /* MSRoomSetingBackdropCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomSetingBackdropCell.h; sourceTree = ""; }; 239D0FB22BFD8C67002977CE /* MSRoomSetingBackdropCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomSetingBackdropCell.m; sourceTree = ""; }; + 239D0FC52C045F92002977CE /* MSRoomGameVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSRoomGameVC.h; sourceTree = ""; }; + 239D0FC62C045F92002977CE /* MSRoomGameVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameVC.m; sourceTree = ""; }; + 239D0FCA2C045FC9002977CE /* MSTabbarRoomGameVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarRoomGameVC.h; sourceTree = ""; }; + 239D0FCB2C045FC9002977CE /* MSTabbarRoomGameVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarRoomGameVC.m; sourceTree = ""; }; + 239D0FCD2C046048002977CE /* MSTabbarRoomGameHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarRoomGameHeadView.h; sourceTree = ""; }; + 239D0FCE2C046048002977CE /* MSTabbarRoomGameHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarRoomGameHeadView.m; sourceTree = ""; }; + 239D0FD02C046EAD002977CE /* MSTabbarRoomGameView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarRoomGameView.h; sourceTree = ""; }; + 239D0FD12C046EAD002977CE /* MSTabbarRoomGameView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarRoomGameView.m; sourceTree = ""; }; + 239D0FD32C0475E6002977CE /* MSTabbarBeginGameView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarBeginGameView.h; sourceTree = ""; }; + 239D0FD42C0475E6002977CE /* MSTabbarBeginGameView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarBeginGameView.m; sourceTree = ""; }; + 239D0FD62C047DD8002977CE /* MSTabbarRoomGameModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarRoomGameModel.h; sourceTree = ""; }; + 239D0FD72C047DD8002977CE /* MSTabbarRoomGameModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarRoomGameModel.m; sourceTree = ""; }; + 239D0FD92C047F24002977CE /* MSTabbarRoomGameCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSTabbarRoomGameCell.h; sourceTree = ""; }; + 239D0FDA2C047F24002977CE /* MSTabbarRoomGameCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSTabbarRoomGameCell.m; sourceTree = ""; }; + 239D0FDF2C04850A002977CE /* MSRoomGameHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameHeadView.h; sourceTree = ""; }; + 239D0FE02C04850A002977CE /* MSRoomGameHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameHeadView.m; sourceTree = ""; }; + 239D0FE22C048700002977CE /* MSRoomGameHeadAvatarView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameHeadAvatarView.h; sourceTree = ""; }; + 239D0FE32C048700002977CE /* MSRoomGameHeadAvatarView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameHeadAvatarView.m; sourceTree = ""; }; + 239D0FE52C049D61002977CE /* MSRoomGameMsgView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameMsgView.h; sourceTree = ""; }; + 239D0FE62C049D61002977CE /* MSRoomGameMsgView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameMsgView.m; sourceTree = ""; }; + 239D0FE82C04A9EE002977CE /* MSRoomGameSendMsgView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameSendMsgView.h; sourceTree = ""; }; + 239D0FE92C04A9EE002977CE /* MSRoomGameSendMsgView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameSendMsgView.m; sourceTree = ""; }; + 239D0FEB2C057362002977CE /* Api+MSRoomGameApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+MSRoomGameApi.h"; sourceTree = ""; }; + 239D0FEC2C057362002977CE /* Api+MSRoomGameApi.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+MSRoomGameApi.m"; sourceTree = ""; }; + 239D0FEE2C057470002977CE /* MSRoomGamePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGamePresenter.h; sourceTree = ""; }; + 239D0FEF2C057470002977CE /* MSRoomGamePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGamePresenter.m; sourceTree = ""; }; + 239D0FF12C057D2E002977CE /* MSRoomGameProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameProtocol.h; sourceTree = ""; }; + 239D0FF22C05B9D2002977CE /* MSRoomGameView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameView.h; sourceTree = ""; }; + 239D0FF32C05B9D2002977CE /* MSRoomGameView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameView.m; sourceTree = ""; }; + 239D0FF52C05BD2A002977CE /* MSRoomGameVictoryView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameVictoryView.h; sourceTree = ""; }; + 239D0FF62C05BD2A002977CE /* MSRoomGameVictoryView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameVictoryView.m; sourceTree = ""; }; + 239D0FF82C05BE9B002977CE /* MSRoomGameVictoryCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameVictoryCell.h; sourceTree = ""; }; + 239D0FF92C05BE9B002977CE /* MSRoomGameVictoryCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameVictoryCell.m; sourceTree = ""; }; + 239D0FFB2C05D086002977CE /* MSRoomGameQuitGameView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameQuitGameView.h; sourceTree = ""; }; + 239D0FFC2C05D086002977CE /* MSRoomGameQuitGameView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameQuitGameView.m; sourceTree = ""; }; 23A03F2C2B4408CD0094227A /* pi_room_lucky_gift.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_room_lucky_gift.svga; sourceTree = ""; }; 23A439722AA1CF7C002E6039 /* XPNewHomeHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewHomeHeadView.h; sourceTree = ""; }; 23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNewHomeHeadView.m; sourceTree = ""; }; @@ -5992,6 +6044,104 @@ path = MSRoomOnLineView; sourceTree = ""; }; + 239D0FBF2C045F92002977CE /* Api */ = { + isa = PBXGroup; + children = ( + 239D0FEB2C057362002977CE /* Api+MSRoomGameApi.h */, + 239D0FEC2C057362002977CE /* Api+MSRoomGameApi.m */, + ); + path = Api; + sourceTree = ""; + }; + 239D0FC02C045F92002977CE /* Model */ = { + isa = PBXGroup; + children = ( + 239D0FD62C047DD8002977CE /* MSTabbarRoomGameModel.h */, + 239D0FD72C047DD8002977CE /* MSTabbarRoomGameModel.m */, + ); + path = Model; + sourceTree = ""; + }; + 239D0FC12C045F92002977CE /* Presenter */ = { + isa = PBXGroup; + children = ( + 239D0FEE2C057470002977CE /* MSRoomGamePresenter.h */, + 239D0FEF2C057470002977CE /* MSRoomGamePresenter.m */, + ); + path = Presenter; + sourceTree = ""; + }; + 239D0FC22C045F92002977CE /* Protocol */ = { + isa = PBXGroup; + children = ( + 239D0FF12C057D2E002977CE /* MSRoomGameProtocol.h */, + ); + path = Protocol; + sourceTree = ""; + }; + 239D0FC32C045F92002977CE /* Cell */ = { + isa = PBXGroup; + children = ( + 239D0FD92C047F24002977CE /* MSTabbarRoomGameCell.h */, + 239D0FDA2C047F24002977CE /* MSTabbarRoomGameCell.m */, + 239D0FF82C05BE9B002977CE /* MSRoomGameVictoryCell.h */, + 239D0FF92C05BE9B002977CE /* MSRoomGameVictoryCell.m */, + ); + path = Cell; + sourceTree = ""; + }; + 239D0FC42C045F92002977CE /* SubView */ = { + isa = PBXGroup; + children = ( + 239D0FCD2C046048002977CE /* MSTabbarRoomGameHeadView.h */, + 239D0FCE2C046048002977CE /* MSTabbarRoomGameHeadView.m */, + 239D0FD02C046EAD002977CE /* MSTabbarRoomGameView.h */, + 239D0FD12C046EAD002977CE /* MSTabbarRoomGameView.m */, + 239D0FD32C0475E6002977CE /* MSTabbarBeginGameView.h */, + 239D0FD42C0475E6002977CE /* MSTabbarBeginGameView.m */, + 239D0FDF2C04850A002977CE /* MSRoomGameHeadView.h */, + 239D0FE02C04850A002977CE /* MSRoomGameHeadView.m */, + 239D0FE22C048700002977CE /* MSRoomGameHeadAvatarView.h */, + 239D0FE32C048700002977CE /* MSRoomGameHeadAvatarView.m */, + 239D0FE52C049D61002977CE /* MSRoomGameMsgView.h */, + 239D0FE62C049D61002977CE /* MSRoomGameMsgView.m */, + 239D0FE82C04A9EE002977CE /* MSRoomGameSendMsgView.h */, + 239D0FE92C04A9EE002977CE /* MSRoomGameSendMsgView.m */, + 239D0FF22C05B9D2002977CE /* MSRoomGameView.h */, + 239D0FF32C05B9D2002977CE /* MSRoomGameView.m */, + 239D0FF52C05BD2A002977CE /* MSRoomGameVictoryView.h */, + 239D0FF62C05BD2A002977CE /* MSRoomGameVictoryView.m */, + 239D0FFB2C05D086002977CE /* MSRoomGameQuitGameView.h */, + 239D0FFC2C05D086002977CE /* MSRoomGameQuitGameView.m */, + ); + path = SubView; + sourceTree = ""; + }; + 239D0FC72C045F92002977CE /* View */ = { + isa = PBXGroup; + children = ( + 239D0FC32C045F92002977CE /* Cell */, + 239D0FC42C045F92002977CE /* SubView */, + 239D0FC52C045F92002977CE /* MSRoomGameVC.h */, + 239D0FC62C045F92002977CE /* MSRoomGameVC.m */, + 239D0FCA2C045FC9002977CE /* MSTabbarRoomGameVC.h */, + 239D0FCB2C045FC9002977CE /* MSTabbarRoomGameVC.m */, + ); + path = View; + sourceTree = ""; + }; + 239D0FC82C045F92002977CE /* RoomGame */ = { + isa = PBXGroup; + children = ( + 239D0FBF2C045F92002977CE /* Api */, + 239D0FC02C045F92002977CE /* Model */, + 239D0FC12C045F92002977CE /* Presenter */, + 239D0FC22C045F92002977CE /* Protocol */, + 239D0FC72C045F92002977CE /* View */, + ); + path = RoomGame; + sourceTree = ""; + }; 23CEFC082AFB8FC100576D89 /* sdkContent */ = { isa = PBXGroup; children = ( @@ -9978,6 +10128,7 @@ 180806FA2729A354001FD836 /* ThemeColor+Room.m */, E82325EA274E2D52003A3332 /* UserCard */, E8A3538628FE5C5B0014A784 /* WishGift */, + 239D0FC82C045F92002977CE /* RoomGame */, E866B6E32759F96F009B002A /* XPMiniRoomView.h */, E866B6E42759F96F009B002A /* XPMiniRoomView.m */, E816C11327608A7500C84014 /* XPRoomMiniManager.h */, @@ -11377,6 +11528,7 @@ E80EC80B28ACD84000D133C5 /* QInputBarViewConfiguration.m in Sources */, 2331C1772A5EB71000E1D940 /* XPNobleCenterListViewController.m in Sources */, E880B39E278BD49E00A83B0D /* XPAcrossRoomPKViewController.m in Sources */, + 239D0FE12C04850A002977CE /* MSRoomGameHeadView.m in Sources */, 2331C1AA2A60F32D00E1D940 /* XPCandyTreePresenter.m in Sources */, E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */, E8AB632728AE13210023B0D2 /* XPMonentsTopicListPresenter.m in Sources */, @@ -11412,6 +11564,7 @@ E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */, E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */, 1427218E29A75F6F00C7C423 /* HTTPMessage.m in Sources */, + 239D0FE72C049D61002977CE /* MSRoomGameMsgView.m in Sources */, E80DE40A277568D300BE5BCB /* ThemeColor+FirstRecharge.m in Sources */, 238B37BE2AC55A2C00BFC9D5 /* XPTreasureFairyBottomView.m in Sources */, 9B42869828C1E06B009034D2 /* XPRedPacketModel.m in Sources */, @@ -11457,8 +11610,10 @@ 23E9EAB22A84C9DE00B792F2 /* XPMineUserInfoTagViewCell.m in Sources */, 9B42869C28C1FD3D009034D2 /* XPOpenRedPacketCell.m in Sources */, 23D321D22ADD0EBC006B259C /* PIRoomPhotoAlbumItemPresenter.m in Sources */, + 239D0FD22C046EAD002977CE /* MSTabbarRoomGameView.m in Sources */, 9BFE992E288142FD009DA429 /* RoomClassifyModel.m in Sources */, 2331C1B72A60F32D00E1D940 /* XPCandyRankContainerView.m in Sources */, + 239D0FF72C05BD2A002977CE /* MSRoomGameVictoryView.m in Sources */, 23194DCE2AD14BF000649F51 /* ContextFilterLogFormatter.m in Sources */, E8A88D3027E85EEA00CA8837 /* RoomPKInfoModel.m in Sources */, E85E7B022A4EB0D200B6D00A /* XPSuperAdminManagerRoomPresenter.m in Sources */, @@ -11523,8 +11678,10 @@ E8A3540A28FEC0510014A784 /* XPWishGiftListView.m in Sources */, 238B37BF2AC55A2C00BFC9D5 /* XPTreasureFairyStoreResultView.m in Sources */, E88863CF278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m in Sources */, + 239D0FFD2C05D086002977CE /* MSRoomGameQuitGameView.m in Sources */, 23E9EA8E2A84BC9000B792F2 /* XPMineUserInfoHeaderTagCell.m in Sources */, E87DF5082A42CE79009C1185 /* XPInRoomRecordPresenter.m in Sources */, + 239D0FD82C047DD8002977CE /* MSTabbarRoomGameModel.m in Sources */, 189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */, 238B37DE2AC55A2C00BFC9D5 /* Api+TreasureFairy.m in Sources */, E85E7B062A4EB0D200B6D00A /* XPGuildSearchPresenter.m in Sources */, @@ -11538,6 +11695,7 @@ E8A30BF328534B17003B4873 /* Api+FindNew.m in Sources */, E852D7412863249F001465ED /* XPMonentsReplyTableViewCell.m in Sources */, 237B94BC2A984DA7007853E3 /* XPTrumpetPresenter.m in Sources */, + 239D0FFA2C05BE9B002977CE /* MSRoomGameVictoryCell.m in Sources */, 23E9EA942A84BE4800B792F2 /* XPGiftUserDataViewController.m in Sources */, 2331C16D2A5EB71000E1D940 /* XPNobleSettingNavView.m in Sources */, E8AEAED6271412EC0017FCE0 /* XPRoomViewController.m in Sources */, @@ -11724,6 +11882,7 @@ E85E7B372A4EB0D300B6D00A /* XPMineGuildListCell.m in Sources */, E85E7B502A4EB0D300B6D00A /* XPMineGuildListVC.m in Sources */, E824546126F5F4E400BE8163 /* XPMineResetPayPwdViewController.m in Sources */, + 239D0FCF2C046048002977CE /* MSTabbarRoomGameHeadView.m in Sources */, 235714772BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.m in Sources */, 2357146B2BEA0110004C81D6 /* MSSessionPublicChatHallTopModel.m in Sources */, E81D58822720082A003063FE /* MicroWaveView.m in Sources */, @@ -11878,6 +12037,7 @@ 23FE47DB2BB4171C00F09D23 /* PINobleCenterListView.m in Sources */, E84A2E932A527EC800D6AF8A /* XPIncomeRecordPresent.m in Sources */, 236B2E432AA07D06003967A8 /* NSString+RW.m in Sources */, + 239D0FC92C045F92002977CE /* MSRoomGameVC.m in Sources */, E85E7B172A4EB0D200B6D00A /* ClanMemberDetailInfoModel.m in Sources */, 9B044DA0282D32F700DE4859 /* MicroInviteExtModel.m in Sources */, E8D7D74B282BA1EC0007D7BD /* XPMonentsTableViewCell.m in Sources */, @@ -11889,6 +12049,7 @@ E8778AF82988F4E200CF139B /* XPSessionSayHelloHeaderView.m in Sources */, E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */, E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */, + 239D0FDB2C047F24002977CE /* MSTabbarRoomGameCell.m in Sources */, 239D0FB02BFD8C4D002977CE /* MSRoomSetingBackdropVC.m in Sources */, 235714982BEDF54E004C81D6 /* MsRoomMessageMainView.m in Sources */, 9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */, @@ -12060,6 +12221,7 @@ E866B6E52759F96F009B002A /* XPMiniRoomView.m in Sources */, 23E9EAB52A84CB2700B792F2 /* XPMineUserInfoTagEmptyView.m in Sources */, 2331C1AE2A60F32D00E1D940 /* CandyTreeInfoModel.m in Sources */, + 239D0FEA2C04A9EE002977CE /* MSRoomGameSendMsgView.m in Sources */, E818E34B286ECABF005EDF68 /* XPMonentsPublishPresenter.m in Sources */, E85E7B462A4EB0D300B6D00A /* XPGuildEmptyCollectionViewCell.m in Sources */, 9B7B605B27BB53060070BB72 /* XPAnchorAudienceUpMicView.m in Sources */, @@ -12103,6 +12265,7 @@ 23E45C052AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m in Sources */, 9B42869228C1AED4009034D2 /* XPReceiveRedPacketModel.m in Sources */, E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */, + 239D0FE42C048700002977CE /* MSRoomGameHeadAvatarView.m in Sources */, 9BFB101F2897CC4300B3985E /* XPAnchorCardView.m in Sources */, 1427218F29A75F6F00C7C423 /* HTTPConnection.m in Sources */, 9BAA5FED277A1BBE007453F3 /* XPPrivacyViewController.m in Sources */, @@ -12114,6 +12277,7 @@ 23194DD52AD292F200649F51 /* PIPageControl.m in Sources */, 23E9EA9E2A84C42B00B792F2 /* SGYProgressView.m in Sources */, E87E91552796B6DE00A7B3F2 /* XPRoomInviteUserViewController.m in Sources */, + 239D0FCC2C045FC9002977CE /* MSTabbarRoomGameVC.m in Sources */, E880B3B5278C1FE400A83B0D /* XPAcrossRoomPKPresenter.m in Sources */, 23CEFC612AFB8FC100576D89 /* RealViewNetWorkCell_0.m in Sources */, 186A534626FC6ED900D67B2C /* TTPopup.m in Sources */, @@ -12155,6 +12319,7 @@ 186A534D26FC6ED900D67B2C /* TTActionSheetView.m in Sources */, E81060E529876FF300B772F0 /* MessageAudioModel.m in Sources */, 23CEFC642AFB8FC100576D89 /* BSkObject.m in Sources */, + 239D0FF42C05B9D2002977CE /* MSRoomGameView.m in Sources */, E83DB481274649FB00D8CBD1 /* XPGiftBannerUserInfoModel.m in Sources */, 9B3A1DF4280571000058E2DD /* XPAnchorPKInviteView.m in Sources */, 2331C1BD2A60F69E00E1D940 /* UILabel+Utils.m in Sources */, @@ -12188,6 +12353,7 @@ 238B37BB2AC55A2C00BFC9D5 /* XPTreasureFairySummonView.m in Sources */, 236B2E4B2AA07D06003967A8 /* XPLittleGameRoomListView.m in Sources */, 9BE01AD428927E9C00B50299 /* XPDressUpShopListViewController.m in Sources */, + 239D0FED2C057362002977CE /* Api+MSRoomGameApi.m in Sources */, 9B41D36E282649230048C588 /* XPWeekStarRankUserModel.m in Sources */, E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */, E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */, @@ -12353,6 +12519,7 @@ E81060DF29876D3A00B772F0 /* MessageTimeModel.m in Sources */, E81A65422835120200F55894 /* XPMonentsInteractivePresenter.m in Sources */, 238B37A82AC55A2C00BFC9D5 /* TreasureFairyTrialsRecordModel.m in Sources */, + 239D0FD52C0475E6002977CE /* MSTabbarBeginGameView.m in Sources */, E80EC80C28ACD84000D133C5 /* UITextView+QEmotion.m in Sources */, E8664EE627E482EF000171BA /* RoomPKTeamModel.m in Sources */, 9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */, @@ -12392,6 +12559,7 @@ E8383697298A598D00112E1C /* MessageTipsModel.m in Sources */, E801274727E3241700BAC3F2 /* Api+RoomPK.m in Sources */, E87DF4F82A42CCAB009C1185 /* XPHomeSearchRelateView.m in Sources */, + 239D0FF02C057470002977CE /* MSRoomGamePresenter.m in Sources */, E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */, E85E7BAC2A4EC99300B6D00A /* XPMineGiveDiamondDetailsView.m in Sources */, 238B37B42AC55A2C00BFC9D5 /* XPTreasureFairyNewSummonCell.m in Sources */, diff --git a/YuMi/Assets.xcassets/RoomGame/Contents.json b/YuMi/Assets.xcassets/RoomGame/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/Contents.json new file mode 100644 index 00000000..d6934680 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_add_coin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_add_coin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@2x.png new file mode 100644 index 00000000..02753ca2 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@3x.png new file mode 100644 index 00000000..892ca4c8 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/ms_room_game_add_coin@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/Contents.json new file mode 100644 index 00000000..25606d02 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_avatar_border@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_avatar_border@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@2x.png new file mode 100644 index 00000000..f54aa3e4 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@3x.png new file mode 100644 index 00000000..1751b8ce Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_avatar_border.imageset/ms_room_game_avatar_border@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/Contents.json new file mode 100644 index 00000000..fa13b9e9 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_begin_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_begin_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@2x.png new file mode 100644 index 00000000..c7774f46 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@3x.png new file mode 100644 index 00000000..7c5a7f2d Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_bg.imageset/ms_room_game_begin_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/Contents.json new file mode 100644 index 00000000..a3704b95 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_begin_btn_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_begin_btn_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@2x.png new file mode 100644 index 00000000..c684c554 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@3x.png new file mode 100644 index 00000000..b816e50f Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_btn_bg.imageset/ms_room_game_begin_btn_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/Contents.json new file mode 100644 index 00000000..b352e86e --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_begin_coin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_begin_coin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@2x.png new file mode 100644 index 00000000..fccce650 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@3x.png new file mode 100644 index 00000000..73326dba Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_coin.imageset/ms_room_game_begin_coin@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/Contents.json new file mode 100644 index 00000000..9a88fe74 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_begin_rule_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_begin_rule_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@2x.png new file mode 100644 index 00000000..502c004f Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@3x.png new file mode 100644 index 00000000..9c12f8bb Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_begin_rule_icon.imageset/ms_room_game_begin_rule_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/Contents.json new file mode 100644 index 00000000..5b4ed221 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_classic_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_classic_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@2x.png new file mode 100644 index 00000000..4a1fff75 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@3x.png new file mode 100644 index 00000000..2b42090c Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_classic_icon.imageset/ms_room_game_classic_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/Contents.json new file mode 100644 index 00000000..00ef9fab --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_coin_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_coin_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@2x.png new file mode 100644 index 00000000..fccce650 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@3x.png new file mode 100644 index 00000000..73326dba Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_coin_icon.imageset/ms_room_game_coin_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/Contents.json new file mode 100644 index 00000000..7b72a87d --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_quick_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_quick_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@2x.png new file mode 100644 index 00000000..e8a070c4 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@3x.png new file mode 100644 index 00000000..54a005d9 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_quick_icon.imageset/ms_room_game_quick_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/Contents.json new file mode 100644 index 00000000..bf3c5c26 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_rank_coin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_rank_coin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@2x.png new file mode 100644 index 00000000..f293248d Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@3x.png new file mode 100644 index 00000000..f7cba5bf Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/ms_room_game_rank_coin@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/Contents.json new file mode 100644 index 00000000..e160c736 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_sub_begin_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_sub_begin_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@2x.png new file mode 100644 index 00000000..fe8724a1 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@3x.png new file mode 100644 index 00000000..b14ea549 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_sub_begin_bg.imageset/ms_room_game_sub_begin_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/Contents.json new file mode 100644 index 00000000..0ab20d87 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_top_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_top_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@2x.png new file mode 100644 index 00000000..75b722c0 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@3x.png new file mode 100644 index 00000000..1489a3f5 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/ms_room_game_top_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/Contents.json new file mode 100644 index 00000000..ec1ef512 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_back_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_back_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@2x.png new file mode 100644 index 00000000..fa1c52af Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@3x.png new file mode 100644 index 00000000..8c696dea Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_back_icon.imageset/ms_room_game_underwa_back_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/Contents.json new file mode 100644 index 00000000..567fb8bf --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@2x.png new file mode 100644 index 00000000..265fb8ee Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@3x.png new file mode 100644 index 00000000..0c43510a Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_bg.imageset/ms_room_game_underwa_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/Contents.json new file mode 100644 index 00000000..87cc2e17 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_border@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_border@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@2x.png new file mode 100644 index 00000000..5a01925c Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@3x.png new file mode 100644 index 00000000..1991f6d6 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_border.imageset/ms_room_game_underwa_border@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/Contents.json new file mode 100644 index 00000000..066eaf40 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_coin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_coin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@2x.png new file mode 100644 index 00000000..7dc9871a Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@3x.png new file mode 100644 index 00000000..9be1f0f3 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin.imageset/ms_room_game_underwa_coin@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/Contents.json new file mode 100644 index 00000000..1b13ecfb --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_coin_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_coin_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@2x.png new file mode 100644 index 00000000..2cde8b6e Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@3x.png new file mode 100644 index 00000000..753c1f28 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_coin_bg.imageset/ms_room_game_underwa_coin_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/Contents.json new file mode 100644 index 00000000..cf405e63 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_pk_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_pk_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@2x.png new file mode 100644 index 00000000..41536705 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@3x.png new file mode 100644 index 00000000..70b6ab5b Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_pk_bg.imageset/ms_room_game_underwa_pk_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/Contents.json new file mode 100644 index 00000000..0f4a220d --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_underwa_top_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_underwa_top_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@2x.png new file mode 100644 index 00000000..000e7da9 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@3x.png new file mode 100644 index 00000000..d01a29a0 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_underwa_top_icon.imageset/ms_room_game_underwa_top_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/Contents.json new file mode 100644 index 00000000..cde124b0 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_bg_first@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_bg_first@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@2x.png new file mode 100644 index 00000000..51550ee5 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@3x.png new file mode 100644 index 00000000..299dd3dc Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_first.imageset/ms_room_game_victory_bg_first@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/Contents.json new file mode 100644 index 00000000..3029c8d6 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_bg_second@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_bg_second@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@2x.png new file mode 100644 index 00000000..5cad5306 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@3x.png new file mode 100644 index 00000000..4562e79b Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_bg_second.imageset/ms_room_game_victory_bg_second@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/Contents.json new file mode 100644 index 00000000..d17546b7 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_border_first@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_border_first@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@2x.png new file mode 100644 index 00000000..2de814ea Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@3x.png new file mode 100644 index 00000000..0d830ebb Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_first.imageset/ms_room_game_victory_border_first@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/Contents.json new file mode 100644 index 00000000..34cbe399 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_border_second@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_border_second@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@2x.png new file mode 100644 index 00000000..f227eeca Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@3x.png new file mode 100644 index 00000000..c6a10ea7 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_border_second.imageset/ms_room_game_victory_border_second@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/Contents.json new file mode 100644 index 00000000..2f7e97d6 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_close_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_close_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@2x.png new file mode 100644 index 00000000..b32781a3 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@3x.png new file mode 100644 index 00000000..62523c8f Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_close_bg.imageset/ms_room_game_victory_close_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/Contents.json new file mode 100644 index 00000000..455018c0 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_coin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_coin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@2x.png new file mode 100644 index 00000000..bf4cadd3 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@3x.png new file mode 100644 index 00000000..ca659fa5 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin.imageset/ms_room_game_victory_coin@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/Contents.json new file mode 100644 index 00000000..1624632b --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_coin_bg_first@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_coin_bg_first@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@2x.png new file mode 100644 index 00000000..5448cc36 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@3x.png new file mode 100644 index 00000000..56524f3a Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_first.imageset/ms_room_game_victory_coin_bg_first@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/Contents.json new file mode 100644 index 00000000..95a78812 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_coin_bg_second@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_coin_bg_second@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@2x.png new file mode 100644 index 00000000..5bd8fb05 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@3x.png new file mode 100644 index 00000000..f9028efb Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_coin_bg_second.imageset/ms_room_game_victory_coin_bg_second@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/Contents.json new file mode 100644 index 00000000..fb4cdeb9 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_rank_first@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_rank_first@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@2x.png new file mode 100644 index 00000000..a58945a3 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@3x.png new file mode 100644 index 00000000..72b72932 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_first.imageset/ms_room_game_victory_rank_first@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/Contents.json new file mode 100644 index 00000000..6ee5a4c3 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_rank_second@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_rank_second@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@2x.png new file mode 100644 index 00000000..e540207f Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@3x.png new file mode 100644 index 00000000..365a5948 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_rank_second.imageset/ms_room_game_victory_rank_second@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/Contents.json new file mode 100644 index 00000000..6627ba64 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_restart_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_restart_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@2x.png new file mode 100644 index 00000000..bcc9cb54 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@3x.png new file mode 100644 index 00000000..1c1b4feb Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_restart_bg.imageset/ms_room_game_victory_restart_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/Contents.json new file mode 100644 index 00000000..89544768 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_top_fail_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_top_fail_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@2x.png new file mode 100644 index 00000000..897480ba Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@3x.png new file mode 100644 index 00000000..cc38f154 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_fail_icon.imageset/ms_room_game_victory_top_fail_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/Contents.json b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/Contents.json new file mode 100644 index 00000000..f8429187 --- /dev/null +++ b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ms_room_game_victory_top_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ms_room_game_victory_top_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@2x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@2x.png new file mode 100644 index 00000000..bdda8500 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@3x.png b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@3x.png new file mode 100644 index 00000000..8a71adc1 Binary files /dev/null and b/YuMi/Assets.xcassets/RoomGame/ms_room_game_victory_top_icon.imageset/ms_room_game_victory_top_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@2x.png b/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@2x.png index 84220f87..d35e52ee 100644 Binary files a/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@2x.png and b/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@2x.png differ diff --git a/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@3x.png b/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@3x.png index e651f252..604dc360 100644 Binary files a/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@3x.png and b/YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/tab_gameHome_game_normal@3x.png differ diff --git a/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@2x.png b/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@2x.png index 54f505c4..5d3bffab 100644 Binary files a/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@2x.png and b/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@2x.png differ diff --git a/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@3x.png b/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@3x.png index d644bc75..a243ada0 100644 Binary files a/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@3x.png and b/YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/tab_gameHome_game_selected@3x.png differ diff --git a/YuMi/Global/YUMIHtmlUrl.h b/YuMi/Global/YUMIHtmlUrl.h index a53a276b..26e47123 100644 --- a/YuMi/Global/YUMIHtmlUrl.h +++ b/YuMi/Global/YUMIHtmlUrl.h @@ -99,6 +99,8 @@ typedef NS_ENUM(NSUInteger, URLType) { ///夺宝记录 kTreasureRecordURL, kChannelUrl, + ///LUDO排行榜路径 + kLUDOUrl, }; NSString * const URLWithType(URLType type); diff --git a/YuMi/Global/YUMIHtmlUrl.m b/YuMi/Global/YUMIHtmlUrl.m index d3f5bdbc..e204b886 100644 --- a/YuMi/Global/YUMIHtmlUrl.m +++ b/YuMi/Global/YUMIHtmlUrl.m @@ -22,6 +22,7 @@ NSString * const URLWithType(URLType type) { @(kGoldEarningsRecord) : @"modules/myincome/index.html#/GoldLog",///金币收益记录 @(kCandyTreeRuleURL) : @"modules/rule/newWishingWellRule.html",///糖果树规则 modules/rank/index.html#/wishingWellRule @(kChannelUrl) : @"modules/%@/index.html?channelType=%@&deviceId=%@", + @(kLUDOUrl) : @"molistar/modules/gameRank/index.html"///LUDO排行榜路径 }; NSString * newUrl = [newDic objectForKey:@(type)]; if(newUrl != nil){ diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m b/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m index 24cb669b..adff7802 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m @@ -40,7 +40,6 @@ ///View #import "XPRoomMessageTableViewCell.h" #import "XPRoomMessageHeaderView.h" -#import "View/XPRoomMessageHeaderView.h" #import "PIRoomMessagePhotoAlbumCell.h" #import "PIRoomMessageUnlockPhotoAlbumView.h" #import "PIRoomPhotoAlbumItemModel.h" diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.h b/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.h new file mode 100644 index 00000000..d2aa38d8 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.h @@ -0,0 +1,19 @@ +// +// Api+MSRoomGameApi.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "Api.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface Api (MSRoomGameApi) +///等到房间游戏配置 ++(void)getRoomGameHomeConfig:(HttpRequestHelperCompletion)completion; +///开始匹配游戏 ++(void)startMatchGame:(HttpRequestHelperCompletion)completion roomId:(NSString *)roomId mgId:(NSString *)mgId gameMode:(NSString *)gameMode; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.m b/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.m new file mode 100644 index 00000000..c2133871 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Api/Api+MSRoomGameApi.m @@ -0,0 +1,19 @@ +// +// Api+MSRoomGameApi.m +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "Api+MSRoomGameApi.h" + +@implementation Api (MSRoomGameApi) +///等到房间游戏配置 ++(void)getRoomGameHomeConfig:(HttpRequestHelperCompletion)completion{ + [self makeRequest:@"miniGame/nav/config" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil]; +} +///开始匹配游戏 ++(void)startMatchGame:(HttpRequestHelperCompletion)completion roomId:(NSString *)roomId mgId:(NSString *)mgId gameMode:(NSString *)gameMode{ + [self makeRequest:@"miniGame/nav/start" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,roomId,mgId,gameMode,nil]; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.h b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.h new file mode 100644 index 00000000..208e0022 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.h @@ -0,0 +1,30 @@ +// +// MSTabbarRoomGameModel.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "PIBaseModel.h" +@class MSTabbarRoomGameItemModel; +NS_ASSUME_NONNULL_BEGIN + +@interface MSTabbarRoomGameModel : PIBaseModel +@property(nonatomic,copy) NSArray *gameModes; +@property(nonatomic,assign) BOOL isShow ; +@property(nonatomic,copy) NSString *mgId; +@property(nonatomic,copy) NSString *mgIdStr; +@property(nonatomic,assign) int micNum; +@property(nonatomic,copy) NSString *name; +@property(nonatomic,copy) NSString *pic; +@property(nonatomic,copy) NSString *remark; +@end +@interface MSTabbarRoomGameItemModel : PIBaseModel +@property(nonatomic,copy) NSString * gameMode; +@property(nonatomic,copy) NSString *modeIcon; +@property(nonatomic,copy) NSArray *scores; +@property(nonatomic,copy) NSString *modeName; +@property(nonatomic,copy) NSString *ruleUrl; +@property(nonatomic,copy) NSString *ticket; +@end +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.m b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.m new file mode 100644 index 00000000..6d011d23 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSTabbarRoomGameModel.m @@ -0,0 +1,18 @@ +// +// MSTabbarRoomGameModel.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarRoomGameModel.h" + +@implementation MSTabbarRoomGameModel ++ (NSDictionary *)objectClassInArray{ + return @{@"gameModes":MSTabbarRoomGameItemModel.class}; +} +@end + +@implementation MSTabbarRoomGameItemModel + +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.h b/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.h new file mode 100644 index 00000000..59697b39 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.h @@ -0,0 +1,19 @@ +// +// MSRoomGamePresenter.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "BaseMvpPresenter.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MSRoomGamePresenter : BaseMvpPresenter +///获取游戏配置 +-(void)getRoomGameConfig; +///开始匹配游戏 +-(void)startMatchGameWithroomId:(NSString *)roomId mgId:(NSString *)mgId gameMode:(NSString *)gameMode; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.m b/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.m new file mode 100644 index 00000000..0066d2e1 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Presenter/MSRoomGamePresenter.m @@ -0,0 +1,67 @@ +// +// MSRoomGamePresenter.m +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "MSRoomGamePresenter.h" +#import "Api+MSRoomGameApi.h" +#import "Api.h" +#import +#import "UserInfoModel.h" +#import "WalletInfoModel.h" +#import "MSTabbarRoomGameModel.h" +#import "MSRoomGameProtocol.h" +@implementation MSRoomGamePresenter +-(void)getRoomGameConfig{ + + + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + RACSubject* user = [RACSubject subject]; + RACSubject* coin = [RACSubject subject]; + RACSubject* game = [RACSubject subject]; + + [[RACSignal combineLatest:@[user,coin,game] reduce:^id(UserInfoModel* userModel,WalletInfoModel *coinModel,MSTabbarRoomGameModel *gameModel){ + [[self getView]getRoomGameConfigSuccessWithUser:userModel coinModel:coinModel gameModel:gameModel]; + return nil; + }] subscribeError:^(NSError * _Nullable error) { + + }]; + + [Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + UserInfoModel * infoModel = [UserInfoModel modelWithJSON:data.data]; + + [user sendNext:infoModel]; + [user sendCompleted]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [user sendError:nil]; + } showLoading:NO errorToast:NO] uid:uid]; + + + [Api getUserWalletInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data]; + [coin sendNext:model]; + [coin sendCompleted]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [coin sendError:nil]; + }] uid:uid ticket:ticket]; + + [Api getRoomGameHomeConfig:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + MSTabbarRoomGameModel *model = [MSTabbarRoomGameModel modelWithJSON:data.data]; + [game sendNext:model]; + [game sendCompleted]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [game sendError:nil]; + }]]; +} +///开始匹配游戏 +-(void)startMatchGameWithroomId:(NSString *)roomId mgId:(NSString *)mgId gameMode:(NSString *)gameMode{ + [Api startMatchGame:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + [[self getView]startMatchGameSuccess]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + + } showLoading:YES errorToast:YES] roomId:roomId mgId:mgId gameMode:gameMode]; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Protocol/MSRoomGameProtocol.h b/YuMi/Modules/YMRoom/View/RoomGame/Protocol/MSRoomGameProtocol.h new file mode 100644 index 00000000..04980e5b --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/Protocol/MSRoomGameProtocol.h @@ -0,0 +1,19 @@ +// +// MSRoomGameProtocol.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import +#import "UserInfoModel.h" +#import "WalletInfoModel.h" +#import "MSTabbarRoomGameModel.h" +NS_ASSUME_NONNULL_BEGIN + +@protocol MSRoomGameProtocol +-(void)getRoomGameConfigSuccessWithUser:(UserInfoModel *)user coinModel:(WalletInfoModel *)coinModel gameModel:(MSTabbarRoomGameModel *)gameModel; +-(void)startMatchGameSuccess; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.h b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.h new file mode 100644 index 00000000..58b0ab7e --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.h @@ -0,0 +1,16 @@ +// +// MSRoomGameVictoryCell.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSRoomGameVictoryCell : UITableViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.m b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.m new file mode 100644 index 00000000..97a2db87 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSRoomGameVictoryCell.m @@ -0,0 +1,153 @@ +// +// MSRoomGameVictoryCell.m +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "MSRoomGameVictoryCell.h" +@interface MSRoomGameVictoryCell() +@property(nonatomic,strong) UIImageView *bgImageView; +@property(nonatomic,strong) UIImageView *rankView; +@property(nonatomic,strong) NetImageView *avatarView; +@property(nonatomic,strong) UIImageView *borderImageView; +@property(nonatomic,strong) UILabel *nameView; +@property(nonatomic,strong) UIImageView *bgCoinView; +@property(nonatomic,strong) UIImageView *coinView; +@property(nonatomic,strong) UILabel *coinNumView; +@end +@implementation MSRoomGameVictoryCell +-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} + +-(void)installUI{ + self.contentView.backgroundColor = [UIColor clearColor]; + self.backgroundColor = [UIColor clearColor]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.bgImageView]; + [self.bgImageView addSubview:self.rankView]; + [self.bgImageView addSubview:self.avatarView]; + [self.bgImageView addSubview:self.borderImageView]; + [self.bgImageView addSubview:self.nameView]; + [self.bgImageView addSubview:self.bgCoinView]; + [self.bgImageView addSubview:self.coinView]; + [self.bgCoinView addSubview:self.coinNumView]; +} +-(void)installConstraints{ + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.top.equalTo(self.contentView); + make.height.mas_equalTo(kGetScaleWidth(60)); + }]; + [self.rankView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(7)); + make.width.mas_equalTo(kGetScaleWidth(44)); + make.height.mas_equalTo(kGetScaleWidth(43)); + make.centerY.equalTo(self.bgImageView); + }]; + [self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(49)); + make.leading.mas_equalTo(kGetScaleWidth(53)); + make.centerY.equalTo(self.bgImageView); + }]; + [self.borderImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.avatarView); + }]; + [self.bgCoinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-kGetScaleWidth(9)); + make.width.mas_equalTo(kGetScaleWidth(65)); + make.height.mas_equalTo(kGetScaleWidth(24)); + make.centerY.equalTo(self.bgImageView); + }]; + [self.coinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(25)); + make.trailing.mas_equalTo(-kGetScaleWidth(58)); + make.centerY.equalTo(self.bgImageView); + }]; + [self.coinNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-kGetScaleWidth(12)); + make.centerY.equalTo(self.bgCoinView); + + }]; + [self.nameView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(self.bgImageView); + make.leading.mas_equalTo(kGetScaleWidth(106)); + make.trailing.equalTo(self.coinView.mas_leading).mas_offset(-kGetScaleWidth(5)); + }]; +} +#pragma mark - 懒加载 +- (UIImageView *)bgImageView{ + if(!_bgImageView){ + _bgImageView = [UIImageView new]; + _bgImageView.image = kImage(@"ms_room_game_victory_bg_second"); + } + return _bgImageView; +} +- (UIImageView *)rankView{ + if(!_rankView){ + _rankView = [UIImageView new]; + _rankView.image = kImage(@"ms_room_game_victory_rank_second"); + } + return _rankView; +} +- (NetImageView *)avatarView{ + if(!_avatarView){ + NetImageConfig *config = [[NetImageConfig alloc]init]; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _avatarView = [[NetImageView alloc]initWithConfig:config]; + _avatarView.layer.cornerRadius = kGetScaleWidth(49)/2; + _avatarView.layer.masksToBounds = YES; + } + return _avatarView; +} +- (UIImageView *)borderImageView{ + if(!_borderImageView){ + _borderImageView = [UIImageView new]; + _borderImageView.image = kImage(@"ms_room_game_victory_border_second"); + } + return _borderImageView; +} +- (UILabel *)nameView{ + if(!_nameView){ + _nameView = [UILabel labelInitWithText:@"王者明" font:kFontBold(14) textColor:[UIColor whiteColor]]; + } + return _nameView; +} +- (UIImageView *)bgCoinView{ + if(!_bgCoinView){ + _bgCoinView = [UIImageView new]; + _bgCoinView.image = kImage(@"ms_room_game_victory_coin_bg_second"); + } + return _bgCoinView; +} +- (UIImageView *)coinView{ + if(!_coinView){ + _coinView = [UIImageView new]; + _coinView.image = kImage(@"ms_room_game_victory_coin"); + } + return _coinView; +} +- (UILabel *)coinNumView{ + if(!_coinNumView){ + _coinNumView = [UILabel labelInitWithText:@"0" font:kFontBold(15) textColor:UIColorFromRGB(0xFFE829)]; + _coinNumView.textAlignment = NSTextAlignmentCenter; + } + return _coinNumView; +} +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.h b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.h new file mode 100644 index 00000000..9375a379 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.h @@ -0,0 +1,16 @@ +// +// MSTabbarRoomGameCell.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import +#import "MSTabbarRoomGameModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface MSTabbarRoomGameCell : UICollectionViewCell +@property(nonatomic,strong) MSTabbarRoomGameItemModel *itemMode; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.m b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.m new file mode 100644 index 00000000..0005a2f9 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/Cell/MSTabbarRoomGameCell.m @@ -0,0 +1,48 @@ +// +// MSTabbarRoomGameCell.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarRoomGameCell.h" +@interface MSTabbarRoomGameCell() +@property(nonatomic,strong) NetImageView *bgImageView; +@end +@implementation MSTabbarRoomGameCell +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self.contentView addSubview:self.bgImageView]; +} +-(void)installConstraints{ + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.contentView); + }]; + +} +- (void)setItemMode:(MSTabbarRoomGameItemModel *)itemMode{ + _itemMode = itemMode; + if(_itemMode == nil)return; + _bgImageView.image = nil; + [_bgImageView loadImageWithUrl:_itemMode.modeIcon completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) { + self.bgImageView.image = image; + }]; +} +#pragma mark - 懒加载 +- (NetImageView *)bgImageView{ + if(!_bgImageView){ + NetImageConfig *config = [NetImageConfig new]; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _bgImageView = [[NetImageView alloc]initWithConfig:config]; + + } + return _bgImageView; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.h b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.h new file mode 100644 index 00000000..7ec3973d --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.h @@ -0,0 +1,16 @@ +// +// MSTabbarRoomGameVC.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MvpViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MSTabbarRoomGameVC : MvpViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m new file mode 100644 index 00000000..238f0e5c --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m @@ -0,0 +1,138 @@ +// +// MSTabbarRoomGameVC.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarRoomGameVC.h" +#import "MSTabbarRoomGameHeadView.h" +#import "MSTabbarRoomGameView.h" +#import "MSTabbarBeginGameView.h" +#import "MSRoomGameVC.h" +#import "BaseNavigationController.h" +#import "MSRoomGamePresenter.h" +#import "MSRoomGameProtocol.h" +#import "XPIAPRechargeViewController.h" +#import "XPWebViewController.h" +@interface MSTabbarRoomGameVC () +@property(nonatomic,strong) UIImageView *bgImageView; +@property(nonatomic,strong) MSTabbarRoomGameHeadView *headView; +@property(nonatomic,strong) MSTabbarRoomGameView *gameView; +@property(nonatomic,strong) MSTabbarRoomGameModel *gameModel; +@end + +@implementation MSTabbarRoomGameVC +- (MSRoomGamePresenter *)createPresenter { + return [[MSRoomGamePresenter alloc] init]; +} +- (void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; + if(self.gameModel == nil){ + [self.presenter getRoomGameConfig]; + } +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self installUI]; + [self installConstraints]; + +} +-(void)installUI{ + [self.view addSubview:self.bgImageView]; + [self.view addSubview:self.headView]; + [self.view addSubview:self.gameView]; +} +-(void)installConstraints{ + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.view); + }]; + [self.headView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self.view).inset(kGetScaleWidth(0)); + make.top.mas_equalTo(kStatusBarHeight); + make.height.mas_equalTo(kGetScaleWidth(44)); + }]; + [self.gameView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.headView.mas_bottom).mas_offset(kGetScaleWidth(59)); + make.leading.trailing.bottom.equalTo(self.view); + }]; +} +- (BOOL)isHiddenNavBar { + return YES; +} +#pragma mark - MSTabbarBeginGameViewDelegate +- (void)startMatchGameActionWithModel:(MSTabbarRoomGameItemModel *)model{ + if(self.headView.coinModel.diamonds.integerValue < model.ticket.integerValue){ + TTAlertConfig * config = [[TTAlertConfig alloc] init]; + config.message = YMLocalizedString(@"XPTreasureFairyViewController5"); + config.confirmButtonConfig.title = YMLocalizedString(@"XPTreasureFairyViewController6"); + [TTPopup alertWithConfig:config confirmHandler:^{ + XPIAPRechargeViewController * rechargeVC = [[XPIAPRechargeViewController alloc] init]; + rechargeVC.delegate = self; + [self.navigationController pushViewController:rechargeVC animated:YES]; + } cancelHandler:^{ + + }]; + return; + } + [self.presenter startMatchGameWithroomId:@"" mgId:self.gameModel.mgId gameMode:model.gameMode]; +} +#pragma mark - MSTabbarRoomGameHeadViewDelegate +- (void)clickPayAction{ + XPIAPRechargeViewController *iapVC = [XPIAPRechargeViewController new]; + iapVC.delegate = self; + [self.navigationController pushViewController:iapVC animated:YES]; +} +- (void)clickRankAction{ + XPWebViewController * webVC =[[XPWebViewController alloc] init]; + webVC.url = URLWithType(kLUDOUrl); + [self.navigationController pushViewController:webVC animated:YES]; +} +#pragma mark -MSTabbarRoomGameViewDelegate +-(void)chooseGameType:(MSTabbarRoomGameItemModel *)model{ +// MSTabbarBeginGameView *beginGameView = [[MSTabbarBeginGameView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; +// beginGameView.itemModel = model; +// beginGameView.delegate = self; +// [kWindow addSubview:beginGameView]; + MSRoomGameVC *gameVC = [MSRoomGameVC new]; + BaseNavigationController *nav = [[BaseNavigationController alloc]initWithRootViewController:gameVC]; + nav.modalPresentationStyle = UIModalPresentationFullScreen; + [self presentViewController:nav animated:YES completion:nil]; + +} +#pragma mark - XPIAPRechargeViewControllerDelegate +- (void)paySuccess{ + [self.presenter getRoomGameConfig]; +} +#pragma mark - MSRoomGameProtocol +-(void)getRoomGameConfigSuccessWithUser:(UserInfoModel *)user coinModel:(WalletInfoModel *)coinModel gameModel:(MSTabbarRoomGameModel *)gameModel{ + self.headView.userModel = user; + self.headView.coinModel= coinModel; + self.gameView.gameModel = gameModel; + self.gameModel = gameModel; +} +#pragma mark - 懒加载 +- (UIImageView *)bgImageView{ + if(!_bgImageView){ + _bgImageView = [UIImageView new]; + UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFAFEFD),UIColorFromRGB(0xBEFFEB),UIColorFromRGB(0xF9FFFD)] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(KScreenWidth, KScreenHeight)]; + _bgImageView.image = image; + _bgImageView.userInteractionEnabled = YES; + } + return _bgImageView; +} +- (MSTabbarRoomGameHeadView *)headView{ + if(!_headView){ + _headView = [[MSTabbarRoomGameHeadView alloc]initWithFrame:CGRectZero]; + _headView.delegate = self; + } + return _headView; +} +- (MSTabbarRoomGameView *)gameView{ + if(!_gameView){ + _gameView = [[MSTabbarRoomGameView alloc]initWithFrame:CGRectZero]; + _gameView.delegate = self; + } + return _gameView; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.h new file mode 100644 index 00000000..60d9b466 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.h @@ -0,0 +1,16 @@ +// +// MSRoomGameHeadAvatarView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSRoomGameHeadAvatarView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.m new file mode 100644 index 00000000..1f494e82 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadAvatarView.m @@ -0,0 +1,57 @@ +// +// MSRoomGameHeadAvatarView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSRoomGameHeadAvatarView.h" +@interface MSRoomGameHeadAvatarView() +@property(nonatomic,strong) NetImageView *avatarView; +@property(nonatomic,strong) UIImageView *borderView; + +@end +@implementation MSRoomGameHeadAvatarView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.avatarView]; + [self.avatarView addSubview:self.borderView]; + +} +-(void)installConstraints{ + [self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self); + }]; + [self.borderView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.avatarView); + }]; + +} +#pragma mark - 懒加载 +- (NetImageView *)avatarView{ + if(!_avatarView){ + NetImageConfig *config = [[NetImageConfig alloc]init]; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _avatarView = [[NetImageView alloc]initWithConfig:config]; + _avatarView.layer.cornerRadius = kGetScaleWidth(57)/2; + _avatarView.layer.masksToBounds = YES; + } + return _avatarView; +} +- (UIImageView *)borderView{ + if(!_borderView){ + _borderView = [UIImageView new]; + _borderView.image = kImage(@"ms_room_game_underwa_border"); + } + return _borderView; +} + +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.h new file mode 100644 index 00000000..e82155db --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.h @@ -0,0 +1,20 @@ +// +// MSRoomGameHeadView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol MSRoomGameHeadViewDelegate + +- (void)clickQuitGameAction; + +@end +@interface MSRoomGameHeadView : UIView +@property(nonatomic,weak) iddelegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m new file mode 100644 index 00000000..3af39c39 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m @@ -0,0 +1,177 @@ +// +// MSRoomGameHeadView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSRoomGameHeadView.h" +#import "MSRoomGameHeadAvatarView.h" +@interface MSRoomGameHeadView() + +@property(nonatomic,strong) UIImageView *topImageView; +@property(nonatomic,strong) UIButton *backBtn; +@property(nonatomic,strong) UILabel *titleView; +@property(nonatomic,strong) UIImageView *pkImageView; +@property(nonatomic,strong) MSRoomGameHeadAvatarView *mineView; +@property(nonatomic,strong) MSRoomGameHeadAvatarView *rivalView; +@property(nonatomic,strong) UILabel *hintView; +@property(nonatomic,strong) UIImageView *bgCoinView; +@property(nonatomic,strong) UIImageView *coinView; +@property(nonatomic,strong) UILabel *coinNumView; +@end +@implementation MSRoomGameHeadView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.topImageView]; + [self addSubview:self.backBtn]; + [self addSubview:self.titleView]; + [self addSubview:self.pkImageView]; + [self addSubview:self.mineView]; + [self addSubview:self.rivalView]; + [self addSubview:self.hintView]; + [self addSubview:self.bgCoinView]; + [self addSubview:self.coinView]; + [self.bgCoinView addSubview:self.coinNumView]; +} +-(void)installConstraints{ + [self.topImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.width.mas_equalTo(kGetScaleWidth(90)); + make.height.mas_equalTo(kGetScaleWidth(80)); + make.leading.mas_equalTo(kGetScaleWidth(11)); + }]; + [self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(21)); + make.trailing.mas_equalTo(-kGetScaleWidth(12)); + make.centerY.equalTo(self.topImageView); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.backBtn.mas_bottom).offset(-kGetScaleWidth(9)); + make.centerX.equalTo(self); + }]; + [self.pkImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.topImageView.mas_bottom).mas_offset(kGetScaleWidth(5)); + make.width.mas_equalTo(kGetScaleWidth(60)); + make.height.mas_equalTo(kGetScaleWidth(53)); + make.centerX.equalTo(self); + }]; + [self.mineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(57)); + make.centerY.equalTo(self.pkImageView); + make.leading.mas_equalTo(kGetScaleWidth(99)); + }]; + [self.rivalView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.width.height.equalTo(self.mineView); + make.leading.equalTo(self.mineView.mas_trailing).mas_offset(kGetScaleWidth(52)); + }]; + [self.hintView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.mineView.mas_bottom).mas_offset(kGetScaleWidth(10)); + make.leading.trailing.equalTo(self).inset(kGetScaleWidth(10)); + + }]; + + [self.bgCoinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(21)); + make.width.mas_greaterThanOrEqualTo(kGetScaleWidth(81)); + make.height.mas_equalTo(kGetScaleWidth(25)); + make.top.equalTo(self.mineView.mas_bottom).mas_offset(kGetScaleWidth(27)); + }]; + [self.coinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(26)); + make.leading.equalTo(self.bgCoinView.mas_leading).mas_offset(kGetScaleWidth(0)); + make.centerY.equalTo(self.bgCoinView); + }]; + [self.coinNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(40)); + make.trailing.mas_equalTo(-kGetScaleWidth(22)); + make.centerY.equalTo(self.bgCoinView); + }]; +} +-(void)clickBackBtnAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(clickQuitGameAction)]){ + [self.delegate clickQuitGameAction]; + } +} +#pragma mark - 懒加载 +- (UIImageView *)topImageView{ + if(!_topImageView){ + _topImageView = [UIImageView new]; + _topImageView.image = kImage(@"ms_room_game_underwa_top_icon"); + } + return _topImageView; +} +- (UIButton *)backBtn{ + if(!_backBtn){ + _backBtn = [UIButton new]; + [_backBtn setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; + [_backBtn setImage:kImage(@"ms_room_game_underwa_back_icon") forState:UIControlStateNormal]; + [_backBtn addTarget:self action:@selector(clickBackBtnAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _backBtn; +} +- (UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel labelInitWithText:@"匹配中" font:kFontBold(18) textColor:[UIColor whiteColor]]; + } + return _titleView; +} +- (MSRoomGameHeadAvatarView *)mineView{ + if(!_mineView){ + _mineView = [[MSRoomGameHeadAvatarView alloc]initWithFrame:CGRectZero]; + } + return _mineView; +} +- (UIImageView *)pkImageView{ + if(!_pkImageView){ + _pkImageView = [UIImageView new]; + _pkImageView.image = kImage(@"ms_room_game_underwa_pk_bg"); + } + return _pkImageView; +} +- (MSRoomGameHeadAvatarView *)rivalView{ + if(!_rivalView){ + _rivalView = [[MSRoomGameHeadAvatarView alloc]initWithFrame:CGRectZero]; + } + return _rivalView; +} +- (UILabel *)hintView{ + if(!_hintView){ + _hintView = [UILabel new]; + NSMutableAttributedString *attText = [[NSMutableAttributedString alloc]initWithString:@"获胜奖励18金币" attributes:@{NSFontAttributeName:kFontMedium(14),NSForegroundColorAttributeName:[UIColor whiteColor]}]; + [attText addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFF6629)} range:[attText.string rangeOfString:@"18金币"]]; + _hintView.attributedText = attText; + _hintView.numberOfLines = 0; + _hintView.textAlignment = NSTextAlignmentCenter; + } + return _hintView; +} +- (UIImageView *)bgCoinView{ + if(!_bgCoinView){ + _bgCoinView = [UIImageView new]; + _bgCoinView.image = kImage(@"ms_room_game_underwa_coin_bg"); + } + return _bgCoinView; +} +- (UIImageView *)coinView{ + if(!_coinView){ + _coinView = [UIImageView new]; + _coinView.image = kImage(@"ms_room_game_underwa_coin"); + } + return _coinView; +} +- (UILabel *)coinNumView{ + if(!_coinNumView){ + _coinNumView = [UILabel labelInitWithText:@"0" font:kFontBold(17) textColor:[UIColor whiteColor]]; + } + return _coinNumView; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.h new file mode 100644 index 00000000..8a8da464 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.h @@ -0,0 +1,19 @@ +// +// MSRoomGameMsgView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import + +#import "UserInfoModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface MSRoomGameMsgView : UIView +@property(nonatomic,strong) UserInfoModel *userInfo; +- (instancetype)initWithRoomUid:(NSString *)roomUid; + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m new file mode 100644 index 00000000..0049c393 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m @@ -0,0 +1,423 @@ +// +// MSRoomGameMsgView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSRoomGameMsgView.h" +///Third +#import +#import + +///Tool +#import "DJDKMIMOMColor.h" +#import "YUMIMacroUitls.h" +#import "XPRoomMessageConstant.h" +#import "XPRoomMessageParser.h" +#import "AccountInfoStorage.h" +#import "XPRoomMiniManager.h" +#import "PLTimeUtil.h" +#import "ClientConfig.h" +#import +#import "ThemeColor+Room.h" +#import "NSArray+Safe.h" +#import "Api+Room.h" +#import "Api+Message.h" +#import "XPMessageRemoteExtModel.h" +///Model +#import "RoomInfoModel.h" +#import "AttachmentModel.h" +#import "RoomFaceSendInfoModel.h" +#import "XPMessageRemoteExtModel.h" +#import "RoomPKChooseUserModel.h" +#import "CandyTreeResultModel.h" +#import "RoomSailingPrizeModel.h" +#import "UserInfoModel.h" +#import "XPMessageInfoModel.h" +#import "GiftReceiveInfoModel.h" +#import "XPGiftStorage.h" +///View +#import "XPRoomMessageTableViewCell.h" +#import "XPRoomMessageHeaderView.h" +#import "XPRoomMessageHeaderView.h" +#import "PIRoomMessagePhotoAlbumCell.h" +#import "PIRoomMessageUnlockPhotoAlbumView.h" +#import "PIRoomPhotoAlbumItemModel.h" +#import "SDPhotoBrowser.h" +#import "XPSkillCardPlayerManager.h" +#import "MsRoomMessagChatHallCell.h" +#import "MSSessionPublicChatHallTopModel.h" +@interface MSRoomGameMsgView() +///房间的代理 +@property (nonatomic,copy)NSString *roomUid; + +///列表 +@property (nonatomic,strong) UITableView *messageTableView; +///头部 +@property (nonatomic,strong) XPRoomMessageHeaderView *headerView; + +///messageView 持有这个工具类 进行数据的分发操作 TODO: 有需要在改 +@property (nonatomic,strong) XPRoomMessageParser *messageParser; +///数据源 +@property (nonatomic,strong) NSMutableArray *datasource; +@property(nonatomic,assign) BOOL isLoadHistoryMessage; +@end +@implementation MSRoomGameMsgView + +- (void)dealloc { + +} + +- (instancetype)initWithRoomUid:(NSString *)roomUid { + self = [super init]; + if (self) { + self.isLoadHistoryMessage = YES; + self.roomUid = roomUid; + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self; +} +- (void)showUserCard:(NSInteger)uid{ + [self.messageParser showUserCard:uid]; +} +#pragma mark - Response + + + + + + +#pragma mark - Private Method +- (void)initSubViews { + + + [self addSubview:self.messageTableView]; + self.messageTableView.tableHeaderView = self.headerView; + +} + +- (void)initSubViewConstraints { + + [self.messageTableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(self).offset(kGetScaleWidth(15)); + make.bottom.trailing.mas_equalTo(self); + make.top.mas_equalTo(kGetScaleWidth(10)); + }]; + + +} + + + + + +#pragma mark - 添加数据并且做自动滚动 + + +///执行插入动画并滚动 +- (void)scrollToBottom:(BOOL)animated { + if(self.datasource.count > 0){ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + NSIndexPath *ip = [NSIndexPath indexPathForRow:self.datasource.count-1 inSection:0]; //取最后一行数据 + [self.messageTableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:animated]; //滚动到最后一行 + }); + + + } + +} + + + + +-(void)addRoomMessage:(NIMMessage *)msg{ + + [self.datasource addObject:[self.messageParser parseMessageAttributeForChatHall:msg]]; + [self.messageTableView reloadData]; + [self scrollToBottom:YES]; +} +- (void)addCustomMessage:(NSNotification *)notification { + + + NIMMessage * message = notification.object; + [self addRoomMessage:message]; +} + + + +#pragma mark - RoomGuestDelegate +- (void)handleNIMCustomAttachment:(AttachmentModel *)attachment{ + +} + + +- (void)handleNIMNotificationMessage:(NIMMessage *)message { + + NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; + NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content; + + if (content.eventType == NIMChatroomEventTypeEnter) { + + + NIMChatroomNotificationMember *member = content.targets[0]; + if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) { + ///自己进房成功后拉取历史消息 + if(self.datasource.count > 0) + { + self.isLoadHistoryMessage = NO; + return; + } + [self handleFetchHistoryMessage]; + } else { + self.isLoadHistoryMessage = NO; + } + + } +} + +- (void)handleFetchHistoryMessage{ + + + + NSString *roomId = self.roomUid; + NIMHistoryMessageSearchOption *option = [[NIMHistoryMessageSearchOption alloc] init]; + option.limit = 100; + option.startTime = 0; + option.order = NIMMessageSearchOrderAsc; + option.messageTypes = @[@(NIMMessageTypeText),@(NIMMessageTypeImage)]; + [[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray * _Nullable messages) { + if(error != nil){ + self.isLoadHistoryMessage = NO; + } + + //如果拉取的数量等于请求的数量,说明这个时间点以后的消息数量大于等于需要拉取的数量,直接拉取最新的50条 + if (messages.count == 100) { + NIMHistoryMessageSearchOption *option = [[NIMHistoryMessageSearchOption alloc] init]; + option.limit = 100; + option.order = NIMMessageSearchOrderDesc; + option.messageTypes = @[@(NIMMessageTypeText),@(NIMMessageTypeImage)]; + [[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray * _Nullable messages) { + if(error != nil){ + self.isLoadHistoryMessage = NO; + } + dispatch_async(dispatch_get_main_queue(), ^{///回到主线程 + if (self.datasource.count > kRoomMessageMaxLength) { + NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)]; + NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set]; + [self.datasource removeObjectsInArray:needRemoveMsgArray]; + } + // 执行插入 + for (NIMMessage *item in messages.reverseObjectEnumerator) { + [self dealWithHistoryDataWithMessage:item]; + + } + [self.messageTableView reloadData]; + //执行插入动画并滚动 + [self scrollToBottom:YES]; + self.isLoadHistoryMessage = NO; + + + }); + }]; + return; + } + dispatch_async(dispatch_get_main_queue(), ^{///回到主线程 + if (self.datasource.count > kRoomMessageMaxLength) { + NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)]; + NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set]; + [self.datasource removeObjectsInArray:needRemoveMsgArray]; + } + // 执行插入 + for (NIMMessage *item in messages) { + [self dealWithHistoryDataWithMessage:item]; + } + + [self.messageTableView reloadData]; + //执行插入动画并滚动 + [self scrollToBottom:YES]; + self.isLoadHistoryMessage = NO; + + + }); + + + }]; +} +-(void)dealWithHistoryDataWithMessage:(NIMMessage *)item{ + BOOL isHaveSave = NO; + if(item.messageType == NIMMessageTypeText){ + isHaveSave = YES; + }else if(item.messageType == NIMMessageTypeImage){ + isHaveSave = YES; + }else if(item.messageType == NIMMessageTypeCustom){ + NIMCustomObject *obj = (NIMCustomObject *)item.messageObject; + if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { + AttachmentModel *attachment = (AttachmentModel *)obj.attachment; + if (attachment.first == CustomMessageType_Chat_Hall_Headlinesn && attachment.second == Custom_Message_Sub_Chat_Hall_Headlinesn) { + isHaveSave = YES; + } + + } + } + if(isHaveSave == NO)return; + if (item.messageType == NIMMessageTypeImage){ + PIRoomPhotoAlbumItemModel*model = [PIRoomPhotoAlbumItemModel new]; + model.type = @"1"; + model.status = 1; + NIMImageObject * imageObject = (NIMImageObject*)item.messageObject; + model.photoUrl = imageObject.url; + XPMessageInfoModel * messageInfo = [[XPMessageInfoModel alloc] init]; + messageInfo.albumModel = model; + messageInfo.first = CustomMessageType_Room_Album; + XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithJSON:item.remoteExt[item.from]]; + messageInfo.charmUrl = extModel.charmUrl; + messageInfo.experUrl = extModel.experUrl; + messageInfo.bubbleImageUrl = extModel.iosBubbleUrl; + messageInfo.nameText = extModel.nick; + [self.datasource addObject:messageInfo]; + return; + } + [self.datasource addObject:[self.messageParser parseMessageAttributeForChatHall:item]]; +} +- (void)handleNIMTextMessage:(NIMMessage *)message { + + + [self addRoomMessage:message]; +} + + + + + +- (void)onRoomEntered { + self.headerView.backgroundColor = UIColorRGBAlpha(0xADF4FF, 0.2); +} + +- (void)onRoomUpdate { + ///改变公屏的背景样式 + + self.headerView.backgroundColor = UIColorRGBAlpha(0xADF4FF, 0.2); + + +} + + + + +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.datasource.count; +} + +//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { +// XPMessageInfoModel* messageInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; +// +// if(messageInfo.first == CustomMessageType_Room_Album){ +// return 186; +// }else if(messageInfo.first == CustomMessageType_Chat_Hall_Headlinesn){ +// return 40; +// } +// +// return messageInfo.rowHeight; +//} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + XPMessageInfoModel* attr = [self.datasource safeObjectAtIndex1:indexPath.row]; + + XPRoomMessageTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomMessageTableViewCell class])]; + cell.delegate = self; + cell.messageInfo = attr; + + return cell; + + +} + + +#pragma mark - XPRoomMessageTableViewCellDelegate +- (void)xPRoomMessageTableViewCellDidTapEmpty:(XPRoomMessageTableViewCell *)view { + +} + + + +- (void)sendCustomMessage:(AttachmentModel *)attachment { + + NSString *sessionID = self.roomUid; + NIMMessage *message = [[NIMMessage alloc]init]; + NIMCustomObject *object = [[NIMCustomObject alloc] init]; + object.attachment = attachment; + message.messageObject = object; + + UserInfoModel *userInfo = self.userInfo; + XPMessageRemoteExtModel *extModel = [[XPMessageRemoteExtModel alloc] init]; + extModel.androidBubbleUrl = userInfo.androidBubbleUrl; + extModel.iosBubbleUrl = userInfo.iosBubbleUrl; + extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel; + NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]]; + message.remoteExt = remoteExt; + NIMSessionType sessionType = NIMSessionTypeChatroom; + //构造会话 + NIMSession *session = [NIMSession session:sessionID type:sessionType]; + [[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil]; +} + + + +#pragma mark - Getters And Setters +- (UITableView *)messageTableView { + if (!_messageTableView) { + _messageTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + _messageTableView.delegate = self; + _messageTableView.dataSource = self; + _messageTableView.tableFooterView = [UIView new]; + _messageTableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _messageTableView.backgroundColor = [UIColor clearColor]; + _messageTableView.showsVerticalScrollIndicator = NO; + _messageTableView.tag = 666; + if (@available(iOS 11.0, *)) { + _messageTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [_messageTableView registerClass:[XPRoomMessageTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomMessageTableViewCell class])]; + + + + + } + return _messageTableView; +} + +- (XPRoomMessageHeaderView *)headerView { + if (!_headerView) { + _headerView = [[XPRoomMessageHeaderView alloc] init]; + } + return _headerView; +} + + +- (NSMutableArray *)datasource { + if (!_datasource) { + _datasource = [NSMutableArray array]; + } + return _datasource; +} + + + + +- (XPRoomMessageParser *)messageParser { + if (!_messageParser) { + _messageParser = [[XPRoomMessageParser alloc] init]; + } + return _messageParser; +} + + + +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.h new file mode 100644 index 00000000..e3f1aa91 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.h @@ -0,0 +1,20 @@ +// +// MSRoomGameQuitGameView.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol MSRoomGameQuitGameViewDelegate + +- (void)quitGameAction; + +@end +@interface MSRoomGameQuitGameView : UIView +@property(nonatomic,weak) iddelegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.m new file mode 100644 index 00000000..7e7f2466 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameQuitGameView.m @@ -0,0 +1,108 @@ +// +// MSRoomGameQuitGameView.m +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "MSRoomGameQuitGameView.h" +@interface MSRoomGameQuitGameView() +@property(nonatomic,strong) UIView *bgView; +@property(nonatomic,strong) UILabel *titleView; +@property(nonatomic,strong) UIButton *quitBtn; +@property(nonatomic,strong) UIButton *resumeBtn; +@end +@implementation MSRoomGameQuitGameView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor clearColor]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.titleView]; + [self.bgView addSubview:self.quitBtn]; + [self.bgView addSubview:self.resumeBtn]; +} +-(void)installConstraints{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(290)); + make.height.mas_greaterThanOrEqualTo(kGetScaleWidth(182)); + make.center.equalTo(self); + }]; + [self.quitBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(120)); + make.height.mas_equalTo(kGetScaleWidth(38)); + make.leading.mas_equalTo(kGetScaleWidth(15)); + make.bottom.mas_equalTo(-kGetScaleWidth(15)); + }]; + [self.resumeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.width.height.equalTo(self.quitBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(15)); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(33)); + make.bottom.mas_equalTo(-kGetScaleWidth(88)); + make.top.mas_equalTo(kGetScaleWidth(48)); + }]; +} +-(void)qutiBtnAction{ + [TTPopup dismiss]; + if(self.delegate && [self.delegate respondsToSelector:@selector(quitGameAction)]){ + [self.delegate quitGameAction]; + } +} +-(void)resumeBtnAction{ + [TTPopup dismiss]; +} +#pragma mark - 懒加载 +- (UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = [UIColor whiteColor]; + _bgView.layer.cornerRadius = kGetScaleWidth(15); + _bgView.layer.masksToBounds = YES; + } + return _bgView; +} +- (UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel labelInitWithText:YMLocalizedString(@"MSRoomGameQuitGameView0") font:kFontBold(16) textColor:UIColorFromRGB(0x333333)]; + _titleView.textAlignment = NSTextAlignmentCenter; + _titleView.numberOfLines = 0; + } + return _titleView; +} +- (UIButton *)quitBtn{ + if(!_quitBtn){ + _quitBtn = [UIButton new]; + [_quitBtn setTitle:YMLocalizedString(@"MSRoomGameQuitGameView1") forState:UIControlStateNormal]; + [_quitBtn setTitleColor:UIColorFromRGB(0x999999) forState:UIControlStateNormal]; + _quitBtn.titleLabel.font = kFontBold(14); + _quitBtn.layer.cornerRadius = kGetScaleWidth(38)/2; + _quitBtn.layer.masksToBounds = YES; + _quitBtn.backgroundColor = UIColorFromRGB(0xF5F5F5); + [_quitBtn addTarget:self action:@selector(qutiBtnAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _quitBtn; +} +- (UIButton *)resumeBtn{ + if(!_resumeBtn){ + _resumeBtn = [UIButton new]; + UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x53C7D4),UIColorFromRGB(0x7C5EFD)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(120), kGetScaleWidth(38))]; + [_resumeBtn setBackgroundImage:image forState:UIControlStateNormal]; + [_resumeBtn setTitle:YMLocalizedString(@"MSRoomGameQuitGameView2") forState:UIControlStateNormal]; + [_resumeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _resumeBtn.titleLabel.font = kFontBold(14); + _resumeBtn.layer.cornerRadius = kGetScaleWidth(38)/2; + _resumeBtn.layer.masksToBounds = YES; + [_resumeBtn addTarget:self action:@selector(resumeBtnAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _resumeBtn; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.h new file mode 100644 index 00000000..997a4c4a --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.h @@ -0,0 +1,16 @@ +// +// MSRoomGameSendMsgView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSRoomGameSendMsgView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.m new file mode 100644 index 00000000..fff97e36 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameSendMsgView.m @@ -0,0 +1,57 @@ +// +// MSRoomGameSendMsgView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSRoomGameSendMsgView.h" +@interface MSRoomGameSendMsgView() +@property(nonatomic,strong) UIButton *sendBtn; +@property(nonatomic,strong) UILabel *titleView; +@end +@implementation MSRoomGameSendMsgView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:1 alpha:0.2]; + [self setCornerWithLeftTopCorner:kGetScaleWidth(23) rightTopCorner:kGetScaleWidth(23) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(KScreenWidth, kGetScaleWidth(70))]; + [self addSubview:self.sendBtn]; + [self.sendBtn addSubview:self.titleView]; +} +-(void)installConstraints{ + [self.sendBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kGetScaleWidth(28)); + make.width.height.mas_equalTo(kGetScaleWidth(300)); + make.top.mas_equalTo(kGetScaleWidth(16)); + make.centerX.equalTo(self); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(22)); + make.centerY.equalTo(self.sendBtn); + }]; +} +#pragma mark - 懒加载 +- (UIButton *)sendBtn{ + if(!_sendBtn){ + _sendBtn = [UIButton new]; + _sendBtn.backgroundColor = UIColorRGBAlpha(0x0B032D , 0.1); + _sendBtn.layer.cornerRadius = kGetScaleWidth(28)/2; + _sendBtn.layer.masksToBounds = YES; + } + return _sendBtn; +} +-(UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel labelInitWithText:YMLocalizedString(@"XPRoomMenuContainerView2") font:kFontMedium(10) textColor:[UIColor whiteColor]]; + } + return _titleView; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.h new file mode 100644 index 00000000..33743b90 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.h @@ -0,0 +1,20 @@ +// +// MSRoomGameVictoryView.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol MSRoomGameVictoryViewDelegate + +- (void)closeGameAction; +-(void)rematchGameAction; +@end +@interface MSRoomGameVictoryView : UIView +@property(nonatomic,weak) iddelegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m new file mode 100644 index 00000000..e71f26db --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m @@ -0,0 +1,154 @@ +// +// MSRoomGameVictoryView.m +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import "MSRoomGameVictoryView.h" +#import "MSRoomGameVictoryCell.h" +@interface MSRoomGameVictoryView() +@property(nonatomic,strong) UIView *bgView; +@property(nonatomic,strong) UIView *bgSubView; +@property(nonatomic,strong) UIImageView *topView; +@property(nonatomic,strong) UITableView *tableView; +@property(nonatomic,strong) UIButton *closeBtn; +@property(nonatomic,strong) UIButton *restartBtn; +@end +@implementation MSRoomGameVictoryView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.bgView]; + [self addSubview:self.topView]; + [self.bgView addSubview:self.bgSubView]; + [self.bgSubView addSubview:self.tableView]; + [self.bgSubView addSubview:self.closeBtn]; + [self.bgSubView addSubview:self.restartBtn]; +} +-(void)installConstraints{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(312)); + make.height.mas_equalTo(kGetScaleWidth(287)); + make.center.equalTo(self); + }]; + [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.height.mas_equalTo(kGetScaleWidth(317)); + make.leading.mas_equalTo(kGetScaleWidth(0)); + make.bottom.equalTo(self.bgView.mas_top).mas_offset(kGetScaleWidth(85)); + }]; + [self.bgSubView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(297)); + make.height.mas_equalTo(kGetScaleWidth(238)); + make.top.mas_equalTo(kGetScaleWidth(41)); + make.centerX.equalTo(self.bgView); + }]; + + [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(134)); + make.height.mas_equalTo(kGetScaleWidth(42)); + make.leading.mas_equalTo(kGetScaleWidth(13)); + make.bottom.mas_equalTo(-kGetScaleWidth(27)); + }]; + [self.restartBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.top.equalTo(self.closeBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(13)); + }]; + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(15)); + make.leading.trailing.equalTo(self.bgSubView).inset(kGetScaleWidth(13)); + make.bottom.equalTo(self.closeBtn.mas_top).mas_offset(-kGetScaleWidth(5)); + }]; +} +#pragma mark- UITableViewDelegate,UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return 2; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + MSRoomGameVictoryCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSRoomGameVictoryCell class]) forIndexPath:indexPath]; + + return cell; +} +-(void)closeBtnAction{ + [TTPopup dismiss]; + if(self.delegate && [self.delegate respondsToSelector:@selector(closeGameAction)]){ + [self.delegate closeGameAction]; + } +} +-(void)restartBtnAction{ + [TTPopup dismiss]; + if(self.delegate && [self.delegate respondsToSelector:@selector(rematchGameAction)]){ + [self.delegate rematchGameAction]; + } +} +#pragma mark - 懒加载 +- (UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = UIColorFromRGB(0x1ADCE5); + _bgView.layer.cornerRadius = kGetScaleWidth(16); + _bgView.layer.masksToBounds = YES; + } + return _bgView; +} +- (UIImageView *)topView{ + if(!_topView){ + _topView = [UIImageView new]; + _topView.image = kImage(@"ms_room_game_victory_top_icon"); + } + return _topView; +} +- (UIView *)bgSubView{ + if(!_bgSubView){ + _bgSubView = [UIView new]; + _bgSubView.backgroundColor = UIColorFromRGB(0xE2F6FF); + _bgSubView.layer.cornerRadius = kGetScaleWidth(12); + _bgSubView.layer.masksToBounds = YES; + } + return _bgSubView; +} +- (UITableView *)tableView{ + if(!_tableView){ + _tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.rowHeight = kGetScaleWidth(70); + _tableView.backgroundColor = [UIColor clearColor]; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + [_tableView registerClass:[MSRoomGameVictoryCell class] forCellReuseIdentifier:NSStringFromClass([MSRoomGameVictoryCell class])]; + } + return _tableView; +} +- (UIButton *)closeBtn{ + if(!_closeBtn){ + _closeBtn = [UIButton new]; + [_closeBtn setBackgroundImage:kImage(@"ms_room_game_victory_close_bg") forState:UIControlStateNormal]; + [_closeBtn setTitle:YMLocalizedString(@"XPAnchorPKResultView2") forState:UIControlStateNormal]; + [_closeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _closeBtn.titleLabel.font = kFontBold(18); + [_closeBtn addTarget:self action:@selector(closeBtnAction) forControlEvents:UIControlEventTouchUpInside]; + + } + return _closeBtn; +} +- (UIButton *)restartBtn{ + if(!_restartBtn){ + _restartBtn = [UIButton new]; + [_restartBtn setBackgroundImage:kImage(@"ms_room_game_victory_restart_bg") forState:UIControlStateNormal]; + [_restartBtn setTitle:YMLocalizedString(@"MSRoomGameVictoryView0") forState:UIControlStateNormal]; + [_restartBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _restartBtn.titleLabel.font = kFontBold(18); + [_restartBtn addTarget:self action:@selector(restartBtnAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _restartBtn; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.h new file mode 100644 index 00000000..c6f1e354 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.h @@ -0,0 +1,34 @@ +// +// MSRoomGameView.h +// YuMi +// +// Created by duoban on 2024/5/28. +// + +#import +#import "RoomHostDelegate.h" +#import "RoomGuestDelegate.h" +NS_ASSUME_NONNULL_BEGIN +@protocol MSRoomGameViewDelegate + +- (void)hiddenSudGamePostionView; + +@end +@interface MSRoomGameView : UIView +- (instancetype)initWithDelegate:(id)delegate; + +///代理 +@property (nonatomic,weak) id delegate; + +///销毁游戏的引擎 +- (void)destroyMG; + +/// 退出游戏 +- (void)handleSelfInExitEvent; + +//自己是否在游戏中 +- (BOOL)isInSudGame; + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m new file mode 100644 index 00000000..4638a31d --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m @@ -0,0 +1,868 @@ +// +// MSRoomGameView.m +// YuMi +// +// Created by duoban on 2024/5/28. +// +///Third +#import +#import +#import +///Tool +#import "Api+LittleGame.h" +#import "AccountInfoStorage.h" + + + +#import "SudCommon.h" +#import "SudGameConfig.h" +///Model +#import "RoomInfoModel.h" +#import "MicroQueueModel.h" +#import "UserInfoModel.h" +#import "MicroExtModel.h" +#import "AttachmentModel.h" +#import "XPKickUserModel.h" +#import "GuildSuperAdminInfoModel.h" +///P +#import +#import +#import +#import +#import +#import "MSRoomGameView.h" +@interface MSRoomGameView() +///当前小游戏ID +@property (nonatomic, assign) int64_t currentmgId; +///小游戏code +@property (nonatomic, copy) NSString *code; +/// +@property (nonatomic,weak) id hostDelegate; +@property (nonatomic, strong) id fsmAPP2MG; +/// 你画我猜专用,游戏中选中的关键词,会回调出来,通过 DrawSomethingKeyWord 进行保存。 +@property (nonatomic, copy) NSString * DrawSomethingKeyWord; +/// 你画我猜,进入猜词环节,用来公屏识别关键字的状态标识 +@property (nonatomic, assign) BOOL keyWordHiting; +///游戏状态 +@property (nonatomic, assign) LittleGamePlayStatus sudGameStatus; +@end +@implementation MSRoomGameView + +- (instancetype)initWithDelegate:(id)delegate +{ + self = [super init]; + if (self) { + self.hostDelegate = delegate; + } + return self; +} + +#pragma mark - Private Method +- (void)updateSudGame { + RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; + if (roomInfo.type == RoomType_MiniGame) { + if (self.currentmgId == 0) {//第一次加载游戏 + self.currentmgId = roomInfo.mgId; + if (self.currentmgId != 0) {//房间信息已加载 + NSLog(@"initLittleGame---%lld", self.currentmgId); + [self initLittleGame]; + } + } else { + if (self.currentmgId != roomInfo.mgId) { + //切换游戏玩法 + self.currentmgId = roomInfo.mgId; + NSLog(@"updateLittleGame---%lld", self.currentmgId); + if (self.currentmgId != 0) { + [self.fsmAPP2MG destroyMG]; + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_NoIn]; + [self gameSetUp]; + } + } + } + } +} + +- (void)initLittleGame { + [Api getSudGameCode:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString * gameCode = data.data[@"code"]; + self.code = gameCode; + [self gameSetUp]; + } else { + [XNDJTDDLoadingTool showErrorWithMessage:msg]; + } + } uid:[AccountInfoStorage instance].getUid]; +} + +- (void)gameSetUp { + NSLog(@"小游戏的版本号是:%@", [SudMGP getVersion]); + BOOL isTestEnv = NO; +#ifdef DEBUG + isTestEnv = YES; +#else + isTestEnv = NO; +#endif + if(isEnterprise == NO){ + [[SudMGP getCfg]setBackgroundMode:NO]; + } + [SudMGP initSDK:KeyWithType(KeyType_SudGameAppID) appKey:KeyWithType(KeyType_SudGameAppKey) isTestEnv:isTestEnv listener:^(int retCode, const NSString *retMsg) { + if (retCode == 0) { + if (!self.currentmgId) { + return; + } + NSString * userId = [AccountInfoStorage instance].getUid; + NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; + NSLog(@"用户ID:%@,房间ID:%@, 游戏ID:%lld, code:%@", userId, roomId, self.currentmgId, self.code); +// + + NSString *language = [NSBundle getLanguageText]; + if ([language hasPrefix:@"zh"]) { + if ([language rangeOfString:@"Hans"].location != NSNotFound) { + language = @"zh-CN"; // 简体中文 + } else { + language = @"zh-TW"; // 繁體中文 + } + }else{ + language = @"en-US"; // 英文 + } + self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:language fsmMG:self rootView:self]; + } else { + /// 初始化失败, 可根据业务重试 + NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@",retMsg); + } + }]; +} + +//判断是否在麦上 +- (BOOL)isOnMicro:(NSInteger)uid{ + NSArray *chatRoomMicSequences = [self.hostDelegate.getMicroQueue allValues] ; + if (chatRoomMicSequences != nil && chatRoomMicSequences.count > 0) { + for (int i = 0; i < chatRoomMicSequences.count; i ++) { + MicroQueueModel *chatRoomMicSequence = chatRoomMicSequences[i]; + if (chatRoomMicSequence.userInfo.uid == uid) { + return YES; + } + } + } + return NO; +} + +- (NSString *)findFreePosition{ + NSMutableDictionary * micQueue = self.hostDelegate.getMicroQueue; + if (micQueue != nil && micQueue.allKeys.count > 0) { + NSArray *keys = [micQueue allKeys]; + if (keys.count > 0) { + ///重新排序,按照升序 + NSArray *resultArr = [keys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { + return [obj1 compare:obj2]; + }]; + for (NSString *key in resultArr) { + UserInfoModel *userInfo = [[micQueue objectForKey:key] userInfo]; + if ( !userInfo) { + return key; + } + } + } + } + return nil; +} + +//通过uid判断麦位 +- (NSString *)findThePositionByUid:(NSInteger)uid{ + if (uid > 0) { + NSMutableDictionary * micQueue = self.hostDelegate.getMicroQueue; + NSArray *keys = [micQueue allKeys]; + if (keys.count > 0) { + for (NSString *key in keys) { + UserInfoModel *userInfo = [[micQueue objectForKey:key] userInfo]; + if (userInfo.uid == uid) { + return key; + } + } + } + } + return nil; +} + +//上麦以加入游戏 +- (void)upMicToJoinGame { + NSString *position = [self findFreePosition]; + if (position.length > 0) { + NSString * userId = [AccountInfoStorage instance].getUid; + UserInfoModel * userInfo = self.hostDelegate.getUserInfo; + //清空该uid之前在队列中的信息 + if ([self isOnMicro:userId.integerValue]) { + if (position) { + NSString *findOldPosition = [self findThePositionByUid:userInfo.uid]; + NIMChatroomQueueRemoveRequest *request = [[NIMChatroomQueueRemoveRequest alloc]init]; + request.key = findOldPosition; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + if (findOldPosition) { + [[NIMSDK sharedSDK].chatroomManager removeChatroomQueueObject:request completion:^(NSError * _Nullable error, NSDictionary * _Nullable element) { + if (error == nil) { + NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init]; + request.key = position; + request.value = [[self userInfoToQueueExt:userInfo] toJSONString]; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + request.transient = YES; + [[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) { + [self notifySelfInState:YES seatIndex:-1]; + }]; + } + }]; + } + } + }else{ + NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init]; + request.key = position; + request.value = [[self userInfoToQueueExt:userInfo] toJSONString]; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + request.transient = YES; + [[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) { + [self notifySelfInState:YES seatIndex:-1]; + }]; + } + } +} + +- (void)updateMicInfoWithGameStatus:(LittleGamePlayStatus)status { + NSString * position = [self findThePositionByUid:[AccountInfoStorage instance].getUid.integerValue]; + if (position != nil) { + UserInfoModel * userInfo = self.hostDelegate.getUserInfo; + userInfo.gameStatus = status; + NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init]; + request.key = position; + request.value = [[self userInfoToQueueExt:userInfo] toJSONString]; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + request.transient = YES; + [[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) { + + }]; + } +} + +/** + * 麦位更新扩展字段。 + */ +- (NSDictionary *)userInfoToQueueExt:(UserInfoModel *)userInfo { + MicroExtModel * extModel = [[MicroExtModel alloc] init]; + extModel.gender = userInfo.gender; + extModel.avatar = userInfo.avatar; + extModel.uid = userInfo.uid; + extModel.nick = userInfo.nick; + extModel.gameStatus = userInfo.gameStatus; + extModel.headWearUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic; + extModel.preventKick = userInfo.userVipInfoVO.preventKick; + extModel.enterHide = userInfo.userVipInfoVO.enterHide; + return [extModel model2dictionary]; +} + +//自己是否在游戏中 +- (BOOL)isInSudGame { + BOOL isGamePlaying = NO; + if (self.hostDelegate.getRoomInfo.type == RoomType_MiniGame) { + for (int i = -1; i<5; i++) { + NSMutableDictionary * micQueue = self.hostDelegate.getMicroQueue; + MicroQueueModel *micSequence = [micQueue objectForKey:[NSString stringWithFormat:@"%d", i]]; + if (micSequence == nil || micSequence.userInfo == nil) { + continue; + } + if (micSequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue && micSequence.userInfo.gameStatus == LittleGamePlayStatus_Plying) { + isGamePlaying = YES; + break; + } + } + } + return isGamePlaying; +} + +//游戏状态 +- (LittleGamePlayStatus)getCurrentUserSudGameStatus { + LittleGamePlayStatus gameStatus = LittleGamePlayStatus_NoIn; + for (int i = -1; i<5; i++) { + NSMutableDictionary * micQueue = self.hostDelegate.getMicroQueue; + MicroQueueModel *micSequence = [micQueue objectForKey:[NSString stringWithFormat:@"%d", i]]; + if (micSequence == nil || micSequence.userInfo == nil) { + continue; + } + if (micSequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue) { + gameStatus = micSequence.userInfo.gameStatus; + break; + } + } + return gameStatus; +} + +///下麦 +- (void)onDownMic:(NSInteger)uid { + if (uid == [AccountInfoStorage instance].getUid.integerValue) {//自己下麦 + [self notifyIsPlayingState:false]; + [self nofityPlayerPlaying:NO]; + [self notifySetReady:false]; + /// 下游戏麦 + [self notifySelfInState:false seatIndex:-1]; + } +} + +#pragma mark =======ISudFSMMG Delegate======= +/** +* 游戏日志 +*/ +-(void)onGameLog:(NSString*)dataJson { + NSLog(@"ISudFSMMG:onGameLog:%@", dataJson); + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + NSString * msg_string = [dic objectForKey:@"msg"]; + if (!msg_string) { + return; + } +} + +/** +* 游戏开始 +*/ +-(void)onGameStarted { + NSLog(@"ISudFSMMG:onGameStarted:游戏开始"); +} + +/** + * 游戏销毁 + */ +-(void)onGameDestroyed { + NSLog(@"ISudFSMMG:onGameDestroyed:游戏开始"); +} + +/** + * Code过期 + * @param dataJson {"code":"value"} + */ +-(void)onExpireCode:(id)handle dataJson:(NSString*)dataJson { + NSLog(@"ISudFSMMG:onExpireCode:Code过期"); + // 请求业务服务器刷新令牌 + [Api getSudGameCode:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString * gameCode = data.data[@"code"]; + self.code = gameCode; + [self.fsmAPP2MG updateCode:gameCode listener:^(int retCode, const NSString *retMsg, const NSString *dataJson) { + NSLog(@"ISudFSMMG:updateGameCode retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); + }]; + // 回调结果 + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@(0), @"ret_code", @"return form APP onExpireCode", @"ret_msg", nil]; + [handle success:[SudCommon dictionaryToJson:dict]]; + } else { + [XNDJTDDLoadingTool showErrorWithMessage:msg]; + } + } uid:[AccountInfoStorage instance].getUid]; +} + +/** + * 获取游戏View信息 + * @param handle 回调句柄 + * @param dataJson {} + */ +-(void)onGetGameViewInfo:(id)handle dataJson:(NSString*)dataJson { + CGRect rect = [[UIScreen mainScreen] bounds]; + CGFloat scale = [[UIScreen mainScreen] nativeScale]; + + CGFloat top = (kNavigationHeight+105) * scale; + CGFloat bottom; + if (iPhoneXSeries) { + bottom = (47+kSafeAreaBottomHeight+30 + 70) * scale; + } else { + bottom = (47+10+70 ) * scale; + } + CGFloat width = rect.size.width * scale; + CGFloat height = rect.size.height * scale; + NSDictionary *rectDict = [NSDictionary dictionaryWithObjectsAndKeys:@(top), @"top", @(0), @"left", @(bottom), @"bottom", @(0), @"right", nil]; + NSDictionary *viewDict = [NSDictionary dictionaryWithObjectsAndKeys:@(width), @"width", @(height), @"height", nil]; + NSDictionary *dataDict = [NSDictionary dictionaryWithObjectsAndKeys:@(0), @"ret_code", @"return form APP onGetGameViewInfo", @"ret_msg", viewDict, @"view_size", rectDict, @"view_game_rect", nil]; + /// 回调 + [handle success:[SudCommon dictionaryToJson:dataDict]]; +} + +/** + * 获取游戏配置 + * @param handle 回调句柄 + * @param dataJson {} + */ +-(void)onGetGameCfg:(id)handle dataJson:(NSString*)dataJson { + NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; + dict[@"ret_code"] = @(0); + dict[@"ret_msg"] = @"return form APP onGetGameCfg"; + + dict[@"ui"] = @{ + @"join_btn" : @{@"custom": @(YES), @"hide": @(NO)},//加入游戏 + @"start_btn" : @{@"custom": @(YES), @"hide": @(NO)},//开始游戏 + @"lobby_players" : @{@"custom": @(YES), @"hide": @(NO)},//游戏中坑位点击 + @"level" : @{@"custom": @(YES), @"hide" : @(YES)},//段位信息 + }; + NSString *dataJsonRet = @""; + NSData *dataJsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil]; + if (dataJsonData != nil) { + dataJsonRet = [[NSString alloc]initWithData:dataJsonData encoding:NSUTF8StringEncoding]; + } + [handle success:dataJsonRet]; +} + +/** + * 游戏状态变化 + * @param handle 回调句柄 + * @param state 游戏状态 + * @param dataJson 回调json + */ +-(void)onGameStateChange:(id) handle state:(NSString*) state dataJson:(NSString*) dataJson { + if ([state isEqualToString:MG_COMMON_PUBLIC_MESSAGE]) { + NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:公屏消息"); + } else if ([state isEqualToString:MG_COMMON_KEY_WORD_TO_HIT]) { + NSDictionary *dic = [SudCommon turnStringToDictionary:dataJson]; + NSString *word = [dic objectForKey:@"word"]; + NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:你画我猜关键词获取:%@",word); + /// 记录你画我猜关键字 + self.DrawSomethingKeyWord = word; + if (word == (id) [NSNull null] || [word isEqualToString:@""]) { + /// 关闭公屏关键词hit状态 + self.keyWordHiting = NO; + } else { + /// 开启公屏关键词hit状态 + self.keyWordHiting = YES; + } + }else if ([state isEqualToString:MG_COMMON_SELF_CLICK_JOIN_BTN]) {//加入游戏按钮点击 + NSDictionary *dic = [SudCommon turnStringToDictionary:dataJson]; + int seatIndex = -1; + if ([dic objectForKey:@"seatIndex"]) { + seatIndex = [[dic objectForKey:@"seatIndex"] intValue]; + } + if (seatIndex == -1) { + NSLog(@"来自加入按钮%d",seatIndex); + }else { + NSLog(@"来自麦位+入%d",seatIndex); + } + if ([self isOnMicro:[AccountInfoStorage instance].getUid.integerValue]) {//判断是否在麦上 + [self notifySelfInState:YES seatIndex:seatIndex]; + } else { + //不在麦上 + [self upMicToJoinGame]; + } + } else if([state isEqualToString:MG_COMMON_SELF_CLICK_START_BTN]) {//开始游戏按钮点击 + [self notifyIsPlayingState:YES]; + } else if ([state isEqualToString:MG_COMMON_SELF_CLICK_CANCEL_JOIN_BTN]) { + /// 取消加入游戏(退出游戏按钮点击) + [self handleSelfInExitEvent]; + } else { + /// 其他状态 + NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:state:%@",MG_COMMON_PUBLIC_MESSAGE); + } +} + +/** + * 游戏玩家状态变化 + * @param handle 回调句柄 + * @param userId 用户id + * @param state 玩家状态 + * @param dataJson 回调JSON + */ +-(void)onPlayerStateChange:(nullable id) handle userId:(NSString*) userId state:(NSString*) state dataJson:(NSString*) dataJson { + NSLog(@"ISudFSMMG:onPlayerStateChange:游戏->APP:游戏玩家状态变化:userId: %@ --state: %@ --dataJson: %@", userId, state, dataJson); + /// 状态解析 + NSString *dataStr = @""; + if ([state isEqualToString:MG_COMMON_PLAYER_IN]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView0"); + [self handleState_MG_COMMON_PLAYER_IN_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_COMMON_PLAYER_READY]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView1"); + [self handleState_MG_COMMON_PLAYER_READY_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_COMMON_PLAYER_CAPTAIN]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView2"); + [self handleState_MG_COMMON_PLAYER_CAPTAIN_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_COMMON_PLAYER_PLAYING]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView3"); + [self handleState_MG_COMMON_PLAYER_PLAYING_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_DG_SELECTING]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView4"); + [self handleState_MG_DG_SELECTING_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_DG_PAINTING]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView5"); + [self handleState_MG_DG_PAINTING_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_DG_ERRORANSWER]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView6"); + [self handleState_MG_DG_ERRORANSWER_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_DG_TOTALSCORE]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView7"); + [self handleState_MG_DG_TOTALSCORE_WithUserId:userId dataJson:dataJson]; + } else if ([state isEqualToString:MG_DG_SCORE]) { + dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView8"); + [self handleState_MG_DG_SCORE_WithUserId:userId dataJson:dataJson]; + }else { + NSLog(@"ISudFSMMG:onPlayerStateChange:未做解析状态:%@", MG_DG_SCORE); + } + NSLog(@"ISudFSMMG:onPlayerStateChange:dataStr:%@", dataStr); + /// 回调 + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@(0), @"ret_code", @"return form APP onPlayerStateChange", @"ret_msg", nil]; + [handle success:[SudCommon dictionaryToJson:dict]]; +} + +/// 退出游戏 +- (void)handleSelfInExitEvent { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) { + return; + } + /// 正在游戏中,只退出游戏 + if ([self getCurrentUserSudGameStatus] == LittleGamePlayStatus_Plying) { + [self notifyIsPlayingState:false]; + [self nofityPlayerPlaying:NO]; + [self notifySetReady:false]; + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_NoIn]; + } else if ([self getCurrentUserSudGameStatus] == LittleGamePlayStatus_Ready) { /// 非游戏状态下 + /// 如果已经准备先退出准备状态 + [self notifySetReady:false]; + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_NoIn]; + } else { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_NoIn]; + } + /// 下游戏麦 + [self notifySelfInState:false seatIndex:-1]; +} + +/// 准备游戏 +- (void)handleSelfReadyEvent { + [self notifySetReady:true]; +} + +/// 取消准备 +- (void)handleSelfCancelReadyEvent { + [self notifySetReady:false]; +} + +/// 开始游戏 +- (void)handleGameStartEvent { + [self notifyIsPlayingState:YES]; +} + +#pragma mark =======APP->游戏状态处理======= +/// 状态通知(app to mg) +/// @param state 状态名称 +/// @param dataJson 需传递的json +- (void)notifyStateChange:(NSString *) state dataJson:(NSString*) dataJson { + [self.fsmAPP2MG notifyStateChange:state dataJson:dataJson listener:^(int retCode, const NSString *retMsg, const NSString *dataJson) { + NSLog(@"ISudFSMMG:notifyStateChange:retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); + RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; + if (retCode == 0 && [state isEqualToString:APP_COMMON_SELF_PLAYING]) {//开始游戏 + //上报游戏开始 + NSString *mgid = [NSString stringWithFormat:@"%lld", self.currentmgId]; + if (mgid.length <= 0) { + return; + } + [Api startGameCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code != 200) { + [XNDJTDDLoadingTool showErrorWithMessage:msg]; + } + } roomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] mgId:mgid]; + } else if (retCode == 0 && [state isEqualToString:APP_COMMON_SELF_END]) {//结束游戏 + + } + }]; +} + +/// 加入,退出游戏 +/// @param isIn YES:加入 NO:退出 +- (void)notifySelfInState:(BOOL)isIn uid:(NSInteger)uid { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(isIn), @"isIn", @(1), @"teamId", nil]; + [self notifyStateChange:APP_COMMON_SELF_IN dataJson:[SudCommon dictionaryToJson:dic]]; +} + +/// 加入,退出游戏 +/// @param isIn YES:加入 NO:退出 +- (void)notifySelfInState:(BOOL)isIn seatIndex:(int)seatIndex { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(seatIndex), @"seatIndex", @(isIn), @"isIn", @(1), @"teamId", nil]; + [self notifyStateChange:APP_COMMON_SELF_IN dataJson:[SudCommon dictionaryToJson:dic]]; +} + +/// 踢出用户 +/// @param userId 踢出用户id +- (void)notifyKickStateWithUserId:(NSString *)userId { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:userId, @"kickedUID", nil]; + [self notifyStateChange:APP_COMMON_SELF_KICK dataJson:[SudCommon dictionaryToJson:dic]]; +} + +/// 设置用户为队长 +/// @param userId 被设置用户id +- (void)notifySetCaptainStateWithUserId:(NSString *)userId { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:userId, @"curCaptainUID", nil]; + [self notifyStateChange:APP_COMMON_SELF_CAPTAIN dataJson:[SudCommon dictionaryToJson:dic]]; +} + +/// 命中 关键词状态 (你画我猜) +- (void)notifyChangeTextHitState:(NSString *)keyWord { + if([keyWord isKindOfClass:[NSNull class]])return; + if (keyWord.length && [keyWord containsString:self.DrawSomethingKeyWord]) { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(true), @"isHit", self.DrawSomethingKeyWord, @"keyWord", self.DrawSomethingKeyWord, @"text", nil]; + [self notifyStateChange:APP_COMMON_SELF_TEXT_HIT dataJson:[SudCommon dictionaryToJson:dic]]; + } +} + +/// 是否设置为准备状态 +- (void)notifySetReady:(BOOL)isReady { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(isReady), @"isReady", nil]; + [self notifyStateChange:APP_COMMON_SELF_READY dataJson:[SudCommon dictionaryToJson:dic]]; +} + +/// 停止游戏状态设置 +- (void)notifySetEnd { + [self notifyStateChange:APP_COMMON_SELF_END dataJson:[SudCommon dictionaryToJson:@{}]]; +} + +/// 游戏中状态设置 +- (void)notifyIsPlayingState:(BOOL)isPlaying { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(isPlaying), @"isPlaying", nil]; + [self notifyStateChange:APP_COMMON_SELF_PLAYING dataJson:[SudCommon dictionaryToJson:dic]]; +} + +///游戏中退出游戏 +- (void)nofityPlayerPlaying:(BOOL)isPlaying { + NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(isPlaying), @"isPlaying", nil]; + [self notifyStateChange:MG_COMMON_PLAYER_PLAYING dataJson:[SudCommon dictionaryToJson:dic]]; +} + +#pragma mark =======游戏->APP状态处理======= +- (void)handleState_MG_COMMON_PLAYER_IN_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + /// 加入状态:YES加入,NO退出 + BOOL isIn = NO; + if (dic) { + NSInteger retCode = [[dic objectForKey:@"retCode"] integerValue]; + if (retCode != 0) { + return; + } + isIn = [[dic objectForKey:@"isIn"] boolValue]; + } + if ([userId isEqualToString:[AccountInfoStorage instance].getUid]) {//是当前用户 + if (isIn) {//加入了游戏 + //判断是否在麦上 + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_IsIn]; + } else {//不在麦上 + [self upMicToJoinGame]; + } + //判断是否为房主,房主需要设为队长 + if (self.hostDelegate.getRoomInfo.uid == userId.integerValue) { + [self notifySetCaptainStateWithUserId:userId]; + } + self.sudGameStatus = LittleGamePlayStatus_IsIn; + }else {//退出了游戏 + //判断是否在麦上 + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_NoIn]; + } + self.sudGameStatus = LittleGamePlayStatus_NoIn; + } + } else {//退出游戏 + if (self.sudGameStatus == LittleGamePlayStatus_Plying) {//游戏进行中,用户退出 + ///自己是公会超管 + BOOL meIsSuperAdmin = NO; + for (GuildSuperAdminInfoModel *managerInfo in self.hostDelegate.getRoomSuperAdminList) { + if ([managerInfo.uid isEqualToString:[AccountInfoStorage instance].getUid]) { + meIsSuperAdmin = YES; + break; + } + } + NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + request.userIds = @[[AccountInfoStorage instance].getUid]; + [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { + if (error == nil) { + NIMChatroomMember *member = members.firstObject; + if (member.type == NIMChatroomMemberTypeManager || member.type == NIMChatroomMemberTypeCreator || meIsSuperAdmin) { + NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; + request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; + request.userIds = @[userId]; + [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { + if (error == nil) { + NIMChatroomMember *member = members.firstObject; + [XNDJTDDLoadingTool showErrorWithMessage:[NSString stringWithFormat:YMLocalizedString(@"XPRoomLittleGameContainerView9"), member.roomNickname]]; + } + }]; + } + } + }]; + + } + } +} + +- (void)handleState_MG_COMMON_PLAYER_READY_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 玩家是否准备,YES:已准备,NO:未准备 + BOOL isReady = NO; + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + if (dic) { + NSInteger retCode = [[dic objectForKey:@"retCode"] integerValue]; + if (retCode != 0) { + return; + } + isReady = [[dic objectForKey:@"isReady"] boolValue]; + } + if ([userId isEqualToString:[AccountInfoStorage instance].getUid]) { + if (isReady) { + //判断是否在麦上 + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_Ready]; + } + self.sudGameStatus = LittleGamePlayStatus_Ready; + }else { + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_IsIn]; + } + self.sudGameStatus = LittleGamePlayStatus_IsIn; + } + } +} + +- (void)handleState_MG_COMMON_PLAYER_CAPTAIN_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 是否是队长:YES:是队长 NO:不是队长 + BOOL isCaptain = NO; + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + if (dic) { + /// 错误处理 + NSInteger retCode = [[dic objectForKey:@"retCode"] integerValue]; + if (retCode != 0) { + return; + } + isCaptain = [[dic objectForKey:@"isCaptain"] boolValue]; + } +} + +- (void)handleState_MG_COMMON_PLAYER_PLAYING_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 是否正在游戏中 + BOOL isPlaying = NO; + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + if (dic) { + /// 错误处理 + NSInteger retCode = [[dic objectForKey:@"retCode"] integerValue]; + if (retCode != 0) { + return; + } + isPlaying = [[dic objectForKey:@"isPlaying"] boolValue]; + } + if ([userId isEqualToString:[AccountInfoStorage instance].getUid]) { + if (isPlaying) { + //判断是否在麦上 + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_Plying]; + } + if (self.delegate && [self.delegate respondsToSelector:@selector(hiddenSudGamePostionView)]) { + [self.delegate hiddenSudGamePostionView]; + } + self.sudGameStatus = LittleGamePlayStatus_Plying; + }else { + if ([self isOnMicro:[userId longLongValue]]) { + [self updateMicInfoWithGameStatus:LittleGamePlayStatus_IsIn]; + } + self.sudGameStatus = LittleGamePlayStatus_IsIn; + } + } +} + +- (void)handleState_MG_DG_SELECTING_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + NSLog(@"handleState_MG_DG_SELECTING_WithUserId%@",dataJson); +} + +- (void)handleState_MG_DG_PAINTING_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + NSLog(@"handleState_MG_DG_PAINTING_WithUserId%@",dataJson); + /// 设置麦位状态为作画中 + NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; + bool isPainting = NO; + if (dic) { + isPainting = [dic[@"isPainting"] boolValue]; + } +} + +- (void)handleState_MG_DG_ERRORANSWER_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 错误答案 + NSLog(@"handleState_MG_DG_ERRORANSWER_WithUserId%@",dataJson); + +} + +- (void)handleState_MG_DG_TOTALSCORE_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 总积分 + NSLog(@"handleState_MG_DG_TOTALSCORE_WithUserId%@",dataJson); +} + +- (void)handleState_MG_DG_SCORE_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { + /// 本次积分 + NSLog(@"handleState_MG_DG_SCORE_WithUserId%@",dataJson); +} + +/// 销毁MG +- (void)destroyMG { + if (self.hostDelegate.getRoomInfo.type == RoomType_MiniGame) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.fsmAPP2MG destroyMG]; + }); + } +} + +#pragma mark - RoomGuestDelegate +- (void)onRoomEntered { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) { + self.hidden = YES; + return; + } else { + self.hidden = NO; + } + [self updateSudGame]; +} + +- (void)onRoomUpdate { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) { + self.hidden = YES; + [self.fsmAPP2MG destroyMG]; + } else { + self.hidden = NO; + } + [self updateSudGame]; +} +#pragma mark - RoomGuestDelegate +- (void)handleNIMCustomMessage:(NIMMessage *)message { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) { + return; + } + NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; + if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { + AttachmentModel *attachment = (AttachmentModel *)obj.attachment; + if (attachment.first == CustomMessageType_Kick_User) { + XPKickUserModel * kickModel = [XPKickUserModel modelWithJSON:attachment.data]; + [self onDownMic:kickModel.uid]; + } else if(attachment.first == CustomMessageType_Queue && attachment.second == Custom_Message_Sub_Queue_Kick) { + XPKickUserModel * kickModel = [XPKickUserModel modelWithJSON:attachment.data]; + [self onDownMic:kickModel.uid]; + } + } +} + +- (void)handleNIMNotificationMessage:(NIMMessage *)message { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) {return;} + NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; + NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content; + switch (content.eventType) { + case NIMChatroomEventTypeQueueChange: // 麦序上下麦 + { + NSDictionary* data = (NSDictionary *)content.ext; + UserInfoModel* userInfo = [UserInfoModel modelWithJSON:[data objectForKey:NIMChatroomEventInfoQueueChangeItemValueKey]]; + NSInteger changeType = [data[NIMChatroomEventInfoQueueChangeTypeKey] integerValue]; + if (changeType != 1) { + [self onDownMic:userInfo.uid]; + } + } + break; + default: + break; + } +} + +- (void)handleNIMTextMessage:(NIMMessage *)message { + if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) {return;} + if (message.from.integerValue == [AccountInfoStorage instance].getUid.integerValue && [self isInSudGame]) { + [self notifyChangeTextHitState:message.text]; + } +} + + +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.h new file mode 100644 index 00000000..345c5015 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.h @@ -0,0 +1,21 @@ +// +// MSTabbarBeginGameView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import +#import "MSTabbarRoomGameModel.h" +NS_ASSUME_NONNULL_BEGIN +@protocol MSTabbarBeginGameViewDelegate +//开始游戏 +-(void)startMatchGameActionWithModel:(MSTabbarRoomGameItemModel *)model; + +@end +@interface MSTabbarBeginGameView : UIView +@property(nonatomic,weak) iddelegate; +@property(nonatomic,strong) MSTabbarRoomGameItemModel *itemModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.m new file mode 100644 index 00000000..ea627122 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarBeginGameView.m @@ -0,0 +1,174 @@ +// +// MSTabbarBeginGameView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarBeginGameView.h" +@interface MSTabbarBeginGameView() +@property(nonatomic,strong) UIImageView *bgImageView; +@property(nonatomic,strong) UIImageView *bgSubImageView; +@property(nonatomic,strong) UIView *bgCoinView; +@property(nonatomic,strong) UIImageView *coinImageView; +@property(nonatomic,strong) UILabel *coinNumView; +@property(nonatomic,strong) UIButton *beginBtn; +@property(nonatomic,strong) UIButton *ruleBtn; +@property(nonatomic,strong) UILabel *titleView; +@property(nonatomic,strong) UIButton *backBtn; +@end +@implementation MSTabbarBeginGameView +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.backBtn]; + [self addSubview:self.bgImageView]; + [self.bgImageView addSubview:self.titleView]; + [self.bgImageView addSubview:self.ruleBtn]; + [self.bgImageView addSubview:self.bgSubImageView]; + [self.bgSubImageView addSubview:self.bgCoinView]; + [self.bgCoinView addSubview:self.coinImageView]; + [self.bgCoinView addSubview:self.coinNumView]; + [self.bgSubImageView addSubview:self.beginBtn]; +} +-(void)installConstraints{ + [self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self); + }]; + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.bottom.equalTo(self); + make.height.mas_equalTo(kGetScaleWidth(252)); + }]; + [self.ruleBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(32)); + make.top.mas_equalTo(kGetScaleWidth(21)); + make.trailing.mas_equalTo(-kGetScaleWidth(21)); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(self.ruleBtn); + make.centerX.equalTo(self.bgImageView); + }]; + [self.bgSubImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(348)); + make.height.mas_equalTo(kGetScaleWidth(162)); + make.top.mas_equalTo(kGetScaleWidth(69)); + make.centerX.equalTo(self.bgImageView); + }]; + [self.bgCoinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kGetScaleWidth(44)); + make.width.mas_equalTo(kGetScaleWidth(297)); + make.top.mas_equalTo(kGetScaleWidth(20)); + make.centerX.equalTo(self.bgSubImageView); + }]; + [self.coinNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(self.bgCoinView); + make.centerX.equalTo(self.bgCoinView).offset(kGetScaleWidth(14)); + + }]; + [self.coinImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(22)); + make.centerY.equalTo(self.coinNumView); + make.trailing.equalTo(self.coinNumView.mas_leading).mas_offset(-kGetScaleWidth(6)); + }]; + [self.beginBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kGetScaleWidth(55)); + make.width.mas_equalTo(kGetScaleWidth(205)); + make.centerX.equalTo(self.bgSubImageView); + make.top.mas_equalTo(kGetScaleWidth(91)); + }]; +} +-(void)backBtnAction{ + [self removeFromSuperview]; +} +-(void)beginGameAction{ + [self backBtnAction]; + if(self.delegate && [self.delegate respondsToSelector:@selector(startMatchGameActionWithModel:)]){ + [self.delegate startMatchGameActionWithModel:self.itemModel]; + } +} +- (void)setItemModel:(MSTabbarRoomGameItemModel *)itemModel{ + _itemModel = itemModel; + _coinNumView.text = _itemModel.ticket; + _titleView.text = _itemModel.modeName; +} + +#pragma mark - 懒加载 +- (UIImageView *)bgImageView{ + if(!_bgImageView){ + _bgImageView = [UIImageView new]; + _bgImageView.image = kImage(@"ms_room_game_begin_bg"); + _bgImageView.userInteractionEnabled = YES; + } + return _bgImageView; +} +- (UIImageView *)bgSubImageView{ + if(!_bgSubImageView){ + _bgSubImageView = [UIImageView new]; + _bgSubImageView.image = kImage(@"ms_room_game_sub_begin_bg"); + _bgSubImageView.userInteractionEnabled = YES; + } + return _bgSubImageView; +} +- (UIView *)bgCoinView{ + if(!_bgCoinView){ + _bgCoinView = [UIView new]; + _bgCoinView.backgroundColor = UIColorFromRGB(0x00757B); + _bgCoinView.layer.cornerRadius = kGetScaleWidth(8); + _bgCoinView.layer.masksToBounds = YES; + } + return _bgCoinView; +} +- (UIImageView *)coinImageView{ + if(!_coinImageView){ + _coinImageView = [UIImageView new]; + _coinImageView.image = kImage(@"ms_room_game_begin_coin"); + } + return _coinImageView; +} +- (UILabel *)coinNumView{ + if(!_coinNumView){ + _coinNumView = [UILabel labelInitWithText:@"0" font:kFontBold(18) textColor:UIColorFromRGB(0xF2EF25)]; + } + return _coinNumView; +} +- (UIButton *)beginBtn{ + if(!_beginBtn){ + _beginBtn = [UIButton new]; + [_beginBtn setBackgroundImage:kImage(@"ms_room_game_begin_btn_bg") forState:UIControlStateNormal]; + [_beginBtn setTitle:YMLocalizedString(@"MSTabbarBeginGameView0") forState:UIControlStateNormal]; + [_beginBtn setTitleColor:UIColorFromRGB(0xA75906) forState:UIControlStateNormal]; + _beginBtn.titleLabel.font = kFontBold(20); + [_beginBtn addTarget:self action:@selector(beginGameAction) forControlEvents:UIControlEventTouchUpInside]; + } + + return _beginBtn; +} +- (UIButton *)ruleBtn{ + if(!_ruleBtn){ + _ruleBtn = [UIButton new]; + [_ruleBtn setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; + [_ruleBtn setBackgroundImage:kImage(@"ms_room_game_begin_rule_icon") forState:UIControlStateNormal]; + } + return _ruleBtn; +} +- (UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel labelInitWithText:@"" font:kFontBold(18) textColor:[UIColor whiteColor]]; + } + return _titleView; +} +- (UIButton *)backBtn{ + if(!_backBtn){ + _backBtn = [UIButton new]; + [_backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _backBtn; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.h new file mode 100644 index 00000000..762051c8 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.h @@ -0,0 +1,25 @@ +// +// MSTabbarRoomGameHeadView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import +#import "UserInfoModel.h" +#import "WalletInfoModel.h" +NS_ASSUME_NONNULL_BEGIN +@protocol MSTabbarRoomGameHeadViewDelegate +///点击充值 +-(void)clickPayAction; +///点击排行榜 +-(void)clickRankAction; + +@end +@interface MSTabbarRoomGameHeadView : UIView +@property(nonatomic,weak) iddelegate; +@property(nonatomic,strong) WalletInfoModel *coinModel; +@property(nonatomic,strong) UserInfoModel *userModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.m new file mode 100644 index 00000000..cfc13add --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameHeadView.m @@ -0,0 +1,170 @@ +// +// MSTabbarRoomGameHeadView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarRoomGameHeadView.h" +@interface MSTabbarRoomGameHeadView() +@property(nonatomic,strong) NetImageView *avatarView; +@property(nonatomic,strong) UIImageView *avatarBorderView; +@property(nonatomic,strong) UIView *bgIconView; +@property(nonatomic,strong) UIImageView *iconView; +@property(nonatomic,strong) UILabel *iconNumView; +@property(nonatomic,strong) UIImageView *addIconView; +@property(nonatomic,strong) UIImageView *rankIconView; +@property(nonatomic,strong) UILabel *rankTextView; +@end +@implementation MSTabbarRoomGameHeadView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.avatarView]; + [self.avatarView addSubview:self.avatarBorderView]; + [self addSubview:self.bgIconView]; + [self.bgIconView addSubview:self.iconView]; + [self.bgIconView addSubview:self.iconNumView]; + [self addSubview:self.addIconView]; + [self addSubview:self.rankIconView]; + [self.rankIconView addSubview:self.rankTextView]; +} +-(void)installConstraints{ + [self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(37)); + make.leading.mas_equalTo(kGetScaleWidth(19)); + make.centerY.equalTo(self); + }]; + [self.avatarBorderView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.avatarView); + }]; + [self.bgIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_greaterThanOrEqualTo(kGetScaleWidth(101)); + make.height.mas_equalTo(kGetScaleWidth(36)); + make.leading.equalTo(self.avatarView.mas_trailing).mas_offset(kGetScaleWidth(12)); + make.centerY.equalTo(self); + }]; + [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(22)); + make.leading.mas_equalTo(kGetScaleWidth(6)); + make.centerY.equalTo(self.bgIconView); + }]; + + [self.addIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(37)); + make.trailing.equalTo(self.bgIconView.mas_trailing).mas_offset(-kGetScaleWidth(0)); + make.centerY.equalTo(self.bgIconView); + }]; + [self.iconNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(30)); + make.trailing.mas_equalTo(-kGetScaleWidth(40)); + make.centerY.equalTo(self.bgIconView); + }]; + [self.rankIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(34)); + make.height.mas_equalTo(kGetScaleWidth(44)); + make.trailing.mas_equalTo(-kGetScaleWidth(22)); + make.centerY.equalTo(self.avatarView); + }]; + [self.rankTextView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(-kGetScaleWidth(2)); + make.leading.trailing.equalTo(self.rankIconView).inset(kGetScaleWidth(0)); + make.height.mas_equalTo(kGetScaleWidth(7)); + }]; +} +-(void)clickPayBtnction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(clickPayAction)]){ + [self.delegate clickPayAction]; + } +} +-(void)clickRankBtnAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(clickRankAction)]){ + [self.delegate clickRankAction]; + } +} +-(void)setUserModel:(UserInfoModel *)userModel{ + _userModel = userModel; + _avatarView.imageUrl = _userModel.avatar; +} +-(void)setCoinModel:(WalletInfoModel *)coinModel{ + _coinModel = coinModel; + _iconNumView.text = _coinModel.diamonds; +} +#pragma mark - 懒加载 +- (NetImageView *)avatarView{ + if(!_avatarView){ + NetImageConfig *config = [NetImageConfig new]; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _avatarView = [[NetImageView alloc]initWithConfig:config]; + _avatarView.layer.cornerRadius = kGetScaleWidth(37)/2; + _avatarView.layer.masksToBounds = YES; + } + return _avatarView; +} +- (UIImageView *)avatarBorderView{ + if(!_avatarBorderView){ + _avatarBorderView = [UIImageView new]; + _avatarBorderView.image = kImage(@"ms_room_game_avatar_border"); + } + return _avatarBorderView; +} +- (UIView *)bgIconView{ + if(!_bgIconView){ + _bgIconView = [UIView new]; + _bgIconView.backgroundColor = UIColorFromRGB(0xBFFCFF); + _bgIconView.layer.cornerRadius = kGetScaleWidth(36)/2; + _bgIconView.layer.masksToBounds = YES; + _bgIconView.layer.borderWidth = 0.5; + _bgIconView.layer.borderColor = UIColorFromRGB(0x6EF2F9).CGColor; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickPayBtnction)]; + [_bgIconView addGestureRecognizer:tap]; + } + return _bgIconView; +} +- (UIImageView *)iconView{ + if(!_iconView){ + _iconView = [UIImageView new]; + _iconView.image = kImage(@"ms_room_game_coin_icon"); + } + return _iconView; +} +- (UILabel *)iconNumView{ + if(!_iconNumView){ + _iconNumView = [UILabel labelInitWithText:@"0" font:kFontBold(17) textColor:UIColorFromRGB(0x273132)]; + _iconNumView.textAlignment = NSTextAlignmentCenter; + } + return _iconNumView; +} +-(UIImageView *)addIconView{ + if(!_addIconView){ + _addIconView = [UIImageView new]; + _addIconView.image = kImage(@"ms_room_game_add_coin"); + } + return _addIconView; +} +- (UIImageView *)rankIconView{ + if(!_rankIconView){ + _rankIconView = [UIImageView new]; + _rankIconView.image = kImage(@"ms_room_game_rank_coin"); + _rankIconView.userInteractionEnabled = YES; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickRankBtnAction)]; + [_rankIconView addGestureRecognizer:tap]; + } + return _rankIconView; +} +- (UILabel *)rankTextView{ + if(!_rankTextView){ + _rankTextView = [UILabel labelInitWithText:@"Rank" font:kFontBold(9) textColor:UIColorFromRGB(0xFFEB6F)]; + _rankTextView.adjustsFontSizeToFitWidth = YES; + _rankTextView.textAlignment = NSTextAlignmentCenter; + } + return _rankTextView; +} +@end diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.h b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.h new file mode 100644 index 00000000..f66be833 --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.h @@ -0,0 +1,24 @@ +// +// MSTabbarRoomGameView.h +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import +#import "MSTabbarRoomGameModel.h" +#import "MSTabbarRoomGameModel.h" +NS_ASSUME_NONNULL_BEGIN +@protocol MSTabbarRoomGameViewDelegate + +-(void)chooseGameType:(MSTabbarRoomGameItemModel *)model; + +@end + + +@interface MSTabbarRoomGameView : UIView +@property(nonatomic,strong) MSTabbarRoomGameModel *gameModel; +@property(nonatomic,weak) iddelegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m new file mode 100644 index 00000000..aa26fedd --- /dev/null +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m @@ -0,0 +1,89 @@ +// +// MSTabbarRoomGameView.m +// YuMi +// +// Created by duoban on 2024/5/27. +// + +#import "MSTabbarRoomGameView.h" +#import "MSTabbarRoomGameCell.h" +@interface MSTabbarRoomGameView() +@property(nonatomic,strong) UIImageView *topIconView; +@property(nonatomic,strong) UICollectionView *collectionView ; + +@end +@implementation MSTabbarRoomGameView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.topIconView]; + [self addSubview:self.collectionView]; + + +} +-(void)installConstraints{ + [self.topIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(0)); + make.width.mas_equalTo(kGetScaleWidth(142)); + make.height.mas_equalTo(kGetScaleWidth(113)); + make.centerX.equalTo(self); + }]; + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.bottom.equalTo(self); + make.top.equalTo(self.topIconView.mas_bottom).mas_offset(kGetScaleWidth(10)); + }]; +} +-(void)setGameModel:(MSTabbarRoomGameModel *)gameModel{ + _gameModel = gameModel; + [self.collectionView reloadData]; +} +#pragma mark -UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ + return self.gameModel.gameModes.count; +} +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ + MSTabbarRoomGameCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MSTabbarRoomGameCell class]) forIndexPath:indexPath]; + cell.itemMode = [self.gameModel.gameModes safeObjectAtIndex1:indexPath.row]; + return cell; +} +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ + MSTabbarRoomGameItemModel *itemModel = [self.gameModel.gameModes safeObjectAtIndex1:indexPath.row]; + if(self.delegate && [self.delegate respondsToSelector:@selector(chooseGameType:)]){ + [self.delegate chooseGameType:itemModel]; + } +} +#pragma mark - 懒加载 +- (UIImageView *)topIconView{ + if(!_topIconView){ + _topIconView = [UIImageView new]; + _topIconView.image = kImage(@"ms_room_game_top_icon"); + } + return _topIconView; +} + +- (UICollectionView *)collectionView{ + if (!_collectionView) { + MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init]; + layout.itemSize = CGSizeMake(kGetScaleWidth(179), kGetScaleWidth(247)); + layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0); + layout.minimumLineSpacing = kGetScaleWidth(18); + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.showsHorizontalScrollIndicator = NO; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.backgroundColor = [UIColor clearColor]; + [_collectionView registerClass:[MSTabbarRoomGameCell class] forCellWithReuseIdentifier:NSStringFromClass([MSTabbarRoomGameCell class])]; + } + return _collectionView; +} + + + +@end diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index 6c4a01f4..4ce7f762 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -667,9 +667,9 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出 } else { - self.quickMessageContainerView.hidden = NO; + self.quickMessageContainerView.hidden = YES; [self.quickMessageContainerView mas_updateConstraints:^(MASConstraintMaker *make) { - make.height.mas_equalTo(30); + make.height.mas_equalTo(0); }]; [self.stageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.leading.trailing.mas_equalTo(self.view); diff --git a/YuMi/Modules/YMTabbar/View/TabbarViewController.m b/YuMi/Modules/YMTabbar/View/TabbarViewController.m index 13cc4d0c..6fc2f826 100644 --- a/YuMi/Modules/YMTabbar/View/TabbarViewController.m +++ b/YuMi/Modules/YMTabbar/View/TabbarViewController.m @@ -65,6 +65,7 @@ #import "XPTaskCompleteTipView.h" #import "XPWebViewController.h" #import "XPMineUserInfoViewController.h" +#import "MSTabbarRoomGameVC.h" #import "XPMonentsRecommendViewController.h" #import "XPMonentsViewController.h" @@ -691,9 +692,9 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; - (void)initTabs:(BOOL)logined { self.viewControllers = nil; - NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"]; - NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"]; - NSArray *tabLabel = @[YMLocalizedString(@"TabbarViewController2"),YMLocalizedString(@"TabbarViewController3"),YMLocalizedString(@"TabbarViewController4"), YMLocalizedString(@"TabbarViewController5")]; + NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_gameHome_game_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"]; + NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_gameHome_game_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"]; + NSArray *tabLabel = @[YMLocalizedString(@"TabbarViewController2"),YMLocalizedString(@"TabbarViewController6"),YMLocalizedString(@"TabbarViewController3"),YMLocalizedString(@"TabbarViewController4"), YMLocalizedString(@"TabbarViewController5")]; UIViewController *game; UIViewController *msg; @@ -703,6 +704,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; ///取消检查ip定时器,释放XPNewHomeViewController [[NSNotificationCenter defaultCenter] postNotificationName:@"kInLoginVC" object:nil]; if (logined) { + game = [[MSTabbarRoomGameVC alloc]init]; msg = [[XPSessionMainViewController alloc] init]; home = [[XPNewHomeViewController alloc] init]; monents = [[XPMonentsViewController alloc] init]; @@ -715,10 +717,11 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; monents = [[XPBlankViewController alloc] init]; } [self createTabBarItem:home title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]]; - [self createTabBarItem:monents title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]]; - [self createTabBarItem:msg title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]]; - [self createTabBarItem:me title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]]; - self.viewControllers = @[home,monents,msg,me]; + [self createTabBarItem:game title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]]; + [self createTabBarItem:monents title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]]; + [self createTabBarItem:msg title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]]; + [self createTabBarItem:me title:tabLabel[4] image:normalImageNames[4] selectedImage:selectImageNames[4]]; + self.viewControllers = @[home,game,monents,msg,me]; self.selectedIndex = 0; } diff --git a/YuMi/zh-Hans.lproj/Localizable.strings b/YuMi/zh-Hans.lproj/Localizable.strings index 9a5efac1..5f573878 100644 --- a/YuMi/zh-Hans.lproj/Localizable.strings +++ b/YuMi/zh-Hans.lproj/Localizable.strings @@ -2155,6 +2155,7 @@ "TabbarViewController3" = "论坛"; "TabbarViewController4" = "消息"; "TabbarViewController5" = "我的"; +"TabbarViewController6" = "游戏"; "XPLoginPhoneViewController0" = "请输入正确的手机号"; "XPLoginPhoneViewController1" = "登录成功"; @@ -3266,6 +3267,15 @@ ///MSRoomSetingBackdropCell "MSRoomSetingBackdropCell0"="使用中"; "MSRoomSetingBackdropCell1"="确认选择这张图片作为房间主题吗?"; + //"XPIncomeRecordVC" "XPIncomeRecordVC0"="收益记录"; -"XPIncomeRecordVC1"="钱包"; +///MSTabbarBeginGameView +"MSTabbarBeginGameView0"="开始"; +///MSRoomGameVictoryView +"MSRoomGameVictoryView0"="重新匹配"; +///MSRoomGameQuitGameView +"MSRoomGameQuitGameView0"="游戏已经开始,退出房间将默认 游戏失败,确认退出房间?"; +"MSRoomGameQuitGameView1"="退出"; +"MSRoomGameQuitGameView2"="继续游戏"; + diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index c114bce1..257c3a1b 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -2150,7 +2150,7 @@ "TabbarViewController3" = "論壇"; "TabbarViewController4" = "消息"; "TabbarViewController5" = "我的"; - +"TabbarViewController6" = "遊戲"; "XPLoginPhoneViewController0" = "請輸入正確的手機號"; "XPLoginPhoneViewController1" = "登錄成功"; "XPLoginPhoneViewController2" = "驗證碼發送成功"; @@ -3259,3 +3259,11 @@ ///MSRoomSetingBackdropCell "MSRoomSetingBackdropCell0"="使用中"; "MSRoomSetingBackdropCell1"="確認選擇這張圖片作為房間主題嗎?"; +///MSTabbarBeginGameView +"MSTabbarBeginGameView0"="開始"; +///MSRoomGameVictoryView +"MSRoomGameVictoryView0"="重新匹配"; +///MSRoomGameQuitGameView +"MSRoomGameQuitGameView0"="遊戲已經開始,退出房間將默認 遊戲失敗,確認退出房間?"; +"MSRoomGameQuitGameView1"="退出"; +"MSRoomGameQuitGameView2"="繼續遊戲";