MultipleMaids.MaidUpdate.cs 902 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.Text.RegularExpressions;
  9. using ExIni;
  10. using UnityEngine;
  11. using UnityEngine.SceneManagement;
  12. using UnityInjector;
  13. using UnityInjector.Attributes;
  14. namespace CM3D2.MultipleMaids.Plugin
  15. {
  16. public partial class MultipleMaids
  17. {
  18. private void MaidUpdate()
  19. {
  20. if (isHaiti)
  21. {
  22. for (int i = 0; i < maxMaidCnt; i++)
  23. {
  24. if (gHandL[i])
  25. {
  26. HandL1[i] = null;
  27. UnityEngine.Object.Destroy(gHandL[i]);
  28. UnityEngine.Object.Destroy(gArmL[i]);
  29. UnityEngine.Object.Destroy(gFootL[i]);
  30. UnityEngine.Object.Destroy(gHizaL[i]);
  31. UnityEngine.Object.Destroy(gHandR[i]);
  32. UnityEngine.Object.Destroy(gArmR[i]);
  33. UnityEngine.Object.Destroy(gFootR[i]);
  34. UnityEngine.Object.Destroy(gHizaR[i]);
  35. UnityEngine.Object.Destroy(gClavicleL[i]);
  36. UnityEngine.Object.Destroy(gClavicleR[i]);
  37. UnityEngine.Object.Destroy(gNeck[i]);
  38. UnityEngine.Object.Destroy(gSpine[i]);
  39. UnityEngine.Object.Destroy(gSpine0a[i]);
  40. UnityEngine.Object.Destroy(gSpine1a[i]);
  41. UnityEngine.Object.Destroy(gSpine1[i]);
  42. UnityEngine.Object.Destroy(gPelvis[i]);
  43. }
  44. }
  45. for (int j = 0; j < maidCnt; j++)
  46. {
  47. Vector3 zero = Vector3.zero;
  48. Vector3 zero2 = Vector3.zero;
  49. if (selectList.Count <= 7)
  50. {
  51. if (selectList.Count % 2 == 1)
  52. {
  53. switch (j)
  54. {
  55. case 0:
  56. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  57. break;
  58. case 1:
  59. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  60. break;
  61. case 2:
  62. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  63. break;
  64. case 3:
  65. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  66. break;
  67. case 4:
  68. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  69. break;
  70. case 5:
  71. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  72. break;
  73. case 6:
  74. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  75. break;
  76. }
  77. }
  78. else
  79. {
  80. switch (j)
  81. {
  82. case 0:
  83. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  84. break;
  85. case 1:
  86. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  87. break;
  88. case 2:
  89. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  90. break;
  91. case 3:
  92. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  93. break;
  94. case 4:
  95. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  96. break;
  97. case 5:
  98. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  99. break;
  100. }
  101. }
  102. }
  103. else
  104. {
  105. float num = 0f;
  106. if (selectList.Count >= 11)
  107. {
  108. num = -0.4f;
  109. if (selectList.Count % 2 == 1)
  110. {
  111. switch (j)
  112. {
  113. case 0:
  114. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  115. break;
  116. case 1:
  117. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  118. break;
  119. case 2:
  120. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  121. break;
  122. case 3:
  123. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  124. break;
  125. case 4:
  126. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  127. break;
  128. case 5:
  129. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  130. break;
  131. case 6:
  132. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  133. break;
  134. case 7:
  135. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  136. break;
  137. case 8:
  138. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  139. break;
  140. case 9:
  141. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  142. break;
  143. case 10:
  144. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  145. break;
  146. case 11:
  147. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  148. break;
  149. case 12:
  150. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  151. break;
  152. default:
  153. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  154. break;
  155. }
  156. }
  157. else
  158. {
  159. switch (j)
  160. {
  161. case 0:
  162. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  163. break;
  164. case 1:
  165. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  166. break;
  167. case 2:
  168. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  169. break;
  170. case 3:
  171. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  172. break;
  173. case 4:
  174. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  175. break;
  176. case 5:
  177. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  178. break;
  179. case 6:
  180. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  181. break;
  182. case 7:
  183. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  184. break;
  185. case 8:
  186. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  187. break;
  188. case 9:
  189. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  190. break;
  191. case 10:
  192. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  193. break;
  194. case 11:
  195. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  196. break;
  197. case 12:
  198. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  199. break;
  200. case 13:
  201. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  202. break;
  203. default:
  204. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  205. break;
  206. }
  207. }
  208. }
  209. else if (selectList.Count >= 8)
  210. {
  211. if (selectList.Count >= 9)
  212. {
  213. num = -0.2f;
  214. }
  215. if (selectList.Count % 2 == 1)
  216. {
  217. switch (j)
  218. {
  219. case 0:
  220. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  221. break;
  222. case 1:
  223. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  224. break;
  225. case 2:
  226. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  227. break;
  228. case 3:
  229. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  230. break;
  231. case 4:
  232. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  233. break;
  234. case 5:
  235. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  236. break;
  237. case 6:
  238. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  239. break;
  240. case 7:
  241. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  242. break;
  243. case 8:
  244. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  245. break;
  246. }
  247. }
  248. else
  249. {
  250. switch (j)
  251. {
  252. case 0:
  253. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  254. break;
  255. case 1:
  256. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  257. break;
  258. case 2:
  259. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  260. break;
  261. case 3:
  262. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  263. break;
  264. case 4:
  265. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  266. break;
  267. case 5:
  268. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  269. break;
  270. case 6:
  271. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  272. break;
  273. case 7:
  274. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  275. break;
  276. case 8:
  277. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  278. break;
  279. case 9:
  280. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  281. break;
  282. }
  283. }
  284. }
  285. }
  286. zero2.y = (float)(Math.Atan2((double)maidArray[j].transform.position.x, (double)(maidArray[j].transform.position.z - 1.5f)) * 180.0 / 3.1415926535897931) + 180f;
  287. maidArray[j].SetRot(zero2);
  288. }
  289. isHaiti = false;
  290. }
  291. if (isYobidashi)
  292. {
  293. bool flag = false;
  294. for (int j = 0; j < maxMaidCnt; j++)
  295. {
  296. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  297. {
  298. flag = true;
  299. }
  300. }
  301. if (!flag)
  302. {
  303. for (int k = 0; k < selectList.Count; k++)
  304. {
  305. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  306. {
  307. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null)) && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] = GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  324. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  325. }
  326. else if (k == 0 && (int)selectList[k] == 0)
  327. {
  328. maidArray[k] = GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  329. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  330. }
  331. else if (k == 0)
  332. {
  333. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  334. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  335. }
  336. else if ((int)selectList[k] + 1 == 12)
  337. {
  338. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  339. if (!maidArray[k].body0.isLoadedBody)
  340. {
  341. maidArray[k].DutPropAll();
  342. maidArray[k].AllProcPropSeqStart();
  343. }
  344. maidArray[k].Visible = true;
  345. }
  346. else
  347. {
  348. maidArray[k] = GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  349. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  350. }
  351. if (maidArray[k] && maidArray[k].Visible)
  352. {
  353. maidArray[k].body0.boHeadToCam = true;
  354. maidArray[k].body0.boEyeToCam = true;
  355. }
  356. }
  357. }
  358. isHaiti = true;
  359. isYobidashi = false;
  360. }
  361. }
  362. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  363. {
  364. if (!isF7S)
  365. {
  366. isF7S = true;
  367. isF7SInit = true;
  368. bGui = false;
  369. base.Preferences["config"]["shift_f7"].Value = "true";
  370. base.SaveConfig();
  371. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  372. bgmCombo.selectedItemIndex = 2;
  373. }
  374. else
  375. {
  376. isF7S = false;
  377. base.Preferences["config"]["shift_f7"].Value = "false";
  378. base.SaveConfig();
  379. if (!isF7)
  380. {
  381. this.init2();
  382. okFlg = false;
  383. bGui = false;
  384. }
  385. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  386. }
  387. }
  388. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  389. {
  390. if (isF7S && !isF7)
  391. {
  392. okFlg = true;
  393. faceFlg = false;
  394. poseFlg = false;
  395. sceneFlg = false;
  396. kankyoFlg = false;
  397. kankyo2Flg = false;
  398. bGui = true;
  399. isGuiInit = true;
  400. isF7 = true;
  401. bgmCombo.selectedItemIndex = 2;
  402. }
  403. else if (isF7S && isF7)
  404. {
  405. bGui = false;
  406. isF7 = false;
  407. }
  408. else if (!isF7)
  409. {
  410. this.init();
  411. okFlg = true;
  412. isGuiInit = true;
  413. comboBoxControl.selectedItemIndex = 0;
  414. comboBoxList = new GUIContent[11];
  415. comboBoxList[0] = new GUIContent("通常");
  416. comboBoxList[1] = new GUIContent("横一列");
  417. comboBoxList[2] = new GUIContent("縦一列");
  418. comboBoxList[3] = new GUIContent("斜め");
  419. comboBoxList[4] = new GUIContent("円(外向き)");
  420. comboBoxList[5] = new GUIContent("円(内向き)");
  421. comboBoxList[6] = new GUIContent("扇");
  422. comboBoxList[7] = new GUIContent("V");
  423. comboBoxList[8] = new GUIContent("^");
  424. comboBoxList[9] = new GUIContent("M");
  425. comboBoxList[10] = new GUIContent("W");
  426. listStyle.normal.textColor = Color.white;
  427. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  428. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  429. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  430. listStyle.fontSize = this.GetPix(13);
  431. isYobidashi = true;
  432. bGui = true;
  433. isFadeOut = true;
  434. if (!isF7S)
  435. {
  436. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  437. }
  438. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  439. for (int i = 0; i < stockMaidList.Count; i++)
  440. {
  441. if (maidArray[0] == stockMaidList[i])
  442. {
  443. editMaid = i;
  444. }
  445. }
  446. selectList = new ArrayList();
  447. selectList.Add(editMaid);
  448. bgmCombo.selectedItemIndex = 2;
  449. try
  450. {
  451. shodaiFlg[(int)selectList[0]] = false;
  452. TMorph morph = maidArray[0].body0.Face.morph;
  453. float[] fieldValue = MultipleMaids.GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  454. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  455. }
  456. catch
  457. {
  458. shodaiFlg[(int)selectList[0]] = true;
  459. }
  460. if (!isVR)
  461. {
  462. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  463. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  464. }
  465. isF7 = true;
  466. }
  467. else
  468. {
  469. if (!isF7S)
  470. {
  471. this.init();
  472. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  473. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  474. okFlg = false;
  475. }
  476. else
  477. {
  478. isF7SInit = true;
  479. }
  480. bGui = false;
  481. isF7 = false;
  482. }
  483. }
  484. if (sceneLevel == 5 && isF7S && isF7SInit)
  485. {
  486. isF7SInit = false;
  487. this.init2();
  488. okFlg = true;
  489. ikMaid = 0;
  490. ikBui = 5;
  491. ikMode[0] = 0;
  492. bgmCombo.selectedItemIndex = 2;
  493. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  494. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  495. for (int i = 0; i < stockMaidList.Count; i++)
  496. {
  497. if (maidArray[0] == stockMaidList[i])
  498. {
  499. editMaid = i;
  500. }
  501. }
  502. selectList = new ArrayList();
  503. selectList.Add(editMaid);
  504. listStyle.normal.textColor = Color.white;
  505. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  506. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  507. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  508. listStyle.fontSize = this.GetPix(13);
  509. try
  510. {
  511. shodaiFlg[(int)selectList[0]] = false;
  512. TMorph morph = maidArray[0].body0.Face.morph;
  513. float[] fieldValue = MultipleMaids.GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  514. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  515. }
  516. catch
  517. {
  518. shodaiFlg[(int)selectList[0]] = true;
  519. }
  520. if (!isVR)
  521. {
  522. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  523. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  524. }
  525. bGui = false;
  526. }
  527. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  528. {
  529. GameObject gameObject = GameObject.Find("UI Root");
  530. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  531. if (!okFlg && !gameObject2.activeSelf)
  532. {
  533. return;
  534. }
  535. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  536. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  537. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  538. {
  539. characterMgr.GetStockMaidList()[k].Visible = false;
  540. }
  541. if (isPanel)
  542. {
  543. this.init();
  544. okFlg = true;
  545. isF7 = true;
  546. isPanel = false;
  547. isGuiInit = true;
  548. comboBoxControl.selectedItemIndex = 0;
  549. comboBoxList = new GUIContent[11];
  550. comboBoxList[0] = new GUIContent("通常");
  551. comboBoxList[1] = new GUIContent("横一列");
  552. comboBoxList[2] = new GUIContent("縦一列");
  553. comboBoxList[3] = new GUIContent("斜め");
  554. comboBoxList[4] = new GUIContent("円(外向き)");
  555. comboBoxList[5] = new GUIContent("円(内向き)");
  556. comboBoxList[6] = new GUIContent("扇");
  557. comboBoxList[7] = new GUIContent("V");
  558. comboBoxList[8] = new GUIContent("^");
  559. comboBoxList[9] = new GUIContent("M");
  560. comboBoxList[10] = new GUIContent("W");
  561. listStyle.normal.textColor = Color.white;
  562. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  563. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  564. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  565. listStyle.fontSize = this.GetPix(13);
  566. GameMain.Instance.BgMgr.ChangeBg("Theater");
  567. if (!isVR)
  568. {
  569. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  570. CameraMain cameraMain = GameMain.Instance.MainCamera;
  571. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  572. cameraMain.SetDistance(3f, true);
  573. }
  574. isYobidashi = true;
  575. bGui = false;
  576. isFadeOut = true;
  577. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  578. selectList = new ArrayList();
  579. selectList.Add(0);
  580. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  581. bgmCombo.selectedItemIndex = 0;
  582. }
  583. else
  584. {
  585. this.init();
  586. isPanel = true;
  587. isF7 = false;
  588. bGui = false;
  589. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  590. if (flag2)
  591. {
  592. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  593. }
  594. else
  595. {
  596. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  597. }
  598. if (!isVR)
  599. {
  600. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  601. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  602. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  603. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  604. }
  605. }
  606. gameObject2.SetActive(isPanel);
  607. }
  608. if (!okFlg)
  609. {
  610. if (maidArray[0] && maidArray[0].Visible)
  611. {
  612. int num3 = (int)maidArray[0].transform.position.y;
  613. if (num3 == 100)
  614. {
  615. okFlg = true;
  616. Vector3 vector = Vector3.zero;
  617. maidArray[0].SetPos(vector);
  618. isScript = true;
  619. }
  620. }
  621. else if (maidArray[0] && !maidArray[0].Visible)
  622. {
  623. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  624. }
  625. else if (!maidArray[0])
  626. {
  627. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  628. }
  629. }
  630. if (okFlg)
  631. {
  632. hFlg = false;
  633. mFlg = false;
  634. fFlg = false;
  635. sFlg = false;
  636. atFlg = false;
  637. yFlg = false;
  638. escFlg = false;
  639. maidCnt = 0;
  640. if (!cameraObj && !isVR)
  641. {
  642. cameraObj = new GameObject("subCamera");
  643. subcamera = cameraObj.AddComponent<Camera>();
  644. subcamera.CopyFrom(Camera.main);
  645. cameraObj.SetActive(true);
  646. subcamera.clearFlags = CameraClearFlags.Depth;
  647. subcamera.cullingMask = 256;
  648. subcamera.depth = 1f;
  649. subcamera.transform.parent = mainCamera.transform;
  650. float num2 = 2f;
  651. if (Application.unityVersion.StartsWith("4"))
  652. {
  653. num2 = 1f;
  654. }
  655. GameObject gameObject3 = new GameObject("Light");
  656. gameObject3.AddComponent<Light>();
  657. lightList.Add(gameObject3);
  658. lightColorR.Add(1f);
  659. lightColorG.Add(1f);
  660. lightColorB.Add(1f);
  661. lightIndex.Add(0);
  662. lightX.Add(40f);
  663. lightY.Add(180f);
  664. lightAkarusa.Add(num2);
  665. lightKage.Add(0.098f);
  666. lightRange.Add(50f);
  667. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  668. gameObject3.GetComponent<Light>().intensity = num2;
  669. gameObject3.GetComponent<Light>().spotAngle = 50f;
  670. gameObject3.GetComponent<Light>().range = 10f;
  671. gameObject3.GetComponent<Light>().type = LightType.Directional;
  672. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  673. gameObject3.GetComponent<Light>().cullingMask = 256;
  674. }
  675. if (this.getModKeyPressing(MultipleMaids.modKey.Shift) && !this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && !this.getModKeyPressing(MultipleMaids.modKey.Alt) && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W) && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y) && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  676. {
  677. float axis = Input.GetAxis("Mouse ScrollWheel");
  678. if (axis > 0f)
  679. {
  680. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  681. if (mainCamera.GetDistance() < 0.1f)
  682. {
  683. mainCamera.SetDistance(0.1f, true);
  684. }
  685. }
  686. else if (axis < 0f)
  687. {
  688. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  689. if (mainCamera.GetDistance() > 25f)
  690. {
  691. mainCamera.SetDistance(25f, true);
  692. }
  693. }
  694. }
  695. for (int j = 0; j < maxMaidCnt; j++)
  696. {
  697. if (maidArray[j] && maidArray[j].Visible)
  698. {
  699. maidCnt++;
  700. }
  701. }
  702. if (maidArray[0] != null && maidArray[0].Visible)
  703. {
  704. if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  705. {
  706. speed = 5f * Time.deltaTime * 60f;
  707. }
  708. else
  709. {
  710. speed = 1f * Time.deltaTime * 60f;
  711. }
  712. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  713. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  714. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  715. if (!isVR || isVR2)
  716. {
  717. if (!isVR)
  718. {
  719. if (isBloom)
  720. {
  721. Bloom fieldValue2 = MultipleMaids.GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  722. fieldValue2.enabled = true;
  723. fieldValue2.bloomIntensity = bloom1;
  724. fieldValue2.bloomBlurIterations = (int)bloom2;
  725. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  726. if (isBloomA)
  727. {
  728. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  729. }
  730. else
  731. {
  732. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  733. }
  734. isBloom2 = true;
  735. }
  736. else if (isBloom2)
  737. {
  738. isBloom2 = false;
  739. Bloom fieldValue2 = MultipleMaids.GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  740. fieldValue2.enabled = true;
  741. fieldValue2.bloomIntensity = 2.85f;
  742. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  743. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  744. fieldValue2.bloomBlurIterations = 3;
  745. }
  746. if (isDepth)
  747. {
  748. depth_field_.enabled = true;
  749. depth_field_.focalLength = depth1;
  750. depth_field_.focalSize = depth2;
  751. depth_field_.aperture = depth3;
  752. depth_field_.maxBlurSize = depth4;
  753. if (isDepthA)
  754. {
  755. depth_field_.visualizeFocus = true;
  756. }
  757. else
  758. {
  759. depth_field_.visualizeFocus = false;
  760. }
  761. }
  762. else
  763. {
  764. if (depth_field_ == null)
  765. {
  766. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  767. if (depth_field_.dofHdrShader == null)
  768. {
  769. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  770. }
  771. if (depth_field_.dx11BokehShader == null)
  772. {
  773. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  774. }
  775. if (depth_field_.dx11BokehTexture == null)
  776. {
  777. depth_field_.dx11BokehTexture = (Resources.Load("Textures/hexShape") as Texture2D);
  778. }
  779. }
  780. depth_field_.enabled = false;
  781. }
  782. if (isFog)
  783. {
  784. if (fog_.fogShader == null)
  785. {
  786. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  787. }
  788. fog_.enabled = true;
  789. fog_.startDistance = fog1;
  790. fog_.globalDensity = fog2;
  791. fog_.heightScale = fog3;
  792. fog_.height = fog4;
  793. fog_.globalFogColor.r = fog5;
  794. fog_.globalFogColor.g = fog6;
  795. fog_.globalFogColor.b = fog7;
  796. }
  797. else
  798. {
  799. if (fog_ == null)
  800. {
  801. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  802. }
  803. fog_.enabled = false;
  804. }
  805. if (isSepia != isSepian)
  806. {
  807. isSepia = isSepian;
  808. if (isSepia)
  809. {
  810. if (sepia_tone_.shader == null)
  811. {
  812. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  813. }
  814. sepia_tone_.enabled = true;
  815. }
  816. else
  817. {
  818. if (sepia_tone_ == null)
  819. {
  820. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  821. }
  822. sepia_tone_.enabled = false;
  823. }
  824. }
  825. if (bokashi > 0f)
  826. {
  827. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  828. component.enabled = true;
  829. component.blurSize = bokashi / 10f;
  830. component.blurIterations = 0;
  831. component.downsample = 0;
  832. if (bokashi > 3f)
  833. {
  834. component.blurSize -= 0.3f;
  835. component.blurIterations = 1;
  836. component.downsample = 1;
  837. }
  838. }
  839. else
  840. {
  841. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  842. component.enabled = false;
  843. }
  844. if (kamiyure > 0f)
  845. {
  846. for (int j = 0; j < maidCnt; j++)
  847. {
  848. Maid maid = maidArray[j];
  849. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  850. {
  851. if (maid.body0.goSlot[l].obj != null)
  852. {
  853. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  854. if (component2 != null && component2.enabled)
  855. {
  856. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  857. }
  858. }
  859. List<THair1> fieldValue3 = MultipleMaids.GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  860. for (int k = 0; k < fieldValue3.Count; k++)
  861. {
  862. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  863. }
  864. }
  865. }
  866. }
  867. if (isBlur)
  868. {
  869. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  870. component3.mode = Vignetting.AberrationMode.Simple;
  871. component3.intensity = blur1;
  872. component3.chromaticAberration = blur4;
  873. component3.blur = blur2;
  874. component3.blurSpread = blur3;
  875. component3.enabled = true;
  876. isBlur2 = true;
  877. }
  878. else if (isBlur2)
  879. {
  880. isBlur2 = false;
  881. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  882. component3.mode = Vignetting.AberrationMode.Simple;
  883. component3.intensity = -3.98f;
  884. component3.chromaticAberration = -0.75f;
  885. component3.axialAberration = 1.18f;
  886. component3.blurSpread = 4.19f;
  887. component3.luminanceDependency = 0.494f;
  888. component3.blurDistance = 1.71f;
  889. component3.enabled = false;
  890. }
  891. }
  892. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  893. {
  894. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  895. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  896. }
  897. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  898. {
  899. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  900. {
  901. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  902. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  903. }
  904. }
  905. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  906. {
  907. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  908. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  909. }
  910. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  911. {
  912. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  913. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  914. }
  915. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  916. {
  917. GameMain.Instance.MainLight.Reset();
  918. GameMain.Instance.MainLight.SetIntensity(0.95f);
  919. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  920. lightIndex[0] = 0;
  921. lightColorR[0] = 1f;
  922. lightColorG[0] = 1f;
  923. lightColorB[0] = 1f;
  924. lightX[0] = 40f;
  925. lightY[0] = 180f;
  926. lightAkarusa[0] = 0.95f;
  927. lightKage[0] = 0.098f;
  928. lightRange[0] = 50f;
  929. bgObject.SetActive(true);
  930. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  931. isIdx1 = false;
  932. isIdx2 = false;
  933. isIdx3 = false;
  934. isIdx4 = false;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  937. {
  938. List<float> list;
  939. (list = lightColorR)[0] = list[0] + 0.01f;
  940. if (lightColorR[0] > 1f)
  941. {
  942. lightColorR[0] = 1f;
  943. }
  944. if (lightIndex[0] != 3)
  945. {
  946. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  947. }
  948. else
  949. {
  950. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  951. }
  952. }
  953. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  954. {
  955. List<float> list;
  956. (list = lightColorG)[0] = list[0] + 0.01f;
  957. if (lightColorG[0] > 1f)
  958. {
  959. lightColorG[0] = 1f;
  960. }
  961. if (lightIndex[0] != 3)
  962. {
  963. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  964. }
  965. else
  966. {
  967. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  968. }
  969. }
  970. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  971. {
  972. List<float> list;
  973. (list = lightColorB)[0] = list[0] + 0.01f;
  974. if (lightColorB[0] > 1f)
  975. {
  976. lightColorB[0] = 1f;
  977. }
  978. if (lightIndex[0] != 3)
  979. {
  980. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  981. }
  982. else
  983. {
  984. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  985. }
  986. }
  987. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  988. {
  989. List<float> list;
  990. (list = lightColorR)[0] = list[0] - 0.01f;
  991. if (lightColorR[0] < 0f)
  992. {
  993. lightColorR[0] = 0f;
  994. }
  995. if (lightIndex[0] != 3)
  996. {
  997. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  998. }
  999. else
  1000. {
  1001. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1002. }
  1003. }
  1004. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1005. {
  1006. List<float> list;
  1007. (list = lightColorG)[0] = list[0] - 0.01f;
  1008. if (lightColorG[0] < 0f)
  1009. {
  1010. lightColorG[0] = 0f;
  1011. }
  1012. if (lightIndex[0] != 3)
  1013. {
  1014. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1015. }
  1016. else
  1017. {
  1018. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1019. }
  1020. }
  1021. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1022. {
  1023. List<float> list;
  1024. (list = lightColorB)[0] = list[0] - 0.01f;
  1025. if (lightColorB[0] < 0f)
  1026. {
  1027. lightColorB[0] = 0f;
  1028. }
  1029. if (lightIndex[0] != 3)
  1030. {
  1031. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1032. }
  1033. else
  1034. {
  1035. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1036. }
  1037. }
  1038. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1039. {
  1040. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1041. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1042. }
  1043. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1044. {
  1045. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1046. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1047. }
  1048. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1049. {
  1050. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1051. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1052. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1053. }
  1054. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1055. {
  1056. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1057. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1058. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1059. }
  1060. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1061. {
  1062. List<int> list2;
  1063. (list2 = lightIndex)[0] = list2[0] + 1;
  1064. if (lightIndex[0] == 4)
  1065. {
  1066. lightIndex[0] = 0;
  1067. }
  1068. lightColorR[0] = 1f;
  1069. lightColorG[0] = 1f;
  1070. lightColorB[0] = 1f;
  1071. lightX[0] = 40f;
  1072. lightY[0] = 180f;
  1073. lightAkarusa[0] = 0.95f;
  1074. lightKage[0] = 0.098f;
  1075. lightRange[0] = 50f;
  1076. GameMain.Instance.MainLight.Reset();
  1077. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1078. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1079. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1080. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1081. if (lightIndex[0] == 0)
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1084. bgObject.SetActive(true);
  1085. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1086. }
  1087. else if (lightIndex[0] == 1)
  1088. {
  1089. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1090. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1091. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1092. }
  1093. else if (lightIndex[0] == 2)
  1094. {
  1095. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1096. }
  1097. else if (lightIndex[0] == 3)
  1098. {
  1099. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1100. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1101. bgObject.SetActive(false);
  1102. }
  1103. isIdx1 = false;
  1104. isIdx2 = false;
  1105. isIdx3 = false;
  1106. isIdx4 = false;
  1107. }
  1108. }
  1109. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1110. {
  1111. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1112. }
  1113. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1114. {
  1115. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1116. {
  1117. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1118. }
  1119. }
  1120. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1123. }
  1124. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1125. {
  1126. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1127. }
  1128. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1129. {
  1130. GameMain.Instance.MainLight.Reset();
  1131. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1132. }
  1133. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1134. {
  1135. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1136. }
  1137. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1138. {
  1139. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1140. }
  1141. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1142. {
  1143. if (lightIndex[0] == 1)
  1144. {
  1145. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1146. }
  1147. else
  1148. {
  1149. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1150. }
  1151. }
  1152. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1153. {
  1154. if (lightIndex[0] == 1)
  1155. {
  1156. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1157. }
  1158. else
  1159. {
  1160. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1161. }
  1162. }
  1163. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1164. {
  1165. List<int> list2;
  1166. (list2 = lightIndex)[0] = list2[0] + 1;
  1167. if (lightIndex[0] == 3)
  1168. {
  1169. lightIndex[0] = 0;
  1170. }
  1171. GameMain.Instance.MainLight.Reset();
  1172. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1173. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1174. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1175. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1176. if (lightIndex[0] == 0)
  1177. {
  1178. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1179. }
  1180. else if (lightIndex[0] == 1)
  1181. {
  1182. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1183. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1184. }
  1185. else if (lightIndex[0] == 2)
  1186. {
  1187. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1188. }
  1189. }
  1190. int i;
  1191. for (i = 0; i < lightList.Count; i++)
  1192. {
  1193. if (i > 0)
  1194. {
  1195. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1196. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1197. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1198. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1199. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !this.getModKeyPressing(MultipleMaids.modKey.Shift)))
  1200. {
  1201. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1202. }
  1203. }
  1204. else
  1205. {
  1206. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1208. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !this.getModKeyPressing(MultipleMaids.modKey.Shift)))
  1209. {
  1210. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1211. }
  1212. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1213. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1214. if (lightIndex[i] != 3)
  1215. {
  1216. GameMain.Instance.MainLight.GetComponent<Light>().color = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1217. }
  1218. else
  1219. {
  1220. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1221. }
  1222. }
  1223. }
  1224. bool flag3 = false;
  1225. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12) || (Input.GetKey(KeyCode.Q) && this.getModKeyPressing(MultipleMaids.modKey.Shift))))
  1226. {
  1227. for (i = 0; i < maidCnt; i++)
  1228. {
  1229. if (goSlot[(int)selectList[i]] != null)
  1230. {
  1231. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1232. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1233. {
  1234. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1235. }
  1236. }
  1237. }
  1238. }
  1239. for (int j = 0; j < maidCnt; j++)
  1240. {
  1241. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1242. {
  1243. bool flag4 = shodaiFlg[(int)selectList[j]];
  1244. shodaiFlg[(int)selectList[j]] = false;
  1245. try
  1246. {
  1247. TMorph morph = maidArray[j].body0.Face.morph;
  1248. float[] fieldValue = MultipleMaids.GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1249. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1250. }
  1251. catch
  1252. {
  1253. shodaiFlg[(int)selectList[j]] = true;
  1254. }
  1255. if (shodaiFlg[(int)selectList[j]] != flag4)
  1256. {
  1257. if (!isVR)
  1258. {
  1259. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1260. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1261. }
  1262. }
  1263. }
  1264. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1265. {
  1266. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1267. }
  1268. if (sceneLevel == 5)
  1269. {
  1270. if (editSelectMaid == maidArray[j])
  1271. {
  1272. flag3 = true;
  1273. }
  1274. }
  1275. Maid maid = maidArray[j];
  1276. }
  1277. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1278. {
  1279. isEditNo = 0;
  1280. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1281. MultipleMaids.SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1282. }
  1283. i = 0;
  1284. while (i < maidCnt)
  1285. {
  1286. Transform transform = maidArray[i].transform;
  1287. Maid maid = maidArray[i];
  1288. if (cafeFlg[i])
  1289. {
  1290. cafeCount[i]++;
  1291. if (cafeCount[i] > 1)
  1292. {
  1293. maid.DelProp(MPN.handitem, true);
  1294. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1295. maid.AllProcPropSeqStart();
  1296. cafeFlg[i] = false;
  1297. cafeCount[i] = 0;
  1298. }
  1299. }
  1300. KeyCode key;
  1301. if (i >= 14)
  1302. {
  1303. bool flag5 = false;
  1304. bool flag6 = false;
  1305. for (int k = 0; k < keyArray.Length; k++)
  1306. {
  1307. if (Input.GetKey(keyArray[k]))
  1308. {
  1309. flag5 = true;
  1310. break;
  1311. }
  1312. if (Input.GetKeyUp(keyArray[k]))
  1313. {
  1314. flag6 = true;
  1315. break;
  1316. }
  1317. }
  1318. key = keyArray[6];
  1319. if (!flag5 || this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  1320. {
  1321. if (!flag6 || this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  1322. {
  1323. goto IL_49FE;
  1324. }
  1325. idoFlg[i - 7] = false;
  1326. }
  1327. }
  1328. else if (i >= 7)
  1329. {
  1330. bool flag5 = false;
  1331. bool flag6 = false;
  1332. for (int k = 0; k < keyArray.Length; k++)
  1333. {
  1334. if (Input.GetKey(keyArray[k]))
  1335. {
  1336. flag5 = true;
  1337. break;
  1338. }
  1339. if (Input.GetKeyUp(keyArray[k]))
  1340. {
  1341. flag6 = true;
  1342. break;
  1343. }
  1344. }
  1345. key = keyArray[i - 7];
  1346. if (!flag5 || this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  1347. {
  1348. if (!flag6 || this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  1349. {
  1350. goto IL_49FE;
  1351. }
  1352. idoFlg[i - 7] = false;
  1353. }
  1354. }
  1355. else
  1356. {
  1357. bool flag5 = false;
  1358. for (int k = 0; k < keyArray.Length; k++)
  1359. {
  1360. if (Input.GetKey(keyArray[k]))
  1361. {
  1362. flag5 = true;
  1363. break;
  1364. }
  1365. }
  1366. if (!flag5 || !this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  1367. {
  1368. key = keyArray[i];
  1369. goto IL_49FE;
  1370. }
  1371. }
  1372. IL_1688E:
  1373. i++;
  1374. continue;
  1375. IL_49FE:
  1376. if (xFlg[i])
  1377. {
  1378. if (!maid.AudioMan.audiosource.isPlaying)
  1379. {
  1380. if (maid.status.personal.uniqueName == "Pride")
  1381. {
  1382. string text = "s0_";
  1383. System.Random random = new System.Random();
  1384. int num4 = random.Next(10000);
  1385. bool flag7 = false;
  1386. for (int k = 0; k < tunArray.Length; k++)
  1387. {
  1388. if (tunArray[k] == num4)
  1389. {
  1390. flag7 = true;
  1391. break;
  1392. }
  1393. }
  1394. if (!flag7)
  1395. {
  1396. text = text + "0" + num4.ToString() + ".ogg";
  1397. if (GameUty.FileSystem.IsExistentFile(text))
  1398. {
  1399. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1400. }
  1401. }
  1402. }
  1403. if (maid.status.personal.uniqueName == "Cool")
  1404. {
  1405. string text = "s1_";
  1406. System.Random random = new System.Random();
  1407. int num4 = random.Next(10000);
  1408. bool flag7 = false;
  1409. for (int k = 0; k < coolArray.Length; k++)
  1410. {
  1411. if (coolArray[k] == num4)
  1412. {
  1413. flag7 = true;
  1414. break;
  1415. }
  1416. }
  1417. if (!flag7)
  1418. {
  1419. text = text + "0" + num4.ToString() + ".ogg";
  1420. if (GameUty.FileSystem.IsExistentFile(text))
  1421. {
  1422. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1423. }
  1424. }
  1425. }
  1426. if (maid.status.personal.uniqueName == "Pure")
  1427. {
  1428. string text = "s2_";
  1429. System.Random random = new System.Random();
  1430. int num4 = random.Next(10000);
  1431. bool flag7 = false;
  1432. for (int k = 0; k < pureArray.Length; k++)
  1433. {
  1434. if (pureArray[k] == num4)
  1435. {
  1436. flag7 = true;
  1437. break;
  1438. }
  1439. }
  1440. if (!flag7)
  1441. {
  1442. text = text + "0" + num4.ToString() + ".ogg";
  1443. if (GameUty.FileSystem.IsExistentFile(text))
  1444. {
  1445. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1446. }
  1447. }
  1448. }
  1449. if (maid.status.personal.uniqueName == "Yandere")
  1450. {
  1451. string text = "s3_";
  1452. System.Random random = new System.Random();
  1453. int num4 = random.Next(10000);
  1454. bool flag7 = false;
  1455. for (int k = 0; k < yanArray.Length; k++)
  1456. {
  1457. if (yanArray[k] == num4)
  1458. {
  1459. flag7 = true;
  1460. break;
  1461. }
  1462. }
  1463. if (!flag7)
  1464. {
  1465. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1466. if (GameUty.FileSystem.IsExistentFile(text))
  1467. {
  1468. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1469. }
  1470. }
  1471. }
  1472. if (maid.status.personal.uniqueName == "Muku")
  1473. {
  1474. string text = "h0_";
  1475. System.Random random = new System.Random();
  1476. int num4 = random.Next(10000);
  1477. bool flag7 = false;
  1478. for (int k = 0; k < h0Array.Length; k++)
  1479. {
  1480. if (h0Array[k] == num4)
  1481. {
  1482. flag7 = true;
  1483. break;
  1484. }
  1485. }
  1486. if (flag7)
  1487. {
  1488. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1489. if (GameUty.FileSystem.IsExistentFile(text))
  1490. {
  1491. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1492. }
  1493. }
  1494. }
  1495. if (maid.status.personal.uniqueName == "Majime")
  1496. {
  1497. string text = "h1_";
  1498. System.Random random = new System.Random();
  1499. int num4 = random.Next(10000);
  1500. bool flag7 = false;
  1501. for (int k = 0; k < h1Array.Length; k++)
  1502. {
  1503. if (h1Array[k] == num4)
  1504. {
  1505. flag7 = true;
  1506. break;
  1507. }
  1508. }
  1509. if (flag7)
  1510. {
  1511. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1512. if (GameUty.FileSystem.IsExistentFile(text))
  1513. {
  1514. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1515. }
  1516. }
  1517. }
  1518. if (maid.status.personal.uniqueName == "Rindere")
  1519. {
  1520. string text = "h2_";
  1521. System.Random random = new System.Random();
  1522. int num4 = random.Next(10000);
  1523. bool flag7 = false;
  1524. for (int k = 0; k < h2Array.Length; k++)
  1525. {
  1526. if (h2Array[k] == num4)
  1527. {
  1528. flag7 = true;
  1529. break;
  1530. }
  1531. }
  1532. if (flag7)
  1533. {
  1534. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1535. if (GameUty.FileSystem.IsExistentFile(text))
  1536. {
  1537. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1538. }
  1539. }
  1540. }
  1541. }
  1542. }
  1543. if (zFlg[i])
  1544. {
  1545. if (!maid.AudioMan.audiosource.isPlaying)
  1546. {
  1547. string text = "";
  1548. if (maid.status.personal.uniqueName == "Pride")
  1549. {
  1550. text = "s0_";
  1551. System.Random random = new System.Random();
  1552. int num4 = random.Next(tunArray.Length);
  1553. object obj = text;
  1554. text = string.Concat(new object[]
  1555. {
  1556. obj,
  1557. "0",
  1558. tunArray[num4],
  1559. ".ogg"
  1560. });
  1561. }
  1562. if (maid.status.personal.uniqueName == "Cool")
  1563. {
  1564. text = "s1_";
  1565. System.Random random = new System.Random();
  1566. int num4 = random.Next(coolArray.Length);
  1567. object obj = text;
  1568. text = string.Concat(new object[]
  1569. {
  1570. obj,
  1571. "0",
  1572. coolArray[num4],
  1573. ".ogg"
  1574. });
  1575. }
  1576. if (maid.status.personal.uniqueName == "Pure")
  1577. {
  1578. text = "s2_";
  1579. System.Random random = new System.Random();
  1580. int num4 = random.Next(pureArray.Length);
  1581. object obj = text;
  1582. text = string.Concat(new object[]
  1583. {
  1584. obj,
  1585. "0",
  1586. pureArray[num4],
  1587. ".ogg"
  1588. });
  1589. }
  1590. if (maid.status.personal.uniqueName == "Yandere")
  1591. {
  1592. text = "s3_";
  1593. System.Random random = new System.Random();
  1594. int num4 = random.Next(yanArray.Length);
  1595. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1596. }
  1597. if (maid.status.personal.uniqueName == "Muku")
  1598. {
  1599. text = "h0_";
  1600. System.Random random = new System.Random();
  1601. int num4 = random.Next(h0tArray.Length);
  1602. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1603. }
  1604. if (maid.status.personal.uniqueName == "Majime")
  1605. {
  1606. text = "h1_";
  1607. System.Random random = new System.Random();
  1608. int num4 = random.Next(h1tArray.Length);
  1609. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1610. }
  1611. if (maid.status.personal.uniqueName == "Rindere")
  1612. {
  1613. text = "h2_";
  1614. System.Random random = new System.Random();
  1615. int num4 = random.Next(h2tArray.Length);
  1616. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1617. }
  1618. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1619. }
  1620. }
  1621. if (!isVR || isVR2)
  1622. {
  1623. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1624. {
  1625. ikMaid = i;
  1626. isIK[i] = true;
  1627. ikBui = 1;
  1628. ikMode[i] = 0;
  1629. this.SetIK(maid, i);
  1630. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1631. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1632. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1633. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1634. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1635. idoFlg[i] = true;
  1636. if (i >= 7)
  1637. {
  1638. idoFlg[i - 7] = true;
  1639. }
  1640. qFlg = true;
  1641. }
  1642. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 2;
  1647. ikMode[i] = 0;
  1648. this.SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. }
  1660. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1661. {
  1662. ikMaid = i;
  1663. isIK[i] = true;
  1664. ikBui = 3;
  1665. ikMode[i] = 0;
  1666. this.SetIK(maid, i);
  1667. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1668. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1669. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1670. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1671. idoFlg[i] = true;
  1672. if (i >= 7)
  1673. {
  1674. idoFlg[i - 7] = true;
  1675. }
  1676. }
  1677. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1678. {
  1679. ikMaid = i;
  1680. isIK[i] = true;
  1681. ikBui = 4;
  1682. ikMode[i] = 0;
  1683. this.SetIK(maid, i);
  1684. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1685. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1686. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1687. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1688. idoFlg[i] = true;
  1689. if (i >= 7)
  1690. {
  1691. idoFlg[i - 7] = true;
  1692. }
  1693. sFlg = true;
  1694. }
  1695. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1696. {
  1697. maid.body0.transform.localRotation = Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1698. if (i >= 7)
  1699. {
  1700. idoFlg[i - 7] = true;
  1701. }
  1702. idoFlg[i] = true;
  1703. }
  1704. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1705. {
  1706. maid.body0.transform.localRotation = Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1707. if (i >= 7)
  1708. {
  1709. idoFlg[i - 7] = true;
  1710. }
  1711. idoFlg[i] = true;
  1712. }
  1713. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1714. {
  1715. bGui = true;
  1716. isPoseInit = true;
  1717. isGuiInit = true;
  1718. poseFlg = true;
  1719. faceFlg = false;
  1720. sceneFlg = false;
  1721. kankyoFlg = false;
  1722. kankyo2Flg = false;
  1723. fFlg = true;
  1724. for (int k = 0; k < maidCnt; k++)
  1725. {
  1726. if (maid == maidArray[k])
  1727. {
  1728. selectMaidIndex = k;
  1729. }
  1730. }
  1731. copyIndex = 0;
  1732. if (i >= 7)
  1733. {
  1734. idoFlg[i - 7] = true;
  1735. }
  1736. idoFlg[i] = true;
  1737. }
  1738. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1739. {
  1740. bGui = true;
  1741. isFaceInit = true;
  1742. isGuiInit = true;
  1743. faceFlg = true;
  1744. poseFlg = false;
  1745. sceneFlg = false;
  1746. kankyoFlg = false;
  1747. kankyo2Flg = false;
  1748. maid.boMabataki = false;
  1749. for (int k = 0; k < maidCnt; k++)
  1750. {
  1751. if (maid == maidArray[k])
  1752. {
  1753. selectMaidIndex = k;
  1754. }
  1755. }
  1756. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1757. if (i >= 7)
  1758. {
  1759. idoFlg[i - 7] = true;
  1760. }
  1761. idoFlg[i] = true;
  1762. }
  1763. else if (Input.GetKey(key) && this.getModKeyPressing(MultipleMaids.modKey.Shift) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1764. {
  1765. if (!xFlg[i])
  1766. {
  1767. xFlg[i] = true;
  1768. zFlg[i] = false;
  1769. if (maid.status.personal.uniqueName == "Pride")
  1770. {
  1771. string text = "s0_";
  1772. System.Random random = new System.Random();
  1773. int num4 = random.Next(10000);
  1774. bool flag7 = false;
  1775. for (int k = 0; k < tunArray.Length; k++)
  1776. {
  1777. if (tunArray[k] == num4)
  1778. {
  1779. flag7 = true;
  1780. break;
  1781. }
  1782. }
  1783. if (!flag7)
  1784. {
  1785. text = text + "0" + num4.ToString() + ".ogg";
  1786. if (GameUty.FileSystem.IsExistentFile(text))
  1787. {
  1788. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1789. }
  1790. }
  1791. }
  1792. if (maid.status.personal.uniqueName == "Cool")
  1793. {
  1794. string text = "s1_";
  1795. System.Random random = new System.Random();
  1796. int num4 = random.Next(10000);
  1797. bool flag7 = false;
  1798. for (int k = 0; k < coolArray.Length; k++)
  1799. {
  1800. if (coolArray[k] == num4)
  1801. {
  1802. flag7 = true;
  1803. break;
  1804. }
  1805. }
  1806. if (!flag7)
  1807. {
  1808. text = text + "0" + num4.ToString() + ".ogg";
  1809. if (GameUty.FileSystem.IsExistentFile(text))
  1810. {
  1811. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1812. }
  1813. }
  1814. }
  1815. if (maid.status.personal.uniqueName == "Pure")
  1816. {
  1817. string text = "s2_";
  1818. System.Random random = new System.Random();
  1819. int num4 = random.Next(10000);
  1820. bool flag7 = false;
  1821. for (int k = 0; k < pureArray.Length; k++)
  1822. {
  1823. if (pureArray[k] == num4)
  1824. {
  1825. flag7 = true;
  1826. break;
  1827. }
  1828. }
  1829. if (!flag7)
  1830. {
  1831. text = text + "0" + num4.ToString() + ".ogg";
  1832. if (GameUty.FileSystem.IsExistentFile(text))
  1833. {
  1834. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1835. }
  1836. }
  1837. }
  1838. if (maid.status.personal.uniqueName == "Yandere")
  1839. {
  1840. string text = "s3_";
  1841. System.Random random = new System.Random();
  1842. int num4 = random.Next(10000);
  1843. bool flag7 = false;
  1844. for (int k = 0; k < yanArray.Length; k++)
  1845. {
  1846. if (yanArray[k] == num4)
  1847. {
  1848. flag7 = true;
  1849. break;
  1850. }
  1851. }
  1852. if (!flag7)
  1853. {
  1854. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1855. if (GameUty.FileSystem.IsExistentFile(text))
  1856. {
  1857. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1858. }
  1859. }
  1860. }
  1861. if (maid.status.personal.uniqueName == "Muku")
  1862. {
  1863. string text = "h0_";
  1864. System.Random random = new System.Random();
  1865. int num4 = random.Next(10000);
  1866. bool flag7 = false;
  1867. for (int k = 0; k < h0Array.Length; k++)
  1868. {
  1869. if (h0Array[k] == num4)
  1870. {
  1871. flag7 = true;
  1872. break;
  1873. }
  1874. }
  1875. if (flag7)
  1876. {
  1877. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1878. if (GameUty.FileSystem.IsExistentFile(text))
  1879. {
  1880. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1881. }
  1882. }
  1883. }
  1884. if (maid.status.personal.uniqueName == "Majime")
  1885. {
  1886. string text = "h1_";
  1887. System.Random random = new System.Random();
  1888. int num4 = random.Next(10000);
  1889. bool flag7 = false;
  1890. for (int k = 0; k < h1Array.Length; k++)
  1891. {
  1892. if (h1Array[k] == num4)
  1893. {
  1894. flag7 = true;
  1895. break;
  1896. }
  1897. }
  1898. if (flag7)
  1899. {
  1900. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1901. if (GameUty.FileSystem.IsExistentFile(text))
  1902. {
  1903. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1904. }
  1905. }
  1906. }
  1907. if (maid.status.personal.uniqueName == "Rindere")
  1908. {
  1909. string text = "h2_";
  1910. System.Random random = new System.Random();
  1911. int num4 = random.Next(10000);
  1912. bool flag7 = false;
  1913. for (int k = 0; k < h2Array.Length; k++)
  1914. {
  1915. if (h2Array[k] == num4)
  1916. {
  1917. flag7 = true;
  1918. break;
  1919. }
  1920. }
  1921. if (flag7)
  1922. {
  1923. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1924. if (GameUty.FileSystem.IsExistentFile(text))
  1925. {
  1926. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1927. }
  1928. }
  1929. }
  1930. }
  1931. else
  1932. {
  1933. xFlg[i] = false;
  1934. maid.AudioMan.Clear();
  1935. }
  1936. idoFlg[i] = true;
  1937. if (i >= 7)
  1938. {
  1939. idoFlg[i - 7] = true;
  1940. }
  1941. }
  1942. else if (Input.GetKey(key) && this.getModKeyPressing(MultipleMaids.modKey.Shift) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1943. {
  1944. if (!zFlg[i])
  1945. {
  1946. zFlg[i] = true;
  1947. xFlg[i] = false;
  1948. string text = "";
  1949. if (maid.status.personal.uniqueName == "Pride")
  1950. {
  1951. text = "s0_";
  1952. System.Random random = new System.Random();
  1953. int num4 = random.Next(tunArray.Length);
  1954. object obj = text;
  1955. text = string.Concat(new object[]
  1956. {
  1957. obj,
  1958. "0",
  1959. tunArray[num4],
  1960. ".ogg"
  1961. });
  1962. }
  1963. if (maid.status.personal.uniqueName == "Cool")
  1964. {
  1965. text = "s1_";
  1966. System.Random random = new System.Random();
  1967. int num4 = random.Next(coolArray.Length);
  1968. object obj = text;
  1969. text = string.Concat(new object[]
  1970. {
  1971. obj,
  1972. "0",
  1973. coolArray[num4],
  1974. ".ogg"
  1975. });
  1976. }
  1977. if (maid.status.personal.uniqueName == "Pure")
  1978. {
  1979. text = "s2_";
  1980. System.Random random = new System.Random();
  1981. int num4 = random.Next(pureArray.Length);
  1982. object obj = text;
  1983. text = string.Concat(new object[]
  1984. {
  1985. obj,
  1986. "0",
  1987. pureArray[num4],
  1988. ".ogg"
  1989. });
  1990. }
  1991. if (maid.status.personal.uniqueName == "Yandere")
  1992. {
  1993. text = "s3_";
  1994. System.Random random = new System.Random();
  1995. int num4 = random.Next(yanArray.Length);
  1996. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1997. }
  1998. if (maid.status.personal.uniqueName == "Muku")
  1999. {
  2000. text = "h0_";
  2001. System.Random random = new System.Random();
  2002. int num4 = random.Next(h0tArray.Length);
  2003. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2004. }
  2005. if (maid.status.personal.uniqueName == "Majime")
  2006. {
  2007. text = "h1_";
  2008. System.Random random = new System.Random();
  2009. int num4 = random.Next(h1tArray.Length);
  2010. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2011. }
  2012. if (maid.status.personal.uniqueName == "Rindere")
  2013. {
  2014. text = "h2_";
  2015. System.Random random = new System.Random();
  2016. int num4 = random.Next(h2tArray.Length);
  2017. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2018. }
  2019. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2020. }
  2021. else
  2022. {
  2023. zFlg[i] = false;
  2024. maid.AudioMan.Clear();
  2025. }
  2026. idoFlg[i] = true;
  2027. if (i >= 7)
  2028. {
  2029. idoFlg[i - 7] = true;
  2030. }
  2031. }
  2032. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2033. {
  2034. string text = "";
  2035. if (maid.status.personal.uniqueName == "Pride")
  2036. {
  2037. text = "s0_";
  2038. System.Random random = new System.Random();
  2039. int num4 = random.Next(tunArray.Length);
  2040. object obj = text;
  2041. text = string.Concat(new object[]
  2042. {
  2043. obj,
  2044. "0",
  2045. tunArray[num4],
  2046. ".ogg"
  2047. });
  2048. }
  2049. if (maid.status.personal.uniqueName == "Cool")
  2050. {
  2051. text = "s1_";
  2052. System.Random random = new System.Random();
  2053. int num4 = random.Next(coolArray.Length);
  2054. object obj = text;
  2055. text = string.Concat(new object[]
  2056. {
  2057. obj,
  2058. "0",
  2059. coolArray[num4],
  2060. ".ogg"
  2061. });
  2062. }
  2063. if (maid.status.personal.uniqueName == "Pure")
  2064. {
  2065. text = "s2_";
  2066. System.Random random = new System.Random();
  2067. int num4 = random.Next(pureArray.Length);
  2068. object obj = text;
  2069. text = string.Concat(new object[]
  2070. {
  2071. obj,
  2072. "0",
  2073. pureArray[num4],
  2074. ".ogg"
  2075. });
  2076. }
  2077. if (maid.status.personal.uniqueName == "Yandere")
  2078. {
  2079. text = "s3_";
  2080. System.Random random = new System.Random();
  2081. int num4 = random.Next(yanArray.Length);
  2082. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2083. }
  2084. if (maid.status.personal.uniqueName == "Muku")
  2085. {
  2086. text = "h0_";
  2087. System.Random random = new System.Random();
  2088. int num4 = random.Next(h0tArray.Length);
  2089. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2090. }
  2091. if (maid.status.personal.uniqueName == "Majime")
  2092. {
  2093. text = "h1_";
  2094. System.Random random = new System.Random();
  2095. int num4 = random.Next(h1tArray.Length);
  2096. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2097. }
  2098. if (maid.status.personal.uniqueName == "Rindere")
  2099. {
  2100. text = "h2_";
  2101. System.Random random = new System.Random();
  2102. int num4 = random.Next(h2tArray.Length);
  2103. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2104. }
  2105. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2106. idoFlg[i] = true;
  2107. if (i >= 7)
  2108. {
  2109. idoFlg[i - 7] = true;
  2110. }
  2111. }
  2112. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2113. {
  2114. if (maid.status.personal.uniqueName == "Pride")
  2115. {
  2116. string text = "s0_";
  2117. System.Random random = new System.Random();
  2118. int num4 = random.Next(10000);
  2119. bool flag7 = false;
  2120. for (int k = 0; k < tunArray.Length; k++)
  2121. {
  2122. if (tunArray[k] == num4)
  2123. {
  2124. flag7 = true;
  2125. break;
  2126. }
  2127. }
  2128. if (!flag7)
  2129. {
  2130. text = text + "0" + num4.ToString() + ".ogg";
  2131. if (GameUty.FileSystem.IsExistentFile(text))
  2132. {
  2133. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2134. }
  2135. }
  2136. }
  2137. if (maid.status.personal.uniqueName == "Cool")
  2138. {
  2139. string text = "s1_";
  2140. System.Random random = new System.Random();
  2141. int num4 = random.Next(10000);
  2142. bool flag7 = false;
  2143. for (int k = 0; k < coolArray.Length; k++)
  2144. {
  2145. if (coolArray[k] == num4)
  2146. {
  2147. flag7 = true;
  2148. break;
  2149. }
  2150. }
  2151. if (!flag7)
  2152. {
  2153. text = text + "0" + num4.ToString() + ".ogg";
  2154. if (GameUty.FileSystem.IsExistentFile(text))
  2155. {
  2156. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2157. }
  2158. }
  2159. }
  2160. if (maid.status.personal.uniqueName == "Pure")
  2161. {
  2162. string text = "s2_";
  2163. System.Random random = new System.Random();
  2164. int num4 = random.Next(10000);
  2165. bool flag7 = false;
  2166. for (int k = 0; k < pureArray.Length; k++)
  2167. {
  2168. if (pureArray[k] == num4)
  2169. {
  2170. flag7 = true;
  2171. break;
  2172. }
  2173. }
  2174. if (!flag7)
  2175. {
  2176. text = text + "0" + num4.ToString() + ".ogg";
  2177. if (GameUty.FileSystem.IsExistentFile(text))
  2178. {
  2179. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2180. }
  2181. }
  2182. }
  2183. if (maid.status.personal.uniqueName == "Yandere")
  2184. {
  2185. string text = "s3_";
  2186. System.Random random = new System.Random();
  2187. int num4 = random.Next(10000);
  2188. bool flag7 = false;
  2189. for (int k = 0; k < yanArray.Length; k++)
  2190. {
  2191. if (yanArray[k] == num4)
  2192. {
  2193. flag7 = true;
  2194. break;
  2195. }
  2196. }
  2197. if (!flag7)
  2198. {
  2199. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2200. if (GameUty.FileSystem.IsExistentFile(text))
  2201. {
  2202. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2203. }
  2204. }
  2205. }
  2206. if (maid.status.personal.uniqueName == "Muku")
  2207. {
  2208. string text = "h0_";
  2209. System.Random random = new System.Random();
  2210. int num4 = random.Next(10000);
  2211. bool flag7 = false;
  2212. for (int k = 0; k < h0Array.Length; k++)
  2213. {
  2214. if (h0Array[k] == num4)
  2215. {
  2216. flag7 = true;
  2217. break;
  2218. }
  2219. }
  2220. if (flag7)
  2221. {
  2222. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2223. if (GameUty.FileSystem.IsExistentFile(text))
  2224. {
  2225. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2226. }
  2227. }
  2228. }
  2229. if (maid.status.personal.uniqueName == "Majime")
  2230. {
  2231. string text = "h1_";
  2232. System.Random random = new System.Random();
  2233. int num4 = random.Next(10000);
  2234. bool flag7 = false;
  2235. for (int k = 0; k < h1Array.Length; k++)
  2236. {
  2237. if (h1Array[k] == num4)
  2238. {
  2239. flag7 = true;
  2240. break;
  2241. }
  2242. }
  2243. if (flag7)
  2244. {
  2245. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2246. if (GameUty.FileSystem.IsExistentFile(text))
  2247. {
  2248. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2249. }
  2250. }
  2251. }
  2252. if (maid.status.personal.uniqueName == "Rindere")
  2253. {
  2254. string text = "h2_";
  2255. System.Random random = new System.Random();
  2256. int num4 = random.Next(10000);
  2257. bool flag7 = false;
  2258. for (int k = 0; k < h2Array.Length; k++)
  2259. {
  2260. if (h2Array[k] == num4)
  2261. {
  2262. flag7 = true;
  2263. break;
  2264. }
  2265. }
  2266. if (flag7)
  2267. {
  2268. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2269. if (GameUty.FileSystem.IsExistentFile(text))
  2270. {
  2271. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2272. }
  2273. }
  2274. }
  2275. idoFlg[i] = true;
  2276. if (i >= 7)
  2277. {
  2278. idoFlg[i - 7] = true;
  2279. }
  2280. }
  2281. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2282. {
  2283. delCount[i] = 20;
  2284. if (goSlot[(int)selectList[i]] != null)
  2285. {
  2286. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2287. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2288. {
  2289. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2290. }
  2291. }
  2292. itemIndex[i]++;
  2293. if (itemIndex[i] == itemArray.Length - 1)
  2294. {
  2295. itemIndex[i] = 0;
  2296. }
  2297. string[] array = new string[2];
  2298. array = itemArray[itemIndex[i]].Split(new char[]
  2299. {
  2300. ','
  2301. });
  2302. if (itemIndex[i] > 13)
  2303. {
  2304. array = itemArray[itemIndex[i] + 1].Split(new char[]
  2305. {
  2306. ','
  2307. });
  2308. }
  2309. maid.DelProp(MPN.handitem, true);
  2310. maid.DelProp(MPN.accvag, true);
  2311. maid.DelProp(MPN.accanl, true);
  2312. bool flag8 = false;
  2313. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2314. {
  2315. flag8 = true;
  2316. }
  2317. if (!flag8)
  2318. {
  2319. maid.DelProp(MPN.kousoku_upper, true);
  2320. maid.DelProp(MPN.kousoku_lower, true);
  2321. }
  2322. if (array[0] != "")
  2323. {
  2324. maid.SetProp(array[0], array[1], 0, true, false);
  2325. }
  2326. if (itemIndex[i] == 13)
  2327. {
  2328. array = itemArray[itemIndex[i] + 1].Split(new char[]
  2329. {
  2330. ','
  2331. });
  2332. maid.SetProp(array[0], array[1], 0, true, false);
  2333. }
  2334. if (itemIndex[i] == 23)
  2335. {
  2336. array = itemArray[itemIndex[i]].Split(new char[]
  2337. {
  2338. ','
  2339. });
  2340. maid.SetProp(array[0], array[1], 0, true, false);
  2341. cafeFlg[i] = true;
  2342. }
  2343. maid.AllProcPropSeqStart();
  2344. idoFlg[i] = true;
  2345. if (i >= 7)
  2346. {
  2347. idoFlg[i - 7] = true;
  2348. }
  2349. mFlg = true;
  2350. }
  2351. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket) || (Input.GetKeyDown(KeyCode.BackQuote) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  2352. {
  2353. for (int k = 0; k < 10; k++)
  2354. {
  2355. maid.transform.RotateAround(maid.transform.position, Vector3.right, -maid.transform.rotation.eulerAngles.x);
  2356. maid.transform.RotateAround(maid.transform.position, Vector3.forward, -maid.transform.rotation.eulerAngles.z);
  2357. }
  2358. idoFlg[i] = true;
  2359. atFlg = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(MultipleMaids.modKey.Shift)) || (Input.GetKey(KeyCode.I) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  2366. {
  2367. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2368. idoFlg[i] = true;
  2369. if (i >= 7)
  2370. {
  2371. idoFlg[i - 7] = true;
  2372. }
  2373. }
  2374. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(MultipleMaids.modKey.Shift)) || (Input.GetKey(KeyCode.K) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  2375. {
  2376. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2377. idoFlg[i] = true;
  2378. if (i >= 7)
  2379. {
  2380. idoFlg[i - 7] = true;
  2381. }
  2382. }
  2383. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus) || (Input.GetKey(KeyCode.J) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  2384. {
  2385. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2386. idoFlg[i] = true;
  2387. if (i >= 7)
  2388. {
  2389. idoFlg[i - 7] = true;
  2390. }
  2391. }
  2392. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote) || (Input.GetKey(KeyCode.L) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  2393. {
  2394. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2395. idoFlg[i] = true;
  2396. if (i >= 7)
  2397. {
  2398. idoFlg[i - 7] = true;
  2399. }
  2400. }
  2401. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2402. {
  2403. Vector3 vector = maid.transform.position;
  2404. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2405. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2406. maid.SetPos(vector);
  2407. idoFlg[i] = true;
  2408. if (i >= 7)
  2409. {
  2410. idoFlg[i - 7] = true;
  2411. }
  2412. }
  2413. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2414. {
  2415. Vector3 vector = maid.transform.position;
  2416. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2417. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2418. maid.SetPos(vector);
  2419. idoFlg[i] = true;
  2420. if (i >= 7)
  2421. {
  2422. idoFlg[i - 7] = true;
  2423. }
  2424. }
  2425. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2426. {
  2427. Vector3 vector = maid.transform.position;
  2428. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2429. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2430. maid.SetPos(vector);
  2431. idoFlg[i] = true;
  2432. if (i >= 7)
  2433. {
  2434. idoFlg[i - 7] = true;
  2435. }
  2436. }
  2437. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2438. {
  2439. Vector3 vector = maid.transform.position;
  2440. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2441. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2442. maid.SetPos(vector);
  2443. idoFlg[i] = true;
  2444. if (i >= 7)
  2445. {
  2446. idoFlg[i - 7] = true;
  2447. }
  2448. }
  2449. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2450. {
  2451. Vector3 vector = maid.transform.position;
  2452. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2453. maid.SetPos(vector);
  2454. idoFlg[i] = true;
  2455. if (i >= 7)
  2456. {
  2457. idoFlg[i - 7] = true;
  2458. }
  2459. }
  2460. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2461. {
  2462. Vector3 vector = maid.transform.position;
  2463. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2464. maid.SetPos(vector);
  2465. idoFlg[i] = true;
  2466. if (i >= 7)
  2467. {
  2468. idoFlg[i - 7] = true;
  2469. }
  2470. }
  2471. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2472. {
  2473. Vector3 vector = maid.transform.position;
  2474. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2475. maid.SetPos(vector);
  2476. idoFlg[i] = true;
  2477. if (i >= 7)
  2478. {
  2479. idoFlg[i - 7] = true;
  2480. }
  2481. }
  2482. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2483. {
  2484. Vector3 vector = maid.transform.position;
  2485. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2486. maid.SetPos(vector);
  2487. idoFlg[i] = true;
  2488. if (i >= 7)
  2489. {
  2490. idoFlg[i - 7] = true;
  2491. }
  2492. }
  2493. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2494. {
  2495. Vector3 vector = maid.transform.position;
  2496. vector.y += 0.0075f * speed;
  2497. maid.SetPos(vector);
  2498. idoFlg[i] = true;
  2499. if (i >= 7)
  2500. {
  2501. idoFlg[i - 7] = true;
  2502. }
  2503. }
  2504. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2505. {
  2506. Vector3 vector = maid.transform.position;
  2507. vector.y -= 0.0075f * speed;
  2508. maid.SetPos(vector);
  2509. idoFlg[i] = true;
  2510. if (i >= 7)
  2511. {
  2512. idoFlg[i - 7] = true;
  2513. }
  2514. }
  2515. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  2516. {
  2517. faceIndex[i]--;
  2518. if (faceIndex[i] <= -1)
  2519. {
  2520. faceIndex[i] = faceArray.Length - 1;
  2521. }
  2522. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2523. idoFlg[i] = true;
  2524. if (i >= 7)
  2525. {
  2526. idoFlg[i - 7] = true;
  2527. }
  2528. }
  2529. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2530. {
  2531. faceIndex[i]++;
  2532. if (faceIndex[i] == faceArray.Length)
  2533. {
  2534. faceIndex[i] = 0;
  2535. }
  2536. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2537. idoFlg[i] = true;
  2538. if (i >= 7)
  2539. {
  2540. idoFlg[i - 7] = true;
  2541. }
  2542. }
  2543. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2544. {
  2545. faceBlendIndex[i]++;
  2546. if (faceBlendIndex[i] == faceBlendArray.Length)
  2547. {
  2548. faceBlendIndex[i] = 0;
  2549. }
  2550. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2551. idoFlg[i] = true;
  2552. if (i >= 7)
  2553. {
  2554. idoFlg[i - 7] = true;
  2555. }
  2556. }
  2557. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2558. {
  2559. string[] array = poseArray[poseIndex[i]].Split(new char[]
  2560. {
  2561. ','
  2562. });
  2563. isStop[i] = false;
  2564. poseCount[i] = 20;
  2565. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2566. {
  2567. maid.body0.MuneYureL(0f);
  2568. maid.body0.MuneYureR(0f);
  2569. }
  2570. else
  2571. {
  2572. maid.body0.MuneYureL(1f);
  2573. maid.body0.MuneYureR(1f);
  2574. }
  2575. int num6;
  2576. if (array[0].Contains("MultipleMaidsPose"))
  2577. {
  2578. string path = array[0].Split(new char[]
  2579. {
  2580. '/'
  2581. })[1];
  2582. byte[] array2 = new byte[0];
  2583. try
  2584. {
  2585. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2586. {
  2587. array2 = new byte[fileStream.Length];
  2588. fileStream.Read(array2, 0, array2.Length);
  2589. }
  2590. }
  2591. catch
  2592. {
  2593. }
  2594. if (0 < array2.Length)
  2595. {
  2596. string text = Path.GetFileName(path);
  2597. long num5 = (long)text.GetHashCode();
  2598. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2599. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2600. {
  2601. Maid.AutoTwist.ShoulderL,
  2602. Maid.AutoTwist.ShoulderR,
  2603. Maid.AutoTwist.WristL,
  2604. Maid.AutoTwist.WristR,
  2605. Maid.AutoTwist.ThighL,
  2606. Maid.AutoTwist.ThighR
  2607. };
  2608. for (int m = 0; m < array3.Length; m++)
  2609. {
  2610. maid.SetAutoTwist(array3[m], true);
  2611. }
  2612. }
  2613. }
  2614. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  2615. {
  2616. loadPose[i] = array[0];
  2617. }
  2618. else if (!array[0].StartsWith("dance_"))
  2619. {
  2620. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2621. }
  2622. else
  2623. {
  2624. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2625. {
  2626. maidArray[i].body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  2627. }
  2628. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2629. }
  2630. if (array.Length > 1)
  2631. {
  2632. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2633. isStop[i] = true;
  2634. if (array.Length > 2)
  2635. {
  2636. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2637. isPoseIti[i] = true;
  2638. poseIti[i] = maidArray[i].transform.position;
  2639. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2640. }
  2641. }
  2642. isLock[i] = false;
  2643. idoFlg[i] = true;
  2644. mHandL[i].initFlg = false;
  2645. mHandR[i].initFlg = false;
  2646. mFootL[i].initFlg = false;
  2647. mFootR[i].initFlg = false;
  2648. pHandL[i] = 0;
  2649. pHandR[i] = 0;
  2650. muneIKL[i] = false;
  2651. muneIKR[i] = false;
  2652. if (!isVR)
  2653. {
  2654. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2655. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2656. }
  2657. if (i >= 7)
  2658. {
  2659. idoFlg[i - 7] = true;
  2660. }
  2661. }
  2662. else if (maid.body0.isLoadedBody)
  2663. {
  2664. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2665. {
  2666. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2667. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2668. }
  2669. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2670. {
  2671. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2672. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2673. }
  2674. if (!HandL1[i])
  2675. {
  2676. this.SetIKInit(i);
  2677. this.SetIK(maid, i);
  2678. ikBui = 5;
  2679. }
  2680. else
  2681. {
  2682. bool flag5 = false;
  2683. for (int k = 0; k < keyArray.Length; k++)
  2684. {
  2685. if (Input.GetKey(keyArray[k]))
  2686. {
  2687. flag5 = true;
  2688. break;
  2689. }
  2690. }
  2691. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R) || Input.GetKey(KeyCode.Y))
  2692. {
  2693. flag5 = true;
  2694. }
  2695. if (!flag5)
  2696. {
  2697. if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  2698. {
  2699. ikMode[i] = 15;
  2700. }
  2701. else if (this.getModKeyPressing(MultipleMaids.modKey.Shift) && this.getModKeyPressing(MultipleMaids.modKey.Alt))
  2702. {
  2703. ikMode[i] = 5;
  2704. }
  2705. else if (this.getModKeyPressing(MultipleMaids.modKey.Shift) && Input.GetKey(KeyCode.Space))
  2706. {
  2707. ikMode[i] = 6;
  2708. }
  2709. else if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2710. {
  2711. ikMode[i] = 7;
  2712. }
  2713. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  2714. {
  2715. ikMode[i] = 11;
  2716. }
  2717. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  2718. {
  2719. ikMode[i] = 12;
  2720. }
  2721. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  2722. {
  2723. ikMode[i] = 14;
  2724. }
  2725. else if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  2726. {
  2727. ikMode[i] = 1;
  2728. }
  2729. else if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && this.getModKeyPressing(MultipleMaids.modKey.Alt))
  2730. {
  2731. ikMode[i] = 8;
  2732. }
  2733. else if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  2734. {
  2735. ikMode[i] = 2;
  2736. }
  2737. else if (this.getModKeyPressing(MultipleMaids.modKey.Alt))
  2738. {
  2739. ikMode[i] = 3;
  2740. }
  2741. else if (Input.GetKey(KeyCode.Space))
  2742. {
  2743. ikMode[i] = 4;
  2744. }
  2745. else if (Input.GetKey(KeyCode.X))
  2746. {
  2747. ikMode[i] = 9;
  2748. }
  2749. else if (Input.GetKey(KeyCode.Z))
  2750. {
  2751. ikMode[i] = 10;
  2752. }
  2753. else if (Input.GetKey(KeyCode.C))
  2754. {
  2755. ikMode[i] = 13;
  2756. }
  2757. else if (Input.GetKey(KeyCode.A))
  2758. {
  2759. ikMode[i] = 16;
  2760. }
  2761. else
  2762. {
  2763. ikMode[i] = 0;
  2764. }
  2765. if (!isIK[i])
  2766. {
  2767. if (ikMode[i] < 9)
  2768. {
  2769. ikMode[i] = 0;
  2770. }
  2771. }
  2772. bool flag9 = false;
  2773. bool flag10 = false;
  2774. bool flag11 = false;
  2775. bool flag12 = false;
  2776. if (gFinger[i, 0])
  2777. {
  2778. for (int j = 0; j < 15; j++)
  2779. {
  2780. if (mFinger[i, j].isStop)
  2781. {
  2782. flag9 = true;
  2783. }
  2784. }
  2785. for (int j = 15; j < 30; j++)
  2786. {
  2787. if (mFinger[i, j].isStop)
  2788. {
  2789. flag10 = true;
  2790. }
  2791. }
  2792. for (int j = 0; j < 6; j++)
  2793. {
  2794. if (mFinger2[i, j].isStop)
  2795. {
  2796. flag11 = true;
  2797. }
  2798. }
  2799. for (int j = 6; j < 12; j++)
  2800. {
  2801. if (mFinger2[i, j].isStop)
  2802. {
  2803. flag12 = true;
  2804. }
  2805. }
  2806. }
  2807. if (gMaid[i] != null)
  2808. {
  2809. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2810. {
  2811. gMaid[i].SetActive(true);
  2812. if (isCube)
  2813. {
  2814. gMaidC[i].SetActive(true);
  2815. }
  2816. }
  2817. else
  2818. {
  2819. gMaid[i].SetActive(false);
  2820. gMaidC[i].SetActive(false);
  2821. }
  2822. }
  2823. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2824. {
  2825. ikBui = 1;
  2826. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2827. {
  2828. ikMaid = i;
  2829. }
  2830. if (ikMaid == i)
  2831. {
  2832. this.SetIK(maid, i);
  2833. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2834. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2835. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2836. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2837. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2838. }
  2839. if (Input.GetKeyDown(KeyCode.Q))
  2840. {
  2841. qFlg = true;
  2842. }
  2843. }
  2844. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2845. {
  2846. ikBui = 2;
  2847. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2848. {
  2849. ikMaid = i;
  2850. }
  2851. if (ikMaid == i)
  2852. {
  2853. this.SetIK(maid, i);
  2854. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2855. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2856. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2857. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2858. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2859. }
  2860. if (Input.GetKeyDown(KeyCode.W))
  2861. {
  2862. wFlg = true;
  2863. }
  2864. }
  2865. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2866. {
  2867. ikBui = 3;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. this.SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. }
  2881. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2882. {
  2883. ikBui = 4;
  2884. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2885. {
  2886. ikMaid = i;
  2887. }
  2888. if (ikMaid == i)
  2889. {
  2890. this.SetIK(maid, i);
  2891. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2892. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2893. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2894. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2895. }
  2896. if (Input.GetKeyDown(KeyCode.S))
  2897. {
  2898. sFlg = true;
  2899. }
  2900. }
  2901. mHandR[i].isSelect = false;
  2902. mArmR[i].isSelect = false;
  2903. mHandL[i].isSelect = false;
  2904. mArmL[i].isSelect = false;
  2905. mFootR[i].isSelect = false;
  2906. mHizaR[i].isSelect = false;
  2907. mFootL[i].isSelect = false;
  2908. mHizaL[i].isSelect = false;
  2909. mClavicleL[i].isSelect = false;
  2910. mClavicleR[i].isSelect = false;
  2911. if (ikMode[i] == 16)
  2912. {
  2913. if (!gHead2[i])
  2914. {
  2915. this.SetIKInit6(i);
  2916. }
  2917. if (mHead2[i].isClick)
  2918. {
  2919. mHead2[i].isClick = false;
  2920. bGui = true;
  2921. isFaceInit = true;
  2922. isGuiInit = true;
  2923. faceFlg = true;
  2924. poseFlg = false;
  2925. sceneFlg = false;
  2926. kankyoFlg = false;
  2927. kankyo2Flg = false;
  2928. maid.boMabataki = false;
  2929. selectMaidIndex = mHead2[i].no;
  2930. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2931. }
  2932. if (mMaid2[i].isClick)
  2933. {
  2934. mMaid2[i].isClick = false;
  2935. bGui = true;
  2936. isPoseInit = true;
  2937. isGuiInit = true;
  2938. poseFlg = true;
  2939. faceFlg = false;
  2940. sceneFlg = false;
  2941. kankyoFlg = false;
  2942. kankyo2Flg = false;
  2943. selectMaidIndex = mMaid2[i].no;
  2944. copyIndex = 0;
  2945. }
  2946. gHead2[i].transform.position = new Vector3(Head2[i].position.x, (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f, Head2[i].position.z);
  2947. gHead2[i].transform.eulerAngles = new Vector3(Head2[i].transform.eulerAngles.x, Head2[i].transform.eulerAngles.y, Head2[i].transform.eulerAngles.z + 90f);
  2948. mHead2[i].no = i;
  2949. mHead2[i].maid = maid;
  2950. mHead2[i].ido = 1;
  2951. gMaid2[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2952. gMaid2[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  2953. mMaid2[i].no = i;
  2954. mMaid2[i].maid = maid;
  2955. mMaid2[i].ido = 2;
  2956. gArmL[i].SetActive(false);
  2957. gFootL[i].SetActive(false);
  2958. gHizaL[i].SetActive(false);
  2959. gHandR[i].SetActive(false);
  2960. gArmR[i].SetActive(false);
  2961. gFootR[i].SetActive(false);
  2962. gHizaR[i].SetActive(false);
  2963. gClavicleL[i].SetActive(false);
  2964. gClavicleR[i].SetActive(false);
  2965. gNeck[i].SetActive(false);
  2966. gSpine[i].SetActive(false);
  2967. gSpine0a[i].SetActive(false);
  2968. gSpine1a[i].SetActive(false);
  2969. gSpine1[i].SetActive(false);
  2970. gPelvis[i].SetActive(false);
  2971. }
  2972. else if (ikMode[i] == 8)
  2973. {
  2974. if (ikModeOld[i] == 15 && gIKHandL[i])
  2975. {
  2976. mIKHandL[i].ido = 1;
  2977. mIKHandL[i].reset = true;
  2978. mIKHandR[i].ido = 1;
  2979. mIKHandR[i].reset = true;
  2980. }
  2981. else if (ikModeOld[i] == 3 && gHead[i])
  2982. {
  2983. mHead[i].ido = 7;
  2984. mHead[i].reset = true;
  2985. }
  2986. else
  2987. {
  2988. if (!gIKHandL[i])
  2989. {
  2990. this.SetIKInit5(i);
  2991. }
  2992. gIKHandL[i].transform.position = IKHandL[i].position;
  2993. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2994. mIKHandL[i].maid = maid;
  2995. mIKHandL[i].HandL = IKHandL[i];
  2996. mIKHandL[i].ido = 1;
  2997. gIKHandR[i].transform.position = IKHandR[i].position;
  2998. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2999. mIKHandR[i].maid = maid;
  3000. mIKHandR[i].HandL = IKHandR[i];
  3001. mIKHandR[i].ido = 1;
  3002. if (!gIKMuneL[i])
  3003. {
  3004. this.SetIKInit7(i);
  3005. }
  3006. if (!gHead[i])
  3007. {
  3008. this.SetIKInit4(i);
  3009. }
  3010. mIKMuneL[i].maid = maid;
  3011. mIKMuneL[i].HandL = IKMuneLSub[i];
  3012. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3013. mIKMuneL[i].ForearmL = IKMuneL[i];
  3014. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3015. mIKMuneR[i].maid = maid;
  3016. mIKMuneR[i].HandL = IKMuneRSub[i];
  3017. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3018. mIKMuneR[i].ForearmL = IKMuneR[i];
  3019. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3020. gHead[i].transform.position = new Vector3(Head2[i].position.x, (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f, Head2[i].position.z);
  3021. gHead[i].transform.eulerAngles = new Vector3(Head2[i].transform.eulerAngles.x, Head2[i].transform.eulerAngles.y, Head2[i].transform.eulerAngles.z + 90f);
  3022. mHead[i].head = Head1[i];
  3023. mHead[i].maid = maid;
  3024. mHead[i].ido = 7;
  3025. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3026. gHead[i].SetActive(true);
  3027. if (mHead[i].isClick)
  3028. {
  3029. mHead[i].isClick = false;
  3030. mHead[i].isClick2 = false;
  3031. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3032. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3033. }
  3034. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3035. {
  3036. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3037. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3038. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x, IKMuneLSub[i].localEulerAngles.y, IKMuneLSub[i].localEulerAngles.z);
  3039. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x, IKMuneL[i].localEulerAngles.y, IKMuneL[i].localEulerAngles.z);
  3040. muneIKL[i] = true;
  3041. isStop[i] = true;
  3042. isLock[i] = true;
  3043. mIKMuneL[i].isMouseDrag = false;
  3044. }
  3045. if (mIKMuneL[i].isMouseDown)
  3046. {
  3047. maid.body0.MuneYureL(0f);
  3048. maid.body0.MuneYureR(0f);
  3049. muneIKL[i] = false;
  3050. mIKMuneL[i].isMouseUp = false;
  3051. }
  3052. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3053. {
  3054. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3055. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3056. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x, IKMuneRSub[i].localEulerAngles.y, IKMuneRSub[i].localEulerAngles.z);
  3057. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x, IKMuneR[i].localEulerAngles.y, IKMuneR[i].localEulerAngles.z);
  3058. muneIKR[i] = true;
  3059. isStop[i] = true;
  3060. isLock[i] = true;
  3061. mIKMuneR[i].isMouseDrag = false;
  3062. }
  3063. if (mIKMuneR[i].isMouseDown)
  3064. {
  3065. maid.body0.MuneYureL(0f);
  3066. maid.body0.MuneYureR(0f);
  3067. muneIKR[i] = false;
  3068. mIKMuneL[i].isMouseUp = false;
  3069. }
  3070. if (mHead[i].isStop)
  3071. {
  3072. isStop[i] = true;
  3073. isLock[i] = true;
  3074. mHead[i].isStop = false;
  3075. }
  3076. gJotai[i].SetActive(false);
  3077. gKahuku[i].SetActive(false);
  3078. gHandL[i].SetActive(false);
  3079. gArmL[i].SetActive(false);
  3080. gFootL[i].SetActive(false);
  3081. gHizaL[i].SetActive(false);
  3082. gHandR[i].SetActive(false);
  3083. gArmR[i].SetActive(false);
  3084. gFootR[i].SetActive(false);
  3085. gHizaR[i].SetActive(false);
  3086. gClavicleL[i].SetActive(false);
  3087. gClavicleR[i].SetActive(false);
  3088. gNeck[i].SetActive(false);
  3089. gSpine[i].SetActive(false);
  3090. gSpine0a[i].SetActive(false);
  3091. gSpine1a[i].SetActive(false);
  3092. gSpine1[i].SetActive(false);
  3093. gPelvis[i].SetActive(false);
  3094. }
  3095. }
  3096. else if (ikMode[i] == 15)
  3097. {
  3098. if (ikModeOld[i] == 8 && gIKHandL[i])
  3099. {
  3100. mIKHandL[i].ido = 2;
  3101. mIKHandL[i].reset = true;
  3102. mIKHandR[i].ido = 2;
  3103. mIKHandR[i].reset = true;
  3104. }
  3105. else
  3106. {
  3107. if (!gIKHandL[i])
  3108. {
  3109. this.SetIKInit5(i);
  3110. }
  3111. gIKHandL[i].transform.position = IKHandL[i].position;
  3112. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3113. mIKHandL[i].maid = maid;
  3114. mIKHandL[i].HandL = IKHandL[i];
  3115. mIKHandL[i].ido = 2;
  3116. gIKHandR[i].transform.position = IKHandR[i].position;
  3117. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3118. mIKHandR[i].maid = maid;
  3119. mIKHandR[i].HandL = IKHandR[i];
  3120. mIKHandR[i].ido = 2;
  3121. UnityEngine.Object.Destroy(gHead[i]);
  3122. UnityEngine.Object.Destroy(gJotai[i]);
  3123. UnityEngine.Object.Destroy(gKahuku[i]);
  3124. gHandL[i].SetActive(false);
  3125. gArmL[i].SetActive(false);
  3126. gFootL[i].SetActive(false);
  3127. gHizaL[i].SetActive(false);
  3128. gHandR[i].SetActive(false);
  3129. gArmR[i].SetActive(false);
  3130. gFootR[i].SetActive(false);
  3131. gHizaR[i].SetActive(false);
  3132. gClavicleL[i].SetActive(false);
  3133. gClavicleR[i].SetActive(false);
  3134. gNeck[i].SetActive(false);
  3135. gSpine[i].SetActive(false);
  3136. gSpine0a[i].SetActive(false);
  3137. gSpine1a[i].SetActive(false);
  3138. gSpine1[i].SetActive(false);
  3139. gPelvis[i].SetActive(false);
  3140. }
  3141. }
  3142. else if (ikMode[i] == 1)
  3143. {
  3144. mHandL[i].ido = 10;
  3145. mHandR[i].ido = 10;
  3146. mFootL[i].ido = 10;
  3147. mFootR[i].ido = 10;
  3148. if (ikModeOld[i] == 0 && gNeck[i])
  3149. {
  3150. if (isBone[i])
  3151. {
  3152. mNeck[i].ido = 4;
  3153. mNeck[i].reset = true;
  3154. mSpine[i].ido = 4;
  3155. mSpine[i].reset = true;
  3156. mSpine0a[i].ido = 4;
  3157. mSpine0a[i].reset = true;
  3158. mSpine1a[i].ido = 4;
  3159. mSpine1a[i].reset = true;
  3160. mSpine1[i].ido = 4;
  3161. mSpine1[i].reset = true;
  3162. mPelvis[i].ido = 4;
  3163. mPelvis[i].reset = true;
  3164. mHizaL[i].ido = 5;
  3165. mHizaL[i].reset = true;
  3166. mHizaR[i].ido = 5;
  3167. mHizaR[i].reset = true;
  3168. }
  3169. }
  3170. else
  3171. {
  3172. gArmL[i].SetActive(false);
  3173. gArmR[i].SetActive(false);
  3174. if (!isBone[i])
  3175. {
  3176. gHizaL[i].SetActive(false);
  3177. gHizaR[i].SetActive(false);
  3178. }
  3179. gClavicleL[i].SetActive(false);
  3180. gClavicleR[i].SetActive(false);
  3181. if (isBone[i])
  3182. {
  3183. mNeck[i].maid = maid;
  3184. mNeck[i].head = Neck[i];
  3185. mNeck[i].no = i;
  3186. mNeck[i].ido = 4;
  3187. gNeck[i].transform.position = Neck[i].position;
  3188. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3189. if (mNeck[i].isHead)
  3190. {
  3191. mNeck[i].isHead = false;
  3192. isLookn[i] = isLook[i];
  3193. isLook[i] = !isLook[i];
  3194. }
  3195. mSpine[i].maid = maid;
  3196. mSpine[i].head = Spine2[i];
  3197. mSpine[i].no = i;
  3198. mSpine[i].ido = 4;
  3199. gSpine[i].transform.position = Spine2[i].position;
  3200. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3201. mSpine0a[i].maid = maid;
  3202. mSpine0a[i].head = Spine0a2[i];
  3203. mSpine0a[i].no = i;
  3204. mSpine0a[i].ido = 4;
  3205. gSpine0a[i].transform.position = Spine0a2[i].position;
  3206. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3207. mSpine1a[i].maid = maid;
  3208. mSpine1a[i].head = Spine1a2[i];
  3209. mSpine1a[i].no = i;
  3210. mSpine1a[i].ido = 4;
  3211. gSpine1a[i].transform.position = Spine1a2[i].position;
  3212. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3213. mSpine1[i].maid = maid;
  3214. mSpine1[i].head = Spine12[i];
  3215. mSpine1[i].no = i;
  3216. mSpine1[i].ido = 4;
  3217. gSpine1[i].transform.position = Spine12[i].position;
  3218. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3219. mPelvis[i].maid = maid;
  3220. mPelvis[i].head = Pelvis2[i];
  3221. mPelvis[i].no = i;
  3222. mPelvis[i].ido = 8;
  3223. gPelvis[i].transform.position = Pelvis2[i].position;
  3224. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3225. mHizaL[i].ido = 5;
  3226. mHizaR[i].ido = 5;
  3227. }
  3228. }
  3229. }
  3230. else if (ikMode[i] == 2)
  3231. {
  3232. if (ikModeOld[i] == 0 && gPelvis[i])
  3233. {
  3234. mPelvis[i].ido = 9;
  3235. mPelvis[i].reset = true;
  3236. }
  3237. else
  3238. {
  3239. gArmL[i].SetActive(false);
  3240. gHizaL[i].SetActive(false);
  3241. gArmR[i].SetActive(false);
  3242. gHizaR[i].SetActive(false);
  3243. gClavicleL[i].SetActive(false);
  3244. gClavicleR[i].SetActive(false);
  3245. gNeck[i].SetActive(false);
  3246. gSpine[i].SetActive(false);
  3247. gSpine0a[i].SetActive(false);
  3248. gSpine1a[i].SetActive(false);
  3249. gSpine1[i].SetActive(false);
  3250. mPelvis[i].maid = maid;
  3251. mPelvis[i].head = Pelvis2[i];
  3252. mPelvis[i].no = i;
  3253. mPelvis[i].ido = 9;
  3254. gPelvis[i].transform.position = Pelvis2[i].position;
  3255. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3256. }
  3257. }
  3258. else if (ikMode[i] == 3)
  3259. {
  3260. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3261. {
  3262. mHead[i].ido = 1;
  3263. mHead[i].reset = true;
  3264. mJotai[i].ido = 2;
  3265. mJotai[i].reset = true;
  3266. mKahuku[i].ido = 3;
  3267. mKahuku[i].reset = true;
  3268. mHandL[i].ido = 1;
  3269. mHandR[i].ido = 1;
  3270. mFootL[i].ido = 3;
  3271. mFootR[i].ido = 3;
  3272. mHizaL[i].ido = 5;
  3273. mHizaR[i].ido = 5;
  3274. mHandL[i].reset = true;
  3275. mHandR[i].reset = true;
  3276. mFootL[i].reset = true;
  3277. mFootR[i].reset = true;
  3278. mHizaL[i].reset = true;
  3279. mHizaR[i].reset = true;
  3280. }
  3281. else if (ikModeOld[i] == 0)
  3282. {
  3283. mHandL[i].ido = 1;
  3284. mHandR[i].ido = 1;
  3285. mFootL[i].ido = 3;
  3286. mFootR[i].ido = 3;
  3287. mHizaL[i].ido = 5;
  3288. mHizaR[i].ido = 5;
  3289. mHandL[i].reset = true;
  3290. mHandR[i].reset = true;
  3291. mFootL[i].reset = true;
  3292. mFootR[i].reset = true;
  3293. mHizaL[i].reset = true;
  3294. mHizaR[i].reset = true;
  3295. }
  3296. else
  3297. {
  3298. if (!gHead[i])
  3299. {
  3300. this.SetIKInit4(i);
  3301. }
  3302. if (mHead[i].isHead)
  3303. {
  3304. mHead[i].isHead = false;
  3305. isLookn[i] = isLook[i];
  3306. isLook[i] = !isLook[i];
  3307. }
  3308. gHead[i].transform.position = new Vector3(Head2[i].position.x, (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f, Head2[i].position.z);
  3309. gHead[i].transform.eulerAngles = new Vector3(Head2[i].transform.eulerAngles.x, Head2[i].transform.eulerAngles.y, Head2[i].transform.eulerAngles.z + 90f);
  3310. mHead[i].head = Head1[i];
  3311. mHead[i].maid = maid;
  3312. mHead[i].no = i;
  3313. mHead[i].ido = 1;
  3314. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3315. Transform transform3 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3316. Transform transform4 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3317. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3318. Transform transform6 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3319. gJotai[i].transform.position = new Vector3(transform3.position.x, (transform3.position.y * 0f + transform4.position.y * 2f) / 2f, transform3.position.z);
  3320. gJotai[i].transform.eulerAngles = new Vector3(transform3.transform.eulerAngles.x, transform3.transform.eulerAngles.y, transform3.transform.eulerAngles.z + 90f);
  3321. mJotai[i].Spine0a = spine0a;
  3322. mJotai[i].Spine1 = transform3;
  3323. mJotai[i].Spine1a = transform4;
  3324. mJotai[i].Spine = transform5;
  3325. mJotai[i].maid = maid;
  3326. mJotai[i].ido = 2;
  3327. gKahuku[i].transform.position = new Vector3(transform6.position.x, (transform6.position.y + transform5.position.y) / 2f, transform6.position.z);
  3328. gKahuku[i].transform.eulerAngles = new Vector3(transform6.transform.eulerAngles.x + 90f, transform6.transform.eulerAngles.y + 90f, transform6.transform.eulerAngles.z);
  3329. mKahuku[i].Pelvis = transform6;
  3330. mKahuku[i].maid = maid;
  3331. mKahuku[i].ido = 3;
  3332. mHandL[i].ido = 1;
  3333. mHandR[i].ido = 1;
  3334. mFootL[i].ido = 3;
  3335. mFootR[i].ido = 3;
  3336. mHizaL[i].ido = 5;
  3337. mHizaR[i].ido = 5;
  3338. gJotai[i].SetActive(true);
  3339. gKahuku[i].SetActive(true);
  3340. gHandL[i].SetActive(true);
  3341. gArmL[i].SetActive(false);
  3342. gFootL[i].SetActive(true);
  3343. gHizaL[i].SetActive(true);
  3344. gHandR[i].SetActive(true);
  3345. gArmR[i].SetActive(false);
  3346. gFootR[i].SetActive(true);
  3347. gHizaR[i].SetActive(true);
  3348. UnityEngine.Object.Destroy(gIKHandL[i]);
  3349. UnityEngine.Object.Destroy(gIKHandR[i]);
  3350. UnityEngine.Object.Destroy(gIKMuneL[i]);
  3351. UnityEngine.Object.Destroy(gIKMuneR[i]);
  3352. if (isBone[i])
  3353. {
  3354. gHizaL[i].SetActive(false);
  3355. gHizaR[i].SetActive(false);
  3356. gHead[i].SetActive(false);
  3357. gJotai[i].SetActive(false);
  3358. gKahuku[i].SetActive(false);
  3359. }
  3360. else
  3361. {
  3362. gHizaL[i].SetActive(true);
  3363. gHizaR[i].SetActive(true);
  3364. gHead[i].SetActive(true);
  3365. gJotai[i].SetActive(true);
  3366. gKahuku[i].SetActive(true);
  3367. }
  3368. gClavicleL[i].SetActive(false);
  3369. gClavicleR[i].SetActive(false);
  3370. gNeck[i].SetActive(false);
  3371. gSpine[i].SetActive(false);
  3372. gSpine0a[i].SetActive(false);
  3373. gSpine1a[i].SetActive(false);
  3374. gSpine1[i].SetActive(false);
  3375. gPelvis[i].SetActive(false);
  3376. if (mHead[i].isStop)
  3377. {
  3378. isStop[i] = true;
  3379. isLock[i] = true;
  3380. mHead[i].isStop = false;
  3381. }
  3382. if (mJotai[i].isStop)
  3383. {
  3384. isStop[i] = true;
  3385. isLock[i] = true;
  3386. mJotai[i].isStop = false;
  3387. }
  3388. if (mKahuku[i].isStop)
  3389. {
  3390. isStop[i] = true;
  3391. isLock[i] = true;
  3392. mKahuku[i].isStop = false;
  3393. }
  3394. if (mKahuku[i].isSelect)
  3395. {
  3396. mKahuku[i].isSelect = false;
  3397. if (ikMaid != i)
  3398. {
  3399. ikMaid = i;
  3400. ikBui = 5;
  3401. this.SetIK(maid, i);
  3402. }
  3403. }
  3404. if (mJotai[i].isSelect)
  3405. {
  3406. mJotai[i].isSelect = false;
  3407. if (ikMaid != i)
  3408. {
  3409. ikMaid = i;
  3410. ikBui = 5;
  3411. this.SetIK(maid, i);
  3412. }
  3413. }
  3414. if (mKahuku[i].isSelect)
  3415. {
  3416. mKahuku[i].isSelect = false;
  3417. if (ikMaid != i)
  3418. {
  3419. ikMaid = i;
  3420. ikBui = 5;
  3421. this.SetIK(maid, i);
  3422. }
  3423. }
  3424. }
  3425. }
  3426. else if (ikMode[i] == 5)
  3427. {
  3428. if (ikModeOld[i] == 3 && gHead[i])
  3429. {
  3430. mHead[i].ido = 4;
  3431. mHead[i].reset = true;
  3432. mJotai[i].ido = 5;
  3433. mJotai[i].reset = true;
  3434. mKahuku[i].ido = 6;
  3435. mKahuku[i].reset = true;
  3436. mHandL[i].ido = 2;
  3437. mHandR[i].ido = 2;
  3438. mFootL[i].ido = 4;
  3439. mFootR[i].ido = 4;
  3440. mHizaL[i].ido = 5;
  3441. mHizaR[i].ido = 5;
  3442. mHandL[i].reset = true;
  3443. mHandR[i].reset = true;
  3444. mFootL[i].reset = true;
  3445. mFootR[i].reset = true;
  3446. mHizaL[i].reset = true;
  3447. mHizaR[i].reset = true;
  3448. }
  3449. else if (ikModeOld[i] == 0)
  3450. {
  3451. mHandL[i].ido = 2;
  3452. mHandR[i].ido = 2;
  3453. mFootL[i].ido = 4;
  3454. mFootR[i].ido = 4;
  3455. mHizaL[i].ido = 5;
  3456. mHizaR[i].ido = 5;
  3457. mHandL[i].reset = true;
  3458. mHandR[i].reset = true;
  3459. mFootL[i].reset = true;
  3460. mFootR[i].reset = true;
  3461. mHizaL[i].reset = true;
  3462. mHizaR[i].reset = true;
  3463. }
  3464. else
  3465. {
  3466. if (!gHead[i])
  3467. {
  3468. this.SetIKInit4(i);
  3469. }
  3470. if (mHead[i].isHead)
  3471. {
  3472. mHead[i].isHead = false;
  3473. isLookn[i] = isLook[i];
  3474. isLook[i] = !isLook[i];
  3475. }
  3476. gHead[i].transform.position = new Vector3(Head2[i].position.x, (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f, Head2[i].position.z);
  3477. gHead[i].transform.eulerAngles = new Vector3(Head2[i].transform.eulerAngles.x, Head2[i].transform.eulerAngles.y, Head2[i].transform.eulerAngles.z + 90f);
  3478. mHead[i].head = Head1[i];
  3479. mHead[i].maid = maid;
  3480. mHead[i].ido = 4;
  3481. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3482. Transform transform3 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3483. Transform transform4 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3484. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3485. Transform transform6 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3486. gJotai[i].transform.position = new Vector3(transform3.position.x, (transform3.position.y * 0f + transform4.position.y * 2f) / 2f, transform3.position.z);
  3487. gJotai[i].transform.eulerAngles = new Vector3(transform3.transform.eulerAngles.x, transform3.transform.eulerAngles.y, transform3.transform.eulerAngles.z + 90f);
  3488. mJotai[i].Spine0a = spine0a;
  3489. mJotai[i].Spine1 = transform3;
  3490. mJotai[i].Spine1a = transform4;
  3491. mJotai[i].Spine = transform5;
  3492. mJotai[i].maid = maid;
  3493. mJotai[i].ido = 5;
  3494. gKahuku[i].transform.position = new Vector3(transform6.position.x, (transform6.position.y + transform5.position.y) / 2f, transform6.position.z);
  3495. gKahuku[i].transform.eulerAngles = new Vector3(transform6.transform.eulerAngles.x + 90f, transform6.transform.eulerAngles.y + 90f, transform6.transform.eulerAngles.z);
  3496. mKahuku[i].Pelvis = transform6;
  3497. mKahuku[i].maid = maid;
  3498. mKahuku[i].ido = 6;
  3499. mHandL[i].ido = 2;
  3500. mHandR[i].ido = 2;
  3501. mFootL[i].ido = 4;
  3502. mFootR[i].ido = 4;
  3503. mHizaL[i].ido = 5;
  3504. mHizaR[i].ido = 5;
  3505. gArmL[i].SetActive(false);
  3506. gArmR[i].SetActive(false);
  3507. gClavicleL[i].SetActive(false);
  3508. gClavicleR[i].SetActive(false);
  3509. gNeck[i].SetActive(false);
  3510. gSpine[i].SetActive(false);
  3511. gSpine0a[i].SetActive(false);
  3512. gSpine1a[i].SetActive(false);
  3513. gSpine1[i].SetActive(false);
  3514. gPelvis[i].SetActive(false);
  3515. if (isBone[i])
  3516. {
  3517. gHizaL[i].SetActive(false);
  3518. gHizaR[i].SetActive(false);
  3519. gHead[i].SetActive(false);
  3520. gJotai[i].SetActive(false);
  3521. gKahuku[i].SetActive(false);
  3522. }
  3523. else
  3524. {
  3525. gHizaL[i].SetActive(true);
  3526. gHizaR[i].SetActive(true);
  3527. gHead[i].SetActive(true);
  3528. gJotai[i].SetActive(true);
  3529. gKahuku[i].SetActive(true);
  3530. }
  3531. if (mHead[i].isStop)
  3532. {
  3533. isStop[i] = true;
  3534. isLock[i] = true;
  3535. mHead[i].isStop = false;
  3536. }
  3537. if (mJotai[i].isStop)
  3538. {
  3539. isStop[i] = true;
  3540. isLock[i] = true;
  3541. mJotai[i].isStop = false;
  3542. }
  3543. if (mKahuku[i].isStop)
  3544. {
  3545. isStop[i] = true;
  3546. isLock[i] = true;
  3547. mKahuku[i].isStop = false;
  3548. }
  3549. if (mHead[i].isSelect)
  3550. {
  3551. mHead[i].isSelect = false;
  3552. if (ikMaid != i)
  3553. {
  3554. ikMaid = i;
  3555. ikBui = 5;
  3556. this.SetIK(maid, i);
  3557. }
  3558. }
  3559. if (mJotai[i].isSelect)
  3560. {
  3561. mJotai[i].isSelect = false;
  3562. if (ikMaid != i)
  3563. {
  3564. ikMaid = i;
  3565. ikBui = 5;
  3566. this.SetIK(maid, i);
  3567. }
  3568. }
  3569. if (mKahuku[i].isSelect)
  3570. {
  3571. mKahuku[i].isSelect = false;
  3572. if (ikMaid != i)
  3573. {
  3574. ikMaid = i;
  3575. ikBui = 5;
  3576. this.SetIK(maid, i);
  3577. }
  3578. }
  3579. }
  3580. }
  3581. else if (ikMode[i] == 13)
  3582. {
  3583. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3584. {
  3585. mMaid[i].ido = 5;
  3586. mMaid[i].reset = true;
  3587. mMaidC[i].ido = 5;
  3588. mMaidC[i].reset = true;
  3589. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3590. }
  3591. else
  3592. {
  3593. if (!gMaid[i])
  3594. {
  3595. this.SetIKInit3(i);
  3596. }
  3597. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3598. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3599. mMaid[i].maid = maid;
  3600. mMaid[i].ido = 5;
  3601. gMaidC[i].transform.position = maid.transform.position;
  3602. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3603. mMaidC[i].maid = maid;
  3604. mMaidC[i].ido = 5;
  3605. if (isCube)
  3606. {
  3607. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3608. gMaidC[i].SetActive(true);
  3609. }
  3610. else
  3611. {
  3612. gMaidC[i].SetActive(false);
  3613. }
  3614. gHandL[i].SetActive(false);
  3615. gArmL[i].SetActive(false);
  3616. gFootL[i].SetActive(false);
  3617. gHizaL[i].SetActive(false);
  3618. gHandR[i].SetActive(false);
  3619. gArmR[i].SetActive(false);
  3620. gFootR[i].SetActive(false);
  3621. gHizaR[i].SetActive(false);
  3622. gClavicleL[i].SetActive(false);
  3623. gClavicleR[i].SetActive(false);
  3624. gNeck[i].SetActive(false);
  3625. gSpine[i].SetActive(false);
  3626. gSpine0a[i].SetActive(false);
  3627. gSpine1a[i].SetActive(false);
  3628. gSpine1[i].SetActive(false);
  3629. gPelvis[i].SetActive(false);
  3630. }
  3631. if (mMaid[i].isSelect)
  3632. {
  3633. mMaid[i].isSelect = false;
  3634. if (ikMaid != i)
  3635. {
  3636. ikMaid = i;
  3637. ikBui = 5;
  3638. this.SetIK(maid, i);
  3639. }
  3640. }
  3641. }
  3642. else if (ikMode[i] == 11)
  3643. {
  3644. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3645. {
  3646. mMaid[i].ido = 3;
  3647. mMaid[i].reset = true;
  3648. mMaidC[i].ido = 3;
  3649. mMaidC[i].reset = true;
  3650. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3651. }
  3652. else
  3653. {
  3654. if (!gMaid[i])
  3655. {
  3656. this.SetIKInit3(i);
  3657. }
  3658. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3659. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3660. mMaid[i].maid = maid;
  3661. mMaid[i].ido = 3;
  3662. gMaidC[i].transform.position = maid.transform.position;
  3663. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3664. mMaidC[i].maid = maid;
  3665. mMaidC[i].ido = 3;
  3666. if (isCube)
  3667. {
  3668. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3669. gMaidC[i].SetActive(true);
  3670. }
  3671. else
  3672. {
  3673. gMaidC[i].SetActive(false);
  3674. }
  3675. gHandL[i].SetActive(false);
  3676. gArmL[i].SetActive(false);
  3677. gFootL[i].SetActive(false);
  3678. gHizaL[i].SetActive(false);
  3679. gHandR[i].SetActive(false);
  3680. gArmR[i].SetActive(false);
  3681. gFootR[i].SetActive(false);
  3682. gHizaR[i].SetActive(false);
  3683. gClavicleL[i].SetActive(false);
  3684. gClavicleR[i].SetActive(false);
  3685. gNeck[i].SetActive(false);
  3686. gSpine[i].SetActive(false);
  3687. gSpine0a[i].SetActive(false);
  3688. gSpine1a[i].SetActive(false);
  3689. gSpine1[i].SetActive(false);
  3690. gPelvis[i].SetActive(false);
  3691. }
  3692. if (mMaid[i].isSelect)
  3693. {
  3694. mMaid[i].isSelect = false;
  3695. if (ikMaid != i)
  3696. {
  3697. ikMaid = i;
  3698. ikBui = 5;
  3699. this.SetIK(maid, i);
  3700. }
  3701. }
  3702. }
  3703. else if (ikMode[i] == 12)
  3704. {
  3705. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3706. {
  3707. mMaid[i].ido = 2;
  3708. mMaid[i].reset = true;
  3709. mMaidC[i].ido = 2;
  3710. mMaidC[i].reset = true;
  3711. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3712. }
  3713. else
  3714. {
  3715. if (!gMaid[i])
  3716. {
  3717. this.SetIKInit3(i);
  3718. }
  3719. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3720. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3721. mMaid[i].maid = maid;
  3722. mMaid[i].ido = 2;
  3723. gMaidC[i].transform.position = maid.transform.position;
  3724. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3725. mMaidC[i].maid = maid;
  3726. mMaidC[i].ido = 2;
  3727. if (isCube)
  3728. {
  3729. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3730. gMaidC[i].SetActive(true);
  3731. }
  3732. else
  3733. {
  3734. gMaidC[i].SetActive(false);
  3735. }
  3736. gHandL[i].SetActive(false);
  3737. gArmL[i].SetActive(false);
  3738. gFootL[i].SetActive(false);
  3739. gHizaL[i].SetActive(false);
  3740. gHandR[i].SetActive(false);
  3741. gArmR[i].SetActive(false);
  3742. gFootR[i].SetActive(false);
  3743. gHizaR[i].SetActive(false);
  3744. gClavicleL[i].SetActive(false);
  3745. gClavicleR[i].SetActive(false);
  3746. gNeck[i].SetActive(false);
  3747. gSpine[i].SetActive(false);
  3748. gSpine0a[i].SetActive(false);
  3749. gSpine1a[i].SetActive(false);
  3750. gSpine1[i].SetActive(false);
  3751. gPelvis[i].SetActive(false);
  3752. }
  3753. if (mMaid[i].isSelect)
  3754. {
  3755. mMaid[i].isSelect = false;
  3756. if (ikMaid != i)
  3757. {
  3758. ikMaid = i;
  3759. ikBui = 5;
  3760. this.SetIK(maid, i);
  3761. }
  3762. }
  3763. }
  3764. else if (ikMode[i] == 10)
  3765. {
  3766. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3767. {
  3768. mMaid[i].ido = 1;
  3769. mMaid[i].reset = true;
  3770. mMaidC[i].ido = 1;
  3771. mMaidC[i].reset = true;
  3772. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3773. }
  3774. else
  3775. {
  3776. if (!gMaid[i])
  3777. {
  3778. this.SetIKInit3(i);
  3779. }
  3780. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3781. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3782. mMaid[i].maid = maid;
  3783. mMaid[i].ido = 1;
  3784. gMaidC[i].transform.position = maid.transform.position;
  3785. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3786. mMaidC[i].maid = maid;
  3787. mMaidC[i].ido = 1;
  3788. if (isCube)
  3789. {
  3790. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3791. gMaidC[i].SetActive(true);
  3792. }
  3793. else
  3794. {
  3795. gMaidC[i].SetActive(false);
  3796. }
  3797. gHandL[i].SetActive(false);
  3798. gArmL[i].SetActive(false);
  3799. gFootL[i].SetActive(false);
  3800. gHizaL[i].SetActive(false);
  3801. gHandR[i].SetActive(false);
  3802. gArmR[i].SetActive(false);
  3803. gFootR[i].SetActive(false);
  3804. gHizaR[i].SetActive(false);
  3805. gClavicleL[i].SetActive(false);
  3806. gClavicleR[i].SetActive(false);
  3807. gNeck[i].SetActive(false);
  3808. gSpine[i].SetActive(false);
  3809. gSpine0a[i].SetActive(false);
  3810. gSpine1a[i].SetActive(false);
  3811. gSpine1[i].SetActive(false);
  3812. gPelvis[i].SetActive(false);
  3813. }
  3814. if (mMaid[i].isSelect)
  3815. {
  3816. mMaid[i].isSelect = false;
  3817. if (ikMaid != i)
  3818. {
  3819. ikMaid = i;
  3820. ikBui = 5;
  3821. this.SetIK(maid, i);
  3822. }
  3823. }
  3824. }
  3825. else if (ikMode[i] == 9)
  3826. {
  3827. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3828. {
  3829. mMaid[i].ido = 4;
  3830. mMaid[i].reset = true;
  3831. mMaidC[i].ido = 4;
  3832. mMaidC[i].reset = true;
  3833. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3834. }
  3835. else
  3836. {
  3837. if (!gMaid[i])
  3838. {
  3839. this.SetIKInit3(i);
  3840. }
  3841. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3842. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3843. mMaid[i].maid = maid;
  3844. mMaid[i].ido = 4;
  3845. gMaidC[i].transform.position = maid.transform.position;
  3846. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3847. mMaidC[i].maid = maid;
  3848. mMaidC[i].ido = 4;
  3849. if (isCube)
  3850. {
  3851. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3852. gMaidC[i].SetActive(true);
  3853. }
  3854. else
  3855. {
  3856. gMaidC[i].SetActive(false);
  3857. }
  3858. gHandL[i].SetActive(false);
  3859. gArmL[i].SetActive(false);
  3860. gFootL[i].SetActive(false);
  3861. gHizaL[i].SetActive(false);
  3862. gHandR[i].SetActive(false);
  3863. gArmR[i].SetActive(false);
  3864. gFootR[i].SetActive(false);
  3865. gHizaR[i].SetActive(false);
  3866. gClavicleL[i].SetActive(false);
  3867. gClavicleR[i].SetActive(false);
  3868. gNeck[i].SetActive(false);
  3869. gSpine[i].SetActive(false);
  3870. gSpine0a[i].SetActive(false);
  3871. gSpine1a[i].SetActive(false);
  3872. gSpine1[i].SetActive(false);
  3873. gPelvis[i].SetActive(false);
  3874. }
  3875. if (mMaid[i].isSelect)
  3876. {
  3877. mMaid[i].isSelect = false;
  3878. if (ikMaid != i)
  3879. {
  3880. ikMaid = i;
  3881. ikBui = 5;
  3882. this.SetIK(maid, i);
  3883. }
  3884. }
  3885. }
  3886. else if (ikMode[i] == 14)
  3887. {
  3888. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3889. {
  3890. mMaid[i].ido = 6;
  3891. mMaid[i].reset = true;
  3892. mMaidC[i].ido = 6;
  3893. mMaidC[i].reset = true;
  3894. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3895. }
  3896. else
  3897. {
  3898. if (!gMaid[i])
  3899. {
  3900. this.SetIKInit3(i);
  3901. }
  3902. gMaid[i].transform.position = new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f, (Spine12[i].position.y + Spine0a2[i].position.y) / 2f, (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3903. gMaid[i].transform.eulerAngles = new Vector3(Spine0a2[i].transform.eulerAngles.x, Spine0a2[i].transform.eulerAngles.y, Spine0a2[i].transform.eulerAngles.z + 90f);
  3904. mMaid[i].maid = maid;
  3905. mMaid[i].ido = 6;
  3906. gMaidC[i].transform.position = maid.transform.position;
  3907. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3908. mMaidC[i].maid = maid;
  3909. mMaidC[i].ido = 6;
  3910. if (isCube)
  3911. {
  3912. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3913. gMaidC[i].SetActive(true);
  3914. }
  3915. else
  3916. {
  3917. gMaidC[i].SetActive(false);
  3918. }
  3919. gHandL[i].SetActive(false);
  3920. gArmL[i].SetActive(false);
  3921. gFootL[i].SetActive(false);
  3922. gHizaL[i].SetActive(false);
  3923. gHandR[i].SetActive(false);
  3924. gArmR[i].SetActive(false);
  3925. gFootR[i].SetActive(false);
  3926. gHizaR[i].SetActive(false);
  3927. gClavicleL[i].SetActive(false);
  3928. gClavicleR[i].SetActive(false);
  3929. gNeck[i].SetActive(false);
  3930. gSpine[i].SetActive(false);
  3931. gSpine0a[i].SetActive(false);
  3932. gSpine1a[i].SetActive(false);
  3933. gSpine1[i].SetActive(false);
  3934. gPelvis[i].SetActive(false);
  3935. }
  3936. if (mMaid[i].isSelect)
  3937. {
  3938. mMaid[i].isSelect = false;
  3939. if (ikMaid != i)
  3940. {
  3941. ikMaid = i;
  3942. ikBui = 5;
  3943. this.SetIK(maid, i);
  3944. }
  3945. }
  3946. }
  3947. else if (ikMode[i] == 6)
  3948. {
  3949. if (!gFinger[i, 0])
  3950. {
  3951. this.SetIKInit2(i);
  3952. }
  3953. UnityEngine.Object.Destroy(gMaid[i]);
  3954. UnityEngine.Object.Destroy(gMaidC[i]);
  3955. UnityEngine.Object.Destroy(gHead[i]);
  3956. UnityEngine.Object.Destroy(gJotai[i]);
  3957. UnityEngine.Object.Destroy(gKahuku[i]);
  3958. gHandL[i].SetActive(false);
  3959. gArmL[i].SetActive(false);
  3960. gFootL[i].SetActive(false);
  3961. gHizaL[i].SetActive(false);
  3962. gHandR[i].SetActive(false);
  3963. gArmR[i].SetActive(false);
  3964. gFootR[i].SetActive(false);
  3965. gHizaR[i].SetActive(false);
  3966. gClavicleL[i].SetActive(false);
  3967. gClavicleR[i].SetActive(false);
  3968. gNeck[i].SetActive(false);
  3969. gSpine[i].SetActive(false);
  3970. gSpine0a[i].SetActive(false);
  3971. gSpine1a[i].SetActive(false);
  3972. gSpine1[i].SetActive(false);
  3973. gPelvis[i].SetActive(false);
  3974. for (int j = 0; j < 10; j++)
  3975. {
  3976. mFinger[i, j * 3 + 2].maid = maid;
  3977. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  3978. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  3979. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  3980. mFinger[i, j * 3 + 2].ido = 12;
  3981. if (j == 0 || j == 5)
  3982. {
  3983. mFinger[i, j * 3 + 2].ido = 15;
  3984. }
  3985. mFinger[i, j * 3 + 1].maid = maid;
  3986. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  3987. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  3988. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  3989. mFinger[i, j * 3 + 1].ido = 11;
  3990. if (j == 0 || j == 5)
  3991. {
  3992. mFinger[i, j * 3 + 1].ido = 14;
  3993. }
  3994. mFinger[i, j * 3].maid = maid;
  3995. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  3996. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  3997. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  3998. mFinger[i, j * 3].ido = 13;
  3999. if (j == 0 || j == 5)
  4000. {
  4001. mFinger[i, j * 3].ido = 0;
  4002. }
  4003. gFinger[i, j * 3 + 2].SetActive(false);
  4004. gFinger[i, j * 3 + 1].SetActive(false);
  4005. gFinger[i, j * 3].SetActive(true);
  4006. gFinger[i, j * 3].SetActive(true);
  4007. mFinger[i, j * 3].ido = 16;
  4008. if (ikModeOld[i] != 6)
  4009. {
  4010. mFinger[i, j * 3].reset = true;
  4011. }
  4012. gFinger[i, j * 3 + 2].transform.position = (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 2].position) / 3f;
  4013. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4014. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4015. if (mFinger[i, j * 3 + 2].isStop)
  4016. {
  4017. isStop[i] = true;
  4018. isLock[i] = true;
  4019. mFinger[i, j * 3 + 2].isStop = false;
  4020. }
  4021. if (mFinger[i, j * 3 + 1].isStop)
  4022. {
  4023. isStop[i] = true;
  4024. isLock[i] = true;
  4025. mFinger[i, j * 3 + 1].isStop = false;
  4026. }
  4027. if (mFinger[i, j * 3].isStop)
  4028. {
  4029. isStop[i] = true;
  4030. isLock[i] = true;
  4031. mFinger[i, j * 3].isStop = false;
  4032. }
  4033. }
  4034. for (int j = 0; j < 6; j++)
  4035. {
  4036. mFinger2[i, j * 2 + 1].maid = maid;
  4037. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4038. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4039. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4040. mFinger2[i, j * 2 + 1].ido = 0;
  4041. mFinger2[i, j * 2].maid = maid;
  4042. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4043. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4044. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4045. mFinger2[i, j * 2].ido = 0;
  4046. gFinger2[i, j * 2 + 1].SetActive(false);
  4047. gFinger2[i, j * 2].SetActive(false);
  4048. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4049. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4050. if (mFinger2[i, j * 2 + 1].isStop)
  4051. {
  4052. isStop[i] = true;
  4053. isLock[i] = true;
  4054. mFinger2[i, j * 2 + 1].isStop = false;
  4055. }
  4056. if (mFinger2[i, j * 2].isStop)
  4057. {
  4058. isStop[i] = true;
  4059. isLock[i] = true;
  4060. mFinger2[i, j * 2].isStop = false;
  4061. }
  4062. }
  4063. }
  4064. else if (ikMode[i] == 4)
  4065. {
  4066. if (!gFinger[i, 0])
  4067. {
  4068. this.SetIKInit2(i);
  4069. }
  4070. UnityEngine.Object.Destroy(gMaid[i]);
  4071. UnityEngine.Object.Destroy(gMaidC[i]);
  4072. UnityEngine.Object.Destroy(gHead[i]);
  4073. UnityEngine.Object.Destroy(gJotai[i]);
  4074. UnityEngine.Object.Destroy(gKahuku[i]);
  4075. gHandL[i].SetActive(false);
  4076. gArmL[i].SetActive(false);
  4077. gFootL[i].SetActive(false);
  4078. gHizaL[i].SetActive(false);
  4079. gHandR[i].SetActive(false);
  4080. gArmR[i].SetActive(false);
  4081. gFootR[i].SetActive(false);
  4082. gHizaR[i].SetActive(false);
  4083. gClavicleL[i].SetActive(false);
  4084. gClavicleR[i].SetActive(false);
  4085. gNeck[i].SetActive(false);
  4086. gSpine[i].SetActive(false);
  4087. gSpine0a[i].SetActive(false);
  4088. gSpine1a[i].SetActive(false);
  4089. gSpine1[i].SetActive(false);
  4090. gPelvis[i].SetActive(false);
  4091. for (int j = 0; j < 10; j++)
  4092. {
  4093. mFinger[i, j * 3 + 2].maid = maid;
  4094. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4095. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4096. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4097. mFinger[i, j * 3 + 2].ido = 12;
  4098. mFinger[i, j * 3 + 2].onFlg = true;
  4099. if (j == 0 || j == 5)
  4100. {
  4101. mFinger[i, j * 3 + 2].ido = 15;
  4102. }
  4103. mFinger[i, j * 3 + 1].maid = maid;
  4104. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4105. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4106. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4107. mFinger[i, j * 3 + 1].ido = 11;
  4108. mFinger[i, j * 3 + 1].onFlg = true;
  4109. if (j == 0 || j == 5)
  4110. {
  4111. mFinger[i, j * 3 + 1].ido = 14;
  4112. }
  4113. mFinger[i, j * 3].maid = maid;
  4114. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4115. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4116. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4117. mFinger[i, j * 3].ido = 13;
  4118. mFinger[i, j * 3].onFlg = true;
  4119. if (j == 0 || j == 5)
  4120. {
  4121. mFinger[i, j * 3].ido = 0;
  4122. }
  4123. if (ikModeOld[i] != 4)
  4124. {
  4125. mFinger[i, j * 3].reset = true;
  4126. }
  4127. gFinger[i, j * 3 + 2].SetActive(true);
  4128. gFinger[i, j * 3 + 1].SetActive(true);
  4129. gFinger[i, j * 3].SetActive(true);
  4130. gFinger[i, j * 3 + 2].transform.position = (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 2].position) / 3f;
  4131. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4132. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4133. if (mFinger[i, j * 3 + 2].isStop)
  4134. {
  4135. isStop[i] = true;
  4136. isLock[i] = true;
  4137. mFinger[i, j * 3 + 2].isStop = false;
  4138. }
  4139. if (mFinger[i, j * 3 + 1].isStop)
  4140. {
  4141. isStop[i] = true;
  4142. isLock[i] = true;
  4143. mFinger[i, j * 3 + 1].isStop = false;
  4144. }
  4145. if (mFinger[i, j * 3].isStop)
  4146. {
  4147. isStop[i] = true;
  4148. isLock[i] = true;
  4149. mFinger[i, j * 3].isStop = false;
  4150. }
  4151. }
  4152. for (int j = 0; j < 6; j++)
  4153. {
  4154. mFinger2[i, j * 2 + 1].maid = maid;
  4155. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4156. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4157. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4158. mFinger2[i, j * 2 + 1].ido = 17;
  4159. mFinger2[i, j * 2].maid = maid;
  4160. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4161. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4162. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4163. mFinger2[i, j * 2].ido = 0;
  4164. gFinger2[i, j * 2 + 1].SetActive(true);
  4165. gFinger2[i, j * 2].SetActive(true);
  4166. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4167. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4168. if (mFinger2[i, j * 2 + 1].isStop)
  4169. {
  4170. isStop[i] = true;
  4171. isLock[i] = true;
  4172. mFinger2[i, j * 2 + 1].isStop = false;
  4173. }
  4174. if (mFinger2[i, j * 2].isStop)
  4175. {
  4176. isStop[i] = true;
  4177. isLock[i] = true;
  4178. mFinger2[i, j * 2].isStop = false;
  4179. }
  4180. }
  4181. }
  4182. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4183. {
  4184. mHandL[i].ido = 0;
  4185. mHandR[i].ido = 0;
  4186. mFootL[i].ido = 0;
  4187. mFootR[i].ido = 0;
  4188. mHizaL[i].ido = 0;
  4189. mHizaR[i].ido = 0;
  4190. mHandL[i].reset = true;
  4191. mHandR[i].reset = true;
  4192. mFootL[i].reset = true;
  4193. mFootR[i].reset = true;
  4194. mHizaL[i].reset = true;
  4195. mHizaR[i].reset = true;
  4196. }
  4197. else
  4198. {
  4199. if (gFinger[i, 0])
  4200. {
  4201. for (int j = 0; j < 30; j++)
  4202. {
  4203. gFinger[i, j].SetActive(false);
  4204. }
  4205. for (int j = 0; j < 12; j++)
  4206. {
  4207. gFinger2[i, j].SetActive(false);
  4208. }
  4209. }
  4210. UnityEngine.Object.Destroy(gHead[i]);
  4211. UnityEngine.Object.Destroy(gJotai[i]);
  4212. UnityEngine.Object.Destroy(gKahuku[i]);
  4213. UnityEngine.Object.Destroy(gIKHandL[i]);
  4214. UnityEngine.Object.Destroy(gIKHandR[i]);
  4215. UnityEngine.Object.Destroy(gIKMuneL[i]);
  4216. UnityEngine.Object.Destroy(gIKMuneR[i]);
  4217. UnityEngine.Object.Destroy(gHead2[i]);
  4218. UnityEngine.Object.Destroy(gMaid2[i]);
  4219. gHandL[i].SetActive(true);
  4220. gArmL[i].SetActive(true);
  4221. gFootL[i].SetActive(true);
  4222. gHizaL[i].SetActive(true);
  4223. gHandR[i].SetActive(true);
  4224. gArmR[i].SetActive(true);
  4225. gFootR[i].SetActive(true);
  4226. gHizaR[i].SetActive(true);
  4227. mHandL[i].ido = 0;
  4228. mHandR[i].ido = 0;
  4229. mFootL[i].ido = 0;
  4230. mFootR[i].ido = 0;
  4231. gClavicleL[i].SetActive(true);
  4232. gClavicleR[i].SetActive(true);
  4233. }
  4234. if (!isIK[i])
  4235. {
  4236. gHandL[i].SetActive(false);
  4237. gArmL[i].SetActive(false);
  4238. gFootL[i].SetActive(false);
  4239. gHizaL[i].SetActive(false);
  4240. gHandR[i].SetActive(false);
  4241. gArmR[i].SetActive(false);
  4242. gFootR[i].SetActive(false);
  4243. gHizaR[i].SetActive(false);
  4244. gClavicleL[i].SetActive(false);
  4245. gClavicleR[i].SetActive(false);
  4246. gNeck[i].SetActive(false);
  4247. gSpine[i].SetActive(false);
  4248. gSpine0a[i].SetActive(false);
  4249. gSpine1a[i].SetActive(false);
  4250. gSpine1[i].SetActive(false);
  4251. gPelvis[i].SetActive(false);
  4252. }
  4253. if (isIK[i])
  4254. {
  4255. mHandL[i].maid = maid;
  4256. mHandL[i].HandL = HandL1[i];
  4257. if (ikMode[i] == 2)
  4258. {
  4259. mHandL[i].UpperArmL = ForearmL1[i];
  4260. }
  4261. else
  4262. {
  4263. mHandL[i].UpperArmL = UpperArmL1[i];
  4264. if (ikModeOld[i] == 2 && isLock[i])
  4265. {
  4266. mHandL[i].OnMouseDown();
  4267. mHandL[i].isSelect = false;
  4268. }
  4269. }
  4270. mHandL[i].ForearmL = ForearmL1[i];
  4271. mArmL[i].maid = maid;
  4272. mArmL[i].HandL = ForearmL1[i];
  4273. mArmL[i].UpperArmL = UpperArmL1[i];
  4274. mArmL[i].ForearmL = UpperArmL1[i];
  4275. mArmL[i].onFlg = true;
  4276. if (mArmL[i].onFlg2)
  4277. {
  4278. mArmL[i].onFlg2 = false;
  4279. mHandL[i].initFlg = false;
  4280. }
  4281. if (ikMode[i] == 2)
  4282. {
  4283. mHandL[i].initFlg = false;
  4284. mHandR[i].initFlg = false;
  4285. mFootL[i].initFlg = false;
  4286. mFootR[i].initFlg = false;
  4287. mHandL[i].onFlg = true;
  4288. mHandR[i].onFlg = true;
  4289. mFootL[i].onFlg = true;
  4290. mFootR[i].onFlg = true;
  4291. }
  4292. else
  4293. {
  4294. mHandL[i].onFlg = false;
  4295. mHandR[i].onFlg = false;
  4296. mFootL[i].onFlg = false;
  4297. mFootR[i].onFlg = false;
  4298. }
  4299. gHandL[i].transform.position = HandL1[i].position;
  4300. gArmL[i].transform.position = ForearmL1[i].position;
  4301. mClavicleL[i].maid = maid;
  4302. mClavicleL[i].HandL = UpperArmL1[i];
  4303. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4304. mClavicleL[i].ForearmL = ClavicleL1[i];
  4305. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4306. if (mHandL[i].isStop)
  4307. {
  4308. isStop[i] = true;
  4309. isLock[i] = true;
  4310. mHandL[i].isStop = false;
  4311. }
  4312. if (mArmL[i].isStop)
  4313. {
  4314. isStop[i] = true;
  4315. isLock[i] = true;
  4316. mArmL[i].isStop = false;
  4317. }
  4318. if (mClavicleL[i].isStop)
  4319. {
  4320. isStop[i] = true;
  4321. isLock[i] = true;
  4322. mClavicleL[i].isStop = false;
  4323. }
  4324. mHandR[i].maid = maid;
  4325. mHandR[i].HandL = HandR1[i];
  4326. if (ikMode[i] == 2)
  4327. {
  4328. mHandR[i].UpperArmL = ForearmR1[i];
  4329. }
  4330. else
  4331. {
  4332. mHandR[i].UpperArmL = UpperArmR1[i];
  4333. if (ikModeOld[i] == 2 && isLock[i])
  4334. {
  4335. mHandR[i].OnMouseDown();
  4336. mHandR[i].isSelect = false;
  4337. }
  4338. }
  4339. mHandR[i].ForearmL = ForearmR1[i];
  4340. mArmR[i].maid = maid;
  4341. mArmR[i].HandL = ForearmR1[i];
  4342. mArmR[i].UpperArmL = UpperArmR1[i];
  4343. mArmR[i].ForearmL = UpperArmR1[i];
  4344. mArmR[i].onFlg = true;
  4345. if (mArmR[i].onFlg2)
  4346. {
  4347. mArmR[i].onFlg2 = false;
  4348. mHandR[i].initFlg = false;
  4349. }
  4350. gHandR[i].transform.position = HandR1[i].position;
  4351. gArmR[i].transform.position = ForearmR1[i].position;
  4352. mClavicleR[i].maid = maid;
  4353. mClavicleR[i].HandL = UpperArmR1[i];
  4354. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4355. mClavicleR[i].ForearmL = ClavicleR1[i];
  4356. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4357. if (mHandR[i].isStop)
  4358. {
  4359. isStop[i] = true;
  4360. isLock[i] = true;
  4361. mHandR[i].isStop = false;
  4362. }
  4363. if (mArmR[i].isStop)
  4364. {
  4365. isStop[i] = true;
  4366. isLock[i] = true;
  4367. mArmR[i].isStop = false;
  4368. }
  4369. if (mClavicleL[i].isStop)
  4370. {
  4371. isStop[i] = true;
  4372. isLock[i] = true;
  4373. mClavicleL[i].isStop = false;
  4374. }
  4375. mFootL[i].maid = maid;
  4376. mFootL[i].HandL = HandL2[i];
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mFootL[i].UpperArmL = ForearmL2[i];
  4380. }
  4381. else
  4382. {
  4383. mFootL[i].UpperArmL = UpperArmL2[i];
  4384. if (ikModeOld[i] == 2 && isLock[i])
  4385. {
  4386. mFootL[i].OnMouseDown();
  4387. mFootL[i].isSelect = false;
  4388. }
  4389. }
  4390. mFootL[i].ForearmL = ForearmL2[i];
  4391. mHizaL[i].maid = maid;
  4392. mHizaL[i].HandL = ForearmL2[i];
  4393. mHizaL[i].UpperArmL = UpperArmL2[i];
  4394. mHizaL[i].ForearmL = UpperArmL2[i];
  4395. mHizaL[i].onFlg = true;
  4396. if (mHizaL[i].onFlg2)
  4397. {
  4398. mHizaL[i].onFlg2 = false;
  4399. mFootL[i].initFlg = false;
  4400. }
  4401. gFootL[i].transform.position = HandL2[i].position;
  4402. gHizaL[i].transform.position = ForearmL2[i].position;
  4403. if (mFootL[i].isStop)
  4404. {
  4405. isStop[i] = true;
  4406. isLock[i] = true;
  4407. mFootL[i].isStop = false;
  4408. }
  4409. if (mHizaL[i].isStop)
  4410. {
  4411. isStop[i] = true;
  4412. isLock[i] = true;
  4413. mHizaL[i].isStop = false;
  4414. }
  4415. mFootR[i].maid = maid;
  4416. mFootR[i].HandL = HandR2[i];
  4417. if (ikMode[i] == 2)
  4418. {
  4419. mFootR[i].UpperArmL = ForearmR2[i];
  4420. }
  4421. else
  4422. {
  4423. mFootR[i].UpperArmL = UpperArmR2[i];
  4424. if (ikModeOld[i] == 2 && isLock[i])
  4425. {
  4426. mFootR[i].OnMouseDown();
  4427. mFootR[i].isSelect = false;
  4428. }
  4429. }
  4430. mFootR[i].ForearmL = ForearmR2[i];
  4431. mHizaR[i].maid = maid;
  4432. mHizaR[i].HandL = ForearmR2[i];
  4433. mHizaR[i].UpperArmL = UpperArmR2[i];
  4434. mHizaR[i].ForearmL = UpperArmR2[i];
  4435. mHizaR[i].onFlg = true;
  4436. if (mHizaR[i].onFlg2)
  4437. {
  4438. mHizaR[i].onFlg2 = false;
  4439. mFootR[i].initFlg = false;
  4440. }
  4441. gFootR[i].transform.position = HandR2[i].position;
  4442. gHizaR[i].transform.position = ForearmR2[i].position;
  4443. if (mFootR[i].isStop)
  4444. {
  4445. isStop[i] = true;
  4446. isLock[i] = true;
  4447. mFootR[i].isStop = false;
  4448. }
  4449. if (mHizaR[i].isStop)
  4450. {
  4451. isStop[i] = true;
  4452. isLock[i] = true;
  4453. mHizaR[i].isStop = false;
  4454. }
  4455. bool flag13 = false;
  4456. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12 || ikModeOld[i] == 14)
  4457. {
  4458. flag13 = true;
  4459. }
  4460. if (isBone[i])
  4461. {
  4462. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i] || isChange[i])
  4463. {
  4464. gizmoFootL[i].Visible = false;
  4465. gizmoHandR[i].Visible = false;
  4466. gizmoHandL[i].Visible = false;
  4467. gizmoFootR[i].Visible = false;
  4468. }
  4469. else
  4470. {
  4471. bool fieldValue4 = MultipleMaids.GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4472. bool fieldValue5 = MultipleMaids.GetFieldValue<GizmoRender, bool>(gizmoHandR[i], "is_drag_");
  4473. bool fieldValue6 = MultipleMaids.GetFieldValue<GizmoRender, bool>(gizmoFootL[i], "is_drag_");
  4474. bool fieldValue7 = MultipleMaids.GetFieldValue<GizmoRender, bool>(gizmoFootR[i], "is_drag_");
  4475. if (ikMode[i] == 3)
  4476. {
  4477. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4478. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4479. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4480. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4481. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4482. {
  4483. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4484. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4485. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4486. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4487. }
  4488. else
  4489. {
  4490. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4491. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4492. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4493. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4494. }
  4495. }
  4496. else if (ikMode[i] == 5)
  4497. {
  4498. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4499. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4500. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4501. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4502. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4503. {
  4504. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4505. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4506. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4507. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4508. flag13 = true;
  4509. }
  4510. else
  4511. {
  4512. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4513. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4514. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4515. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4516. }
  4517. }
  4518. else if (ikMode[i] == 8)
  4519. {
  4520. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4521. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4522. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4523. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4524. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4525. {
  4526. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4527. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4528. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4529. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4530. flag13 = true;
  4531. }
  4532. else
  4533. {
  4534. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4535. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4536. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4537. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4538. }
  4539. }
  4540. gizmoHandL[i].Visible = true;
  4541. gizmoHandR[i].Visible = true;
  4542. gizmoFootL[i].Visible = true;
  4543. gizmoFootR[i].Visible = true;
  4544. gHandL[i].SetActive(false);
  4545. gFootL[i].SetActive(false);
  4546. gHandR[i].SetActive(false);
  4547. gFootR[i].SetActive(false);
  4548. if (!isLock[i])
  4549. {
  4550. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4551. {
  4552. isStop[i] = true;
  4553. isLock[i] = true;
  4554. }
  4555. }
  4556. }
  4557. if (isChange[i])
  4558. {
  4559. isChange[i] = false;
  4560. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4561. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4562. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4563. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4564. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4565. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4566. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4567. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4568. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4569. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4570. gHandL[i].GetComponent<Renderer>().enabled = true;
  4571. gHandR[i].GetComponent<Renderer>().enabled = true;
  4572. gArmL[i].GetComponent<Renderer>().enabled = true;
  4573. gArmR[i].GetComponent<Renderer>().enabled = true;
  4574. gFootL[i].GetComponent<Renderer>().enabled = true;
  4575. gFootR[i].GetComponent<Renderer>().enabled = true;
  4576. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4577. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4578. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4579. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4580. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4581. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4582. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4583. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4584. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4585. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4586. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4587. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4588. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4589. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4590. }
  4591. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4592. {
  4593. mNeck[i].ido = 1;
  4594. mNeck[i].reset = true;
  4595. mSpine[i].ido = 1;
  4596. mSpine[i].reset = true;
  4597. mSpine0a[i].ido = 1;
  4598. mSpine0a[i].reset = true;
  4599. mSpine1a[i].ido = 1;
  4600. mSpine1a[i].reset = true;
  4601. mSpine1[i].ido = 1;
  4602. mSpine1[i].reset = true;
  4603. mPelvis[i].ido = 1;
  4604. mPelvis[i].reset = true;
  4605. }
  4606. else if (ikMode[i] == 0)
  4607. {
  4608. gNeck[i].SetActive(true);
  4609. gSpine[i].SetActive(true);
  4610. gSpine0a[i].SetActive(true);
  4611. gSpine1a[i].SetActive(true);
  4612. gSpine1[i].SetActive(true);
  4613. gPelvis[i].SetActive(true);
  4614. if (mNeck[i].isHead)
  4615. {
  4616. mNeck[i].isHead = false;
  4617. isLookn[i] = isLook[i];
  4618. isLook[i] = !isLook[i];
  4619. }
  4620. mNeck[i].maid = maid;
  4621. mNeck[i].head = Neck[i];
  4622. mNeck[i].no = i;
  4623. mNeck[i].ido = 1;
  4624. gNeck[i].transform.position = Neck[i].position;
  4625. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4626. mSpine[i].maid = maid;
  4627. mSpine[i].head = Spine2[i];
  4628. mSpine[i].no = i;
  4629. mSpine[i].ido = 1;
  4630. gSpine[i].transform.position = Spine2[i].position;
  4631. gSpine[i].transform.eulerAngles = new Vector3(Spine2[i].localEulerAngles.z, Spine2[i].localEulerAngles.y, Spine2[i].localEulerAngles.x);
  4632. mSpine0a[i].maid = maid;
  4633. mSpine0a[i].head = Spine0a2[i];
  4634. mSpine0a[i].no = i;
  4635. mSpine0a[i].ido = 1;
  4636. gSpine0a[i].transform.position = Spine0a2[i].position;
  4637. gSpine0a[i].transform.eulerAngles = new Vector3(-Spine0a2[i].localEulerAngles.z, Spine0a2[i].localEulerAngles.x, Spine0a2[i].localEulerAngles.y);
  4638. mSpine1a[i].maid = maid;
  4639. mSpine1a[i].head = Spine1a2[i];
  4640. mSpine1a[i].no = i;
  4641. mSpine1a[i].ido = 1;
  4642. gSpine1a[i].transform.position = Spine1a2[i].position;
  4643. gSpine1a[i].transform.localEulerAngles = new Vector3(-Spine1a2[i].localEulerAngles.z, Spine1a2[i].localEulerAngles.x, Spine1a2[i].localEulerAngles.y);
  4644. mSpine1[i].maid = maid;
  4645. mSpine1[i].head = Spine12[i];
  4646. mSpine1[i].no = i;
  4647. mSpine1[i].ido = 1;
  4648. gSpine1[i].transform.position = Spine12[i].position;
  4649. gSpine1[i].transform.localEulerAngles = new Vector3(-Spine12[i].localEulerAngles.z, Spine12[i].localEulerAngles.x, Spine12[i].localEulerAngles.y);
  4650. mPelvis[i].maid = maid;
  4651. mPelvis[i].head = Pelvis2[i];
  4652. mPelvis[i].no = i;
  4653. mPelvis[i].ido = 1;
  4654. gPelvis[i].transform.position = Pelvis2[i].position;
  4655. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4656. if (mNeck[i].isIdo)
  4657. {
  4658. mNeck[i].isIdo = false;
  4659. isLock[i] = true;
  4660. }
  4661. if (mSpine[i].isIdo)
  4662. {
  4663. mSpine[i].isIdo = false;
  4664. flag13 = true;
  4665. isLock[i] = true;
  4666. }
  4667. if (mSpine0a[i].isIdo)
  4668. {
  4669. mSpine0a[i].isIdo = false;
  4670. flag13 = true;
  4671. isLock[i] = true;
  4672. }
  4673. if (mSpine1a[i].isIdo)
  4674. {
  4675. mSpine1a[i].isIdo = false;
  4676. flag13 = true;
  4677. isLock[i] = true;
  4678. }
  4679. if (mSpine1[i].isIdo)
  4680. {
  4681. mSpine1[i].isIdo = false;
  4682. flag13 = true;
  4683. isLock[i] = true;
  4684. }
  4685. if (mPelvis[i].isIdo)
  4686. {
  4687. mPelvis[i].isIdo = false;
  4688. flag13 = true;
  4689. isLock[i] = true;
  4690. }
  4691. if (mClavicleL[i].isIdo)
  4692. {
  4693. mClavicleL[i].isIdo = false;
  4694. flag13 = true;
  4695. isLock[i] = true;
  4696. }
  4697. if (mClavicleR[i].isIdo)
  4698. {
  4699. mClavicleR[i].isIdo = false;
  4700. flag13 = true;
  4701. isLock[i] = true;
  4702. }
  4703. }
  4704. }
  4705. else if (isChange[i])
  4706. {
  4707. isChange[i] = false;
  4708. gHandL[i].GetComponent<Renderer>().enabled = false;
  4709. gArmL[i].GetComponent<Renderer>().enabled = false;
  4710. gFootL[i].GetComponent<Renderer>().enabled = false;
  4711. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4712. gHandR[i].GetComponent<Renderer>().enabled = false;
  4713. gArmR[i].GetComponent<Renderer>().enabled = false;
  4714. gFootR[i].GetComponent<Renderer>().enabled = false;
  4715. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4716. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4717. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4718. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4719. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4720. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4721. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4722. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4723. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4724. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4725. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4726. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4727. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4728. gNeck[i].SetActive(false);
  4729. gSpine[i].SetActive(false);
  4730. gSpine0a[i].SetActive(false);
  4731. gSpine1a[i].SetActive(false);
  4732. gSpine1[i].SetActive(false);
  4733. gPelvis[i].SetActive(false);
  4734. gizmoHandL[i].Visible = false;
  4735. gizmoHandR[i].Visible = false;
  4736. gizmoFootL[i].Visible = false;
  4737. gizmoFootR[i].Visible = false;
  4738. }
  4739. if (flag13)
  4740. {
  4741. mHandL[i].initFlg = false;
  4742. mHandR[i].initFlg = false;
  4743. mFootL[i].initFlg = false;
  4744. mFootR[i].initFlg = false;
  4745. }
  4746. }
  4747. ikModeOld[i] = ikMode[i];
  4748. bool flag14 = false;
  4749. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4750. {
  4751. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4752. {
  4753. for (int k = 0; k < 10; k++)
  4754. {
  4755. maid.transform.RotateAround(maid.transform.position, Vector3.right, -maid.transform.rotation.eulerAngles.x);
  4756. maid.transform.RotateAround(maid.transform.position, Vector3.forward, -maid.transform.rotation.eulerAngles.z);
  4757. }
  4758. flag14 = true;
  4759. }
  4760. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4761. {
  4762. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.3f);
  4763. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.3f);
  4764. flag14 = true;
  4765. }
  4766. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4767. {
  4768. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.3f);
  4769. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.3f);
  4770. flag14 = true;
  4771. }
  4772. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4773. {
  4774. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.3f);
  4775. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.3f);
  4776. flag14 = true;
  4777. }
  4778. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4779. {
  4780. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.3f);
  4781. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.3f);
  4782. flag14 = true;
  4783. }
  4784. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4785. {
  4786. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  4787. flag14 = true;
  4788. }
  4789. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4790. {
  4791. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  4792. flag14 = true;
  4793. }
  4794. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4795. {
  4796. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  4797. flag14 = true;
  4798. }
  4799. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4800. {
  4801. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  4802. flag14 = true;
  4803. }
  4804. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4805. {
  4806. maid.body0.transform.localRotation = Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  4807. flag14 = true;
  4808. }
  4809. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  4810. {
  4811. maid.body0.transform.localRotation = Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  4812. flag14 = true;
  4813. }
  4814. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  4815. {
  4816. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  4817. flag14 = true;
  4818. }
  4819. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  4820. {
  4821. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  4822. flag14 = true;
  4823. }
  4824. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4825. {
  4826. Vector3 vector = maid.transform.position;
  4827. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4828. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4829. maid.SetPos(vector);
  4830. flag14 = true;
  4831. }
  4832. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4833. {
  4834. Vector3 vector = maid.transform.position;
  4835. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4836. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4837. maid.SetPos(vector);
  4838. flag14 = true;
  4839. }
  4840. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4841. {
  4842. Vector3 vector = maid.transform.position;
  4843. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4844. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4845. maid.SetPos(vector);
  4846. flag14 = true;
  4847. }
  4848. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4849. {
  4850. Vector3 vector = maid.transform.position;
  4851. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4852. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4853. maid.SetPos(vector);
  4854. flag14 = true;
  4855. }
  4856. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  4857. {
  4858. Vector3 vector = maid.transform.position;
  4859. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4860. maid.SetPos(vector);
  4861. flag14 = true;
  4862. }
  4863. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  4864. {
  4865. Vector3 vector = maid.transform.position;
  4866. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4867. maid.SetPos(vector);
  4868. flag14 = true;
  4869. }
  4870. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  4871. {
  4872. Vector3 vector = maid.transform.position;
  4873. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4874. maid.SetPos(vector);
  4875. flag14 = true;
  4876. }
  4877. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  4878. {
  4879. Vector3 vector = maid.transform.position;
  4880. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4881. maid.SetPos(vector);
  4882. flag14 = true;
  4883. }
  4884. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  4885. {
  4886. Vector3 vector = maid.transform.position;
  4887. vector.y += 0.0075f * speed;
  4888. maid.SetPos(vector);
  4889. flag14 = true;
  4890. }
  4891. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  4892. {
  4893. Vector3 vector = maid.transform.position;
  4894. vector.y -= 0.0075f * speed;
  4895. maid.SetPos(vector);
  4896. flag14 = true;
  4897. }
  4898. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  4899. {
  4900. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f, maid.transform.localScale.y * 1.005f, maid.transform.localScale.z * 1.005f);
  4901. flag14 = true;
  4902. }
  4903. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  4904. {
  4905. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f, maid.transform.localScale.y * 0.995f, maid.transform.localScale.z * 0.995f);
  4906. flag14 = true;
  4907. }
  4908. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  4909. {
  4910. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  4911. flag14 = true;
  4912. }
  4913. }
  4914. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7))) && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4915. {
  4916. if (Input.GetKey(KeyCode.I))
  4917. {
  4918. if (ikMode[i] == 0)
  4919. {
  4920. Vector3 vector5 = HandL.position;
  4921. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  4922. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  4923. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  4924. }
  4925. else if (ikMode[i] == 2)
  4926. {
  4927. Vector3 vector5 = HandL.position;
  4928. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  4929. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  4930. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  4931. }
  4932. else if (ikMode[i] == 3)
  4933. {
  4934. if (ikBui == 1 || ikBui == 2)
  4935. {
  4936. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  4937. }
  4938. else
  4939. {
  4940. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  4941. }
  4942. }
  4943. else if (ikMode[i] == 4)
  4944. {
  4945. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  4946. }
  4947. else if (ikMode[i] == 8)
  4948. {
  4949. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  4950. }
  4951. else if (ikMode[i] == 6)
  4952. {
  4953. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  4954. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  4955. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  4956. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  4957. }
  4958. else if (ikMode[i] == 7)
  4959. {
  4960. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  4961. }
  4962. else if (ikMode[i] == 5)
  4963. {
  4964. Vector3 vector5 = ForearmL.position;
  4965. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  4966. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  4967. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  4968. }
  4969. else
  4970. {
  4971. Vector3 vector5 = ForearmL.position;
  4972. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  4973. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  4974. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  4975. }
  4976. isStop[i] = true;
  4977. isLock[i] = true;
  4978. }
  4979. else if (Input.GetKey(KeyCode.K))
  4980. {
  4981. if (ikMode[i] == 0)
  4982. {
  4983. Vector3 vector5 = HandL.position;
  4984. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  4985. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  4986. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  4987. }
  4988. else if (ikMode[i] == 2)
  4989. {
  4990. Vector3 vector5 = HandL.position;
  4991. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  4992. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  4993. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  4994. }
  4995. else if (ikMode[i] == 3)
  4996. {
  4997. if (ikBui == 1 || ikBui == 2)
  4998. {
  4999. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5000. }
  5001. else
  5002. {
  5003. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5004. }
  5005. }
  5006. else if (ikMode[i] == 4)
  5007. {
  5008. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5009. }
  5010. else if (ikMode[i] == 8)
  5011. {
  5012. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5013. }
  5014. else if (ikMode[i] == 6)
  5015. {
  5016. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5017. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5018. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5019. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5020. }
  5021. else if (ikMode[i] == 7)
  5022. {
  5023. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5024. }
  5025. else if (ikMode[i] == 5)
  5026. {
  5027. Vector3 vector5 = ForearmL.position;
  5028. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5029. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5030. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5031. }
  5032. else
  5033. {
  5034. Vector3 vector5 = ForearmL.position;
  5035. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5036. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5037. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5038. }
  5039. isStop[i] = true;
  5040. isLock[i] = true;
  5041. }
  5042. else if (Input.GetKey(KeyCode.J))
  5043. {
  5044. if (ikMode[i] == 0)
  5045. {
  5046. Vector3 vector5 = HandL.position;
  5047. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5048. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5049. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5050. }
  5051. else if (ikMode[i] == 2)
  5052. {
  5053. Vector3 vector5 = HandL.position;
  5054. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5055. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5056. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5057. }
  5058. else if (ikMode[i] == 3)
  5059. {
  5060. if (ikBui == 1 || ikBui == 2)
  5061. {
  5062. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5063. }
  5064. else
  5065. {
  5066. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5067. }
  5068. }
  5069. else if (ikMode[i] == 4)
  5070. {
  5071. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5072. }
  5073. else if (ikMode[i] == 8)
  5074. {
  5075. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5076. }
  5077. else if (ikMode[i] == 6)
  5078. {
  5079. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5080. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5081. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5082. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5083. }
  5084. else if (ikMode[i] == 7)
  5085. {
  5086. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5087. }
  5088. else if (ikMode[i] == 5)
  5089. {
  5090. Vector3 vector5 = ForearmL.position;
  5091. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5092. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5093. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5094. }
  5095. else
  5096. {
  5097. Vector3 vector5 = ForearmL.position;
  5098. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5099. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5100. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5101. }
  5102. isStop[i] = true;
  5103. isLock[i] = true;
  5104. }
  5105. else if (Input.GetKey(KeyCode.L))
  5106. {
  5107. if (ikMode[i] == 0)
  5108. {
  5109. Vector3 vector5 = HandL.position;
  5110. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5111. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5112. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5113. }
  5114. else if (ikMode[i] == 2)
  5115. {
  5116. Vector3 vector5 = HandL.position;
  5117. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5118. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5119. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5120. }
  5121. else if (ikMode[i] == 3)
  5122. {
  5123. if (ikBui == 1 || ikBui == 2)
  5124. {
  5125. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5126. }
  5127. else
  5128. {
  5129. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5130. }
  5131. }
  5132. else if (ikMode[i] == 4)
  5133. {
  5134. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5135. }
  5136. else if (ikMode[i] == 8)
  5137. {
  5138. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5139. }
  5140. else if (ikMode[i] == 6)
  5141. {
  5142. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5143. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5144. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5145. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5146. }
  5147. else if (ikMode[i] == 7)
  5148. {
  5149. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5150. }
  5151. else if (ikMode[i] == 5)
  5152. {
  5153. Vector3 vector5 = ForearmL.position;
  5154. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5155. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5156. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5157. }
  5158. else
  5159. {
  5160. Vector3 vector5 = ForearmL.position;
  5161. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5162. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5163. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5164. }
  5165. isStop[i] = true;
  5166. isLock[i] = true;
  5167. }
  5168. else if (Input.GetKey(KeyCode.U))
  5169. {
  5170. if (ikMode[i] == 3)
  5171. {
  5172. HandL.localRotation = Quaternion.Euler(HandL.localEulerAngles) * Quaternion.AngleAxis(1f, Vector3.right);
  5173. isStop[i] = true;
  5174. isLock[i] = true;
  5175. }
  5176. else if (ikMode[i] == 4)
  5177. {
  5178. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5179. isStop[i] = true;
  5180. isLock[i] = true;
  5181. }
  5182. else if (ikMode[i] == 8)
  5183. {
  5184. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5185. isStop[i] = true;
  5186. isLock[i] = true;
  5187. }
  5188. else if (ikMode[i] == 6)
  5189. {
  5190. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5191. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5192. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5193. isStop[i] = true;
  5194. isLock[i] = true;
  5195. }
  5196. else if (ikMode[i] == 7)
  5197. {
  5198. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5199. isStop[i] = true;
  5200. isLock[i] = true;
  5201. }
  5202. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5203. {
  5204. UpperArmL.localRotation = Quaternion.Euler(UpperArmL.localEulerAngles) * Quaternion.AngleAxis(0.5f, Vector3.right);
  5205. isStop[i] = true;
  5206. isLock[i] = true;
  5207. }
  5208. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5209. {
  5210. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5211. isStop[i] = true;
  5212. isLock[i] = true;
  5213. }
  5214. }
  5215. else if (Input.GetKey(KeyCode.O))
  5216. {
  5217. if (ikMode[i] == 3)
  5218. {
  5219. HandL.localRotation = Quaternion.Euler(HandL.localEulerAngles) * Quaternion.AngleAxis(-1f, Vector3.right);
  5220. isStop[i] = true;
  5221. isLock[i] = true;
  5222. }
  5223. else if (ikMode[i] == 4)
  5224. {
  5225. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5226. isStop[i] = true;
  5227. isLock[i] = true;
  5228. }
  5229. else if (ikMode[i] == 8)
  5230. {
  5231. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5232. isStop[i] = true;
  5233. isLock[i] = true;
  5234. }
  5235. else if (ikMode[i] == 6)
  5236. {
  5237. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5238. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5239. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5240. isStop[i] = true;
  5241. isLock[i] = true;
  5242. }
  5243. else if (ikMode[i] == 7)
  5244. {
  5245. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5246. isStop[i] = true;
  5247. isLock[i] = true;
  5248. }
  5249. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5250. {
  5251. UpperArmL.localRotation = Quaternion.Euler(UpperArmL.localEulerAngles) * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5252. isStop[i] = true;
  5253. isLock[i] = true;
  5254. }
  5255. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5256. {
  5257. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5258. isStop[i] = true;
  5259. isLock[i] = true;
  5260. }
  5261. }
  5262. else if (Input.GetKey(KeyCode.Alpha0))
  5263. {
  5264. if (ikMode[i] == 0)
  5265. {
  5266. Vector3 vector5 = HandL.position;
  5267. vector5.y += 0.005f;
  5268. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5269. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5270. }
  5271. else if (ikMode[i] == 2)
  5272. {
  5273. Vector3 vector5 = HandL.position;
  5274. vector5.y += 0.005f;
  5275. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5276. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5277. }
  5278. else if (ikMode[i] == 5)
  5279. {
  5280. Vector3 vector5 = ForearmL.position;
  5281. vector5.y += 0.0035f;
  5282. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5283. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5284. }
  5285. else
  5286. {
  5287. Vector3 vector5 = ForearmL.position;
  5288. vector5.y += 0.0035f;
  5289. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5290. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5291. }
  5292. isStop[i] = true;
  5293. isLock[i] = true;
  5294. }
  5295. else if (Input.GetKey(KeyCode.P))
  5296. {
  5297. if (ikMode[i] == 0)
  5298. {
  5299. Vector3 vector5 = HandL.position;
  5300. vector5.y -= 0.005f;
  5301. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5302. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5303. }
  5304. else if (ikMode[i] == 2)
  5305. {
  5306. Vector3 vector5 = HandL.position;
  5307. vector5.y -= 0.005f;
  5308. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5309. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5310. }
  5311. else if (ikMode[i] == 5)
  5312. {
  5313. Vector3 vector5 = ForearmL.position;
  5314. vector5.y -= 0.0035f;
  5315. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5316. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5317. }
  5318. else
  5319. {
  5320. Vector3 vector5 = ForearmL.position;
  5321. vector5.y -= 0.0035f;
  5322. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5323. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5324. }
  5325. isStop[i] = true;
  5326. isLock[i] = true;
  5327. }
  5328. }
  5329. }
  5330. }
  5331. }
  5332. }
  5333. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  5334. {
  5335. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5336. idoFlg[i] = true;
  5337. }
  5338. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5339. {
  5340. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5341. idoFlg[i] = true;
  5342. }
  5343. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  5344. {
  5345. if (!xFlg[i])
  5346. {
  5347. xFlg[i] = true;
  5348. zFlg[i] = false;
  5349. if (maid.status.personal.uniqueName == "Pride")
  5350. {
  5351. string text = "s0_";
  5352. System.Random random = new System.Random();
  5353. int num4 = random.Next(10000);
  5354. bool flag7 = false;
  5355. for (int k = 0; k < tunArray.Length; k++)
  5356. {
  5357. if (tunArray[k] == num4)
  5358. {
  5359. flag7 = true;
  5360. break;
  5361. }
  5362. }
  5363. if (!flag7)
  5364. {
  5365. text = text + "0" + num4.ToString() + ".ogg";
  5366. if (GameUty.FileSystem.IsExistentFile(text))
  5367. {
  5368. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5369. }
  5370. }
  5371. }
  5372. if (maid.status.personal.uniqueName == "Cool")
  5373. {
  5374. string text = "s1_";
  5375. System.Random random = new System.Random();
  5376. int num4 = random.Next(10000);
  5377. bool flag7 = false;
  5378. for (int k = 0; k < coolArray.Length; k++)
  5379. {
  5380. if (coolArray[k] == num4)
  5381. {
  5382. flag7 = true;
  5383. break;
  5384. }
  5385. }
  5386. if (!flag7)
  5387. {
  5388. text = text + "0" + num4.ToString() + ".ogg";
  5389. if (GameUty.FileSystem.IsExistentFile(text))
  5390. {
  5391. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5392. }
  5393. }
  5394. }
  5395. if (maid.status.personal.uniqueName == "Pure")
  5396. {
  5397. string text = "s2_";
  5398. System.Random random = new System.Random();
  5399. int num4 = random.Next(10000);
  5400. bool flag7 = false;
  5401. for (int k = 0; k < pureArray.Length; k++)
  5402. {
  5403. if (pureArray[k] == num4)
  5404. {
  5405. flag7 = true;
  5406. break;
  5407. }
  5408. }
  5409. if (!flag7)
  5410. {
  5411. text = text + "0" + num4.ToString() + ".ogg";
  5412. if (GameUty.FileSystem.IsExistentFile(text))
  5413. {
  5414. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5415. }
  5416. }
  5417. }
  5418. if (maid.status.personal.uniqueName == "Yandere")
  5419. {
  5420. string text = "s3_";
  5421. System.Random random = new System.Random();
  5422. int num4 = random.Next(10000);
  5423. bool flag7 = false;
  5424. for (int k = 0; k < yanArray.Length; k++)
  5425. {
  5426. if (yanArray[k] == num4)
  5427. {
  5428. flag7 = true;
  5429. break;
  5430. }
  5431. }
  5432. if (!flag7)
  5433. {
  5434. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5435. if (GameUty.FileSystem.IsExistentFile(text))
  5436. {
  5437. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5438. }
  5439. }
  5440. }
  5441. if (maid.status.personal.uniqueName == "Muku")
  5442. {
  5443. string text = "h0_";
  5444. System.Random random = new System.Random();
  5445. int num4 = random.Next(10000);
  5446. bool flag7 = false;
  5447. for (int k = 0; k < h0Array.Length; k++)
  5448. {
  5449. if (h0Array[k] == num4)
  5450. {
  5451. flag7 = true;
  5452. break;
  5453. }
  5454. }
  5455. if (flag7)
  5456. {
  5457. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5458. if (GameUty.FileSystem.IsExistentFile(text))
  5459. {
  5460. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5461. }
  5462. }
  5463. }
  5464. if (maid.status.personal.uniqueName == "Majime")
  5465. {
  5466. string text = "h1_";
  5467. System.Random random = new System.Random();
  5468. int num4 = random.Next(10000);
  5469. bool flag7 = false;
  5470. for (int k = 0; k < h1Array.Length; k++)
  5471. {
  5472. if (h1Array[k] == num4)
  5473. {
  5474. flag7 = true;
  5475. break;
  5476. }
  5477. }
  5478. if (flag7)
  5479. {
  5480. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5481. if (GameUty.FileSystem.IsExistentFile(text))
  5482. {
  5483. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5484. }
  5485. }
  5486. }
  5487. if (maid.status.personal.uniqueName == "Rindere")
  5488. {
  5489. string text = "h2_";
  5490. System.Random random = new System.Random();
  5491. int num4 = random.Next(10000);
  5492. bool flag7 = false;
  5493. for (int k = 0; k < h2Array.Length; k++)
  5494. {
  5495. if (h2Array[k] == num4)
  5496. {
  5497. flag7 = true;
  5498. break;
  5499. }
  5500. }
  5501. if (flag7)
  5502. {
  5503. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5504. if (GameUty.FileSystem.IsExistentFile(text))
  5505. {
  5506. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5507. }
  5508. }
  5509. }
  5510. }
  5511. else
  5512. {
  5513. xFlg[i] = false;
  5514. maid.AudioMan.Clear();
  5515. }
  5516. idoFlg[i] = true;
  5517. }
  5518. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  5519. {
  5520. if (!zFlg[i])
  5521. {
  5522. zFlg[i] = true;
  5523. xFlg[i] = false;
  5524. string text = "";
  5525. if (maid.status.personal.uniqueName == "Pride")
  5526. {
  5527. text = "s0_";
  5528. System.Random random = new System.Random();
  5529. int num4 = random.Next(tunArray.Length);
  5530. object obj = text;
  5531. text = string.Concat(new object[]
  5532. {
  5533. obj,
  5534. "0",
  5535. tunArray[num4],
  5536. ".ogg"
  5537. });
  5538. }
  5539. if (maid.status.personal.uniqueName == "Cool")
  5540. {
  5541. text = "s1_";
  5542. System.Random random = new System.Random();
  5543. int num4 = random.Next(coolArray.Length);
  5544. object obj = text;
  5545. text = string.Concat(new object[]
  5546. {
  5547. obj,
  5548. "0",
  5549. coolArray[num4],
  5550. ".ogg"
  5551. });
  5552. }
  5553. if (maid.status.personal.uniqueName == "Pure")
  5554. {
  5555. text = "s2_";
  5556. System.Random random = new System.Random();
  5557. int num4 = random.Next(pureArray.Length);
  5558. object obj = text;
  5559. text = string.Concat(new object[]
  5560. {
  5561. obj,
  5562. "0",
  5563. pureArray[num4],
  5564. ".ogg"
  5565. });
  5566. }
  5567. if (maid.status.personal.uniqueName == "Yandere")
  5568. {
  5569. text = "s3_";
  5570. System.Random random = new System.Random();
  5571. int num4 = random.Next(yanArray.Length);
  5572. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5573. }
  5574. if (maid.status.personal.uniqueName == "Muku")
  5575. {
  5576. text = "h0_";
  5577. System.Random random = new System.Random();
  5578. int num4 = random.Next(h0tArray.Length);
  5579. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5580. }
  5581. if (maid.status.personal.uniqueName == "Majime")
  5582. {
  5583. text = "h1_";
  5584. System.Random random = new System.Random();
  5585. int num4 = random.Next(h1tArray.Length);
  5586. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5587. }
  5588. if (maid.status.personal.uniqueName == "Rindere")
  5589. {
  5590. text = "h2_";
  5591. System.Random random = new System.Random();
  5592. int num4 = random.Next(h2tArray.Length);
  5593. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5594. }
  5595. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5596. }
  5597. else
  5598. {
  5599. zFlg[i] = false;
  5600. maid.AudioMan.Clear();
  5601. }
  5602. idoFlg[i] = true;
  5603. }
  5604. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5605. {
  5606. string text = "";
  5607. if (maid.status.personal.uniqueName == "Pride")
  5608. {
  5609. text = "s0_";
  5610. System.Random random = new System.Random();
  5611. int num4 = random.Next(tunArray.Length);
  5612. object obj = text;
  5613. text = string.Concat(new object[]
  5614. {
  5615. obj,
  5616. "0",
  5617. tunArray[num4],
  5618. ".ogg"
  5619. });
  5620. }
  5621. if (maid.status.personal.uniqueName == "Cool")
  5622. {
  5623. text = "s1_";
  5624. System.Random random = new System.Random();
  5625. int num4 = random.Next(coolArray.Length);
  5626. object obj = text;
  5627. text = string.Concat(new object[]
  5628. {
  5629. obj,
  5630. "0",
  5631. coolArray[num4],
  5632. ".ogg"
  5633. });
  5634. }
  5635. if (maid.status.personal.uniqueName == "Pure")
  5636. {
  5637. text = "s2_";
  5638. System.Random random = new System.Random();
  5639. int num4 = random.Next(pureArray.Length);
  5640. object obj = text;
  5641. text = string.Concat(new object[]
  5642. {
  5643. obj,
  5644. "0",
  5645. pureArray[num4],
  5646. ".ogg"
  5647. });
  5648. }
  5649. if (maid.status.personal.uniqueName == "Yandere")
  5650. {
  5651. text = "s3_";
  5652. System.Random random = new System.Random();
  5653. int num4 = random.Next(yanArray.Length);
  5654. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5655. }
  5656. if (maid.status.personal.uniqueName == "Muku")
  5657. {
  5658. text = "h0_";
  5659. System.Random random = new System.Random();
  5660. int num4 = random.Next(h0tArray.Length);
  5661. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5662. }
  5663. if (maid.status.personal.uniqueName == "Majime")
  5664. {
  5665. text = "h1_";
  5666. System.Random random = new System.Random();
  5667. int num4 = random.Next(h1tArray.Length);
  5668. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5669. }
  5670. if (maid.status.personal.uniqueName == "Rindere")
  5671. {
  5672. text = "h2_";
  5673. System.Random random = new System.Random();
  5674. int num4 = random.Next(h2tArray.Length);
  5675. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5676. }
  5677. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5678. idoFlg[i] = true;
  5679. }
  5680. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5681. {
  5682. if (maid.status.personal.uniqueName == "Pride")
  5683. {
  5684. string text = "s0_";
  5685. System.Random random = new System.Random();
  5686. int num4 = random.Next(10000);
  5687. bool flag7 = false;
  5688. for (int k = 0; k < tunArray.Length; k++)
  5689. {
  5690. if (tunArray[k] == num4)
  5691. {
  5692. flag7 = true;
  5693. break;
  5694. }
  5695. }
  5696. if (!flag7)
  5697. {
  5698. text = text + "0" + num4.ToString() + ".ogg";
  5699. if (GameUty.FileSystem.IsExistentFile(text))
  5700. {
  5701. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5702. }
  5703. }
  5704. }
  5705. if (maid.status.personal.uniqueName == "Cool")
  5706. {
  5707. string text = "s1_";
  5708. System.Random random = new System.Random();
  5709. int num4 = random.Next(10000);
  5710. bool flag7 = false;
  5711. for (int k = 0; k < coolArray.Length; k++)
  5712. {
  5713. if (coolArray[k] == num4)
  5714. {
  5715. flag7 = true;
  5716. break;
  5717. }
  5718. }
  5719. if (!flag7)
  5720. {
  5721. text = text + "0" + num4.ToString() + ".ogg";
  5722. if (GameUty.FileSystem.IsExistentFile(text))
  5723. {
  5724. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5725. }
  5726. }
  5727. }
  5728. if (maid.status.personal.uniqueName == "Pure")
  5729. {
  5730. string text = "s2_";
  5731. System.Random random = new System.Random();
  5732. int num4 = random.Next(10000);
  5733. bool flag7 = false;
  5734. for (int k = 0; k < pureArray.Length; k++)
  5735. {
  5736. if (pureArray[k] == num4)
  5737. {
  5738. flag7 = true;
  5739. break;
  5740. }
  5741. }
  5742. if (!flag7)
  5743. {
  5744. text = text + "0" + num4.ToString() + ".ogg";
  5745. if (GameUty.FileSystem.IsExistentFile(text))
  5746. {
  5747. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5748. }
  5749. }
  5750. }
  5751. if (maid.status.personal.uniqueName == "Yandere")
  5752. {
  5753. string text = "s3_";
  5754. System.Random random = new System.Random();
  5755. int num4 = random.Next(10000);
  5756. bool flag7 = false;
  5757. for (int k = 0; k < yanArray.Length; k++)
  5758. {
  5759. if (yanArray[k] == num4)
  5760. {
  5761. flag7 = true;
  5762. break;
  5763. }
  5764. }
  5765. if (!flag7)
  5766. {
  5767. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5768. if (GameUty.FileSystem.IsExistentFile(text))
  5769. {
  5770. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5771. }
  5772. }
  5773. }
  5774. if (maid.status.personal.uniqueName == "Muku")
  5775. {
  5776. string text = "h0_";
  5777. System.Random random = new System.Random();
  5778. int num4 = random.Next(10000);
  5779. bool flag7 = false;
  5780. for (int k = 0; k < h0Array.Length; k++)
  5781. {
  5782. if (h0Array[k] == num4)
  5783. {
  5784. flag7 = true;
  5785. break;
  5786. }
  5787. }
  5788. if (flag7)
  5789. {
  5790. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5791. if (GameUty.FileSystem.IsExistentFile(text))
  5792. {
  5793. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5794. }
  5795. }
  5796. }
  5797. if (maid.status.personal.uniqueName == "Majime")
  5798. {
  5799. string text = "h1_";
  5800. System.Random random = new System.Random();
  5801. int num4 = random.Next(10000);
  5802. bool flag7 = false;
  5803. for (int k = 0; k < h1Array.Length; k++)
  5804. {
  5805. if (h1Array[k] == num4)
  5806. {
  5807. flag7 = true;
  5808. break;
  5809. }
  5810. }
  5811. if (flag7)
  5812. {
  5813. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5814. if (GameUty.FileSystem.IsExistentFile(text))
  5815. {
  5816. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5817. }
  5818. }
  5819. }
  5820. if (maid.status.personal.uniqueName == "Rindere")
  5821. {
  5822. string text = "h2_";
  5823. System.Random random = new System.Random();
  5824. int num4 = random.Next(10000);
  5825. bool flag7 = false;
  5826. for (int k = 0; k < h2Array.Length; k++)
  5827. {
  5828. if (h2Array[k] == num4)
  5829. {
  5830. flag7 = true;
  5831. break;
  5832. }
  5833. }
  5834. if (flag7)
  5835. {
  5836. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5837. if (GameUty.FileSystem.IsExistentFile(text))
  5838. {
  5839. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5840. }
  5841. }
  5842. }
  5843. idoFlg[i] = true;
  5844. }
  5845. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  5846. {
  5847. Vector3 vector = maid.transform.position;
  5848. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5849. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5850. maid.SetPos(vector);
  5851. idoFlg[i] = true;
  5852. }
  5853. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  5854. {
  5855. Vector3 vector = maid.transform.position;
  5856. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5857. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5858. maid.SetPos(vector);
  5859. idoFlg[i] = true;
  5860. }
  5861. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  5862. {
  5863. Vector3 vector = maid.transform.position;
  5864. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5865. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5866. maid.SetPos(vector);
  5867. idoFlg[i] = true;
  5868. }
  5869. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  5870. {
  5871. Vector3 vector = maid.transform.position;
  5872. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5873. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5874. maid.SetPos(vector);
  5875. idoFlg[i] = true;
  5876. }
  5877. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  5878. {
  5879. Vector3 vector = maid.transform.position;
  5880. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5881. maid.SetPos(vector);
  5882. idoFlg[i] = true;
  5883. }
  5884. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  5885. {
  5886. Vector3 vector = maid.transform.position;
  5887. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5888. maid.SetPos(vector);
  5889. idoFlg[i] = true;
  5890. }
  5891. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  5892. {
  5893. Vector3 vector = maid.transform.position;
  5894. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5895. maid.SetPos(vector);
  5896. idoFlg[i] = true;
  5897. }
  5898. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  5899. {
  5900. Vector3 vector = maid.transform.position;
  5901. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5902. maid.SetPos(vector);
  5903. idoFlg[i] = true;
  5904. }
  5905. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  5906. {
  5907. Vector3 vector = maid.transform.position;
  5908. vector.y += 0.0075f * speed;
  5909. maid.SetPos(vector);
  5910. idoFlg[i] = true;
  5911. }
  5912. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  5913. {
  5914. Vector3 vector = maid.transform.position;
  5915. vector.y -= 0.0075f * speed;
  5916. maid.SetPos(vector);
  5917. idoFlg[i] = true;
  5918. }
  5919. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  5920. {
  5921. faceIndex[i]--;
  5922. if (faceIndex[i] <= -1)
  5923. {
  5924. faceIndex[i] = faceArray.Length - 1;
  5925. }
  5926. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  5927. idoFlg[i] = true;
  5928. }
  5929. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  5930. {
  5931. faceIndex[i]++;
  5932. if (faceIndex[i] == faceArray.Length)
  5933. {
  5934. faceIndex[i] = 0;
  5935. }
  5936. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  5937. idoFlg[i] = true;
  5938. }
  5939. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  5940. {
  5941. faceBlendIndex[i]++;
  5942. if (faceBlendIndex[i] == faceBlendArray.Length)
  5943. {
  5944. faceBlendIndex[i] = 0;
  5945. }
  5946. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  5947. idoFlg[i] = true;
  5948. }
  5949. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  5950. {
  5951. idoFlg[i] = true;
  5952. if (i >= 7)
  5953. {
  5954. idoFlg[i - 7] = true;
  5955. }
  5956. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f, maid.transform.localScale.y * 1.005f, maid.transform.localScale.z * 1.005f);
  5957. }
  5958. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  5959. {
  5960. idoFlg[i] = true;
  5961. if (i >= 7)
  5962. {
  5963. idoFlg[i - 7] = true;
  5964. }
  5965. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f, maid.transform.localScale.y * 0.995f, maid.transform.localScale.z * 0.995f);
  5966. }
  5967. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  5968. {
  5969. idoFlg[i] = true;
  5970. if (i >= 7)
  5971. {
  5972. idoFlg[i - 7] = true;
  5973. }
  5974. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5975. }
  5976. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  5977. {
  5978. if (!isVR)
  5979. {
  5980. if (goSlot[(int)selectList[i]] != null)
  5981. {
  5982. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  5983. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  5984. {
  5985. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  5986. }
  5987. }
  5988. }
  5989. maid.body0.SetMask(TBody.SlotID.wear, true);
  5990. maid.body0.SetMask(TBody.SlotID.skirt, true);
  5991. maid.body0.SetMask(TBody.SlotID.bra, true);
  5992. maid.body0.SetMask(TBody.SlotID.panz, true);
  5993. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  5994. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  5995. isWear = true;
  5996. isSkirt = true;
  5997. isBra = true;
  5998. isPanz = true;
  5999. System.Random random = new System.Random();
  6000. int num4 = random.Next(2);
  6001. if (num4 == 1)
  6002. {
  6003. maid.body0.SetMask(TBody.SlotID.wear, false);
  6004. }
  6005. if (num4 == 1)
  6006. {
  6007. isWear = false;
  6008. }
  6009. num4 = random.Next(2);
  6010. if (num4 == 1)
  6011. {
  6012. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6013. }
  6014. if (num4 == 1)
  6015. {
  6016. isSkirt = false;
  6017. }
  6018. num4 = random.Next(2);
  6019. if (num4 == 1)
  6020. {
  6021. maid.body0.SetMask(TBody.SlotID.bra, false);
  6022. }
  6023. if (num4 == 1)
  6024. {
  6025. isBra = false;
  6026. }
  6027. num4 = random.Next(2);
  6028. if (num4 == 1)
  6029. {
  6030. maid.body0.SetMask(TBody.SlotID.panz, false);
  6031. }
  6032. if (num4 == 1)
  6033. {
  6034. isPanz = false;
  6035. }
  6036. num4 = random.Next(2);
  6037. if (num4 == 1)
  6038. {
  6039. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6040. }
  6041. num4 = random.Next(2);
  6042. if (num4 == 1)
  6043. {
  6044. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6045. }
  6046. hFlg = true;
  6047. idoFlg[i] = true;
  6048. if (i >= 7)
  6049. {
  6050. idoFlg[i - 7] = true;
  6051. }
  6052. }
  6053. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6054. {
  6055. poseIndex[i]--;
  6056. if (poseIndex[i] <= -1)
  6057. {
  6058. poseIndex[i] = poseArray.Length - 1;
  6059. }
  6060. if (maid && maid.Visible)
  6061. {
  6062. string[] array = poseArray[poseIndex[i]].Split(new char[]
  6063. {
  6064. ','
  6065. });
  6066. isStop[i] = false;
  6067. poseCount[i] = 20;
  6068. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6069. {
  6070. maid.body0.MuneYureL(0f);
  6071. maid.body0.MuneYureR(0f);
  6072. }
  6073. else
  6074. {
  6075. maid.body0.MuneYureL(1f);
  6076. maid.body0.MuneYureR(1f);
  6077. }
  6078. int num6;
  6079. if (array[0].Contains("MultipleMaidsPose"))
  6080. {
  6081. string path = array[0].Split(new char[]
  6082. {
  6083. '/'
  6084. })[1];
  6085. byte[] array2 = new byte[0];
  6086. try
  6087. {
  6088. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6089. {
  6090. array2 = new byte[fileStream.Length];
  6091. fileStream.Read(array2, 0, array2.Length);
  6092. }
  6093. }
  6094. catch
  6095. {
  6096. }
  6097. if (0 < array2.Length)
  6098. {
  6099. string text = Path.GetFileName(path);
  6100. long num5 = (long)text.GetHashCode();
  6101. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6102. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6103. {
  6104. Maid.AutoTwist.ShoulderL,
  6105. Maid.AutoTwist.ShoulderR,
  6106. Maid.AutoTwist.WristL,
  6107. Maid.AutoTwist.WristR,
  6108. Maid.AutoTwist.ThighL,
  6109. Maid.AutoTwist.ThighR
  6110. };
  6111. for (int m = 0; m < array3.Length; m++)
  6112. {
  6113. maid.SetAutoTwist(array3[m], true);
  6114. }
  6115. }
  6116. }
  6117. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6118. {
  6119. loadPose[i] = array[0];
  6120. }
  6121. else if (!array[0].StartsWith("dance_"))
  6122. {
  6123. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6124. }
  6125. else
  6126. {
  6127. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6128. {
  6129. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6130. }
  6131. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6132. }
  6133. if (array.Length > 1)
  6134. {
  6135. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6136. isStop[i] = true;
  6137. if (array.Length > 2)
  6138. {
  6139. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6140. isPoseIti[i] = true;
  6141. poseIti[i] = maidArray[i].transform.position;
  6142. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6143. }
  6144. }
  6145. }
  6146. idoFlg[i] = true;
  6147. if (i >= 7)
  6148. {
  6149. idoFlg[i - 7] = true;
  6150. }
  6151. }
  6152. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6153. {
  6154. int num7 = poseIndex[i];
  6155. for (int k = 0; k < groupList.Count; k++)
  6156. {
  6157. if (poseIndex[i] < (int)groupList[k])
  6158. {
  6159. poseIndex[i] = (int)groupList[k];
  6160. break;
  6161. }
  6162. }
  6163. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6164. {
  6165. poseIndex[i] = 0;
  6166. }
  6167. if (maid && maid.Visible)
  6168. {
  6169. string[] array = poseArray[poseIndex[i]].Split(new char[]
  6170. {
  6171. ','
  6172. });
  6173. isStop[i] = false;
  6174. poseCount[i] = 20;
  6175. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6176. {
  6177. maid.body0.MuneYureL(0f);
  6178. maid.body0.MuneYureR(0f);
  6179. }
  6180. else
  6181. {
  6182. maid.body0.MuneYureL(1f);
  6183. maid.body0.MuneYureR(1f);
  6184. }
  6185. int num6;
  6186. if (array[0].Contains("MultipleMaidsPose"))
  6187. {
  6188. string path = array[0].Split(new char[]
  6189. {
  6190. '/'
  6191. })[1];
  6192. byte[] array2 = new byte[0];
  6193. try
  6194. {
  6195. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6196. {
  6197. array2 = new byte[fileStream.Length];
  6198. fileStream.Read(array2, 0, array2.Length);
  6199. }
  6200. }
  6201. catch
  6202. {
  6203. }
  6204. if (0 < array2.Length)
  6205. {
  6206. string text = Path.GetFileName(path);
  6207. long num5 = (long)text.GetHashCode();
  6208. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6209. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6210. {
  6211. Maid.AutoTwist.ShoulderL,
  6212. Maid.AutoTwist.ShoulderR,
  6213. Maid.AutoTwist.WristL,
  6214. Maid.AutoTwist.WristR,
  6215. Maid.AutoTwist.ThighL,
  6216. Maid.AutoTwist.ThighR
  6217. };
  6218. for (int m = 0; m < array3.Length; m++)
  6219. {
  6220. maid.SetAutoTwist(array3[m], true);
  6221. }
  6222. }
  6223. }
  6224. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6225. {
  6226. loadPose[i] = array[0];
  6227. }
  6228. else if (!array[0].StartsWith("dance_"))
  6229. {
  6230. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6231. }
  6232. else
  6233. {
  6234. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6235. {
  6236. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6237. }
  6238. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6239. }
  6240. if (array.Length > 1)
  6241. {
  6242. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6243. isStop[i] = true;
  6244. if (array.Length > 2)
  6245. {
  6246. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6247. isPoseIti[i] = true;
  6248. poseIti[i] = maidArray[i].transform.position;
  6249. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6250. }
  6251. }
  6252. }
  6253. idoFlg[i] = true;
  6254. if (i >= 7)
  6255. {
  6256. idoFlg[i - 7] = true;
  6257. }
  6258. }
  6259. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6260. {
  6261. for (int k = 0; k < groupList.Count; k++)
  6262. {
  6263. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6264. {
  6265. if (poseIndex[i] == 0)
  6266. {
  6267. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6268. }
  6269. else
  6270. {
  6271. poseIndex[i] = 0;
  6272. }
  6273. break;
  6274. }
  6275. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6276. {
  6277. poseIndex[i] = (int)groupList[k - 1];
  6278. break;
  6279. }
  6280. }
  6281. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6282. {
  6283. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6284. }
  6285. if (maid && maid.Visible)
  6286. {
  6287. string[] array = poseArray[poseIndex[i]].Split(new char[]
  6288. {
  6289. ','
  6290. });
  6291. isStop[i] = false;
  6292. poseCount[i] = 20;
  6293. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6294. {
  6295. maid.body0.MuneYureL(0f);
  6296. maid.body0.MuneYureR(0f);
  6297. }
  6298. else
  6299. {
  6300. maid.body0.MuneYureL(1f);
  6301. maid.body0.MuneYureR(1f);
  6302. }
  6303. int num6;
  6304. if (array[0].Contains("MultipleMaidsPose"))
  6305. {
  6306. string path = array[0].Split(new char[]
  6307. {
  6308. '/'
  6309. })[1];
  6310. byte[] array2 = new byte[0];
  6311. try
  6312. {
  6313. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6314. {
  6315. array2 = new byte[fileStream.Length];
  6316. fileStream.Read(array2, 0, array2.Length);
  6317. }
  6318. }
  6319. catch
  6320. {
  6321. }
  6322. if (0 < array2.Length)
  6323. {
  6324. string text = Path.GetFileName(path);
  6325. long num5 = (long)text.GetHashCode();
  6326. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6327. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6328. {
  6329. Maid.AutoTwist.ShoulderL,
  6330. Maid.AutoTwist.ShoulderR,
  6331. Maid.AutoTwist.WristL,
  6332. Maid.AutoTwist.WristR,
  6333. Maid.AutoTwist.ThighL,
  6334. Maid.AutoTwist.ThighR
  6335. };
  6336. for (int m = 0; m < array3.Length; m++)
  6337. {
  6338. maid.SetAutoTwist(array3[m], true);
  6339. }
  6340. }
  6341. }
  6342. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6343. {
  6344. loadPose[i] = array[0];
  6345. }
  6346. else if (!array[0].StartsWith("dance_"))
  6347. {
  6348. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6349. }
  6350. else
  6351. {
  6352. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6353. {
  6354. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6355. }
  6356. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6357. }
  6358. if (array.Length > 1)
  6359. {
  6360. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6361. isStop[i] = true;
  6362. if (array.Length > 2)
  6363. {
  6364. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6365. isPoseIti[i] = true;
  6366. poseIti[i] = maidArray[i].transform.position;
  6367. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6368. }
  6369. }
  6370. }
  6371. idoFlg[i] = true;
  6372. if (i >= 7)
  6373. {
  6374. idoFlg[i - 7] = true;
  6375. }
  6376. }
  6377. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6378. {
  6379. headEyeIndex[i]++;
  6380. if (headEyeIndex[i] == headEyeArray.Length)
  6381. {
  6382. headEyeIndex[i] = 0;
  6383. }
  6384. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6385. maid.body0.boHeadToCam = true;
  6386. maid.body0.boEyeToCam = true;
  6387. if (headEyeIndex[i] == 0)
  6388. {
  6389. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6390. maid.body0.boHeadToCam = true;
  6391. maid.body0.boEyeToCam = true;
  6392. }
  6393. else
  6394. {
  6395. maid.body0.trsLookTarget = null;
  6396. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6397. if (headEyeIndex[i] == 1)
  6398. {
  6399. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6400. }
  6401. if (headEyeIndex[i] == 2)
  6402. {
  6403. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6404. }
  6405. if (headEyeIndex[i] == 3)
  6406. {
  6407. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6408. }
  6409. if (headEyeIndex[i] == 4)
  6410. {
  6411. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6412. }
  6413. if (headEyeIndex[i] == 5)
  6414. {
  6415. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6416. }
  6417. if (headEyeIndex[i] == 6)
  6418. {
  6419. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6420. }
  6421. if (headEyeIndex[i] == 7)
  6422. {
  6423. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6424. }
  6425. if (headEyeIndex[i] == 8)
  6426. {
  6427. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6428. }
  6429. if (headEyeIndex[i] == 9)
  6430. {
  6431. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6432. }
  6433. }
  6434. idoFlg[i] = true;
  6435. if (i >= 7)
  6436. {
  6437. idoFlg[i - 7] = true;
  6438. }
  6439. }
  6440. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6441. {
  6442. idoFlg[i] = true;
  6443. if (i >= 7)
  6444. {
  6445. idoFlg[i - 7] = true;
  6446. }
  6447. }
  6448. else if (Input.GetKeyUp(key))
  6449. {
  6450. if (idoFlg[i])
  6451. {
  6452. idoFlg[i] = false;
  6453. }
  6454. else if (!this.getModKeyPressing(MultipleMaids.modKey.Ctrl) || i >= 7)
  6455. {
  6456. if (!isLock[i])
  6457. {
  6458. poseIndex[i]++;
  6459. if (poseIndex[i] == poseArray.Length)
  6460. {
  6461. poseIndex[i] = 0;
  6462. }
  6463. if (maid && maid.Visible)
  6464. {
  6465. string[] array = poseArray[poseIndex[i]].Split(new char[]
  6466. {
  6467. ','
  6468. });
  6469. isStop[i] = false;
  6470. poseCount[i] = 20;
  6471. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6472. {
  6473. maid.body0.MuneYureL(0f);
  6474. maid.body0.MuneYureR(0f);
  6475. }
  6476. else
  6477. {
  6478. maid.body0.MuneYureL(1f);
  6479. maid.body0.MuneYureR(1f);
  6480. }
  6481. int num6;
  6482. if (array[0].Contains("MultipleMaidsPose"))
  6483. {
  6484. string path = array[0].Split(new char[]
  6485. {
  6486. '/'
  6487. })[1];
  6488. byte[] array2 = new byte[0];
  6489. try
  6490. {
  6491. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6492. {
  6493. array2 = new byte[fileStream.Length];
  6494. fileStream.Read(array2, 0, array2.Length);
  6495. }
  6496. }
  6497. catch
  6498. {
  6499. }
  6500. if (0 < array2.Length)
  6501. {
  6502. string text = Path.GetFileName(path);
  6503. long num5 = (long)text.GetHashCode();
  6504. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6505. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6506. {
  6507. Maid.AutoTwist.ShoulderL,
  6508. Maid.AutoTwist.ShoulderR,
  6509. Maid.AutoTwist.WristL,
  6510. Maid.AutoTwist.WristR,
  6511. Maid.AutoTwist.ThighL,
  6512. Maid.AutoTwist.ThighR
  6513. };
  6514. for (int m = 0; m < array3.Length; m++)
  6515. {
  6516. maid.SetAutoTwist(array3[m], true);
  6517. }
  6518. }
  6519. }
  6520. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6521. {
  6522. loadPose[i] = array[0];
  6523. }
  6524. else if (!array[0].StartsWith("dance_"))
  6525. {
  6526. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6527. }
  6528. else
  6529. {
  6530. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6531. {
  6532. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6533. }
  6534. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6535. }
  6536. if (array.Length > 1)
  6537. {
  6538. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6539. isStop[i] = true;
  6540. if (array.Length > 2)
  6541. {
  6542. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6543. isPoseIti[i] = true;
  6544. poseIti[i] = maidArray[i].transform.position;
  6545. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6546. }
  6547. }
  6548. }
  6549. }
  6550. }
  6551. }
  6552. goto IL_1688E;
  6553. }
  6554. }
  6555. if (Input.GetKeyDown(KeyCode.E))
  6556. {
  6557. }
  6558. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6559. {
  6560. bGui = false;
  6561. }
  6562. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6563. {
  6564. sceneFlg = true;
  6565. faceFlg = false;
  6566. poseFlg = false;
  6567. kankyoFlg = false;
  6568. kankyo2Flg = false;
  6569. bGui = true;
  6570. int i = 0;
  6571. while (i < 10)
  6572. {
  6573. date[i] = "未保存";
  6574. ninzu[i] = "";
  6575. IniKey iniKey = base.Preferences["scene"]["s" + (page * 10 + i + 1)];
  6576. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6577. {
  6578. string[] array4 = iniKey.Value.Split(new char[]
  6579. {
  6580. '_'
  6581. });
  6582. if (array4.Length >= 2)
  6583. {
  6584. string[] array5 = array4[0].Split(new char[]
  6585. {
  6586. ','
  6587. });
  6588. date[i] = array5[0];
  6589. ninzu[i] = array5[1] + "人";
  6590. }
  6591. }
  6592. IL_16A2F:
  6593. i++;
  6594. continue;
  6595. goto IL_16A2F;
  6596. }
  6597. }
  6598. if (Input.GetKeyDown(KeyCode.F) && this.getModKeyPressing(MultipleMaids.modKey.Shift) && !fFlg)
  6599. {
  6600. bgmIndex--;
  6601. if (bgmIndex <= -1)
  6602. {
  6603. bgmIndex = bgmArray.Length - 1;
  6604. }
  6605. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6606. bgmCombo.selectedItemIndex = bgmIndex;
  6607. }
  6608. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6609. {
  6610. bgmIndex++;
  6611. if (bgmIndex == bgmArray.Length)
  6612. {
  6613. bgmIndex = 0;
  6614. }
  6615. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6616. bgmCombo.selectedItemIndex = bgmIndex;
  6617. }
  6618. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6619. {
  6620. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6621. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6622. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6623. if (isMessage)
  6624. {
  6625. isMessage = false;
  6626. messageWindowMgr.CloseMessageWindowPanel();
  6627. }
  6628. else if (!bGuiMessage)
  6629. {
  6630. bGuiMessage = true;
  6631. }
  6632. else
  6633. {
  6634. bGuiMessage = false;
  6635. isMessage = false;
  6636. messageWindowMgr.CloseMessageWindowPanel();
  6637. }
  6638. }
  6639. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6640. {
  6641. escFlg = true;
  6642. for (int j = 0; j < maidCnt; j++)
  6643. {
  6644. if (maidArray[j] && maidArray[j].Visible)
  6645. {
  6646. maidArray[j].StopKuchipakuPattern();
  6647. if (isDanceStart7V)
  6648. {
  6649. maidArray[j].SetPos(dancePos[j]);
  6650. maidArray[j].body0.transform.localRotation = danceRot[j];
  6651. }
  6652. if (isDanceStart8V)
  6653. {
  6654. maidArray[j].SetPos(dancePos[j]);
  6655. maidArray[j].body0.transform.localRotation = danceRot[j];
  6656. }
  6657. if (isDanceStart11V)
  6658. {
  6659. maidArray[j].SetPos(dancePos[j]);
  6660. maidArray[j].body0.transform.localRotation = danceRot[j];
  6661. }
  6662. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  6663. {
  6664. maidArray[j].SetPos(dancePos[j]);
  6665. maidArray[j].body0.transform.localRotation = danceRot[j];
  6666. int i = j;
  6667. if (!isVR)
  6668. {
  6669. delCount[i] = 20;
  6670. if (goSlot[(int)selectList[i]] != null)
  6671. {
  6672. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6673. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6674. {
  6675. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6676. }
  6677. }
  6678. }
  6679. Maid maid = maidArray[j];
  6680. maid.DelProp(MPN.handitem, true);
  6681. maid.DelProp(MPN.accvag, true);
  6682. maid.DelProp(MPN.accanl, true);
  6683. maid.DelProp(MPN.kousoku_upper, true);
  6684. maid.DelProp(MPN.kousoku_lower, true);
  6685. maid.AllProcPropSeqStart();
  6686. }
  6687. if (isDanceStart14V)
  6688. {
  6689. maidArray[j].SetPos(dancePos[j]);
  6690. maidArray[j].body0.transform.localRotation = danceRot[j];
  6691. }
  6692. if (isDanceStart15V)
  6693. {
  6694. maidArray[j].SetPos(dancePos[j]);
  6695. maidArray[j].body0.transform.localRotation = danceRot[j];
  6696. }
  6697. }
  6698. }
  6699. isDanceStart1F = false;
  6700. isDanceStart1K = false;
  6701. isDanceStart2F = false;
  6702. isDanceStart3F = false;
  6703. isDanceStart3K = false;
  6704. isDanceStart4F = false;
  6705. isDanceStart4K = false;
  6706. isDanceStart5F = false;
  6707. isDanceStart5K = false;
  6708. isDanceStart6F = false;
  6709. isDanceStart6K = false;
  6710. isDanceStart7F = false;
  6711. isDanceStart7V = false;
  6712. isDanceStart8F = false;
  6713. isDanceStart8V = false;
  6714. isDanceStart8P = false;
  6715. isDanceStart9F = false;
  6716. isDanceStart9K = false;
  6717. isDanceStart10F = false;
  6718. isDanceStart11F = false;
  6719. isDanceStart11V = false;
  6720. isDanceStart12F = false;
  6721. isDanceStart13F = false;
  6722. isDanceStart13K = false;
  6723. isDanceStart14F = false;
  6724. isDanceStart14V = false;
  6725. isDanceStart15F = false;
  6726. isDanceStart15V = false;
  6727. for (int j = 0; j < maidCnt; j++)
  6728. {
  6729. danceFace[j] = 0f;
  6730. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6731. maidArray[j].SetAutoTwistAll(true);
  6732. }
  6733. danceCheckIndex = 0;
  6734. for (int k = 0; k < danceCheck.Length; k++)
  6735. {
  6736. danceCheck[danceCheckIndex] = 1f;
  6737. }
  6738. isDance = false;
  6739. isDanceChu = false;
  6740. if (maidArray[1] && maidArray[1].Visible)
  6741. {
  6742. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6743. {
  6744. Vector3 vector = Vector3.zero;
  6745. vector.x = 0.6f;
  6746. maidArray[1].SetPos(vector);
  6747. if (maidArray[2] && maidArray[2].Visible)
  6748. {
  6749. vector.x = -0.6f;
  6750. maidArray[2].SetPos(vector);
  6751. }
  6752. if (maidArray[3] && maidArray[3].Visible)
  6753. {
  6754. vector.x = 1.2f;
  6755. maidArray[3].SetPos(vector);
  6756. }
  6757. if (maidArray[4] && maidArray[4].Visible)
  6758. {
  6759. vector.x = -1.2f;
  6760. maidArray[4].SetPos(vector);
  6761. }
  6762. if (maidArray[5] && maidArray[5].Visible)
  6763. {
  6764. vector.x = 1.8f;
  6765. maidArray[5].SetPos(vector);
  6766. }
  6767. if (maidArray[6] && maidArray[6].Visible)
  6768. {
  6769. vector.x = -1.8f;
  6770. maidArray[6].SetPos(vector);
  6771. }
  6772. if (maidArray[7] && maidArray[7].Visible)
  6773. {
  6774. vector.x = 2.4f;
  6775. maidArray[7].SetPos(vector);
  6776. }
  6777. if (maidArray[8] && maidArray[8].Visible)
  6778. {
  6779. vector.x = -2.4f;
  6780. maidArray[8].SetPos(vector);
  6781. }
  6782. if (maidArray[9] && maidArray[9].Visible)
  6783. {
  6784. vector.x = 3f;
  6785. maidArray[9].SetPos(vector);
  6786. }
  6787. if (maidArray[10] && maidArray[10].Visible)
  6788. {
  6789. vector.x = -3f;
  6790. maidArray[10].SetPos(vector);
  6791. }
  6792. if (maidArray[11] && maidArray[11].Visible)
  6793. {
  6794. vector.x = 3.6f;
  6795. maidArray[11].SetPos(vector);
  6796. }
  6797. if (maidArray[12] && maidArray[12].Visible)
  6798. {
  6799. vector.x = -3.6f;
  6800. maidArray[12].SetPos(vector);
  6801. }
  6802. if (maidArray[13] && maidArray[13].Visible)
  6803. {
  6804. vector.x = 4.2f;
  6805. maidArray[13].SetPos(vector);
  6806. }
  6807. }
  6808. }
  6809. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6810. }
  6811. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6812. {
  6813. if (isScript)
  6814. {
  6815. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6816. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6817. if (isPanel)
  6818. {
  6819. isPanel = false;
  6820. }
  6821. else
  6822. {
  6823. isPanel = true;
  6824. }
  6825. gameObject5.SetActive(isPanel);
  6826. }
  6827. else
  6828. {
  6829. bGui = !bGui;
  6830. }
  6831. }
  6832. if (Input.GetKeyDown(KeyCode.Y) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  6833. {
  6834. keyFlg = true;
  6835. bgIndex--;
  6836. if (bgIndex <= -1)
  6837. {
  6838. bgIndex = bgArray.Length - 1;
  6839. }
  6840. if (!moveBg)
  6841. {
  6842. bg.localScale = new Vector3(1f, 1f, 1f);
  6843. if (bgArray[bgIndex].Length == 36)
  6844. {
  6845. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6846. }
  6847. else
  6848. {
  6849. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6850. }
  6851. bgCombo.selectedItemIndex = bgIndex;
  6852. if (bgArray[bgIndex] == "karaokeroom")
  6853. {
  6854. bg.transform.position = bgObject.transform.position;
  6855. Vector3 vector = Vector3.zero;
  6856. Vector3 zero3 = Vector3.zero;
  6857. zero3.y = 90f;
  6858. vector.z = 4f;
  6859. vector.x = 1f;
  6860. bg.transform.localPosition = vector;
  6861. bg.transform.localRotation = Quaternion.Euler(zero3);
  6862. }
  6863. }
  6864. }
  6865. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6866. {
  6867. keyFlg = true;
  6868. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6869. }
  6870. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6871. {
  6872. keyFlg = true;
  6873. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6874. }
  6875. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6876. {
  6877. keyFlg = true;
  6878. bg.localScale = new Vector3(1f, 1f, 1f);
  6879. }
  6880. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6881. {
  6882. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6883. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6884. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6885. Vector3 vector = bg.position;
  6886. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6887. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6888. bg.localPosition = vector;
  6889. if (Input.GetKey(KeyCode.Y))
  6890. {
  6891. keyFlg = true;
  6892. }
  6893. }
  6894. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  6895. {
  6896. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6897. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6898. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6899. Vector3 vector = bg.position;
  6900. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6901. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6902. bg.localPosition = vector;
  6903. if (Input.GetKey(KeyCode.Y))
  6904. {
  6905. keyFlg = true;
  6906. }
  6907. }
  6908. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  6909. {
  6910. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6911. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6912. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6913. Vector3 vector = bg.position;
  6914. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6915. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6916. bg.localPosition = vector;
  6917. if (Input.GetKey(KeyCode.Y))
  6918. {
  6919. keyFlg = true;
  6920. }
  6921. }
  6922. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  6923. {
  6924. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6925. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6926. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6927. Vector3 vector = bg.position;
  6928. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6929. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6930. bg.localPosition = vector;
  6931. if (Input.GetKey(KeyCode.Y))
  6932. {
  6933. keyFlg = true;
  6934. }
  6935. }
  6936. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  6937. {
  6938. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6939. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6940. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6941. Vector3 vector = bg.position;
  6942. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6943. bg.localPosition = vector;
  6944. if (Input.GetKey(KeyCode.Y))
  6945. {
  6946. keyFlg = true;
  6947. }
  6948. }
  6949. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  6950. {
  6951. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6952. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6953. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6954. Vector3 vector = bg.position;
  6955. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6956. bg.localPosition = vector;
  6957. if (Input.GetKey(KeyCode.Y))
  6958. {
  6959. keyFlg = true;
  6960. }
  6961. }
  6962. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  6963. {
  6964. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6965. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6966. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6967. Vector3 vector = bg.position;
  6968. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6969. bg.localPosition = vector;
  6970. if (Input.GetKey(KeyCode.Y))
  6971. {
  6972. keyFlg = true;
  6973. }
  6974. }
  6975. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  6976. {
  6977. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6978. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6979. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6980. Vector3 vector = bg.position;
  6981. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6982. bg.localPosition = vector;
  6983. if (Input.GetKey(KeyCode.Y))
  6984. {
  6985. keyFlg = true;
  6986. }
  6987. }
  6988. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  6989. {
  6990. Vector3 vector = bg.position;
  6991. vector.y -= 0.015f * speed;
  6992. bg.localPosition = vector;
  6993. if (Input.GetKey(KeyCode.Y))
  6994. {
  6995. keyFlg = true;
  6996. }
  6997. }
  6998. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  6999. {
  7000. Vector3 vector = bg.position;
  7001. vector.y += 0.015f * speed;
  7002. bg.localPosition = vector;
  7003. if (Input.GetKey(KeyCode.Y))
  7004. {
  7005. keyFlg = true;
  7006. }
  7007. }
  7008. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7009. {
  7010. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7011. if (Input.GetKey(KeyCode.Y))
  7012. {
  7013. keyFlg = true;
  7014. }
  7015. }
  7016. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7017. {
  7018. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7019. if (Input.GetKey(KeyCode.Y))
  7020. {
  7021. keyFlg = true;
  7022. }
  7023. }
  7024. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7025. {
  7026. if (Input.GetKey(KeyCode.Y))
  7027. {
  7028. keyFlg = true;
  7029. }
  7030. }
  7031. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7032. {
  7033. if (keyFlg)
  7034. {
  7035. keyFlg = false;
  7036. }
  7037. else
  7038. {
  7039. bgIndex++;
  7040. if (bgIndex == bgArray.Length)
  7041. {
  7042. bgIndex = 0;
  7043. }
  7044. if (!moveBg)
  7045. {
  7046. bg.localScale = new Vector3(1f, 1f, 1f);
  7047. if (bgArray[bgIndex].Length == 36)
  7048. {
  7049. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7050. }
  7051. else
  7052. {
  7053. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7054. }
  7055. bgCombo.selectedItemIndex = bgIndex;
  7056. if (bgArray[bgIndex] == "karaokeroom")
  7057. {
  7058. bg.transform.position = bgObject.transform.position;
  7059. Vector3 vector = Vector3.zero;
  7060. Vector3 zero3 = Vector3.zero;
  7061. zero3.y = 90f;
  7062. vector.z = 4f;
  7063. vector.x = 1f;
  7064. bg.transform.localPosition = vector;
  7065. bg.transform.localRotation = Quaternion.Euler(zero3);
  7066. }
  7067. }
  7068. }
  7069. }
  7070. if (maidArray[0] != null && maidArray[0].Visible)
  7071. {
  7072. if (Input.GetKeyDown(KeyCode.Comma) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  7073. {
  7074. int[] array6 = new int[1];
  7075. int[] array7 = array6;
  7076. if (maidCnt == 2)
  7077. {
  7078. array7 = new int[]
  7079. {
  7080. 0,
  7081. 1
  7082. };
  7083. }
  7084. if (maidCnt == 3)
  7085. {
  7086. array7 = new int[]
  7087. {
  7088. 0,
  7089. 1,
  7090. 2
  7091. };
  7092. }
  7093. if (maidCnt == 4)
  7094. {
  7095. array7 = new int[]
  7096. {
  7097. 0,
  7098. 1,
  7099. 2,
  7100. 3
  7101. };
  7102. }
  7103. if (maidCnt == 5)
  7104. {
  7105. array7 = new int[]
  7106. {
  7107. 0,
  7108. 1,
  7109. 2,
  7110. 3,
  7111. 4
  7112. };
  7113. }
  7114. if (maidCnt == 6)
  7115. {
  7116. array7 = new int[]
  7117. {
  7118. 0,
  7119. 1,
  7120. 2,
  7121. 3,
  7122. 4,
  7123. 5
  7124. };
  7125. }
  7126. if (maidCnt == 7)
  7127. {
  7128. array7 = new int[]
  7129. {
  7130. 0,
  7131. 1,
  7132. 2,
  7133. 3,
  7134. 4,
  7135. 5,
  7136. 6
  7137. };
  7138. }
  7139. if (maidCnt == 8)
  7140. {
  7141. array7 = new int[]
  7142. {
  7143. 0,
  7144. 1,
  7145. 2,
  7146. 3,
  7147. 4,
  7148. 5,
  7149. 6,
  7150. 7
  7151. };
  7152. }
  7153. if (maidCnt == 9)
  7154. {
  7155. array7 = new int[]
  7156. {
  7157. 0,
  7158. 1,
  7159. 2,
  7160. 3,
  7161. 4,
  7162. 5,
  7163. 6,
  7164. 7,
  7165. 8
  7166. };
  7167. }
  7168. if (maidCnt == 10)
  7169. {
  7170. array7 = new int[]
  7171. {
  7172. 0,
  7173. 1,
  7174. 2,
  7175. 3,
  7176. 4,
  7177. 5,
  7178. 6,
  7179. 7,
  7180. 8,
  7181. 9
  7182. };
  7183. }
  7184. if (maidCnt == 11)
  7185. {
  7186. array7 = new int[]
  7187. {
  7188. 0,
  7189. 1,
  7190. 2,
  7191. 3,
  7192. 4,
  7193. 5,
  7194. 6,
  7195. 7,
  7196. 8,
  7197. 9,
  7198. 10
  7199. };
  7200. }
  7201. if (maidCnt == 12)
  7202. {
  7203. array7 = new int[]
  7204. {
  7205. 0,
  7206. 1,
  7207. 2,
  7208. 3,
  7209. 4,
  7210. 5,
  7211. 6,
  7212. 7,
  7213. 8,
  7214. 9,
  7215. 10,
  7216. 11
  7217. };
  7218. }
  7219. System.Random random = new System.Random();
  7220. int n = array7.Length;
  7221. while (n > 1)
  7222. {
  7223. n--;
  7224. int j = random.Next(n + 1);
  7225. int num8 = array7[j];
  7226. array7[j] = array7[n];
  7227. array7[n] = num8;
  7228. }
  7229. int[] array8 = new int[maidCnt];
  7230. Vector3[] array9 = new Vector3[maidCnt];
  7231. Vector3[] array10 = new Vector3[maidCnt];
  7232. int[] array11 = new int[maidCnt];
  7233. for (int i = 0; i < maidCnt; i++)
  7234. {
  7235. array8[array7[i]] = poseIndex[array7[i]];
  7236. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7237. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7238. array11[array7[i]] = headEyeIndex[array7[i]];
  7239. }
  7240. for (int i = 0; i < maidCnt; i++)
  7241. {
  7242. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7243. {
  7244. string[] array12 = poseArray[array8[array7[i]]].Split(new char[]
  7245. {
  7246. ','
  7247. });
  7248. isStop[i] = false;
  7249. poseCount[i] = 20;
  7250. Maid maid = maidArray[i];
  7251. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7252. {
  7253. maid.body0.MuneYureL(0f);
  7254. maid.body0.MuneYureR(0f);
  7255. }
  7256. else
  7257. {
  7258. maid.body0.MuneYureL(1f);
  7259. maid.body0.MuneYureR(1f);
  7260. }
  7261. int num6;
  7262. if (array12[0].Contains("MultipleMaidsPose"))
  7263. {
  7264. string path = array12[0].Split(new char[]
  7265. {
  7266. '/'
  7267. })[1];
  7268. byte[] array2 = new byte[0];
  7269. try
  7270. {
  7271. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7272. {
  7273. array2 = new byte[fileStream.Length];
  7274. fileStream.Read(array2, 0, array2.Length);
  7275. }
  7276. }
  7277. catch
  7278. {
  7279. }
  7280. if (0 < array2.Length)
  7281. {
  7282. string text = Path.GetFileName(path);
  7283. long num5 = (long)text.GetHashCode();
  7284. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7285. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7286. {
  7287. Maid.AutoTwist.ShoulderL,
  7288. Maid.AutoTwist.ShoulderR,
  7289. Maid.AutoTwist.WristL,
  7290. Maid.AutoTwist.WristR,
  7291. Maid.AutoTwist.ThighL,
  7292. Maid.AutoTwist.ThighR
  7293. };
  7294. for (int m = 0; m < array3.Length; m++)
  7295. {
  7296. maid.SetAutoTwist(array3[m], true);
  7297. }
  7298. }
  7299. }
  7300. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7301. {
  7302. loadPose[i] = array12[0];
  7303. }
  7304. else if (!array12[0].StartsWith("dance_"))
  7305. {
  7306. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7307. }
  7308. else
  7309. {
  7310. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7311. {
  7312. maidArray[i].body0.LoadAnime(array12[0] + ".anm", GameUty.FileSystem, array12[0] + ".anm", false, false);
  7313. }
  7314. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7315. }
  7316. if (array12.Length > 1)
  7317. {
  7318. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time = float.Parse(array12[1]);
  7319. isStop[i] = true;
  7320. if (array12.Length > 2)
  7321. {
  7322. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7323. isPoseIti[i] = true;
  7324. poseIti[i] = maidArray[i].transform.position;
  7325. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7326. }
  7327. }
  7328. }
  7329. poseIndex[i] = array8[array7[i]];
  7330. maidArray[i].SetRot(array9[array7[i]]);
  7331. maidArray[i].SetPos(array10[array7[i]]);
  7332. headEyeIndex[i] = array11[array7[i]];
  7333. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7334. maidArray[i].body0.boHeadToCam = true;
  7335. maidArray[i].body0.boEyeToCam = true;
  7336. if (headEyeIndex[i] == 0)
  7337. {
  7338. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7339. maidArray[i].body0.boHeadToCam = true;
  7340. maidArray[i].body0.boEyeToCam = true;
  7341. }
  7342. else
  7343. {
  7344. maidArray[i].body0.trsLookTarget = null;
  7345. if (headEyeIndex[i] == 1)
  7346. {
  7347. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7348. }
  7349. if (headEyeIndex[i] == 2)
  7350. {
  7351. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7352. }
  7353. if (headEyeIndex[i] == 3)
  7354. {
  7355. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7356. }
  7357. if (headEyeIndex[i] == 4)
  7358. {
  7359. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7360. }
  7361. if (headEyeIndex[i] == 5)
  7362. {
  7363. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7364. }
  7365. if (headEyeIndex[i] == 6)
  7366. {
  7367. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7368. }
  7369. if (headEyeIndex[i] == 7)
  7370. {
  7371. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7372. }
  7373. if (headEyeIndex[i] == 8)
  7374. {
  7375. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7376. }
  7377. if (headEyeIndex[i] == 9)
  7378. {
  7379. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7380. }
  7381. }
  7382. }
  7383. }
  7384. else if (Input.GetKeyDown(KeyCode.Comma))
  7385. {
  7386. int[] array8 = new int[maidCnt];
  7387. Vector3[] array9 = new Vector3[maidCnt];
  7388. Vector3[] array10 = new Vector3[maidCnt];
  7389. int[] array11 = new int[maidCnt];
  7390. for (int i = 0; i < maidCnt; i++)
  7391. {
  7392. array8[i] = poseIndex[i];
  7393. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7394. array10[i] = maidArray[i].transform.position;
  7395. array11[i] = headEyeIndex[i];
  7396. }
  7397. for (int i = 0; i < maidCnt; i++)
  7398. {
  7399. if (i == 0)
  7400. {
  7401. if (!isLock[i])
  7402. {
  7403. if (maidArray[i] && maidArray[i].Visible)
  7404. {
  7405. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[]
  7406. {
  7407. ','
  7408. });
  7409. isStop[i] = false;
  7410. poseCount[i] = 20;
  7411. Maid maid = maidArray[i];
  7412. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7413. {
  7414. maid.body0.MuneYureL(0f);
  7415. maid.body0.MuneYureR(0f);
  7416. }
  7417. else
  7418. {
  7419. maid.body0.MuneYureL(1f);
  7420. maid.body0.MuneYureR(1f);
  7421. }
  7422. int num6;
  7423. if (array12[0].Contains("MultipleMaidsPose"))
  7424. {
  7425. string path = array12[0].Split(new char[]
  7426. {
  7427. '/'
  7428. })[1];
  7429. byte[] array2 = new byte[0];
  7430. try
  7431. {
  7432. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7433. {
  7434. array2 = new byte[fileStream.Length];
  7435. fileStream.Read(array2, 0, array2.Length);
  7436. }
  7437. }
  7438. catch
  7439. {
  7440. }
  7441. if (0 < array2.Length)
  7442. {
  7443. string text = Path.GetFileName(path);
  7444. long num5 = (long)text.GetHashCode();
  7445. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7446. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7447. {
  7448. Maid.AutoTwist.ShoulderL,
  7449. Maid.AutoTwist.ShoulderR,
  7450. Maid.AutoTwist.WristL,
  7451. Maid.AutoTwist.WristR,
  7452. Maid.AutoTwist.ThighL,
  7453. Maid.AutoTwist.ThighR
  7454. };
  7455. for (int m = 0; m < array3.Length; m++)
  7456. {
  7457. maid.SetAutoTwist(array3[m], true);
  7458. }
  7459. }
  7460. }
  7461. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7462. {
  7463. loadPose[i] = array12[0];
  7464. }
  7465. else if (!array12[0].StartsWith("dance_"))
  7466. {
  7467. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7468. }
  7469. else
  7470. {
  7471. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7472. {
  7473. maidArray[i].body0.LoadAnime(array12[0] + ".anm", GameUty.FileSystem, array12[0] + ".anm", false, false);
  7474. }
  7475. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7476. }
  7477. if (array12.Length > 1)
  7478. {
  7479. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time = float.Parse(array12[1]);
  7480. isStop[i] = true;
  7481. if (array12.Length > 2)
  7482. {
  7483. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7484. isPoseIti[i] = true;
  7485. poseIti[i] = maidArray[i].transform.position;
  7486. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7487. }
  7488. }
  7489. }
  7490. }
  7491. poseIndex[i] = array8[maidCnt - i - 1];
  7492. headEyeIndex[i] = array11[maidCnt - i - 1];
  7493. }
  7494. else
  7495. {
  7496. if (!isLock[i])
  7497. {
  7498. if (maidArray[i] && maidArray[i].Visible)
  7499. {
  7500. string[] array12 = poseArray[array8[i - 1]].Split(new char[]
  7501. {
  7502. ','
  7503. });
  7504. isStop[i] = false;
  7505. poseCount[i] = 20;
  7506. Maid maid = maidArray[i];
  7507. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7508. {
  7509. maid.body0.MuneYureL(0f);
  7510. maid.body0.MuneYureR(0f);
  7511. }
  7512. else
  7513. {
  7514. maid.body0.MuneYureL(1f);
  7515. maid.body0.MuneYureR(1f);
  7516. }
  7517. int num6;
  7518. if (array12[0].Contains("MultipleMaidsPose"))
  7519. {
  7520. string path = array12[0].Split(new char[]
  7521. {
  7522. '/'
  7523. })[1];
  7524. byte[] array2 = new byte[0];
  7525. try
  7526. {
  7527. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7528. {
  7529. array2 = new byte[fileStream.Length];
  7530. fileStream.Read(array2, 0, array2.Length);
  7531. }
  7532. }
  7533. catch
  7534. {
  7535. }
  7536. if (0 < array2.Length)
  7537. {
  7538. string text = Path.GetFileName(path);
  7539. long num5 = (long)text.GetHashCode();
  7540. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7541. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7542. {
  7543. Maid.AutoTwist.ShoulderL,
  7544. Maid.AutoTwist.ShoulderR,
  7545. Maid.AutoTwist.WristL,
  7546. Maid.AutoTwist.WristR,
  7547. Maid.AutoTwist.ThighL,
  7548. Maid.AutoTwist.ThighR
  7549. };
  7550. for (int m = 0; m < array3.Length; m++)
  7551. {
  7552. maid.SetAutoTwist(array3[m], true);
  7553. }
  7554. }
  7555. }
  7556. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7557. {
  7558. loadPose[i] = array12[0];
  7559. }
  7560. else if (!array12[0].StartsWith("dance_"))
  7561. {
  7562. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7563. }
  7564. else
  7565. {
  7566. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7567. {
  7568. maidArray[i].body0.LoadAnime(array12[0] + ".anm", GameUty.FileSystem, array12[0] + ".anm", false, false);
  7569. }
  7570. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7571. }
  7572. if (array12.Length > 1)
  7573. {
  7574. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time = float.Parse(array12[1]);
  7575. isStop[i] = true;
  7576. if (array12.Length > 2)
  7577. {
  7578. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7579. isPoseIti[i] = true;
  7580. poseIti[i] = maidArray[i].transform.position;
  7581. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7582. }
  7583. }
  7584. }
  7585. }
  7586. poseIndex[i] = array8[i - 1];
  7587. headEyeIndex[i] = array11[i - 1];
  7588. }
  7589. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7590. maidArray[i].body0.boHeadToCam = true;
  7591. maidArray[i].body0.boEyeToCam = true;
  7592. if (headEyeIndex[i] == 0)
  7593. {
  7594. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7595. maidArray[i].body0.boHeadToCam = true;
  7596. maidArray[i].body0.boEyeToCam = true;
  7597. }
  7598. else
  7599. {
  7600. maidArray[i].body0.trsLookTarget = null;
  7601. if (headEyeIndex[i] == 1)
  7602. {
  7603. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7604. }
  7605. if (headEyeIndex[i] == 2)
  7606. {
  7607. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7608. }
  7609. if (headEyeIndex[i] == 3)
  7610. {
  7611. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7612. }
  7613. if (headEyeIndex[i] == 4)
  7614. {
  7615. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7616. }
  7617. if (headEyeIndex[i] == 5)
  7618. {
  7619. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7620. }
  7621. if (headEyeIndex[i] == 6)
  7622. {
  7623. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7624. }
  7625. if (headEyeIndex[i] == 7)
  7626. {
  7627. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7628. }
  7629. if (headEyeIndex[i] == 8)
  7630. {
  7631. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7632. }
  7633. if (headEyeIndex[i] == 9)
  7634. {
  7635. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7636. }
  7637. }
  7638. if (i == 0)
  7639. {
  7640. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7641. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7642. }
  7643. else
  7644. {
  7645. maidArray[i].SetRot(array9[i - 1]);
  7646. maidArray[i].SetPos(array10[i - 1]);
  7647. }
  7648. }
  7649. }
  7650. for (int i = 0; i < maidCnt; i++)
  7651. {
  7652. if (Input.GetKey(KeyCode.B) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  7653. {
  7654. if (maidArray[i] && maidArray[i].Visible)
  7655. {
  7656. maidArray[i].body0.transform.localRotation = Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7657. }
  7658. }
  7659. else if (Input.GetKey(KeyCode.B))
  7660. {
  7661. if (maidArray[i] && maidArray[i].Visible)
  7662. {
  7663. maidArray[i].body0.transform.localRotation = Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  7664. }
  7665. }
  7666. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7667. {
  7668. if (maidArray[1] && maidArray[1].Visible)
  7669. {
  7670. if (maidArray[0].transform.position == maidArray[1].transform.position || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7671. {
  7672. Vector3 vector = Vector3.zero;
  7673. vector.x = 0.6f;
  7674. maidArray[1].SetPos(vector);
  7675. if (maidArray[2] && maidArray[2].Visible)
  7676. {
  7677. vector.x = -0.6f;
  7678. maidArray[2].SetPos(vector);
  7679. }
  7680. if (maidArray[3] && maidArray[3].Visible)
  7681. {
  7682. vector.x = 1.2f;
  7683. maidArray[3].SetPos(vector);
  7684. }
  7685. if (maidArray[4] && maidArray[4].Visible)
  7686. {
  7687. vector.x = -1.2f;
  7688. maidArray[4].SetPos(vector);
  7689. }
  7690. if (maidArray[5] && maidArray[5].Visible)
  7691. {
  7692. vector.x = 1.8f;
  7693. maidArray[5].SetPos(vector);
  7694. }
  7695. if (maidArray[6] && maidArray[6].Visible)
  7696. {
  7697. vector.x = -1.8f;
  7698. maidArray[6].SetPos(vector);
  7699. }
  7700. if (maidArray[7] && maidArray[7].Visible)
  7701. {
  7702. vector.x = 2.4f;
  7703. maidArray[7].SetPos(vector);
  7704. }
  7705. if (maidArray[8] && maidArray[8].Visible)
  7706. {
  7707. vector.x = -2.4f;
  7708. maidArray[8].SetPos(vector);
  7709. }
  7710. if (maidArray[9] && maidArray[9].Visible)
  7711. {
  7712. vector.x = 3f;
  7713. maidArray[9].SetPos(vector);
  7714. }
  7715. if (maidArray[10] && maidArray[10].Visible)
  7716. {
  7717. vector.x = -3f;
  7718. maidArray[10].SetPos(vector);
  7719. }
  7720. if (maidArray[11] && maidArray[11].Visible)
  7721. {
  7722. vector.x = 3.6f;
  7723. maidArray[11].SetPos(vector);
  7724. }
  7725. if (maidArray[12] && maidArray[12].Visible)
  7726. {
  7727. vector.x = -3.6f;
  7728. maidArray[12].SetPos(vector);
  7729. }
  7730. if (maidArray[13] && maidArray[13].Visible)
  7731. {
  7732. vector.x = 4.2f;
  7733. maidArray[13].SetPos(vector);
  7734. }
  7735. }
  7736. }
  7737. for (int k = 0; k < groupList.Count; k++)
  7738. {
  7739. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7740. {
  7741. if (poseIndex[i] == 0)
  7742. {
  7743. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7744. }
  7745. else
  7746. {
  7747. poseIndex[i] = 0;
  7748. }
  7749. break;
  7750. }
  7751. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7752. {
  7753. poseIndex[i] = (int)groupList[k - 1];
  7754. break;
  7755. }
  7756. }
  7757. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7758. {
  7759. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7760. }
  7761. if (maidArray[i] && maidArray[i].Visible)
  7762. {
  7763. string[] array = poseArray[poseIndex[i]].Split(new char[]
  7764. {
  7765. ','
  7766. });
  7767. isStop[i] = false;
  7768. poseCount[i] = 20;
  7769. Maid maid = maidArray[i];
  7770. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7771. {
  7772. maid.body0.MuneYureL(0f);
  7773. maid.body0.MuneYureR(0f);
  7774. }
  7775. else
  7776. {
  7777. maid.body0.MuneYureL(1f);
  7778. maid.body0.MuneYureR(1f);
  7779. }
  7780. int num6;
  7781. if (array[0].Contains("MultipleMaidsPose"))
  7782. {
  7783. string path = array[0].Split(new char[]
  7784. {
  7785. '/'
  7786. })[1];
  7787. byte[] array2 = new byte[0];
  7788. try
  7789. {
  7790. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7791. {
  7792. array2 = new byte[fileStream.Length];
  7793. fileStream.Read(array2, 0, array2.Length);
  7794. }
  7795. }
  7796. catch
  7797. {
  7798. }
  7799. if (0 < array2.Length)
  7800. {
  7801. string text = Path.GetFileName(path);
  7802. long num5 = (long)text.GetHashCode();
  7803. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7804. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7805. {
  7806. Maid.AutoTwist.ShoulderL,
  7807. Maid.AutoTwist.ShoulderR,
  7808. Maid.AutoTwist.WristL,
  7809. Maid.AutoTwist.WristR,
  7810. Maid.AutoTwist.ThighL,
  7811. Maid.AutoTwist.ThighR
  7812. };
  7813. for (int m = 0; m < array3.Length; m++)
  7814. {
  7815. maid.SetAutoTwist(array3[m], true);
  7816. }
  7817. }
  7818. }
  7819. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7820. {
  7821. loadPose[i] = array[0];
  7822. }
  7823. else if (!array[0].StartsWith("dance_"))
  7824. {
  7825. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7826. }
  7827. else
  7828. {
  7829. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7830. {
  7831. maidArray[i].body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  7832. }
  7833. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7834. }
  7835. if (array.Length > 1)
  7836. {
  7837. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7838. isStop[i] = true;
  7839. if (array.Length > 2)
  7840. {
  7841. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7842. isPoseIti[i] = true;
  7843. poseIti[i] = maidArray[i].transform.position;
  7844. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7845. }
  7846. }
  7847. }
  7848. }
  7849. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7850. {
  7851. if (maidArray[1] && maidArray[1].Visible)
  7852. {
  7853. if (maidArray[0].transform.position == maidArray[1].transform.position || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7854. {
  7855. Vector3 vector = Vector3.zero;
  7856. vector.x = 0.6f;
  7857. maidArray[1].SetPos(vector);
  7858. if (maidArray[2] && maidArray[2].Visible)
  7859. {
  7860. vector.x = -0.6f;
  7861. maidArray[2].SetPos(vector);
  7862. }
  7863. if (maidArray[3] && maidArray[3].Visible)
  7864. {
  7865. vector.x = 1.2f;
  7866. maidArray[3].SetPos(vector);
  7867. }
  7868. if (maidArray[4] && maidArray[4].Visible)
  7869. {
  7870. vector.x = -1.2f;
  7871. maidArray[4].SetPos(vector);
  7872. }
  7873. if (maidArray[5] && maidArray[5].Visible)
  7874. {
  7875. vector.x = 1.8f;
  7876. maidArray[5].SetPos(vector);
  7877. }
  7878. if (maidArray[6] && maidArray[6].Visible)
  7879. {
  7880. vector.x = -1.8f;
  7881. maidArray[6].SetPos(vector);
  7882. }
  7883. if (maidArray[7] && maidArray[7].Visible)
  7884. {
  7885. vector.x = 2.4f;
  7886. maidArray[7].SetPos(vector);
  7887. }
  7888. if (maidArray[8] && maidArray[8].Visible)
  7889. {
  7890. vector.x = -2.4f;
  7891. maidArray[8].SetPos(vector);
  7892. }
  7893. if (maidArray[9] && maidArray[9].Visible)
  7894. {
  7895. vector.x = 3f;
  7896. maidArray[9].SetPos(vector);
  7897. }
  7898. if (maidArray[10] && maidArray[10].Visible)
  7899. {
  7900. vector.x = -3f;
  7901. maidArray[10].SetPos(vector);
  7902. }
  7903. if (maidArray[11] && maidArray[11].Visible)
  7904. {
  7905. vector.x = 3.6f;
  7906. maidArray[11].SetPos(vector);
  7907. }
  7908. if (maidArray[12] && maidArray[12].Visible)
  7909. {
  7910. vector.x = -3.6f;
  7911. maidArray[12].SetPos(vector);
  7912. }
  7913. if (maidArray[13] && maidArray[13].Visible)
  7914. {
  7915. vector.x = 4.2f;
  7916. maidArray[13].SetPos(vector);
  7917. }
  7918. }
  7919. }
  7920. int num7 = poseIndex[i];
  7921. for (int k = 0; k < groupList.Count; k++)
  7922. {
  7923. if (poseIndex[i] < (int)groupList[k])
  7924. {
  7925. poseIndex[i] = (int)groupList[k];
  7926. break;
  7927. }
  7928. }
  7929. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7930. {
  7931. poseIndex[i] = 0;
  7932. }
  7933. if (maidArray[i] && maidArray[i].Visible)
  7934. {
  7935. string[] array = poseArray[poseIndex[i]].Split(new char[]
  7936. {
  7937. ','
  7938. });
  7939. isStop[i] = false;
  7940. poseCount[i] = 20;
  7941. Maid maid = maidArray[i];
  7942. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7943. {
  7944. maid.body0.MuneYureL(0f);
  7945. maid.body0.MuneYureR(0f);
  7946. }
  7947. else
  7948. {
  7949. maid.body0.MuneYureL(1f);
  7950. maid.body0.MuneYureR(1f);
  7951. }
  7952. int num6;
  7953. if (array[0].Contains("MultipleMaidsPose"))
  7954. {
  7955. string path = array[0].Split(new char[]
  7956. {
  7957. '/'
  7958. })[1];
  7959. byte[] array2 = new byte[0];
  7960. try
  7961. {
  7962. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7963. {
  7964. array2 = new byte[fileStream.Length];
  7965. fileStream.Read(array2, 0, array2.Length);
  7966. }
  7967. }
  7968. catch
  7969. {
  7970. }
  7971. if (0 < array2.Length)
  7972. {
  7973. string text = Path.GetFileName(path);
  7974. long num5 = (long)text.GetHashCode();
  7975. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7976. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7977. {
  7978. Maid.AutoTwist.ShoulderL,
  7979. Maid.AutoTwist.ShoulderR,
  7980. Maid.AutoTwist.WristL,
  7981. Maid.AutoTwist.WristR,
  7982. Maid.AutoTwist.ThighL,
  7983. Maid.AutoTwist.ThighR
  7984. };
  7985. for (int m = 0; m < array3.Length; m++)
  7986. {
  7987. maid.SetAutoTwist(array3[m], true);
  7988. }
  7989. }
  7990. }
  7991. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7992. {
  7993. loadPose[i] = array[0];
  7994. }
  7995. else if (!array[0].StartsWith("dance_"))
  7996. {
  7997. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7998. }
  7999. else
  8000. {
  8001. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8002. {
  8003. maidArray[i].body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  8004. }
  8005. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8006. }
  8007. if (array.Length > 1)
  8008. {
  8009. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8010. isStop[i] = true;
  8011. if (array.Length > 2)
  8012. {
  8013. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8014. isPoseIti[i] = true;
  8015. poseIti[i] = maidArray[i].transform.position;
  8016. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8017. }
  8018. }
  8019. }
  8020. }
  8021. else if (Input.GetKeyDown(KeyCode.N) && this.getModKeyPressing(MultipleMaids.modKey.Shift) && !isLock[i])
  8022. {
  8023. if (maidArray[1] && maidArray[1].Visible)
  8024. {
  8025. if (maidArray[0].transform.position == maidArray[1].transform.position || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8026. {
  8027. Vector3 vector = Vector3.zero;
  8028. vector.x = 0.6f;
  8029. maidArray[1].SetPos(vector);
  8030. if (maidArray[2] && maidArray[2].Visible)
  8031. {
  8032. vector.x = -0.6f;
  8033. maidArray[2].SetPos(vector);
  8034. }
  8035. if (maidArray[3] && maidArray[3].Visible)
  8036. {
  8037. vector.x = 1.2f;
  8038. maidArray[3].SetPos(vector);
  8039. }
  8040. if (maidArray[4] && maidArray[4].Visible)
  8041. {
  8042. vector.x = -1.2f;
  8043. maidArray[4].SetPos(vector);
  8044. }
  8045. if (maidArray[5] && maidArray[5].Visible)
  8046. {
  8047. vector.x = 1.8f;
  8048. maidArray[5].SetPos(vector);
  8049. }
  8050. if (maidArray[6] && maidArray[6].Visible)
  8051. {
  8052. vector.x = -1.8f;
  8053. maidArray[6].SetPos(vector);
  8054. }
  8055. if (maidArray[7] && maidArray[7].Visible)
  8056. {
  8057. vector.x = 2.4f;
  8058. maidArray[7].SetPos(vector);
  8059. }
  8060. if (maidArray[8] && maidArray[8].Visible)
  8061. {
  8062. vector.x = -2.4f;
  8063. maidArray[8].SetPos(vector);
  8064. }
  8065. if (maidArray[9] && maidArray[9].Visible)
  8066. {
  8067. vector.x = 3f;
  8068. maidArray[9].SetPos(vector);
  8069. }
  8070. if (maidArray[10] && maidArray[10].Visible)
  8071. {
  8072. vector.x = -3f;
  8073. maidArray[10].SetPos(vector);
  8074. }
  8075. if (maidArray[11] && maidArray[11].Visible)
  8076. {
  8077. vector.x = 3.6f;
  8078. maidArray[11].SetPos(vector);
  8079. }
  8080. if (maidArray[12] && maidArray[12].Visible)
  8081. {
  8082. vector.x = -3.6f;
  8083. maidArray[12].SetPos(vector);
  8084. }
  8085. if (maidArray[13] && maidArray[13].Visible)
  8086. {
  8087. vector.x = 4.2f;
  8088. maidArray[13].SetPos(vector);
  8089. }
  8090. }
  8091. }
  8092. poseIndex[i]--;
  8093. if (poseIndex[i] <= -1)
  8094. {
  8095. poseIndex[i] = poseArray.Length - 1;
  8096. }
  8097. if (maidArray[i] && maidArray[i].Visible)
  8098. {
  8099. string[] array = poseArray[poseIndex[i]].Split(new char[]
  8100. {
  8101. ','
  8102. });
  8103. isStop[i] = false;
  8104. poseCount[i] = 20;
  8105. Maid maid = maidArray[i];
  8106. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8107. {
  8108. maid.body0.MuneYureL(0f);
  8109. maid.body0.MuneYureR(0f);
  8110. }
  8111. else
  8112. {
  8113. maid.body0.MuneYureL(1f);
  8114. maid.body0.MuneYureR(1f);
  8115. }
  8116. int num6;
  8117. if (array[0].Contains("MultipleMaidsPose"))
  8118. {
  8119. string path = array[0].Split(new char[]
  8120. {
  8121. '/'
  8122. })[1];
  8123. byte[] array2 = new byte[0];
  8124. try
  8125. {
  8126. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8127. {
  8128. array2 = new byte[fileStream.Length];
  8129. fileStream.Read(array2, 0, array2.Length);
  8130. }
  8131. }
  8132. catch
  8133. {
  8134. }
  8135. if (0 < array2.Length)
  8136. {
  8137. string text = Path.GetFileName(path);
  8138. long num5 = (long)text.GetHashCode();
  8139. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8140. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8141. {
  8142. Maid.AutoTwist.ShoulderL,
  8143. Maid.AutoTwist.ShoulderR,
  8144. Maid.AutoTwist.WristL,
  8145. Maid.AutoTwist.WristR,
  8146. Maid.AutoTwist.ThighL,
  8147. Maid.AutoTwist.ThighR
  8148. };
  8149. for (int m = 0; m < array3.Length; m++)
  8150. {
  8151. maid.SetAutoTwist(array3[m], true);
  8152. }
  8153. }
  8154. }
  8155. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8156. {
  8157. loadPose[i] = array[0];
  8158. }
  8159. else if (!array[0].StartsWith("dance_"))
  8160. {
  8161. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8162. }
  8163. else
  8164. {
  8165. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8166. {
  8167. maidArray[i].body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  8168. }
  8169. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8170. }
  8171. if (array.Length > 1)
  8172. {
  8173. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8174. isStop[i] = true;
  8175. if (array.Length > 2)
  8176. {
  8177. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8178. isPoseIti[i] = true;
  8179. poseIti[i] = maidArray[i].transform.position;
  8180. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8181. }
  8182. }
  8183. }
  8184. }
  8185. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8186. {
  8187. if (maidArray[1] && maidArray[1].Visible)
  8188. {
  8189. if (maidArray[0].transform.position == maidArray[1].transform.position || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8190. {
  8191. Vector3 vector = Vector3.zero;
  8192. vector.x = 0.6f;
  8193. maidArray[1].SetPos(vector);
  8194. if (maidArray[2] && maidArray[2].Visible)
  8195. {
  8196. vector.x = -0.6f;
  8197. maidArray[2].SetPos(vector);
  8198. }
  8199. if (maidArray[3] && maidArray[3].Visible)
  8200. {
  8201. vector.x = 1.2f;
  8202. maidArray[3].SetPos(vector);
  8203. }
  8204. if (maidArray[4] && maidArray[4].Visible)
  8205. {
  8206. vector.x = -1.2f;
  8207. maidArray[4].SetPos(vector);
  8208. }
  8209. if (maidArray[5] && maidArray[5].Visible)
  8210. {
  8211. vector.x = 1.8f;
  8212. maidArray[5].SetPos(vector);
  8213. }
  8214. if (maidArray[6] && maidArray[6].Visible)
  8215. {
  8216. vector.x = -1.8f;
  8217. maidArray[6].SetPos(vector);
  8218. }
  8219. if (maidArray[7] && maidArray[7].Visible)
  8220. {
  8221. vector.x = 2.4f;
  8222. maidArray[7].SetPos(vector);
  8223. }
  8224. if (maidArray[8] && maidArray[8].Visible)
  8225. {
  8226. vector.x = -2.4f;
  8227. maidArray[8].SetPos(vector);
  8228. }
  8229. if (maidArray[9] && maidArray[9].Visible)
  8230. {
  8231. vector.x = 3f;
  8232. maidArray[9].SetPos(vector);
  8233. }
  8234. if (maidArray[10] && maidArray[10].Visible)
  8235. {
  8236. vector.x = -3f;
  8237. maidArray[10].SetPos(vector);
  8238. }
  8239. if (maidArray[11] && maidArray[11].Visible)
  8240. {
  8241. vector.x = 3.6f;
  8242. maidArray[11].SetPos(vector);
  8243. }
  8244. if (maidArray[12] && maidArray[12].Visible)
  8245. {
  8246. vector.x = -3.6f;
  8247. maidArray[12].SetPos(vector);
  8248. }
  8249. if (maidArray[13] && maidArray[13].Visible)
  8250. {
  8251. vector.x = 4.2f;
  8252. maidArray[13].SetPos(vector);
  8253. }
  8254. }
  8255. }
  8256. poseIndex[i]++;
  8257. if (poseIndex[i] == poseArray.Length)
  8258. {
  8259. poseIndex[i] = 0;
  8260. }
  8261. if (maidArray[i] && maidArray[i].Visible)
  8262. {
  8263. string[] array = poseArray[poseIndex[i]].Split(new char[]
  8264. {
  8265. ','
  8266. });
  8267. isStop[i] = false;
  8268. poseCount[i] = 20;
  8269. Maid maid = maidArray[i];
  8270. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8271. {
  8272. maid.body0.MuneYureL(0f);
  8273. maid.body0.MuneYureR(0f);
  8274. }
  8275. else
  8276. {
  8277. maid.body0.MuneYureL(1f);
  8278. maid.body0.MuneYureR(1f);
  8279. }
  8280. int num6;
  8281. if (array[0].Contains("MultipleMaidsPose"))
  8282. {
  8283. string path = array[0].Split(new char[]
  8284. {
  8285. '/'
  8286. })[1];
  8287. byte[] array2 = new byte[0];
  8288. try
  8289. {
  8290. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8291. {
  8292. array2 = new byte[fileStream.Length];
  8293. fileStream.Read(array2, 0, array2.Length);
  8294. }
  8295. }
  8296. catch
  8297. {
  8298. }
  8299. if (0 < array2.Length)
  8300. {
  8301. string text = Path.GetFileName(path);
  8302. long num5 = (long)text.GetHashCode();
  8303. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8304. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8305. {
  8306. Maid.AutoTwist.ShoulderL,
  8307. Maid.AutoTwist.ShoulderR,
  8308. Maid.AutoTwist.WristL,
  8309. Maid.AutoTwist.WristR,
  8310. Maid.AutoTwist.ThighL,
  8311. Maid.AutoTwist.ThighR
  8312. };
  8313. for (int m = 0; m < array3.Length; m++)
  8314. {
  8315. maid.SetAutoTwist(array3[m], true);
  8316. }
  8317. }
  8318. }
  8319. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8320. {
  8321. loadPose[i] = array[0];
  8322. }
  8323. else if (!array[0].StartsWith("dance_"))
  8324. {
  8325. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8326. }
  8327. else
  8328. {
  8329. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8330. {
  8331. maidArray[i].body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  8332. }
  8333. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8334. }
  8335. if (array.Length > 1)
  8336. {
  8337. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8338. isStop[i] = true;
  8339. if (array.Length > 2)
  8340. {
  8341. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8342. isPoseIti[i] = true;
  8343. poseIti[i] = maidArray[i].transform.position;
  8344. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8345. }
  8346. }
  8347. }
  8348. }
  8349. }
  8350. }
  8351. if (isDanceChu)
  8352. {
  8353. int j = 0;
  8354. while (j < maidCnt)
  8355. {
  8356. if (maidArray[j] && maidArray[j].Visible)
  8357. {
  8358. string text2 = danceName[j];
  8359. float num = 0f;
  8360. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm" || text2 == "dance_cm3d_004_kano_f1.anm")
  8361. {
  8362. num = 0.166666f;
  8363. }
  8364. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8365. {
  8366. num = -0.35f;
  8367. }
  8368. if (text2 != null)
  8369. {
  8370. if (danceCount > 0)
  8371. {
  8372. danceCount--;
  8373. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8374. }
  8375. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8376. {
  8377. danceCount = 20;
  8378. }
  8379. }
  8380. }
  8381. IL_1C205:
  8382. j++;
  8383. continue;
  8384. goto IL_1C205;
  8385. }
  8386. }
  8387. if (isDanceStart1)
  8388. {
  8389. for (int j = 0; j < maidCnt; j++)
  8390. {
  8391. if (maidArray[j] && maidArray[j].Visible)
  8392. {
  8393. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8394. if (!isShift)
  8395. {
  8396. if (j == 0)
  8397. {
  8398. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8399. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8400. danceName[j] = "dance_cm3d2_001_f1.anm";
  8401. }
  8402. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8403. {
  8404. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8406. danceName[j] = "dance_cm3d2_001_f2.anm";
  8407. }
  8408. else
  8409. {
  8410. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8411. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8412. danceName[j] = "dance_cm3d2_001_f3.anm";
  8413. }
  8414. }
  8415. else
  8416. {
  8417. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8418. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8419. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8420. }
  8421. }
  8422. }
  8423. isDanceStart1 = false;
  8424. isDanceStart1F = true;
  8425. isShift = false;
  8426. }
  8427. if (isDanceStart2)
  8428. {
  8429. for (int j = 0; j < maidCnt; j++)
  8430. {
  8431. if (maidArray[j] && maidArray[j].Visible)
  8432. {
  8433. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8434. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8435. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8436. danceName[j] = "dance_cm3d_001_f1.anm";
  8437. }
  8438. }
  8439. isDanceStart2 = false;
  8440. isDanceStart2F = true;
  8441. }
  8442. if (isDanceStart3)
  8443. {
  8444. for (int j = 0; j < maidCnt; j++)
  8445. {
  8446. if (maidArray[j] && maidArray[j].Visible)
  8447. {
  8448. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8449. if (!isShift)
  8450. {
  8451. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8453. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8454. }
  8455. else
  8456. {
  8457. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8458. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8459. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8460. }
  8461. }
  8462. }
  8463. isDanceStart3 = false;
  8464. isDanceStart3F = true;
  8465. isShift = false;
  8466. }
  8467. if (isDanceStart4)
  8468. {
  8469. for (int j = 0; j < maidCnt; j++)
  8470. {
  8471. if (maidArray[j] && maidArray[j].Visible)
  8472. {
  8473. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8474. if (!isShift)
  8475. {
  8476. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8478. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8479. }
  8480. else
  8481. {
  8482. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8483. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8484. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8485. }
  8486. }
  8487. }
  8488. isDanceStart4 = false;
  8489. isDanceStart4F = true;
  8490. isShift = false;
  8491. }
  8492. if (isDanceStart5)
  8493. {
  8494. for (int j = 0; j < maidCnt; j++)
  8495. {
  8496. if (maidArray[j] && maidArray[j].Visible)
  8497. {
  8498. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8499. if (!isShift)
  8500. {
  8501. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8503. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8504. }
  8505. else
  8506. {
  8507. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8508. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8509. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8510. }
  8511. }
  8512. }
  8513. isDanceStart5 = false;
  8514. isDanceStart5F = true;
  8515. isShift = false;
  8516. }
  8517. if (isDanceStart6)
  8518. {
  8519. for (int j = 0; j < maidCnt; j++)
  8520. {
  8521. if (maidArray[j] && maidArray[j].Visible)
  8522. {
  8523. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8524. if (!isShift)
  8525. {
  8526. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8528. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8529. }
  8530. else
  8531. {
  8532. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8533. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8534. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8535. }
  8536. }
  8537. }
  8538. isDanceStart6 = false;
  8539. isDanceStart6F = true;
  8540. isShift = false;
  8541. }
  8542. if (isDanceStart7)
  8543. {
  8544. for (int j = 0; j < maidCnt; j++)
  8545. {
  8546. if (maidArray[j] && maidArray[j].Visible)
  8547. {
  8548. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8549. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8550. {
  8551. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8552. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8553. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8554. }
  8555. else
  8556. {
  8557. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8558. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8559. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8560. }
  8561. }
  8562. }
  8563. isDanceStart7 = false;
  8564. isDanceStart7V = true;
  8565. isDanceStart7F = true;
  8566. }
  8567. if (isDanceStart8)
  8568. {
  8569. for (int j = 0; j < maidCnt; j++)
  8570. {
  8571. if (maidArray[j] && maidArray[j].Visible)
  8572. {
  8573. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8574. if (j == 0 || j == 4 || j == 8 || j == 12)
  8575. {
  8576. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8577. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8578. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8579. }
  8580. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8581. {
  8582. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8584. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8585. }
  8586. else if (j == 2 || j == 6 || j == 10)
  8587. {
  8588. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8589. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8590. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8591. }
  8592. else
  8593. {
  8594. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8595. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8596. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8597. }
  8598. }
  8599. }
  8600. isDanceStart8 = false;
  8601. isDanceStart8V = true;
  8602. isDanceStart8F = true;
  8603. }
  8604. if (isDanceStart9)
  8605. {
  8606. isDanceStart9Count++;
  8607. if (isShift)
  8608. {
  8609. for (int j = 0; j < maidCnt; j++)
  8610. {
  8611. if (maidArray[j] && maidArray[j].Visible)
  8612. {
  8613. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8614. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8615. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8616. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8617. }
  8618. }
  8619. isDanceStart9 = false;
  8620. isDanceStart9F = true;
  8621. isDanceStart9Count = 0;
  8622. isShift = false;
  8623. }
  8624. if (isDanceStart9Count == 10)
  8625. {
  8626. for (int j = 0; j < maidCnt; j++)
  8627. {
  8628. if (maidArray[j] && maidArray[j].Visible)
  8629. {
  8630. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8631. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8632. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8633. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8634. }
  8635. }
  8636. isDanceStart9 = false;
  8637. isDanceStart9F = true;
  8638. isDanceStart9Count = 0;
  8639. }
  8640. }
  8641. if (isDanceStart10)
  8642. {
  8643. for (int j = 0; j < maidCnt; j++)
  8644. {
  8645. if (maidArray[j] && maidArray[j].Visible)
  8646. {
  8647. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8648. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8649. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8650. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8651. }
  8652. }
  8653. isDanceStart10 = false;
  8654. isDanceStart10F = true;
  8655. }
  8656. if (isDanceStart11)
  8657. {
  8658. for (int j = 0; j < maidCnt; j++)
  8659. {
  8660. if (maidArray[j] && maidArray[j].Visible)
  8661. {
  8662. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8663. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8664. {
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8666. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8667. danceName[j] = nameA + danceNo2 + ".anm";
  8668. }
  8669. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8670. {
  8671. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8672. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8673. danceName[j] = nameA + danceNo3 + ".anm";
  8674. }
  8675. else
  8676. {
  8677. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8678. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8679. danceName[j] = nameA + danceNo1 + ".anm";
  8680. }
  8681. }
  8682. }
  8683. isDanceStart11 = false;
  8684. isDanceStart11V = true;
  8685. isDanceStart11F = true;
  8686. }
  8687. if (isDanceStart12)
  8688. {
  8689. for (int j = 0; j < maidCnt; j++)
  8690. {
  8691. if (maidArray[j] && maidArray[j].Visible)
  8692. {
  8693. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8694. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8695. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8696. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8697. }
  8698. }
  8699. isDanceStart12 = false;
  8700. isDanceStart12F = true;
  8701. }
  8702. if (isDanceStart13)
  8703. {
  8704. for (int j = 0; j < maidCnt; j++)
  8705. {
  8706. if (maidArray[j] && maidArray[j].Visible)
  8707. {
  8708. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8709. if (!isShift)
  8710. {
  8711. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8712. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8713. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8714. }
  8715. else
  8716. {
  8717. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8718. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8719. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8720. }
  8721. }
  8722. }
  8723. isDanceStart13 = false;
  8724. isDanceStart13F = true;
  8725. isShift = false;
  8726. }
  8727. if (isDanceStart14)
  8728. {
  8729. for (int j = 0; j < maidCnt; j++)
  8730. {
  8731. if (maidArray[j] && maidArray[j].Visible)
  8732. {
  8733. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8734. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8735. {
  8736. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8737. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8738. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8739. }
  8740. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8741. {
  8742. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8743. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8744. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8745. }
  8746. else
  8747. {
  8748. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8749. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8750. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8751. }
  8752. }
  8753. }
  8754. isDanceStart14 = false;
  8755. isDanceStart14V = true;
  8756. isDanceStart14F = true;
  8757. }
  8758. if (isDanceStart15)
  8759. {
  8760. isDanceStart15Count++;
  8761. }
  8762. if (isDanceStart15Count == 10)
  8763. {
  8764. for (int j = 0; j < maidCnt; j++)
  8765. {
  8766. if (maidArray[j] && maidArray[j].Visible)
  8767. {
  8768. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8769. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8770. {
  8771. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8772. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8773. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8774. }
  8775. else
  8776. {
  8777. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8778. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8779. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8780. }
  8781. }
  8782. }
  8783. isDanceStart15 = false;
  8784. isDanceStart15V = true;
  8785. isDanceStart15F = true;
  8786. isDanceStart15Count = 0;
  8787. }
  8788. if (isDance)
  8789. {
  8790. for (int j = 0; j < maidCnt; j++)
  8791. {
  8792. if (maidArray[j].Visible)
  8793. {
  8794. if (isDanceStart1F)
  8795. {
  8796. if (isDanceStart1K)
  8797. {
  8798. foreach (string text3 in dance1KArray)
  8799. {
  8800. string[] array = text3.Split(new char[]
  8801. {
  8802. ','
  8803. });
  8804. float num10 = float.Parse(array[0]);
  8805. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8806. {
  8807. danceFace[j] = num10;
  8808. FaceName[j] = FaceName2[j];
  8809. FaceName2[j] = array[1];
  8810. FaceName3[j] = array[2];
  8811. FaceTime[j] = 0.0166666675f;
  8812. break;
  8813. }
  8814. }
  8815. }
  8816. else if (j == 0)
  8817. {
  8818. foreach (string text3 in dance1Array)
  8819. {
  8820. string[] array = text3.Split(new char[]
  8821. {
  8822. ','
  8823. });
  8824. float num10 = float.Parse(array[0]);
  8825. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8826. {
  8827. danceFace[j] = num10;
  8828. FaceName[j] = FaceName2[j];
  8829. FaceName2[j] = array[1];
  8830. FaceName3[j] = array[2];
  8831. FaceTime[j] = 0.0166666675f;
  8832. break;
  8833. }
  8834. }
  8835. }
  8836. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8837. {
  8838. foreach (string text3 in dance1BArray)
  8839. {
  8840. string[] array = text3.Split(new char[]
  8841. {
  8842. ','
  8843. });
  8844. float num10 = float.Parse(array[0]);
  8845. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8846. {
  8847. danceFace[j] = num10;
  8848. FaceName[j] = FaceName2[j];
  8849. FaceName2[j] = array[1];
  8850. FaceName3[j] = array[2];
  8851. FaceTime[j] = 0.0166666675f;
  8852. break;
  8853. }
  8854. }
  8855. }
  8856. else
  8857. {
  8858. foreach (string text3 in dance1CArray)
  8859. {
  8860. string[] array = text3.Split(new char[]
  8861. {
  8862. ','
  8863. });
  8864. float num10 = float.Parse(array[0]);
  8865. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8866. {
  8867. danceFace[j] = num10;
  8868. FaceName[j] = FaceName2[j];
  8869. FaceName2[j] = array[1];
  8870. FaceName3[j] = array[2];
  8871. FaceTime[j] = 0.0166666675f;
  8872. break;
  8873. }
  8874. }
  8875. }
  8876. }
  8877. if (isDanceStart2F)
  8878. {
  8879. foreach (string text3 in dance2Array)
  8880. {
  8881. string[] array = text3.Split(new char[]
  8882. {
  8883. ','
  8884. });
  8885. float num10 = float.Parse(array[0]);
  8886. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8887. {
  8888. danceFace[j] = num10;
  8889. FaceName[j] = FaceName2[j];
  8890. FaceName2[j] = array[1];
  8891. FaceName3[j] = array[2];
  8892. FaceTime[j] = 0.0166666675f;
  8893. break;
  8894. }
  8895. }
  8896. }
  8897. if (isDanceStart3F)
  8898. {
  8899. if (isDanceStart3K)
  8900. {
  8901. foreach (string text3 in dance3KArray)
  8902. {
  8903. string[] array = text3.Split(new char[]
  8904. {
  8905. ','
  8906. });
  8907. float num10 = float.Parse(array[0]);
  8908. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8909. {
  8910. danceFace[j] = num10;
  8911. FaceName[j] = FaceName2[j];
  8912. FaceName2[j] = array[1];
  8913. FaceName3[j] = array[2];
  8914. FaceTime[j] = 0.0166666675f;
  8915. break;
  8916. }
  8917. }
  8918. }
  8919. else
  8920. {
  8921. foreach (string text3 in dance3Array)
  8922. {
  8923. string[] array = text3.Split(new char[]
  8924. {
  8925. ','
  8926. });
  8927. float num10 = float.Parse(array[0]);
  8928. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8929. {
  8930. danceFace[j] = num10;
  8931. FaceName[j] = FaceName2[j];
  8932. FaceName2[j] = array[1];
  8933. FaceName3[j] = array[2];
  8934. FaceTime[j] = 0.0166666675f;
  8935. break;
  8936. }
  8937. }
  8938. }
  8939. }
  8940. if (isDanceStart4F)
  8941. {
  8942. if (isDanceStart4K)
  8943. {
  8944. foreach (string text3 in dance4KArray)
  8945. {
  8946. string[] array = text3.Split(new char[]
  8947. {
  8948. ','
  8949. });
  8950. float num10 = float.Parse(array[0]);
  8951. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8952. {
  8953. danceFace[j] = num10;
  8954. FaceName[j] = FaceName2[j];
  8955. FaceName2[j] = array[1];
  8956. FaceName3[j] = array[2];
  8957. FaceTime[j] = 0.0166666675f;
  8958. break;
  8959. }
  8960. }
  8961. }
  8962. else
  8963. {
  8964. foreach (string text3 in dance4Array)
  8965. {
  8966. string[] array = text3.Split(new char[]
  8967. {
  8968. ','
  8969. });
  8970. float num10 = float.Parse(array[0]);
  8971. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8972. {
  8973. danceFace[j] = num10;
  8974. FaceName[j] = FaceName2[j];
  8975. FaceName2[j] = array[1];
  8976. FaceName3[j] = array[2];
  8977. FaceTime[j] = 0.0166666675f;
  8978. break;
  8979. }
  8980. }
  8981. }
  8982. }
  8983. if (isDanceStart5F)
  8984. {
  8985. if (isDanceStart5K)
  8986. {
  8987. foreach (string text3 in dance5KArray)
  8988. {
  8989. string[] array = text3.Split(new char[]
  8990. {
  8991. ','
  8992. });
  8993. float num10 = float.Parse(array[0]);
  8994. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8995. {
  8996. danceFace[j] = num10;
  8997. FaceName[j] = FaceName2[j];
  8998. FaceName2[j] = array[1];
  8999. FaceName3[j] = array[2];
  9000. FaceTime[j] = 0.0166666675f;
  9001. break;
  9002. }
  9003. }
  9004. }
  9005. else
  9006. {
  9007. foreach (string text3 in dance5Array)
  9008. {
  9009. string[] array = text3.Split(new char[]
  9010. {
  9011. ','
  9012. });
  9013. float num10 = float.Parse(array[0]);
  9014. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9015. {
  9016. danceFace[j] = num10;
  9017. FaceName[j] = FaceName2[j];
  9018. FaceName2[j] = array[1];
  9019. FaceName3[j] = array[2];
  9020. FaceTime[j] = 0.0166666675f;
  9021. break;
  9022. }
  9023. }
  9024. }
  9025. }
  9026. if (isDanceStart6F)
  9027. {
  9028. if (isDanceStart6K)
  9029. {
  9030. foreach (string text3 in dance6KArray)
  9031. {
  9032. string[] array = text3.Split(new char[]
  9033. {
  9034. ','
  9035. });
  9036. float num10 = float.Parse(array[0]);
  9037. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9038. {
  9039. danceFace[j] = num10;
  9040. FaceName[j] = FaceName2[j];
  9041. FaceName2[j] = array[1];
  9042. FaceName3[j] = array[2];
  9043. FaceTime[j] = 0.0166666675f;
  9044. break;
  9045. }
  9046. }
  9047. }
  9048. else
  9049. {
  9050. foreach (string text3 in dance6Array)
  9051. {
  9052. string[] array = text3.Split(new char[]
  9053. {
  9054. ','
  9055. });
  9056. float num10 = float.Parse(array[0]);
  9057. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9058. {
  9059. danceFace[j] = num10;
  9060. FaceName[j] = FaceName2[j];
  9061. FaceName2[j] = array[1];
  9062. FaceName3[j] = array[2];
  9063. FaceTime[j] = 0.0166666675f;
  9064. break;
  9065. }
  9066. }
  9067. }
  9068. }
  9069. if (isDanceStart7F)
  9070. {
  9071. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9072. {
  9073. foreach (string text3 in dance6BArray)
  9074. {
  9075. string[] array = text3.Split(new char[]
  9076. {
  9077. ','
  9078. });
  9079. float num10 = float.Parse(array[0]);
  9080. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9081. {
  9082. danceFace[j] = num10;
  9083. FaceName[j] = FaceName2[j];
  9084. FaceName2[j] = array[1];
  9085. FaceName3[j] = array[2];
  9086. FaceTime[j] = 0.0166666675f;
  9087. break;
  9088. }
  9089. }
  9090. }
  9091. else
  9092. {
  9093. foreach (string text3 in dance6Array)
  9094. {
  9095. string[] array = text3.Split(new char[]
  9096. {
  9097. ','
  9098. });
  9099. float num10 = float.Parse(array[0]);
  9100. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9101. {
  9102. danceFace[j] = num10;
  9103. FaceName[j] = FaceName2[j];
  9104. FaceName2[j] = array[1];
  9105. FaceName3[j] = array[2];
  9106. FaceTime[j] = 0.0166666675f;
  9107. break;
  9108. }
  9109. }
  9110. }
  9111. }
  9112. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9113. {
  9114. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9115. {
  9116. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9117. }
  9118. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9119. {
  9120. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x, 100f, maidArray[j - 1].transform.position.z));
  9121. }
  9122. }
  9123. if (isDanceStart8F)
  9124. {
  9125. if (j == 1 || j == 5 || j == 9 || j == 13)
  9126. {
  9127. foreach (string text3 in dance6BArray)
  9128. {
  9129. string[] array = text3.Split(new char[]
  9130. {
  9131. ','
  9132. });
  9133. float num10 = float.Parse(array[0]);
  9134. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9135. {
  9136. danceFace[j] = num10;
  9137. FaceName[j] = FaceName2[j];
  9138. FaceName2[j] = array[1];
  9139. FaceName3[j] = array[2];
  9140. FaceTime[j] = 0.0166666675f;
  9141. break;
  9142. }
  9143. }
  9144. }
  9145. else if (j == 2 || j == 6 || j == 10)
  9146. {
  9147. foreach (string text3 in dance6CArray)
  9148. {
  9149. string[] array = text3.Split(new char[]
  9150. {
  9151. ','
  9152. });
  9153. float num10 = float.Parse(array[0]);
  9154. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9155. {
  9156. danceFace[j] = num10;
  9157. FaceName[j] = FaceName2[j];
  9158. FaceName2[j] = array[1];
  9159. FaceName3[j] = array[2];
  9160. FaceTime[j] = 0.0166666675f;
  9161. break;
  9162. }
  9163. }
  9164. }
  9165. else if (j == 3 || j == 9 || j == 11)
  9166. {
  9167. foreach (string text3 in dance6DArray)
  9168. {
  9169. string[] array = text3.Split(new char[]
  9170. {
  9171. ','
  9172. });
  9173. float num10 = float.Parse(array[0]);
  9174. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9175. {
  9176. danceFace[j] = num10;
  9177. FaceName[j] = FaceName2[j];
  9178. FaceName2[j] = array[1];
  9179. FaceName3[j] = array[2];
  9180. FaceTime[j] = 0.0166666675f;
  9181. break;
  9182. }
  9183. }
  9184. }
  9185. else
  9186. {
  9187. foreach (string text3 in dance6Array)
  9188. {
  9189. string[] array = text3.Split(new char[]
  9190. {
  9191. ','
  9192. });
  9193. float num10 = float.Parse(array[0]);
  9194. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9195. {
  9196. danceFace[j] = num10;
  9197. FaceName[j] = FaceName2[j];
  9198. FaceName2[j] = array[1];
  9199. FaceName3[j] = array[2];
  9200. FaceTime[j] = 0.0166666675f;
  9201. break;
  9202. }
  9203. }
  9204. }
  9205. }
  9206. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9207. {
  9208. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9209. {
  9210. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9211. }
  9212. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9213. {
  9214. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x, 100f, maidArray[j - 1].transform.position.z));
  9215. }
  9216. }
  9217. if (isDanceStart8V)
  9218. {
  9219. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9220. {
  9221. isDanceStart8P = true;
  9222. for (int num11 = 0; num11 < maidCnt; num11++)
  9223. {
  9224. if (maidArray[num11].Visible)
  9225. {
  9226. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9227. {
  9228. UnityEngine.Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9229. GameObject gameObject6 = UnityEngine.Object.Instantiate(@object) as GameObject;
  9230. gameObject6.transform.position = CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true).position;
  9231. }
  9232. }
  9233. }
  9234. }
  9235. }
  9236. if (isDanceStart9F)
  9237. {
  9238. if (isDanceStart9K)
  9239. {
  9240. foreach (string text3 in dance9KArray)
  9241. {
  9242. string[] array = text3.Split(new char[]
  9243. {
  9244. ','
  9245. });
  9246. float num10 = float.Parse(array[0]);
  9247. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9248. {
  9249. danceFace[j] = num10;
  9250. FaceName[j] = FaceName2[j];
  9251. FaceName2[j] = array[1];
  9252. FaceName3[j] = array[2];
  9253. FaceTime[j] = 0.0166666675f;
  9254. break;
  9255. }
  9256. }
  9257. }
  9258. else
  9259. {
  9260. foreach (string text3 in dance7Array)
  9261. {
  9262. string[] array = text3.Split(new char[]
  9263. {
  9264. ','
  9265. });
  9266. float num10 = float.Parse(array[0]);
  9267. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9268. {
  9269. danceFace[j] = num10;
  9270. FaceName[j] = FaceName2[j];
  9271. FaceName2[j] = array[1];
  9272. FaceName3[j] = array[2];
  9273. FaceTime[j] = 0.0166666675f;
  9274. break;
  9275. }
  9276. }
  9277. }
  9278. }
  9279. if (isDanceStart10F)
  9280. {
  9281. foreach (string text3 in danceO1Array)
  9282. {
  9283. string[] array = text3.Split(new char[]
  9284. {
  9285. ','
  9286. });
  9287. float num10 = float.Parse(array[0]);
  9288. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9289. {
  9290. danceFace[j] = num10;
  9291. FaceName[j] = FaceName2[j];
  9292. FaceName2[j] = array[1];
  9293. FaceName3[j] = array[2];
  9294. FaceTime[j] = 0.0166666675f;
  9295. break;
  9296. }
  9297. }
  9298. }
  9299. if (isDanceStart11F)
  9300. {
  9301. string[] array14 = null;
  9302. string[] array12 = null;
  9303. string[] array15 = null;
  9304. if (isSS1)
  9305. {
  9306. array14 = danceO1Array;
  9307. array12 = danceO1CArray;
  9308. array15 = danceO1BArray;
  9309. }
  9310. if (isSS2)
  9311. {
  9312. array14 = danceO2Array;
  9313. array12 = danceO2BArray;
  9314. array15 = danceO2CArray;
  9315. }
  9316. if (isSS3)
  9317. {
  9318. array14 = danceO3CArray;
  9319. array12 = danceO3Array;
  9320. array15 = danceO3BArray;
  9321. }
  9322. if (isSS4)
  9323. {
  9324. array14 = danceO5BArray;
  9325. array12 = danceO5Array;
  9326. array15 = danceO5CArray;
  9327. }
  9328. if (isSS5)
  9329. {
  9330. array14 = danceO4Array;
  9331. array12 = danceO4BArray;
  9332. array15 = danceO4CArray;
  9333. }
  9334. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9335. {
  9336. foreach (string text3 in array12)
  9337. {
  9338. string[] array = text3.Split(new char[]
  9339. {
  9340. ','
  9341. });
  9342. float num10 = float.Parse(array[0]) - 0.03f;
  9343. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9344. {
  9345. danceFace[j] = num10;
  9346. FaceName[j] = FaceName2[j];
  9347. FaceName2[j] = array[1];
  9348. FaceName3[j] = array[2];
  9349. FaceTime[j] = 0.0166666675f;
  9350. break;
  9351. }
  9352. }
  9353. }
  9354. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9355. {
  9356. foreach (string text3 in array15)
  9357. {
  9358. string[] array = text3.Split(new char[]
  9359. {
  9360. ','
  9361. });
  9362. float num10 = float.Parse(array[0]) - 0.03f;
  9363. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9364. {
  9365. danceFace[j] = num10;
  9366. FaceName[j] = FaceName2[j];
  9367. FaceName2[j] = array[1];
  9368. FaceName3[j] = array[2];
  9369. FaceTime[j] = 0.0166666675f;
  9370. break;
  9371. }
  9372. }
  9373. }
  9374. else
  9375. {
  9376. foreach (string text3 in array14)
  9377. {
  9378. string[] array = text3.Split(new char[]
  9379. {
  9380. ','
  9381. });
  9382. float num10 = float.Parse(array[0]) - 0.03f;
  9383. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9384. {
  9385. danceFace[j] = num10;
  9386. FaceName[j] = FaceName2[j];
  9387. FaceName2[j] = array[1];
  9388. FaceName3[j] = array[2];
  9389. FaceTime[j] = 0.0166666675f;
  9390. break;
  9391. }
  9392. }
  9393. }
  9394. }
  9395. if (isDanceStart12F)
  9396. {
  9397. foreach (string text3 in dance12Array)
  9398. {
  9399. string[] array = text3.Split(new char[]
  9400. {
  9401. ','
  9402. });
  9403. float num10 = float.Parse(array[0]);
  9404. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9405. {
  9406. danceFace[j] = num10;
  9407. FaceName[j] = FaceName2[j];
  9408. FaceName2[j] = array[1];
  9409. FaceName3[j] = array[2];
  9410. FaceTime[j] = 0.0166666675f;
  9411. break;
  9412. }
  9413. }
  9414. }
  9415. if (isDanceStart13F)
  9416. {
  9417. if (!isDanceStart13K)
  9418. {
  9419. foreach (string text3 in dance13Array)
  9420. {
  9421. string[] array = text3.Split(new char[]
  9422. {
  9423. ','
  9424. });
  9425. float num10 = float.Parse(array[0]);
  9426. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9427. {
  9428. danceFace[j] = num10;
  9429. FaceName[j] = FaceName2[j];
  9430. FaceName2[j] = array[1];
  9431. FaceName3[j] = array[2];
  9432. FaceTime[j] = 0.0166666675f;
  9433. break;
  9434. }
  9435. }
  9436. }
  9437. }
  9438. if (isDanceStart14F)
  9439. {
  9440. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9441. {
  9442. foreach (string text3 in dance13BArray)
  9443. {
  9444. string[] array = text3.Split(new char[]
  9445. {
  9446. ','
  9447. });
  9448. float num10 = float.Parse(array[0]);
  9449. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9450. {
  9451. danceFace[j] = num10;
  9452. FaceName[j] = FaceName2[j];
  9453. FaceName2[j] = array[1];
  9454. FaceName3[j] = array[2];
  9455. FaceTime[j] = 0.0166666675f;
  9456. break;
  9457. }
  9458. }
  9459. }
  9460. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9461. {
  9462. foreach (string text3 in dance13CArray)
  9463. {
  9464. string[] array = text3.Split(new char[]
  9465. {
  9466. ','
  9467. });
  9468. float num10 = float.Parse(array[0]);
  9469. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9470. {
  9471. danceFace[j] = num10;
  9472. FaceName[j] = FaceName2[j];
  9473. FaceName2[j] = array[1];
  9474. FaceName3[j] = array[2];
  9475. FaceTime[j] = 0.0166666675f;
  9476. break;
  9477. }
  9478. }
  9479. }
  9480. else
  9481. {
  9482. foreach (string text3 in dance13Array)
  9483. {
  9484. string[] array = text3.Split(new char[]
  9485. {
  9486. ','
  9487. });
  9488. float num10 = float.Parse(array[0]);
  9489. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9490. {
  9491. danceFace[j] = num10;
  9492. FaceName[j] = FaceName2[j];
  9493. FaceName2[j] = array[1];
  9494. FaceName3[j] = array[2];
  9495. FaceTime[j] = 0.0166666675f;
  9496. break;
  9497. }
  9498. }
  9499. }
  9500. }
  9501. if (isDanceStart15F)
  9502. {
  9503. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9504. {
  9505. foreach (string text3 in dance15BArray)
  9506. {
  9507. string[] array = text3.Split(new char[]
  9508. {
  9509. ','
  9510. });
  9511. float num10 = float.Parse(array[0]);
  9512. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9513. {
  9514. danceFace[j] = num10;
  9515. FaceName[j] = FaceName2[j];
  9516. FaceName2[j] = array[1];
  9517. FaceName3[j] = array[2];
  9518. FaceTime[j] = 0.0166666675f;
  9519. break;
  9520. }
  9521. }
  9522. }
  9523. else
  9524. {
  9525. foreach (string text3 in dance15Array)
  9526. {
  9527. string[] array = text3.Split(new char[]
  9528. {
  9529. ','
  9530. });
  9531. float num10 = float.Parse(array[0]);
  9532. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9533. {
  9534. danceFace[j] = num10;
  9535. FaceName[j] = FaceName2[j];
  9536. FaceName2[j] = array[1];
  9537. FaceName3[j] = array[2];
  9538. FaceTime[j] = 0.0166666675f;
  9539. break;
  9540. }
  9541. }
  9542. }
  9543. }
  9544. if (!isFadeOut)
  9545. {
  9546. Maid maid = maidArray[j];
  9547. if (maid && maid.Visible)
  9548. {
  9549. if (maid.transform.position.y != 100f)
  9550. {
  9551. FaceTime[j] += Time.deltaTime;
  9552. if (FaceTime[j] < 1f)
  9553. {
  9554. TMorph morph = maid.body0.Face.morph;
  9555. maid.boMabataki = false;
  9556. maid.body0.Face.morph.EyeMabataki = 0f;
  9557. if (FaceName[j] != string.Empty)
  9558. {
  9559. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9560. }
  9561. if (FaceName2[j] != "")
  9562. {
  9563. maid.body0.Face.morph.MulBlendValues(FaceName2[j], UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9564. }
  9565. if (FaceName3[j] != string.Empty)
  9566. {
  9567. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9568. }
  9569. maid.body0.Face.morph.FixBlendValues_Face();
  9570. }
  9571. else
  9572. {
  9573. FaceName[j] = FaceName2[j];
  9574. }
  9575. if (isHenkou)
  9576. {
  9577. TMorph morph = maid.body0.Face.morph;
  9578. float[] fieldValue = MultipleMaids.GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9579. maid.boMabataki = false;
  9580. if (isNamidaH)
  9581. {
  9582. fieldValue[(int)morph.hash["namida"]] = 1f;
  9583. }
  9584. else
  9585. {
  9586. fieldValue[(int)morph.hash["namida"]] = 0f;
  9587. }
  9588. if (isSekimenH)
  9589. {
  9590. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9591. }
  9592. else
  9593. {
  9594. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9595. }
  9596. if (isHohoH)
  9597. {
  9598. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9599. }
  9600. else
  9601. {
  9602. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9603. }
  9604. maid.body0.Face.morph.FixBlendValues_Face();
  9605. }
  9606. }
  9607. }
  9608. }
  9609. this.FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9610. }
  9611. }
  9612. if (Input.GetKey(KeyCode.H) || isVR)
  9613. {
  9614. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9615. {
  9616. h2Flg = true;
  9617. isNamidaH = !isNamidaH;
  9618. isHenkou = true;
  9619. }
  9620. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9621. {
  9622. h2Flg = true;
  9623. isSekimenH = !isSekimenH;
  9624. isHenkou = true;
  9625. }
  9626. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9627. {
  9628. h2Flg = true;
  9629. isHohoH = !isHohoH;
  9630. isHenkou = true;
  9631. }
  9632. }
  9633. danceCheckIndex++;
  9634. if (danceCheckIndex == 10)
  9635. {
  9636. danceCheckIndex = 0;
  9637. }
  9638. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9639. isDanceChu = false;
  9640. for (int k = 0; k < danceCheck.Length; k++)
  9641. {
  9642. if (danceCheck[k] > 0f)
  9643. {
  9644. isDanceChu = true;
  9645. break;
  9646. }
  9647. }
  9648. if (!isDanceChu)
  9649. {
  9650. danceWait--;
  9651. if (danceWait > 0)
  9652. {
  9653. isDanceChu = true;
  9654. }
  9655. }
  9656. if (!isDanceChu)
  9657. {
  9658. for (int j = 0; j < maidCnt; j++)
  9659. {
  9660. if (maidArray[j] && maidArray[j].Visible)
  9661. {
  9662. maidArray[j].StopKuchipakuPattern();
  9663. if (isDanceStart7V)
  9664. {
  9665. maidArray[j].SetPos(dancePos[j]);
  9666. maidArray[j].body0.transform.localRotation = danceRot[j];
  9667. }
  9668. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9669. {
  9670. maidArray[j].SetPos(dancePos[j]);
  9671. maidArray[j].body0.transform.localRotation = danceRot[j];
  9672. }
  9673. if (isDanceStart11V)
  9674. {
  9675. maidArray[j].SetPos(dancePos[j]);
  9676. maidArray[j].body0.transform.localRotation = danceRot[j];
  9677. }
  9678. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  9679. {
  9680. maidArray[j].SetPos(dancePos[j]);
  9681. maidArray[j].body0.transform.localRotation = danceRot[j];
  9682. int i = j;
  9683. if (!isVR)
  9684. {
  9685. delCount[i] = 20;
  9686. if (goSlot[(int)selectList[i]] != null)
  9687. {
  9688. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9689. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9690. {
  9691. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9692. }
  9693. }
  9694. }
  9695. Maid maid = maidArray[j];
  9696. maid.DelProp(MPN.handitem, true);
  9697. maid.DelProp(MPN.accvag, true);
  9698. maid.DelProp(MPN.accanl, true);
  9699. maid.DelProp(MPN.kousoku_upper, true);
  9700. maid.DelProp(MPN.kousoku_lower, true);
  9701. maid.AllProcPropSeqStart();
  9702. isStop[i] = true;
  9703. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9704. isPoseIti[i] = true;
  9705. poseIti[i] = maidArray[i].transform.position;
  9706. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9707. }
  9708. if (isDanceStart14V)
  9709. {
  9710. maidArray[j].SetPos(dancePos[j]);
  9711. maidArray[j].body0.transform.localRotation = danceRot[j];
  9712. }
  9713. if (isDanceStart15V)
  9714. {
  9715. maidArray[j].SetPos(dancePos[j]);
  9716. maidArray[j].body0.transform.localRotation = danceRot[j];
  9717. }
  9718. }
  9719. }
  9720. isDanceStart1F = false;
  9721. isDanceStart1K = false;
  9722. isDanceStart2F = false;
  9723. isDanceStart3F = false;
  9724. isDanceStart3K = false;
  9725. isDanceStart4F = false;
  9726. isDanceStart4K = false;
  9727. isDanceStart5F = false;
  9728. isDanceStart5K = false;
  9729. isDanceStart6F = false;
  9730. isDanceStart6K = false;
  9731. isDanceStart7F = false;
  9732. isDanceStart7V = false;
  9733. isDanceStart8F = false;
  9734. isDanceStart8V = false;
  9735. isDanceStart8P = false;
  9736. isDanceStart9F = false;
  9737. isDanceStart9K = false;
  9738. isDanceStart10F = false;
  9739. isDanceStart11F = false;
  9740. isDanceStart11V = false;
  9741. isDanceStart12F = false;
  9742. isDanceStart13F = false;
  9743. isDanceStart13K = false;
  9744. isDanceStart14F = false;
  9745. isDanceStart14V = false;
  9746. isDanceStart15F = false;
  9747. isDanceStart15V = false;
  9748. for (int j = 0; j < maidCnt; j++)
  9749. {
  9750. danceFace[j] = 0f;
  9751. }
  9752. danceCheckIndex = 0;
  9753. for (int k = 0; k < danceCheck.Length; k++)
  9754. {
  9755. danceCheck[danceCheckIndex] = 1f;
  9756. }
  9757. isDance = false;
  9758. }
  9759. }
  9760. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9761. {
  9762. if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  9763. {
  9764. isShift = true;
  9765. }
  9766. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9767. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9768. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9769. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9770. if (!isShift)
  9771. {
  9772. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9773. }
  9774. for (int j = 0; j < maidCnt; j++)
  9775. {
  9776. string text5 = "dance_cm3d2_001_f1.anm";
  9777. switch (j)
  9778. {
  9779. case 1:
  9780. case 3:
  9781. case 5:
  9782. case 7:
  9783. case 9:
  9784. case 11:
  9785. case 13:
  9786. text5 = "dance_cm3d2_001_f2.anm";
  9787. break;
  9788. case 2:
  9789. case 4:
  9790. case 6:
  9791. case 8:
  9792. case 10:
  9793. case 12:
  9794. text5 = "dance_cm3d2_001_f3.anm";
  9795. break;
  9796. }
  9797. if (!isShift)
  9798. {
  9799. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9800. {
  9801. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9802. }
  9803. }
  9804. else
  9805. {
  9806. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9807. {
  9808. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara_003_ddfl_f1.anm", false, false);
  9809. }
  9810. textAsset = (Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset);
  9811. text4 = textAsset.text;
  9812. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9813. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  9814. {
  9815. dancePos[j] = maidArray[j].transform.position;
  9816. danceRot[j] = maidArray[j].transform.localRotation;
  9817. }
  9818. }
  9819. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9820. }
  9821. if (!isShift)
  9822. {
  9823. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9824. sw = new Stopwatch();
  9825. sw.Start();
  9826. }
  9827. else if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  9828. {
  9829. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9830. }
  9831. else
  9832. {
  9833. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9834. }
  9835. for (int j = 0; j < maidCnt; j++)
  9836. {
  9837. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9838. Vector3 vector = Vector3.zero;
  9839. switch (j)
  9840. {
  9841. case 3:
  9842. vector.x = 1f;
  9843. break;
  9844. case 4:
  9845. vector.x = -1f;
  9846. break;
  9847. case 5:
  9848. vector.x = 2f;
  9849. break;
  9850. case 6:
  9851. vector.x = -2f;
  9852. break;
  9853. case 7:
  9854. vector.x = 3f;
  9855. break;
  9856. case 8:
  9857. vector.x = -3f;
  9858. break;
  9859. case 9:
  9860. vector.x = 4f;
  9861. break;
  9862. case 10:
  9863. vector.x = -4f;
  9864. break;
  9865. case 11:
  9866. vector.x = 5f;
  9867. break;
  9868. case 12:
  9869. vector.x = -5f;
  9870. break;
  9871. case 13:
  9872. vector.x = 6f;
  9873. break;
  9874. }
  9875. if (!isShift)
  9876. {
  9877. maidArray[j].SetPos(vector);
  9878. }
  9879. isStop[j] = false;
  9880. isLock[j] = false;
  9881. pHandL[j] = 0;
  9882. pHandR[j] = 0;
  9883. muneIKL[j] = false;
  9884. muneIKR[j] = false;
  9885. if (!isVR)
  9886. {
  9887. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9888. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9889. }
  9890. }
  9891. ikBui = 5;
  9892. isDanceStart1F = false;
  9893. isDanceStart2F = false;
  9894. isDanceStart3F = false;
  9895. isDanceStart4F = false;
  9896. isDanceStart5F = false;
  9897. isDanceStart6F = false;
  9898. isDanceStart7F = false;
  9899. isDanceStart8F = false;
  9900. isDanceStart9F = false;
  9901. isDanceStart10F = false;
  9902. isDanceStart11F = false;
  9903. isDanceStart12F = false;
  9904. isDanceStart13F = false;
  9905. isDanceStart14F = false;
  9906. isDanceStart15F = false;
  9907. for (int j = 0; j < maidCnt; j++)
  9908. {
  9909. danceFace[j] = 0f;
  9910. }
  9911. if (isDanceStart7V)
  9912. {
  9913. for (int j = 0; j < maidCnt; j++)
  9914. {
  9915. if (maidArray[j] && maidArray[j].Visible)
  9916. {
  9917. if (isDanceStart7V)
  9918. {
  9919. maidArray[j].SetPos(dancePos[j]);
  9920. maidArray[j].body0.transform.localRotation = danceRot[j];
  9921. }
  9922. }
  9923. }
  9924. isDanceStart7V = false;
  9925. }
  9926. if (isDanceStart8V)
  9927. {
  9928. for (int j = 0; j < maidCnt; j++)
  9929. {
  9930. if (maidArray[j] && maidArray[j].Visible)
  9931. {
  9932. if (isDanceStart8V)
  9933. {
  9934. maidArray[j].SetPos(dancePos[j]);
  9935. maidArray[j].body0.transform.localRotation = danceRot[j];
  9936. }
  9937. }
  9938. }
  9939. isDanceStart8V = false;
  9940. isDanceStart8P = false;
  9941. }
  9942. if (isDanceStart11V)
  9943. {
  9944. for (int j = 0; j < maidCnt; j++)
  9945. {
  9946. if (maidArray[j] && maidArray[j].Visible)
  9947. {
  9948. if (isDanceStart11V)
  9949. {
  9950. maidArray[j].SetPos(dancePos[j]);
  9951. maidArray[j].body0.transform.localRotation = danceRot[j];
  9952. }
  9953. }
  9954. }
  9955. isDanceStart11V = false;
  9956. }
  9957. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  9958. {
  9959. for (int j = 0; j < maidCnt; j++)
  9960. {
  9961. if (maidArray[j] && maidArray[j].Visible)
  9962. {
  9963. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  9964. {
  9965. maidArray[j].SetPos(dancePos[j]);
  9966. maidArray[j].body0.transform.localRotation = danceRot[j];
  9967. int i = j;
  9968. if (!isVR)
  9969. {
  9970. delCount[i] = 20;
  9971. if (goSlot[(int)selectList[i]] != null)
  9972. {
  9973. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9974. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9975. {
  9976. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9977. }
  9978. }
  9979. }
  9980. Maid maid = maidArray[j];
  9981. maid.DelProp(MPN.handitem, true);
  9982. maid.DelProp(MPN.accvag, true);
  9983. maid.DelProp(MPN.accanl, true);
  9984. maid.DelProp(MPN.kousoku_upper, true);
  9985. maid.DelProp(MPN.kousoku_lower, true);
  9986. maid.AllProcPropSeqStart();
  9987. }
  9988. }
  9989. }
  9990. isDanceStart1K = false;
  9991. isDanceStart3K = false;
  9992. isDanceStart4K = false;
  9993. isDanceStart5K = false;
  9994. isDanceStart6K = false;
  9995. isDanceStart9K = false;
  9996. isDanceStart13K = false;
  9997. }
  9998. if (isDanceStart14V)
  9999. {
  10000. for (int j = 0; j < maidCnt; j++)
  10001. {
  10002. if (maidArray[j] && maidArray[j].Visible)
  10003. {
  10004. if (isDanceStart14V)
  10005. {
  10006. maidArray[j].SetPos(dancePos[j]);
  10007. maidArray[j].body0.transform.localRotation = danceRot[j];
  10008. }
  10009. }
  10010. }
  10011. isDanceStart14V = false;
  10012. }
  10013. if (isDanceStart15V)
  10014. {
  10015. for (int j = 0; j < maidCnt; j++)
  10016. {
  10017. if (maidArray[j] && maidArray[j].Visible)
  10018. {
  10019. if (isDanceStart15V)
  10020. {
  10021. maidArray[j].SetPos(dancePos[j]);
  10022. maidArray[j].body0.transform.localRotation = danceRot[j];
  10023. }
  10024. }
  10025. }
  10026. isDanceStart15V = false;
  10027. }
  10028. if (isShift)
  10029. {
  10030. if (maidArray[1] && maidArray[1].Visible)
  10031. {
  10032. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10033. {
  10034. Vector3 vector = Vector3.zero;
  10035. vector.x = 0.6f;
  10036. maidArray[1].SetPos(vector);
  10037. if (maidArray[2] && maidArray[2].Visible)
  10038. {
  10039. vector.x = -0.6f;
  10040. maidArray[2].SetPos(vector);
  10041. }
  10042. if (maidArray[3] && maidArray[3].Visible)
  10043. {
  10044. vector.x = 1.2f;
  10045. maidArray[3].SetPos(vector);
  10046. }
  10047. if (maidArray[4] && maidArray[4].Visible)
  10048. {
  10049. vector.x = -1.2f;
  10050. maidArray[4].SetPos(vector);
  10051. }
  10052. if (maidArray[5] && maidArray[5].Visible)
  10053. {
  10054. vector.x = 1.8f;
  10055. maidArray[5].SetPos(vector);
  10056. }
  10057. if (maidArray[6] && maidArray[6].Visible)
  10058. {
  10059. vector.x = -1.8f;
  10060. maidArray[6].SetPos(vector);
  10061. }
  10062. if (maidArray[7] && maidArray[7].Visible)
  10063. {
  10064. vector.x = 2.4f;
  10065. maidArray[7].SetPos(vector);
  10066. }
  10067. if (maidArray[8] && maidArray[8].Visible)
  10068. {
  10069. vector.x = -2.4f;
  10070. maidArray[8].SetPos(vector);
  10071. }
  10072. if (maidArray[9] && maidArray[9].Visible)
  10073. {
  10074. vector.x = 3f;
  10075. maidArray[9].SetPos(vector);
  10076. }
  10077. if (maidArray[10] && maidArray[10].Visible)
  10078. {
  10079. vector.x = -3f;
  10080. maidArray[10].SetPos(vector);
  10081. }
  10082. if (maidArray[11] && maidArray[11].Visible)
  10083. {
  10084. vector.x = 3.6f;
  10085. maidArray[11].SetPos(vector);
  10086. }
  10087. if (maidArray[12] && maidArray[12].Visible)
  10088. {
  10089. vector.x = -3.6f;
  10090. maidArray[12].SetPos(vector);
  10091. }
  10092. if (maidArray[13] && maidArray[13].Visible)
  10093. {
  10094. vector.x = 4.2f;
  10095. maidArray[13].SetPos(vector);
  10096. }
  10097. }
  10098. }
  10099. isDanceStart1K = true;
  10100. for (int j = 0; j < maidCnt; j++)
  10101. {
  10102. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  10103. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  10104. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10105. int i = j;
  10106. Maid maid = maidArray[j];
  10107. if (!isVR)
  10108. {
  10109. delCount[i] = 20;
  10110. if (goSlot[(int)selectList[i]] != null)
  10111. {
  10112. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10113. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10114. {
  10115. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10116. }
  10117. }
  10118. }
  10119. string[] array = new string[2];
  10120. array = text2.Split(new char[]
  10121. {
  10122. ','
  10123. });
  10124. maid.DelProp(MPN.handitem, true);
  10125. maid.DelProp(MPN.accvag, true);
  10126. maid.DelProp(MPN.accanl, true);
  10127. maid.DelProp(MPN.kousoku_upper, true);
  10128. maid.DelProp(MPN.kousoku_lower, true);
  10129. if (array[0] != "")
  10130. {
  10131. maid.SetProp(array[0], array[1], 0, true, false);
  10132. }
  10133. maid.AllProcPropSeqStart();
  10134. }
  10135. }
  10136. isDance = true;
  10137. isDanceStart1 = true;
  10138. }
  10139. if (isF2)
  10140. {
  10141. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10142. string text4 = textAsset.text;
  10143. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10144. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10145. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10146. for (int j = 0; j < maidCnt; j++)
  10147. {
  10148. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10149. {
  10150. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm", GameUty.FileSystem, "dance_cm3d_001_f1.anm", false, false);
  10151. }
  10152. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10153. }
  10154. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10155. for (int j = 0; j < maidCnt; j++)
  10156. {
  10157. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10158. isStop[j] = false;
  10159. isLock[j] = false;
  10160. pHandL[j] = 0;
  10161. pHandR[j] = 0;
  10162. muneIKL[j] = false;
  10163. muneIKR[j] = false;
  10164. if (!isVR)
  10165. {
  10166. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10167. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10168. }
  10169. }
  10170. ikBui = 5;
  10171. isDanceStart1F = false;
  10172. isDanceStart2F = false;
  10173. isDanceStart3F = false;
  10174. isDanceStart4F = false;
  10175. isDanceStart5F = false;
  10176. isDanceStart6F = false;
  10177. isDanceStart7F = false;
  10178. isDanceStart8F = false;
  10179. isDanceStart9F = false;
  10180. isDanceStart10F = false;
  10181. isDanceStart11F = false;
  10182. isDanceStart12F = false;
  10183. isDanceStart13F = false;
  10184. isDanceStart14F = false;
  10185. isDanceStart15F = false;
  10186. for (int j = 0; j < maidCnt; j++)
  10187. {
  10188. danceFace[j] = 0f;
  10189. }
  10190. if (isDanceStart7V)
  10191. {
  10192. for (int j = 0; j < maidCnt; j++)
  10193. {
  10194. if (maidArray[j] && maidArray[j].Visible)
  10195. {
  10196. if (isDanceStart7V)
  10197. {
  10198. maidArray[j].SetPos(dancePos[j]);
  10199. maidArray[j].body0.transform.localRotation = danceRot[j];
  10200. }
  10201. }
  10202. }
  10203. isDanceStart7V = false;
  10204. }
  10205. if (isDanceStart8V)
  10206. {
  10207. for (int j = 0; j < maidCnt; j++)
  10208. {
  10209. if (maidArray[j] && maidArray[j].Visible)
  10210. {
  10211. if (isDanceStart8V)
  10212. {
  10213. maidArray[j].SetPos(dancePos[j]);
  10214. maidArray[j].body0.transform.localRotation = danceRot[j];
  10215. }
  10216. }
  10217. }
  10218. isDanceStart8V = false;
  10219. isDanceStart8P = false;
  10220. }
  10221. if (isDanceStart11V)
  10222. {
  10223. for (int j = 0; j < maidCnt; j++)
  10224. {
  10225. if (maidArray[j] && maidArray[j].Visible)
  10226. {
  10227. if (isDanceStart11V)
  10228. {
  10229. maidArray[j].SetPos(dancePos[j]);
  10230. maidArray[j].body0.transform.localRotation = danceRot[j];
  10231. }
  10232. }
  10233. }
  10234. isDanceStart11V = false;
  10235. }
  10236. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10237. {
  10238. for (int j = 0; j < maidCnt; j++)
  10239. {
  10240. if (maidArray[j] && maidArray[j].Visible)
  10241. {
  10242. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10243. {
  10244. maidArray[j].SetPos(dancePos[j]);
  10245. maidArray[j].body0.transform.localRotation = danceRot[j];
  10246. int i = j;
  10247. if (!isVR)
  10248. {
  10249. delCount[i] = 20;
  10250. if (goSlot[(int)selectList[i]] != null)
  10251. {
  10252. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10253. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10254. {
  10255. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10256. }
  10257. }
  10258. }
  10259. Maid maid = maidArray[j];
  10260. maid.DelProp(MPN.handitem, true);
  10261. maid.DelProp(MPN.accvag, true);
  10262. maid.DelProp(MPN.accanl, true);
  10263. maid.DelProp(MPN.kousoku_upper, true);
  10264. maid.DelProp(MPN.kousoku_lower, true);
  10265. maid.AllProcPropSeqStart();
  10266. }
  10267. }
  10268. }
  10269. isDanceStart1K = false;
  10270. isDanceStart3K = false;
  10271. isDanceStart4K = false;
  10272. isDanceStart5K = false;
  10273. isDanceStart6K = false;
  10274. isDanceStart9K = false;
  10275. isDanceStart13K = false;
  10276. }
  10277. if (isDanceStart14V)
  10278. {
  10279. for (int j = 0; j < maidCnt; j++)
  10280. {
  10281. if (maidArray[j] && maidArray[j].Visible)
  10282. {
  10283. if (isDanceStart14V)
  10284. {
  10285. maidArray[j].SetPos(dancePos[j]);
  10286. maidArray[j].body0.transform.localRotation = danceRot[j];
  10287. }
  10288. }
  10289. }
  10290. isDanceStart14V = false;
  10291. }
  10292. if (isDanceStart15V)
  10293. {
  10294. for (int j = 0; j < maidCnt; j++)
  10295. {
  10296. if (maidArray[j] && maidArray[j].Visible)
  10297. {
  10298. if (isDanceStart15V)
  10299. {
  10300. maidArray[j].SetPos(dancePos[j]);
  10301. maidArray[j].body0.transform.localRotation = danceRot[j];
  10302. }
  10303. }
  10304. }
  10305. isDanceStart15V = false;
  10306. }
  10307. if (maidArray[1] && maidArray[1].Visible)
  10308. {
  10309. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10310. {
  10311. Vector3 vector = Vector3.zero;
  10312. vector.x = 0.6f;
  10313. maidArray[1].SetPos(vector);
  10314. if (maidArray[2] && maidArray[2].Visible)
  10315. {
  10316. vector.x = -0.6f;
  10317. maidArray[2].SetPos(vector);
  10318. }
  10319. if (maidArray[3] && maidArray[3].Visible)
  10320. {
  10321. vector.x = 1.2f;
  10322. maidArray[3].SetPos(vector);
  10323. }
  10324. if (maidArray[4] && maidArray[4].Visible)
  10325. {
  10326. vector.x = -1.2f;
  10327. maidArray[4].SetPos(vector);
  10328. }
  10329. if (maidArray[5] && maidArray[5].Visible)
  10330. {
  10331. vector.x = 1.8f;
  10332. maidArray[5].SetPos(vector);
  10333. }
  10334. if (maidArray[6] && maidArray[6].Visible)
  10335. {
  10336. vector.x = -1.8f;
  10337. maidArray[6].SetPos(vector);
  10338. }
  10339. if (maidArray[7] && maidArray[7].Visible)
  10340. {
  10341. vector.x = 2.4f;
  10342. maidArray[7].SetPos(vector);
  10343. }
  10344. if (maidArray[8] && maidArray[8].Visible)
  10345. {
  10346. vector.x = -2.4f;
  10347. maidArray[8].SetPos(vector);
  10348. }
  10349. if (maidArray[9] && maidArray[9].Visible)
  10350. {
  10351. vector.x = 3f;
  10352. maidArray[9].SetPos(vector);
  10353. }
  10354. if (maidArray[10] && maidArray[10].Visible)
  10355. {
  10356. vector.x = -3f;
  10357. maidArray[10].SetPos(vector);
  10358. }
  10359. if (maidArray[11] && maidArray[11].Visible)
  10360. {
  10361. vector.x = 3.6f;
  10362. maidArray[11].SetPos(vector);
  10363. }
  10364. if (maidArray[12] && maidArray[12].Visible)
  10365. {
  10366. vector.x = -3.6f;
  10367. maidArray[12].SetPos(vector);
  10368. }
  10369. if (maidArray[13] && maidArray[13].Visible)
  10370. {
  10371. vector.x = 4.2f;
  10372. maidArray[13].SetPos(vector);
  10373. }
  10374. }
  10375. }
  10376. isDance = true;
  10377. isDanceStart2 = true;
  10378. isF2 = false;
  10379. }
  10380. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10381. {
  10382. GameMain.Instance.SoundMgr.StopBGM(0f);
  10383. isF2 = true;
  10384. }
  10385. if (isF3)
  10386. {
  10387. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10388. string text4 = textAsset.text;
  10389. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10390. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10391. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10392. for (int j = 0; j < maidCnt; j++)
  10393. {
  10394. if (!isShift)
  10395. {
  10396. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10397. {
  10398. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm", GameUty.FileSystem, "dance_cm3d_002_end_f1.anm", false, false);
  10399. }
  10400. }
  10401. else
  10402. {
  10403. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10404. {
  10405. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara_001_sl_f1.anm", false, false);
  10406. }
  10407. textAsset = (Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset);
  10408. text4 = textAsset.text;
  10409. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10410. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  10411. {
  10412. dancePos[j] = maidArray[j].transform.position;
  10413. danceRot[j] = maidArray[j].transform.localRotation;
  10414. }
  10415. }
  10416. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10417. }
  10418. if (!isShift)
  10419. {
  10420. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10421. }
  10422. else
  10423. {
  10424. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10425. }
  10426. for (int j = 0; j < maidCnt; j++)
  10427. {
  10428. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10429. isStop[j] = false;
  10430. isLock[j] = false;
  10431. pHandL[j] = 0;
  10432. pHandR[j] = 0;
  10433. muneIKL[j] = false;
  10434. muneIKR[j] = false;
  10435. if (!isVR)
  10436. {
  10437. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10438. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10439. }
  10440. }
  10441. ikBui = 5;
  10442. isDanceStart1F = false;
  10443. isDanceStart2F = false;
  10444. isDanceStart3F = false;
  10445. isDanceStart4F = false;
  10446. isDanceStart5F = false;
  10447. isDanceStart6F = false;
  10448. isDanceStart7F = false;
  10449. isDanceStart8F = false;
  10450. isDanceStart9F = false;
  10451. isDanceStart10F = false;
  10452. isDanceStart11F = false;
  10453. isDanceStart12F = false;
  10454. isDanceStart13F = false;
  10455. isDanceStart14F = false;
  10456. isDanceStart15F = false;
  10457. for (int j = 0; j < maidCnt; j++)
  10458. {
  10459. danceFace[j] = 0f;
  10460. }
  10461. if (isDanceStart7V)
  10462. {
  10463. for (int j = 0; j < maidCnt; j++)
  10464. {
  10465. if (maidArray[j] && maidArray[j].Visible)
  10466. {
  10467. if (isDanceStart7V)
  10468. {
  10469. maidArray[j].SetPos(dancePos[j]);
  10470. maidArray[j].body0.transform.localRotation = danceRot[j];
  10471. }
  10472. }
  10473. }
  10474. isDanceStart7V = false;
  10475. }
  10476. if (isDanceStart8V)
  10477. {
  10478. for (int j = 0; j < maidCnt; j++)
  10479. {
  10480. if (maidArray[j] && maidArray[j].Visible)
  10481. {
  10482. if (isDanceStart8V)
  10483. {
  10484. maidArray[j].SetPos(dancePos[j]);
  10485. maidArray[j].body0.transform.localRotation = danceRot[j];
  10486. }
  10487. }
  10488. }
  10489. isDanceStart8V = false;
  10490. isDanceStart8P = false;
  10491. }
  10492. if (isDanceStart11V)
  10493. {
  10494. for (int j = 0; j < maidCnt; j++)
  10495. {
  10496. if (maidArray[j] && maidArray[j].Visible)
  10497. {
  10498. if (isDanceStart11V)
  10499. {
  10500. maidArray[j].SetPos(dancePos[j]);
  10501. maidArray[j].body0.transform.localRotation = danceRot[j];
  10502. }
  10503. }
  10504. }
  10505. isDanceStart11V = false;
  10506. }
  10507. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10508. {
  10509. for (int j = 0; j < maidCnt; j++)
  10510. {
  10511. if (maidArray[j] && maidArray[j].Visible)
  10512. {
  10513. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10514. {
  10515. maidArray[j].SetPos(dancePos[j]);
  10516. maidArray[j].body0.transform.localRotation = danceRot[j];
  10517. int i = j;
  10518. if (!isVR)
  10519. {
  10520. delCount[i] = 20;
  10521. if (goSlot[(int)selectList[i]] != null)
  10522. {
  10523. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10524. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10525. {
  10526. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10527. }
  10528. }
  10529. }
  10530. Maid maid = maidArray[j];
  10531. maid.DelProp(MPN.handitem, true);
  10532. maid.DelProp(MPN.accvag, true);
  10533. maid.DelProp(MPN.accanl, true);
  10534. maid.DelProp(MPN.kousoku_upper, true);
  10535. maid.DelProp(MPN.kousoku_lower, true);
  10536. maid.AllProcPropSeqStart();
  10537. }
  10538. }
  10539. }
  10540. isDanceStart1K = false;
  10541. isDanceStart3K = false;
  10542. isDanceStart4K = false;
  10543. isDanceStart5K = false;
  10544. isDanceStart6K = false;
  10545. isDanceStart9K = false;
  10546. isDanceStart13K = false;
  10547. }
  10548. if (isDanceStart14V)
  10549. {
  10550. for (int j = 0; j < maidCnt; j++)
  10551. {
  10552. if (maidArray[j] && maidArray[j].Visible)
  10553. {
  10554. if (isDanceStart14V)
  10555. {
  10556. maidArray[j].SetPos(dancePos[j]);
  10557. maidArray[j].body0.transform.localRotation = danceRot[j];
  10558. }
  10559. }
  10560. }
  10561. isDanceStart14V = false;
  10562. }
  10563. if (isDanceStart15V)
  10564. {
  10565. for (int j = 0; j < maidCnt; j++)
  10566. {
  10567. if (maidArray[j] && maidArray[j].Visible)
  10568. {
  10569. if (isDanceStart15V)
  10570. {
  10571. maidArray[j].SetPos(dancePos[j]);
  10572. maidArray[j].body0.transform.localRotation = danceRot[j];
  10573. }
  10574. }
  10575. }
  10576. isDanceStart15V = false;
  10577. }
  10578. if (maidArray[1] && maidArray[1].Visible)
  10579. {
  10580. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10581. {
  10582. Vector3 vector = Vector3.zero;
  10583. vector.x = 0.6f;
  10584. maidArray[1].SetPos(vector);
  10585. if (maidArray[2] && maidArray[2].Visible)
  10586. {
  10587. vector.x = -0.6f;
  10588. maidArray[2].SetPos(vector);
  10589. }
  10590. if (maidArray[3] && maidArray[3].Visible)
  10591. {
  10592. vector.x = 1.2f;
  10593. maidArray[3].SetPos(vector);
  10594. }
  10595. if (maidArray[4] && maidArray[4].Visible)
  10596. {
  10597. vector.x = -1.2f;
  10598. maidArray[4].SetPos(vector);
  10599. }
  10600. if (maidArray[5] && maidArray[5].Visible)
  10601. {
  10602. vector.x = 1.8f;
  10603. maidArray[5].SetPos(vector);
  10604. }
  10605. if (maidArray[6] && maidArray[6].Visible)
  10606. {
  10607. vector.x = -1.8f;
  10608. maidArray[6].SetPos(vector);
  10609. }
  10610. if (maidArray[7] && maidArray[7].Visible)
  10611. {
  10612. vector.x = 2.4f;
  10613. maidArray[7].SetPos(vector);
  10614. }
  10615. if (maidArray[8] && maidArray[8].Visible)
  10616. {
  10617. vector.x = -2.4f;
  10618. maidArray[8].SetPos(vector);
  10619. }
  10620. if (maidArray[9] && maidArray[9].Visible)
  10621. {
  10622. vector.x = 3f;
  10623. maidArray[9].SetPos(vector);
  10624. }
  10625. if (maidArray[10] && maidArray[10].Visible)
  10626. {
  10627. vector.x = -3f;
  10628. maidArray[10].SetPos(vector);
  10629. }
  10630. if (maidArray[11] && maidArray[11].Visible)
  10631. {
  10632. vector.x = 3.6f;
  10633. maidArray[11].SetPos(vector);
  10634. }
  10635. if (maidArray[12] && maidArray[12].Visible)
  10636. {
  10637. vector.x = -3.6f;
  10638. maidArray[12].SetPos(vector);
  10639. }
  10640. if (maidArray[13] && maidArray[13].Visible)
  10641. {
  10642. vector.x = 4.2f;
  10643. maidArray[13].SetPos(vector);
  10644. }
  10645. }
  10646. }
  10647. if (isShift)
  10648. {
  10649. isDanceStart3K = true;
  10650. for (int j = 0; j < maidCnt; j++)
  10651. {
  10652. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  10653. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  10654. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10655. int i = j;
  10656. Maid maid = maidArray[j];
  10657. if (!isVR)
  10658. {
  10659. delCount[i] = 20;
  10660. if (goSlot[(int)selectList[i]] != null)
  10661. {
  10662. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10663. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10664. {
  10665. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10666. }
  10667. }
  10668. }
  10669. string[] array = new string[2];
  10670. array = text2.Split(new char[]
  10671. {
  10672. ','
  10673. });
  10674. maid.DelProp(MPN.handitem, true);
  10675. maid.DelProp(MPN.accvag, true);
  10676. maid.DelProp(MPN.accanl, true);
  10677. maid.DelProp(MPN.kousoku_upper, true);
  10678. maid.DelProp(MPN.kousoku_lower, true);
  10679. if (array[0] != "")
  10680. {
  10681. maid.SetProp(array[0], array[1], 0, true, false);
  10682. }
  10683. maid.AllProcPropSeqStart();
  10684. }
  10685. }
  10686. isDance = true;
  10687. isDanceStart3 = true;
  10688. isF3 = false;
  10689. }
  10690. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10691. {
  10692. GameMain.Instance.SoundMgr.StopBGM(0f);
  10693. isF3 = true;
  10694. if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  10695. {
  10696. isShift = true;
  10697. }
  10698. }
  10699. if (isSF1 || isSF2 || isSF3)
  10700. {
  10701. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10702. string text4 = textAsset.text;
  10703. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10704. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10705. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10706. for (int j = 0; j < maidCnt; j++)
  10707. {
  10708. if (!isShift)
  10709. {
  10710. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10711. {
  10712. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm", GameUty.FileSystem, "dance_cm3d2_002_smt_f.anm", false, false);
  10713. }
  10714. }
  10715. else
  10716. {
  10717. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10718. {
  10719. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara02_001_smt_f1.anm", false, false);
  10720. }
  10721. textAsset = (Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset);
  10722. text4 = textAsset.text;
  10723. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10724. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  10725. {
  10726. dancePos[j] = maidArray[j].transform.position;
  10727. danceRot[j] = maidArray[j].transform.localRotation;
  10728. }
  10729. }
  10730. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10731. }
  10732. if (!isShift)
  10733. {
  10734. if (isSF1)
  10735. {
  10736. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10737. }
  10738. if (isSF2)
  10739. {
  10740. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10741. }
  10742. if (isSF3)
  10743. {
  10744. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10745. }
  10746. }
  10747. else
  10748. {
  10749. if (isSF1)
  10750. {
  10751. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10752. }
  10753. if (isSF2)
  10754. {
  10755. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10756. }
  10757. if (isSF3)
  10758. {
  10759. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10760. }
  10761. }
  10762. for (int j = 0; j < maidCnt; j++)
  10763. {
  10764. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10765. isStop[j] = false;
  10766. isLock[j] = false;
  10767. pHandL[j] = 0;
  10768. pHandR[j] = 0;
  10769. muneIKL[j] = false;
  10770. muneIKR[j] = false;
  10771. if (!isVR)
  10772. {
  10773. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10774. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10775. }
  10776. }
  10777. ikBui = 5;
  10778. isDanceStart1F = false;
  10779. isDanceStart2F = false;
  10780. isDanceStart3F = false;
  10781. isDanceStart4F = false;
  10782. isDanceStart5F = false;
  10783. isDanceStart6F = false;
  10784. isDanceStart7F = false;
  10785. isDanceStart8F = false;
  10786. isDanceStart9F = false;
  10787. isDanceStart10F = false;
  10788. isDanceStart11F = false;
  10789. isDanceStart12F = false;
  10790. isDanceStart13F = false;
  10791. isDanceStart14F = false;
  10792. isDanceStart15F = false;
  10793. for (int j = 0; j < maidCnt; j++)
  10794. {
  10795. danceFace[j] = 0f;
  10796. }
  10797. if (isDanceStart7V)
  10798. {
  10799. for (int j = 0; j < maidCnt; j++)
  10800. {
  10801. if (maidArray[j] && maidArray[j].Visible)
  10802. {
  10803. if (isDanceStart7V)
  10804. {
  10805. maidArray[j].SetPos(dancePos[j]);
  10806. maidArray[j].body0.transform.localRotation = danceRot[j];
  10807. }
  10808. }
  10809. }
  10810. isDanceStart7V = false;
  10811. }
  10812. if (isDanceStart8V)
  10813. {
  10814. for (int j = 0; j < maidCnt; j++)
  10815. {
  10816. if (maidArray[j] && maidArray[j].Visible)
  10817. {
  10818. if (isDanceStart8V)
  10819. {
  10820. maidArray[j].SetPos(dancePos[j]);
  10821. maidArray[j].body0.transform.localRotation = danceRot[j];
  10822. }
  10823. }
  10824. }
  10825. isDanceStart8V = false;
  10826. isDanceStart8P = false;
  10827. }
  10828. if (isDanceStart11V)
  10829. {
  10830. for (int j = 0; j < maidCnt; j++)
  10831. {
  10832. if (maidArray[j] && maidArray[j].Visible)
  10833. {
  10834. if (isDanceStart11V)
  10835. {
  10836. maidArray[j].SetPos(dancePos[j]);
  10837. maidArray[j].body0.transform.localRotation = danceRot[j];
  10838. }
  10839. }
  10840. }
  10841. isDanceStart11V = false;
  10842. }
  10843. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10844. {
  10845. for (int j = 0; j < maidCnt; j++)
  10846. {
  10847. if (maidArray[j] && maidArray[j].Visible)
  10848. {
  10849. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  10850. {
  10851. maidArray[j].SetPos(dancePos[j]);
  10852. maidArray[j].body0.transform.localRotation = danceRot[j];
  10853. int i = j;
  10854. if (!isVR)
  10855. {
  10856. delCount[i] = 20;
  10857. if (goSlot[(int)selectList[i]] != null)
  10858. {
  10859. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10860. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10861. {
  10862. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10863. }
  10864. }
  10865. }
  10866. Maid maid = maidArray[j];
  10867. maid.DelProp(MPN.handitem, true);
  10868. maid.DelProp(MPN.accvag, true);
  10869. maid.DelProp(MPN.accanl, true);
  10870. maid.DelProp(MPN.kousoku_upper, true);
  10871. maid.DelProp(MPN.kousoku_lower, true);
  10872. maid.AllProcPropSeqStart();
  10873. }
  10874. }
  10875. }
  10876. isDanceStart1K = false;
  10877. isDanceStart3K = false;
  10878. isDanceStart4K = false;
  10879. isDanceStart5K = false;
  10880. isDanceStart6K = false;
  10881. isDanceStart9K = false;
  10882. isDanceStart13K = false;
  10883. }
  10884. if (isDanceStart14V)
  10885. {
  10886. for (int j = 0; j < maidCnt; j++)
  10887. {
  10888. if (maidArray[j] && maidArray[j].Visible)
  10889. {
  10890. if (isDanceStart14V)
  10891. {
  10892. maidArray[j].SetPos(dancePos[j]);
  10893. maidArray[j].body0.transform.localRotation = danceRot[j];
  10894. }
  10895. }
  10896. }
  10897. isDanceStart14V = false;
  10898. }
  10899. if (isDanceStart15V)
  10900. {
  10901. for (int j = 0; j < maidCnt; j++)
  10902. {
  10903. if (maidArray[j] && maidArray[j].Visible)
  10904. {
  10905. if (isDanceStart15V)
  10906. {
  10907. maidArray[j].SetPos(dancePos[j]);
  10908. maidArray[j].body0.transform.localRotation = danceRot[j];
  10909. }
  10910. }
  10911. }
  10912. isDanceStart15V = false;
  10913. }
  10914. if (maidArray[1] && maidArray[1].Visible)
  10915. {
  10916. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10917. {
  10918. Vector3 vector = Vector3.zero;
  10919. vector.x = 0.6f;
  10920. maidArray[1].SetPos(vector);
  10921. if (maidArray[2] && maidArray[2].Visible)
  10922. {
  10923. vector.x = -0.6f;
  10924. maidArray[2].SetPos(vector);
  10925. }
  10926. if (maidArray[3] && maidArray[3].Visible)
  10927. {
  10928. vector.x = 1.2f;
  10929. maidArray[3].SetPos(vector);
  10930. }
  10931. if (maidArray[4] && maidArray[4].Visible)
  10932. {
  10933. vector.x = -1.2f;
  10934. maidArray[4].SetPos(vector);
  10935. }
  10936. if (maidArray[5] && maidArray[5].Visible)
  10937. {
  10938. vector.x = 1.8f;
  10939. maidArray[5].SetPos(vector);
  10940. }
  10941. if (maidArray[6] && maidArray[6].Visible)
  10942. {
  10943. vector.x = -1.8f;
  10944. maidArray[6].SetPos(vector);
  10945. }
  10946. if (maidArray[7] && maidArray[7].Visible)
  10947. {
  10948. vector.x = 2.4f;
  10949. maidArray[7].SetPos(vector);
  10950. }
  10951. if (maidArray[8] && maidArray[8].Visible)
  10952. {
  10953. vector.x = -2.4f;
  10954. maidArray[8].SetPos(vector);
  10955. }
  10956. if (maidArray[9] && maidArray[9].Visible)
  10957. {
  10958. vector.x = 3f;
  10959. maidArray[9].SetPos(vector);
  10960. }
  10961. if (maidArray[10] && maidArray[10].Visible)
  10962. {
  10963. vector.x = -3f;
  10964. maidArray[10].SetPos(vector);
  10965. }
  10966. if (maidArray[11] && maidArray[11].Visible)
  10967. {
  10968. vector.x = 3.6f;
  10969. maidArray[11].SetPos(vector);
  10970. }
  10971. if (maidArray[12] && maidArray[12].Visible)
  10972. {
  10973. vector.x = -3.6f;
  10974. maidArray[12].SetPos(vector);
  10975. }
  10976. if (maidArray[13] && maidArray[13].Visible)
  10977. {
  10978. vector.x = 4.2f;
  10979. maidArray[13].SetPos(vector);
  10980. }
  10981. }
  10982. }
  10983. if (isShift)
  10984. {
  10985. isDanceStart4K = true;
  10986. for (int j = 0; j < maidCnt; j++)
  10987. {
  10988. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  10989. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  10990. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10991. int i = j;
  10992. Maid maid = maidArray[j];
  10993. if (!isVR)
  10994. {
  10995. delCount[i] = 20;
  10996. if (goSlot[(int)selectList[i]] != null)
  10997. {
  10998. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10999. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11000. {
  11001. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11002. }
  11003. }
  11004. }
  11005. string[] array = new string[2];
  11006. array = text2.Split(new char[]
  11007. {
  11008. ','
  11009. });
  11010. maid.DelProp(MPN.handitem, true);
  11011. maid.DelProp(MPN.accvag, true);
  11012. maid.DelProp(MPN.accanl, true);
  11013. maid.DelProp(MPN.kousoku_upper, true);
  11014. maid.DelProp(MPN.kousoku_lower, true);
  11015. if (array[0] != "")
  11016. {
  11017. maid.SetProp(array[0], array[1], 0, true, false);
  11018. }
  11019. maid.AllProcPropSeqStart();
  11020. }
  11021. }
  11022. isDance = true;
  11023. isDanceStart4 = true;
  11024. isSF1 = false;
  11025. isSF2 = false;
  11026. isSF3 = false;
  11027. }
  11028. if (isHS1 || isHS2 || isHS3)
  11029. {
  11030. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11031. string text4 = textAsset.text;
  11032. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11033. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11034. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11035. for (int j = 0; j < maidCnt; j++)
  11036. {
  11037. if (!isShift)
  11038. {
  11039. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  11040. {
  11041. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm", GameUty.FileSystem, "dance_cm3d2_003_hs_f1.anm", false, false);
  11042. }
  11043. }
  11044. else
  11045. {
  11046. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  11047. {
  11048. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara02_003_hs_f1.anm", false, false);
  11049. }
  11050. textAsset = (Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset);
  11051. text4 = textAsset.text;
  11052. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11053. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  11054. {
  11055. dancePos[j] = maidArray[j].transform.position;
  11056. danceRot[j] = maidArray[j].transform.localRotation;
  11057. }
  11058. }
  11059. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11060. }
  11061. if (!isShift)
  11062. {
  11063. if (isHS1)
  11064. {
  11065. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11066. }
  11067. if (isHS2)
  11068. {
  11069. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11070. }
  11071. if (isHS3)
  11072. {
  11073. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11074. }
  11075. }
  11076. else
  11077. {
  11078. if (isHS1)
  11079. {
  11080. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11081. }
  11082. if (isHS2)
  11083. {
  11084. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11085. }
  11086. if (isHS3)
  11087. {
  11088. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11089. }
  11090. }
  11091. for (int j = 0; j < maidCnt; j++)
  11092. {
  11093. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11094. isStop[j] = false;
  11095. isLock[j] = false;
  11096. pHandL[j] = 0;
  11097. pHandR[j] = 0;
  11098. muneIKL[j] = false;
  11099. muneIKR[j] = false;
  11100. if (!isVR)
  11101. {
  11102. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11103. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11104. }
  11105. }
  11106. ikBui = 5;
  11107. isDanceStart1F = false;
  11108. isDanceStart2F = false;
  11109. isDanceStart3F = false;
  11110. isDanceStart4F = false;
  11111. isDanceStart5F = false;
  11112. isDanceStart6F = false;
  11113. isDanceStart7F = false;
  11114. isDanceStart8F = false;
  11115. isDanceStart9F = false;
  11116. isDanceStart10F = false;
  11117. isDanceStart11F = false;
  11118. isDanceStart12F = false;
  11119. isDanceStart13F = false;
  11120. isDanceStart14F = false;
  11121. isDanceStart15F = false;
  11122. for (int j = 0; j < maidCnt; j++)
  11123. {
  11124. danceFace[j] = 0f;
  11125. }
  11126. if (isDanceStart7V)
  11127. {
  11128. for (int j = 0; j < maidCnt; j++)
  11129. {
  11130. if (maidArray[j] && maidArray[j].Visible)
  11131. {
  11132. if (isDanceStart7V)
  11133. {
  11134. maidArray[j].SetPos(dancePos[j]);
  11135. maidArray[j].body0.transform.localRotation = danceRot[j];
  11136. }
  11137. }
  11138. }
  11139. isDanceStart7V = false;
  11140. }
  11141. if (isDanceStart8V)
  11142. {
  11143. for (int j = 0; j < maidCnt; j++)
  11144. {
  11145. if (maidArray[j] && maidArray[j].Visible)
  11146. {
  11147. if (isDanceStart8V)
  11148. {
  11149. maidArray[j].SetPos(dancePos[j]);
  11150. maidArray[j].body0.transform.localRotation = danceRot[j];
  11151. }
  11152. }
  11153. }
  11154. isDanceStart8V = false;
  11155. isDanceStart8P = false;
  11156. }
  11157. if (isDanceStart11V)
  11158. {
  11159. for (int j = 0; j < maidCnt; j++)
  11160. {
  11161. if (maidArray[j] && maidArray[j].Visible)
  11162. {
  11163. if (isDanceStart11V)
  11164. {
  11165. maidArray[j].SetPos(dancePos[j]);
  11166. maidArray[j].body0.transform.localRotation = danceRot[j];
  11167. }
  11168. }
  11169. }
  11170. isDanceStart11V = false;
  11171. }
  11172. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  11173. {
  11174. for (int j = 0; j < maidCnt; j++)
  11175. {
  11176. if (maidArray[j] && maidArray[j].Visible)
  11177. {
  11178. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  11179. {
  11180. maidArray[j].SetPos(dancePos[j]);
  11181. maidArray[j].body0.transform.localRotation = danceRot[j];
  11182. int i = j;
  11183. if (!isVR)
  11184. {
  11185. delCount[i] = 20;
  11186. if (goSlot[(int)selectList[i]] != null)
  11187. {
  11188. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11189. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11190. {
  11191. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11192. }
  11193. }
  11194. }
  11195. Maid maid = maidArray[j];
  11196. maid.DelProp(MPN.handitem, true);
  11197. maid.DelProp(MPN.accvag, true);
  11198. maid.DelProp(MPN.accanl, true);
  11199. maid.DelProp(MPN.kousoku_upper, true);
  11200. maid.DelProp(MPN.kousoku_lower, true);
  11201. maid.AllProcPropSeqStart();
  11202. }
  11203. }
  11204. }
  11205. isDanceStart1K = false;
  11206. isDanceStart3K = false;
  11207. isDanceStart4K = false;
  11208. isDanceStart5K = false;
  11209. isDanceStart6K = false;
  11210. isDanceStart9K = false;
  11211. isDanceStart13K = false;
  11212. }
  11213. if (isDanceStart14V)
  11214. {
  11215. for (int j = 0; j < maidCnt; j++)
  11216. {
  11217. if (maidArray[j] && maidArray[j].Visible)
  11218. {
  11219. if (isDanceStart14V)
  11220. {
  11221. maidArray[j].SetPos(dancePos[j]);
  11222. maidArray[j].body0.transform.localRotation = danceRot[j];
  11223. }
  11224. }
  11225. }
  11226. isDanceStart14V = false;
  11227. }
  11228. if (isDanceStart15V)
  11229. {
  11230. for (int j = 0; j < maidCnt; j++)
  11231. {
  11232. if (maidArray[j] && maidArray[j].Visible)
  11233. {
  11234. if (isDanceStart15V)
  11235. {
  11236. maidArray[j].SetPos(dancePos[j]);
  11237. maidArray[j].body0.transform.localRotation = danceRot[j];
  11238. }
  11239. }
  11240. }
  11241. isDanceStart15V = false;
  11242. }
  11243. if (maidArray[1] && maidArray[1].Visible)
  11244. {
  11245. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11246. {
  11247. Vector3 vector = Vector3.zero;
  11248. vector.x = 0.6f;
  11249. maidArray[1].SetPos(vector);
  11250. if (maidArray[2] && maidArray[2].Visible)
  11251. {
  11252. vector.x = -0.6f;
  11253. maidArray[2].SetPos(vector);
  11254. }
  11255. if (maidArray[3] && maidArray[3].Visible)
  11256. {
  11257. vector.x = 1.2f;
  11258. maidArray[3].SetPos(vector);
  11259. }
  11260. if (maidArray[4] && maidArray[4].Visible)
  11261. {
  11262. vector.x = -1.2f;
  11263. maidArray[4].SetPos(vector);
  11264. }
  11265. if (maidArray[5] && maidArray[5].Visible)
  11266. {
  11267. vector.x = 1.8f;
  11268. maidArray[5].SetPos(vector);
  11269. }
  11270. if (maidArray[6] && maidArray[6].Visible)
  11271. {
  11272. vector.x = -1.8f;
  11273. maidArray[6].SetPos(vector);
  11274. }
  11275. if (maidArray[7] && maidArray[7].Visible)
  11276. {
  11277. vector.x = 2.4f;
  11278. maidArray[7].SetPos(vector);
  11279. }
  11280. if (maidArray[8] && maidArray[8].Visible)
  11281. {
  11282. vector.x = -2.4f;
  11283. maidArray[8].SetPos(vector);
  11284. }
  11285. if (maidArray[9] && maidArray[9].Visible)
  11286. {
  11287. vector.x = 3f;
  11288. maidArray[9].SetPos(vector);
  11289. }
  11290. if (maidArray[10] && maidArray[10].Visible)
  11291. {
  11292. vector.x = -3f;
  11293. maidArray[10].SetPos(vector);
  11294. }
  11295. if (maidArray[11] && maidArray[11].Visible)
  11296. {
  11297. vector.x = 3.6f;
  11298. maidArray[11].SetPos(vector);
  11299. }
  11300. if (maidArray[12] && maidArray[12].Visible)
  11301. {
  11302. vector.x = -3.6f;
  11303. maidArray[12].SetPos(vector);
  11304. }
  11305. if (maidArray[13] && maidArray[13].Visible)
  11306. {
  11307. vector.x = 4.2f;
  11308. maidArray[13].SetPos(vector);
  11309. }
  11310. }
  11311. }
  11312. if (isShift)
  11313. {
  11314. isDanceStart6K = true;
  11315. for (int j = 0; j < maidCnt; j++)
  11316. {
  11317. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  11318. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  11319. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11320. int i = j;
  11321. Maid maid = maidArray[j];
  11322. if (!isVR)
  11323. {
  11324. delCount[i] = 20;
  11325. if (goSlot[(int)selectList[i]] != null)
  11326. {
  11327. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11328. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11329. {
  11330. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11331. }
  11332. }
  11333. }
  11334. string[] array = new string[2];
  11335. array = text2.Split(new char[]
  11336. {
  11337. ','
  11338. });
  11339. maid.DelProp(MPN.handitem, true);
  11340. maid.DelProp(MPN.accvag, true);
  11341. maid.DelProp(MPN.accanl, true);
  11342. maid.DelProp(MPN.kousoku_upper, true);
  11343. maid.DelProp(MPN.kousoku_lower, true);
  11344. if (array[0] != "")
  11345. {
  11346. maid.SetProp(array[0], array[1], 0, true, false);
  11347. }
  11348. maid.AllProcPropSeqStart();
  11349. }
  11350. }
  11351. isDance = true;
  11352. isDanceStart6 = true;
  11353. isHS1 = false;
  11354. isHS2 = false;
  11355. isHS3 = false;
  11356. }
  11357. if (isHS4 || isHS5 || isHS6)
  11358. {
  11359. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11360. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11361. for (int j = 0; j < maidCnt; j++)
  11362. {
  11363. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11364. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11365. switch (j)
  11366. {
  11367. case 1:
  11368. case 3:
  11369. case 5:
  11370. case 7:
  11371. case 9:
  11372. case 11:
  11373. case 13:
  11374. text5 = "dance_cm3d2_003_hs_f2.anm";
  11375. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11376. break;
  11377. }
  11378. if (maidArray[j] && maidArray[j].Visible)
  11379. {
  11380. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11381. {
  11382. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11383. }
  11384. string text4 = textAsset.text;
  11385. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11386. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11387. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11388. }
  11389. }
  11390. if (isHS4)
  11391. {
  11392. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11393. }
  11394. if (isHS5)
  11395. {
  11396. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11397. }
  11398. if (isHS6)
  11399. {
  11400. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11401. }
  11402. ikBui = 5;
  11403. isDanceStart1F = false;
  11404. isDanceStart2F = false;
  11405. isDanceStart3F = false;
  11406. isDanceStart4F = false;
  11407. isDanceStart5F = false;
  11408. isDanceStart6F = false;
  11409. isDanceStart7F = false;
  11410. isDanceStart8F = false;
  11411. isDanceStart9F = false;
  11412. isDanceStart10F = false;
  11413. isDanceStart11F = false;
  11414. isDanceStart12F = false;
  11415. isDanceStart13F = false;
  11416. isDanceStart14F = false;
  11417. isDanceStart15F = false;
  11418. for (int j = 0; j < maidCnt; j++)
  11419. {
  11420. danceFace[j] = 0f;
  11421. }
  11422. if (isDanceStart7V)
  11423. {
  11424. for (int j = 0; j < maidCnt; j++)
  11425. {
  11426. if (maidArray[j] && maidArray[j].Visible)
  11427. {
  11428. if (isDanceStart7V)
  11429. {
  11430. maidArray[j].SetPos(dancePos[j]);
  11431. maidArray[j].body0.transform.localRotation = danceRot[j];
  11432. }
  11433. }
  11434. }
  11435. isDanceStart7V = false;
  11436. }
  11437. if (isDanceStart8V)
  11438. {
  11439. for (int j = 0; j < maidCnt; j++)
  11440. {
  11441. if (maidArray[j] && maidArray[j].Visible)
  11442. {
  11443. if (isDanceStart8V)
  11444. {
  11445. maidArray[j].SetPos(dancePos[j]);
  11446. maidArray[j].body0.transform.localRotation = danceRot[j];
  11447. }
  11448. }
  11449. }
  11450. isDanceStart8V = false;
  11451. isDanceStart8P = false;
  11452. }
  11453. if (isDanceStart11V)
  11454. {
  11455. for (int j = 0; j < maidCnt; j++)
  11456. {
  11457. if (maidArray[j] && maidArray[j].Visible)
  11458. {
  11459. if (isDanceStart11V)
  11460. {
  11461. maidArray[j].SetPos(dancePos[j]);
  11462. maidArray[j].body0.transform.localRotation = danceRot[j];
  11463. }
  11464. }
  11465. }
  11466. isDanceStart11V = false;
  11467. }
  11468. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  11469. {
  11470. for (int j = 0; j < maidCnt; j++)
  11471. {
  11472. if (maidArray[j] && maidArray[j].Visible)
  11473. {
  11474. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  11475. {
  11476. maidArray[j].SetPos(dancePos[j]);
  11477. maidArray[j].body0.transform.localRotation = danceRot[j];
  11478. int i = j;
  11479. if (!isVR)
  11480. {
  11481. delCount[i] = 20;
  11482. if (goSlot[(int)selectList[i]] != null)
  11483. {
  11484. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11485. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11486. {
  11487. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11488. }
  11489. }
  11490. }
  11491. Maid maid = maidArray[j];
  11492. maid.DelProp(MPN.handitem, true);
  11493. maid.DelProp(MPN.accvag, true);
  11494. maid.DelProp(MPN.accanl, true);
  11495. maid.DelProp(MPN.kousoku_upper, true);
  11496. maid.DelProp(MPN.kousoku_lower, true);
  11497. maid.AllProcPropSeqStart();
  11498. }
  11499. }
  11500. }
  11501. isDanceStart1K = false;
  11502. isDanceStart3K = false;
  11503. isDanceStart4K = false;
  11504. isDanceStart5K = false;
  11505. isDanceStart6K = false;
  11506. isDanceStart9K = false;
  11507. isDanceStart13K = false;
  11508. }
  11509. if (isDanceStart14V)
  11510. {
  11511. for (int j = 0; j < maidCnt; j++)
  11512. {
  11513. if (maidArray[j] && maidArray[j].Visible)
  11514. {
  11515. if (isDanceStart14V)
  11516. {
  11517. maidArray[j].SetPos(dancePos[j]);
  11518. maidArray[j].body0.transform.localRotation = danceRot[j];
  11519. }
  11520. }
  11521. }
  11522. isDanceStart14V = false;
  11523. }
  11524. if (isDanceStart15V)
  11525. {
  11526. for (int j = 0; j < maidCnt; j++)
  11527. {
  11528. if (maidArray[j] && maidArray[j].Visible)
  11529. {
  11530. if (isDanceStart15V)
  11531. {
  11532. maidArray[j].SetPos(dancePos[j]);
  11533. maidArray[j].body0.transform.localRotation = danceRot[j];
  11534. }
  11535. }
  11536. }
  11537. isDanceStart15V = false;
  11538. }
  11539. for (int j = 0; j < maidCnt; j++)
  11540. {
  11541. isStop[j] = false;
  11542. isLock[j] = false;
  11543. pHandL[j] = 0;
  11544. pHandR[j] = 0;
  11545. muneIKL[j] = false;
  11546. muneIKR[j] = false;
  11547. if (!isVR)
  11548. {
  11549. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11550. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11551. }
  11552. if (maidArray[j].transform.position.y != 100f)
  11553. {
  11554. dancePos[j] = maidArray[j].transform.position;
  11555. }
  11556. else
  11557. {
  11558. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11559. }
  11560. danceRot[j] = maidArray[j].transform.localRotation;
  11561. }
  11562. if (maidArray[1] && maidArray[1].Visible)
  11563. {
  11564. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11565. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11566. }
  11567. if (maidArray[3] && maidArray[3].Visible)
  11568. {
  11569. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11570. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11571. }
  11572. if (maidArray[5] && maidArray[5].Visible)
  11573. {
  11574. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11575. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11576. }
  11577. if (maidArray[7] && maidArray[7].Visible)
  11578. {
  11579. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11580. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11581. }
  11582. if (maidArray[9] && maidArray[9].Visible)
  11583. {
  11584. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11585. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11586. }
  11587. if (maidArray[11] && maidArray[11].Visible)
  11588. {
  11589. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11590. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11591. }
  11592. if (maidArray[13] && maidArray[13].Visible)
  11593. {
  11594. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11595. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11596. }
  11597. if (maidArray[2] && maidArray[2].Visible)
  11598. {
  11599. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11600. {
  11601. Vector3 vector = Vector3.zero;
  11602. vector.x = 0.6f;
  11603. maidArray[1].SetPos(vector);
  11604. if (maidArray[2] && maidArray[2].Visible)
  11605. {
  11606. vector.x = -0.6f;
  11607. maidArray[2].SetPos(vector);
  11608. }
  11609. if (maidArray[3] && maidArray[3].Visible)
  11610. {
  11611. vector.x = 1.2f;
  11612. maidArray[3].SetPos(vector);
  11613. }
  11614. if (maidArray[4] && maidArray[4].Visible)
  11615. {
  11616. vector.x = -1.2f;
  11617. maidArray[4].SetPos(vector);
  11618. }
  11619. if (maidArray[5] && maidArray[5].Visible)
  11620. {
  11621. vector.x = 1.8f;
  11622. maidArray[5].SetPos(vector);
  11623. }
  11624. if (maidArray[6] && maidArray[6].Visible)
  11625. {
  11626. vector.x = -1.8f;
  11627. maidArray[6].SetPos(vector);
  11628. }
  11629. if (maidArray[7] && maidArray[7].Visible)
  11630. {
  11631. vector.x = 2.4f;
  11632. maidArray[7].SetPos(vector);
  11633. }
  11634. if (maidArray[8] && maidArray[8].Visible)
  11635. {
  11636. vector.x = -2.4f;
  11637. maidArray[8].SetPos(vector);
  11638. }
  11639. if (maidArray[9] && maidArray[9].Visible)
  11640. {
  11641. vector.x = 3f;
  11642. maidArray[9].SetPos(vector);
  11643. }
  11644. if (maidArray[10] && maidArray[10].Visible)
  11645. {
  11646. vector.x = -3f;
  11647. maidArray[10].SetPos(vector);
  11648. }
  11649. if (maidArray[11] && maidArray[11].Visible)
  11650. {
  11651. vector.x = 3.6f;
  11652. maidArray[11].SetPos(vector);
  11653. }
  11654. if (maidArray[12] && maidArray[12].Visible)
  11655. {
  11656. vector.x = -3.6f;
  11657. maidArray[12].SetPos(vector);
  11658. }
  11659. if (maidArray[13] && maidArray[13].Visible)
  11660. {
  11661. vector.x = 4.2f;
  11662. maidArray[13].SetPos(vector);
  11663. }
  11664. }
  11665. }
  11666. isDance = true;
  11667. isDanceStart7 = true;
  11668. isHS4 = false;
  11669. isHS5 = false;
  11670. isHS6 = false;
  11671. }
  11672. if (isHS7 || isHS8 || isHS9)
  11673. {
  11674. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11675. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11676. for (int j = 0; j < maidCnt; j++)
  11677. {
  11678. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11679. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11680. switch (j)
  11681. {
  11682. case 1:
  11683. case 5:
  11684. case 9:
  11685. case 13:
  11686. text5 = "dance_cm3d2_003_hs_f2.anm";
  11687. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11688. break;
  11689. case 2:
  11690. case 6:
  11691. case 10:
  11692. text5 = "dance_cm3d2_003_hs_f3.anm";
  11693. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11694. break;
  11695. case 3:
  11696. case 7:
  11697. case 11:
  11698. text5 = "dance_cm3d2_003_hs_f4.anm";
  11699. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11700. break;
  11701. }
  11702. if (maidArray[j] && maidArray[j].Visible)
  11703. {
  11704. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11705. {
  11706. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11707. }
  11708. }
  11709. string text4 = textAsset.text;
  11710. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11711. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11712. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11713. }
  11714. if (isHS7)
  11715. {
  11716. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11717. }
  11718. if (isHS8)
  11719. {
  11720. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11721. }
  11722. if (isHS9)
  11723. {
  11724. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11725. }
  11726. ikBui = 5;
  11727. isDanceStart1F = false;
  11728. isDanceStart2F = false;
  11729. isDanceStart3F = false;
  11730. isDanceStart4F = false;
  11731. isDanceStart5F = false;
  11732. isDanceStart6F = false;
  11733. isDanceStart7F = false;
  11734. isDanceStart8F = false;
  11735. isDanceStart9F = false;
  11736. isDanceStart10F = false;
  11737. isDanceStart11F = false;
  11738. isDanceStart12F = false;
  11739. isDanceStart13F = false;
  11740. isDanceStart14F = false;
  11741. isDanceStart15F = false;
  11742. for (int j = 0; j < maidCnt; j++)
  11743. {
  11744. danceFace[j] = 0f;
  11745. }
  11746. if (isDanceStart8V)
  11747. {
  11748. for (int j = 0; j < maidCnt; j++)
  11749. {
  11750. if (maidArray[j] && maidArray[j].Visible)
  11751. {
  11752. if (isDanceStart8V)
  11753. {
  11754. maidArray[j].SetPos(dancePos[j]);
  11755. maidArray[j].body0.transform.localRotation = danceRot[j];
  11756. }
  11757. }
  11758. }
  11759. isDanceStart8V = false;
  11760. isDanceStart8P = false;
  11761. }
  11762. for (int j = 0; j < maidCnt; j++)
  11763. {
  11764. isStop[j] = false;
  11765. isLock[j] = false;
  11766. pHandL[j] = 0;
  11767. pHandR[j] = 0;
  11768. muneIKL[j] = false;
  11769. muneIKR[j] = false;
  11770. if (!isVR)
  11771. {
  11772. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11773. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11774. }
  11775. if (maidArray[j].transform.position.y != 100f)
  11776. {
  11777. dancePos[j] = maidArray[j].transform.position;
  11778. }
  11779. else
  11780. {
  11781. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11782. }
  11783. danceRot[j] = maidArray[j].transform.localRotation;
  11784. }
  11785. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f) && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11786. {
  11787. maidArray[0].SetPos(Vector3.zero);
  11788. maidArray[0].SetRot(Vector3.zero);
  11789. }
  11790. if (maidArray[1] && maidArray[1].Visible)
  11791. {
  11792. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11793. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11794. }
  11795. if (maidArray[2] && maidArray[2].Visible)
  11796. {
  11797. maidArray[2].SetPos(maidArray[0].transform.position);
  11798. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11799. }
  11800. if (maidArray[3] && maidArray[3].Visible)
  11801. {
  11802. maidArray[3].SetPos(maidArray[0].transform.position);
  11803. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11804. }
  11805. if (maidArray[5] && maidArray[5].Visible)
  11806. {
  11807. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11808. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11809. }
  11810. if (maidArray[6] && maidArray[6].Visible)
  11811. {
  11812. maidArray[6].SetPos(maidArray[4].transform.position);
  11813. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11814. }
  11815. if (maidArray[7] && maidArray[7].Visible)
  11816. {
  11817. maidArray[7].SetPos(maidArray[4].transform.position);
  11818. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11819. }
  11820. if (maidArray[9] && maidArray[9].Visible)
  11821. {
  11822. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11823. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11824. }
  11825. if (maidArray[10] && maidArray[10].Visible)
  11826. {
  11827. maidArray[10].SetPos(maidArray[8].transform.position);
  11828. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11829. }
  11830. if (maidArray[11] && maidArray[11].Visible)
  11831. {
  11832. maidArray[11].SetPos(maidArray[8].transform.position);
  11833. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11834. }
  11835. if (maidArray[13] && maidArray[13].Visible)
  11836. {
  11837. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11838. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11839. }
  11840. if (maidArray[4] && maidArray[4].Visible)
  11841. {
  11842. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11843. {
  11844. Vector3 vector = Vector3.zero;
  11845. vector.x = 0.6f;
  11846. maidArray[1].SetPos(vector);
  11847. if (maidArray[2] && maidArray[2].Visible)
  11848. {
  11849. vector.x = -0.6f;
  11850. maidArray[2].SetPos(vector);
  11851. }
  11852. if (maidArray[3] && maidArray[3].Visible)
  11853. {
  11854. vector.x = 1.2f;
  11855. maidArray[3].SetPos(vector);
  11856. }
  11857. if (maidArray[4] && maidArray[4].Visible)
  11858. {
  11859. vector.x = -1.2f;
  11860. maidArray[4].SetPos(vector);
  11861. }
  11862. if (maidArray[5] && maidArray[5].Visible)
  11863. {
  11864. vector.x = 1.8f;
  11865. maidArray[5].SetPos(vector);
  11866. }
  11867. if (maidArray[6] && maidArray[6].Visible)
  11868. {
  11869. vector.x = -1.8f;
  11870. maidArray[6].SetPos(vector);
  11871. }
  11872. if (maidArray[7] && maidArray[7].Visible)
  11873. {
  11874. vector.x = 2.4f;
  11875. maidArray[7].SetPos(vector);
  11876. }
  11877. if (maidArray[8] && maidArray[8].Visible)
  11878. {
  11879. vector.x = -2.4f;
  11880. maidArray[8].SetPos(vector);
  11881. }
  11882. if (maidArray[9] && maidArray[9].Visible)
  11883. {
  11884. vector.x = 3f;
  11885. maidArray[9].SetPos(vector);
  11886. }
  11887. if (maidArray[10] && maidArray[10].Visible)
  11888. {
  11889. vector.x = -3f;
  11890. maidArray[10].SetPos(vector);
  11891. }
  11892. if (maidArray[11] && maidArray[11].Visible)
  11893. {
  11894. vector.x = 3.6f;
  11895. maidArray[11].SetPos(vector);
  11896. }
  11897. if (maidArray[12] && maidArray[12].Visible)
  11898. {
  11899. vector.x = -3.6f;
  11900. maidArray[12].SetPos(vector);
  11901. }
  11902. if (maidArray[13] && maidArray[13].Visible)
  11903. {
  11904. vector.x = 4.2f;
  11905. maidArray[13].SetPos(vector);
  11906. }
  11907. }
  11908. }
  11909. isDance = true;
  11910. isDanceStart8 = true;
  11911. isHS7 = false;
  11912. isHS8 = false;
  11913. isHS9 = false;
  11914. }
  11915. if (isCF1)
  11916. {
  11917. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11918. string text4 = textAsset.text;
  11919. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11920. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11921. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11922. for (int j = 0; j < maidCnt; j++)
  11923. {
  11924. if (!isShift)
  11925. {
  11926. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11927. {
  11928. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm", GameUty.FileSystem, "dance_cm3d_003_sp2_f1.anm", false, false);
  11929. }
  11930. }
  11931. else
  11932. {
  11933. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11934. {
  11935. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara02_002_rty_f1.anm", false, false);
  11936. }
  11937. textAsset = (Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset);
  11938. text4 = textAsset.text;
  11939. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11940. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  11941. {
  11942. dancePos[j] = maidArray[j].transform.position;
  11943. danceRot[j] = maidArray[j].transform.localRotation;
  11944. }
  11945. }
  11946. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11947. }
  11948. if (!isShift)
  11949. {
  11950. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11951. }
  11952. else
  11953. {
  11954. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11955. }
  11956. for (int j = 0; j < maidCnt; j++)
  11957. {
  11958. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11959. isStop[j] = false;
  11960. isLock[j] = false;
  11961. pHandL[j] = 0;
  11962. pHandR[j] = 0;
  11963. muneIKL[j] = false;
  11964. muneIKR[j] = false;
  11965. if (!isVR)
  11966. {
  11967. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11968. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11969. }
  11970. }
  11971. ikBui = 5;
  11972. isDanceStart1F = false;
  11973. isDanceStart2F = false;
  11974. isDanceStart3F = false;
  11975. isDanceStart4F = false;
  11976. isDanceStart5F = false;
  11977. isDanceStart6F = false;
  11978. isDanceStart7F = false;
  11979. isDanceStart8F = false;
  11980. isDanceStart9F = false;
  11981. isDanceStart10F = false;
  11982. isDanceStart11F = false;
  11983. isDanceStart12F = false;
  11984. isDanceStart13F = false;
  11985. isDanceStart14F = false;
  11986. isDanceStart15F = false;
  11987. for (int j = 0; j < maidCnt; j++)
  11988. {
  11989. danceFace[j] = 0f;
  11990. }
  11991. if (isDanceStart7V)
  11992. {
  11993. for (int j = 0; j < maidCnt; j++)
  11994. {
  11995. if (maidArray[j] && maidArray[j].Visible)
  11996. {
  11997. if (isDanceStart7V)
  11998. {
  11999. maidArray[j].SetPos(dancePos[j]);
  12000. maidArray[j].body0.transform.localRotation = danceRot[j];
  12001. }
  12002. }
  12003. }
  12004. isDanceStart7V = false;
  12005. }
  12006. if (isDanceStart8V)
  12007. {
  12008. for (int j = 0; j < maidCnt; j++)
  12009. {
  12010. if (maidArray[j] && maidArray[j].Visible)
  12011. {
  12012. if (isDanceStart8V)
  12013. {
  12014. maidArray[j].SetPos(dancePos[j]);
  12015. maidArray[j].body0.transform.localRotation = danceRot[j];
  12016. }
  12017. }
  12018. }
  12019. isDanceStart8V = false;
  12020. isDanceStart8P = false;
  12021. }
  12022. if (isDanceStart11V)
  12023. {
  12024. for (int j = 0; j < maidCnt; j++)
  12025. {
  12026. if (maidArray[j] && maidArray[j].Visible)
  12027. {
  12028. if (isDanceStart11V)
  12029. {
  12030. maidArray[j].SetPos(dancePos[j]);
  12031. maidArray[j].body0.transform.localRotation = danceRot[j];
  12032. }
  12033. }
  12034. }
  12035. isDanceStart11V = false;
  12036. }
  12037. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12038. {
  12039. for (int j = 0; j < maidCnt; j++)
  12040. {
  12041. if (maidArray[j] && maidArray[j].Visible)
  12042. {
  12043. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12044. {
  12045. maidArray[j].SetPos(dancePos[j]);
  12046. maidArray[j].body0.transform.localRotation = danceRot[j];
  12047. int i = j;
  12048. if (!isVR)
  12049. {
  12050. delCount[i] = 20;
  12051. if (goSlot[(int)selectList[i]] != null)
  12052. {
  12053. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12054. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12055. {
  12056. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12057. }
  12058. }
  12059. }
  12060. Maid maid = maidArray[j];
  12061. maid.DelProp(MPN.handitem, true);
  12062. maid.DelProp(MPN.accvag, true);
  12063. maid.DelProp(MPN.accanl, true);
  12064. maid.DelProp(MPN.kousoku_upper, true);
  12065. maid.DelProp(MPN.kousoku_lower, true);
  12066. maid.AllProcPropSeqStart();
  12067. }
  12068. }
  12069. }
  12070. isDanceStart1K = false;
  12071. isDanceStart3K = false;
  12072. isDanceStart4K = false;
  12073. isDanceStart5K = false;
  12074. isDanceStart6K = false;
  12075. isDanceStart9K = false;
  12076. isDanceStart13K = false;
  12077. }
  12078. if (isDanceStart14V)
  12079. {
  12080. for (int j = 0; j < maidCnt; j++)
  12081. {
  12082. if (maidArray[j] && maidArray[j].Visible)
  12083. {
  12084. if (isDanceStart14V)
  12085. {
  12086. maidArray[j].SetPos(dancePos[j]);
  12087. maidArray[j].body0.transform.localRotation = danceRot[j];
  12088. }
  12089. }
  12090. }
  12091. isDanceStart14V = false;
  12092. }
  12093. if (isDanceStart15V)
  12094. {
  12095. for (int j = 0; j < maidCnt; j++)
  12096. {
  12097. if (maidArray[j] && maidArray[j].Visible)
  12098. {
  12099. if (isDanceStart15V)
  12100. {
  12101. maidArray[j].SetPos(dancePos[j]);
  12102. maidArray[j].body0.transform.localRotation = danceRot[j];
  12103. }
  12104. }
  12105. }
  12106. isDanceStart15V = false;
  12107. }
  12108. if (maidArray[1] && maidArray[1].Visible)
  12109. {
  12110. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12111. {
  12112. Vector3 vector = Vector3.zero;
  12113. vector.x = 0.6f;
  12114. maidArray[1].SetPos(vector);
  12115. if (maidArray[2] && maidArray[2].Visible)
  12116. {
  12117. vector.x = -0.6f;
  12118. maidArray[2].SetPos(vector);
  12119. }
  12120. if (maidArray[3] && maidArray[3].Visible)
  12121. {
  12122. vector.x = 1.2f;
  12123. maidArray[3].SetPos(vector);
  12124. }
  12125. if (maidArray[4] && maidArray[4].Visible)
  12126. {
  12127. vector.x = -1.2f;
  12128. maidArray[4].SetPos(vector);
  12129. }
  12130. if (maidArray[5] && maidArray[5].Visible)
  12131. {
  12132. vector.x = 1.8f;
  12133. maidArray[5].SetPos(vector);
  12134. }
  12135. if (maidArray[6] && maidArray[6].Visible)
  12136. {
  12137. vector.x = -1.8f;
  12138. maidArray[6].SetPos(vector);
  12139. }
  12140. if (maidArray[7] && maidArray[7].Visible)
  12141. {
  12142. vector.x = 2.4f;
  12143. maidArray[7].SetPos(vector);
  12144. }
  12145. if (maidArray[8] && maidArray[8].Visible)
  12146. {
  12147. vector.x = -2.4f;
  12148. maidArray[8].SetPos(vector);
  12149. }
  12150. if (maidArray[9] && maidArray[9].Visible)
  12151. {
  12152. vector.x = 3f;
  12153. maidArray[9].SetPos(vector);
  12154. }
  12155. if (maidArray[10] && maidArray[10].Visible)
  12156. {
  12157. vector.x = -3f;
  12158. maidArray[10].SetPos(vector);
  12159. }
  12160. if (maidArray[11] && maidArray[11].Visible)
  12161. {
  12162. vector.x = 3.6f;
  12163. maidArray[11].SetPos(vector);
  12164. }
  12165. if (maidArray[12] && maidArray[12].Visible)
  12166. {
  12167. vector.x = -3.6f;
  12168. maidArray[12].SetPos(vector);
  12169. }
  12170. if (maidArray[13] && maidArray[13].Visible)
  12171. {
  12172. vector.x = 4.2f;
  12173. maidArray[13].SetPos(vector);
  12174. }
  12175. }
  12176. }
  12177. if (isShift)
  12178. {
  12179. isDanceStart5K = true;
  12180. for (int j = 0; j < maidCnt; j++)
  12181. {
  12182. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  12183. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  12184. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12185. int i = j;
  12186. Maid maid = maidArray[j];
  12187. if (!isVR)
  12188. {
  12189. delCount[i] = 20;
  12190. if (goSlot[(int)selectList[i]] != null)
  12191. {
  12192. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12193. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12194. {
  12195. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12196. }
  12197. }
  12198. }
  12199. string[] array = new string[2];
  12200. array = text2.Split(new char[]
  12201. {
  12202. ','
  12203. });
  12204. maid.DelProp(MPN.handitem, true);
  12205. maid.DelProp(MPN.accvag, true);
  12206. maid.DelProp(MPN.accanl, true);
  12207. maid.DelProp(MPN.kousoku_upper, true);
  12208. maid.DelProp(MPN.kousoku_lower, true);
  12209. if (array[0] != "")
  12210. {
  12211. maid.SetProp(array[0], array[1], 0, true, false);
  12212. }
  12213. maid.AllProcPropSeqStart();
  12214. }
  12215. }
  12216. isDance = true;
  12217. isDanceStart5 = true;
  12218. isCF1 = false;
  12219. }
  12220. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12221. {
  12222. GameMain.Instance.SoundMgr.StopBGM(0f);
  12223. isCF1 = true;
  12224. if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  12225. {
  12226. isShift = true;
  12227. }
  12228. }
  12229. if (isKT1)
  12230. {
  12231. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12232. string text4 = textAsset.text;
  12233. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12234. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12235. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12236. for (int j = 0; j < maidCnt; j++)
  12237. {
  12238. if (!isShift)
  12239. {
  12240. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12241. {
  12242. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm", GameUty.FileSystem, "dance_cm3d_004_kano_f1.anm", false, false);
  12243. }
  12244. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12245. }
  12246. else
  12247. {
  12248. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12249. {
  12250. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm", GameUty.FileSystem, "dance_cm3d2_kara_002_cktc_f1.anm", false, false);
  12251. }
  12252. textAsset = (Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset);
  12253. text4 = textAsset.text;
  12254. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12255. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  12256. {
  12257. dancePos[j] = maidArray[j].transform.position;
  12258. danceRot[j] = maidArray[j].transform.localRotation;
  12259. }
  12260. }
  12261. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12262. }
  12263. if (!isShift)
  12264. {
  12265. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12266. }
  12267. else
  12268. {
  12269. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12270. }
  12271. for (int j = 0; j < maidCnt; j++)
  12272. {
  12273. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12274. isStop[j] = false;
  12275. isLock[j] = false;
  12276. pHandL[j] = 0;
  12277. pHandR[j] = 0;
  12278. muneIKL[j] = false;
  12279. muneIKR[j] = false;
  12280. if (!isVR)
  12281. {
  12282. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12283. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12284. }
  12285. }
  12286. ikBui = 5;
  12287. isDanceStart1F = false;
  12288. isDanceStart2F = false;
  12289. isDanceStart3F = false;
  12290. isDanceStart4F = false;
  12291. isDanceStart5F = false;
  12292. isDanceStart6F = false;
  12293. isDanceStart7F = false;
  12294. isDanceStart8F = false;
  12295. isDanceStart9F = false;
  12296. isDanceStart10F = false;
  12297. isDanceStart11F = false;
  12298. isDanceStart12F = false;
  12299. isDanceStart13F = false;
  12300. isDanceStart14F = false;
  12301. isDanceStart15F = false;
  12302. for (int j = 0; j < maidCnt; j++)
  12303. {
  12304. danceFace[j] = 0f;
  12305. }
  12306. if (isDanceStart7V)
  12307. {
  12308. for (int j = 0; j < maidCnt; j++)
  12309. {
  12310. if (maidArray[j] && maidArray[j].Visible)
  12311. {
  12312. if (isDanceStart7V)
  12313. {
  12314. maidArray[j].SetPos(dancePos[j]);
  12315. maidArray[j].body0.transform.localRotation = danceRot[j];
  12316. }
  12317. }
  12318. }
  12319. isDanceStart7V = false;
  12320. }
  12321. if (isDanceStart8V)
  12322. {
  12323. for (int j = 0; j < maidCnt; j++)
  12324. {
  12325. if (maidArray[j] && maidArray[j].Visible)
  12326. {
  12327. if (isDanceStart8V)
  12328. {
  12329. maidArray[j].SetPos(dancePos[j]);
  12330. maidArray[j].body0.transform.localRotation = danceRot[j];
  12331. }
  12332. }
  12333. }
  12334. isDanceStart8V = false;
  12335. isDanceStart8P = false;
  12336. }
  12337. if (isDanceStart11V)
  12338. {
  12339. for (int j = 0; j < maidCnt; j++)
  12340. {
  12341. if (maidArray[j] && maidArray[j].Visible)
  12342. {
  12343. if (isDanceStart11V)
  12344. {
  12345. maidArray[j].SetPos(dancePos[j]);
  12346. maidArray[j].body0.transform.localRotation = danceRot[j];
  12347. }
  12348. }
  12349. }
  12350. isDanceStart11V = false;
  12351. }
  12352. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12353. {
  12354. for (int j = 0; j < maidCnt; j++)
  12355. {
  12356. if (maidArray[j] && maidArray[j].Visible)
  12357. {
  12358. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12359. {
  12360. maidArray[j].SetPos(dancePos[j]);
  12361. maidArray[j].body0.transform.localRotation = danceRot[j];
  12362. int i = j;
  12363. if (!isVR)
  12364. {
  12365. delCount[i] = 20;
  12366. if (goSlot[(int)selectList[i]] != null)
  12367. {
  12368. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12369. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12370. {
  12371. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12372. }
  12373. }
  12374. }
  12375. Maid maid = maidArray[j];
  12376. maid.DelProp(MPN.handitem, true);
  12377. maid.DelProp(MPN.accvag, true);
  12378. maid.DelProp(MPN.accanl, true);
  12379. maid.DelProp(MPN.kousoku_upper, true);
  12380. maid.DelProp(MPN.kousoku_lower, true);
  12381. maid.AllProcPropSeqStart();
  12382. }
  12383. }
  12384. }
  12385. isDanceStart1K = false;
  12386. isDanceStart3K = false;
  12387. isDanceStart4K = false;
  12388. isDanceStart5K = false;
  12389. isDanceStart6K = false;
  12390. isDanceStart9K = false;
  12391. isDanceStart13K = false;
  12392. }
  12393. if (isDanceStart14V)
  12394. {
  12395. for (int j = 0; j < maidCnt; j++)
  12396. {
  12397. if (maidArray[j] && maidArray[j].Visible)
  12398. {
  12399. if (isDanceStart14V)
  12400. {
  12401. maidArray[j].SetPos(dancePos[j]);
  12402. maidArray[j].body0.transform.localRotation = danceRot[j];
  12403. }
  12404. }
  12405. }
  12406. isDanceStart14V = false;
  12407. }
  12408. if (isDanceStart15V)
  12409. {
  12410. for (int j = 0; j < maidCnt; j++)
  12411. {
  12412. if (maidArray[j] && maidArray[j].Visible)
  12413. {
  12414. if (isDanceStart15V)
  12415. {
  12416. maidArray[j].SetPos(dancePos[j]);
  12417. maidArray[j].body0.transform.localRotation = danceRot[j];
  12418. }
  12419. }
  12420. }
  12421. isDanceStart15V = false;
  12422. }
  12423. if (maidArray[1] && maidArray[1].Visible)
  12424. {
  12425. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12426. {
  12427. Vector3 vector = Vector3.zero;
  12428. vector.x = 0.6f;
  12429. maidArray[1].SetPos(vector);
  12430. if (maidArray[2] && maidArray[2].Visible)
  12431. {
  12432. vector.x = -0.6f;
  12433. maidArray[2].SetPos(vector);
  12434. }
  12435. if (maidArray[3] && maidArray[3].Visible)
  12436. {
  12437. vector.x = 1.2f;
  12438. maidArray[3].SetPos(vector);
  12439. }
  12440. if (maidArray[4] && maidArray[4].Visible)
  12441. {
  12442. vector.x = -1.2f;
  12443. maidArray[4].SetPos(vector);
  12444. }
  12445. if (maidArray[5] && maidArray[5].Visible)
  12446. {
  12447. vector.x = 1.8f;
  12448. maidArray[5].SetPos(vector);
  12449. }
  12450. if (maidArray[6] && maidArray[6].Visible)
  12451. {
  12452. vector.x = -1.8f;
  12453. maidArray[6].SetPos(vector);
  12454. }
  12455. if (maidArray[7] && maidArray[7].Visible)
  12456. {
  12457. vector.x = 2.4f;
  12458. maidArray[7].SetPos(vector);
  12459. }
  12460. if (maidArray[8] && maidArray[8].Visible)
  12461. {
  12462. vector.x = -2.4f;
  12463. maidArray[8].SetPos(vector);
  12464. }
  12465. if (maidArray[9] && maidArray[9].Visible)
  12466. {
  12467. vector.x = 3f;
  12468. maidArray[9].SetPos(vector);
  12469. }
  12470. if (maidArray[10] && maidArray[10].Visible)
  12471. {
  12472. vector.x = -3f;
  12473. maidArray[10].SetPos(vector);
  12474. }
  12475. if (maidArray[11] && maidArray[11].Visible)
  12476. {
  12477. vector.x = 3.6f;
  12478. maidArray[11].SetPos(vector);
  12479. }
  12480. if (maidArray[12] && maidArray[12].Visible)
  12481. {
  12482. vector.x = -3.6f;
  12483. maidArray[12].SetPos(vector);
  12484. }
  12485. if (maidArray[13] && maidArray[13].Visible)
  12486. {
  12487. vector.x = 4.2f;
  12488. maidArray[13].SetPos(vector);
  12489. }
  12490. }
  12491. }
  12492. if (maidArray[2] && maidArray[2].Visible)
  12493. {
  12494. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12495. {
  12496. Vector3 vector = Vector3.zero;
  12497. vector.x = 0.6f;
  12498. maidArray[1].SetPos(vector);
  12499. if (maidArray[2] && maidArray[2].Visible)
  12500. {
  12501. vector.x = -0.6f;
  12502. maidArray[2].SetPos(vector);
  12503. }
  12504. if (maidArray[3] && maidArray[3].Visible)
  12505. {
  12506. vector.x = 1.2f;
  12507. maidArray[3].SetPos(vector);
  12508. }
  12509. if (maidArray[4] && maidArray[4].Visible)
  12510. {
  12511. vector.x = -1.2f;
  12512. maidArray[4].SetPos(vector);
  12513. }
  12514. if (maidArray[5] && maidArray[5].Visible)
  12515. {
  12516. vector.x = 1.8f;
  12517. maidArray[5].SetPos(vector);
  12518. }
  12519. if (maidArray[6] && maidArray[6].Visible)
  12520. {
  12521. vector.x = -1.8f;
  12522. maidArray[6].SetPos(vector);
  12523. }
  12524. if (maidArray[7] && maidArray[7].Visible)
  12525. {
  12526. vector.x = 2.4f;
  12527. maidArray[7].SetPos(vector);
  12528. }
  12529. if (maidArray[8] && maidArray[8].Visible)
  12530. {
  12531. vector.x = -2.4f;
  12532. maidArray[8].SetPos(vector);
  12533. }
  12534. if (maidArray[9] && maidArray[9].Visible)
  12535. {
  12536. vector.x = 3f;
  12537. maidArray[9].SetPos(vector);
  12538. }
  12539. if (maidArray[10] && maidArray[10].Visible)
  12540. {
  12541. vector.x = -3f;
  12542. maidArray[10].SetPos(vector);
  12543. }
  12544. if (maidArray[11] && maidArray[11].Visible)
  12545. {
  12546. vector.x = 3.6f;
  12547. maidArray[11].SetPos(vector);
  12548. }
  12549. if (maidArray[12] && maidArray[12].Visible)
  12550. {
  12551. vector.x = -3.6f;
  12552. maidArray[12].SetPos(vector);
  12553. }
  12554. if (maidArray[13] && maidArray[13].Visible)
  12555. {
  12556. vector.x = 4.2f;
  12557. maidArray[13].SetPos(vector);
  12558. }
  12559. }
  12560. }
  12561. if (isShift)
  12562. {
  12563. isDanceStart9K = true;
  12564. for (int j = 0; j < maidCnt; j++)
  12565. {
  12566. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  12567. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  12568. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12569. int i = j;
  12570. Maid maid = maidArray[j];
  12571. if (!isVR)
  12572. {
  12573. delCount[i] = 20;
  12574. if (goSlot[(int)selectList[i]] != null)
  12575. {
  12576. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12577. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12578. {
  12579. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12580. }
  12581. }
  12582. }
  12583. string[] array = new string[2];
  12584. array = text2.Split(new char[]
  12585. {
  12586. ','
  12587. });
  12588. maid.DelProp(MPN.handitem, true);
  12589. maid.DelProp(MPN.accvag, true);
  12590. maid.DelProp(MPN.accanl, true);
  12591. maid.DelProp(MPN.kousoku_upper, true);
  12592. maid.DelProp(MPN.kousoku_lower, true);
  12593. if (array[0] != "")
  12594. {
  12595. maid.SetProp(array[0], array[1], 0, true, false);
  12596. }
  12597. maid.AllProcPropSeqStart();
  12598. }
  12599. }
  12600. isDance = true;
  12601. isDanceStart9 = true;
  12602. isKT1 = false;
  12603. }
  12604. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12605. {
  12606. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12607. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12608. if (isSS1)
  12609. {
  12610. nameK = "dance_BlD_m";
  12611. nameA = "dance_cm3d21_002_bid_f";
  12612. nameS = "bloomingdreaming_short";
  12613. danceNo1 = 1;
  12614. danceNo2 = 3;
  12615. danceNo3 = 2;
  12616. }
  12617. if (isSS2)
  12618. {
  12619. nameK = "dance_KAD_m";
  12620. nameA = "dance_cm3d21_003_kad_f";
  12621. nameS = "kiminiaijodelicious_short";
  12622. danceNo1 = 1;
  12623. danceNo2 = 2;
  12624. danceNo3 = 3;
  12625. }
  12626. if (isSS3)
  12627. {
  12628. nameK = "dance_LUM_m";
  12629. nameA = "dance_cm3d21_004_lm_f";
  12630. nameS = "luminousmoment_short";
  12631. danceNo1 = 3;
  12632. danceNo2 = 1;
  12633. danceNo3 = 2;
  12634. }
  12635. if (isSS4)
  12636. {
  12637. nameK = "dance_NmF_m";
  12638. nameA = "dance_cm3d21_001_nmf_f";
  12639. nameS = "nightmagicfire_short";
  12640. danceNo1 = 2;
  12641. danceNo2 = 1;
  12642. danceNo3 = 3;
  12643. }
  12644. if (isSS5)
  12645. {
  12646. nameK = "dance_MoE_m";
  12647. nameA = "dance_cm3d21_005_moe_f";
  12648. nameS = "melodyofempire_short";
  12649. danceNo1 = 1;
  12650. danceNo2 = 3;
  12651. danceNo3 = 2;
  12652. }
  12653. if (isSS6)
  12654. {
  12655. nameK = "dance_NmF_m";
  12656. nameA = "dance_cm3d21_kara_001_nmf_f";
  12657. nameS = "nightmagicfire_short";
  12658. danceNo1 = 1;
  12659. danceNo2 = 1;
  12660. danceNo3 = 1;
  12661. }
  12662. for (int j = 0; j < maidCnt; j++)
  12663. {
  12664. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12665. string text5 = nameA + danceNo1 + ".anm";
  12666. switch (j)
  12667. {
  12668. case 1:
  12669. case 4:
  12670. case 7:
  12671. case 10:
  12672. case 13:
  12673. text5 = nameA + danceNo2 + ".anm";
  12674. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset);
  12675. break;
  12676. case 2:
  12677. case 5:
  12678. case 8:
  12679. case 11:
  12680. text5 = nameA + danceNo3 + ".anm";
  12681. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset);
  12682. break;
  12683. }
  12684. if (maidArray[j] && maidArray[j].Visible)
  12685. {
  12686. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12687. {
  12688. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12689. }
  12690. string text4 = textAsset.text;
  12691. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12692. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12693. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12694. }
  12695. }
  12696. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12697. ikBui = 5;
  12698. isDanceStart1F = false;
  12699. isDanceStart2F = false;
  12700. isDanceStart3F = false;
  12701. isDanceStart4F = false;
  12702. isDanceStart5F = false;
  12703. isDanceStart6F = false;
  12704. isDanceStart7F = false;
  12705. isDanceStart8F = false;
  12706. isDanceStart9F = false;
  12707. isDanceStart10F = false;
  12708. isDanceStart11F = false;
  12709. isDanceStart12F = false;
  12710. isDanceStart13F = false;
  12711. isDanceStart14F = false;
  12712. isDanceStart15F = false;
  12713. for (int j = 0; j < maidCnt; j++)
  12714. {
  12715. danceFace[j] = 0f;
  12716. }
  12717. if (isDanceStart7V)
  12718. {
  12719. for (int j = 0; j < maidCnt; j++)
  12720. {
  12721. if (maidArray[j] && maidArray[j].Visible)
  12722. {
  12723. if (isDanceStart7V)
  12724. {
  12725. maidArray[j].SetPos(dancePos[j]);
  12726. maidArray[j].body0.transform.localRotation = danceRot[j];
  12727. }
  12728. }
  12729. }
  12730. isDanceStart7V = false;
  12731. }
  12732. if (isDanceStart8V)
  12733. {
  12734. for (int j = 0; j < maidCnt; j++)
  12735. {
  12736. if (maidArray[j] && maidArray[j].Visible)
  12737. {
  12738. if (isDanceStart8V)
  12739. {
  12740. maidArray[j].SetPos(dancePos[j]);
  12741. maidArray[j].body0.transform.localRotation = danceRot[j];
  12742. }
  12743. }
  12744. }
  12745. isDanceStart8V = false;
  12746. isDanceStart8P = false;
  12747. }
  12748. if (isDanceStart11V)
  12749. {
  12750. for (int j = 0; j < maidCnt; j++)
  12751. {
  12752. if (maidArray[j] && maidArray[j].Visible)
  12753. {
  12754. if (isDanceStart11V)
  12755. {
  12756. maidArray[j].SetPos(dancePos[j]);
  12757. maidArray[j].body0.transform.localRotation = danceRot[j];
  12758. }
  12759. }
  12760. }
  12761. isDanceStart11V = false;
  12762. }
  12763. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12764. {
  12765. for (int j = 0; j < maidCnt; j++)
  12766. {
  12767. if (maidArray[j] && maidArray[j].Visible)
  12768. {
  12769. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  12770. {
  12771. maidArray[j].SetPos(dancePos[j]);
  12772. maidArray[j].body0.transform.localRotation = danceRot[j];
  12773. int i = j;
  12774. if (!isVR)
  12775. {
  12776. delCount[i] = 20;
  12777. if (goSlot[(int)selectList[i]] != null)
  12778. {
  12779. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12780. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12781. {
  12782. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12783. }
  12784. }
  12785. }
  12786. Maid maid = maidArray[j];
  12787. maid.DelProp(MPN.handitem, true);
  12788. maid.DelProp(MPN.accvag, true);
  12789. maid.DelProp(MPN.accanl, true);
  12790. maid.DelProp(MPN.kousoku_upper, true);
  12791. maid.DelProp(MPN.kousoku_lower, true);
  12792. maid.AllProcPropSeqStart();
  12793. }
  12794. }
  12795. }
  12796. isDanceStart1K = false;
  12797. isDanceStart3K = false;
  12798. isDanceStart4K = false;
  12799. isDanceStart5K = false;
  12800. isDanceStart6K = false;
  12801. isDanceStart9K = false;
  12802. isDanceStart13K = false;
  12803. }
  12804. if (isDanceStart14V)
  12805. {
  12806. for (int j = 0; j < maidCnt; j++)
  12807. {
  12808. if (maidArray[j] && maidArray[j].Visible)
  12809. {
  12810. if (isDanceStart14V)
  12811. {
  12812. maidArray[j].SetPos(dancePos[j]);
  12813. maidArray[j].body0.transform.localRotation = danceRot[j];
  12814. }
  12815. }
  12816. }
  12817. isDanceStart14V = false;
  12818. }
  12819. if (isDanceStart15V)
  12820. {
  12821. for (int j = 0; j < maidCnt; j++)
  12822. {
  12823. if (maidArray[j] && maidArray[j].Visible)
  12824. {
  12825. if (isDanceStart15V)
  12826. {
  12827. maidArray[j].SetPos(dancePos[j]);
  12828. maidArray[j].body0.transform.localRotation = danceRot[j];
  12829. }
  12830. }
  12831. }
  12832. isDanceStart15V = false;
  12833. }
  12834. for (int j = 0; j < maidCnt; j++)
  12835. {
  12836. isStop[j] = false;
  12837. isLock[j] = false;
  12838. pHandL[j] = 0;
  12839. pHandR[j] = 0;
  12840. muneIKL[j] = false;
  12841. muneIKR[j] = false;
  12842. if (!isVR)
  12843. {
  12844. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12845. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12846. }
  12847. if (maidArray[j].transform.position.y != 100f)
  12848. {
  12849. dancePos[j] = maidArray[j].transform.position;
  12850. }
  12851. else
  12852. {
  12853. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12854. }
  12855. danceRot[j] = maidArray[j].transform.localRotation;
  12856. }
  12857. if (maidArray[1] && maidArray[1].Visible)
  12858. {
  12859. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, maidArray[0].transform.position.y, maidArray[0].transform.position.z));
  12860. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12861. }
  12862. if (maidArray[2] && maidArray[2].Visible)
  12863. {
  12864. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x, maidArray[0].transform.position.y, maidArray[0].transform.position.z));
  12865. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12866. }
  12867. if (maidArray[4] && maidArray[4].Visible)
  12868. {
  12869. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x, maidArray[3].transform.position.y, maidArray[3].transform.position.z));
  12870. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12871. }
  12872. if (maidArray[5] && maidArray[5].Visible)
  12873. {
  12874. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x, maidArray[3].transform.position.y, maidArray[3].transform.position.z));
  12875. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12876. }
  12877. if (maidArray[7] && maidArray[7].Visible)
  12878. {
  12879. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, maidArray[6].transform.position.y, maidArray[6].transform.position.z));
  12880. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12881. }
  12882. if (maidArray[8] && maidArray[8].Visible)
  12883. {
  12884. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x, maidArray[6].transform.position.y, maidArray[6].transform.position.z));
  12885. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12886. }
  12887. if (maidArray[10] && maidArray[10].Visible)
  12888. {
  12889. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x, maidArray[9].transform.position.y, maidArray[9].transform.position.z));
  12890. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12891. }
  12892. if (maidArray[11] && maidArray[11].Visible)
  12893. {
  12894. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x, maidArray[9].transform.position.y, maidArray[9].transform.position.z));
  12895. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12896. }
  12897. if (maidArray[13] && maidArray[13].Visible)
  12898. {
  12899. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, maidArray[12].transform.position.y, maidArray[12].transform.position.z));
  12900. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12901. }
  12902. isSS = false;
  12903. isDance = true;
  12904. isDanceStart11 = true;
  12905. }
  12906. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12907. {
  12908. GameMain.Instance.SoundMgr.StopBGM(0f);
  12909. isSS1 = true;
  12910. isSS2 = false;
  12911. isSS3 = false;
  12912. isSS4 = false;
  12913. isSS5 = false;
  12914. isSS6 = false;
  12915. isSS = true;
  12916. }
  12917. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12918. {
  12919. GameMain.Instance.SoundMgr.StopBGM(0f);
  12920. isSS1 = false;
  12921. isSS2 = true;
  12922. isSS3 = false;
  12923. isSS4 = false;
  12924. isSS5 = false;
  12925. isSS6 = false;
  12926. isSS = true;
  12927. }
  12928. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12929. {
  12930. GameMain.Instance.SoundMgr.StopBGM(0f);
  12931. isSS1 = false;
  12932. isSS2 = false;
  12933. isSS3 = true;
  12934. isSS4 = false;
  12935. isSS5 = false;
  12936. isSS6 = false;
  12937. isSS = true;
  12938. }
  12939. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12940. {
  12941. GameMain.Instance.SoundMgr.StopBGM(0f);
  12942. isSS1 = false;
  12943. isSS2 = false;
  12944. isSS3 = false;
  12945. isSS4 = true;
  12946. isSS5 = false;
  12947. isSS6 = false;
  12948. isSS = true;
  12949. }
  12950. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12951. {
  12952. GameMain.Instance.SoundMgr.StopBGM(0f);
  12953. isSS1 = false;
  12954. isSS2 = false;
  12955. isSS3 = false;
  12956. isSS4 = false;
  12957. isSS5 = true;
  12958. isSS6 = false;
  12959. isSS = true;
  12960. }
  12961. if (isKHG1 || isKHG2)
  12962. {
  12963. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12964. string text4 = textAsset.text;
  12965. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12966. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12967. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12968. for (int j = 0; j < maidCnt; j++)
  12969. {
  12970. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12971. {
  12972. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm", GameUty.FileSystem, "dance_cm3d2_005_khg_f.anm", false, false);
  12973. }
  12974. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12975. }
  12976. if (isKHG1)
  12977. {
  12978. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12979. }
  12980. if (isKHG2)
  12981. {
  12982. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12983. }
  12984. for (int j = 0; j < maidCnt; j++)
  12985. {
  12986. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12987. isStop[j] = false;
  12988. isLock[j] = false;
  12989. pHandL[j] = 0;
  12990. pHandR[j] = 0;
  12991. muneIKL[j] = false;
  12992. muneIKR[j] = false;
  12993. if (!isVR)
  12994. {
  12995. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12996. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12997. }
  12998. }
  12999. ikBui = 5;
  13000. isDanceStart1F = false;
  13001. isDanceStart2F = false;
  13002. isDanceStart3F = false;
  13003. isDanceStart4F = false;
  13004. isDanceStart5F = false;
  13005. isDanceStart6F = false;
  13006. isDanceStart7F = false;
  13007. isDanceStart8F = false;
  13008. isDanceStart9F = false;
  13009. isDanceStart10F = false;
  13010. isDanceStart11F = false;
  13011. isDanceStart12F = false;
  13012. isDanceStart13F = false;
  13013. isDanceStart14F = false;
  13014. isDanceStart15F = false;
  13015. for (int j = 0; j < maidCnt; j++)
  13016. {
  13017. danceFace[j] = 0f;
  13018. }
  13019. if (isDanceStart7V)
  13020. {
  13021. for (int j = 0; j < maidCnt; j++)
  13022. {
  13023. if (maidArray[j] && maidArray[j].Visible)
  13024. {
  13025. if (isDanceStart7V)
  13026. {
  13027. maidArray[j].SetPos(dancePos[j]);
  13028. maidArray[j].body0.transform.localRotation = danceRot[j];
  13029. }
  13030. }
  13031. }
  13032. isDanceStart7V = false;
  13033. }
  13034. if (isDanceStart8V)
  13035. {
  13036. for (int j = 0; j < maidCnt; j++)
  13037. {
  13038. if (maidArray[j] && maidArray[j].Visible)
  13039. {
  13040. if (isDanceStart8V)
  13041. {
  13042. maidArray[j].SetPos(dancePos[j]);
  13043. maidArray[j].body0.transform.localRotation = danceRot[j];
  13044. }
  13045. }
  13046. }
  13047. isDanceStart8V = false;
  13048. isDanceStart8P = false;
  13049. }
  13050. if (isDanceStart11V)
  13051. {
  13052. for (int j = 0; j < maidCnt; j++)
  13053. {
  13054. if (maidArray[j] && maidArray[j].Visible)
  13055. {
  13056. if (isDanceStart11V)
  13057. {
  13058. maidArray[j].SetPos(dancePos[j]);
  13059. maidArray[j].body0.transform.localRotation = danceRot[j];
  13060. }
  13061. }
  13062. }
  13063. isDanceStart11V = false;
  13064. }
  13065. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13066. {
  13067. for (int j = 0; j < maidCnt; j++)
  13068. {
  13069. if (maidArray[j] && maidArray[j].Visible)
  13070. {
  13071. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13072. {
  13073. maidArray[j].SetPos(dancePos[j]);
  13074. maidArray[j].body0.transform.localRotation = danceRot[j];
  13075. int i = j;
  13076. if (!isVR)
  13077. {
  13078. delCount[i] = 20;
  13079. if (goSlot[(int)selectList[i]] != null)
  13080. {
  13081. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13082. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13083. {
  13084. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13085. }
  13086. }
  13087. }
  13088. Maid maid = maidArray[j];
  13089. maid.DelProp(MPN.handitem, true);
  13090. maid.DelProp(MPN.accvag, true);
  13091. maid.DelProp(MPN.accanl, true);
  13092. maid.DelProp(MPN.kousoku_upper, true);
  13093. maid.DelProp(MPN.kousoku_lower, true);
  13094. maid.AllProcPropSeqStart();
  13095. }
  13096. }
  13097. }
  13098. isDanceStart1K = false;
  13099. isDanceStart3K = false;
  13100. isDanceStart4K = false;
  13101. isDanceStart5K = false;
  13102. isDanceStart6K = false;
  13103. isDanceStart9K = false;
  13104. isDanceStart13K = false;
  13105. }
  13106. if (isDanceStart14V)
  13107. {
  13108. for (int j = 0; j < maidCnt; j++)
  13109. {
  13110. if (maidArray[j] && maidArray[j].Visible)
  13111. {
  13112. if (isDanceStart14V)
  13113. {
  13114. maidArray[j].SetPos(dancePos[j]);
  13115. maidArray[j].body0.transform.localRotation = danceRot[j];
  13116. }
  13117. }
  13118. }
  13119. isDanceStart14V = false;
  13120. }
  13121. if (isDanceStart15V)
  13122. {
  13123. for (int j = 0; j < maidCnt; j++)
  13124. {
  13125. if (maidArray[j] && maidArray[j].Visible)
  13126. {
  13127. if (isDanceStart15V)
  13128. {
  13129. maidArray[j].SetPos(dancePos[j]);
  13130. maidArray[j].body0.transform.localRotation = danceRot[j];
  13131. }
  13132. }
  13133. }
  13134. isDanceStart15V = false;
  13135. }
  13136. if (maidArray[1] && maidArray[1].Visible)
  13137. {
  13138. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13139. {
  13140. Vector3 vector = Vector3.zero;
  13141. vector.x = 0.6f;
  13142. maidArray[1].SetPos(vector);
  13143. if (maidArray[2] && maidArray[2].Visible)
  13144. {
  13145. vector.x = -0.6f;
  13146. maidArray[2].SetPos(vector);
  13147. }
  13148. if (maidArray[3] && maidArray[3].Visible)
  13149. {
  13150. vector.x = 1.2f;
  13151. maidArray[3].SetPos(vector);
  13152. }
  13153. if (maidArray[4] && maidArray[4].Visible)
  13154. {
  13155. vector.x = -1.2f;
  13156. maidArray[4].SetPos(vector);
  13157. }
  13158. if (maidArray[5] && maidArray[5].Visible)
  13159. {
  13160. vector.x = 1.8f;
  13161. maidArray[5].SetPos(vector);
  13162. }
  13163. if (maidArray[6] && maidArray[6].Visible)
  13164. {
  13165. vector.x = -1.8f;
  13166. maidArray[6].SetPos(vector);
  13167. }
  13168. if (maidArray[7] && maidArray[7].Visible)
  13169. {
  13170. vector.x = 2.4f;
  13171. maidArray[7].SetPos(vector);
  13172. }
  13173. if (maidArray[8] && maidArray[8].Visible)
  13174. {
  13175. vector.x = -2.4f;
  13176. maidArray[8].SetPos(vector);
  13177. }
  13178. if (maidArray[9] && maidArray[9].Visible)
  13179. {
  13180. vector.x = 3f;
  13181. maidArray[9].SetPos(vector);
  13182. }
  13183. if (maidArray[10] && maidArray[10].Visible)
  13184. {
  13185. vector.x = -3f;
  13186. maidArray[10].SetPos(vector);
  13187. }
  13188. if (maidArray[11] && maidArray[11].Visible)
  13189. {
  13190. vector.x = 3.6f;
  13191. maidArray[11].SetPos(vector);
  13192. }
  13193. if (maidArray[12] && maidArray[12].Visible)
  13194. {
  13195. vector.x = -3.6f;
  13196. maidArray[12].SetPos(vector);
  13197. }
  13198. if (maidArray[13] && maidArray[13].Visible)
  13199. {
  13200. vector.x = 4.2f;
  13201. maidArray[13].SetPos(vector);
  13202. }
  13203. }
  13204. }
  13205. isDance = true;
  13206. isDanceStart12 = true;
  13207. isKHG1 = false;
  13208. isKHG2 = false;
  13209. }
  13210. if (isDanceStart13Count > 0)
  13211. {
  13212. isDanceStart13Count++;
  13213. }
  13214. if (isDanceStart13Count == 1)
  13215. {
  13216. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13217. isDanceStart13Count = 0;
  13218. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13219. string text4 = textAsset.text;
  13220. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13221. for (int j = 0; j < maidCnt; j++)
  13222. {
  13223. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13224. }
  13225. }
  13226. if ((isSN1 || isSN2 || isSN3) && isShift)
  13227. {
  13228. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13229. string text4 = textAsset.text;
  13230. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13231. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13232. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13233. for (int j = 0; j < maidCnt; j++)
  13234. {
  13235. if (!isShift)
  13236. {
  13237. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13238. {
  13239. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm", GameUty.FileSystem, "dance_cm3d2_006_ssn_f1.anm", false, false);
  13240. }
  13241. }
  13242. else
  13243. {
  13244. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13245. {
  13246. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm", GameUty.FileSystem, "dance_cm3d21_kara_001_nmf_f1.anm", false, false);
  13247. }
  13248. textAsset = (Resources.Load("SceneDance/dance_NmF_m1") as TextAsset);
  13249. string text5 = nameA + danceNo1 + ".anm";
  13250. switch (j)
  13251. {
  13252. case 1:
  13253. case 4:
  13254. case 7:
  13255. case 10:
  13256. case 13:
  13257. textAsset = (Resources.Load("SceneDance/dance_NmF_m0") as TextAsset);
  13258. break;
  13259. case 2:
  13260. case 5:
  13261. case 8:
  13262. case 11:
  13263. textAsset = (Resources.Load("SceneDance/dance_NmF_m2") as TextAsset);
  13264. break;
  13265. }
  13266. text4 = textAsset.text;
  13267. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13268. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K && !isDanceStart9K && !isDanceStart13K)
  13269. {
  13270. dancePos[j] = maidArray[j].transform.position;
  13271. danceRot[j] = maidArray[j].transform.localRotation;
  13272. }
  13273. }
  13274. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13275. }
  13276. if (!isShift)
  13277. {
  13278. if (isSN1)
  13279. {
  13280. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13281. }
  13282. if (isSN2)
  13283. {
  13284. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13285. }
  13286. if (isSN3)
  13287. {
  13288. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13289. }
  13290. }
  13291. else
  13292. {
  13293. danceWait = 400;
  13294. isDanceStart13Count++;
  13295. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13296. }
  13297. for (int j = 0; j < maidCnt; j++)
  13298. {
  13299. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13300. isStop[j] = false;
  13301. isLock[j] = false;
  13302. pHandL[j] = 0;
  13303. pHandR[j] = 0;
  13304. muneIKL[j] = false;
  13305. muneIKR[j] = false;
  13306. if (!isVR)
  13307. {
  13308. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13309. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13310. }
  13311. }
  13312. ikBui = 5;
  13313. isDanceStart1F = false;
  13314. isDanceStart2F = false;
  13315. isDanceStart3F = false;
  13316. isDanceStart4F = false;
  13317. isDanceStart5F = false;
  13318. isDanceStart6F = false;
  13319. isDanceStart7F = false;
  13320. isDanceStart8F = false;
  13321. isDanceStart9F = false;
  13322. isDanceStart10F = false;
  13323. isDanceStart11F = false;
  13324. isDanceStart12F = false;
  13325. isDanceStart13F = false;
  13326. isDanceStart14F = false;
  13327. isDanceStart15F = false;
  13328. for (int j = 0; j < maidCnt; j++)
  13329. {
  13330. danceFace[j] = 0f;
  13331. }
  13332. if (isDanceStart7V)
  13333. {
  13334. for (int j = 0; j < maidCnt; j++)
  13335. {
  13336. if (maidArray[j] && maidArray[j].Visible)
  13337. {
  13338. if (isDanceStart7V)
  13339. {
  13340. maidArray[j].SetPos(dancePos[j]);
  13341. maidArray[j].body0.transform.localRotation = danceRot[j];
  13342. }
  13343. }
  13344. }
  13345. isDanceStart7V = false;
  13346. }
  13347. if (isDanceStart8V)
  13348. {
  13349. for (int j = 0; j < maidCnt; j++)
  13350. {
  13351. if (maidArray[j] && maidArray[j].Visible)
  13352. {
  13353. if (isDanceStart8V)
  13354. {
  13355. maidArray[j].SetPos(dancePos[j]);
  13356. maidArray[j].body0.transform.localRotation = danceRot[j];
  13357. }
  13358. }
  13359. }
  13360. isDanceStart8V = false;
  13361. isDanceStart8P = false;
  13362. }
  13363. if (isDanceStart11V)
  13364. {
  13365. for (int j = 0; j < maidCnt; j++)
  13366. {
  13367. if (maidArray[j] && maidArray[j].Visible)
  13368. {
  13369. if (isDanceStart11V)
  13370. {
  13371. maidArray[j].SetPos(dancePos[j]);
  13372. maidArray[j].body0.transform.localRotation = danceRot[j];
  13373. }
  13374. }
  13375. }
  13376. isDanceStart11V = false;
  13377. }
  13378. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13379. {
  13380. for (int j = 0; j < maidCnt; j++)
  13381. {
  13382. if (maidArray[j] && maidArray[j].Visible)
  13383. {
  13384. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13385. {
  13386. maidArray[j].SetPos(dancePos[j]);
  13387. maidArray[j].body0.transform.localRotation = danceRot[j];
  13388. int i = j;
  13389. if (!isVR)
  13390. {
  13391. delCount[i] = 20;
  13392. if (goSlot[(int)selectList[i]] != null)
  13393. {
  13394. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13395. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13396. {
  13397. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13398. }
  13399. }
  13400. }
  13401. Maid maid = maidArray[j];
  13402. maid.DelProp(MPN.handitem, true);
  13403. maid.DelProp(MPN.accvag, true);
  13404. maid.DelProp(MPN.accanl, true);
  13405. maid.DelProp(MPN.kousoku_upper, true);
  13406. maid.DelProp(MPN.kousoku_lower, true);
  13407. maid.AllProcPropSeqStart();
  13408. }
  13409. }
  13410. }
  13411. isDanceStart1K = false;
  13412. isDanceStart3K = false;
  13413. isDanceStart4K = false;
  13414. isDanceStart5K = false;
  13415. isDanceStart6K = false;
  13416. isDanceStart9K = false;
  13417. isDanceStart13K = false;
  13418. }
  13419. if (isDanceStart14V)
  13420. {
  13421. for (int j = 0; j < maidCnt; j++)
  13422. {
  13423. if (maidArray[j] && maidArray[j].Visible)
  13424. {
  13425. if (isDanceStart14V)
  13426. {
  13427. maidArray[j].SetPos(dancePos[j]);
  13428. maidArray[j].body0.transform.localRotation = danceRot[j];
  13429. }
  13430. }
  13431. }
  13432. isDanceStart14V = false;
  13433. }
  13434. if (isDanceStart15V)
  13435. {
  13436. for (int j = 0; j < maidCnt; j++)
  13437. {
  13438. if (maidArray[j] && maidArray[j].Visible)
  13439. {
  13440. if (isDanceStart15V)
  13441. {
  13442. maidArray[j].SetPos(dancePos[j]);
  13443. maidArray[j].body0.transform.localRotation = danceRot[j];
  13444. }
  13445. }
  13446. }
  13447. isDanceStart15V = false;
  13448. }
  13449. if (maidArray[1] && maidArray[1].Visible)
  13450. {
  13451. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13452. {
  13453. Vector3 vector = Vector3.zero;
  13454. vector.x = 0.6f;
  13455. maidArray[1].SetPos(vector);
  13456. if (maidArray[2] && maidArray[2].Visible)
  13457. {
  13458. vector.x = -0.6f;
  13459. maidArray[2].SetPos(vector);
  13460. }
  13461. if (maidArray[3] && maidArray[3].Visible)
  13462. {
  13463. vector.x = 1.2f;
  13464. maidArray[3].SetPos(vector);
  13465. }
  13466. if (maidArray[4] && maidArray[4].Visible)
  13467. {
  13468. vector.x = -1.2f;
  13469. maidArray[4].SetPos(vector);
  13470. }
  13471. if (maidArray[5] && maidArray[5].Visible)
  13472. {
  13473. vector.x = 1.8f;
  13474. maidArray[5].SetPos(vector);
  13475. }
  13476. if (maidArray[6] && maidArray[6].Visible)
  13477. {
  13478. vector.x = -1.8f;
  13479. maidArray[6].SetPos(vector);
  13480. }
  13481. if (maidArray[7] && maidArray[7].Visible)
  13482. {
  13483. vector.x = 2.4f;
  13484. maidArray[7].SetPos(vector);
  13485. }
  13486. if (maidArray[8] && maidArray[8].Visible)
  13487. {
  13488. vector.x = -2.4f;
  13489. maidArray[8].SetPos(vector);
  13490. }
  13491. if (maidArray[9] && maidArray[9].Visible)
  13492. {
  13493. vector.x = 3f;
  13494. maidArray[9].SetPos(vector);
  13495. }
  13496. if (maidArray[10] && maidArray[10].Visible)
  13497. {
  13498. vector.x = -3f;
  13499. maidArray[10].SetPos(vector);
  13500. }
  13501. if (maidArray[11] && maidArray[11].Visible)
  13502. {
  13503. vector.x = 3.6f;
  13504. maidArray[11].SetPos(vector);
  13505. }
  13506. if (maidArray[12] && maidArray[12].Visible)
  13507. {
  13508. vector.x = -3.6f;
  13509. maidArray[12].SetPos(vector);
  13510. }
  13511. if (maidArray[13] && maidArray[13].Visible)
  13512. {
  13513. vector.x = 4.2f;
  13514. maidArray[13].SetPos(vector);
  13515. }
  13516. }
  13517. }
  13518. if (isShift)
  13519. {
  13520. isDanceStart13K = true;
  13521. for (int j = 0; j < maidCnt; j++)
  13522. {
  13523. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x, maidArray[j].body0.transform.localRotation.y + 90f, maidArray[j].body0.transform.localRotation.z));
  13524. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f, maidArray[j].body0.transform.position.y, maidArray[j].body0.transform.position.z + 4f));
  13525. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13526. int i = j;
  13527. Maid maid = maidArray[j];
  13528. if (!isVR)
  13529. {
  13530. delCount[i] = 20;
  13531. if (goSlot[(int)selectList[i]] != null)
  13532. {
  13533. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13534. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13535. {
  13536. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13537. }
  13538. }
  13539. }
  13540. string[] array = new string[2];
  13541. array = text2.Split(new char[]
  13542. {
  13543. ','
  13544. });
  13545. maid.DelProp(MPN.handitem, true);
  13546. maid.DelProp(MPN.accvag, true);
  13547. maid.DelProp(MPN.accanl, true);
  13548. maid.DelProp(MPN.kousoku_upper, true);
  13549. maid.DelProp(MPN.kousoku_lower, true);
  13550. if (array[0] != "")
  13551. {
  13552. maid.SetProp(array[0], array[1], 0, true, false);
  13553. }
  13554. maid.AllProcPropSeqStart();
  13555. }
  13556. }
  13557. isDance = true;
  13558. isDanceStart13 = true;
  13559. isSN1 = false;
  13560. isSN2 = false;
  13561. isSN3 = false;
  13562. }
  13563. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8)) || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13564. {
  13565. GameMain.Instance.SoundMgr.StopBGM(0f);
  13566. isSN1 = true;
  13567. hFlg = true;
  13568. if (this.getModKeyPressing(MultipleMaids.modKey.Shift))
  13569. {
  13570. isShift = true;
  13571. }
  13572. }
  13573. if (isSN4 || isSN5 || isSN6)
  13574. {
  13575. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13576. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13577. for (int j = 0; j < maidCnt; j++)
  13578. {
  13579. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13580. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13581. switch (j)
  13582. {
  13583. case 1:
  13584. case 4:
  13585. case 7:
  13586. case 10:
  13587. case 13:
  13588. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13589. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13590. break;
  13591. case 2:
  13592. case 5:
  13593. case 8:
  13594. case 11:
  13595. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13596. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13597. break;
  13598. }
  13599. if (maidArray[j] && maidArray[j].Visible)
  13600. {
  13601. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13602. {
  13603. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13604. }
  13605. string text4 = textAsset.text;
  13606. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13607. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13608. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13609. }
  13610. }
  13611. if (isSN4)
  13612. {
  13613. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13614. }
  13615. if (isSN5)
  13616. {
  13617. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13618. }
  13619. if (isSN6)
  13620. {
  13621. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13622. }
  13623. ikBui = 5;
  13624. isDanceStart1F = false;
  13625. isDanceStart2F = false;
  13626. isDanceStart3F = false;
  13627. isDanceStart4F = false;
  13628. isDanceStart5F = false;
  13629. isDanceStart6F = false;
  13630. isDanceStart7F = false;
  13631. isDanceStart8F = false;
  13632. isDanceStart9F = false;
  13633. isDanceStart10F = false;
  13634. isDanceStart11F = false;
  13635. isDanceStart12F = false;
  13636. isDanceStart13F = false;
  13637. isDanceStart14F = false;
  13638. isDanceStart15F = false;
  13639. for (int j = 0; j < maidCnt; j++)
  13640. {
  13641. danceFace[j] = 0f;
  13642. }
  13643. if (isDanceStart7V)
  13644. {
  13645. for (int j = 0; j < maidCnt; j++)
  13646. {
  13647. if (maidArray[j] && maidArray[j].Visible)
  13648. {
  13649. if (isDanceStart7V)
  13650. {
  13651. maidArray[j].SetPos(dancePos[j]);
  13652. maidArray[j].body0.transform.localRotation = danceRot[j];
  13653. }
  13654. }
  13655. }
  13656. isDanceStart7V = false;
  13657. }
  13658. if (isDanceStart8V)
  13659. {
  13660. for (int j = 0; j < maidCnt; j++)
  13661. {
  13662. if (maidArray[j] && maidArray[j].Visible)
  13663. {
  13664. if (isDanceStart8V)
  13665. {
  13666. maidArray[j].SetPos(dancePos[j]);
  13667. maidArray[j].body0.transform.localRotation = danceRot[j];
  13668. }
  13669. }
  13670. }
  13671. isDanceStart8V = false;
  13672. isDanceStart8P = false;
  13673. }
  13674. if (isDanceStart11V)
  13675. {
  13676. for (int j = 0; j < maidCnt; j++)
  13677. {
  13678. if (maidArray[j] && maidArray[j].Visible)
  13679. {
  13680. if (isDanceStart11V)
  13681. {
  13682. maidArray[j].SetPos(dancePos[j]);
  13683. maidArray[j].body0.transform.localRotation = danceRot[j];
  13684. }
  13685. }
  13686. }
  13687. isDanceStart11V = false;
  13688. }
  13689. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13690. {
  13691. for (int j = 0; j < maidCnt; j++)
  13692. {
  13693. if (maidArray[j] && maidArray[j].Visible)
  13694. {
  13695. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13696. {
  13697. maidArray[j].SetPos(dancePos[j]);
  13698. maidArray[j].body0.transform.localRotation = danceRot[j];
  13699. int i = j;
  13700. if (!isVR)
  13701. {
  13702. delCount[i] = 20;
  13703. if (goSlot[(int)selectList[i]] != null)
  13704. {
  13705. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13706. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13707. {
  13708. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13709. }
  13710. }
  13711. }
  13712. Maid maid = maidArray[j];
  13713. maid.DelProp(MPN.handitem, true);
  13714. maid.DelProp(MPN.accvag, true);
  13715. maid.DelProp(MPN.accanl, true);
  13716. maid.DelProp(MPN.kousoku_upper, true);
  13717. maid.DelProp(MPN.kousoku_lower, true);
  13718. maid.AllProcPropSeqStart();
  13719. }
  13720. }
  13721. }
  13722. isDanceStart1K = false;
  13723. isDanceStart3K = false;
  13724. isDanceStart4K = false;
  13725. isDanceStart5K = false;
  13726. isDanceStart6K = false;
  13727. isDanceStart9K = false;
  13728. isDanceStart13K = false;
  13729. }
  13730. if (isDanceStart14V)
  13731. {
  13732. for (int j = 0; j < maidCnt; j++)
  13733. {
  13734. if (maidArray[j] && maidArray[j].Visible)
  13735. {
  13736. if (isDanceStart14V)
  13737. {
  13738. maidArray[j].SetPos(dancePos[j]);
  13739. maidArray[j].body0.transform.localRotation = danceRot[j];
  13740. }
  13741. }
  13742. }
  13743. isDanceStart14V = false;
  13744. }
  13745. if (isDanceStart15V)
  13746. {
  13747. for (int j = 0; j < maidCnt; j++)
  13748. {
  13749. if (maidArray[j] && maidArray[j].Visible)
  13750. {
  13751. if (isDanceStart15V)
  13752. {
  13753. maidArray[j].SetPos(dancePos[j]);
  13754. maidArray[j].body0.transform.localRotation = danceRot[j];
  13755. }
  13756. }
  13757. }
  13758. isDanceStart15V = false;
  13759. }
  13760. for (int j = 0; j < maidCnt; j++)
  13761. {
  13762. isStop[j] = false;
  13763. isLock[j] = false;
  13764. pHandL[j] = 0;
  13765. pHandR[j] = 0;
  13766. muneIKL[j] = false;
  13767. muneIKR[j] = false;
  13768. if (!isVR)
  13769. {
  13770. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13771. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13772. }
  13773. if (maidArray[j].transform.position.y != 100f)
  13774. {
  13775. dancePos[j] = maidArray[j].transform.position;
  13776. }
  13777. else
  13778. {
  13779. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13780. }
  13781. danceRot[j] = maidArray[j].transform.localRotation;
  13782. }
  13783. if (maidArray[1] && maidArray[1].Visible)
  13784. {
  13785. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, maidArray[0].transform.position.y, maidArray[0].transform.position.z));
  13786. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13787. }
  13788. if (maidArray[2] && maidArray[2].Visible)
  13789. {
  13790. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x, maidArray[0].transform.position.y, maidArray[0].transform.position.z));
  13791. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13792. }
  13793. if (maidArray[4] && maidArray[4].Visible)
  13794. {
  13795. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x, maidArray[3].transform.position.y, maidArray[3].transform.position.z));
  13796. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13797. }
  13798. if (maidArray[5] && maidArray[5].Visible)
  13799. {
  13800. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x, maidArray[3].transform.position.y, maidArray[3].transform.position.z));
  13801. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13802. }
  13803. if (maidArray[7] && maidArray[7].Visible)
  13804. {
  13805. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, maidArray[6].transform.position.y, maidArray[6].transform.position.z));
  13806. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13807. }
  13808. if (maidArray[8] && maidArray[8].Visible)
  13809. {
  13810. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x, maidArray[6].transform.position.y, maidArray[6].transform.position.z));
  13811. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13812. }
  13813. if (maidArray[10] && maidArray[10].Visible)
  13814. {
  13815. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x, maidArray[9].transform.position.y, maidArray[9].transform.position.z));
  13816. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13817. }
  13818. if (maidArray[11] && maidArray[11].Visible)
  13819. {
  13820. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x, maidArray[9].transform.position.y, maidArray[9].transform.position.z));
  13821. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13822. }
  13823. if (maidArray[13] && maidArray[13].Visible)
  13824. {
  13825. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, maidArray[12].transform.position.y, maidArray[12].transform.position.z));
  13826. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13827. }
  13828. isDance = true;
  13829. isDanceStart14 = true;
  13830. isSN4 = false;
  13831. isSN5 = false;
  13832. isSN6 = false;
  13833. }
  13834. if (isSD1)
  13835. {
  13836. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13837. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13838. for (int j = 0; j < maidCnt; j++)
  13839. {
  13840. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13841. string text5 = "dance_cmo_002_sd_f1.anm";
  13842. switch (j)
  13843. {
  13844. case 1:
  13845. case 3:
  13846. case 5:
  13847. case 7:
  13848. case 9:
  13849. case 11:
  13850. case 13:
  13851. text5 = "dance_cmo_002_sd_f2.anm";
  13852. textAsset = (Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset);
  13853. break;
  13854. }
  13855. danceName[j] = text5;
  13856. if (maidArray[j] && maidArray[j].Visible)
  13857. {
  13858. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13859. {
  13860. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13861. }
  13862. string text4 = textAsset.text;
  13863. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13864. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13865. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13866. }
  13867. }
  13868. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13869. ikBui = 5;
  13870. isDanceStart1F = false;
  13871. isDanceStart2F = false;
  13872. isDanceStart3F = false;
  13873. isDanceStart4F = false;
  13874. isDanceStart5F = false;
  13875. isDanceStart6F = false;
  13876. isDanceStart7F = false;
  13877. isDanceStart8F = false;
  13878. isDanceStart9F = false;
  13879. isDanceStart10F = false;
  13880. isDanceStart11F = false;
  13881. isDanceStart12F = false;
  13882. isDanceStart13F = false;
  13883. isDanceStart14F = false;
  13884. isDanceStart15F = false;
  13885. for (int j = 0; j < maidCnt; j++)
  13886. {
  13887. danceFace[j] = 0f;
  13888. }
  13889. if (isDanceStart7V)
  13890. {
  13891. for (int j = 0; j < maidCnt; j++)
  13892. {
  13893. if (maidArray[j] && maidArray[j].Visible)
  13894. {
  13895. if (isDanceStart7V)
  13896. {
  13897. maidArray[j].SetPos(dancePos[j]);
  13898. maidArray[j].body0.transform.localRotation = danceRot[j];
  13899. }
  13900. }
  13901. }
  13902. isDanceStart7V = false;
  13903. }
  13904. if (isDanceStart8V)
  13905. {
  13906. for (int j = 0; j < maidCnt; j++)
  13907. {
  13908. if (maidArray[j] && maidArray[j].Visible)
  13909. {
  13910. if (isDanceStart8V)
  13911. {
  13912. maidArray[j].SetPos(dancePos[j]);
  13913. maidArray[j].body0.transform.localRotation = danceRot[j];
  13914. }
  13915. }
  13916. }
  13917. isDanceStart8V = false;
  13918. isDanceStart8P = false;
  13919. }
  13920. if (isDanceStart11V)
  13921. {
  13922. for (int j = 0; j < maidCnt; j++)
  13923. {
  13924. if (maidArray[j] && maidArray[j].Visible)
  13925. {
  13926. if (isDanceStart11V)
  13927. {
  13928. maidArray[j].SetPos(dancePos[j]);
  13929. maidArray[j].body0.transform.localRotation = danceRot[j];
  13930. }
  13931. }
  13932. }
  13933. isDanceStart11V = false;
  13934. }
  13935. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13936. {
  13937. for (int j = 0; j < maidCnt; j++)
  13938. {
  13939. if (maidArray[j] && maidArray[j].Visible)
  13940. {
  13941. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K || isDanceStart13K)
  13942. {
  13943. maidArray[j].SetPos(dancePos[j]);
  13944. maidArray[j].body0.transform.localRotation = danceRot[j];
  13945. int i = j;
  13946. if (!isVR)
  13947. {
  13948. delCount[i] = 20;
  13949. if (goSlot[(int)selectList[i]] != null)
  13950. {
  13951. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13952. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13953. {
  13954. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13955. }
  13956. }
  13957. }
  13958. Maid maid = maidArray[j];
  13959. maid.DelProp(MPN.handitem, true);
  13960. maid.DelProp(MPN.accvag, true);
  13961. maid.DelProp(MPN.accanl, true);
  13962. maid.DelProp(MPN.kousoku_upper, true);
  13963. maid.DelProp(MPN.kousoku_lower, true);
  13964. maid.AllProcPropSeqStart();
  13965. }
  13966. }
  13967. }
  13968. isDanceStart1K = false;
  13969. isDanceStart3K = false;
  13970. isDanceStart4K = false;
  13971. isDanceStart5K = false;
  13972. isDanceStart6K = false;
  13973. isDanceStart9K = false;
  13974. isDanceStart13K = false;
  13975. }
  13976. if (isDanceStart14V)
  13977. {
  13978. for (int j = 0; j < maidCnt; j++)
  13979. {
  13980. if (maidArray[j] && maidArray[j].Visible)
  13981. {
  13982. if (isDanceStart14V)
  13983. {
  13984. maidArray[j].SetPos(dancePos[j]);
  13985. maidArray[j].body0.transform.localRotation = danceRot[j];
  13986. }
  13987. }
  13988. }
  13989. isDanceStart14V = false;
  13990. }
  13991. if (isDanceStart15V)
  13992. {
  13993. for (int j = 0; j < maidCnt; j++)
  13994. {
  13995. if (maidArray[j] && maidArray[j].Visible)
  13996. {
  13997. if (isDanceStart15V)
  13998. {
  13999. maidArray[j].SetPos(dancePos[j]);
  14000. maidArray[j].body0.transform.localRotation = danceRot[j];
  14001. }
  14002. }
  14003. }
  14004. isDanceStart15V = false;
  14005. }
  14006. for (int j = 0; j < maidCnt; j++)
  14007. {
  14008. isStop[j] = false;
  14009. isLock[j] = false;
  14010. pHandL[j] = 0;
  14011. pHandR[j] = 0;
  14012. muneIKL[j] = false;
  14013. muneIKR[j] = false;
  14014. if (!isVR)
  14015. {
  14016. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14017. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14018. }
  14019. if (maidArray[j].transform.position.y != 100f)
  14020. {
  14021. dancePos[j] = maidArray[j].transform.position;
  14022. }
  14023. else
  14024. {
  14025. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14026. }
  14027. danceRot[j] = maidArray[j].transform.localRotation;
  14028. }
  14029. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14030. {
  14031. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f, (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f, (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14032. maidArray[0].body0.transform.localRotation = Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14033. }
  14034. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14035. {
  14036. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f, (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f, (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14037. maidArray[2].body0.transform.localRotation = Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14038. }
  14039. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14040. {
  14041. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f, (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f, (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14042. maidArray[4].body0.transform.localRotation = Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14043. }
  14044. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14045. {
  14046. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f, (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f, (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14047. maidArray[6].body0.transform.localRotation = Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14048. }
  14049. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14050. {
  14051. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f, (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f, (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14052. maidArray[8].body0.transform.localRotation = Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14053. }
  14054. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14055. {
  14056. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f, (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f, (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14057. maidArray[10].body0.transform.localRotation = Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14058. }
  14059. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14060. {
  14061. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f, (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f, (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14062. maidArray[12].body0.transform.localRotation = Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14063. }
  14064. if (maidArray[1] && maidArray[1].Visible)
  14065. {
  14066. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, maidArray[0].transform.position.y, maidArray[0].transform.position.z));
  14067. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14068. }
  14069. if (maidArray[3] && maidArray[3].Visible)
  14070. {
  14071. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, maidArray[2].transform.position.y, maidArray[2].transform.position.z));
  14072. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14073. }
  14074. if (maidArray[5] && maidArray[5].Visible)
  14075. {
  14076. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, maidArray[4].transform.position.y, maidArray[4].transform.position.z));
  14077. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14078. }
  14079. if (maidArray[7] && maidArray[7].Visible)
  14080. {
  14081. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, maidArray[6].transform.position.y, maidArray[6].transform.position.z));
  14082. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14083. }
  14084. if (maidArray[9] && maidArray[9].Visible)
  14085. {
  14086. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, maidArray[8].transform.position.y, maidArray[8].transform.position.z));
  14087. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14088. }
  14089. if (maidArray[11] && maidArray[11].Visible)
  14090. {
  14091. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, maidArray[10].transform.position.y, maidArray[10].transform.position.z));
  14092. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14093. }
  14094. if (maidArray[13] && maidArray[13].Visible)
  14095. {
  14096. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, maidArray[12].transform.position.y, maidArray[12].transform.position.z));
  14097. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14098. }
  14099. if (maidArray[2] && maidArray[2].Visible)
  14100. {
  14101. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14102. {
  14103. Vector3 vector = Vector3.zero;
  14104. vector.x = 0.6f;
  14105. maidArray[1].SetPos(vector);
  14106. if (maidArray[2] && maidArray[2].Visible)
  14107. {
  14108. vector.x = -0.6f;
  14109. maidArray[2].SetPos(vector);
  14110. }
  14111. if (maidArray[3] && maidArray[3].Visible)
  14112. {
  14113. vector.x = 1.2f;
  14114. maidArray[3].SetPos(vector);
  14115. }
  14116. if (maidArray[4] && maidArray[4].Visible)
  14117. {
  14118. vector.x = -1.2f;
  14119. maidArray[4].SetPos(vector);
  14120. }
  14121. if (maidArray[5] && maidArray[5].Visible)
  14122. {
  14123. vector.x = 1.8f;
  14124. maidArray[5].SetPos(vector);
  14125. }
  14126. if (maidArray[6] && maidArray[6].Visible)
  14127. {
  14128. vector.x = -1.8f;
  14129. maidArray[6].SetPos(vector);
  14130. }
  14131. if (maidArray[7] && maidArray[7].Visible)
  14132. {
  14133. vector.x = 2.4f;
  14134. maidArray[7].SetPos(vector);
  14135. }
  14136. if (maidArray[8] && maidArray[8].Visible)
  14137. {
  14138. vector.x = -2.4f;
  14139. maidArray[8].SetPos(vector);
  14140. }
  14141. if (maidArray[9] && maidArray[9].Visible)
  14142. {
  14143. vector.x = 3f;
  14144. maidArray[9].SetPos(vector);
  14145. }
  14146. if (maidArray[10] && maidArray[10].Visible)
  14147. {
  14148. vector.x = -3f;
  14149. maidArray[10].SetPos(vector);
  14150. }
  14151. if (maidArray[11] && maidArray[11].Visible)
  14152. {
  14153. vector.x = 3.6f;
  14154. maidArray[11].SetPos(vector);
  14155. }
  14156. if (maidArray[12] && maidArray[12].Visible)
  14157. {
  14158. vector.x = -3.6f;
  14159. maidArray[12].SetPos(vector);
  14160. }
  14161. if (maidArray[13] && maidArray[13].Visible)
  14162. {
  14163. vector.x = 4.2f;
  14164. maidArray[13].SetPos(vector);
  14165. }
  14166. }
  14167. }
  14168. isDance = true;
  14169. isDanceStart15 = true;
  14170. isSD1 = false;
  14171. }
  14172. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3) || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6) || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9) || Input.GetKeyDown(KeyCode.Keypad0))
  14173. {
  14174. for (int j = 0; j < maidCnt; j++)
  14175. {
  14176. if (maidArray[j] && maidArray[j].Visible)
  14177. {
  14178. if (!isVR)
  14179. {
  14180. if (goSlot[(int)selectList[j]] != null)
  14181. {
  14182. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14183. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14184. {
  14185. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14186. }
  14187. }
  14188. }
  14189. }
  14190. }
  14191. }
  14192. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14193. {
  14194. if (h2Flg)
  14195. {
  14196. h2Flg = false;
  14197. }
  14198. else
  14199. {
  14200. string text4 = "";
  14201. if (wearIndex == 0)
  14202. {
  14203. text4 = "Underwear";
  14204. wearIndex = 1;
  14205. isWear = false;
  14206. isSkirt = false;
  14207. isBra = true;
  14208. isPanz = true;
  14209. isHeadset = false;
  14210. isGlove = false;
  14211. isStkg = true;
  14212. isShoes = false;
  14213. }
  14214. else if (wearIndex == 1)
  14215. {
  14216. text4 = "Nude";
  14217. wearIndex = 2;
  14218. isWear = false;
  14219. isSkirt = false;
  14220. isBra = false;
  14221. isPanz = false;
  14222. isHeadset = false;
  14223. isGlove = false;
  14224. isStkg = false;
  14225. isShoes = false;
  14226. }
  14227. else if (wearIndex == 2)
  14228. {
  14229. text4 = "None";
  14230. wearIndex = 0;
  14231. isWear = true;
  14232. isSkirt = true;
  14233. isBra = true;
  14234. isPanz = true;
  14235. isHeadset = true;
  14236. isGlove = true;
  14237. isStkg = true;
  14238. isShoes = true;
  14239. }
  14240. TBody.MaskMode maskMode = (TBody.MaskMode)((int)Enum.Parse(typeof(TBody.MaskMode), text4));
  14241. for (int j = 0; j < maidCnt; j++)
  14242. {
  14243. if (maidArray[j] && maidArray[j].Visible)
  14244. {
  14245. if (!isVR)
  14246. {
  14247. if (goSlot[(int)selectList[j]] != null)
  14248. {
  14249. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14250. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14251. {
  14252. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14253. }
  14254. }
  14255. }
  14256. maidArray[j].body0.SetMaskMode(maskMode);
  14257. }
  14258. }
  14259. }
  14260. }
  14261. if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14262. {
  14263. saveScene = 9999;
  14264. saveScene2 = saveScene;
  14265. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14266. try
  14267. {
  14268. thum_byte_to_base64_ = string.Empty;
  14269. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14270. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14271. }
  14272. catch
  14273. {
  14274. }
  14275. }
  14276. if (this.getModKeyPressing(MultipleMaids.modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14277. {
  14278. loadScene = 9999;
  14279. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14280. }
  14281. if (isScreen)
  14282. {
  14283. isScreen = false;
  14284. bGui = isGui;
  14285. isGui = false;
  14286. if (!isMessage)
  14287. {
  14288. foreach (UICamera uicamera in ui_cam_hide_list_)
  14289. {
  14290. uicamera.GetComponent<Camera>().enabled = true;
  14291. }
  14292. ui_cam_hide_list_.Clear();
  14293. }
  14294. else
  14295. {
  14296. if (editUI != null)
  14297. {
  14298. editUI.SetActive(true);
  14299. }
  14300. if (GameMain.Instance.CMSystem.ViewFps)
  14301. {
  14302. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14303. childObject.SetActive(true);
  14304. }
  14305. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14306. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14307. childObject2.SetActive(true);
  14308. childObject3.SetActive(true);
  14309. }
  14310. for (int j = 0; j < maidCnt; j++)
  14311. {
  14312. if (maidArray[j] && maidArray[j].Visible)
  14313. {
  14314. isBone[j] = isBoneN[j];
  14315. if (isBone[j])
  14316. {
  14317. gNeck[j].SetActive(true);
  14318. gSpine[j].SetActive(true);
  14319. gSpine0a[j].SetActive(true);
  14320. gSpine1a[j].SetActive(true);
  14321. gSpine1[j].SetActive(true);
  14322. gPelvis[j].SetActive(true);
  14323. gHandL[j].SetActive(true);
  14324. gArmL[j].SetActive(true);
  14325. gFootL[j].SetActive(true);
  14326. gHizaL[j].SetActive(true);
  14327. gHandR[j].SetActive(true);
  14328. gArmR[j].SetActive(true);
  14329. gFootR[j].SetActive(true);
  14330. gHizaR[j].SetActive(true);
  14331. gClavicleL[j].SetActive(true);
  14332. gClavicleR[j].SetActive(true);
  14333. }
  14334. }
  14335. }
  14336. }
  14337. if (isScreen2)
  14338. {
  14339. isScreen = true;
  14340. isScreen2 = false;
  14341. }
  14342. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return) && !Input.GetKey(KeyCode.Q))
  14343. {
  14344. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  14345. {
  14346. isScreen = true;
  14347. for (int j = 0; j < maidCnt; j++)
  14348. {
  14349. if (maidArray[j] && maidArray[j].Visible)
  14350. {
  14351. if (isBone[j])
  14352. {
  14353. gNeck[j].SetActive(false);
  14354. gSpine[j].SetActive(false);
  14355. gSpine0a[j].SetActive(false);
  14356. gSpine1a[j].SetActive(false);
  14357. gSpine1[j].SetActive(false);
  14358. gPelvis[j].SetActive(false);
  14359. gHandL[j].SetActive(false);
  14360. gArmL[j].SetActive(false);
  14361. gFootL[j].SetActive(false);
  14362. gHizaL[j].SetActive(false);
  14363. gHandR[j].SetActive(false);
  14364. gArmR[j].SetActive(false);
  14365. gFootR[j].SetActive(false);
  14366. gHizaR[j].SetActive(false);
  14367. gClavicleL[j].SetActive(false);
  14368. gClavicleR[j].SetActive(false);
  14369. }
  14370. isBoneN[j] = isBone[j];
  14371. isBone[j] = false;
  14372. }
  14373. }
  14374. if (!isMessage)
  14375. {
  14376. ui_cam_hide_list_.Clear();
  14377. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14378. foreach (UICamera uicamera2 in array16)
  14379. {
  14380. if (uicamera2.GetComponent<Camera>().enabled)
  14381. {
  14382. uicamera2.GetComponent<Camera>().enabled = false;
  14383. ui_cam_hide_list_.Add(uicamera2);
  14384. }
  14385. }
  14386. }
  14387. else
  14388. {
  14389. editUI = GameObject.Find("/UI Root/Camera");
  14390. if (editUI != null)
  14391. {
  14392. editUI.SetActive(false);
  14393. }
  14394. if (GameMain.Instance.CMSystem.ViewFps)
  14395. {
  14396. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14397. childObject.SetActive(false);
  14398. }
  14399. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14400. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14401. childObject2.SetActive(false);
  14402. childObject3.SetActive(false);
  14403. }
  14404. isGui = bGui;
  14405. bGui = false;
  14406. GameMain.Instance.MainCamera.ScreenShot(false);
  14407. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14408. }
  14409. }
  14410. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14411. {
  14412. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14413. keyFlg2 = true;
  14414. }
  14415. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14416. {
  14417. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14418. keyFlg2 = true;
  14419. }
  14420. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14421. {
  14422. mainCameraTransform.eulerAngles = new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14423. keyFlg2 = true;
  14424. }
  14425. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14426. {
  14427. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14428. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14429. mainCamera.SetDistance(3f, true);
  14430. keyFlg2 = true;
  14431. }
  14432. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14433. {
  14434. cameraIti = mainCamera.GetTargetPos();
  14435. cameraIti2 = mainCamera.GetPos();
  14436. cameraItiAngle = mainCamera.GetAroundAngle();
  14437. cameraItiDistance = mainCamera.GetDistance();
  14438. keyFlg2 = true;
  14439. }
  14440. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14441. {
  14442. mainCamera.SetTargetPos(cameraIti, true);
  14443. mainCamera.SetPos(cameraIti2);
  14444. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14445. mainCamera.SetDistance(cameraItiDistance, true);
  14446. keyFlg2 = true;
  14447. }
  14448. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14449. {
  14450. if (keyFlg2)
  14451. {
  14452. keyFlg2 = false;
  14453. }
  14454. else
  14455. {
  14456. effectIndex++;
  14457. if (effectIndex == 9)
  14458. {
  14459. kami.SetActive(false);
  14460. effectIndex = 0;
  14461. }
  14462. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14463. if (!isBlur)
  14464. {
  14465. component3.mode = Vignetting.AberrationMode.Simple;
  14466. component3.intensity = -3.98f;
  14467. component3.chromaticAberration = -0.75f;
  14468. component3.axialAberration = 1.18f;
  14469. component3.blurSpread = 4.19f;
  14470. component3.luminanceDependency = 0.494f;
  14471. component3.blurDistance = 1.71f;
  14472. component3.enabled = false;
  14473. }
  14474. if (kami)
  14475. {
  14476. }
  14477. if (effectIndex == 0)
  14478. {
  14479. component3.enabled = false;
  14480. }
  14481. if (effectIndex == 1)
  14482. {
  14483. component3.mode = Vignetting.AberrationMode.Simple;
  14484. component3.intensity = -1f;
  14485. component3.chromaticAberration = 0f;
  14486. component3.axialAberration = 0f;
  14487. component3.blurSpread = 5f;
  14488. component3.luminanceDependency = 0f;
  14489. component3.blurDistance = 0f;
  14490. component3.enabled = true;
  14491. }
  14492. if (effectIndex == 2)
  14493. {
  14494. component3.enabled = true;
  14495. }
  14496. if (effectIndex == 3)
  14497. {
  14498. component3.mode = Vignetting.AberrationMode.Simple;
  14499. component3.intensity = 9f;
  14500. component3.chromaticAberration = 0f;
  14501. component3.axialAberration = 0f;
  14502. component3.blurSpread = 5f;
  14503. component3.luminanceDependency = 0f;
  14504. component3.blurDistance = 0f;
  14505. component3.enabled = true;
  14506. }
  14507. if (effectIndex == 4)
  14508. {
  14509. UnityEngine.Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14510. kami = (GameObject)UnityEngine.Object.Instantiate(@object);
  14511. Vector3 localPosition = kami.transform.localPosition;
  14512. localPosition.y = 3.5f;
  14513. kami.transform.localPosition = localPosition;
  14514. }
  14515. if (effectIndex == 5)
  14516. {
  14517. component3.enabled = true;
  14518. component3.mode = Vignetting.AberrationMode.Simple;
  14519. component3.intensity = -2.5f;
  14520. component3.chromaticAberration = -0.3f;
  14521. component3.axialAberration = 0.5f;
  14522. component3.blurSpread = 4.5f;
  14523. component3.luminanceDependency = 0.2f;
  14524. component3.blurDistance = 0.8f;
  14525. component3.enabled = true;
  14526. }
  14527. if (effectIndex == 6)
  14528. {
  14529. kami.SetActive(false);
  14530. UnityEngine.Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14531. kami = (GameObject)UnityEngine.Object.Instantiate(@object);
  14532. Vector3 localPosition = kami.transform.localPosition;
  14533. localPosition.y = 3.5f;
  14534. kami.transform.localPosition = localPosition;
  14535. }
  14536. if (effectIndex == 7)
  14537. {
  14538. component3.enabled = true;
  14539. component3.mode = Vignetting.AberrationMode.Simple;
  14540. component3.intensity = -2.5f;
  14541. component3.chromaticAberration = -0.3f;
  14542. component3.axialAberration = 0.5f;
  14543. component3.blurSpread = 4.5f;
  14544. component3.luminanceDependency = 0.2f;
  14545. component3.blurDistance = 0.8f;
  14546. component3.enabled = true;
  14547. }
  14548. if (effectIndex == 8)
  14549. {
  14550. component3.mode = Vignetting.AberrationMode.Simple;
  14551. component3.intensity = 8f;
  14552. component3.chromaticAberration = 0f;
  14553. component3.axialAberration = 0f;
  14554. component3.blurSpread = 5f;
  14555. component3.luminanceDependency = 0f;
  14556. component3.blurDistance = 0f;
  14557. component3.enabled = true;
  14558. }
  14559. }
  14560. }
  14561. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14562. {
  14563. qFlg = false;
  14564. }
  14565. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14566. {
  14567. bool flag5 = false;
  14568. for (int k = 0; k < keyArray.Length; k++)
  14569. {
  14570. if (Input.GetKey(keyArray[k]))
  14571. {
  14572. flag5 = true;
  14573. break;
  14574. }
  14575. }
  14576. if (!this.getModKeyPressing(MultipleMaids.modKey.Shift))
  14577. {
  14578. if (!flag5)
  14579. {
  14580. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14581. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14582. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14583. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14584. {
  14585. Vector3 vector = softG;
  14586. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14587. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14588. softG = vector;
  14589. }
  14590. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14591. {
  14592. Vector3 vector = softG;
  14593. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14594. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14595. softG = vector;
  14596. }
  14597. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14598. {
  14599. Vector3 vector = softG;
  14600. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14601. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14602. softG = vector;
  14603. }
  14604. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14605. {
  14606. Vector3 vector = softG;
  14607. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14608. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14609. softG = vector;
  14610. }
  14611. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14612. {
  14613. Vector3 vector = softG;
  14614. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14615. softG = vector;
  14616. }
  14617. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14618. {
  14619. Vector3 vector = softG;
  14620. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14621. softG = vector;
  14622. }
  14623. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14624. {
  14625. Vector3 vector = softG;
  14626. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14627. softG = vector;
  14628. }
  14629. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14630. {
  14631. Vector3 vector = softG;
  14632. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14633. softG = vector;
  14634. }
  14635. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14636. {
  14637. Vector3 vector = softG;
  14638. vector.y += 6E-05f * speed;
  14639. softG = vector;
  14640. }
  14641. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14642. {
  14643. Vector3 vector = softG;
  14644. vector.y -= 6E-05f * speed;
  14645. softG = vector;
  14646. }
  14647. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14648. {
  14649. softG = new Vector3(0f, -0.003f, 0f);
  14650. }
  14651. for (int j = 0; j < maidCnt; j++)
  14652. {
  14653. Maid maid = maidArray[j];
  14654. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14655. {
  14656. if (maid.body0.goSlot[l].obj != null)
  14657. {
  14658. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14659. if (component2 != null && component2.enabled)
  14660. {
  14661. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14662. }
  14663. }
  14664. List<THair1> fieldValue3 = MultipleMaids.GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14665. for (int k = 0; k < fieldValue3.Count; k++)
  14666. {
  14667. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14668. }
  14669. }
  14670. }
  14671. }
  14672. }
  14673. else if (!flag5)
  14674. {
  14675. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14676. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14677. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14678. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14679. {
  14680. Vector3 vector = softG2;
  14681. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14682. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14683. softG2 = vector;
  14684. }
  14685. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14686. {
  14687. Vector3 vector = softG2;
  14688. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14689. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14690. softG2 = vector;
  14691. }
  14692. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14693. {
  14694. Vector3 vector = softG2;
  14695. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14696. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14697. softG2 = vector;
  14698. }
  14699. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14700. {
  14701. Vector3 vector = softG2;
  14702. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14703. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14704. softG2 = vector;
  14705. }
  14706. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14707. {
  14708. Vector3 vector = softG2;
  14709. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14710. softG2 = vector;
  14711. }
  14712. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14713. {
  14714. Vector3 vector = softG2;
  14715. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14716. softG2 = vector;
  14717. }
  14718. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14719. {
  14720. Vector3 vector = softG2;
  14721. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14722. softG2 = vector;
  14723. }
  14724. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14725. {
  14726. Vector3 vector = softG2;
  14727. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14728. softG2 = vector;
  14729. }
  14730. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14731. {
  14732. Vector3 vector = softG2;
  14733. vector.y += 2E-05f * speed;
  14734. softG2 = vector;
  14735. }
  14736. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14737. {
  14738. Vector3 vector = softG2;
  14739. vector.y -= 2E-05f * speed;
  14740. softG2 = vector;
  14741. }
  14742. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14743. {
  14744. softG2 = new Vector3(0f, -0.005f, 0f);
  14745. }
  14746. for (int j = 0; j < maidCnt; j++)
  14747. {
  14748. Maid maid = maidArray[j];
  14749. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14750. {
  14751. if (maid.body0.goSlot[l].obj != null)
  14752. {
  14753. DynamicSkirtBone fieldValue8 = MultipleMaids.GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3, "m_SkirtBone");
  14754. if (fieldValue8 != null)
  14755. {
  14756. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14757. MethodInfo method = fieldValue8.GetType().GetMethod("UpdateParameters", BindingFlags.Instance | BindingFlags.NonPublic);
  14758. method.Invoke(fieldValue8, null);
  14759. }
  14760. }
  14761. }
  14762. }
  14763. }
  14764. }
  14765. if (!isVR)
  14766. {
  14767. if (doguObject.Count > 0)
  14768. {
  14769. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14770. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14771. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14772. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14773. {
  14774. idoFlg2 = true;
  14775. doguObject[doguSelectIndex].transform.localScale = new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f, doguObject[doguSelectIndex].transform.localScale.y * 1.005f, doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14776. }
  14777. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14778. {
  14779. idoFlg2 = true;
  14780. doguObject[doguSelectIndex].transform.localScale = new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f, doguObject[doguSelectIndex].transform.localScale.y * 0.995f, doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14781. }
  14782. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14783. {
  14784. idoFlg2 = true;
  14785. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14786. }
  14787. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14788. {
  14789. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14790. idoFlg2 = true;
  14791. }
  14792. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14793. {
  14794. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14795. idoFlg2 = true;
  14796. }
  14797. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && this.getModKeyPressing(MultipleMaids.modKey.Alt))
  14798. {
  14799. for (int k = 0; k < 10; k++)
  14800. {
  14801. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.right, -doguObject[doguSelectIndex].transform.rotation.eulerAngles.x);
  14802. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.forward, -doguObject[doguSelectIndex].transform.rotation.eulerAngles.z);
  14803. }
  14804. idoFlg2 = true;
  14805. Vector3 vector = Vector3.zero;
  14806. Vector3 zero3 = Vector3.zero;
  14807. zero3.x = -90f;
  14808. int num12 = doguIndex[doguSelectIndex];
  14809. switch (num12)
  14810. {
  14811. case 3:
  14812. vector.z = 0.5f;
  14813. zero3.z = 90f;
  14814. break;
  14815. case 4:
  14816. case 5:
  14817. case 7:
  14818. case 10:
  14819. case 11:
  14820. break;
  14821. case 6:
  14822. vector.z = 0.6f;
  14823. zero3.x = 0f;
  14824. break;
  14825. case 8:
  14826. vector.z = 0.5f;
  14827. zero3.x = 0f;
  14828. break;
  14829. case 9:
  14830. vector.z = 0.32f;
  14831. zero3.z = 180f;
  14832. break;
  14833. case 12:
  14834. vector.z = 0.5f;
  14835. zero3.z = 180f;
  14836. break;
  14837. case 13:
  14838. vector.z = 0.7f;
  14839. zero3.z = 180f;
  14840. break;
  14841. default:
  14842. if (num12 != 16)
  14843. {
  14844. switch (num12)
  14845. {
  14846. case 23:
  14847. vector.z = 2.7f;
  14848. vector.x = 0.77f;
  14849. zero3.z = 90f;
  14850. break;
  14851. case 25:
  14852. vector.z = 0.5f;
  14853. vector.y = 0.9f;
  14854. zero3.z = 180f;
  14855. break;
  14856. case 26:
  14857. vector.z = 0.5f;
  14858. vector.y = 0.9f;
  14859. zero3.z = 180f;
  14860. break;
  14861. case 30:
  14862. vector.z = 0f;
  14863. zero3.z = 0f;
  14864. break;
  14865. case 31:
  14866. vector.z = -0.6f;
  14867. vector.y = 0.96f;
  14868. zero3.z = 180f;
  14869. break;
  14870. case 32:
  14871. vector.z = -0.6f;
  14872. vector.y = 0.96f;
  14873. zero3.z = 180f;
  14874. break;
  14875. case 33:
  14876. vector.z = -0.6f;
  14877. vector.y = 0.85f;
  14878. zero3.z = 180f;
  14879. break;
  14880. }
  14881. }
  14882. else
  14883. {
  14884. vector.z = -0.4f;
  14885. zero3.z = 180f;
  14886. }
  14887. break;
  14888. }
  14889. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14890. }
  14891. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14892. {
  14893. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.3f);
  14894. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.3f);
  14895. idoFlg2 = true;
  14896. }
  14897. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14898. {
  14899. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.3f);
  14900. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.3f);
  14901. idoFlg2 = true;
  14902. }
  14903. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14904. {
  14905. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.3f);
  14906. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.3f);
  14907. idoFlg2 = true;
  14908. }
  14909. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14910. {
  14911. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.3f);
  14912. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.3f);
  14913. idoFlg2 = true;
  14914. }
  14915. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.I))
  14916. {
  14917. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  14918. idoFlg2 = true;
  14919. }
  14920. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.K))
  14921. {
  14922. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  14923. idoFlg2 = true;
  14924. }
  14925. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.J))
  14926. {
  14927. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  14928. idoFlg2 = true;
  14929. }
  14930. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.L))
  14931. {
  14932. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  14933. idoFlg2 = true;
  14934. }
  14935. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.U))
  14936. {
  14937. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  14938. idoFlg2 = true;
  14939. }
  14940. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Alt) && Input.GetKey(KeyCode.O))
  14941. {
  14942. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  14943. idoFlg2 = true;
  14944. }
  14945. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && ((Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(MultipleMaids.modKey.Shift)) || (Input.GetKey(KeyCode.K) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  14946. {
  14947. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.7f);
  14948. idoFlg2 = true;
  14949. }
  14950. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && ((Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(MultipleMaids.modKey.Shift)) || (Input.GetKey(KeyCode.I) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  14951. {
  14952. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.7f);
  14953. idoFlg2 = true;
  14954. }
  14955. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && (Input.GetKey(KeyCode.Minus) || (Input.GetKey(KeyCode.J) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  14956. {
  14957. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.7f);
  14958. idoFlg2 = true;
  14959. }
  14960. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && (Input.GetKey(KeyCode.Quote) || (Input.GetKey(KeyCode.L) && this.getModKeyPressing(MultipleMaids.modKey.Alt))))
  14961. {
  14962. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.7f);
  14963. idoFlg2 = true;
  14964. }
  14965. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14966. {
  14967. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  14968. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  14969. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  14970. doguObject[doguSelectIndex].transform.localPosition = vector;
  14971. idoFlg2 = true;
  14972. }
  14973. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14974. {
  14975. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  14976. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  14977. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  14978. doguObject[doguSelectIndex].transform.localPosition = vector;
  14979. idoFlg2 = true;
  14980. }
  14981. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14982. {
  14983. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  14984. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  14985. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  14986. doguObject[doguSelectIndex].transform.localPosition = vector;
  14987. idoFlg2 = true;
  14988. }
  14989. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14990. {
  14991. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  14992. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  14993. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  14994. doguObject[doguSelectIndex].transform.localPosition = vector;
  14995. idoFlg2 = true;
  14996. }
  14997. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  14998. {
  14999. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15000. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15001. doguObject[doguSelectIndex].transform.localPosition = vector;
  15002. idoFlg2 = true;
  15003. }
  15004. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15005. {
  15006. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15007. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15008. doguObject[doguSelectIndex].transform.localPosition = vector;
  15009. idoFlg2 = true;
  15010. }
  15011. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15012. {
  15013. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15014. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15015. doguObject[doguSelectIndex].transform.localPosition = vector;
  15016. idoFlg2 = true;
  15017. }
  15018. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15019. {
  15020. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15021. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15022. doguObject[doguSelectIndex].transform.localPosition = vector;
  15023. idoFlg2 = true;
  15024. }
  15025. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15026. {
  15027. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15028. vector.y += 0.0075f * speed;
  15029. doguObject[doguSelectIndex].transform.localPosition = vector;
  15030. idoFlg2 = true;
  15031. }
  15032. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15033. {
  15034. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15035. vector.y -= 0.0075f * speed;
  15036. doguObject[doguSelectIndex].transform.localPosition = vector;
  15037. idoFlg2 = true;
  15038. }
  15039. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15040. {
  15041. idoFlg2 = true;
  15042. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15043. {
  15044. UnityEngine.Object.Destroy(doguObject[doguSelectIndex]);
  15045. doguObject.RemoveAt(doguSelectIndex);
  15046. }
  15047. doguIndex.RemoveAt(doguSelectIndex);
  15048. doguSelectIndex = 0;
  15049. }
  15050. }
  15051. if (Input.GetKeyDown(KeyCode.W) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  15052. {
  15053. idoFlg2 = true;
  15054. if (doguSelectIndex == doguObject.Count)
  15055. {
  15056. doguIndex.Add(0);
  15057. }
  15058. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15059. {
  15060. UnityEngine.Object.Destroy(doguObject[doguSelectIndex]);
  15061. doguObject.RemoveAt(doguSelectIndex);
  15062. }
  15063. else
  15064. {
  15065. doguIndex.Add(0);
  15066. doguSelectIndex = doguIndex.Count - 1;
  15067. }
  15068. List<int> list2;
  15069. int index;
  15070. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15071. if (doguIndex[doguSelectIndex] <= -1)
  15072. {
  15073. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15074. }
  15075. if (doguIndex[doguSelectIndex] > 0)
  15076. {
  15077. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15078. {
  15079. UnityEngine.Object @object = null;
  15080. for (int j = 0; j < 5; j++)
  15081. {
  15082. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15083. if (@object != null)
  15084. {
  15085. break;
  15086. }
  15087. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15088. }
  15089. doguObject.Add(UnityEngine.Object.Instantiate(@object) as GameObject);
  15090. }
  15091. else
  15092. {
  15093. Material material = new Material(Shader.Find("Mirror"));
  15094. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15095. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15096. gameObject7.GetComponent<Renderer>().material = material;
  15097. gameObject7.AddComponent<MirrorReflection2>();
  15098. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15099. component5.m_TextureSize = 2048;
  15100. component5.m_ClipPlaneOffset = 0f;
  15101. gameObject7.GetComponent<Renderer>().enabled = true;
  15102. doguObject.Add(gameObject7);
  15103. }
  15104. Vector3 vector = Vector3.zero;
  15105. Vector3 zero3 = Vector3.zero;
  15106. zero3.x = -90f;
  15107. switch (doguIndex[doguSelectIndex])
  15108. {
  15109. case 1:
  15110. vector.z = -0.5f;
  15111. goto IL_344DC;
  15112. case 2:
  15113. vector.z = -0.5f;
  15114. goto IL_344DC;
  15115. case 3:
  15116. vector.z = 0.5f;
  15117. zero3.z = 90f;
  15118. goto IL_344DC;
  15119. case 4:
  15120. vector.z = 0.9f;
  15121. goto IL_344DC;
  15122. case 5:
  15123. vector.z = 0.9f;
  15124. goto IL_344DC;
  15125. case 6:
  15126. vector.z = 0.6f;
  15127. zero3.x = 0f;
  15128. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15129. goto IL_344DC;
  15130. case 7:
  15131. vector.z = 0.6f;
  15132. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15133. goto IL_344DC;
  15134. case 8:
  15135. vector.z = 0.5f;
  15136. zero3.x = 0f;
  15137. goto IL_344DC;
  15138. case 9:
  15139. vector.z = 0.32f;
  15140. zero3.z = 180f;
  15141. goto IL_344DC;
  15142. case 10:
  15143. vector.z = 0.6f;
  15144. goto IL_344DC;
  15145. case 11:
  15146. vector.z = 0.6f;
  15147. goto IL_344DC;
  15148. case 12:
  15149. vector.z = 0.5f;
  15150. zero3.z = 180f;
  15151. goto IL_344DC;
  15152. case 13:
  15153. vector.z = 0.7f;
  15154. zero3.z = 180f;
  15155. goto IL_344DC;
  15156. case 14:
  15157. vector.z = -0.4f;
  15158. goto IL_344DC;
  15159. case 15:
  15160. vector.z = -0.4f;
  15161. goto IL_344DC;
  15162. case 16:
  15163. vector.z = -0.4f;
  15164. zero3.z = 180f;
  15165. goto IL_344DC;
  15166. case 17:
  15167. vector.z = -0.4f;
  15168. goto IL_344DC;
  15169. case 18:
  15170. vector.z = -0.2f;
  15171. goto IL_344DC;
  15172. case 19:
  15173. vector.z = 0f;
  15174. goto IL_344DC;
  15175. case 20:
  15176. vector.z = 3.4f;
  15177. vector.x = -1f;
  15178. goto IL_344DC;
  15179. case 21:
  15180. vector.z = 3.4f;
  15181. vector.x = -1f;
  15182. goto IL_344DC;
  15183. case 22:
  15184. vector.z = 3.4f;
  15185. vector.y = 0.3f;
  15186. vector.x = -1f;
  15187. goto IL_344DC;
  15188. case 23:
  15189. vector.z = 2.7f;
  15190. vector.x = 0.77f;
  15191. zero3.z = 90f;
  15192. goto IL_344DC;
  15193. case 25:
  15194. vector.z = 0.5f;
  15195. vector.y = 0.9f;
  15196. zero3.z = 180f;
  15197. goto IL_344DC;
  15198. case 26:
  15199. vector.z = 0.5f;
  15200. vector.y = 0.9f;
  15201. zero3.z = 180f;
  15202. goto IL_344DC;
  15203. case 29:
  15204. vector.z = 0.5f;
  15205. vector.x = -1.05f;
  15206. goto IL_344DC;
  15207. case 30:
  15208. vector.z = -2.8f;
  15209. zero3.z = 0f;
  15210. zero3.x = 0f;
  15211. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15212. goto IL_344DC;
  15213. case 31:
  15214. vector.z = -0.6f;
  15215. vector.y = 0.96f;
  15216. zero3.z = 180f;
  15217. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15218. goto IL_344DC;
  15219. case 32:
  15220. vector.z = -0.6f;
  15221. vector.y = 0.96f;
  15222. zero3.z = 180f;
  15223. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15224. goto IL_344DC;
  15225. case 33:
  15226. vector.z = -0.6f;
  15227. vector.y = 0.85f;
  15228. zero3.z = 180f;
  15229. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15230. goto IL_344DC;
  15231. }
  15232. vector.z = 0.5f;
  15233. IL_344DC:
  15234. doguObject[doguSelectIndex].transform.localPosition = vector;
  15235. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15236. }
  15237. if (doguIndex[doguSelectIndex] == 0)
  15238. {
  15239. doguIndex.RemoveAt(doguSelectIndex);
  15240. }
  15241. }
  15242. else if (Input.GetKeyDown(KeyCode.W))
  15243. {
  15244. for (int k = 0; k < keyArray.Length; k++)
  15245. {
  15246. if (Input.GetKey(keyArray[k]))
  15247. {
  15248. wFlg = true;
  15249. break;
  15250. }
  15251. }
  15252. }
  15253. else if (Input.GetKeyUp(KeyCode.W))
  15254. {
  15255. if (wFlg)
  15256. {
  15257. wFlg = false;
  15258. }
  15259. else if (idoFlg2)
  15260. {
  15261. idoFlg2 = false;
  15262. }
  15263. else
  15264. {
  15265. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15266. {
  15267. UnityEngine.Object.Destroy(doguObject[doguSelectIndex]);
  15268. doguObject.RemoveAt(doguSelectIndex);
  15269. }
  15270. else
  15271. {
  15272. doguIndex.Add(0);
  15273. doguSelectIndex = doguIndex.Count - 1;
  15274. }
  15275. List<int> list2;
  15276. int index;
  15277. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15278. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15279. {
  15280. doguIndex[doguSelectIndex] = 0;
  15281. }
  15282. if (doguIndex[doguSelectIndex] > 0)
  15283. {
  15284. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15285. {
  15286. UnityEngine.Object @object = null;
  15287. for (int j = 0; j < 5; j++)
  15288. {
  15289. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15290. if (@object != null)
  15291. {
  15292. break;
  15293. }
  15294. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15295. }
  15296. doguObject.Add(UnityEngine.Object.Instantiate(@object) as GameObject);
  15297. }
  15298. else
  15299. {
  15300. Material material = new Material(Shader.Find("Mirror"));
  15301. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15302. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15303. gameObject7.GetComponent<Renderer>().material = material;
  15304. gameObject7.AddComponent<MirrorReflection2>();
  15305. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15306. component5.m_TextureSize = 2048;
  15307. component5.m_ClipPlaneOffset = 0f;
  15308. gameObject7.GetComponent<Renderer>().enabled = true;
  15309. doguObject.Add(gameObject7);
  15310. }
  15311. Vector3 vector = Vector3.zero;
  15312. Vector3 zero3 = Vector3.zero;
  15313. zero3.x = -90f;
  15314. switch (doguIndex[doguSelectIndex])
  15315. {
  15316. case 1:
  15317. vector.z = -0.5f;
  15318. goto IL_34D66;
  15319. case 2:
  15320. vector.z = -0.5f;
  15321. goto IL_34D66;
  15322. case 3:
  15323. vector.z = 0.5f;
  15324. zero3.z = 90f;
  15325. goto IL_34D66;
  15326. case 4:
  15327. vector.z = 0.9f;
  15328. goto IL_34D66;
  15329. case 5:
  15330. vector.z = 0.9f;
  15331. goto IL_34D66;
  15332. case 6:
  15333. vector.z = 0.6f;
  15334. zero3.x = 0f;
  15335. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15336. goto IL_34D66;
  15337. case 7:
  15338. vector.z = 0.6f;
  15339. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15340. goto IL_34D66;
  15341. case 8:
  15342. vector.z = 0.5f;
  15343. zero3.x = 0f;
  15344. goto IL_34D66;
  15345. case 9:
  15346. vector.z = 0.32f;
  15347. zero3.z = 180f;
  15348. goto IL_34D66;
  15349. case 10:
  15350. vector.z = 0.6f;
  15351. goto IL_34D66;
  15352. case 11:
  15353. vector.z = 0.6f;
  15354. goto IL_34D66;
  15355. case 12:
  15356. vector.z = 0.5f;
  15357. zero3.z = 180f;
  15358. goto IL_34D66;
  15359. case 13:
  15360. vector.z = 0.7f;
  15361. zero3.z = 180f;
  15362. goto IL_34D66;
  15363. case 14:
  15364. vector.z = -0.4f;
  15365. goto IL_34D66;
  15366. case 15:
  15367. vector.z = -0.4f;
  15368. goto IL_34D66;
  15369. case 16:
  15370. vector.z = -0.4f;
  15371. zero3.z = 180f;
  15372. goto IL_34D66;
  15373. case 17:
  15374. vector.z = -0.4f;
  15375. goto IL_34D66;
  15376. case 18:
  15377. vector.z = -0.2f;
  15378. goto IL_34D66;
  15379. case 19:
  15380. vector.z = 0f;
  15381. goto IL_34D66;
  15382. case 20:
  15383. vector.z = 3.4f;
  15384. vector.x = -1f;
  15385. goto IL_34D66;
  15386. case 21:
  15387. vector.z = 3.4f;
  15388. vector.x = -1f;
  15389. goto IL_34D66;
  15390. case 22:
  15391. vector.z = 3.4f;
  15392. vector.y = 0.3f;
  15393. vector.x = -1f;
  15394. goto IL_34D66;
  15395. case 23:
  15396. vector.z = 2.7f;
  15397. vector.x = 0.77f;
  15398. zero3.z = 90f;
  15399. goto IL_34D66;
  15400. case 25:
  15401. vector.z = 0.5f;
  15402. vector.y = 0.9f;
  15403. zero3.z = 180f;
  15404. goto IL_34D66;
  15405. case 26:
  15406. vector.z = 0.5f;
  15407. vector.y = 0.9f;
  15408. zero3.z = 180f;
  15409. goto IL_34D66;
  15410. case 29:
  15411. vector.z = 0.5f;
  15412. vector.x = -1.05f;
  15413. goto IL_34D66;
  15414. case 30:
  15415. vector.z = -2.8f;
  15416. zero3.z = 0f;
  15417. zero3.x = 0f;
  15418. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15419. goto IL_34D66;
  15420. case 31:
  15421. vector.z = -0.6f;
  15422. vector.y = 0.96f;
  15423. zero3.z = 180f;
  15424. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15425. goto IL_34D66;
  15426. case 32:
  15427. vector.z = -0.6f;
  15428. vector.y = 0.96f;
  15429. zero3.z = 180f;
  15430. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15431. goto IL_34D66;
  15432. case 33:
  15433. vector.z = -0.6f;
  15434. vector.y = 0.85f;
  15435. zero3.z = 180f;
  15436. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15437. goto IL_34D66;
  15438. }
  15439. vector.z = 0.5f;
  15440. IL_34D66:;
  15441. }
  15442. if (doguIndex[doguSelectIndex] == 0)
  15443. {
  15444. doguIndex.RemoveAt(doguSelectIndex);
  15445. }
  15446. }
  15447. }
  15448. }
  15449. if (!isVR)
  15450. {
  15451. int i;
  15452. for (i = 0; i < 999; i++)
  15453. {
  15454. if (gDogu[i] != null)
  15455. {
  15456. gDogu[i].GetComponent<Renderer>().enabled = false;
  15457. gDogu[i].SetActive(false);
  15458. if (mDogu[i].del)
  15459. {
  15460. mDogu[i].del = false;
  15461. UnityEngine.Object.Destroy(doguBObject[i]);
  15462. doguBObject.RemoveAt(i);
  15463. }
  15464. else if (mDogu[i].count > 0)
  15465. {
  15466. mDogu[i].count--;
  15467. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15468. {
  15469. if (mDogu[i].count == 1)
  15470. {
  15471. doguBObject[i].SetActive(false);
  15472. }
  15473. if (mDogu[i].count == 0)
  15474. {
  15475. doguBObject[i].SetActive(true);
  15476. string name = doguBObject[i].name;
  15477. if (name != null)
  15478. {
  15479. if (!(name == "Particle/pLineY"))
  15480. {
  15481. if (!(name == "Particle/pLineP02"))
  15482. {
  15483. if (!(name == "Particle/pLine_act2"))
  15484. {
  15485. if (name == "Particle/pHeart01")
  15486. {
  15487. mDogu[i].count = 77;
  15488. }
  15489. }
  15490. else
  15491. {
  15492. mDogu[i].count = 90;
  15493. }
  15494. }
  15495. else
  15496. {
  15497. mDogu[i].count = 115;
  15498. }
  15499. }
  15500. else
  15501. {
  15502. mDogu[i].count = 180;
  15503. }
  15504. }
  15505. }
  15506. }
  15507. }
  15508. }
  15509. }
  15510. if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  15511. {
  15512. ikMode2 = 11;
  15513. }
  15514. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(MultipleMaids.modKey.Ctrl))
  15515. {
  15516. ikMode2 = 12;
  15517. }
  15518. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  15519. {
  15520. ikMode2 = 14;
  15521. }
  15522. else if (Input.GetKey(KeyCode.X))
  15523. {
  15524. ikMode2 = 9;
  15525. }
  15526. else if (Input.GetKey(KeyCode.Z))
  15527. {
  15528. ikMode2 = 10;
  15529. }
  15530. else if (Input.GetKey(KeyCode.C))
  15531. {
  15532. ikMode2 = 13;
  15533. }
  15534. else if (Input.GetKey(KeyCode.D))
  15535. {
  15536. ikMode2 = 15;
  15537. }
  15538. else
  15539. {
  15540. ikMode2 = 0;
  15541. }
  15542. if (gBg != null)
  15543. {
  15544. if (!isCube3)
  15545. {
  15546. gBg.GetComponent<Renderer>().enabled = false;
  15547. gBg.SetActive(false);
  15548. }
  15549. else
  15550. {
  15551. if (ikMode2 > 0 && ikMode2 != 15)
  15552. {
  15553. gBg.GetComponent<Renderer>().enabled = true;
  15554. gBg.SetActive(true);
  15555. }
  15556. else
  15557. {
  15558. gBg.GetComponent<Renderer>().enabled = false;
  15559. gBg.SetActive(false);
  15560. }
  15561. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15562. {
  15563. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15564. }
  15565. if (ikMode2 == 9 || ikMode2 == 14)
  15566. {
  15567. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15568. mBg.Update();
  15569. }
  15570. if (ikMode2 == 13)
  15571. {
  15572. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15573. mBg.Update();
  15574. }
  15575. if (ikMode2 == 13)
  15576. {
  15577. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15578. {
  15579. mBg.ido = 5;
  15580. mBg.reset = true;
  15581. }
  15582. else
  15583. {
  15584. gBg.transform.position = bg.position;
  15585. gBg.transform.eulerAngles = bg.eulerAngles;
  15586. mBg.maid = bgObject;
  15587. mBg.ido = 5;
  15588. }
  15589. }
  15590. else if (ikMode2 == 11)
  15591. {
  15592. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15593. {
  15594. mBg.ido = 3;
  15595. mBg.reset = true;
  15596. }
  15597. else
  15598. {
  15599. gBg.transform.position = bg.position;
  15600. gBg.transform.eulerAngles = bg.eulerAngles;
  15601. mBg.maid = bgObject;
  15602. mBg.ido = 3;
  15603. }
  15604. }
  15605. else if (ikMode2 == 12)
  15606. {
  15607. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15608. {
  15609. mBg.ido = 2;
  15610. mBg.reset = true;
  15611. }
  15612. else
  15613. {
  15614. gBg.transform.position = bg.position;
  15615. gBg.transform.eulerAngles = bg.eulerAngles;
  15616. mBg.maid = bgObject;
  15617. mBg.ido = 2;
  15618. }
  15619. }
  15620. else if (ikMode2 == 10)
  15621. {
  15622. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15623. {
  15624. mBg.ido = 1;
  15625. mBg.reset = true;
  15626. }
  15627. else
  15628. {
  15629. gBg.transform.position = bg.position;
  15630. gBg.transform.eulerAngles = bg.eulerAngles;
  15631. mBg.maid = bgObject;
  15632. mBg.ido = 1;
  15633. }
  15634. }
  15635. else if (ikMode2 == 9)
  15636. {
  15637. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15638. {
  15639. mBg.ido = 4;
  15640. mBg.reset = true;
  15641. }
  15642. else
  15643. {
  15644. gBg.transform.position = bg.position;
  15645. gBg.transform.eulerAngles = bg.eulerAngles;
  15646. mBg.maid = bgObject;
  15647. mBg.ido = 4;
  15648. }
  15649. }
  15650. else if (ikMode2 == 14)
  15651. {
  15652. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15653. {
  15654. mBg.ido = 6;
  15655. mBg.reset = true;
  15656. }
  15657. else
  15658. {
  15659. gBg.transform.position = bg.position;
  15660. gBg.transform.eulerAngles = bg.eulerAngles;
  15661. mBg.maid = bgObject;
  15662. mBg.ido = 6;
  15663. }
  15664. }
  15665. }
  15666. }
  15667. i = 0;
  15668. while (i < lightIndex.Count)
  15669. {
  15670. if (gLight[0] == null)
  15671. {
  15672. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15673. Material material2 = new Material(Shader.Find("Transparent/Diffuse"));
  15674. material2.color = new Color(0.5f, 0.5f, 1f, 0.8f);
  15675. gLight[0].GetComponent<Renderer>().material = material2;
  15676. gLight[0].layer = 8;
  15677. gLight[0].GetComponent<Renderer>().enabled = false;
  15678. gLight[0].SetActive(false);
  15679. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15680. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15681. mLight[0].obj = gLight[0];
  15682. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15683. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15684. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15685. mLight[0].ido = 1;
  15686. mLight[0].isScale = false;
  15687. }
  15688. if (gLight[i] != null)
  15689. {
  15690. if (!isCube4)
  15691. {
  15692. gLight[i].GetComponent<Renderer>().enabled = false;
  15693. gLight[i].SetActive(false);
  15694. }
  15695. else if (lightList[i].GetComponent<Light>().type == LightType.Spot || lightList[i].GetComponent<Light>().type == LightType.Point)
  15696. {
  15697. if (ikMode2 > 0 && ikMode2 != 15)
  15698. {
  15699. gLight[i].GetComponent<Renderer>().enabled = true;
  15700. gLight[i].SetActive(true);
  15701. }
  15702. else
  15703. {
  15704. gLight[i].GetComponent<Renderer>().enabled = false;
  15705. gLight[i].SetActive(false);
  15706. mLight[i].isAlt = false;
  15707. }
  15708. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15709. {
  15710. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15711. if (mLight[i].isAlt)
  15712. {
  15713. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15714. }
  15715. }
  15716. if (ikMode2 == 9 || ikMode2 == 14)
  15717. {
  15718. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15719. mLight[i].Update();
  15720. }
  15721. if (ikMode2 == 13)
  15722. {
  15723. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15724. mLight[i].Update();
  15725. }
  15726. if (ikMode2 == 13)
  15727. {
  15728. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15729. {
  15730. mLight[i].ido = 15;
  15731. mLight[i].reset = true;
  15732. }
  15733. else
  15734. {
  15735. if (lightList[i].transform.localScale.x == 1f)
  15736. {
  15737. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15738. }
  15739. lightRange[i] = lightList[i].transform.localScale.x;
  15740. gLight[i].transform.position = lightList[i].transform.position;
  15741. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15742. mLight[i].maid = lightList[i];
  15743. mLight[i].ido = 15;
  15744. }
  15745. }
  15746. else if (ikMode2 == 11)
  15747. {
  15748. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15749. {
  15750. mLight[i].ido = 3;
  15751. mLight[i].reset = true;
  15752. }
  15753. else
  15754. {
  15755. gLight[i].transform.position = lightList[i].transform.position;
  15756. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15757. lightX[i] = gLight[i].transform.eulerAngles.x;
  15758. lightY[i] = gLight[i].transform.eulerAngles.y;
  15759. mLight[i].maid = lightList[i];
  15760. mLight[i].ido = 3;
  15761. }
  15762. }
  15763. else if (ikMode2 == 12)
  15764. {
  15765. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15766. {
  15767. mLight[i].ido = 2;
  15768. mLight[i].reset = true;
  15769. }
  15770. else
  15771. {
  15772. gLight[i].transform.position = lightList[i].transform.position;
  15773. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15774. mLight[i].maid = lightList[i];
  15775. mLight[i].ido = 2;
  15776. }
  15777. }
  15778. else if (ikMode2 == 10)
  15779. {
  15780. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15781. {
  15782. mLight[i].ido = 1;
  15783. mLight[i].reset = true;
  15784. }
  15785. else
  15786. {
  15787. gLight[i].transform.position = lightList[i].transform.position;
  15788. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15789. mLight[i].maid = lightList[i];
  15790. mLight[i].maidArray = lightList.ToArray();
  15791. mLight[i].mArray = mLight.ToArray<MouseDrag6>();
  15792. mLight[i].ido = 1;
  15793. }
  15794. }
  15795. else if (ikMode2 == 9)
  15796. {
  15797. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15798. {
  15799. mLight[i].ido = 4;
  15800. mLight[i].reset = true;
  15801. }
  15802. else
  15803. {
  15804. gLight[i].transform.position = lightList[i].transform.position;
  15805. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15806. lightX[i] = gLight[i].transform.eulerAngles.x;
  15807. lightY[i] = gLight[i].transform.eulerAngles.y;
  15808. mLight[i].maid = lightList[i];
  15809. mLight[i].ido = 4;
  15810. }
  15811. }
  15812. else if (ikMode2 == 14)
  15813. {
  15814. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15815. {
  15816. mLight[i].ido = 6;
  15817. mLight[i].reset = true;
  15818. }
  15819. else
  15820. {
  15821. gLight[i].transform.position = lightList[i].transform.position;
  15822. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15823. lightX[i] = gLight[i].transform.eulerAngles.x;
  15824. lightY[i] = gLight[i].transform.eulerAngles.y;
  15825. mLight[i].maid = lightList[i];
  15826. mLight[i].ido = 6;
  15827. }
  15828. }
  15829. }
  15830. }
  15831. IL_36227:
  15832. i++;
  15833. continue;
  15834. goto IL_36227;
  15835. }
  15836. for (i = 0; i < doguBObject.Count; i++)
  15837. {
  15838. if (!isCube2)
  15839. {
  15840. gDogu[i].GetComponent<Renderer>().enabled = false;
  15841. gDogu[i].SetActive(false);
  15842. }
  15843. else
  15844. {
  15845. if (ikMode2 > 0)
  15846. {
  15847. gDogu[i].GetComponent<Renderer>().enabled = true;
  15848. gDogu[i].SetActive(true);
  15849. }
  15850. else
  15851. {
  15852. gDogu[i].GetComponent<Renderer>().enabled = false;
  15853. gDogu[i].SetActive(false);
  15854. mDogu[i].isAlt = false;
  15855. }
  15856. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15857. {
  15858. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15859. if (mDogu[i].isAlt)
  15860. {
  15861. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15862. }
  15863. }
  15864. if (ikMode2 == 9 || ikMode2 == 14)
  15865. {
  15866. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15867. mDogu[i].Update();
  15868. }
  15869. if (ikMode2 == 15)
  15870. {
  15871. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  15872. }
  15873. if (ikMode2 == 13)
  15874. {
  15875. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15876. mDogu[i].Update();
  15877. }
  15878. if (ikMode2 == 13)
  15879. {
  15880. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  15881. {
  15882. mDogu[i].ido = 5;
  15883. mDogu[i].reset = true;
  15884. }
  15885. else
  15886. {
  15887. gDogu[i].transform.position = doguBObject[i].transform.position;
  15888. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15889. mDogu[i].maid = doguBObject[i];
  15890. mDogu[i].ido = 5;
  15891. }
  15892. }
  15893. else if (ikMode2 == 11)
  15894. {
  15895. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  15896. {
  15897. mDogu[i].ido = 3;
  15898. mDogu[i].reset = true;
  15899. }
  15900. else
  15901. {
  15902. gDogu[i].transform.position = doguBObject[i].transform.position;
  15903. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15904. mDogu[i].maid = doguBObject[i];
  15905. mDogu[i].ido = 3;
  15906. }
  15907. }
  15908. else if (ikMode2 == 12)
  15909. {
  15910. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  15911. {
  15912. mDogu[i].ido = 2;
  15913. mDogu[i].reset = true;
  15914. }
  15915. else
  15916. {
  15917. gDogu[i].transform.position = doguBObject[i].transform.position;
  15918. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15919. mDogu[i].maid = doguBObject[i];
  15920. mDogu[i].ido = 2;
  15921. }
  15922. }
  15923. else if (ikMode2 == 10)
  15924. {
  15925. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  15926. {
  15927. mDogu[i].ido = 1;
  15928. mDogu[i].reset = true;
  15929. }
  15930. else
  15931. {
  15932. gDogu[i].transform.position = doguBObject[i].transform.position;
  15933. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15934. mDogu[i].maid = doguBObject[i];
  15935. mDogu[i].maidArray = doguBObject.ToArray();
  15936. mDogu[i].mArray = mDogu.ToArray<MouseDrag6>();
  15937. mDogu[i].ido = 1;
  15938. }
  15939. }
  15940. else if (ikMode2 == 9)
  15941. {
  15942. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  15943. {
  15944. mDogu[i].ido = 4;
  15945. mDogu[i].reset = true;
  15946. }
  15947. else
  15948. {
  15949. gDogu[i].transform.position = doguBObject[i].transform.position;
  15950. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15951. mDogu[i].maid = doguBObject[i];
  15952. mDogu[i].ido = 4;
  15953. }
  15954. }
  15955. else if (ikMode2 == 14)
  15956. {
  15957. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  15958. {
  15959. mDogu[i].ido = 6;
  15960. mDogu[i].reset = true;
  15961. }
  15962. else
  15963. {
  15964. gDogu[i].transform.position = doguBObject[i].transform.position;
  15965. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15966. mDogu[i].maid = doguBObject[i];
  15967. mDogu[i].ido = 6;
  15968. }
  15969. }
  15970. else if (ikMode2 == 15)
  15971. {
  15972. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  15973. {
  15974. mDogu[i].ido = 7;
  15975. mDogu[i].reset = true;
  15976. }
  15977. else
  15978. {
  15979. gDogu[i].transform.position = doguBObject[i].transform.position;
  15980. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15981. mDogu[i].maid = doguBObject[i];
  15982. mDogu[i].ido = 7;
  15983. }
  15984. }
  15985. }
  15986. }
  15987. ikModeOld2 = ikMode2;
  15988. }
  15989. if (isVR)
  15990. {
  15991. if (Input.GetKeyDown(KeyCode.F8) && this.getModKeyPressing(MultipleMaids.modKey.Shift))
  15992. {
  15993. if (!isVR2)
  15994. {
  15995. isVR2 = true;
  15996. base.Preferences["config"]["shift_f8"].Value = "true";
  15997. base.SaveConfig();
  15998. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  15999. }
  16000. else
  16001. {
  16002. isVR2 = false;
  16003. base.Preferences["config"]["shift_f8"].Value = "false";
  16004. base.SaveConfig();
  16005. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16006. }
  16007. }
  16008. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16009. {
  16010. loadScene = 1;
  16011. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16012. }
  16013. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16014. {
  16015. loadScene = 2;
  16016. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16017. }
  16018. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16019. {
  16020. loadScene = 3;
  16021. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16022. }
  16023. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16024. {
  16025. loadScene = 4;
  16026. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16027. }
  16028. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16029. {
  16030. loadScene = 5;
  16031. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16032. }
  16033. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16034. {
  16035. loadScene = 6;
  16036. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16037. }
  16038. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16039. {
  16040. loadScene = 7;
  16041. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16042. }
  16043. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16044. {
  16045. loadScene = 8;
  16046. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16047. }
  16048. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16049. {
  16050. loadScene = 9;
  16051. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16052. }
  16053. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16054. {
  16055. loadScene = 10;
  16056. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16057. }
  16058. for (int j = 0; j < 7; j++)
  16059. {
  16060. if (!maidArray[j])
  16061. {
  16062. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16063. }
  16064. }
  16065. }
  16066. }
  16067. }
  16068. }
  16069. }