MultipleMaids.MaidUpdate.cs 921 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (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] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. if (lightList.Count == 0)
  661. {
  662. float num2 = 2f;
  663. if (Application.unityVersion.StartsWith("4"))
  664. {
  665. num2 = 1f;
  666. }
  667. GameObject gameObject3 = new GameObject("Light");
  668. gameObject3.AddComponent<Light>();
  669. lightList.Add(gameObject3);
  670. lightColorR.Add(1f);
  671. lightColorG.Add(1f);
  672. lightColorB.Add(1f);
  673. lightIndex.Add(0);
  674. lightX.Add(40f);
  675. lightY.Add(180f);
  676. lightAkarusa.Add(num2);
  677. lightKage.Add(0.098f);
  678. lightRange.Add(50f);
  679. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  680. gameObject3.GetComponent<Light>().intensity = num2;
  681. gameObject3.GetComponent<Light>().spotAngle = 50f;
  682. gameObject3.GetComponent<Light>().range = 10f;
  683. gameObject3.GetComponent<Light>().type = LightType.Directional;
  684. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  685. gameObject3.GetComponent<Light>().cullingMask = 256;
  686. // lightComboList = new GUIContent[lightList.Count];
  687. // lightComboList[0] = new GUIContent("メイン");
  688. // lightCombo.selectedItemIndex = 0;
  689. // selectLightIndex = 0;
  690. }
  691. }
  692. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  693. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  694. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  695. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  696. {
  697. float axis = Input.GetAxis("Mouse ScrollWheel");
  698. if (axis > 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  701. if (mainCamera.GetDistance() < 0.1f)
  702. {
  703. mainCamera.SetDistance(0.1f, true);
  704. }
  705. }
  706. else if (axis < 0f)
  707. {
  708. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  709. if (mainCamera.GetDistance() > 25f)
  710. {
  711. mainCamera.SetDistance(25f, true);
  712. }
  713. }
  714. }
  715. for (int j = 0; j < maxMaidCnt; j++)
  716. {
  717. if (maidArray[j] && maidArray[j].Visible)
  718. {
  719. maidCnt++;
  720. }
  721. }
  722. if (maidArray[0] != null && maidArray[0].Visible)
  723. {
  724. if (getModKeyPressing(modKey.Shift))
  725. {
  726. speed = 5f * Time.deltaTime * 60f;
  727. }
  728. else
  729. {
  730. speed = 1f * Time.deltaTime * 60f;
  731. }
  732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  735. if (!isVR || isVR2)
  736. {
  737. if (!isVR)
  738. {
  739. if (isBloom)
  740. {
  741. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  742. fieldValue2.enabled = true;
  743. fieldValue2.bloomIntensity = bloom1;
  744. fieldValue2.bloomBlurIterations = (int)bloom2;
  745. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  746. if (isBloomA)
  747. {
  748. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  749. }
  750. else
  751. {
  752. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  753. }
  754. isBloom2 = true;
  755. }
  756. else if (isBloom2)
  757. {
  758. isBloom2 = false;
  759. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  760. fieldValue2.enabled = true;
  761. fieldValue2.bloomIntensity = 2.85f;
  762. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  763. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  764. fieldValue2.bloomBlurIterations = 3;
  765. }
  766. if (isDepth)
  767. {
  768. depth_field_.enabled = true;
  769. depth_field_.focalLength = depth1;
  770. depth_field_.focalSize = depth2;
  771. depth_field_.aperture = depth3;
  772. depth_field_.maxBlurSize = depth4;
  773. if (isDepthA)
  774. {
  775. depth_field_.visualizeFocus = true;
  776. }
  777. else
  778. {
  779. depth_field_.visualizeFocus = false;
  780. }
  781. }
  782. else
  783. {
  784. if (depth_field_ == null)
  785. {
  786. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  787. if (depth_field_.dofHdrShader == null)
  788. {
  789. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  790. }
  791. if (depth_field_.dx11BokehShader == null)
  792. {
  793. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  794. }
  795. if (depth_field_.dx11BokehTexture == null)
  796. {
  797. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  798. }
  799. }
  800. depth_field_.enabled = false;
  801. }
  802. if (isFog)
  803. {
  804. if (fog_.fogShader == null)
  805. {
  806. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  807. }
  808. fog_.enabled = true;
  809. fog_.startDistance = fog1;
  810. fog_.globalDensity = fog2;
  811. fog_.heightScale = fog3;
  812. fog_.height = fog4;
  813. fog_.globalFogColor.r = fog5;
  814. fog_.globalFogColor.g = fog6;
  815. fog_.globalFogColor.b = fog7;
  816. }
  817. else
  818. {
  819. if (fog_ == null)
  820. {
  821. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  822. }
  823. fog_.enabled = false;
  824. }
  825. if (isSepia != isSepian)
  826. {
  827. isSepia = isSepian;
  828. if (isSepia)
  829. {
  830. if (sepia_tone_.shader == null)
  831. {
  832. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  833. }
  834. sepia_tone_.enabled = true;
  835. }
  836. else
  837. {
  838. if (sepia_tone_ == null)
  839. {
  840. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  841. }
  842. sepia_tone_.enabled = false;
  843. }
  844. }
  845. if (bokashi > 0f)
  846. {
  847. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  848. component.enabled = true;
  849. component.blurSize = bokashi / 10f;
  850. component.blurIterations = 0;
  851. component.downsample = 0;
  852. if (bokashi > 3f)
  853. {
  854. component.blurSize -= 0.3f;
  855. component.blurIterations = 1;
  856. component.downsample = 1;
  857. }
  858. }
  859. else
  860. {
  861. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  862. component.enabled = false;
  863. }
  864. if (kamiyure > 0f)
  865. {
  866. for (int j = 0; j < maidCnt; j++)
  867. {
  868. Maid maid = maidArray[j];
  869. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  870. {
  871. if (maid.body0.goSlot[l].obj != null)
  872. {
  873. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  874. if (component2 != null && component2.enabled)
  875. {
  876. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  877. }
  878. }
  879. List<THair1> fieldValue3 =
  880. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  881. for (int k = 0; k < fieldValue3.Count; k++)
  882. {
  883. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  884. }
  885. }
  886. }
  887. }
  888. if (isBlur)
  889. {
  890. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  891. component3.mode = Vignetting.AberrationMode.Simple;
  892. component3.intensity = blur1;
  893. component3.chromaticAberration = blur4;
  894. component3.blur = blur2;
  895. component3.blurSpread = blur3;
  896. component3.enabled = true;
  897. isBlur2 = true;
  898. }
  899. else if (isBlur2)
  900. {
  901. isBlur2 = false;
  902. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  903. component3.mode = Vignetting.AberrationMode.Simple;
  904. component3.intensity = -3.98f;
  905. component3.chromaticAberration = -0.75f;
  906. component3.axialAberration = 1.18f;
  907. component3.blurSpread = 4.19f;
  908. component3.luminanceDependency = 0.494f;
  909. component3.blurDistance = 1.71f;
  910. component3.enabled = false;
  911. }
  912. }
  913. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  919. {
  920. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  921. {
  922. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  923. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  924. }
  925. }
  926. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  927. {
  928. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  929. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  930. }
  931. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  932. {
  933. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  934. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  937. {
  938. GameMain.Instance.MainLight.Reset();
  939. GameMain.Instance.MainLight.SetIntensity(0.95f);
  940. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  941. lightIndex[0] = 0;
  942. lightColorR[0] = 1f;
  943. lightColorG[0] = 1f;
  944. lightColorB[0] = 1f;
  945. lightX[0] = 40f;
  946. lightY[0] = 180f;
  947. lightAkarusa[0] = 0.95f;
  948. lightKage[0] = 0.098f;
  949. lightRange[0] = 50f;
  950. bgObject.SetActive(true);
  951. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  952. isIdx1 = false;
  953. isIdx2 = false;
  954. isIdx3 = false;
  955. isIdx4 = false;
  956. }
  957. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  958. {
  959. List<float> list;
  960. (list = lightColorR)[0] = list[0] + 0.01f;
  961. if (lightColorR[0] > 1f)
  962. {
  963. lightColorR[0] = 1f;
  964. }
  965. if (lightIndex[0] != 3)
  966. {
  967. GameMain.Instance.MainLight.GetComponent<Light>().color =
  968. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  969. }
  970. else
  971. {
  972. mainCamera.GetComponent<Camera>().backgroundColor =
  973. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  974. }
  975. }
  976. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  977. {
  978. List<float> list;
  979. (list = lightColorG)[0] = list[0] + 0.01f;
  980. if (lightColorG[0] > 1f)
  981. {
  982. lightColorG[0] = 1f;
  983. }
  984. if (lightIndex[0] != 3)
  985. {
  986. GameMain.Instance.MainLight.GetComponent<Light>().color =
  987. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  988. }
  989. else
  990. {
  991. mainCamera.GetComponent<Camera>().backgroundColor =
  992. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  993. }
  994. }
  995. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  996. {
  997. List<float> list;
  998. (list = lightColorB)[0] = list[0] + 0.01f;
  999. if (lightColorB[0] > 1f)
  1000. {
  1001. lightColorB[0] = 1f;
  1002. }
  1003. if (lightIndex[0] != 3)
  1004. {
  1005. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1006. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1007. }
  1008. else
  1009. {
  1010. mainCamera.GetComponent<Camera>().backgroundColor =
  1011. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1012. }
  1013. }
  1014. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1015. {
  1016. List<float> list;
  1017. (list = lightColorR)[0] = list[0] - 0.01f;
  1018. if (lightColorR[0] < 0f)
  1019. {
  1020. lightColorR[0] = 0f;
  1021. }
  1022. if (lightIndex[0] != 3)
  1023. {
  1024. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1025. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1026. }
  1027. else
  1028. {
  1029. mainCamera.GetComponent<Camera>().backgroundColor =
  1030. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1031. }
  1032. }
  1033. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1034. {
  1035. List<float> list;
  1036. (list = lightColorG)[0] = list[0] - 0.01f;
  1037. if (lightColorG[0] < 0f)
  1038. {
  1039. lightColorG[0] = 0f;
  1040. }
  1041. if (lightIndex[0] != 3)
  1042. {
  1043. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1044. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1045. }
  1046. else
  1047. {
  1048. mainCamera.GetComponent<Camera>().backgroundColor =
  1049. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1050. }
  1051. }
  1052. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1053. {
  1054. List<float> list;
  1055. (list = lightColorB)[0] = list[0] - 0.01f;
  1056. if (lightColorB[0] < 0f)
  1057. {
  1058. lightColorB[0] = 0f;
  1059. }
  1060. if (lightIndex[0] != 3)
  1061. {
  1062. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1063. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1064. }
  1065. else
  1066. {
  1067. mainCamera.GetComponent<Camera>().backgroundColor =
  1068. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1069. }
  1070. }
  1071. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1072. {
  1073. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1074. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1075. }
  1076. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1077. {
  1078. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1079. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1080. }
  1081. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1084. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1085. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1086. }
  1087. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1088. {
  1089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1090. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1091. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1092. }
  1093. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1094. {
  1095. List<int> list2;
  1096. (list2 = lightIndex)[0] = list2[0] + 1;
  1097. if (lightIndex[0] == 4)
  1098. {
  1099. lightIndex[0] = 0;
  1100. }
  1101. lightColorR[0] = 1f;
  1102. lightColorG[0] = 1f;
  1103. lightColorB[0] = 1f;
  1104. lightX[0] = 40f;
  1105. lightY[0] = 180f;
  1106. lightAkarusa[0] = 0.95f;
  1107. lightKage[0] = 0.098f;
  1108. lightRange[0] = 50f;
  1109. GameMain.Instance.MainLight.Reset();
  1110. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1111. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1112. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1113. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1114. if (lightIndex[0] == 0)
  1115. {
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1117. bgObject.SetActive(true);
  1118. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1119. }
  1120. else if (lightIndex[0] == 1)
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1123. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1125. }
  1126. else if (lightIndex[0] == 2)
  1127. {
  1128. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1129. }
  1130. else if (lightIndex[0] == 3)
  1131. {
  1132. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1133. mainCamera.GetComponent<Camera>().backgroundColor =
  1134. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1135. bgObject.SetActive(false);
  1136. }
  1137. isIdx1 = false;
  1138. isIdx2 = false;
  1139. isIdx3 = false;
  1140. isIdx4 = false;
  1141. }
  1142. }
  1143. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1144. {
  1145. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1148. {
  1149. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1150. {
  1151. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1152. }
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1155. {
  1156. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1159. {
  1160. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1163. {
  1164. GameMain.Instance.MainLight.Reset();
  1165. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1168. {
  1169. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1170. }
  1171. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1172. {
  1173. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1174. }
  1175. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1176. {
  1177. if (lightIndex[0] == 1)
  1178. {
  1179. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1180. }
  1181. else
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1184. }
  1185. }
  1186. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1187. {
  1188. if (lightIndex[0] == 1)
  1189. {
  1190. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1191. }
  1192. else
  1193. {
  1194. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1195. }
  1196. }
  1197. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1198. {
  1199. List<int> list2;
  1200. (list2 = lightIndex)[0] = list2[0] + 1;
  1201. if (lightIndex[0] == 3)
  1202. {
  1203. lightIndex[0] = 0;
  1204. }
  1205. GameMain.Instance.MainLight.Reset();
  1206. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1208. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1209. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1210. if (lightIndex[0] == 0)
  1211. {
  1212. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1213. }
  1214. else if (lightIndex[0] == 1)
  1215. {
  1216. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1217. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1218. }
  1219. else if (lightIndex[0] == 2)
  1220. {
  1221. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1222. }
  1223. }
  1224. int i;
  1225. for (i = 0; i < lightList.Count; i++)
  1226. {
  1227. if (i > 0)
  1228. {
  1229. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1230. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1231. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1232. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1233. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1234. {
  1235. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1236. }
  1237. }
  1238. else
  1239. {
  1240. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1241. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1242. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1243. {
  1244. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1245. }
  1246. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1247. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1248. if (lightIndex[i] != 3)
  1249. {
  1250. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1251. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1252. }
  1253. else
  1254. {
  1255. mainCamera.GetComponent<Camera>().backgroundColor =
  1256. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1257. }
  1258. }
  1259. }
  1260. bool flag3 = false;
  1261. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1262. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1263. {
  1264. for (i = 0; i < maidCnt; i++)
  1265. {
  1266. if (goSlot[(int)selectList[i]] != null)
  1267. {
  1268. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1269. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1270. {
  1271. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1272. }
  1273. }
  1274. }
  1275. }
  1276. for (int j = 0; j < maidCnt; j++)
  1277. {
  1278. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1279. {
  1280. bool flag4 = shodaiFlg[(int)selectList[j]];
  1281. shodaiFlg[(int)selectList[j]] = false;
  1282. try
  1283. {
  1284. TMorph morph = maidArray[j].body0.Face.morph;
  1285. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1286. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1287. }
  1288. catch
  1289. {
  1290. shodaiFlg[(int)selectList[j]] = true;
  1291. }
  1292. if (shodaiFlg[(int)selectList[j]] != flag4)
  1293. {
  1294. if (!isVR)
  1295. {
  1296. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1297. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1298. }
  1299. }
  1300. }
  1301. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1302. {
  1303. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1304. }
  1305. if (sceneLevel == 5)
  1306. {
  1307. if (editSelectMaid == maidArray[j])
  1308. {
  1309. flag3 = true;
  1310. }
  1311. }
  1312. Maid maid = maidArray[j];
  1313. }
  1314. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1315. {
  1316. isEditNo = 0;
  1317. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1318. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1319. }
  1320. i = 0;
  1321. while (i < maidCnt)
  1322. {
  1323. Transform transform = maidArray[i].transform;
  1324. Maid maid = maidArray[i];
  1325. if (cafeFlg[i])
  1326. {
  1327. cafeCount[i]++;
  1328. if (cafeCount[i] > 1)
  1329. {
  1330. maid.DelProp(MPN.handitem, true);
  1331. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1332. maid.AllProcPropSeqStart();
  1333. cafeFlg[i] = false;
  1334. cafeCount[i] = 0;
  1335. }
  1336. }
  1337. KeyCode key;
  1338. if (i >= 14)
  1339. {
  1340. bool flag5 = false;
  1341. bool flag6 = false;
  1342. for (int k = 0; k < keyArray.Length; k++)
  1343. {
  1344. if (Input.GetKey(keyArray[k]))
  1345. {
  1346. flag5 = true;
  1347. break;
  1348. }
  1349. if (Input.GetKeyUp(keyArray[k]))
  1350. {
  1351. flag6 = true;
  1352. break;
  1353. }
  1354. }
  1355. key = keyArray[6];
  1356. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1357. {
  1358. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1359. {
  1360. goto IL_49FE;
  1361. }
  1362. idoFlg[i - 7] = false;
  1363. }
  1364. }
  1365. else if (i >= 7)
  1366. {
  1367. bool flag5 = false;
  1368. bool flag6 = false;
  1369. for (int k = 0; k < keyArray.Length; k++)
  1370. {
  1371. if (Input.GetKey(keyArray[k]))
  1372. {
  1373. flag5 = true;
  1374. break;
  1375. }
  1376. if (Input.GetKeyUp(keyArray[k]))
  1377. {
  1378. flag6 = true;
  1379. break;
  1380. }
  1381. }
  1382. key = keyArray[i - 7];
  1383. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1384. {
  1385. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1386. {
  1387. goto IL_49FE;
  1388. }
  1389. idoFlg[i - 7] = false;
  1390. }
  1391. }
  1392. else
  1393. {
  1394. bool flag5 = false;
  1395. for (int k = 0; k < keyArray.Length; k++)
  1396. {
  1397. if (Input.GetKey(keyArray[k]))
  1398. {
  1399. flag5 = true;
  1400. break;
  1401. }
  1402. }
  1403. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1404. {
  1405. key = keyArray[i];
  1406. goto IL_49FE;
  1407. }
  1408. }
  1409. IL_1688E:
  1410. i++;
  1411. continue;
  1412. IL_49FE:
  1413. if (xFlg[i])
  1414. {
  1415. if (!maid.AudioMan.audiosource.isPlaying)
  1416. {
  1417. if (maid.status.personal.uniqueName == "Pride")
  1418. {
  1419. string text = "s0_";
  1420. Random random = new Random();
  1421. int num4 = random.Next(10000);
  1422. bool flag7 = false;
  1423. for (int k = 0; k < tunArray.Length; k++)
  1424. {
  1425. if (tunArray[k] == num4)
  1426. {
  1427. flag7 = true;
  1428. break;
  1429. }
  1430. }
  1431. if (!flag7)
  1432. {
  1433. text = text + "0" + num4.ToString() + ".ogg";
  1434. if (GameUty.FileSystem.IsExistentFile(text))
  1435. {
  1436. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1437. }
  1438. }
  1439. }
  1440. if (maid.status.personal.uniqueName == "Cool")
  1441. {
  1442. string text = "s1_";
  1443. Random random = new Random();
  1444. int num4 = random.Next(10000);
  1445. bool flag7 = false;
  1446. for (int k = 0; k < coolArray.Length; k++)
  1447. {
  1448. if (coolArray[k] == num4)
  1449. {
  1450. flag7 = true;
  1451. break;
  1452. }
  1453. }
  1454. if (!flag7)
  1455. {
  1456. text = text + "0" + num4.ToString() + ".ogg";
  1457. if (GameUty.FileSystem.IsExistentFile(text))
  1458. {
  1459. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1460. }
  1461. }
  1462. }
  1463. if (maid.status.personal.uniqueName == "Pure")
  1464. {
  1465. string text = "s2_";
  1466. Random random = new Random();
  1467. int num4 = random.Next(10000);
  1468. bool flag7 = false;
  1469. for (int k = 0; k < pureArray.Length; k++)
  1470. {
  1471. if (pureArray[k] == num4)
  1472. {
  1473. flag7 = true;
  1474. break;
  1475. }
  1476. }
  1477. if (!flag7)
  1478. {
  1479. text = text + "0" + num4.ToString() + ".ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(text))
  1481. {
  1482. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1483. }
  1484. }
  1485. }
  1486. if (maid.status.personal.uniqueName == "Yandere")
  1487. {
  1488. string text = "s3_";
  1489. Random random = new Random();
  1490. int num4 = random.Next(10000);
  1491. bool flag7 = false;
  1492. for (int k = 0; k < yanArray.Length; k++)
  1493. {
  1494. if (yanArray[k] == num4)
  1495. {
  1496. flag7 = true;
  1497. break;
  1498. }
  1499. }
  1500. if (!flag7)
  1501. {
  1502. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1503. if (GameUty.FileSystem.IsExistentFile(text))
  1504. {
  1505. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1506. }
  1507. }
  1508. }
  1509. if (maid.status.personal.uniqueName == "Muku")
  1510. {
  1511. string text = "h0_";
  1512. Random random = new Random();
  1513. int num4 = random.Next(10000);
  1514. bool flag7 = false;
  1515. for (int k = 0; k < h0Array.Length; k++)
  1516. {
  1517. if (h0Array[k] == num4)
  1518. {
  1519. flag7 = true;
  1520. break;
  1521. }
  1522. }
  1523. if (flag7)
  1524. {
  1525. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1526. if (GameUty.FileSystem.IsExistentFile(text))
  1527. {
  1528. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1529. }
  1530. }
  1531. }
  1532. if (maid.status.personal.uniqueName == "Majime")
  1533. {
  1534. string text = "h1_";
  1535. Random random = new Random();
  1536. int num4 = random.Next(10000);
  1537. bool flag7 = false;
  1538. for (int k = 0; k < h1Array.Length; k++)
  1539. {
  1540. if (h1Array[k] == num4)
  1541. {
  1542. flag7 = true;
  1543. break;
  1544. }
  1545. }
  1546. if (flag7)
  1547. {
  1548. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1549. if (GameUty.FileSystem.IsExistentFile(text))
  1550. {
  1551. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1552. }
  1553. }
  1554. }
  1555. if (maid.status.personal.uniqueName == "Rindere")
  1556. {
  1557. string text = "h2_";
  1558. Random random = new Random();
  1559. int num4 = random.Next(10000);
  1560. bool flag7 = false;
  1561. for (int k = 0; k < h2Array.Length; k++)
  1562. {
  1563. if (h2Array[k] == num4)
  1564. {
  1565. flag7 = true;
  1566. break;
  1567. }
  1568. }
  1569. if (flag7)
  1570. {
  1571. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1572. if (GameUty.FileSystem.IsExistentFile(text))
  1573. {
  1574. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. if (zFlg[i])
  1581. {
  1582. if (!maid.AudioMan.audiosource.isPlaying)
  1583. {
  1584. string text = "";
  1585. if (maid.status.personal.uniqueName == "Pride")
  1586. {
  1587. text = "s0_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(tunArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Cool")
  1594. {
  1595. text = "s1_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(coolArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Pure")
  1602. {
  1603. text = "s2_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(pureArray.Length);
  1606. object obj = text;
  1607. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1608. }
  1609. if (maid.status.personal.uniqueName == "Yandere")
  1610. {
  1611. text = "s3_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(yanArray.Length);
  1614. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Muku")
  1617. {
  1618. text = "h0_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h0tArray.Length);
  1621. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Majime")
  1624. {
  1625. text = "h1_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h1tArray.Length);
  1628. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1629. }
  1630. if (maid.status.personal.uniqueName == "Rindere")
  1631. {
  1632. text = "h2_";
  1633. Random random = new Random();
  1634. int num4 = random.Next(h2tArray.Length);
  1635. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1636. }
  1637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1638. }
  1639. }
  1640. if (!isVR || isVR2)
  1641. {
  1642. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 1;
  1647. ikMode[i] = 0;
  1648. SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. qFlg = true;
  1660. }
  1661. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1662. {
  1663. ikMaid = i;
  1664. isIK[i] = true;
  1665. ikBui = 2;
  1666. ikMode[i] = 0;
  1667. SetIK(maid, i);
  1668. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1669. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1670. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1671. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1672. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1673. idoFlg[i] = true;
  1674. if (i >= 7)
  1675. {
  1676. idoFlg[i - 7] = true;
  1677. }
  1678. }
  1679. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1680. {
  1681. ikMaid = i;
  1682. isIK[i] = true;
  1683. ikBui = 3;
  1684. ikMode[i] = 0;
  1685. SetIK(maid, i);
  1686. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1687. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1688. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1689. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1690. idoFlg[i] = true;
  1691. if (i >= 7)
  1692. {
  1693. idoFlg[i - 7] = true;
  1694. }
  1695. }
  1696. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1697. {
  1698. ikMaid = i;
  1699. isIK[i] = true;
  1700. ikBui = 4;
  1701. ikMode[i] = 0;
  1702. SetIK(maid, i);
  1703. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1704. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1705. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1706. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1707. idoFlg[i] = true;
  1708. if (i >= 7)
  1709. {
  1710. idoFlg[i - 7] = true;
  1711. }
  1712. sFlg = true;
  1713. }
  1714. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1715. {
  1716. maid.body0.transform.localRotation =
  1717. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1718. if (i >= 7)
  1719. {
  1720. idoFlg[i - 7] = true;
  1721. }
  1722. idoFlg[i] = true;
  1723. }
  1724. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1725. {
  1726. maid.body0.transform.localRotation =
  1727. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1728. if (i >= 7)
  1729. {
  1730. idoFlg[i - 7] = true;
  1731. }
  1732. idoFlg[i] = true;
  1733. }
  1734. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1735. {
  1736. bGui = true;
  1737. isPoseInit = true;
  1738. isGuiInit = true;
  1739. poseFlg = true;
  1740. faceFlg = false;
  1741. // sceneFlg = false;
  1742. kankyoFlg = false;
  1743. kankyo2Flg = false;
  1744. fFlg = true;
  1745. for (int k = 0; k < maidCnt; k++)
  1746. {
  1747. if (maid == maidArray[k])
  1748. {
  1749. selectMaidIndex = k;
  1750. }
  1751. }
  1752. copyIndex = 0;
  1753. if (i >= 7)
  1754. {
  1755. idoFlg[i - 7] = true;
  1756. }
  1757. idoFlg[i] = true;
  1758. }
  1759. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1760. {
  1761. bGui = true;
  1762. isFaceInit = true;
  1763. isGuiInit = true;
  1764. faceFlg = true;
  1765. poseFlg = false;
  1766. // sceneFlg = false;
  1767. kankyoFlg = false;
  1768. kankyo2Flg = false;
  1769. maid.boMabataki = false;
  1770. for (int k = 0; k < maidCnt; k++)
  1771. {
  1772. if (maid == maidArray[k])
  1773. {
  1774. selectMaidIndex = k;
  1775. }
  1776. }
  1777. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1778. if (i >= 7)
  1779. {
  1780. idoFlg[i - 7] = true;
  1781. }
  1782. idoFlg[i] = true;
  1783. }
  1784. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1785. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1786. {
  1787. if (!xFlg[i])
  1788. {
  1789. xFlg[i] = true;
  1790. zFlg[i] = false;
  1791. if (maid.status.personal.uniqueName == "Pride")
  1792. {
  1793. string text = "s0_";
  1794. Random random = new Random();
  1795. int num4 = random.Next(10000);
  1796. bool flag7 = false;
  1797. for (int k = 0; k < tunArray.Length; k++)
  1798. {
  1799. if (tunArray[k] == num4)
  1800. {
  1801. flag7 = true;
  1802. break;
  1803. }
  1804. }
  1805. if (!flag7)
  1806. {
  1807. text = text + "0" + num4.ToString() + ".ogg";
  1808. if (GameUty.FileSystem.IsExistentFile(text))
  1809. {
  1810. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1811. }
  1812. }
  1813. }
  1814. if (maid.status.personal.uniqueName == "Cool")
  1815. {
  1816. string text = "s1_";
  1817. Random random = new Random();
  1818. int num4 = random.Next(10000);
  1819. bool flag7 = false;
  1820. for (int k = 0; k < coolArray.Length; k++)
  1821. {
  1822. if (coolArray[k] == num4)
  1823. {
  1824. flag7 = true;
  1825. break;
  1826. }
  1827. }
  1828. if (!flag7)
  1829. {
  1830. text = text + "0" + num4.ToString() + ".ogg";
  1831. if (GameUty.FileSystem.IsExistentFile(text))
  1832. {
  1833. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1834. }
  1835. }
  1836. }
  1837. if (maid.status.personal.uniqueName == "Pure")
  1838. {
  1839. string text = "s2_";
  1840. Random random = new Random();
  1841. int num4 = random.Next(10000);
  1842. bool flag7 = false;
  1843. for (int k = 0; k < pureArray.Length; k++)
  1844. {
  1845. if (pureArray[k] == num4)
  1846. {
  1847. flag7 = true;
  1848. break;
  1849. }
  1850. }
  1851. if (!flag7)
  1852. {
  1853. text = text + "0" + num4.ToString() + ".ogg";
  1854. if (GameUty.FileSystem.IsExistentFile(text))
  1855. {
  1856. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1857. }
  1858. }
  1859. }
  1860. if (maid.status.personal.uniqueName == "Yandere")
  1861. {
  1862. string text = "s3_";
  1863. Random random = new Random();
  1864. int num4 = random.Next(10000);
  1865. bool flag7 = false;
  1866. for (int k = 0; k < yanArray.Length; k++)
  1867. {
  1868. if (yanArray[k] == num4)
  1869. {
  1870. flag7 = true;
  1871. break;
  1872. }
  1873. }
  1874. if (!flag7)
  1875. {
  1876. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1877. if (GameUty.FileSystem.IsExistentFile(text))
  1878. {
  1879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1880. }
  1881. }
  1882. }
  1883. if (maid.status.personal.uniqueName == "Muku")
  1884. {
  1885. string text = "h0_";
  1886. Random random = new Random();
  1887. int num4 = random.Next(10000);
  1888. bool flag7 = false;
  1889. for (int k = 0; k < h0Array.Length; k++)
  1890. {
  1891. if (h0Array[k] == num4)
  1892. {
  1893. flag7 = true;
  1894. break;
  1895. }
  1896. }
  1897. if (flag7)
  1898. {
  1899. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1900. if (GameUty.FileSystem.IsExistentFile(text))
  1901. {
  1902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1903. }
  1904. }
  1905. }
  1906. if (maid.status.personal.uniqueName == "Majime")
  1907. {
  1908. string text = "h1_";
  1909. Random random = new Random();
  1910. int num4 = random.Next(10000);
  1911. bool flag7 = false;
  1912. for (int k = 0; k < h1Array.Length; k++)
  1913. {
  1914. if (h1Array[k] == num4)
  1915. {
  1916. flag7 = true;
  1917. break;
  1918. }
  1919. }
  1920. if (flag7)
  1921. {
  1922. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1923. if (GameUty.FileSystem.IsExistentFile(text))
  1924. {
  1925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1926. }
  1927. }
  1928. }
  1929. if (maid.status.personal.uniqueName == "Rindere")
  1930. {
  1931. string text = "h2_";
  1932. Random random = new Random();
  1933. int num4 = random.Next(10000);
  1934. bool flag7 = false;
  1935. for (int k = 0; k < h2Array.Length; k++)
  1936. {
  1937. if (h2Array[k] == num4)
  1938. {
  1939. flag7 = true;
  1940. break;
  1941. }
  1942. }
  1943. if (flag7)
  1944. {
  1945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1946. if (GameUty.FileSystem.IsExistentFile(text))
  1947. {
  1948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. else
  1954. {
  1955. xFlg[i] = false;
  1956. maid.AudioMan.Clear();
  1957. }
  1958. idoFlg[i] = true;
  1959. if (i >= 7)
  1960. {
  1961. idoFlg[i - 7] = true;
  1962. }
  1963. }
  1964. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1965. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1966. {
  1967. if (!zFlg[i])
  1968. {
  1969. zFlg[i] = true;
  1970. xFlg[i] = false;
  1971. string text = "";
  1972. if (maid.status.personal.uniqueName == "Pride")
  1973. {
  1974. text = "s0_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(tunArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Cool")
  1981. {
  1982. text = "s1_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(coolArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Pure")
  1989. {
  1990. text = "s2_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(pureArray.Length);
  1993. object obj = text;
  1994. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1995. }
  1996. if (maid.status.personal.uniqueName == "Yandere")
  1997. {
  1998. text = "s3_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(yanArray.Length);
  2001. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Muku")
  2004. {
  2005. text = "h0_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h0tArray.Length);
  2008. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Majime")
  2011. {
  2012. text = "h1_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h1tArray.Length);
  2015. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2016. }
  2017. if (maid.status.personal.uniqueName == "Rindere")
  2018. {
  2019. text = "h2_";
  2020. Random random = new Random();
  2021. int num4 = random.Next(h2tArray.Length);
  2022. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2023. }
  2024. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2025. }
  2026. else
  2027. {
  2028. zFlg[i] = false;
  2029. maid.AudioMan.Clear();
  2030. }
  2031. idoFlg[i] = true;
  2032. if (i >= 7)
  2033. {
  2034. idoFlg[i - 7] = true;
  2035. }
  2036. }
  2037. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2038. {
  2039. string text = "";
  2040. if (maid.status.personal.uniqueName == "Pride")
  2041. {
  2042. text = "s0_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(tunArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Cool")
  2049. {
  2050. text = "s1_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(coolArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Pure")
  2057. {
  2058. text = "s2_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(pureArray.Length);
  2061. object obj = text;
  2062. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2063. }
  2064. if (maid.status.personal.uniqueName == "Yandere")
  2065. {
  2066. text = "s3_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(yanArray.Length);
  2069. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Muku")
  2072. {
  2073. text = "h0_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h0tArray.Length);
  2076. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Majime")
  2079. {
  2080. text = "h1_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h1tArray.Length);
  2083. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2084. }
  2085. if (maid.status.personal.uniqueName == "Rindere")
  2086. {
  2087. text = "h2_";
  2088. Random random = new Random();
  2089. int num4 = random.Next(h2tArray.Length);
  2090. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2091. }
  2092. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2093. idoFlg[i] = true;
  2094. if (i >= 7)
  2095. {
  2096. idoFlg[i - 7] = true;
  2097. }
  2098. }
  2099. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2100. {
  2101. if (maid.status.personal.uniqueName == "Pride")
  2102. {
  2103. string text = "s0_";
  2104. Random random = new Random();
  2105. int num4 = random.Next(10000);
  2106. bool flag7 = false;
  2107. for (int k = 0; k < tunArray.Length; k++)
  2108. {
  2109. if (tunArray[k] == num4)
  2110. {
  2111. flag7 = true;
  2112. break;
  2113. }
  2114. }
  2115. if (!flag7)
  2116. {
  2117. text = text + "0" + num4.ToString() + ".ogg";
  2118. if (GameUty.FileSystem.IsExistentFile(text))
  2119. {
  2120. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2121. }
  2122. }
  2123. }
  2124. if (maid.status.personal.uniqueName == "Cool")
  2125. {
  2126. string text = "s1_";
  2127. Random random = new Random();
  2128. int num4 = random.Next(10000);
  2129. bool flag7 = false;
  2130. for (int k = 0; k < coolArray.Length; k++)
  2131. {
  2132. if (coolArray[k] == num4)
  2133. {
  2134. flag7 = true;
  2135. break;
  2136. }
  2137. }
  2138. if (!flag7)
  2139. {
  2140. text = text + "0" + num4.ToString() + ".ogg";
  2141. if (GameUty.FileSystem.IsExistentFile(text))
  2142. {
  2143. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2144. }
  2145. }
  2146. }
  2147. if (maid.status.personal.uniqueName == "Pure")
  2148. {
  2149. string text = "s2_";
  2150. Random random = new Random();
  2151. int num4 = random.Next(10000);
  2152. bool flag7 = false;
  2153. for (int k = 0; k < pureArray.Length; k++)
  2154. {
  2155. if (pureArray[k] == num4)
  2156. {
  2157. flag7 = true;
  2158. break;
  2159. }
  2160. }
  2161. if (!flag7)
  2162. {
  2163. text = text + "0" + num4.ToString() + ".ogg";
  2164. if (GameUty.FileSystem.IsExistentFile(text))
  2165. {
  2166. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2167. }
  2168. }
  2169. }
  2170. if (maid.status.personal.uniqueName == "Yandere")
  2171. {
  2172. string text = "s3_";
  2173. Random random = new Random();
  2174. int num4 = random.Next(10000);
  2175. bool flag7 = false;
  2176. for (int k = 0; k < yanArray.Length; k++)
  2177. {
  2178. if (yanArray[k] == num4)
  2179. {
  2180. flag7 = true;
  2181. break;
  2182. }
  2183. }
  2184. if (!flag7)
  2185. {
  2186. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2187. if (GameUty.FileSystem.IsExistentFile(text))
  2188. {
  2189. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2190. }
  2191. }
  2192. }
  2193. if (maid.status.personal.uniqueName == "Muku")
  2194. {
  2195. string text = "h0_";
  2196. Random random = new Random();
  2197. int num4 = random.Next(10000);
  2198. bool flag7 = false;
  2199. for (int k = 0; k < h0Array.Length; k++)
  2200. {
  2201. if (h0Array[k] == num4)
  2202. {
  2203. flag7 = true;
  2204. break;
  2205. }
  2206. }
  2207. if (flag7)
  2208. {
  2209. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2210. if (GameUty.FileSystem.IsExistentFile(text))
  2211. {
  2212. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2213. }
  2214. }
  2215. }
  2216. if (maid.status.personal.uniqueName == "Majime")
  2217. {
  2218. string text = "h1_";
  2219. Random random = new Random();
  2220. int num4 = random.Next(10000);
  2221. bool flag7 = false;
  2222. for (int k = 0; k < h1Array.Length; k++)
  2223. {
  2224. if (h1Array[k] == num4)
  2225. {
  2226. flag7 = true;
  2227. break;
  2228. }
  2229. }
  2230. if (flag7)
  2231. {
  2232. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2233. if (GameUty.FileSystem.IsExistentFile(text))
  2234. {
  2235. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2236. }
  2237. }
  2238. }
  2239. if (maid.status.personal.uniqueName == "Rindere")
  2240. {
  2241. string text = "h2_";
  2242. Random random = new Random();
  2243. int num4 = random.Next(10000);
  2244. bool flag7 = false;
  2245. for (int k = 0; k < h2Array.Length; k++)
  2246. {
  2247. if (h2Array[k] == num4)
  2248. {
  2249. flag7 = true;
  2250. break;
  2251. }
  2252. }
  2253. if (flag7)
  2254. {
  2255. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2256. if (GameUty.FileSystem.IsExistentFile(text))
  2257. {
  2258. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2259. }
  2260. }
  2261. }
  2262. idoFlg[i] = true;
  2263. if (i >= 7)
  2264. {
  2265. idoFlg[i - 7] = true;
  2266. }
  2267. }
  2268. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2269. {
  2270. delCount[i] = 20;
  2271. if (goSlot[(int)selectList[i]] != null)
  2272. {
  2273. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2274. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2275. {
  2276. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2277. }
  2278. }
  2279. itemIndex[i]++;
  2280. if (itemIndex[i] == itemArray.Length - 1)
  2281. {
  2282. itemIndex[i] = 0;
  2283. }
  2284. string[] array = new string[2];
  2285. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2286. if (itemIndex[i] > 13)
  2287. {
  2288. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2289. }
  2290. maid.DelProp(MPN.handitem, true);
  2291. maid.DelProp(MPN.accvag, true);
  2292. maid.DelProp(MPN.accanl, true);
  2293. bool flag8 = false;
  2294. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2295. {
  2296. flag8 = true;
  2297. }
  2298. if (!flag8)
  2299. {
  2300. maid.DelProp(MPN.kousoku_upper, true);
  2301. maid.DelProp(MPN.kousoku_lower, true);
  2302. }
  2303. if (array[0] != "")
  2304. {
  2305. maid.SetProp(array[0], array[1], 0, true, false);
  2306. }
  2307. if (itemIndex[i] == 13)
  2308. {
  2309. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2310. maid.SetProp(array[0], array[1], 0, true, false);
  2311. }
  2312. if (itemIndex[i] == 23)
  2313. {
  2314. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2315. maid.SetProp(array[0], array[1], 0, true, false);
  2316. cafeFlg[i] = true;
  2317. }
  2318. maid.AllProcPropSeqStart();
  2319. idoFlg[i] = true;
  2320. if (i >= 7)
  2321. {
  2322. idoFlg[i - 7] = true;
  2323. }
  2324. mFlg = true;
  2325. }
  2326. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2327. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2328. {
  2329. for (int k = 0; k < 10; k++)
  2330. {
  2331. maid.transform.RotateAround(maid.transform.position,
  2332. Vector3.right,
  2333. -maid.transform.rotation.eulerAngles.x);
  2334. maid.transform.RotateAround(maid.transform.position,
  2335. Vector3.forward,
  2336. -maid.transform.rotation.eulerAngles.z);
  2337. }
  2338. idoFlg[i] = true;
  2339. atFlg = true;
  2340. if (i >= 7)
  2341. {
  2342. idoFlg[i - 7] = true;
  2343. }
  2344. }
  2345. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2346. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2347. {
  2348. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2349. idoFlg[i] = true;
  2350. if (i >= 7)
  2351. {
  2352. idoFlg[i - 7] = true;
  2353. }
  2354. }
  2355. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2356. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2357. {
  2358. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2359. idoFlg[i] = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2366. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2367. {
  2368. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2369. idoFlg[i] = true;
  2370. if (i >= 7)
  2371. {
  2372. idoFlg[i - 7] = true;
  2373. }
  2374. }
  2375. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2376. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2377. {
  2378. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2379. idoFlg[i] = true;
  2380. if (i >= 7)
  2381. {
  2382. idoFlg[i - 7] = true;
  2383. }
  2384. }
  2385. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2386. {
  2387. Vector3 vector = maid.transform.position;
  2388. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2389. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2390. maid.SetPos(vector);
  2391. idoFlg[i] = true;
  2392. if (i >= 7)
  2393. {
  2394. idoFlg[i - 7] = true;
  2395. }
  2396. }
  2397. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2398. {
  2399. Vector3 vector = maid.transform.position;
  2400. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2401. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2402. maid.SetPos(vector);
  2403. idoFlg[i] = true;
  2404. if (i >= 7)
  2405. {
  2406. idoFlg[i - 7] = true;
  2407. }
  2408. }
  2409. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2410. {
  2411. Vector3 vector = maid.transform.position;
  2412. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2413. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2414. maid.SetPos(vector);
  2415. idoFlg[i] = true;
  2416. if (i >= 7)
  2417. {
  2418. idoFlg[i - 7] = true;
  2419. }
  2420. }
  2421. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2422. {
  2423. Vector3 vector = maid.transform.position;
  2424. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2425. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2426. maid.SetPos(vector);
  2427. idoFlg[i] = true;
  2428. if (i >= 7)
  2429. {
  2430. idoFlg[i - 7] = true;
  2431. }
  2432. }
  2433. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2434. {
  2435. Vector3 vector = maid.transform.position;
  2436. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2437. maid.SetPos(vector);
  2438. idoFlg[i] = true;
  2439. if (i >= 7)
  2440. {
  2441. idoFlg[i - 7] = true;
  2442. }
  2443. }
  2444. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2445. {
  2446. Vector3 vector = maid.transform.position;
  2447. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2448. maid.SetPos(vector);
  2449. idoFlg[i] = true;
  2450. if (i >= 7)
  2451. {
  2452. idoFlg[i - 7] = true;
  2453. }
  2454. }
  2455. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2456. {
  2457. Vector3 vector = maid.transform.position;
  2458. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2459. maid.SetPos(vector);
  2460. idoFlg[i] = true;
  2461. if (i >= 7)
  2462. {
  2463. idoFlg[i - 7] = true;
  2464. }
  2465. }
  2466. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2467. {
  2468. Vector3 vector = maid.transform.position;
  2469. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2470. maid.SetPos(vector);
  2471. idoFlg[i] = true;
  2472. if (i >= 7)
  2473. {
  2474. idoFlg[i - 7] = true;
  2475. }
  2476. }
  2477. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2478. {
  2479. Vector3 vector = maid.transform.position;
  2480. vector.y += 0.0075f * speed;
  2481. maid.SetPos(vector);
  2482. idoFlg[i] = true;
  2483. if (i >= 7)
  2484. {
  2485. idoFlg[i - 7] = true;
  2486. }
  2487. }
  2488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2489. {
  2490. Vector3 vector = maid.transform.position;
  2491. vector.y -= 0.0075f * speed;
  2492. maid.SetPos(vector);
  2493. idoFlg[i] = true;
  2494. if (i >= 7)
  2495. {
  2496. idoFlg[i - 7] = true;
  2497. }
  2498. }
  2499. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2500. && getModKeyPressing(modKey.Shift))
  2501. {
  2502. faceIndex[i]--;
  2503. if (faceIndex[i] <= -1)
  2504. {
  2505. faceIndex[i] = faceArray.Length - 1;
  2506. }
  2507. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2508. idoFlg[i] = true;
  2509. if (i >= 7)
  2510. {
  2511. idoFlg[i - 7] = true;
  2512. }
  2513. }
  2514. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2515. {
  2516. faceIndex[i]++;
  2517. if (faceIndex[i] == faceArray.Length)
  2518. {
  2519. faceIndex[i] = 0;
  2520. }
  2521. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2522. idoFlg[i] = true;
  2523. if (i >= 7)
  2524. {
  2525. idoFlg[i - 7] = true;
  2526. }
  2527. }
  2528. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2529. {
  2530. faceBlendIndex[i]++;
  2531. if (faceBlendIndex[i] == faceBlendArray.Length)
  2532. {
  2533. faceBlendIndex[i] = 0;
  2534. }
  2535. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2536. idoFlg[i] = true;
  2537. if (i >= 7)
  2538. {
  2539. idoFlg[i - 7] = true;
  2540. }
  2541. }
  2542. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2543. {
  2544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2545. isStop[i] = false;
  2546. poseCount[i] = 20;
  2547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2548. {
  2549. maid.body0.MuneYureL(0f);
  2550. maid.body0.MuneYureR(0f);
  2551. }
  2552. else
  2553. {
  2554. maid.body0.MuneYureL(1f);
  2555. maid.body0.MuneYureR(1f);
  2556. maid.body0.jbMuneL.enabled = true;
  2557. maid.body0.jbMuneR.enabled = true;
  2558. }
  2559. if (array[0].Contains("MultipleMaidsPose"))
  2560. {
  2561. string path = array[0].Split(new char[] { '/' })[1];
  2562. byte[] array2 = new byte[0];
  2563. try
  2564. {
  2565. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2566. {
  2567. array2 = new byte[fileStream.Length];
  2568. fileStream.Read(array2, 0, array2.Length);
  2569. }
  2570. }
  2571. catch { }
  2572. if (0 < array2.Length)
  2573. {
  2574. string text = Path.GetFileName(path);
  2575. long num5 = text.GetHashCode();
  2576. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2577. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2578. {
  2579. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2580. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2581. };
  2582. for (int m = 0; m < array3.Length; m++)
  2583. {
  2584. maid.SetAutoTwist(array3[m], true);
  2585. }
  2586. }
  2587. }
  2588. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2589. {
  2590. loadPose[i] = array[0];
  2591. }
  2592. else if (!array[0].StartsWith("dance_"))
  2593. {
  2594. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2595. }
  2596. else
  2597. {
  2598. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2599. {
  2600. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2601. GameUty.FileSystem,
  2602. array[0] + ".anm",
  2603. false,
  2604. false);
  2605. }
  2606. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2607. }
  2608. if (array.Length > 1)
  2609. {
  2610. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2611. isStop[i] = true;
  2612. if (array.Length > 2)
  2613. {
  2614. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2615. isPoseIti[i] = true;
  2616. poseIti[i] = maidArray[i].transform.position;
  2617. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2618. }
  2619. }
  2620. isLock[i] = false;
  2621. idoFlg[i] = true;
  2622. mHandL[i].initFlg = false;
  2623. mHandR[i].initFlg = false;
  2624. mFootL[i].initFlg = false;
  2625. mFootR[i].initFlg = false;
  2626. pHandL[i] = 0;
  2627. pHandR[i] = 0;
  2628. muneIKL[i] = false;
  2629. muneIKR[i] = false;
  2630. if (!isVR)
  2631. {
  2632. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2633. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2634. }
  2635. if (i >= 7)
  2636. {
  2637. idoFlg[i - 7] = true;
  2638. }
  2639. }
  2640. else if (maid.body0.isLoadedBody)
  2641. {
  2642. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2643. {
  2644. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2645. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2646. }
  2647. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2648. {
  2649. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2650. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2651. }
  2652. if (!HandL1[i])
  2653. {
  2654. SetIKInit(i);
  2655. SetIK(maid, i);
  2656. ikBui = 5;
  2657. }
  2658. else
  2659. {
  2660. bool flag5 = false;
  2661. for (int k = 0; k < keyArray.Length; k++)
  2662. {
  2663. if (Input.GetKey(keyArray[k]))
  2664. {
  2665. flag5 = true;
  2666. break;
  2667. }
  2668. }
  2669. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2670. || Input.GetKey(KeyCode.Y))
  2671. {
  2672. flag5 = true;
  2673. }
  2674. if (!flag5)
  2675. {
  2676. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2677. && getModKeyPressing(modKey.Shift))
  2678. {
  2679. ikMode[i] = 15;
  2680. }
  2681. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2682. {
  2683. ikMode[i] = 5;
  2684. }
  2685. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2686. {
  2687. ikMode[i] = 6;
  2688. }
  2689. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2690. {
  2691. ikMode[i] = 7;
  2692. }
  2693. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 11;
  2696. }
  2697. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2698. {
  2699. ikMode[i] = 12;
  2700. }
  2701. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2702. {
  2703. ikMode[i] = 14;
  2704. }
  2705. else if (getModKeyPressing(modKey.Shift))
  2706. {
  2707. ikMode[i] = 1;
  2708. }
  2709. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 8;
  2712. }
  2713. else if (getModKeyPressing(modKey.Ctrl))
  2714. {
  2715. ikMode[i] = 2;
  2716. }
  2717. else if (getModKeyPressing(modKey.Alt))
  2718. {
  2719. ikMode[i] = 3;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Space))
  2722. {
  2723. ikMode[i] = 4;
  2724. }
  2725. else if (Input.GetKey(KeyCode.X))
  2726. {
  2727. ikMode[i] = 9;
  2728. }
  2729. else if (Input.GetKey(KeyCode.Z))
  2730. {
  2731. ikMode[i] = 10;
  2732. }
  2733. else if (Input.GetKey(KeyCode.C))
  2734. {
  2735. ikMode[i] = 13;
  2736. }
  2737. else if (Input.GetKey(KeyCode.A))
  2738. {
  2739. ikMode[i] = 16;
  2740. }
  2741. else
  2742. {
  2743. ikMode[i] = 0;
  2744. }
  2745. if (!isIK[i])
  2746. {
  2747. if (ikMode[i] < 9)
  2748. {
  2749. ikMode[i] = 0;
  2750. }
  2751. }
  2752. bool flag9 = false;
  2753. bool flag10 = false;
  2754. bool flag11 = false;
  2755. bool flag12 = false;
  2756. if (gFinger[i, 0])
  2757. {
  2758. for (int j = 0; j < 15; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag9 = true;
  2763. }
  2764. }
  2765. for (int j = 15; j < 30; j++)
  2766. {
  2767. if (mFinger[i, j].isStop)
  2768. {
  2769. flag10 = true;
  2770. }
  2771. }
  2772. for (int j = 0; j < 6; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag11 = true;
  2777. }
  2778. }
  2779. for (int j = 6; j < 12; j++)
  2780. {
  2781. if (mFinger2[i, j].isStop)
  2782. {
  2783. flag12 = true;
  2784. }
  2785. }
  2786. }
  2787. if (gMaid[i] != null)
  2788. {
  2789. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2790. {
  2791. gMaid[i].SetActive(true);
  2792. if (isCube)
  2793. {
  2794. gMaidC[i].SetActive(true);
  2795. }
  2796. }
  2797. else
  2798. {
  2799. gMaid[i].SetActive(false);
  2800. gMaidC[i].SetActive(false);
  2801. }
  2802. }
  2803. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2804. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2805. {
  2806. ikBui = 1;
  2807. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2808. {
  2809. ikMaid = i;
  2810. }
  2811. if (ikMaid == i)
  2812. {
  2813. SetIK(maid, i);
  2814. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2815. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2816. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2817. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2818. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2819. }
  2820. if (Input.GetKeyDown(KeyCode.Q))
  2821. {
  2822. qFlg = true;
  2823. }
  2824. }
  2825. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2826. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2827. {
  2828. ikBui = 2;
  2829. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2830. {
  2831. ikMaid = i;
  2832. }
  2833. if (ikMaid == i)
  2834. {
  2835. SetIK(maid, i);
  2836. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2837. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2838. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2839. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2840. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2841. }
  2842. if (Input.GetKeyDown(KeyCode.W))
  2843. {
  2844. wFlg = true;
  2845. }
  2846. }
  2847. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2848. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2849. {
  2850. ikBui = 3;
  2851. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2852. {
  2853. ikMaid = i;
  2854. }
  2855. if (ikMaid == i)
  2856. {
  2857. SetIK(maid, i);
  2858. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2859. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2860. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2861. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2862. }
  2863. }
  2864. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2865. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2866. {
  2867. ikBui = 4;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. if (Input.GetKeyDown(KeyCode.S))
  2881. {
  2882. sFlg = true;
  2883. }
  2884. }
  2885. mHandR[i].isSelect = false;
  2886. mArmR[i].isSelect = false;
  2887. mHandL[i].isSelect = false;
  2888. mArmL[i].isSelect = false;
  2889. mFootR[i].isSelect = false;
  2890. mHizaR[i].isSelect = false;
  2891. mFootL[i].isSelect = false;
  2892. mHizaL[i].isSelect = false;
  2893. mClavicleL[i].isSelect = false;
  2894. mClavicleR[i].isSelect = false;
  2895. if (ikMode[i] == 16)
  2896. {
  2897. if (!gHead2[i])
  2898. {
  2899. SetIKInit6(i);
  2900. }
  2901. if (mHead2[i].isClick)
  2902. {
  2903. mHead2[i].isClick = false;
  2904. bGui = true;
  2905. isFaceInit = true;
  2906. // isGuiInit = true;
  2907. faceFlg = true;
  2908. poseFlg = false;
  2909. // sceneFlg = false;
  2910. kankyoFlg = false;
  2911. kankyo2Flg = false;
  2912. maid.boMabataki = false;
  2913. selectMaidIndex = mHead2[i].no;
  2914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2915. }
  2916. if (mMaid2[i].isClick)
  2917. {
  2918. mMaid2[i].isClick = false;
  2919. bGui = true;
  2920. isPoseInit = true;
  2921. // isGuiInit = true;
  2922. poseFlg = true;
  2923. faceFlg = false;
  2924. // sceneFlg = false;
  2925. kankyoFlg = false;
  2926. kankyo2Flg = false;
  2927. selectMaidIndex = mMaid2[i].no;
  2928. copyIndex = 0;
  2929. }
  2930. gHead2[i].transform.position =
  2931. new Vector3(Head2[i].position.x,
  2932. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2933. Head2[i].position.z);
  2934. gHead2[i].transform.eulerAngles =
  2935. new Vector3(Head2[i].transform.eulerAngles.x,
  2936. Head2[i].transform.eulerAngles.y,
  2937. Head2[i].transform.eulerAngles.z + 90f);
  2938. mHead2[i].no = i;
  2939. mHead2[i].maid = maid;
  2940. mHead2[i].ido = 1;
  2941. gMaid2[i].transform.position =
  2942. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2943. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2944. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2945. gMaid2[i].transform.eulerAngles =
  2946. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2947. Spine0a2[i].transform.eulerAngles.y,
  2948. Spine0a2[i].transform.eulerAngles.z + 90f);
  2949. mMaid2[i].no = i;
  2950. mMaid2[i].maid = maid;
  2951. mMaid2[i].ido = 2;
  2952. gArmL[i].SetActive(false);
  2953. gFootL[i].SetActive(false);
  2954. gHizaL[i].SetActive(false);
  2955. gHandR[i].SetActive(false);
  2956. gArmR[i].SetActive(false);
  2957. gFootR[i].SetActive(false);
  2958. gHizaR[i].SetActive(false);
  2959. gClavicleL[i].SetActive(false);
  2960. gClavicleR[i].SetActive(false);
  2961. gNeck[i].SetActive(false);
  2962. gSpine[i].SetActive(false);
  2963. gSpine0a[i].SetActive(false);
  2964. gSpine1a[i].SetActive(false);
  2965. gSpine1[i].SetActive(false);
  2966. gPelvis[i].SetActive(false);
  2967. }
  2968. else if (ikMode[i] == 8)
  2969. {
  2970. if (ikModeOld[i] == 15 && gIKHandL[i])
  2971. {
  2972. mIKHandL[i].ido = 1;
  2973. mIKHandL[i].reset = true;
  2974. mIKHandR[i].ido = 1;
  2975. mIKHandR[i].reset = true;
  2976. }
  2977. else if (ikModeOld[i] == 3 && gHead[i])
  2978. {
  2979. mHead[i].ido = 7;
  2980. mHead[i].reset = true;
  2981. }
  2982. else
  2983. {
  2984. if (!gIKHandL[i])
  2985. {
  2986. SetIKInit5(i);
  2987. }
  2988. gIKHandL[i].transform.position = IKHandL[i].position;
  2989. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2990. mIKHandL[i].maid = maid;
  2991. mIKHandL[i].HandL = IKHandL[i];
  2992. mIKHandL[i].ido = 1;
  2993. gIKHandR[i].transform.position = IKHandR[i].position;
  2994. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2995. mIKHandR[i].maid = maid;
  2996. mIKHandR[i].HandL = IKHandR[i];
  2997. mIKHandR[i].ido = 1;
  2998. if (!gIKMuneL[i])
  2999. {
  3000. SetIKInit7(i);
  3001. }
  3002. if (!gHead[i])
  3003. {
  3004. SetIKInit4(i);
  3005. }
  3006. mIKMuneL[i].maid = maid;
  3007. mIKMuneL[i].HandL = IKMuneLSub[i];
  3008. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3009. mIKMuneL[i].ForearmL = IKMuneL[i];
  3010. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3011. mIKMuneR[i].maid = maid;
  3012. mIKMuneR[i].HandL = IKMuneRSub[i];
  3013. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3014. mIKMuneR[i].ForearmL = IKMuneR[i];
  3015. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3016. gHead[i].transform.position =
  3017. new Vector3(Head2[i].position.x,
  3018. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3019. Head2[i].position.z);
  3020. gHead[i].transform.eulerAngles =
  3021. new Vector3(Head2[i].transform.eulerAngles.x,
  3022. Head2[i].transform.eulerAngles.y,
  3023. Head2[i].transform.eulerAngles.z + 90f);
  3024. mHead[i].head = Head1[i];
  3025. mHead[i].maid = maid;
  3026. mHead[i].ido = 7;
  3027. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3028. gHead[i].SetActive(true);
  3029. if (mHead[i].isClick)
  3030. {
  3031. mHead[i].isClick = false;
  3032. mHead[i].isClick2 = false;
  3033. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3034. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3035. }
  3036. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3037. {
  3038. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3039. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3040. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3041. IKMuneLSub[i].localEulerAngles.y,
  3042. IKMuneLSub[i].localEulerAngles.z);
  3043. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3044. IKMuneL[i].localEulerAngles.y,
  3045. IKMuneL[i].localEulerAngles.z);
  3046. muneIKL[i] = true;
  3047. isStop[i] = true;
  3048. isLock[i] = true;
  3049. mIKMuneL[i].isMouseDrag = false;
  3050. }
  3051. if (mIKMuneL[i].isMouseDown)
  3052. {
  3053. maid.body0.MuneYureL(0f);
  3054. maid.body0.MuneYureR(0f);
  3055. maid.body0.jbMuneL.enabled = false;
  3056. maid.body0.jbMuneR.enabled = false;
  3057. muneIKL[i] = false;
  3058. mIKMuneL[i].isMouseUp = false;
  3059. }
  3060. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3061. {
  3062. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3063. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3064. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3065. IKMuneRSub[i].localEulerAngles.y,
  3066. IKMuneRSub[i].localEulerAngles.z);
  3067. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3068. IKMuneR[i].localEulerAngles.y,
  3069. IKMuneR[i].localEulerAngles.z);
  3070. muneIKR[i] = true;
  3071. isStop[i] = true;
  3072. isLock[i] = true;
  3073. mIKMuneR[i].isMouseDrag = false;
  3074. }
  3075. if (mIKMuneR[i].isMouseDown)
  3076. {
  3077. maid.body0.MuneYureL(0f);
  3078. maid.body0.MuneYureR(0f);
  3079. maid.body0.jbMuneL.enabled = false;
  3080. maid.body0.jbMuneR.enabled = false;
  3081. muneIKR[i] = false;
  3082. mIKMuneL[i].isMouseUp = false;
  3083. }
  3084. if (mHead[i].isStop)
  3085. {
  3086. isStop[i] = true;
  3087. isLock[i] = true;
  3088. mHead[i].isStop = false;
  3089. }
  3090. gJotai[i].SetActive(false);
  3091. gKahuku[i].SetActive(false);
  3092. gHandL[i].SetActive(false);
  3093. gArmL[i].SetActive(false);
  3094. gFootL[i].SetActive(false);
  3095. gHizaL[i].SetActive(false);
  3096. gHandR[i].SetActive(false);
  3097. gArmR[i].SetActive(false);
  3098. gFootR[i].SetActive(false);
  3099. gHizaR[i].SetActive(false);
  3100. gClavicleL[i].SetActive(false);
  3101. gClavicleR[i].SetActive(false);
  3102. gNeck[i].SetActive(false);
  3103. gSpine[i].SetActive(false);
  3104. gSpine0a[i].SetActive(false);
  3105. gSpine1a[i].SetActive(false);
  3106. gSpine1[i].SetActive(false);
  3107. gPelvis[i].SetActive(false);
  3108. }
  3109. }
  3110. else if (ikMode[i] == 15)
  3111. {
  3112. if (ikModeOld[i] == 8 && gIKHandL[i])
  3113. {
  3114. mIKHandL[i].ido = 2;
  3115. mIKHandL[i].reset = true;
  3116. mIKHandR[i].ido = 2;
  3117. mIKHandR[i].reset = true;
  3118. }
  3119. else
  3120. {
  3121. if (!gIKHandL[i])
  3122. {
  3123. SetIKInit5(i);
  3124. }
  3125. gIKHandL[i].transform.position = IKHandL[i].position;
  3126. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3127. mIKHandL[i].maid = maid;
  3128. mIKHandL[i].HandL = IKHandL[i];
  3129. mIKHandL[i].ido = 2;
  3130. gIKHandR[i].transform.position = IKHandR[i].position;
  3131. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3132. mIKHandR[i].maid = maid;
  3133. mIKHandR[i].HandL = IKHandR[i];
  3134. mIKHandR[i].ido = 2;
  3135. Destroy(gHead[i]);
  3136. Destroy(gJotai[i]);
  3137. Destroy(gKahuku[i]);
  3138. gHandL[i].SetActive(false);
  3139. gArmL[i].SetActive(false);
  3140. gFootL[i].SetActive(false);
  3141. gHizaL[i].SetActive(false);
  3142. gHandR[i].SetActive(false);
  3143. gArmR[i].SetActive(false);
  3144. gFootR[i].SetActive(false);
  3145. gHizaR[i].SetActive(false);
  3146. gClavicleL[i].SetActive(false);
  3147. gClavicleR[i].SetActive(false);
  3148. gNeck[i].SetActive(false);
  3149. gSpine[i].SetActive(false);
  3150. gSpine0a[i].SetActive(false);
  3151. gSpine1a[i].SetActive(false);
  3152. gSpine1[i].SetActive(false);
  3153. gPelvis[i].SetActive(false);
  3154. }
  3155. }
  3156. else if (ikMode[i] == 1)
  3157. {
  3158. mHandL[i].ido = 10;
  3159. mHandR[i].ido = 10;
  3160. mFootL[i].ido = 10;
  3161. mFootR[i].ido = 10;
  3162. if (ikModeOld[i] == 0 && gNeck[i])
  3163. {
  3164. if (isBone[i])
  3165. {
  3166. mNeck[i].ido = 4;
  3167. mNeck[i].reset = true;
  3168. mSpine[i].ido = 4;
  3169. mSpine[i].reset = true;
  3170. mSpine0a[i].ido = 4;
  3171. mSpine0a[i].reset = true;
  3172. mSpine1a[i].ido = 4;
  3173. mSpine1a[i].reset = true;
  3174. mSpine1[i].ido = 4;
  3175. mSpine1[i].reset = true;
  3176. mPelvis[i].ido = 4;
  3177. mPelvis[i].reset = true;
  3178. mHizaL[i].ido = 5;
  3179. mHizaL[i].reset = true;
  3180. mHizaR[i].ido = 5;
  3181. mHizaR[i].reset = true;
  3182. }
  3183. }
  3184. else
  3185. {
  3186. gArmL[i].SetActive(false);
  3187. gArmR[i].SetActive(false);
  3188. if (!isBone[i])
  3189. {
  3190. gHizaL[i].SetActive(false);
  3191. gHizaR[i].SetActive(false);
  3192. }
  3193. gClavicleL[i].SetActive(false);
  3194. gClavicleR[i].SetActive(false);
  3195. if (isBone[i])
  3196. {
  3197. mNeck[i].maid = maid;
  3198. mNeck[i].head = Neck[i];
  3199. mNeck[i].no = i;
  3200. mNeck[i].ido = 4;
  3201. gNeck[i].transform.position = Neck[i].position;
  3202. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3203. if (mNeck[i].isHead)
  3204. {
  3205. mNeck[i].isHead = false;
  3206. isLookn[i] = isLook[i];
  3207. isLook[i] = !isLook[i];
  3208. }
  3209. mSpine[i].maid = maid;
  3210. mSpine[i].head = Spine2[i];
  3211. mSpine[i].no = i;
  3212. mSpine[i].ido = 4;
  3213. gSpine[i].transform.position = Spine2[i].position;
  3214. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3215. mSpine0a[i].maid = maid;
  3216. mSpine0a[i].head = Spine0a2[i];
  3217. mSpine0a[i].no = i;
  3218. mSpine0a[i].ido = 4;
  3219. gSpine0a[i].transform.position = Spine0a2[i].position;
  3220. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3221. mSpine1a[i].maid = maid;
  3222. mSpine1a[i].head = Spine1a2[i];
  3223. mSpine1a[i].no = i;
  3224. mSpine1a[i].ido = 4;
  3225. gSpine1a[i].transform.position = Spine1a2[i].position;
  3226. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3227. mSpine1[i].maid = maid;
  3228. mSpine1[i].head = Spine12[i];
  3229. mSpine1[i].no = i;
  3230. mSpine1[i].ido = 4;
  3231. gSpine1[i].transform.position = Spine12[i].position;
  3232. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3233. mPelvis[i].maid = maid;
  3234. mPelvis[i].head = Pelvis2[i];
  3235. mPelvis[i].no = i;
  3236. mPelvis[i].ido = 8;
  3237. gPelvis[i].transform.position = Pelvis2[i].position;
  3238. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3239. mHizaL[i].ido = 5;
  3240. mHizaR[i].ido = 5;
  3241. }
  3242. }
  3243. }
  3244. else if (ikMode[i] == 2)
  3245. {
  3246. if (ikModeOld[i] == 0 && gPelvis[i])
  3247. {
  3248. mPelvis[i].ido = 9;
  3249. mPelvis[i].reset = true;
  3250. }
  3251. else
  3252. {
  3253. gArmL[i].SetActive(false);
  3254. gHizaL[i].SetActive(false);
  3255. gArmR[i].SetActive(false);
  3256. gHizaR[i].SetActive(false);
  3257. gClavicleL[i].SetActive(false);
  3258. gClavicleR[i].SetActive(false);
  3259. gNeck[i].SetActive(false);
  3260. gSpine[i].SetActive(false);
  3261. gSpine0a[i].SetActive(false);
  3262. gSpine1a[i].SetActive(false);
  3263. gSpine1[i].SetActive(false);
  3264. mPelvis[i].maid = maid;
  3265. mPelvis[i].head = Pelvis2[i];
  3266. mPelvis[i].no = i;
  3267. mPelvis[i].ido = 9;
  3268. gPelvis[i].transform.position = Pelvis2[i].position;
  3269. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3270. }
  3271. }
  3272. else if (ikMode[i] == 3)
  3273. {
  3274. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3275. {
  3276. mHead[i].ido = 1;
  3277. mHead[i].reset = true;
  3278. mJotai[i].ido = 2;
  3279. mJotai[i].reset = true;
  3280. mKahuku[i].ido = 3;
  3281. mKahuku[i].reset = true;
  3282. mHandL[i].ido = 1;
  3283. mHandR[i].ido = 1;
  3284. mFootL[i].ido = 3;
  3285. mFootR[i].ido = 3;
  3286. mHizaL[i].ido = 5;
  3287. mHizaR[i].ido = 5;
  3288. mHandL[i].reset = true;
  3289. mHandR[i].reset = true;
  3290. mFootL[i].reset = true;
  3291. mFootR[i].reset = true;
  3292. mHizaL[i].reset = true;
  3293. mHizaR[i].reset = true;
  3294. }
  3295. else if (ikModeOld[i] == 0)
  3296. {
  3297. mHandL[i].ido = 1;
  3298. mHandR[i].ido = 1;
  3299. mFootL[i].ido = 3;
  3300. mFootR[i].ido = 3;
  3301. mHizaL[i].ido = 5;
  3302. mHizaR[i].ido = 5;
  3303. mHandL[i].reset = true;
  3304. mHandR[i].reset = true;
  3305. mFootL[i].reset = true;
  3306. mFootR[i].reset = true;
  3307. mHizaL[i].reset = true;
  3308. mHizaR[i].reset = true;
  3309. }
  3310. else
  3311. {
  3312. if (!gHead[i])
  3313. {
  3314. SetIKInit4(i);
  3315. }
  3316. if (mHead[i].isHead)
  3317. {
  3318. mHead[i].isHead = false;
  3319. isLookn[i] = isLook[i];
  3320. isLook[i] = !isLook[i];
  3321. }
  3322. gHead[i].transform.position =
  3323. new Vector3(Head2[i].position.x,
  3324. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3325. Head2[i].position.z);
  3326. gHead[i].transform.eulerAngles =
  3327. new Vector3(Head2[i].transform.eulerAngles.x,
  3328. Head2[i].transform.eulerAngles.y,
  3329. Head2[i].transform.eulerAngles.z + 90f);
  3330. mHead[i].head = Head1[i];
  3331. mHead[i].maid = maid;
  3332. mHead[i].no = i;
  3333. mHead[i].ido = 1;
  3334. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3335. Transform transform3 =
  3336. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3337. Transform transform4 =
  3338. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3339. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3340. Transform transform6 =
  3341. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3342. gJotai[i].transform.position =
  3343. new Vector3(transform3.position.x,
  3344. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3345. transform3.position.z);
  3346. gJotai[i].transform.eulerAngles =
  3347. new Vector3(transform3.transform.eulerAngles.x,
  3348. transform3.transform.eulerAngles.y,
  3349. transform3.transform.eulerAngles.z + 90f);
  3350. mJotai[i].Spine0a = spine0a;
  3351. mJotai[i].Spine1 = transform3;
  3352. mJotai[i].Spine1a = transform4;
  3353. mJotai[i].Spine = transform5;
  3354. mJotai[i].maid = maid;
  3355. mJotai[i].ido = 2;
  3356. gKahuku[i].transform.position =
  3357. new Vector3(transform6.position.x,
  3358. (transform6.position.y + transform5.position.y) / 2f,
  3359. transform6.position.z);
  3360. gKahuku[i].transform.eulerAngles =
  3361. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3362. transform6.transform.eulerAngles.y + 90f,
  3363. transform6.transform.eulerAngles.z);
  3364. mKahuku[i].Pelvis = transform6;
  3365. mKahuku[i].maid = maid;
  3366. mKahuku[i].ido = 3;
  3367. mHandL[i].ido = 1;
  3368. mHandR[i].ido = 1;
  3369. mFootL[i].ido = 3;
  3370. mFootR[i].ido = 3;
  3371. mHizaL[i].ido = 5;
  3372. mHizaR[i].ido = 5;
  3373. gJotai[i].SetActive(true);
  3374. gKahuku[i].SetActive(true);
  3375. gHandL[i].SetActive(true);
  3376. gArmL[i].SetActive(false);
  3377. gFootL[i].SetActive(true);
  3378. gHizaL[i].SetActive(true);
  3379. gHandR[i].SetActive(true);
  3380. gArmR[i].SetActive(false);
  3381. gFootR[i].SetActive(true);
  3382. gHizaR[i].SetActive(true);
  3383. Destroy(gIKHandL[i]);
  3384. Destroy(gIKHandR[i]);
  3385. Destroy(gIKMuneL[i]);
  3386. Destroy(gIKMuneR[i]);
  3387. if (isBone[i])
  3388. {
  3389. gHizaL[i].SetActive(false);
  3390. gHizaR[i].SetActive(false);
  3391. gHead[i].SetActive(false);
  3392. gJotai[i].SetActive(false);
  3393. gKahuku[i].SetActive(false);
  3394. }
  3395. else
  3396. {
  3397. gHizaL[i].SetActive(true);
  3398. gHizaR[i].SetActive(true);
  3399. gHead[i].SetActive(true);
  3400. gJotai[i].SetActive(true);
  3401. gKahuku[i].SetActive(true);
  3402. }
  3403. gClavicleL[i].SetActive(false);
  3404. gClavicleR[i].SetActive(false);
  3405. gNeck[i].SetActive(false);
  3406. gSpine[i].SetActive(false);
  3407. gSpine0a[i].SetActive(false);
  3408. gSpine1a[i].SetActive(false);
  3409. gSpine1[i].SetActive(false);
  3410. gPelvis[i].SetActive(false);
  3411. if (mHead[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mHead[i].isStop = false;
  3416. }
  3417. if (mJotai[i].isStop)
  3418. {
  3419. isStop[i] = true;
  3420. isLock[i] = true;
  3421. mJotai[i].isStop = false;
  3422. }
  3423. if (mKahuku[i].isStop)
  3424. {
  3425. isStop[i] = true;
  3426. isLock[i] = true;
  3427. mKahuku[i].isStop = false;
  3428. }
  3429. if (mKahuku[i].isSelect)
  3430. {
  3431. mKahuku[i].isSelect = false;
  3432. if (ikMaid != i)
  3433. {
  3434. ikMaid = i;
  3435. ikBui = 5;
  3436. SetIK(maid, i);
  3437. }
  3438. }
  3439. if (mJotai[i].isSelect)
  3440. {
  3441. mJotai[i].isSelect = false;
  3442. if (ikMaid != i)
  3443. {
  3444. ikMaid = i;
  3445. ikBui = 5;
  3446. SetIK(maid, i);
  3447. }
  3448. }
  3449. if (mKahuku[i].isSelect)
  3450. {
  3451. mKahuku[i].isSelect = false;
  3452. if (ikMaid != i)
  3453. {
  3454. ikMaid = i;
  3455. ikBui = 5;
  3456. SetIK(maid, i);
  3457. }
  3458. }
  3459. }
  3460. }
  3461. else if (ikMode[i] == 5)
  3462. {
  3463. if (ikModeOld[i] == 3 && gHead[i])
  3464. {
  3465. mHead[i].ido = 4;
  3466. mHead[i].reset = true;
  3467. mJotai[i].ido = 5;
  3468. mJotai[i].reset = true;
  3469. mKahuku[i].ido = 6;
  3470. mKahuku[i].reset = true;
  3471. mHandL[i].ido = 2;
  3472. mHandR[i].ido = 2;
  3473. mFootL[i].ido = 4;
  3474. mFootR[i].ido = 4;
  3475. mHizaL[i].ido = 5;
  3476. mHizaR[i].ido = 5;
  3477. mHandL[i].reset = true;
  3478. mHandR[i].reset = true;
  3479. mFootL[i].reset = true;
  3480. mFootR[i].reset = true;
  3481. mHizaL[i].reset = true;
  3482. mHizaR[i].reset = true;
  3483. }
  3484. else if (ikModeOld[i] == 0)
  3485. {
  3486. mHandL[i].ido = 2;
  3487. mHandR[i].ido = 2;
  3488. mFootL[i].ido = 4;
  3489. mFootR[i].ido = 4;
  3490. mHizaL[i].ido = 5;
  3491. mHizaR[i].ido = 5;
  3492. mHandL[i].reset = true;
  3493. mHandR[i].reset = true;
  3494. mFootL[i].reset = true;
  3495. mFootR[i].reset = true;
  3496. mHizaL[i].reset = true;
  3497. mHizaR[i].reset = true;
  3498. }
  3499. else
  3500. {
  3501. if (!gHead[i])
  3502. {
  3503. SetIKInit4(i);
  3504. }
  3505. if (mHead[i].isHead)
  3506. {
  3507. mHead[i].isHead = false;
  3508. isLookn[i] = isLook[i];
  3509. isLook[i] = !isLook[i];
  3510. }
  3511. gHead[i].transform.position =
  3512. new Vector3(Head2[i].position.x,
  3513. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3514. Head2[i].position.z);
  3515. gHead[i].transform.eulerAngles =
  3516. new Vector3(Head2[i].transform.eulerAngles.x,
  3517. Head2[i].transform.eulerAngles.y,
  3518. Head2[i].transform.eulerAngles.z + 90f);
  3519. mHead[i].head = Head1[i];
  3520. mHead[i].maid = maid;
  3521. mHead[i].ido = 4;
  3522. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3523. Transform transform3 =
  3524. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3525. Transform transform4 =
  3526. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3527. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3528. Transform transform6 =
  3529. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3530. gJotai[i].transform.position =
  3531. new Vector3(transform3.position.x,
  3532. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3533. transform3.position.z);
  3534. gJotai[i].transform.eulerAngles =
  3535. new Vector3(transform3.transform.eulerAngles.x,
  3536. transform3.transform.eulerAngles.y,
  3537. transform3.transform.eulerAngles.z + 90f);
  3538. mJotai[i].Spine0a = spine0a;
  3539. mJotai[i].Spine1 = transform3;
  3540. mJotai[i].Spine1a = transform4;
  3541. mJotai[i].Spine = transform5;
  3542. mJotai[i].maid = maid;
  3543. mJotai[i].ido = 5;
  3544. gKahuku[i].transform.position =
  3545. new Vector3(transform6.position.x,
  3546. (transform6.position.y + transform5.position.y) / 2f,
  3547. transform6.position.z);
  3548. gKahuku[i].transform.eulerAngles =
  3549. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3550. transform6.transform.eulerAngles.y + 90f,
  3551. transform6.transform.eulerAngles.z);
  3552. mKahuku[i].Pelvis = transform6;
  3553. mKahuku[i].maid = maid;
  3554. mKahuku[i].ido = 6;
  3555. mHandL[i].ido = 2;
  3556. mHandR[i].ido = 2;
  3557. mFootL[i].ido = 4;
  3558. mFootR[i].ido = 4;
  3559. mHizaL[i].ido = 5;
  3560. mHizaR[i].ido = 5;
  3561. gArmL[i].SetActive(false);
  3562. gArmR[i].SetActive(false);
  3563. gClavicleL[i].SetActive(false);
  3564. gClavicleR[i].SetActive(false);
  3565. gNeck[i].SetActive(false);
  3566. gSpine[i].SetActive(false);
  3567. gSpine0a[i].SetActive(false);
  3568. gSpine1a[i].SetActive(false);
  3569. gSpine1[i].SetActive(false);
  3570. gPelvis[i].SetActive(false);
  3571. if (isBone[i])
  3572. {
  3573. gHizaL[i].SetActive(false);
  3574. gHizaR[i].SetActive(false);
  3575. gHead[i].SetActive(false);
  3576. gJotai[i].SetActive(false);
  3577. gKahuku[i].SetActive(false);
  3578. }
  3579. else
  3580. {
  3581. gHizaL[i].SetActive(true);
  3582. gHizaR[i].SetActive(true);
  3583. gHead[i].SetActive(true);
  3584. gJotai[i].SetActive(true);
  3585. gKahuku[i].SetActive(true);
  3586. }
  3587. if (mHead[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mHead[i].isStop = false;
  3592. }
  3593. if (mJotai[i].isStop)
  3594. {
  3595. isStop[i] = true;
  3596. isLock[i] = true;
  3597. mJotai[i].isStop = false;
  3598. }
  3599. if (mKahuku[i].isStop)
  3600. {
  3601. isStop[i] = true;
  3602. isLock[i] = true;
  3603. mKahuku[i].isStop = false;
  3604. }
  3605. if (mHead[i].isSelect)
  3606. {
  3607. mHead[i].isSelect = false;
  3608. if (ikMaid != i)
  3609. {
  3610. ikMaid = i;
  3611. ikBui = 5;
  3612. SetIK(maid, i);
  3613. }
  3614. }
  3615. if (mJotai[i].isSelect)
  3616. {
  3617. mJotai[i].isSelect = false;
  3618. if (ikMaid != i)
  3619. {
  3620. ikMaid = i;
  3621. ikBui = 5;
  3622. SetIK(maid, i);
  3623. }
  3624. }
  3625. if (mKahuku[i].isSelect)
  3626. {
  3627. mKahuku[i].isSelect = false;
  3628. if (ikMaid != i)
  3629. {
  3630. ikMaid = i;
  3631. ikBui = 5;
  3632. SetIK(maid, i);
  3633. }
  3634. }
  3635. }
  3636. }
  3637. else if (ikMode[i] == 13)
  3638. {
  3639. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3640. {
  3641. mMaid[i].ido = 5;
  3642. mMaid[i].reset = true;
  3643. mMaidC[i].ido = 5;
  3644. mMaidC[i].reset = true;
  3645. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3646. }
  3647. else
  3648. {
  3649. if (!gMaid[i])
  3650. {
  3651. SetIKInit3(i);
  3652. }
  3653. gMaid[i].transform.position =
  3654. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3655. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3656. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3657. gMaid[i].transform.eulerAngles =
  3658. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3659. Spine0a2[i].transform.eulerAngles.y,
  3660. Spine0a2[i].transform.eulerAngles.z + 90f);
  3661. mMaid[i].maid = maid;
  3662. mMaid[i].ido = 5;
  3663. gMaidC[i].transform.position = maid.transform.position;
  3664. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3665. mMaidC[i].maid = maid;
  3666. mMaidC[i].ido = 5;
  3667. if (isCube)
  3668. {
  3669. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3670. gMaidC[i].SetActive(true);
  3671. }
  3672. else
  3673. {
  3674. gMaidC[i].SetActive(false);
  3675. }
  3676. gHandL[i].SetActive(false);
  3677. gArmL[i].SetActive(false);
  3678. gFootL[i].SetActive(false);
  3679. gHizaL[i].SetActive(false);
  3680. gHandR[i].SetActive(false);
  3681. gArmR[i].SetActive(false);
  3682. gFootR[i].SetActive(false);
  3683. gHizaR[i].SetActive(false);
  3684. gClavicleL[i].SetActive(false);
  3685. gClavicleR[i].SetActive(false);
  3686. gNeck[i].SetActive(false);
  3687. gSpine[i].SetActive(false);
  3688. gSpine0a[i].SetActive(false);
  3689. gSpine1a[i].SetActive(false);
  3690. gSpine1[i].SetActive(false);
  3691. gPelvis[i].SetActive(false);
  3692. }
  3693. if (mMaid[i].isSelect)
  3694. {
  3695. mMaid[i].isSelect = false;
  3696. if (ikMaid != i)
  3697. {
  3698. ikMaid = i;
  3699. ikBui = 5;
  3700. SetIK(maid, i);
  3701. }
  3702. }
  3703. }
  3704. else if (ikMode[i] == 11)
  3705. {
  3706. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3707. {
  3708. mMaid[i].ido = 3;
  3709. mMaid[i].reset = true;
  3710. mMaidC[i].ido = 3;
  3711. mMaidC[i].reset = true;
  3712. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3713. }
  3714. else
  3715. {
  3716. if (!gMaid[i])
  3717. {
  3718. SetIKInit3(i);
  3719. }
  3720. gMaid[i].transform.position =
  3721. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3722. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3723. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3724. gMaid[i].transform.eulerAngles =
  3725. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3726. Spine0a2[i].transform.eulerAngles.y,
  3727. Spine0a2[i].transform.eulerAngles.z + 90f);
  3728. mMaid[i].maid = maid;
  3729. mMaid[i].ido = 3;
  3730. gMaidC[i].transform.position = maid.transform.position;
  3731. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3732. mMaidC[i].maid = maid;
  3733. mMaidC[i].ido = 3;
  3734. if (isCube)
  3735. {
  3736. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3737. gMaidC[i].SetActive(true);
  3738. }
  3739. else
  3740. {
  3741. gMaidC[i].SetActive(false);
  3742. }
  3743. gHandL[i].SetActive(false);
  3744. gArmL[i].SetActive(false);
  3745. gFootL[i].SetActive(false);
  3746. gHizaL[i].SetActive(false);
  3747. gHandR[i].SetActive(false);
  3748. gArmR[i].SetActive(false);
  3749. gFootR[i].SetActive(false);
  3750. gHizaR[i].SetActive(false);
  3751. gClavicleL[i].SetActive(false);
  3752. gClavicleR[i].SetActive(false);
  3753. gNeck[i].SetActive(false);
  3754. gSpine[i].SetActive(false);
  3755. gSpine0a[i].SetActive(false);
  3756. gSpine1a[i].SetActive(false);
  3757. gSpine1[i].SetActive(false);
  3758. gPelvis[i].SetActive(false);
  3759. }
  3760. if (mMaid[i].isSelect)
  3761. {
  3762. mMaid[i].isSelect = false;
  3763. if (ikMaid != i)
  3764. {
  3765. ikMaid = i;
  3766. ikBui = 5;
  3767. SetIK(maid, i);
  3768. }
  3769. }
  3770. }
  3771. else if (ikMode[i] == 12)
  3772. {
  3773. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3774. {
  3775. mMaid[i].ido = 2;
  3776. mMaid[i].reset = true;
  3777. mMaidC[i].ido = 2;
  3778. mMaidC[i].reset = true;
  3779. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3780. }
  3781. else
  3782. {
  3783. if (!gMaid[i])
  3784. {
  3785. SetIKInit3(i);
  3786. }
  3787. gMaid[i].transform.position =
  3788. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3789. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3790. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3791. gMaid[i].transform.eulerAngles =
  3792. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3793. Spine0a2[i].transform.eulerAngles.y,
  3794. Spine0a2[i].transform.eulerAngles.z + 90f);
  3795. mMaid[i].maid = maid;
  3796. mMaid[i].ido = 2;
  3797. gMaidC[i].transform.position = maid.transform.position;
  3798. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3799. mMaidC[i].maid = maid;
  3800. mMaidC[i].ido = 2;
  3801. if (isCube)
  3802. {
  3803. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3804. gMaidC[i].SetActive(true);
  3805. }
  3806. else
  3807. {
  3808. gMaidC[i].SetActive(false);
  3809. }
  3810. gHandL[i].SetActive(false);
  3811. gArmL[i].SetActive(false);
  3812. gFootL[i].SetActive(false);
  3813. gHizaL[i].SetActive(false);
  3814. gHandR[i].SetActive(false);
  3815. gArmR[i].SetActive(false);
  3816. gFootR[i].SetActive(false);
  3817. gHizaR[i].SetActive(false);
  3818. gClavicleL[i].SetActive(false);
  3819. gClavicleR[i].SetActive(false);
  3820. gNeck[i].SetActive(false);
  3821. gSpine[i].SetActive(false);
  3822. gSpine0a[i].SetActive(false);
  3823. gSpine1a[i].SetActive(false);
  3824. gSpine1[i].SetActive(false);
  3825. gPelvis[i].SetActive(false);
  3826. }
  3827. if (mMaid[i].isSelect)
  3828. {
  3829. mMaid[i].isSelect = false;
  3830. if (ikMaid != i)
  3831. {
  3832. ikMaid = i;
  3833. ikBui = 5;
  3834. SetIK(maid, i);
  3835. }
  3836. }
  3837. }
  3838. else if (ikMode[i] == 10)
  3839. {
  3840. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3841. {
  3842. mMaid[i].ido = 1;
  3843. mMaid[i].reset = true;
  3844. mMaidC[i].ido = 1;
  3845. mMaidC[i].reset = true;
  3846. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3847. }
  3848. else
  3849. {
  3850. if (!gMaid[i])
  3851. {
  3852. SetIKInit3(i);
  3853. }
  3854. gMaid[i].transform.position =
  3855. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3856. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3857. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3858. gMaid[i].transform.eulerAngles =
  3859. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3860. Spine0a2[i].transform.eulerAngles.y,
  3861. Spine0a2[i].transform.eulerAngles.z + 90f);
  3862. mMaid[i].maid = maid;
  3863. mMaid[i].ido = 1;
  3864. gMaidC[i].transform.position = maid.transform.position;
  3865. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3866. mMaidC[i].maid = maid;
  3867. mMaidC[i].ido = 1;
  3868. if (isCube)
  3869. {
  3870. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3871. gMaidC[i].SetActive(true);
  3872. }
  3873. else
  3874. {
  3875. gMaidC[i].SetActive(false);
  3876. }
  3877. gHandL[i].SetActive(false);
  3878. gArmL[i].SetActive(false);
  3879. gFootL[i].SetActive(false);
  3880. gHizaL[i].SetActive(false);
  3881. gHandR[i].SetActive(false);
  3882. gArmR[i].SetActive(false);
  3883. gFootR[i].SetActive(false);
  3884. gHizaR[i].SetActive(false);
  3885. gClavicleL[i].SetActive(false);
  3886. gClavicleR[i].SetActive(false);
  3887. gNeck[i].SetActive(false);
  3888. gSpine[i].SetActive(false);
  3889. gSpine0a[i].SetActive(false);
  3890. gSpine1a[i].SetActive(false);
  3891. gSpine1[i].SetActive(false);
  3892. gPelvis[i].SetActive(false);
  3893. }
  3894. if (mMaid[i].isSelect)
  3895. {
  3896. mMaid[i].isSelect = false;
  3897. if (ikMaid != i)
  3898. {
  3899. ikMaid = i;
  3900. ikBui = 5;
  3901. SetIK(maid, i);
  3902. }
  3903. }
  3904. }
  3905. else if (ikMode[i] == 9)
  3906. {
  3907. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3908. {
  3909. mMaid[i].ido = 4;
  3910. mMaid[i].reset = true;
  3911. mMaidC[i].ido = 4;
  3912. mMaidC[i].reset = true;
  3913. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3914. }
  3915. else
  3916. {
  3917. if (!gMaid[i])
  3918. {
  3919. SetIKInit3(i);
  3920. }
  3921. gMaid[i].transform.position =
  3922. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3923. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3924. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3925. gMaid[i].transform.eulerAngles =
  3926. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3927. Spine0a2[i].transform.eulerAngles.y,
  3928. Spine0a2[i].transform.eulerAngles.z + 90f);
  3929. mMaid[i].maid = maid;
  3930. mMaid[i].ido = 4;
  3931. gMaidC[i].transform.position = maid.transform.position;
  3932. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3933. mMaidC[i].maid = maid;
  3934. mMaidC[i].ido = 4;
  3935. if (isCube)
  3936. {
  3937. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3938. gMaidC[i].SetActive(true);
  3939. }
  3940. else
  3941. {
  3942. gMaidC[i].SetActive(false);
  3943. }
  3944. gHandL[i].SetActive(false);
  3945. gArmL[i].SetActive(false);
  3946. gFootL[i].SetActive(false);
  3947. gHizaL[i].SetActive(false);
  3948. gHandR[i].SetActive(false);
  3949. gArmR[i].SetActive(false);
  3950. gFootR[i].SetActive(false);
  3951. gHizaR[i].SetActive(false);
  3952. gClavicleL[i].SetActive(false);
  3953. gClavicleR[i].SetActive(false);
  3954. gNeck[i].SetActive(false);
  3955. gSpine[i].SetActive(false);
  3956. gSpine0a[i].SetActive(false);
  3957. gSpine1a[i].SetActive(false);
  3958. gSpine1[i].SetActive(false);
  3959. gPelvis[i].SetActive(false);
  3960. }
  3961. if (mMaid[i].isSelect)
  3962. {
  3963. mMaid[i].isSelect = false;
  3964. if (ikMaid != i)
  3965. {
  3966. ikMaid = i;
  3967. ikBui = 5;
  3968. SetIK(maid, i);
  3969. }
  3970. }
  3971. }
  3972. else if (ikMode[i] == 14)
  3973. {
  3974. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3975. {
  3976. mMaid[i].ido = 6;
  3977. mMaid[i].reset = true;
  3978. mMaidC[i].ido = 6;
  3979. mMaidC[i].reset = true;
  3980. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3981. }
  3982. else
  3983. {
  3984. if (!gMaid[i])
  3985. {
  3986. SetIKInit3(i);
  3987. }
  3988. gMaid[i].transform.position =
  3989. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3990. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3991. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3992. gMaid[i].transform.eulerAngles =
  3993. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3994. Spine0a2[i].transform.eulerAngles.y,
  3995. Spine0a2[i].transform.eulerAngles.z + 90f);
  3996. mMaid[i].maid = maid;
  3997. mMaid[i].ido = 6;
  3998. gMaidC[i].transform.position = maid.transform.position;
  3999. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  4000. mMaidC[i].maid = maid;
  4001. mMaidC[i].ido = 6;
  4002. if (isCube)
  4003. {
  4004. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  4005. gMaidC[i].SetActive(true);
  4006. }
  4007. else
  4008. {
  4009. gMaidC[i].SetActive(false);
  4010. }
  4011. gHandL[i].SetActive(false);
  4012. gArmL[i].SetActive(false);
  4013. gFootL[i].SetActive(false);
  4014. gHizaL[i].SetActive(false);
  4015. gHandR[i].SetActive(false);
  4016. gArmR[i].SetActive(false);
  4017. gFootR[i].SetActive(false);
  4018. gHizaR[i].SetActive(false);
  4019. gClavicleL[i].SetActive(false);
  4020. gClavicleR[i].SetActive(false);
  4021. gNeck[i].SetActive(false);
  4022. gSpine[i].SetActive(false);
  4023. gSpine0a[i].SetActive(false);
  4024. gSpine1a[i].SetActive(false);
  4025. gSpine1[i].SetActive(false);
  4026. gPelvis[i].SetActive(false);
  4027. }
  4028. if (mMaid[i].isSelect)
  4029. {
  4030. mMaid[i].isSelect = false;
  4031. if (ikMaid != i)
  4032. {
  4033. ikMaid = i;
  4034. ikBui = 5;
  4035. SetIK(maid, i);
  4036. }
  4037. }
  4038. }
  4039. else if (ikMode[i] == 6)
  4040. {
  4041. if (!gFinger[i, 0])
  4042. {
  4043. SetIKInit2(i);
  4044. }
  4045. Destroy(gMaid[i]);
  4046. Destroy(gMaidC[i]);
  4047. Destroy(gHead[i]);
  4048. Destroy(gJotai[i]);
  4049. Destroy(gKahuku[i]);
  4050. gHandL[i].SetActive(false);
  4051. gArmL[i].SetActive(false);
  4052. gFootL[i].SetActive(false);
  4053. gHizaL[i].SetActive(false);
  4054. gHandR[i].SetActive(false);
  4055. gArmR[i].SetActive(false);
  4056. gFootR[i].SetActive(false);
  4057. gHizaR[i].SetActive(false);
  4058. gClavicleL[i].SetActive(false);
  4059. gClavicleR[i].SetActive(false);
  4060. gNeck[i].SetActive(false);
  4061. gSpine[i].SetActive(false);
  4062. gSpine0a[i].SetActive(false);
  4063. gSpine1a[i].SetActive(false);
  4064. gSpine1[i].SetActive(false);
  4065. gPelvis[i].SetActive(false);
  4066. for (int j = 0; j < 10; j++)
  4067. {
  4068. mFinger[i, j * 3 + 2].maid = maid;
  4069. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4070. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 2].ido = 12;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3 + 2].ido = 15;
  4076. }
  4077. mFinger[i, j * 3 + 1].maid = maid;
  4078. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4079. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3 + 1].ido = 11;
  4082. if (j == 0 || j == 5)
  4083. {
  4084. mFinger[i, j * 3 + 1].ido = 14;
  4085. }
  4086. mFinger[i, j * 3].maid = maid;
  4087. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4088. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4089. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4090. mFinger[i, j * 3].ido = 13;
  4091. if (j == 0 || j == 5)
  4092. {
  4093. mFinger[i, j * 3].ido = 0;
  4094. }
  4095. gFinger[i, j * 3 + 2].SetActive(false);
  4096. gFinger[i, j * 3 + 1].SetActive(false);
  4097. gFinger[i, j * 3].SetActive(true);
  4098. gFinger[i, j * 3].SetActive(true);
  4099. mFinger[i, j * 3].ido = 16;
  4100. if (ikModeOld[i] != 6)
  4101. {
  4102. mFinger[i, j * 3].reset = true;
  4103. }
  4104. gFinger[i, j * 3 + 2].transform.position =
  4105. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4106. + Finger[i, j * 4 + 2].position) / 3f;
  4107. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4108. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4109. if (mFinger[i, j * 3 + 2].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3 + 2].isStop = false;
  4114. }
  4115. if (mFinger[i, j * 3 + 1].isStop)
  4116. {
  4117. isStop[i] = true;
  4118. isLock[i] = true;
  4119. mFinger[i, j * 3 + 1].isStop = false;
  4120. }
  4121. if (mFinger[i, j * 3].isStop)
  4122. {
  4123. isStop[i] = true;
  4124. isLock[i] = true;
  4125. mFinger[i, j * 3].isStop = false;
  4126. }
  4127. }
  4128. for (int j = 0; j < 6; j++)
  4129. {
  4130. mFinger2[i, j * 2 + 1].maid = maid;
  4131. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4132. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4133. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4134. mFinger2[i, j * 2 + 1].ido = 0;
  4135. mFinger2[i, j * 2].maid = maid;
  4136. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4137. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4138. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4139. mFinger2[i, j * 2].ido = 0;
  4140. gFinger2[i, j * 2 + 1].SetActive(false);
  4141. gFinger2[i, j * 2].SetActive(false);
  4142. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4143. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4144. if (mFinger2[i, j * 2 + 1].isStop)
  4145. {
  4146. isStop[i] = true;
  4147. isLock[i] = true;
  4148. mFinger2[i, j * 2 + 1].isStop = false;
  4149. }
  4150. if (mFinger2[i, j * 2].isStop)
  4151. {
  4152. isStop[i] = true;
  4153. isLock[i] = true;
  4154. mFinger2[i, j * 2].isStop = false;
  4155. }
  4156. }
  4157. }
  4158. else if (ikMode[i] == 4)
  4159. {
  4160. if (!gFinger[i, 0])
  4161. {
  4162. SetIKInit2(i);
  4163. }
  4164. Destroy(gMaid[i]);
  4165. Destroy(gMaidC[i]);
  4166. Destroy(gHead[i]);
  4167. Destroy(gJotai[i]);
  4168. Destroy(gKahuku[i]);
  4169. gHandL[i].SetActive(false);
  4170. gArmL[i].SetActive(false);
  4171. gFootL[i].SetActive(false);
  4172. gHizaL[i].SetActive(false);
  4173. gHandR[i].SetActive(false);
  4174. gArmR[i].SetActive(false);
  4175. gFootR[i].SetActive(false);
  4176. gHizaR[i].SetActive(false);
  4177. gClavicleL[i].SetActive(false);
  4178. gClavicleR[i].SetActive(false);
  4179. gNeck[i].SetActive(false);
  4180. gSpine[i].SetActive(false);
  4181. gSpine0a[i].SetActive(false);
  4182. gSpine1a[i].SetActive(false);
  4183. gSpine1[i].SetActive(false);
  4184. gPelvis[i].SetActive(false);
  4185. for (int j = 0; j < 10; j++)
  4186. {
  4187. mFinger[i, j * 3 + 2].maid = maid;
  4188. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4189. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4190. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 2].ido = 12;
  4192. mFinger[i, j * 3 + 2].onFlg = true;
  4193. if (j == 0 || j == 5)
  4194. {
  4195. mFinger[i, j * 3 + 2].ido = 15;
  4196. }
  4197. mFinger[i, j * 3 + 1].maid = maid;
  4198. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4199. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4200. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3 + 1].ido = 11;
  4202. mFinger[i, j * 3 + 1].onFlg = true;
  4203. if (j == 0 || j == 5)
  4204. {
  4205. mFinger[i, j * 3 + 1].ido = 14;
  4206. }
  4207. mFinger[i, j * 3].maid = maid;
  4208. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4209. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4210. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4211. mFinger[i, j * 3].ido = 13;
  4212. mFinger[i, j * 3].onFlg = true;
  4213. if (j == 0 || j == 5)
  4214. {
  4215. mFinger[i, j * 3].ido = 0;
  4216. }
  4217. if (ikModeOld[i] != 4)
  4218. {
  4219. mFinger[i, j * 3].reset = true;
  4220. }
  4221. gFinger[i, j * 3 + 2].SetActive(true);
  4222. gFinger[i, j * 3 + 1].SetActive(true);
  4223. gFinger[i, j * 3].SetActive(true);
  4224. gFinger[i, j * 3 + 2].transform.position =
  4225. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4226. + Finger[i, j * 4 + 2].position) / 3f;
  4227. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4228. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4229. if (mFinger[i, j * 3 + 2].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3 + 2].isStop = false;
  4234. }
  4235. if (mFinger[i, j * 3 + 1].isStop)
  4236. {
  4237. isStop[i] = true;
  4238. isLock[i] = true;
  4239. mFinger[i, j * 3 + 1].isStop = false;
  4240. }
  4241. if (mFinger[i, j * 3].isStop)
  4242. {
  4243. isStop[i] = true;
  4244. isLock[i] = true;
  4245. mFinger[i, j * 3].isStop = false;
  4246. }
  4247. }
  4248. for (int j = 0; j < 6; j++)
  4249. {
  4250. mFinger2[i, j * 2 + 1].maid = maid;
  4251. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4252. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4253. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4254. mFinger2[i, j * 2 + 1].ido = 17;
  4255. mFinger2[i, j * 2].maid = maid;
  4256. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4257. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4258. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4259. mFinger2[i, j * 2].ido = 0;
  4260. gFinger2[i, j * 2 + 1].SetActive(true);
  4261. gFinger2[i, j * 2].SetActive(true);
  4262. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4263. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4264. if (mFinger2[i, j * 2 + 1].isStop)
  4265. {
  4266. isStop[i] = true;
  4267. isLock[i] = true;
  4268. mFinger2[i, j * 2 + 1].isStop = false;
  4269. }
  4270. if (mFinger2[i, j * 2].isStop)
  4271. {
  4272. isStop[i] = true;
  4273. isLock[i] = true;
  4274. mFinger2[i, j * 2].isStop = false;
  4275. }
  4276. }
  4277. }
  4278. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4279. {
  4280. mHandL[i].ido = 0;
  4281. mHandR[i].ido = 0;
  4282. mFootL[i].ido = 0;
  4283. mFootR[i].ido = 0;
  4284. mHizaL[i].ido = 0;
  4285. mHizaR[i].ido = 0;
  4286. mHandL[i].reset = true;
  4287. mHandR[i].reset = true;
  4288. mFootL[i].reset = true;
  4289. mFootR[i].reset = true;
  4290. mHizaL[i].reset = true;
  4291. mHizaR[i].reset = true;
  4292. }
  4293. else
  4294. {
  4295. if (gFinger[i, 0])
  4296. {
  4297. for (int j = 0; j < 30; j++)
  4298. {
  4299. gFinger[i, j].SetActive(false);
  4300. }
  4301. for (int j = 0; j < 12; j++)
  4302. {
  4303. gFinger2[i, j].SetActive(false);
  4304. }
  4305. }
  4306. Destroy(gHead[i]);
  4307. Destroy(gJotai[i]);
  4308. Destroy(gKahuku[i]);
  4309. Destroy(gIKHandL[i]);
  4310. Destroy(gIKHandR[i]);
  4311. Destroy(gIKMuneL[i]);
  4312. Destroy(gIKMuneR[i]);
  4313. Destroy(gHead2[i]);
  4314. Destroy(gMaid2[i]);
  4315. gHandL[i].SetActive(true);
  4316. gArmL[i].SetActive(true);
  4317. gFootL[i].SetActive(true);
  4318. gHizaL[i].SetActive(true);
  4319. gHandR[i].SetActive(true);
  4320. gArmR[i].SetActive(true);
  4321. gFootR[i].SetActive(true);
  4322. gHizaR[i].SetActive(true);
  4323. mHandL[i].ido = 0;
  4324. mHandR[i].ido = 0;
  4325. mFootL[i].ido = 0;
  4326. mFootR[i].ido = 0;
  4327. gClavicleL[i].SetActive(true);
  4328. gClavicleR[i].SetActive(true);
  4329. }
  4330. if (!isIK[i])
  4331. {
  4332. gHandL[i].SetActive(false);
  4333. gArmL[i].SetActive(false);
  4334. gFootL[i].SetActive(false);
  4335. gHizaL[i].SetActive(false);
  4336. gHandR[i].SetActive(false);
  4337. gArmR[i].SetActive(false);
  4338. gFootR[i].SetActive(false);
  4339. gHizaR[i].SetActive(false);
  4340. gClavicleL[i].SetActive(false);
  4341. gClavicleR[i].SetActive(false);
  4342. gNeck[i].SetActive(false);
  4343. gSpine[i].SetActive(false);
  4344. gSpine0a[i].SetActive(false);
  4345. gSpine1a[i].SetActive(false);
  4346. gSpine1[i].SetActive(false);
  4347. gPelvis[i].SetActive(false);
  4348. }
  4349. if (isIK[i])
  4350. {
  4351. mHandL[i].maid = maid;
  4352. mHandL[i].HandL = HandL1[i];
  4353. if (ikMode[i] == 2)
  4354. {
  4355. mHandL[i].UpperArmL = ForearmL1[i];
  4356. }
  4357. else
  4358. {
  4359. mHandL[i].UpperArmL = UpperArmL1[i];
  4360. if (ikModeOld[i] == 2 && isLock[i])
  4361. {
  4362. mHandL[i].OnMouseDown();
  4363. mHandL[i].isSelect = false;
  4364. }
  4365. }
  4366. mHandL[i].ForearmL = ForearmL1[i];
  4367. mArmL[i].maid = maid;
  4368. mArmL[i].HandL = ForearmL1[i];
  4369. mArmL[i].UpperArmL = UpperArmL1[i];
  4370. mArmL[i].ForearmL = UpperArmL1[i];
  4371. mArmL[i].onFlg = true;
  4372. if (mArmL[i].onFlg2)
  4373. {
  4374. mArmL[i].onFlg2 = false;
  4375. mHandL[i].initFlg = false;
  4376. }
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mHandL[i].initFlg = false;
  4380. mHandR[i].initFlg = false;
  4381. mFootL[i].initFlg = false;
  4382. mFootR[i].initFlg = false;
  4383. mHandL[i].onFlg = true;
  4384. mHandR[i].onFlg = true;
  4385. mFootL[i].onFlg = true;
  4386. mFootR[i].onFlg = true;
  4387. }
  4388. else
  4389. {
  4390. mHandL[i].onFlg = false;
  4391. mHandR[i].onFlg = false;
  4392. mFootL[i].onFlg = false;
  4393. mFootR[i].onFlg = false;
  4394. }
  4395. gHandL[i].transform.position = HandL1[i].position;
  4396. gArmL[i].transform.position = ForearmL1[i].position;
  4397. mClavicleL[i].maid = maid;
  4398. mClavicleL[i].HandL = UpperArmL1[i];
  4399. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4400. mClavicleL[i].ForearmL = ClavicleL1[i];
  4401. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4402. if (mHandL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mHandL[i].isStop = false;
  4407. }
  4408. if (mArmL[i].isStop)
  4409. {
  4410. isStop[i] = true;
  4411. isLock[i] = true;
  4412. mArmL[i].isStop = false;
  4413. }
  4414. if (mClavicleL[i].isStop)
  4415. {
  4416. isStop[i] = true;
  4417. isLock[i] = true;
  4418. mClavicleL[i].isStop = false;
  4419. }
  4420. mHandR[i].maid = maid;
  4421. mHandR[i].HandL = HandR1[i];
  4422. if (ikMode[i] == 2)
  4423. {
  4424. mHandR[i].UpperArmL = ForearmR1[i];
  4425. }
  4426. else
  4427. {
  4428. mHandR[i].UpperArmL = UpperArmR1[i];
  4429. if (ikModeOld[i] == 2 && isLock[i])
  4430. {
  4431. mHandR[i].OnMouseDown();
  4432. mHandR[i].isSelect = false;
  4433. }
  4434. }
  4435. mHandR[i].ForearmL = ForearmR1[i];
  4436. mArmR[i].maid = maid;
  4437. mArmR[i].HandL = ForearmR1[i];
  4438. mArmR[i].UpperArmL = UpperArmR1[i];
  4439. mArmR[i].ForearmL = UpperArmR1[i];
  4440. mArmR[i].onFlg = true;
  4441. if (mArmR[i].onFlg2)
  4442. {
  4443. mArmR[i].onFlg2 = false;
  4444. mHandR[i].initFlg = false;
  4445. }
  4446. gHandR[i].transform.position = HandR1[i].position;
  4447. gArmR[i].transform.position = ForearmR1[i].position;
  4448. mClavicleR[i].maid = maid;
  4449. mClavicleR[i].HandL = UpperArmR1[i];
  4450. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4451. mClavicleR[i].ForearmL = ClavicleR1[i];
  4452. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4453. if (mHandR[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mHandR[i].isStop = false;
  4458. }
  4459. if (mArmR[i].isStop)
  4460. {
  4461. isStop[i] = true;
  4462. isLock[i] = true;
  4463. mArmR[i].isStop = false;
  4464. }
  4465. if (mClavicleL[i].isStop)
  4466. {
  4467. isStop[i] = true;
  4468. isLock[i] = true;
  4469. mClavicleL[i].isStop = false;
  4470. }
  4471. mFootL[i].maid = maid;
  4472. mFootL[i].HandL = HandL2[i];
  4473. if (ikMode[i] == 2)
  4474. {
  4475. mFootL[i].UpperArmL = ForearmL2[i];
  4476. }
  4477. else
  4478. {
  4479. mFootL[i].UpperArmL = UpperArmL2[i];
  4480. if (ikModeOld[i] == 2 && isLock[i])
  4481. {
  4482. mFootL[i].OnMouseDown();
  4483. mFootL[i].isSelect = false;
  4484. }
  4485. }
  4486. mFootL[i].ForearmL = ForearmL2[i];
  4487. mHizaL[i].maid = maid;
  4488. mHizaL[i].HandL = ForearmL2[i];
  4489. mHizaL[i].UpperArmL = UpperArmL2[i];
  4490. mHizaL[i].ForearmL = UpperArmL2[i];
  4491. mHizaL[i].onFlg = true;
  4492. if (mHizaL[i].onFlg2)
  4493. {
  4494. mHizaL[i].onFlg2 = false;
  4495. mFootL[i].initFlg = false;
  4496. }
  4497. gFootL[i].transform.position = HandL2[i].position;
  4498. gHizaL[i].transform.position = ForearmL2[i].position;
  4499. if (mFootL[i].isStop)
  4500. {
  4501. isStop[i] = true;
  4502. isLock[i] = true;
  4503. mFootL[i].isStop = false;
  4504. }
  4505. if (mHizaL[i].isStop)
  4506. {
  4507. isStop[i] = true;
  4508. isLock[i] = true;
  4509. mHizaL[i].isStop = false;
  4510. }
  4511. mFootR[i].maid = maid;
  4512. mFootR[i].HandL = HandR2[i];
  4513. if (ikMode[i] == 2)
  4514. {
  4515. mFootR[i].UpperArmL = ForearmR2[i];
  4516. }
  4517. else
  4518. {
  4519. mFootR[i].UpperArmL = UpperArmR2[i];
  4520. if (ikModeOld[i] == 2 && isLock[i])
  4521. {
  4522. mFootR[i].OnMouseDown();
  4523. mFootR[i].isSelect = false;
  4524. }
  4525. }
  4526. mFootR[i].ForearmL = ForearmR2[i];
  4527. mHizaR[i].maid = maid;
  4528. mHizaR[i].HandL = ForearmR2[i];
  4529. mHizaR[i].UpperArmL = UpperArmR2[i];
  4530. mHizaR[i].ForearmL = UpperArmR2[i];
  4531. mHizaR[i].onFlg = true;
  4532. if (mHizaR[i].onFlg2)
  4533. {
  4534. mHizaR[i].onFlg2 = false;
  4535. mFootR[i].initFlg = false;
  4536. }
  4537. gFootR[i].transform.position = HandR2[i].position;
  4538. gHizaR[i].transform.position = ForearmR2[i].position;
  4539. if (mFootR[i].isStop)
  4540. {
  4541. isStop[i] = true;
  4542. isLock[i] = true;
  4543. mFootR[i].isStop = false;
  4544. }
  4545. if (mHizaR[i].isStop)
  4546. {
  4547. isStop[i] = true;
  4548. isLock[i] = true;
  4549. mHizaR[i].isStop = false;
  4550. }
  4551. bool flag13 = false;
  4552. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4553. || ikModeOld[i] == 14)
  4554. {
  4555. flag13 = true;
  4556. }
  4557. if (isBone[i])
  4558. {
  4559. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4560. || isChange[i])
  4561. {
  4562. float gizmoSizeSpine = 0.2f;
  4563. gizmoNeck[i].Visible = false;
  4564. gizmoFootL[i].Visible = false;
  4565. gizmoHandR[i].Visible = false;
  4566. gizmoHandL[i].Visible = false;
  4567. gizmoFootR[i].Visible = false;
  4568. gizmoPelvis[i].Visible = false;
  4569. if (ikMode[i] == 2 || ikMode[i] == 1)
  4570. {
  4571. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4572. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4573. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4574. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4575. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4576. if (ikMode[i] == 2)
  4577. {
  4578. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4579. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4580. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4581. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4582. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4583. if (isDragging)
  4584. {
  4585. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4586. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4587. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4588. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4589. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4590. }
  4591. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4592. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4596. gizmoNeck[i].Visible = true;
  4597. gizmoHandL[i].Visible = true;
  4598. gizmoHandR[i].Visible = true;
  4599. gizmoFootL[i].Visible = true;
  4600. gizmoFootR[i].Visible = true;
  4601. gNeck[i].SetActive(false);
  4602. gSpine[i].SetActive(false);
  4603. gSpine0a[i].SetActive(false);
  4604. gSpine1[i].SetActive(false);
  4605. gSpine1a[i].SetActive(false);
  4606. }
  4607. else
  4608. {
  4609. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4610. if (isDragging)
  4611. {
  4612. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4613. }
  4614. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4615. gizmoPelvis[i].Visible = true;
  4616. gPelvis[i].SetActive(false);
  4617. }
  4618. if (!isLock[i])
  4619. {
  4620. if (isDragging)
  4621. {
  4622. isStop[i] = true;
  4623. isLock[i] = true;
  4624. }
  4625. }
  4626. }
  4627. }
  4628. else
  4629. {
  4630. float gizmoSizeLimb = 0.25f;
  4631. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4632. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4633. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4634. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4635. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4636. if (ikMode[i] == 3)
  4637. {
  4638. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4639. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4640. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4641. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4642. if (isDragging)
  4643. {
  4644. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4645. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4646. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4647. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4648. }
  4649. else
  4650. {
  4651. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4652. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4653. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4654. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4655. }
  4656. }
  4657. else if (ikMode[i] == 5)
  4658. {
  4659. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4660. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4661. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4662. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4663. if (isDragging)
  4664. {
  4665. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4666. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4667. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4668. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4669. flag13 = true;
  4670. }
  4671. else
  4672. {
  4673. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4674. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4675. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4676. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4677. }
  4678. }
  4679. else if (ikMode[i] == 8)
  4680. {
  4681. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4682. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4683. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4684. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4685. if (isDragging)
  4686. {
  4687. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4688. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4689. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4690. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4691. flag13 = true;
  4692. }
  4693. else
  4694. {
  4695. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4696. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4697. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4698. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4699. }
  4700. }
  4701. gizmoHandL[i].Visible = true;
  4702. gizmoHandR[i].Visible = true;
  4703. gizmoFootL[i].Visible = true;
  4704. gizmoFootR[i].Visible = true;
  4705. gHandL[i].SetActive(false);
  4706. gFootL[i].SetActive(false);
  4707. gHandR[i].SetActive(false);
  4708. gFootR[i].SetActive(false);
  4709. if (!isLock[i])
  4710. {
  4711. if (isDragging)
  4712. {
  4713. isStop[i] = true;
  4714. isLock[i] = true;
  4715. }
  4716. }
  4717. }
  4718. if (isChange[i])
  4719. {
  4720. isChange[i] = false;
  4721. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4725. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4726. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4727. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4728. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4729. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4730. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4731. gHandL[i].GetComponent<Renderer>().enabled = true;
  4732. gHandR[i].GetComponent<Renderer>().enabled = true;
  4733. gArmL[i].GetComponent<Renderer>().enabled = true;
  4734. gArmR[i].GetComponent<Renderer>().enabled = true;
  4735. gFootL[i].GetComponent<Renderer>().enabled = true;
  4736. gFootR[i].GetComponent<Renderer>().enabled = true;
  4737. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4738. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4739. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4740. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4741. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4742. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4743. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4744. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4745. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4746. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4747. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4748. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4749. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4750. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4751. }
  4752. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4753. {
  4754. mNeck[i].ido = 1;
  4755. mNeck[i].reset = true;
  4756. mSpine[i].ido = 1;
  4757. mSpine[i].reset = true;
  4758. mSpine0a[i].ido = 1;
  4759. mSpine0a[i].reset = true;
  4760. mSpine1a[i].ido = 1;
  4761. mSpine1a[i].reset = true;
  4762. mSpine1[i].ido = 1;
  4763. mSpine1[i].reset = true;
  4764. mPelvis[i].ido = 1;
  4765. mPelvis[i].reset = true;
  4766. }
  4767. else if (ikMode[i] == 0)
  4768. {
  4769. gNeck[i].SetActive(true);
  4770. gSpine[i].SetActive(true);
  4771. gSpine0a[i].SetActive(true);
  4772. gSpine1a[i].SetActive(true);
  4773. gSpine1[i].SetActive(true);
  4774. gPelvis[i].SetActive(true);
  4775. if (mNeck[i].isHead)
  4776. {
  4777. mNeck[i].isHead = false;
  4778. isLookn[i] = isLook[i];
  4779. isLook[i] = !isLook[i];
  4780. }
  4781. mNeck[i].maid = maid;
  4782. mNeck[i].head = Neck[i];
  4783. mNeck[i].no = i;
  4784. mNeck[i].ido = 1;
  4785. gNeck[i].transform.position = Neck[i].position;
  4786. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4787. mSpine[i].maid = maid;
  4788. mSpine[i].head = Spine2[i];
  4789. mSpine[i].no = i;
  4790. mSpine[i].ido = 1;
  4791. gSpine[i].transform.position = Spine2[i].position;
  4792. gSpine[i].transform.eulerAngles =
  4793. new Vector3(Spine2[i].localEulerAngles.z,
  4794. Spine2[i].localEulerAngles.y,
  4795. Spine2[i].localEulerAngles.x);
  4796. mSpine0a[i].maid = maid;
  4797. mSpine0a[i].head = Spine0a2[i];
  4798. mSpine0a[i].no = i;
  4799. mSpine0a[i].ido = 1;
  4800. gSpine0a[i].transform.position = Spine0a2[i].position;
  4801. gSpine0a[i].transform.eulerAngles =
  4802. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4803. Spine0a2[i].localEulerAngles.x,
  4804. Spine0a2[i].localEulerAngles.y);
  4805. mSpine1a[i].maid = maid;
  4806. mSpine1a[i].head = Spine1a2[i];
  4807. mSpine1a[i].no = i;
  4808. mSpine1a[i].ido = 1;
  4809. gSpine1a[i].transform.position = Spine1a2[i].position;
  4810. gSpine1a[i].transform.localEulerAngles =
  4811. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4812. Spine1a2[i].localEulerAngles.x,
  4813. Spine1a2[i].localEulerAngles.y);
  4814. mSpine1[i].maid = maid;
  4815. mSpine1[i].head = Spine12[i];
  4816. mSpine1[i].no = i;
  4817. mSpine1[i].ido = 1;
  4818. gSpine1[i].transform.position = Spine12[i].position;
  4819. gSpine1[i].transform.localEulerAngles =
  4820. new Vector3(-Spine12[i].localEulerAngles.z,
  4821. Spine12[i].localEulerAngles.x,
  4822. Spine12[i].localEulerAngles.y);
  4823. mPelvis[i].maid = maid;
  4824. mPelvis[i].head = Pelvis2[i];
  4825. mPelvis[i].no = i;
  4826. mPelvis[i].ido = 1;
  4827. gPelvis[i].transform.position = Pelvis2[i].position;
  4828. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4829. if (mNeck[i].isIdo)
  4830. {
  4831. mNeck[i].isIdo = false;
  4832. isLock[i] = true;
  4833. }
  4834. if (mSpine[i].isIdo)
  4835. {
  4836. mSpine[i].isIdo = false;
  4837. flag13 = true;
  4838. isLock[i] = true;
  4839. }
  4840. if (mSpine0a[i].isIdo)
  4841. {
  4842. mSpine0a[i].isIdo = false;
  4843. flag13 = true;
  4844. isLock[i] = true;
  4845. }
  4846. if (mSpine1a[i].isIdo)
  4847. {
  4848. mSpine1a[i].isIdo = false;
  4849. flag13 = true;
  4850. isLock[i] = true;
  4851. }
  4852. if (mSpine1[i].isIdo)
  4853. {
  4854. mSpine1[i].isIdo = false;
  4855. flag13 = true;
  4856. isLock[i] = true;
  4857. }
  4858. if (mPelvis[i].isIdo)
  4859. {
  4860. mPelvis[i].isIdo = false;
  4861. flag13 = true;
  4862. isLock[i] = true;
  4863. }
  4864. if (mClavicleL[i].isIdo)
  4865. {
  4866. mClavicleL[i].isIdo = false;
  4867. flag13 = true;
  4868. isLock[i] = true;
  4869. }
  4870. if (mClavicleR[i].isIdo)
  4871. {
  4872. mClavicleR[i].isIdo = false;
  4873. flag13 = true;
  4874. isLock[i] = true;
  4875. }
  4876. }
  4877. }
  4878. else if (isChange[i])
  4879. {
  4880. isChange[i] = false;
  4881. gHandL[i].GetComponent<Renderer>().enabled = false;
  4882. gArmL[i].GetComponent<Renderer>().enabled = false;
  4883. gFootL[i].GetComponent<Renderer>().enabled = false;
  4884. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4885. gHandR[i].GetComponent<Renderer>().enabled = false;
  4886. gArmR[i].GetComponent<Renderer>().enabled = false;
  4887. gFootR[i].GetComponent<Renderer>().enabled = false;
  4888. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4889. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4890. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4891. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4892. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4893. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4894. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4895. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4896. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4897. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4898. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4899. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4900. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4901. gNeck[i].SetActive(false);
  4902. gSpine[i].SetActive(false);
  4903. gSpine0a[i].SetActive(false);
  4904. gSpine1a[i].SetActive(false);
  4905. gSpine1[i].SetActive(false);
  4906. gPelvis[i].SetActive(false);
  4907. gizmoHandL[i].Visible = false;
  4908. gizmoHandR[i].Visible = false;
  4909. gizmoFootL[i].Visible = false;
  4910. gizmoFootR[i].Visible = false;
  4911. gizmoNeck[i].Visible = false;
  4912. gizmoPelvis[i].Visible = false;
  4913. }
  4914. if (flag13)
  4915. {
  4916. mHandL[i].initFlg = false;
  4917. mHandR[i].initFlg = false;
  4918. mFootL[i].initFlg = false;
  4919. mFootR[i].initFlg = false;
  4920. }
  4921. }
  4922. ikModeOld[i] = ikMode[i];
  4923. bool flag14 = false;
  4924. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4925. {
  4926. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4927. {
  4928. for (int k = 0; k < 10; k++)
  4929. {
  4930. maid.transform.RotateAround(maid.transform.position,
  4931. Vector3.right,
  4932. -maid.transform.rotation.eulerAngles.x);
  4933. maid.transform.RotateAround(maid.transform.position,
  4934. Vector3.forward,
  4935. -maid.transform.rotation.eulerAngles.z);
  4936. }
  4937. flag14 = true;
  4938. }
  4939. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4940. {
  4941. maid.transform.RotateAround(maid.transform.position,
  4942. new Vector3(vector3.x, 0f, vector3.z),
  4943. 0.3f);
  4944. maid.transform.RotateAround(maid.transform.position,
  4945. new Vector3(vector2.x, 0f, vector2.z),
  4946. 0.3f);
  4947. flag14 = true;
  4948. }
  4949. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4950. {
  4951. maid.transform.RotateAround(maid.transform.position,
  4952. new Vector3(vector3.x, 0f, vector3.z),
  4953. 0.3f);
  4954. maid.transform.RotateAround(maid.transform.position,
  4955. new Vector3(vector2.x, 0f, vector2.z),
  4956. -0.3f);
  4957. flag14 = true;
  4958. }
  4959. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4960. {
  4961. maid.transform.RotateAround(maid.transform.position,
  4962. new Vector3(vector3.x, 0f, vector3.z),
  4963. -0.3f);
  4964. maid.transform.RotateAround(maid.transform.position,
  4965. new Vector3(vector2.x, 0f, vector2.z),
  4966. 0.3f);
  4967. flag14 = true;
  4968. }
  4969. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4970. {
  4971. maid.transform.RotateAround(maid.transform.position,
  4972. new Vector3(vector3.x, 0f, vector3.z),
  4973. -0.3f);
  4974. maid.transform.RotateAround(maid.transform.position,
  4975. new Vector3(vector2.x, 0f, vector2.z),
  4976. -0.3f);
  4977. flag14 = true;
  4978. }
  4979. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4980. {
  4981. maid.transform.RotateAround(maid.transform.position,
  4982. new Vector3(vector3.x, 0f, vector3.z),
  4983. 0.4f);
  4984. flag14 = true;
  4985. }
  4986. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4987. {
  4988. maid.transform.RotateAround(maid.transform.position,
  4989. new Vector3(vector3.x, 0f, vector3.z),
  4990. -0.4f);
  4991. flag14 = true;
  4992. }
  4993. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4994. {
  4995. maid.transform.RotateAround(maid.transform.position,
  4996. new Vector3(vector2.x, 0f, vector2.z),
  4997. 0.4f);
  4998. flag14 = true;
  4999. }
  5000. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  5001. {
  5002. maid.transform.RotateAround(maid.transform.position,
  5003. new Vector3(vector2.x, 0f, vector2.z),
  5004. -0.4f);
  5005. flag14 = true;
  5006. }
  5007. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  5008. {
  5009. maid.body0.transform.localRotation =
  5010. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5011. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5012. flag14 = true;
  5013. }
  5014. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5015. {
  5016. maid.body0.transform.localRotation =
  5017. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5018. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5019. flag14 = true;
  5020. }
  5021. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5022. {
  5023. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5024. flag14 = true;
  5025. }
  5026. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5027. {
  5028. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5029. flag14 = true;
  5030. }
  5031. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5032. {
  5033. Vector3 vector = maid.transform.position;
  5034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5035. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5036. maid.SetPos(vector);
  5037. flag14 = true;
  5038. }
  5039. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5040. {
  5041. Vector3 vector = maid.transform.position;
  5042. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5043. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5044. maid.SetPos(vector);
  5045. flag14 = true;
  5046. }
  5047. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5048. {
  5049. Vector3 vector = maid.transform.position;
  5050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5052. maid.SetPos(vector);
  5053. flag14 = true;
  5054. }
  5055. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5056. {
  5057. Vector3 vector = maid.transform.position;
  5058. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5059. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5060. maid.SetPos(vector);
  5061. flag14 = true;
  5062. }
  5063. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5064. {
  5065. Vector3 vector = maid.transform.position;
  5066. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5067. maid.SetPos(vector);
  5068. flag14 = true;
  5069. }
  5070. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5071. {
  5072. Vector3 vector = maid.transform.position;
  5073. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5074. maid.SetPos(vector);
  5075. flag14 = true;
  5076. }
  5077. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5078. {
  5079. Vector3 vector = maid.transform.position;
  5080. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5081. maid.SetPos(vector);
  5082. flag14 = true;
  5083. }
  5084. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5085. {
  5086. Vector3 vector = maid.transform.position;
  5087. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5088. maid.SetPos(vector);
  5089. flag14 = true;
  5090. }
  5091. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5092. {
  5093. Vector3 vector = maid.transform.position;
  5094. vector.y += 0.0075f * speed;
  5095. maid.SetPos(vector);
  5096. flag14 = true;
  5097. }
  5098. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5099. {
  5100. Vector3 vector = maid.transform.position;
  5101. vector.y -= 0.0075f * speed;
  5102. maid.SetPos(vector);
  5103. flag14 = true;
  5104. }
  5105. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5106. {
  5107. maid.transform.localScale =
  5108. new Vector3(maid.transform.localScale.x * 1.005f,
  5109. maid.transform.localScale.y * 1.005f,
  5110. maid.transform.localScale.z * 1.005f);
  5111. flag14 = true;
  5112. }
  5113. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5114. {
  5115. maid.transform.localScale =
  5116. new Vector3(maid.transform.localScale.x * 0.995f,
  5117. maid.transform.localScale.y * 0.995f,
  5118. maid.transform.localScale.z * 0.995f);
  5119. flag14 = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5122. {
  5123. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5124. flag14 = true;
  5125. }
  5126. }
  5127. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5128. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5129. && i == ikMaid)
  5130. {
  5131. if (Input.GetKey(KeyCode.I))
  5132. {
  5133. if (ikMode[i] == 0)
  5134. {
  5135. Vector3 vector5 = HandL.position;
  5136. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5137. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5138. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5139. }
  5140. else if (ikMode[i] == 2)
  5141. {
  5142. Vector3 vector5 = HandL.position;
  5143. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5144. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5145. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5146. }
  5147. else if (ikMode[i] == 3)
  5148. {
  5149. if (ikBui == 1 || ikBui == 2)
  5150. {
  5151. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5152. }
  5153. else
  5154. {
  5155. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5156. }
  5157. }
  5158. else if (ikMode[i] == 4)
  5159. {
  5160. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5161. }
  5162. else if (ikMode[i] == 8)
  5163. {
  5164. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5165. }
  5166. else if (ikMode[i] == 6)
  5167. {
  5168. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5169. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5170. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5171. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5172. }
  5173. else if (ikMode[i] == 7)
  5174. {
  5175. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5176. }
  5177. else if (ikMode[i] == 5)
  5178. {
  5179. Vector3 vector5 = ForearmL.position;
  5180. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5181. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5182. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5183. }
  5184. else
  5185. {
  5186. Vector3 vector5 = ForearmL.position;
  5187. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5188. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5189. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5190. }
  5191. isStop[i] = true;
  5192. isLock[i] = true;
  5193. }
  5194. else if (Input.GetKey(KeyCode.K))
  5195. {
  5196. if (ikMode[i] == 0)
  5197. {
  5198. Vector3 vector5 = HandL.position;
  5199. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5200. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5201. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5202. }
  5203. else if (ikMode[i] == 2)
  5204. {
  5205. Vector3 vector5 = HandL.position;
  5206. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5207. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5208. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5209. }
  5210. else if (ikMode[i] == 3)
  5211. {
  5212. if (ikBui == 1 || ikBui == 2)
  5213. {
  5214. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5215. }
  5216. else
  5217. {
  5218. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5219. }
  5220. }
  5221. else if (ikMode[i] == 4)
  5222. {
  5223. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5224. }
  5225. else if (ikMode[i] == 8)
  5226. {
  5227. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5228. }
  5229. else if (ikMode[i] == 6)
  5230. {
  5231. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5232. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5233. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5234. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5235. }
  5236. else if (ikMode[i] == 7)
  5237. {
  5238. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5239. }
  5240. else if (ikMode[i] == 5)
  5241. {
  5242. Vector3 vector5 = ForearmL.position;
  5243. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5244. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5245. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5246. }
  5247. else
  5248. {
  5249. Vector3 vector5 = ForearmL.position;
  5250. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5251. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5252. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5253. }
  5254. isStop[i] = true;
  5255. isLock[i] = true;
  5256. }
  5257. else if (Input.GetKey(KeyCode.J))
  5258. {
  5259. if (ikMode[i] == 0)
  5260. {
  5261. Vector3 vector5 = HandL.position;
  5262. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5263. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5264. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5265. }
  5266. else if (ikMode[i] == 2)
  5267. {
  5268. Vector3 vector5 = HandL.position;
  5269. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5270. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5271. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5272. }
  5273. else if (ikMode[i] == 3)
  5274. {
  5275. if (ikBui == 1 || ikBui == 2)
  5276. {
  5277. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5278. }
  5279. else
  5280. {
  5281. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5282. }
  5283. }
  5284. else if (ikMode[i] == 4)
  5285. {
  5286. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5287. }
  5288. else if (ikMode[i] == 8)
  5289. {
  5290. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5291. }
  5292. else if (ikMode[i] == 6)
  5293. {
  5294. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5295. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5296. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5297. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5298. }
  5299. else if (ikMode[i] == 7)
  5300. {
  5301. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5302. }
  5303. else if (ikMode[i] == 5)
  5304. {
  5305. Vector3 vector5 = ForearmL.position;
  5306. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5307. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5308. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5309. }
  5310. else
  5311. {
  5312. Vector3 vector5 = ForearmL.position;
  5313. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5314. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5315. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5316. }
  5317. isStop[i] = true;
  5318. isLock[i] = true;
  5319. }
  5320. else if (Input.GetKey(KeyCode.L))
  5321. {
  5322. if (ikMode[i] == 0)
  5323. {
  5324. Vector3 vector5 = HandL.position;
  5325. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5326. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5327. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5328. }
  5329. else if (ikMode[i] == 2)
  5330. {
  5331. Vector3 vector5 = HandL.position;
  5332. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5333. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5334. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5335. }
  5336. else if (ikMode[i] == 3)
  5337. {
  5338. if (ikBui == 1 || ikBui == 2)
  5339. {
  5340. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5341. }
  5342. else
  5343. {
  5344. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5345. }
  5346. }
  5347. else if (ikMode[i] == 4)
  5348. {
  5349. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5350. }
  5351. else if (ikMode[i] == 8)
  5352. {
  5353. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5354. }
  5355. else if (ikMode[i] == 6)
  5356. {
  5357. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5358. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5359. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5360. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5361. }
  5362. else if (ikMode[i] == 7)
  5363. {
  5364. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5365. }
  5366. else if (ikMode[i] == 5)
  5367. {
  5368. Vector3 vector5 = ForearmL.position;
  5369. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5370. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5371. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5372. }
  5373. else
  5374. {
  5375. Vector3 vector5 = ForearmL.position;
  5376. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5377. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5378. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5379. }
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (Input.GetKey(KeyCode.U))
  5384. {
  5385. if (ikMode[i] == 3)
  5386. {
  5387. HandL.localRotation =
  5388. Quaternion.Euler(HandL.localEulerAngles)
  5389. * Quaternion.AngleAxis(1f, Vector3.right);
  5390. isStop[i] = true;
  5391. isLock[i] = true;
  5392. }
  5393. else if (ikMode[i] == 4)
  5394. {
  5395. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5396. isStop[i] = true;
  5397. isLock[i] = true;
  5398. }
  5399. else if (ikMode[i] == 8)
  5400. {
  5401. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5402. isStop[i] = true;
  5403. isLock[i] = true;
  5404. }
  5405. else if (ikMode[i] == 6)
  5406. {
  5407. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5408. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5409. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5410. isStop[i] = true;
  5411. isLock[i] = true;
  5412. }
  5413. else if (ikMode[i] == 7)
  5414. {
  5415. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5416. isStop[i] = true;
  5417. isLock[i] = true;
  5418. }
  5419. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5420. {
  5421. UpperArmL.localRotation =
  5422. Quaternion.Euler(UpperArmL.localEulerAngles)
  5423. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5424. isStop[i] = true;
  5425. isLock[i] = true;
  5426. }
  5427. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5428. {
  5429. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5430. isStop[i] = true;
  5431. isLock[i] = true;
  5432. }
  5433. }
  5434. else if (Input.GetKey(KeyCode.O))
  5435. {
  5436. if (ikMode[i] == 3)
  5437. {
  5438. HandL.localRotation =
  5439. Quaternion.Euler(HandL.localEulerAngles)
  5440. * Quaternion.AngleAxis(-1f, Vector3.right);
  5441. isStop[i] = true;
  5442. isLock[i] = true;
  5443. }
  5444. else if (ikMode[i] == 4)
  5445. {
  5446. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5447. isStop[i] = true;
  5448. isLock[i] = true;
  5449. }
  5450. else if (ikMode[i] == 8)
  5451. {
  5452. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5453. isStop[i] = true;
  5454. isLock[i] = true;
  5455. }
  5456. else if (ikMode[i] == 6)
  5457. {
  5458. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5459. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5460. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5461. isStop[i] = true;
  5462. isLock[i] = true;
  5463. }
  5464. else if (ikMode[i] == 7)
  5465. {
  5466. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5467. isStop[i] = true;
  5468. isLock[i] = true;
  5469. }
  5470. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5471. {
  5472. UpperArmL.localRotation =
  5473. Quaternion.Euler(UpperArmL.localEulerAngles)
  5474. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5475. isStop[i] = true;
  5476. isLock[i] = true;
  5477. }
  5478. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5479. {
  5480. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5481. isStop[i] = true;
  5482. isLock[i] = true;
  5483. }
  5484. }
  5485. else if (Input.GetKey(KeyCode.Alpha0))
  5486. {
  5487. if (ikMode[i] == 0)
  5488. {
  5489. Vector3 vector5 = HandL.position;
  5490. vector5.y += 0.005f;
  5491. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5492. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5493. }
  5494. else if (ikMode[i] == 2)
  5495. {
  5496. Vector3 vector5 = HandL.position;
  5497. vector5.y += 0.005f;
  5498. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5499. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5500. }
  5501. else if (ikMode[i] == 5)
  5502. {
  5503. Vector3 vector5 = ForearmL.position;
  5504. vector5.y += 0.0035f;
  5505. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5506. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5507. }
  5508. else
  5509. {
  5510. Vector3 vector5 = ForearmL.position;
  5511. vector5.y += 0.0035f;
  5512. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5513. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5514. }
  5515. isStop[i] = true;
  5516. isLock[i] = true;
  5517. }
  5518. else if (Input.GetKey(KeyCode.P))
  5519. {
  5520. if (ikMode[i] == 0)
  5521. {
  5522. Vector3 vector5 = HandL.position;
  5523. vector5.y -= 0.005f;
  5524. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5525. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5526. }
  5527. else if (ikMode[i] == 2)
  5528. {
  5529. Vector3 vector5 = HandL.position;
  5530. vector5.y -= 0.005f;
  5531. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5532. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5533. }
  5534. else if (ikMode[i] == 5)
  5535. {
  5536. Vector3 vector5 = ForearmL.position;
  5537. vector5.y -= 0.0035f;
  5538. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5539. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5540. }
  5541. else
  5542. {
  5543. Vector3 vector5 = ForearmL.position;
  5544. vector5.y -= 0.0035f;
  5545. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5546. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5547. }
  5548. isStop[i] = true;
  5549. isLock[i] = true;
  5550. }
  5551. }
  5552. }
  5553. }
  5554. }
  5555. }
  5556. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5557. {
  5558. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5559. idoFlg[i] = true;
  5560. }
  5561. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5562. {
  5563. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5564. idoFlg[i] = true;
  5565. }
  5566. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5567. {
  5568. if (!xFlg[i])
  5569. {
  5570. xFlg[i] = true;
  5571. zFlg[i] = false;
  5572. if (maid.status.personal.uniqueName == "Pride")
  5573. {
  5574. string text = "s0_";
  5575. Random random = new Random();
  5576. int num4 = random.Next(10000);
  5577. bool flag7 = false;
  5578. for (int k = 0; k < tunArray.Length; k++)
  5579. {
  5580. if (tunArray[k] == num4)
  5581. {
  5582. flag7 = true;
  5583. break;
  5584. }
  5585. }
  5586. if (!flag7)
  5587. {
  5588. text = text + "0" + num4.ToString() + ".ogg";
  5589. if (GameUty.FileSystem.IsExistentFile(text))
  5590. {
  5591. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5592. }
  5593. }
  5594. }
  5595. if (maid.status.personal.uniqueName == "Cool")
  5596. {
  5597. string text = "s1_";
  5598. Random random = new Random();
  5599. int num4 = random.Next(10000);
  5600. bool flag7 = false;
  5601. for (int k = 0; k < coolArray.Length; k++)
  5602. {
  5603. if (coolArray[k] == num4)
  5604. {
  5605. flag7 = true;
  5606. break;
  5607. }
  5608. }
  5609. if (!flag7)
  5610. {
  5611. text = text + "0" + num4.ToString() + ".ogg";
  5612. if (GameUty.FileSystem.IsExistentFile(text))
  5613. {
  5614. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5615. }
  5616. }
  5617. }
  5618. if (maid.status.personal.uniqueName == "Pure")
  5619. {
  5620. string text = "s2_";
  5621. Random random = new Random();
  5622. int num4 = random.Next(10000);
  5623. bool flag7 = false;
  5624. for (int k = 0; k < pureArray.Length; k++)
  5625. {
  5626. if (pureArray[k] == num4)
  5627. {
  5628. flag7 = true;
  5629. break;
  5630. }
  5631. }
  5632. if (!flag7)
  5633. {
  5634. text = text + "0" + num4.ToString() + ".ogg";
  5635. if (GameUty.FileSystem.IsExistentFile(text))
  5636. {
  5637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5638. }
  5639. }
  5640. }
  5641. if (maid.status.personal.uniqueName == "Yandere")
  5642. {
  5643. string text = "s3_";
  5644. Random random = new Random();
  5645. int num4 = random.Next(10000);
  5646. bool flag7 = false;
  5647. for (int k = 0; k < yanArray.Length; k++)
  5648. {
  5649. if (yanArray[k] == num4)
  5650. {
  5651. flag7 = true;
  5652. break;
  5653. }
  5654. }
  5655. if (!flag7)
  5656. {
  5657. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5658. if (GameUty.FileSystem.IsExistentFile(text))
  5659. {
  5660. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5661. }
  5662. }
  5663. }
  5664. if (maid.status.personal.uniqueName == "Muku")
  5665. {
  5666. string text = "h0_";
  5667. Random random = new Random();
  5668. int num4 = random.Next(10000);
  5669. bool flag7 = false;
  5670. for (int k = 0; k < h0Array.Length; k++)
  5671. {
  5672. if (h0Array[k] == num4)
  5673. {
  5674. flag7 = true;
  5675. break;
  5676. }
  5677. }
  5678. if (flag7)
  5679. {
  5680. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5681. if (GameUty.FileSystem.IsExistentFile(text))
  5682. {
  5683. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5684. }
  5685. }
  5686. }
  5687. if (maid.status.personal.uniqueName == "Majime")
  5688. {
  5689. string text = "h1_";
  5690. Random random = new Random();
  5691. int num4 = random.Next(10000);
  5692. bool flag7 = false;
  5693. for (int k = 0; k < h1Array.Length; k++)
  5694. {
  5695. if (h1Array[k] == num4)
  5696. {
  5697. flag7 = true;
  5698. break;
  5699. }
  5700. }
  5701. if (flag7)
  5702. {
  5703. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5704. if (GameUty.FileSystem.IsExistentFile(text))
  5705. {
  5706. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5707. }
  5708. }
  5709. }
  5710. if (maid.status.personal.uniqueName == "Rindere")
  5711. {
  5712. string text = "h2_";
  5713. Random random = new Random();
  5714. int num4 = random.Next(10000);
  5715. bool flag7 = false;
  5716. for (int k = 0; k < h2Array.Length; k++)
  5717. {
  5718. if (h2Array[k] == num4)
  5719. {
  5720. flag7 = true;
  5721. break;
  5722. }
  5723. }
  5724. if (flag7)
  5725. {
  5726. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5727. if (GameUty.FileSystem.IsExistentFile(text))
  5728. {
  5729. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5730. }
  5731. }
  5732. }
  5733. }
  5734. else
  5735. {
  5736. xFlg[i] = false;
  5737. maid.AudioMan.Clear();
  5738. }
  5739. idoFlg[i] = true;
  5740. }
  5741. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5742. {
  5743. if (!zFlg[i])
  5744. {
  5745. zFlg[i] = true;
  5746. xFlg[i] = false;
  5747. string text = "";
  5748. if (maid.status.personal.uniqueName == "Pride")
  5749. {
  5750. text = "s0_";
  5751. Random random = new Random();
  5752. int num4 = random.Next(tunArray.Length);
  5753. object obj = text;
  5754. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5755. }
  5756. if (maid.status.personal.uniqueName == "Cool")
  5757. {
  5758. text = "s1_";
  5759. Random random = new Random();
  5760. int num4 = random.Next(coolArray.Length);
  5761. object obj = text;
  5762. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5763. }
  5764. if (maid.status.personal.uniqueName == "Pure")
  5765. {
  5766. text = "s2_";
  5767. Random random = new Random();
  5768. int num4 = random.Next(pureArray.Length);
  5769. object obj = text;
  5770. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5771. }
  5772. if (maid.status.personal.uniqueName == "Yandere")
  5773. {
  5774. text = "s3_";
  5775. Random random = new Random();
  5776. int num4 = random.Next(yanArray.Length);
  5777. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5778. }
  5779. if (maid.status.personal.uniqueName == "Muku")
  5780. {
  5781. text = "h0_";
  5782. Random random = new Random();
  5783. int num4 = random.Next(h0tArray.Length);
  5784. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5785. }
  5786. if (maid.status.personal.uniqueName == "Majime")
  5787. {
  5788. text = "h1_";
  5789. Random random = new Random();
  5790. int num4 = random.Next(h1tArray.Length);
  5791. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5792. }
  5793. if (maid.status.personal.uniqueName == "Rindere")
  5794. {
  5795. text = "h2_";
  5796. Random random = new Random();
  5797. int num4 = random.Next(h2tArray.Length);
  5798. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5799. }
  5800. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5801. }
  5802. else
  5803. {
  5804. zFlg[i] = false;
  5805. maid.AudioMan.Clear();
  5806. }
  5807. idoFlg[i] = true;
  5808. }
  5809. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5810. {
  5811. string text = "";
  5812. if (maid.status.personal.uniqueName == "Pride")
  5813. {
  5814. text = "s0_";
  5815. Random random = new Random();
  5816. int num4 = random.Next(tunArray.Length);
  5817. object obj = text;
  5818. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5819. }
  5820. if (maid.status.personal.uniqueName == "Cool")
  5821. {
  5822. text = "s1_";
  5823. Random random = new Random();
  5824. int num4 = random.Next(coolArray.Length);
  5825. object obj = text;
  5826. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5827. }
  5828. if (maid.status.personal.uniqueName == "Pure")
  5829. {
  5830. text = "s2_";
  5831. Random random = new Random();
  5832. int num4 = random.Next(pureArray.Length);
  5833. object obj = text;
  5834. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5835. }
  5836. if (maid.status.personal.uniqueName == "Yandere")
  5837. {
  5838. text = "s3_";
  5839. Random random = new Random();
  5840. int num4 = random.Next(yanArray.Length);
  5841. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5842. }
  5843. if (maid.status.personal.uniqueName == "Muku")
  5844. {
  5845. text = "h0_";
  5846. Random random = new Random();
  5847. int num4 = random.Next(h0tArray.Length);
  5848. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5849. }
  5850. if (maid.status.personal.uniqueName == "Majime")
  5851. {
  5852. text = "h1_";
  5853. Random random = new Random();
  5854. int num4 = random.Next(h1tArray.Length);
  5855. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5856. }
  5857. if (maid.status.personal.uniqueName == "Rindere")
  5858. {
  5859. text = "h2_";
  5860. Random random = new Random();
  5861. int num4 = random.Next(h2tArray.Length);
  5862. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5863. }
  5864. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5865. idoFlg[i] = true;
  5866. }
  5867. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5868. {
  5869. if (maid.status.personal.uniqueName == "Pride")
  5870. {
  5871. string text = "s0_";
  5872. Random random = new Random();
  5873. int num4 = random.Next(10000);
  5874. bool flag7 = false;
  5875. for (int k = 0; k < tunArray.Length; k++)
  5876. {
  5877. if (tunArray[k] == num4)
  5878. {
  5879. flag7 = true;
  5880. break;
  5881. }
  5882. }
  5883. if (!flag7)
  5884. {
  5885. text = text + "0" + num4.ToString() + ".ogg";
  5886. if (GameUty.FileSystem.IsExistentFile(text))
  5887. {
  5888. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5889. }
  5890. }
  5891. }
  5892. if (maid.status.personal.uniqueName == "Cool")
  5893. {
  5894. string text = "s1_";
  5895. Random random = new Random();
  5896. int num4 = random.Next(10000);
  5897. bool flag7 = false;
  5898. for (int k = 0; k < coolArray.Length; k++)
  5899. {
  5900. if (coolArray[k] == num4)
  5901. {
  5902. flag7 = true;
  5903. break;
  5904. }
  5905. }
  5906. if (!flag7)
  5907. {
  5908. text = text + "0" + num4.ToString() + ".ogg";
  5909. if (GameUty.FileSystem.IsExistentFile(text))
  5910. {
  5911. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5912. }
  5913. }
  5914. }
  5915. if (maid.status.personal.uniqueName == "Pure")
  5916. {
  5917. string text = "s2_";
  5918. Random random = new Random();
  5919. int num4 = random.Next(10000);
  5920. bool flag7 = false;
  5921. for (int k = 0; k < pureArray.Length; k++)
  5922. {
  5923. if (pureArray[k] == num4)
  5924. {
  5925. flag7 = true;
  5926. break;
  5927. }
  5928. }
  5929. if (!flag7)
  5930. {
  5931. text = text + "0" + num4.ToString() + ".ogg";
  5932. if (GameUty.FileSystem.IsExistentFile(text))
  5933. {
  5934. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5935. }
  5936. }
  5937. }
  5938. if (maid.status.personal.uniqueName == "Yandere")
  5939. {
  5940. string text = "s3_";
  5941. Random random = new Random();
  5942. int num4 = random.Next(10000);
  5943. bool flag7 = false;
  5944. for (int k = 0; k < yanArray.Length; k++)
  5945. {
  5946. if (yanArray[k] == num4)
  5947. {
  5948. flag7 = true;
  5949. break;
  5950. }
  5951. }
  5952. if (!flag7)
  5953. {
  5954. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5955. if (GameUty.FileSystem.IsExistentFile(text))
  5956. {
  5957. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5958. }
  5959. }
  5960. }
  5961. if (maid.status.personal.uniqueName == "Muku")
  5962. {
  5963. string text = "h0_";
  5964. Random random = new Random();
  5965. int num4 = random.Next(10000);
  5966. bool flag7 = false;
  5967. for (int k = 0; k < h0Array.Length; k++)
  5968. {
  5969. if (h0Array[k] == num4)
  5970. {
  5971. flag7 = true;
  5972. break;
  5973. }
  5974. }
  5975. if (flag7)
  5976. {
  5977. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5978. if (GameUty.FileSystem.IsExistentFile(text))
  5979. {
  5980. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5981. }
  5982. }
  5983. }
  5984. if (maid.status.personal.uniqueName == "Majime")
  5985. {
  5986. string text = "h1_";
  5987. Random random = new Random();
  5988. int num4 = random.Next(10000);
  5989. bool flag7 = false;
  5990. for (int k = 0; k < h1Array.Length; k++)
  5991. {
  5992. if (h1Array[k] == num4)
  5993. {
  5994. flag7 = true;
  5995. break;
  5996. }
  5997. }
  5998. if (flag7)
  5999. {
  6000. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6001. if (GameUty.FileSystem.IsExistentFile(text))
  6002. {
  6003. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6004. }
  6005. }
  6006. }
  6007. if (maid.status.personal.uniqueName == "Rindere")
  6008. {
  6009. string text = "h2_";
  6010. Random random = new Random();
  6011. int num4 = random.Next(10000);
  6012. bool flag7 = false;
  6013. for (int k = 0; k < h2Array.Length; k++)
  6014. {
  6015. if (h2Array[k] == num4)
  6016. {
  6017. flag7 = true;
  6018. break;
  6019. }
  6020. }
  6021. if (flag7)
  6022. {
  6023. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6024. if (GameUty.FileSystem.IsExistentFile(text))
  6025. {
  6026. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6027. }
  6028. }
  6029. }
  6030. idoFlg[i] = true;
  6031. }
  6032. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6033. {
  6034. Vector3 vector = maid.transform.position;
  6035. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6036. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6037. maid.SetPos(vector);
  6038. idoFlg[i] = true;
  6039. }
  6040. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6041. {
  6042. Vector3 vector = maid.transform.position;
  6043. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6044. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6045. maid.SetPos(vector);
  6046. idoFlg[i] = true;
  6047. }
  6048. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6049. {
  6050. Vector3 vector = maid.transform.position;
  6051. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6053. maid.SetPos(vector);
  6054. idoFlg[i] = true;
  6055. }
  6056. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6057. {
  6058. Vector3 vector = maid.transform.position;
  6059. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6060. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6061. maid.SetPos(vector);
  6062. idoFlg[i] = true;
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6065. {
  6066. Vector3 vector = maid.transform.position;
  6067. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6068. maid.SetPos(vector);
  6069. idoFlg[i] = true;
  6070. }
  6071. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6072. {
  6073. Vector3 vector = maid.transform.position;
  6074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6075. maid.SetPos(vector);
  6076. idoFlg[i] = true;
  6077. }
  6078. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6079. {
  6080. Vector3 vector = maid.transform.position;
  6081. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6082. maid.SetPos(vector);
  6083. idoFlg[i] = true;
  6084. }
  6085. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6086. {
  6087. Vector3 vector = maid.transform.position;
  6088. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6089. maid.SetPos(vector);
  6090. idoFlg[i] = true;
  6091. }
  6092. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6093. {
  6094. Vector3 vector = maid.transform.position;
  6095. vector.y += 0.0075f * speed;
  6096. maid.SetPos(vector);
  6097. idoFlg[i] = true;
  6098. }
  6099. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6100. {
  6101. Vector3 vector = maid.transform.position;
  6102. vector.y -= 0.0075f * speed;
  6103. maid.SetPos(vector);
  6104. idoFlg[i] = true;
  6105. }
  6106. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6107. {
  6108. faceIndex[i]--;
  6109. if (faceIndex[i] <= -1)
  6110. {
  6111. faceIndex[i] = faceArray.Length - 1;
  6112. }
  6113. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6114. idoFlg[i] = true;
  6115. }
  6116. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6117. {
  6118. faceIndex[i]++;
  6119. if (faceIndex[i] == faceArray.Length)
  6120. {
  6121. faceIndex[i] = 0;
  6122. }
  6123. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6124. idoFlg[i] = true;
  6125. }
  6126. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6127. {
  6128. faceBlendIndex[i]++;
  6129. if (faceBlendIndex[i] == faceBlendArray.Length)
  6130. {
  6131. faceBlendIndex[i] = 0;
  6132. }
  6133. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6134. idoFlg[i] = true;
  6135. }
  6136. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6137. {
  6138. idoFlg[i] = true;
  6139. if (i >= 7)
  6140. {
  6141. idoFlg[i - 7] = true;
  6142. }
  6143. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6144. maid.transform.localScale.y * 1.005f,
  6145. maid.transform.localScale.z * 1.005f);
  6146. }
  6147. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6148. {
  6149. idoFlg[i] = true;
  6150. if (i >= 7)
  6151. {
  6152. idoFlg[i - 7] = true;
  6153. }
  6154. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6155. maid.transform.localScale.y * 0.995f,
  6156. maid.transform.localScale.z * 0.995f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6159. {
  6160. idoFlg[i] = true;
  6161. if (i >= 7)
  6162. {
  6163. idoFlg[i - 7] = true;
  6164. }
  6165. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6166. }
  6167. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6168. {
  6169. if (!isVR)
  6170. {
  6171. if (goSlot[(int)selectList[i]] != null)
  6172. {
  6173. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6174. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6175. {
  6176. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6177. }
  6178. }
  6179. }
  6180. maid.body0.SetMask(TBody.SlotID.wear, true);
  6181. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6182. maid.body0.SetMask(TBody.SlotID.bra, true);
  6183. maid.body0.SetMask(TBody.SlotID.panz, true);
  6184. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6185. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6186. isWear = true;
  6187. isSkirt = true;
  6188. isBra = true;
  6189. isPanz = true;
  6190. Random random = new Random();
  6191. int num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.wear, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isWear = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isSkirt = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.bra, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isBra = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.panz, false);
  6222. }
  6223. if (num4 == 1)
  6224. {
  6225. isPanz = false;
  6226. }
  6227. num4 = random.Next(2);
  6228. if (num4 == 1)
  6229. {
  6230. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6231. }
  6232. num4 = random.Next(2);
  6233. if (num4 == 1)
  6234. {
  6235. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6236. }
  6237. hFlg = true;
  6238. idoFlg[i] = true;
  6239. if (i >= 7)
  6240. {
  6241. idoFlg[i - 7] = true;
  6242. }
  6243. }
  6244. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6245. {
  6246. poseIndex[i]--;
  6247. if (poseIndex[i] <= -1)
  6248. {
  6249. poseIndex[i] = poseArray.Length - 1;
  6250. }
  6251. if (maid && maid.Visible)
  6252. {
  6253. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6254. isStop[i] = false;
  6255. poseCount[i] = 20;
  6256. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6257. {
  6258. maid.body0.MuneYureL(0f);
  6259. maid.body0.MuneYureR(0f);
  6260. }
  6261. else
  6262. {
  6263. maid.body0.MuneYureL(1f);
  6264. maid.body0.MuneYureR(1f);
  6265. }
  6266. if (array[0].Contains("MultipleMaidsPose"))
  6267. {
  6268. string path = array[0].Split(new char[] { '/' })[1];
  6269. byte[] array2 = new byte[0];
  6270. try
  6271. {
  6272. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6273. {
  6274. array2 = new byte[fileStream.Length];
  6275. fileStream.Read(array2, 0, array2.Length);
  6276. }
  6277. }
  6278. catch { }
  6279. if (0 < array2.Length)
  6280. {
  6281. string text = Path.GetFileName(path);
  6282. long num5 = text.GetHashCode();
  6283. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6284. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6285. {
  6286. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6287. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6288. };
  6289. for (int m = 0; m < array3.Length; m++)
  6290. {
  6291. maid.SetAutoTwist(array3[m], true);
  6292. }
  6293. }
  6294. }
  6295. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6296. {
  6297. loadPose[i] = array[0];
  6298. }
  6299. else if (!array[0].StartsWith("dance_"))
  6300. {
  6301. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6302. }
  6303. else
  6304. {
  6305. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6306. {
  6307. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6308. }
  6309. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6310. }
  6311. if (array.Length > 1)
  6312. {
  6313. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6314. isStop[i] = true;
  6315. if (array.Length > 2)
  6316. {
  6317. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6318. isPoseIti[i] = true;
  6319. poseIti[i] = maidArray[i].transform.position;
  6320. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6321. }
  6322. }
  6323. }
  6324. idoFlg[i] = true;
  6325. if (i >= 7)
  6326. {
  6327. idoFlg[i - 7] = true;
  6328. }
  6329. }
  6330. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6331. {
  6332. int num7 = poseIndex[i];
  6333. for (int k = 0; k < groupList.Count; k++)
  6334. {
  6335. if (poseIndex[i] < (int)groupList[k])
  6336. {
  6337. poseIndex[i] = (int)groupList[k];
  6338. break;
  6339. }
  6340. }
  6341. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6342. {
  6343. poseIndex[i] = 0;
  6344. }
  6345. if (maid && maid.Visible)
  6346. {
  6347. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6348. isStop[i] = false;
  6349. poseCount[i] = 20;
  6350. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6351. {
  6352. maid.body0.MuneYureL(0f);
  6353. maid.body0.MuneYureR(0f);
  6354. }
  6355. else
  6356. {
  6357. maid.body0.MuneYureL(1f);
  6358. maid.body0.MuneYureR(1f);
  6359. }
  6360. if (array[0].Contains("MultipleMaidsPose"))
  6361. {
  6362. string path = array[0].Split(new char[] { '/' })[1];
  6363. byte[] array2 = new byte[0];
  6364. try
  6365. {
  6366. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6367. {
  6368. array2 = new byte[fileStream.Length];
  6369. fileStream.Read(array2, 0, array2.Length);
  6370. }
  6371. }
  6372. catch { }
  6373. if (0 < array2.Length)
  6374. {
  6375. string text = Path.GetFileName(path);
  6376. long num5 = text.GetHashCode();
  6377. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6378. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6379. {
  6380. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6381. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6382. };
  6383. for (int m = 0; m < array3.Length; m++)
  6384. {
  6385. maid.SetAutoTwist(array3[m], true);
  6386. }
  6387. }
  6388. }
  6389. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6390. {
  6391. loadPose[i] = array[0];
  6392. }
  6393. else if (!array[0].StartsWith("dance_"))
  6394. {
  6395. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6396. }
  6397. else
  6398. {
  6399. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6400. {
  6401. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6402. }
  6403. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6404. }
  6405. if (array.Length > 1)
  6406. {
  6407. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6408. isStop[i] = true;
  6409. if (array.Length > 2)
  6410. {
  6411. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6412. isPoseIti[i] = true;
  6413. poseIti[i] = maidArray[i].transform.position;
  6414. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6415. }
  6416. }
  6417. }
  6418. idoFlg[i] = true;
  6419. if (i >= 7)
  6420. {
  6421. idoFlg[i - 7] = true;
  6422. }
  6423. }
  6424. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6425. {
  6426. for (int k = 0; k < groupList.Count; k++)
  6427. {
  6428. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6429. {
  6430. if (poseIndex[i] == 0)
  6431. {
  6432. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6433. }
  6434. else
  6435. {
  6436. poseIndex[i] = 0;
  6437. }
  6438. break;
  6439. }
  6440. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6441. {
  6442. poseIndex[i] = (int)groupList[k - 1];
  6443. break;
  6444. }
  6445. }
  6446. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6447. {
  6448. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6449. }
  6450. if (maid && maid.Visible)
  6451. {
  6452. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6453. isStop[i] = false;
  6454. poseCount[i] = 20;
  6455. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6456. {
  6457. maid.body0.MuneYureL(0f);
  6458. maid.body0.MuneYureR(0f);
  6459. }
  6460. else
  6461. {
  6462. maid.body0.MuneYureL(1f);
  6463. maid.body0.MuneYureR(1f);
  6464. }
  6465. if (array[0].Contains("MultipleMaidsPose"))
  6466. {
  6467. string path = array[0].Split(new char[] { '/' })[1];
  6468. byte[] array2 = new byte[0];
  6469. try
  6470. {
  6471. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6472. {
  6473. array2 = new byte[fileStream.Length];
  6474. fileStream.Read(array2, 0, array2.Length);
  6475. }
  6476. }
  6477. catch { }
  6478. if (0 < array2.Length)
  6479. {
  6480. string text = Path.GetFileName(path);
  6481. long num5 = text.GetHashCode();
  6482. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6483. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6484. {
  6485. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6486. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6487. };
  6488. for (int m = 0; m < array3.Length; m++)
  6489. {
  6490. maid.SetAutoTwist(array3[m], true);
  6491. }
  6492. }
  6493. }
  6494. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6495. {
  6496. loadPose[i] = array[0];
  6497. }
  6498. else if (!array[0].StartsWith("dance_"))
  6499. {
  6500. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6501. }
  6502. else
  6503. {
  6504. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6505. {
  6506. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6507. }
  6508. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6509. }
  6510. if (array.Length > 1)
  6511. {
  6512. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6513. isStop[i] = true;
  6514. if (array.Length > 2)
  6515. {
  6516. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6517. isPoseIti[i] = true;
  6518. poseIti[i] = maidArray[i].transform.position;
  6519. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6520. }
  6521. }
  6522. }
  6523. idoFlg[i] = true;
  6524. if (i >= 7)
  6525. {
  6526. idoFlg[i - 7] = true;
  6527. }
  6528. }
  6529. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6530. {
  6531. headEyeIndex[i]++;
  6532. if (headEyeIndex[i] == headEyeArray.Length)
  6533. {
  6534. headEyeIndex[i] = 0;
  6535. }
  6536. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6537. maid.body0.boHeadToCam = true;
  6538. maid.body0.boEyeToCam = true;
  6539. if (headEyeIndex[i] == 0)
  6540. {
  6541. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6542. maid.body0.boHeadToCam = true;
  6543. maid.body0.boEyeToCam = true;
  6544. }
  6545. else
  6546. {
  6547. maid.body0.trsLookTarget = null;
  6548. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6549. if (headEyeIndex[i] == 1)
  6550. {
  6551. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6552. }
  6553. if (headEyeIndex[i] == 2)
  6554. {
  6555. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6556. }
  6557. if (headEyeIndex[i] == 3)
  6558. {
  6559. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6560. }
  6561. if (headEyeIndex[i] == 4)
  6562. {
  6563. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6564. }
  6565. if (headEyeIndex[i] == 5)
  6566. {
  6567. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6568. }
  6569. if (headEyeIndex[i] == 6)
  6570. {
  6571. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6572. }
  6573. if (headEyeIndex[i] == 7)
  6574. {
  6575. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6576. }
  6577. if (headEyeIndex[i] == 8)
  6578. {
  6579. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6580. }
  6581. if (headEyeIndex[i] == 9)
  6582. {
  6583. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6584. }
  6585. }
  6586. idoFlg[i] = true;
  6587. if (i >= 7)
  6588. {
  6589. idoFlg[i - 7] = true;
  6590. }
  6591. }
  6592. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6593. {
  6594. idoFlg[i] = true;
  6595. if (i >= 7)
  6596. {
  6597. idoFlg[i - 7] = true;
  6598. }
  6599. }
  6600. else if (Input.GetKeyUp(key))
  6601. {
  6602. if (idoFlg[i])
  6603. {
  6604. idoFlg[i] = false;
  6605. }
  6606. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6607. {
  6608. if (!isLock[i])
  6609. {
  6610. poseIndex[i]++;
  6611. if (poseIndex[i] == poseArray.Length)
  6612. {
  6613. poseIndex[i] = 0;
  6614. }
  6615. if (maid && maid.Visible)
  6616. {
  6617. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6618. isStop[i] = false;
  6619. poseCount[i] = 20;
  6620. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6621. {
  6622. maid.body0.MuneYureL(0f);
  6623. maid.body0.MuneYureR(0f);
  6624. }
  6625. else
  6626. {
  6627. maid.body0.MuneYureL(1f);
  6628. maid.body0.MuneYureR(1f);
  6629. }
  6630. if (array[0].Contains("MultipleMaidsPose"))
  6631. {
  6632. string path = array[0].Split(new char[] { '/' })[1];
  6633. byte[] array2 = new byte[0];
  6634. try
  6635. {
  6636. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6637. {
  6638. array2 = new byte[fileStream.Length];
  6639. fileStream.Read(array2, 0, array2.Length);
  6640. }
  6641. }
  6642. catch { }
  6643. if (0 < array2.Length)
  6644. {
  6645. string text = Path.GetFileName(path);
  6646. long num5 = text.GetHashCode();
  6647. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6648. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6649. {
  6650. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6651. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6652. };
  6653. for (int m = 0; m < array3.Length; m++)
  6654. {
  6655. maid.SetAutoTwist(array3[m], true);
  6656. }
  6657. }
  6658. }
  6659. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6660. {
  6661. loadPose[i] = array[0];
  6662. }
  6663. else if (!array[0].StartsWith("dance_"))
  6664. {
  6665. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6666. }
  6667. else
  6668. {
  6669. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6670. {
  6671. maid.body0.LoadAnime(array[0] + ".anm",
  6672. GameUty.FileSystem,
  6673. array[0] + ".anm",
  6674. false,
  6675. false);
  6676. }
  6677. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6678. }
  6679. if (array.Length > 1)
  6680. {
  6681. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6682. isStop[i] = true;
  6683. if (array.Length > 2)
  6684. {
  6685. Transform transform2 =
  6686. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6687. isPoseIti[i] = true;
  6688. poseIti[i] = maidArray[i].transform.position;
  6689. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6690. }
  6691. }
  6692. }
  6693. }
  6694. }
  6695. }
  6696. goto IL_1688E;
  6697. }
  6698. }
  6699. if (Input.GetKeyDown(KeyCode.E)) { }
  6700. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6701. {
  6702. bGui = false;
  6703. }
  6704. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6705. {
  6706. sceneFlg = true;
  6707. bGui = true;
  6708. if (!sceneManagerInitialize) InitializeSceneManager();
  6709. }
  6710. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6711. {
  6712. bgmIndex--;
  6713. if (bgmIndex <= -1)
  6714. {
  6715. bgmIndex = bgmArray.Length - 1;
  6716. }
  6717. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6718. bgmCombo.selectedItemIndex = bgmIndex;
  6719. }
  6720. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6721. {
  6722. bgmIndex++;
  6723. if (bgmIndex == bgmArray.Length)
  6724. {
  6725. bgmIndex = 0;
  6726. }
  6727. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6728. bgmCombo.selectedItemIndex = bgmIndex;
  6729. }
  6730. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6731. {
  6732. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6733. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6734. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6735. if (isMessage)
  6736. {
  6737. isMessage = false;
  6738. messageWindowMgr.CloseMessageWindowPanel();
  6739. }
  6740. else if (!bGuiMessage)
  6741. {
  6742. bGuiMessage = true;
  6743. }
  6744. else
  6745. {
  6746. bGuiMessage = false;
  6747. isMessage = false;
  6748. messageWindowMgr.CloseMessageWindowPanel();
  6749. }
  6750. }
  6751. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6752. {
  6753. escFlg = true;
  6754. for (int j = 0; j < maidCnt; j++)
  6755. {
  6756. if (maidArray[j] && maidArray[j].Visible)
  6757. {
  6758. maidArray[j].StopKuchipakuPattern();
  6759. if (isDanceStart7V)
  6760. {
  6761. maidArray[j].SetPos(dancePos[j]);
  6762. maidArray[j].body0.transform.localRotation = danceRot[j];
  6763. }
  6764. if (isDanceStart8V)
  6765. {
  6766. maidArray[j].SetPos(dancePos[j]);
  6767. maidArray[j].body0.transform.localRotation = danceRot[j];
  6768. }
  6769. if (isDanceStart11V)
  6770. {
  6771. maidArray[j].SetPos(dancePos[j]);
  6772. maidArray[j].body0.transform.localRotation = danceRot[j];
  6773. }
  6774. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6775. || isDanceStart13K)
  6776. {
  6777. maidArray[j].SetPos(dancePos[j]);
  6778. maidArray[j].body0.transform.localRotation = danceRot[j];
  6779. int i = j;
  6780. if (!isVR)
  6781. {
  6782. delCount[i] = 20;
  6783. if (goSlot[(int)selectList[i]] != null)
  6784. {
  6785. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6786. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6787. {
  6788. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6789. }
  6790. }
  6791. }
  6792. Maid maid = maidArray[j];
  6793. maid.DelProp(MPN.handitem, true);
  6794. maid.DelProp(MPN.accvag, true);
  6795. maid.DelProp(MPN.accanl, true);
  6796. maid.DelProp(MPN.kousoku_upper, true);
  6797. maid.DelProp(MPN.kousoku_lower, true);
  6798. maid.AllProcPropSeqStart();
  6799. }
  6800. if (isDanceStart14V)
  6801. {
  6802. maidArray[j].SetPos(dancePos[j]);
  6803. maidArray[j].body0.transform.localRotation = danceRot[j];
  6804. }
  6805. if (isDanceStart15V)
  6806. {
  6807. maidArray[j].SetPos(dancePos[j]);
  6808. maidArray[j].body0.transform.localRotation = danceRot[j];
  6809. }
  6810. }
  6811. }
  6812. isDanceStart1F = false;
  6813. isDanceStart1K = false;
  6814. isDanceStart2F = false;
  6815. isDanceStart3F = false;
  6816. isDanceStart3K = false;
  6817. isDanceStart4F = false;
  6818. isDanceStart4K = false;
  6819. isDanceStart5F = false;
  6820. isDanceStart5K = false;
  6821. isDanceStart6F = false;
  6822. isDanceStart6K = false;
  6823. isDanceStart7F = false;
  6824. isDanceStart7V = false;
  6825. isDanceStart8F = false;
  6826. isDanceStart8V = false;
  6827. isDanceStart8P = false;
  6828. isDanceStart9F = false;
  6829. isDanceStart9K = false;
  6830. isDanceStart10F = false;
  6831. isDanceStart11F = false;
  6832. isDanceStart11V = false;
  6833. isDanceStart12F = false;
  6834. isDanceStart13F = false;
  6835. isDanceStart13K = false;
  6836. isDanceStart14F = false;
  6837. isDanceStart14V = false;
  6838. isDanceStart15F = false;
  6839. isDanceStart15V = false;
  6840. for (int j = 0; j < maidCnt; j++)
  6841. {
  6842. danceFace[j] = 0f;
  6843. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6844. maidArray[j].SetAutoTwistAll(true);
  6845. }
  6846. danceCheckIndex = 0;
  6847. for (int k = 0; k < danceCheck.Length; k++)
  6848. {
  6849. danceCheck[danceCheckIndex] = 1f;
  6850. }
  6851. isDance = false;
  6852. isDanceChu = false;
  6853. if (maidArray[1] && maidArray[1].Visible)
  6854. {
  6855. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6856. {
  6857. Vector3 vector = Vector3.zero;
  6858. vector.x = 0.6f;
  6859. maidArray[1].SetPos(vector);
  6860. if (maidArray[2] && maidArray[2].Visible)
  6861. {
  6862. vector.x = -0.6f;
  6863. maidArray[2].SetPos(vector);
  6864. }
  6865. if (maidArray[3] && maidArray[3].Visible)
  6866. {
  6867. vector.x = 1.2f;
  6868. maidArray[3].SetPos(vector);
  6869. }
  6870. if (maidArray[4] && maidArray[4].Visible)
  6871. {
  6872. vector.x = -1.2f;
  6873. maidArray[4].SetPos(vector);
  6874. }
  6875. if (maidArray[5] && maidArray[5].Visible)
  6876. {
  6877. vector.x = 1.8f;
  6878. maidArray[5].SetPos(vector);
  6879. }
  6880. if (maidArray[6] && maidArray[6].Visible)
  6881. {
  6882. vector.x = -1.8f;
  6883. maidArray[6].SetPos(vector);
  6884. }
  6885. if (maidArray[7] && maidArray[7].Visible)
  6886. {
  6887. vector.x = 2.4f;
  6888. maidArray[7].SetPos(vector);
  6889. }
  6890. if (maidArray[8] && maidArray[8].Visible)
  6891. {
  6892. vector.x = -2.4f;
  6893. maidArray[8].SetPos(vector);
  6894. }
  6895. if (maidArray[9] && maidArray[9].Visible)
  6896. {
  6897. vector.x = 3f;
  6898. maidArray[9].SetPos(vector);
  6899. }
  6900. if (maidArray[10] && maidArray[10].Visible)
  6901. {
  6902. vector.x = -3f;
  6903. maidArray[10].SetPos(vector);
  6904. }
  6905. if (maidArray[11] && maidArray[11].Visible)
  6906. {
  6907. vector.x = 3.6f;
  6908. maidArray[11].SetPos(vector);
  6909. }
  6910. if (maidArray[12] && maidArray[12].Visible)
  6911. {
  6912. vector.x = -3.6f;
  6913. maidArray[12].SetPos(vector);
  6914. }
  6915. if (maidArray[13] && maidArray[13].Visible)
  6916. {
  6917. vector.x = 4.2f;
  6918. maidArray[13].SetPos(vector);
  6919. }
  6920. }
  6921. }
  6922. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6923. }
  6924. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6925. {
  6926. if (isScript)
  6927. {
  6928. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6929. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6930. if (isPanel)
  6931. {
  6932. isPanel = false;
  6933. }
  6934. else
  6935. {
  6936. isPanel = true;
  6937. }
  6938. gameObject5.SetActive(isPanel);
  6939. }
  6940. else
  6941. {
  6942. bGui = !bGui;
  6943. }
  6944. }
  6945. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6946. {
  6947. keyFlg = true;
  6948. bgIndex--;
  6949. if (bgIndex <= -1)
  6950. {
  6951. bgIndex = bgArray.Length - 1;
  6952. }
  6953. if (!moveBg)
  6954. {
  6955. bg.localScale = new Vector3(1f, 1f, 1f);
  6956. if (bgArray[bgIndex].Length == 36)
  6957. {
  6958. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6959. }
  6960. else
  6961. {
  6962. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6963. }
  6964. bgCombo.selectedItemIndex = bgIndex;
  6965. if (bgArray[bgIndex] == "karaokeroom")
  6966. {
  6967. bg.transform.position = bgObject.transform.position;
  6968. Vector3 vector = Vector3.zero;
  6969. Vector3 zero3 = Vector3.zero;
  6970. zero3.y = 90f;
  6971. vector.z = 4f;
  6972. vector.x = 1f;
  6973. bg.transform.localPosition = vector;
  6974. bg.transform.localRotation = Quaternion.Euler(zero3);
  6975. }
  6976. }
  6977. }
  6978. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6979. {
  6980. keyFlg = true;
  6981. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6982. }
  6983. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6984. {
  6985. keyFlg = true;
  6986. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6987. }
  6988. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6989. {
  6990. keyFlg = true;
  6991. bg.localScale = new Vector3(1f, 1f, 1f);
  6992. }
  6993. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6994. {
  6995. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6996. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6997. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6998. Vector3 vector = bg.position;
  6999. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7000. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7001. bg.localPosition = vector;
  7002. if (Input.GetKey(KeyCode.Y))
  7003. {
  7004. keyFlg = true;
  7005. }
  7006. }
  7007. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7008. {
  7009. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7010. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7011. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7012. Vector3 vector = bg.position;
  7013. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7014. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7015. bg.localPosition = vector;
  7016. if (Input.GetKey(KeyCode.Y))
  7017. {
  7018. keyFlg = true;
  7019. }
  7020. }
  7021. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7022. {
  7023. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7024. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7025. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7026. Vector3 vector = bg.position;
  7027. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7028. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7029. bg.localPosition = vector;
  7030. if (Input.GetKey(KeyCode.Y))
  7031. {
  7032. keyFlg = true;
  7033. }
  7034. }
  7035. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7036. {
  7037. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7038. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7039. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7040. Vector3 vector = bg.position;
  7041. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7042. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7043. bg.localPosition = vector;
  7044. if (Input.GetKey(KeyCode.Y))
  7045. {
  7046. keyFlg = true;
  7047. }
  7048. }
  7049. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7050. {
  7051. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7052. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7053. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7054. Vector3 vector = bg.position;
  7055. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7056. bg.localPosition = vector;
  7057. if (Input.GetKey(KeyCode.Y))
  7058. {
  7059. keyFlg = true;
  7060. }
  7061. }
  7062. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7063. {
  7064. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7065. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7066. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7067. Vector3 vector = bg.position;
  7068. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7069. bg.localPosition = vector;
  7070. if (Input.GetKey(KeyCode.Y))
  7071. {
  7072. keyFlg = true;
  7073. }
  7074. }
  7075. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7076. {
  7077. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7078. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7079. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7080. Vector3 vector = bg.position;
  7081. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7082. bg.localPosition = vector;
  7083. if (Input.GetKey(KeyCode.Y))
  7084. {
  7085. keyFlg = true;
  7086. }
  7087. }
  7088. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7089. {
  7090. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7091. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7092. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7093. Vector3 vector = bg.position;
  7094. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7095. bg.localPosition = vector;
  7096. if (Input.GetKey(KeyCode.Y))
  7097. {
  7098. keyFlg = true;
  7099. }
  7100. }
  7101. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7102. {
  7103. Vector3 vector = bg.position;
  7104. vector.y -= 0.015f * speed;
  7105. bg.localPosition = vector;
  7106. if (Input.GetKey(KeyCode.Y))
  7107. {
  7108. keyFlg = true;
  7109. }
  7110. }
  7111. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7112. {
  7113. Vector3 vector = bg.position;
  7114. vector.y += 0.015f * speed;
  7115. bg.localPosition = vector;
  7116. if (Input.GetKey(KeyCode.Y))
  7117. {
  7118. keyFlg = true;
  7119. }
  7120. }
  7121. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7122. {
  7123. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7124. if (Input.GetKey(KeyCode.Y))
  7125. {
  7126. keyFlg = true;
  7127. }
  7128. }
  7129. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7130. {
  7131. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7132. if (Input.GetKey(KeyCode.Y))
  7133. {
  7134. keyFlg = true;
  7135. }
  7136. }
  7137. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7138. {
  7139. if (Input.GetKey(KeyCode.Y))
  7140. {
  7141. keyFlg = true;
  7142. }
  7143. }
  7144. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7145. {
  7146. if (keyFlg)
  7147. {
  7148. keyFlg = false;
  7149. }
  7150. else
  7151. {
  7152. bgIndex++;
  7153. if (bgIndex == bgArray.Length)
  7154. {
  7155. bgIndex = 0;
  7156. }
  7157. if (!moveBg)
  7158. {
  7159. bg.localScale = new Vector3(1f, 1f, 1f);
  7160. if (bgArray[bgIndex].Length == 36)
  7161. {
  7162. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7163. }
  7164. else
  7165. {
  7166. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7167. }
  7168. bgCombo.selectedItemIndex = bgIndex;
  7169. if (bgArray[bgIndex] == "karaokeroom")
  7170. {
  7171. bg.transform.position = bgObject.transform.position;
  7172. Vector3 vector = Vector3.zero;
  7173. Vector3 zero3 = Vector3.zero;
  7174. zero3.y = 90f;
  7175. vector.z = 4f;
  7176. vector.x = 1f;
  7177. bg.transform.localPosition = vector;
  7178. bg.transform.localRotation = Quaternion.Euler(zero3);
  7179. }
  7180. }
  7181. }
  7182. }
  7183. if (maidArray[0] != null && maidArray[0].Visible)
  7184. {
  7185. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7186. {
  7187. int[] array6 = new int[1];
  7188. int[] array7 = array6;
  7189. if (maidCnt == 2)
  7190. {
  7191. array7 = new int[] { 0, 1 };
  7192. }
  7193. if (maidCnt == 3)
  7194. {
  7195. array7 = new int[] { 0, 1, 2 };
  7196. }
  7197. if (maidCnt == 4)
  7198. {
  7199. array7 = new int[] { 0, 1, 2, 3 };
  7200. }
  7201. if (maidCnt == 5)
  7202. {
  7203. array7 = new int[] { 0, 1, 2, 3, 4 };
  7204. }
  7205. if (maidCnt == 6)
  7206. {
  7207. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7208. }
  7209. if (maidCnt == 7)
  7210. {
  7211. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7212. }
  7213. if (maidCnt == 8)
  7214. {
  7215. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7216. }
  7217. if (maidCnt == 9)
  7218. {
  7219. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7220. }
  7221. if (maidCnt == 10)
  7222. {
  7223. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7224. }
  7225. if (maidCnt == 11)
  7226. {
  7227. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7228. }
  7229. if (maidCnt == 12)
  7230. {
  7231. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7232. }
  7233. Random random = new Random();
  7234. int n = array7.Length;
  7235. while (n > 1)
  7236. {
  7237. n--;
  7238. int j = random.Next(n + 1);
  7239. int num8 = array7[j];
  7240. array7[j] = array7[n];
  7241. array7[n] = num8;
  7242. }
  7243. int[] array8 = new int[maidCnt];
  7244. Vector3[] array9 = new Vector3[maidCnt];
  7245. Vector3[] array10 = new Vector3[maidCnt];
  7246. int[] array11 = new int[maidCnt];
  7247. for (int i = 0; i < maidCnt; i++)
  7248. {
  7249. array8[array7[i]] = poseIndex[array7[i]];
  7250. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7251. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7252. array11[array7[i]] = headEyeIndex[array7[i]];
  7253. }
  7254. for (int i = 0; i < maidCnt; i++)
  7255. {
  7256. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7257. {
  7258. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7259. isStop[i] = false;
  7260. poseCount[i] = 20;
  7261. Maid maid = maidArray[i];
  7262. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7263. {
  7264. maid.body0.MuneYureL(0f);
  7265. maid.body0.MuneYureR(0f);
  7266. }
  7267. else
  7268. {
  7269. maid.body0.MuneYureL(1f);
  7270. maid.body0.MuneYureR(1f);
  7271. }
  7272. if (array12[0].Contains("MultipleMaidsPose"))
  7273. {
  7274. string path = array12[0].Split(new char[] { '/' })[1];
  7275. byte[] array2 = new byte[0];
  7276. try
  7277. {
  7278. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7279. {
  7280. array2 = new byte[fileStream.Length];
  7281. fileStream.Read(array2, 0, array2.Length);
  7282. }
  7283. }
  7284. catch { }
  7285. if (0 < array2.Length)
  7286. {
  7287. string text = Path.GetFileName(path);
  7288. long num5 = text.GetHashCode();
  7289. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7290. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7291. {
  7292. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7293. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7294. };
  7295. for (int m = 0; m < array3.Length; m++)
  7296. {
  7297. maid.SetAutoTwist(array3[m], true);
  7298. }
  7299. }
  7300. }
  7301. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7302. {
  7303. loadPose[i] = array12[0];
  7304. }
  7305. else if (!array12[0].StartsWith("dance_"))
  7306. {
  7307. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7308. }
  7309. else
  7310. {
  7311. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7312. {
  7313. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7314. GameUty.FileSystem,
  7315. array12[0] + ".anm",
  7316. false,
  7317. false);
  7318. }
  7319. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7320. }
  7321. if (array12.Length > 1)
  7322. {
  7323. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7324. float.Parse(array12[1]);
  7325. isStop[i] = true;
  7326. if (array12.Length > 2)
  7327. {
  7328. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7329. isPoseIti[i] = true;
  7330. poseIti[i] = maidArray[i].transform.position;
  7331. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7332. }
  7333. }
  7334. }
  7335. poseIndex[i] = array8[array7[i]];
  7336. maidArray[i].SetRot(array9[array7[i]]);
  7337. maidArray[i].SetPos(array10[array7[i]]);
  7338. headEyeIndex[i] = array11[array7[i]];
  7339. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7340. maidArray[i].body0.boHeadToCam = true;
  7341. maidArray[i].body0.boEyeToCam = true;
  7342. if (headEyeIndex[i] == 0)
  7343. {
  7344. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7345. maidArray[i].body0.boHeadToCam = true;
  7346. maidArray[i].body0.boEyeToCam = true;
  7347. }
  7348. else
  7349. {
  7350. maidArray[i].body0.trsLookTarget = null;
  7351. if (headEyeIndex[i] == 1)
  7352. {
  7353. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7354. }
  7355. if (headEyeIndex[i] == 2)
  7356. {
  7357. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7358. }
  7359. if (headEyeIndex[i] == 3)
  7360. {
  7361. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7362. }
  7363. if (headEyeIndex[i] == 4)
  7364. {
  7365. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7366. }
  7367. if (headEyeIndex[i] == 5)
  7368. {
  7369. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7370. }
  7371. if (headEyeIndex[i] == 6)
  7372. {
  7373. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7374. }
  7375. if (headEyeIndex[i] == 7)
  7376. {
  7377. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7378. }
  7379. if (headEyeIndex[i] == 8)
  7380. {
  7381. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7382. }
  7383. if (headEyeIndex[i] == 9)
  7384. {
  7385. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7386. }
  7387. }
  7388. }
  7389. }
  7390. else if (Input.GetKeyDown(KeyCode.Comma))
  7391. {
  7392. int[] array8 = new int[maidCnt];
  7393. Vector3[] array9 = new Vector3[maidCnt];
  7394. Vector3[] array10 = new Vector3[maidCnt];
  7395. int[] array11 = new int[maidCnt];
  7396. for (int i = 0; i < maidCnt; i++)
  7397. {
  7398. array8[i] = poseIndex[i];
  7399. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7400. array10[i] = maidArray[i].transform.position;
  7401. array11[i] = headEyeIndex[i];
  7402. }
  7403. for (int i = 0; i < maidCnt; i++)
  7404. {
  7405. if (i == 0)
  7406. {
  7407. if (!isLock[i])
  7408. {
  7409. if (maidArray[i] && maidArray[i].Visible)
  7410. {
  7411. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7412. isStop[i] = false;
  7413. poseCount[i] = 20;
  7414. Maid maid = maidArray[i];
  7415. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7416. {
  7417. maid.body0.MuneYureL(0f);
  7418. maid.body0.MuneYureR(0f);
  7419. }
  7420. else
  7421. {
  7422. maid.body0.MuneYureL(1f);
  7423. maid.body0.MuneYureR(1f);
  7424. }
  7425. if (array12[0].Contains("MultipleMaidsPose"))
  7426. {
  7427. string path = array12[0].Split(new char[] { '/' })[1];
  7428. byte[] array2 = new byte[0];
  7429. try
  7430. {
  7431. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7432. {
  7433. array2 = new byte[fileStream.Length];
  7434. fileStream.Read(array2, 0, array2.Length);
  7435. }
  7436. }
  7437. catch { }
  7438. if (0 < array2.Length)
  7439. {
  7440. string text = Path.GetFileName(path);
  7441. long num5 = text.GetHashCode();
  7442. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7443. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7444. {
  7445. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7446. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7447. };
  7448. for (int m = 0; m < array3.Length; m++)
  7449. {
  7450. maid.SetAutoTwist(array3[m], true);
  7451. }
  7452. }
  7453. }
  7454. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7455. {
  7456. loadPose[i] = array12[0];
  7457. }
  7458. else if (!array12[0].StartsWith("dance_"))
  7459. {
  7460. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7461. }
  7462. else
  7463. {
  7464. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7465. {
  7466. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7467. GameUty.FileSystem,
  7468. array12[0] + ".anm",
  7469. false,
  7470. false);
  7471. }
  7472. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7473. }
  7474. if (array12.Length > 1)
  7475. {
  7476. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7477. float.Parse(array12[1]);
  7478. isStop[i] = true;
  7479. if (array12.Length > 2)
  7480. {
  7481. Transform transform2 =
  7482. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7483. isPoseIti[i] = true;
  7484. poseIti[i] = maidArray[i].transform.position;
  7485. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7486. }
  7487. }
  7488. }
  7489. }
  7490. poseIndex[i] = array8[maidCnt - i - 1];
  7491. headEyeIndex[i] = array11[maidCnt - i - 1];
  7492. }
  7493. else
  7494. {
  7495. if (!isLock[i])
  7496. {
  7497. if (maidArray[i] && maidArray[i].Visible)
  7498. {
  7499. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7500. isStop[i] = false;
  7501. poseCount[i] = 20;
  7502. Maid maid = maidArray[i];
  7503. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7504. {
  7505. maid.body0.MuneYureL(0f);
  7506. maid.body0.MuneYureR(0f);
  7507. }
  7508. else
  7509. {
  7510. maid.body0.MuneYureL(1f);
  7511. maid.body0.MuneYureR(1f);
  7512. }
  7513. if (array12[0].Contains("MultipleMaidsPose"))
  7514. {
  7515. string path = array12[0].Split(new char[] { '/' })[1];
  7516. byte[] array2 = new byte[0];
  7517. try
  7518. {
  7519. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7520. {
  7521. array2 = new byte[fileStream.Length];
  7522. fileStream.Read(array2, 0, array2.Length);
  7523. }
  7524. }
  7525. catch { }
  7526. if (0 < array2.Length)
  7527. {
  7528. string text = Path.GetFileName(path);
  7529. long num5 = text.GetHashCode();
  7530. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7531. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7532. {
  7533. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7534. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7535. };
  7536. for (int m = 0; m < array3.Length; m++)
  7537. {
  7538. maid.SetAutoTwist(array3[m], true);
  7539. }
  7540. }
  7541. }
  7542. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7543. {
  7544. loadPose[i] = array12[0];
  7545. }
  7546. else if (!array12[0].StartsWith("dance_"))
  7547. {
  7548. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7549. }
  7550. else
  7551. {
  7552. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7553. {
  7554. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7555. GameUty.FileSystem,
  7556. array12[0] + ".anm",
  7557. false,
  7558. false);
  7559. }
  7560. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7561. }
  7562. if (array12.Length > 1)
  7563. {
  7564. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7565. float.Parse(array12[1]);
  7566. isStop[i] = true;
  7567. if (array12.Length > 2)
  7568. {
  7569. Transform transform2 =
  7570. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7571. isPoseIti[i] = true;
  7572. poseIti[i] = maidArray[i].transform.position;
  7573. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7574. }
  7575. }
  7576. }
  7577. }
  7578. poseIndex[i] = array8[i - 1];
  7579. headEyeIndex[i] = array11[i - 1];
  7580. }
  7581. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7582. maidArray[i].body0.boHeadToCam = true;
  7583. maidArray[i].body0.boEyeToCam = true;
  7584. if (headEyeIndex[i] == 0)
  7585. {
  7586. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7587. maidArray[i].body0.boHeadToCam = true;
  7588. maidArray[i].body0.boEyeToCam = true;
  7589. }
  7590. else
  7591. {
  7592. maidArray[i].body0.trsLookTarget = null;
  7593. if (headEyeIndex[i] == 1)
  7594. {
  7595. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7596. }
  7597. if (headEyeIndex[i] == 2)
  7598. {
  7599. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7600. }
  7601. if (headEyeIndex[i] == 3)
  7602. {
  7603. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7604. }
  7605. if (headEyeIndex[i] == 4)
  7606. {
  7607. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7608. }
  7609. if (headEyeIndex[i] == 5)
  7610. {
  7611. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7612. }
  7613. if (headEyeIndex[i] == 6)
  7614. {
  7615. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7616. }
  7617. if (headEyeIndex[i] == 7)
  7618. {
  7619. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7620. }
  7621. if (headEyeIndex[i] == 8)
  7622. {
  7623. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7624. }
  7625. if (headEyeIndex[i] == 9)
  7626. {
  7627. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7628. }
  7629. }
  7630. if (i == 0)
  7631. {
  7632. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7633. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7634. }
  7635. else
  7636. {
  7637. maidArray[i].SetRot(array9[i - 1]);
  7638. maidArray[i].SetPos(array10[i - 1]);
  7639. }
  7640. }
  7641. }
  7642. for (int i = 0; i < maidCnt; i++)
  7643. {
  7644. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7645. {
  7646. if (maidArray[i] && maidArray[i].Visible)
  7647. {
  7648. maidArray[i].body0.transform.localRotation =
  7649. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7650. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7651. }
  7652. }
  7653. else if (Input.GetKey(KeyCode.B))
  7654. {
  7655. if (maidArray[i] && maidArray[i].Visible)
  7656. {
  7657. maidArray[i].body0.transform.localRotation =
  7658. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7659. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7660. }
  7661. }
  7662. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7663. {
  7664. if (maidArray[1] && maidArray[1].Visible)
  7665. {
  7666. if (maidArray[0].transform.position == maidArray[1].transform.position
  7667. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7668. {
  7669. Vector3 vector = Vector3.zero;
  7670. vector.x = 0.6f;
  7671. maidArray[1].SetPos(vector);
  7672. if (maidArray[2] && maidArray[2].Visible)
  7673. {
  7674. vector.x = -0.6f;
  7675. maidArray[2].SetPos(vector);
  7676. }
  7677. if (maidArray[3] && maidArray[3].Visible)
  7678. {
  7679. vector.x = 1.2f;
  7680. maidArray[3].SetPos(vector);
  7681. }
  7682. if (maidArray[4] && maidArray[4].Visible)
  7683. {
  7684. vector.x = -1.2f;
  7685. maidArray[4].SetPos(vector);
  7686. }
  7687. if (maidArray[5] && maidArray[5].Visible)
  7688. {
  7689. vector.x = 1.8f;
  7690. maidArray[5].SetPos(vector);
  7691. }
  7692. if (maidArray[6] && maidArray[6].Visible)
  7693. {
  7694. vector.x = -1.8f;
  7695. maidArray[6].SetPos(vector);
  7696. }
  7697. if (maidArray[7] && maidArray[7].Visible)
  7698. {
  7699. vector.x = 2.4f;
  7700. maidArray[7].SetPos(vector);
  7701. }
  7702. if (maidArray[8] && maidArray[8].Visible)
  7703. {
  7704. vector.x = -2.4f;
  7705. maidArray[8].SetPos(vector);
  7706. }
  7707. if (maidArray[9] && maidArray[9].Visible)
  7708. {
  7709. vector.x = 3f;
  7710. maidArray[9].SetPos(vector);
  7711. }
  7712. if (maidArray[10] && maidArray[10].Visible)
  7713. {
  7714. vector.x = -3f;
  7715. maidArray[10].SetPos(vector);
  7716. }
  7717. if (maidArray[11] && maidArray[11].Visible)
  7718. {
  7719. vector.x = 3.6f;
  7720. maidArray[11].SetPos(vector);
  7721. }
  7722. if (maidArray[12] && maidArray[12].Visible)
  7723. {
  7724. vector.x = -3.6f;
  7725. maidArray[12].SetPos(vector);
  7726. }
  7727. if (maidArray[13] && maidArray[13].Visible)
  7728. {
  7729. vector.x = 4.2f;
  7730. maidArray[13].SetPos(vector);
  7731. }
  7732. }
  7733. }
  7734. for (int k = 0; k < groupList.Count; k++)
  7735. {
  7736. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7737. {
  7738. if (poseIndex[i] == 0)
  7739. {
  7740. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7741. }
  7742. else
  7743. {
  7744. poseIndex[i] = 0;
  7745. }
  7746. break;
  7747. }
  7748. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7749. {
  7750. poseIndex[i] = (int)groupList[k - 1];
  7751. break;
  7752. }
  7753. }
  7754. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7755. {
  7756. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7757. }
  7758. if (maidArray[i] && maidArray[i].Visible)
  7759. {
  7760. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7761. isStop[i] = false;
  7762. poseCount[i] = 20;
  7763. Maid maid = maidArray[i];
  7764. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7765. {
  7766. maid.body0.MuneYureL(0f);
  7767. maid.body0.MuneYureR(0f);
  7768. }
  7769. else
  7770. {
  7771. maid.body0.MuneYureL(1f);
  7772. maid.body0.MuneYureR(1f);
  7773. }
  7774. if (array[0].Contains("MultipleMaidsPose"))
  7775. {
  7776. string path = array[0].Split(new char[] { '/' })[1];
  7777. byte[] array2 = new byte[0];
  7778. try
  7779. {
  7780. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7781. {
  7782. array2 = new byte[fileStream.Length];
  7783. fileStream.Read(array2, 0, array2.Length);
  7784. }
  7785. }
  7786. catch { }
  7787. if (0 < array2.Length)
  7788. {
  7789. string text = Path.GetFileName(path);
  7790. long num5 = text.GetHashCode();
  7791. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7792. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7793. {
  7794. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7795. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7796. };
  7797. for (int m = 0; m < array3.Length; m++)
  7798. {
  7799. maid.SetAutoTwist(array3[m], true);
  7800. }
  7801. }
  7802. }
  7803. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7804. {
  7805. loadPose[i] = array[0];
  7806. }
  7807. else if (!array[0].StartsWith("dance_"))
  7808. {
  7809. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7810. }
  7811. else
  7812. {
  7813. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7814. {
  7815. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7816. GameUty.FileSystem,
  7817. array[0] + ".anm",
  7818. false,
  7819. false);
  7820. }
  7821. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7822. }
  7823. if (array.Length > 1)
  7824. {
  7825. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7826. isStop[i] = true;
  7827. if (array.Length > 2)
  7828. {
  7829. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7830. isPoseIti[i] = true;
  7831. poseIti[i] = maidArray[i].transform.position;
  7832. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7833. }
  7834. }
  7835. }
  7836. }
  7837. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7838. {
  7839. if (maidArray[1] && maidArray[1].Visible)
  7840. {
  7841. if (maidArray[0].transform.position == maidArray[1].transform.position
  7842. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7843. {
  7844. Vector3 vector = Vector3.zero;
  7845. vector.x = 0.6f;
  7846. maidArray[1].SetPos(vector);
  7847. if (maidArray[2] && maidArray[2].Visible)
  7848. {
  7849. vector.x = -0.6f;
  7850. maidArray[2].SetPos(vector);
  7851. }
  7852. if (maidArray[3] && maidArray[3].Visible)
  7853. {
  7854. vector.x = 1.2f;
  7855. maidArray[3].SetPos(vector);
  7856. }
  7857. if (maidArray[4] && maidArray[4].Visible)
  7858. {
  7859. vector.x = -1.2f;
  7860. maidArray[4].SetPos(vector);
  7861. }
  7862. if (maidArray[5] && maidArray[5].Visible)
  7863. {
  7864. vector.x = 1.8f;
  7865. maidArray[5].SetPos(vector);
  7866. }
  7867. if (maidArray[6] && maidArray[6].Visible)
  7868. {
  7869. vector.x = -1.8f;
  7870. maidArray[6].SetPos(vector);
  7871. }
  7872. if (maidArray[7] && maidArray[7].Visible)
  7873. {
  7874. vector.x = 2.4f;
  7875. maidArray[7].SetPos(vector);
  7876. }
  7877. if (maidArray[8] && maidArray[8].Visible)
  7878. {
  7879. vector.x = -2.4f;
  7880. maidArray[8].SetPos(vector);
  7881. }
  7882. if (maidArray[9] && maidArray[9].Visible)
  7883. {
  7884. vector.x = 3f;
  7885. maidArray[9].SetPos(vector);
  7886. }
  7887. if (maidArray[10] && maidArray[10].Visible)
  7888. {
  7889. vector.x = -3f;
  7890. maidArray[10].SetPos(vector);
  7891. }
  7892. if (maidArray[11] && maidArray[11].Visible)
  7893. {
  7894. vector.x = 3.6f;
  7895. maidArray[11].SetPos(vector);
  7896. }
  7897. if (maidArray[12] && maidArray[12].Visible)
  7898. {
  7899. vector.x = -3.6f;
  7900. maidArray[12].SetPos(vector);
  7901. }
  7902. if (maidArray[13] && maidArray[13].Visible)
  7903. {
  7904. vector.x = 4.2f;
  7905. maidArray[13].SetPos(vector);
  7906. }
  7907. }
  7908. }
  7909. int num7 = poseIndex[i];
  7910. for (int k = 0; k < groupList.Count; k++)
  7911. {
  7912. if (poseIndex[i] < (int)groupList[k])
  7913. {
  7914. poseIndex[i] = (int)groupList[k];
  7915. break;
  7916. }
  7917. }
  7918. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7919. {
  7920. poseIndex[i] = 0;
  7921. }
  7922. if (maidArray[i] && maidArray[i].Visible)
  7923. {
  7924. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7925. isStop[i] = false;
  7926. poseCount[i] = 20;
  7927. Maid maid = maidArray[i];
  7928. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7929. {
  7930. maid.body0.MuneYureL(0f);
  7931. maid.body0.MuneYureR(0f);
  7932. }
  7933. else
  7934. {
  7935. maid.body0.MuneYureL(1f);
  7936. maid.body0.MuneYureR(1f);
  7937. }
  7938. if (array[0].Contains("MultipleMaidsPose"))
  7939. {
  7940. string path = array[0].Split(new char[] { '/' })[1];
  7941. byte[] array2 = new byte[0];
  7942. try
  7943. {
  7944. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7945. {
  7946. array2 = new byte[fileStream.Length];
  7947. fileStream.Read(array2, 0, array2.Length);
  7948. }
  7949. }
  7950. catch { }
  7951. if (0 < array2.Length)
  7952. {
  7953. string text = Path.GetFileName(path);
  7954. long num5 = text.GetHashCode();
  7955. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7956. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7957. {
  7958. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7959. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7960. };
  7961. for (int m = 0; m < array3.Length; m++)
  7962. {
  7963. maid.SetAutoTwist(array3[m], true);
  7964. }
  7965. }
  7966. }
  7967. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7968. {
  7969. loadPose[i] = array[0];
  7970. }
  7971. else if (!array[0].StartsWith("dance_"))
  7972. {
  7973. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7974. }
  7975. else
  7976. {
  7977. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7978. {
  7979. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7980. GameUty.FileSystem,
  7981. array[0] + ".anm",
  7982. false,
  7983. false);
  7984. }
  7985. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7986. }
  7987. if (array.Length > 1)
  7988. {
  7989. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7990. isStop[i] = true;
  7991. if (array.Length > 2)
  7992. {
  7993. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7994. isPoseIti[i] = true;
  7995. poseIti[i] = maidArray[i].transform.position;
  7996. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7997. }
  7998. }
  7999. }
  8000. }
  8001. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8002. {
  8003. if (maidArray[1] && maidArray[1].Visible)
  8004. {
  8005. if (maidArray[0].transform.position == maidArray[1].transform.position
  8006. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8007. {
  8008. Vector3 vector = Vector3.zero;
  8009. vector.x = 0.6f;
  8010. maidArray[1].SetPos(vector);
  8011. if (maidArray[2] && maidArray[2].Visible)
  8012. {
  8013. vector.x = -0.6f;
  8014. maidArray[2].SetPos(vector);
  8015. }
  8016. if (maidArray[3] && maidArray[3].Visible)
  8017. {
  8018. vector.x = 1.2f;
  8019. maidArray[3].SetPos(vector);
  8020. }
  8021. if (maidArray[4] && maidArray[4].Visible)
  8022. {
  8023. vector.x = -1.2f;
  8024. maidArray[4].SetPos(vector);
  8025. }
  8026. if (maidArray[5] && maidArray[5].Visible)
  8027. {
  8028. vector.x = 1.8f;
  8029. maidArray[5].SetPos(vector);
  8030. }
  8031. if (maidArray[6] && maidArray[6].Visible)
  8032. {
  8033. vector.x = -1.8f;
  8034. maidArray[6].SetPos(vector);
  8035. }
  8036. if (maidArray[7] && maidArray[7].Visible)
  8037. {
  8038. vector.x = 2.4f;
  8039. maidArray[7].SetPos(vector);
  8040. }
  8041. if (maidArray[8] && maidArray[8].Visible)
  8042. {
  8043. vector.x = -2.4f;
  8044. maidArray[8].SetPos(vector);
  8045. }
  8046. if (maidArray[9] && maidArray[9].Visible)
  8047. {
  8048. vector.x = 3f;
  8049. maidArray[9].SetPos(vector);
  8050. }
  8051. if (maidArray[10] && maidArray[10].Visible)
  8052. {
  8053. vector.x = -3f;
  8054. maidArray[10].SetPos(vector);
  8055. }
  8056. if (maidArray[11] && maidArray[11].Visible)
  8057. {
  8058. vector.x = 3.6f;
  8059. maidArray[11].SetPos(vector);
  8060. }
  8061. if (maidArray[12] && maidArray[12].Visible)
  8062. {
  8063. vector.x = -3.6f;
  8064. maidArray[12].SetPos(vector);
  8065. }
  8066. if (maidArray[13] && maidArray[13].Visible)
  8067. {
  8068. vector.x = 4.2f;
  8069. maidArray[13].SetPos(vector);
  8070. }
  8071. }
  8072. }
  8073. poseIndex[i]--;
  8074. if (poseIndex[i] <= -1)
  8075. {
  8076. poseIndex[i] = poseArray.Length - 1;
  8077. }
  8078. if (maidArray[i] && maidArray[i].Visible)
  8079. {
  8080. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8081. isStop[i] = false;
  8082. poseCount[i] = 20;
  8083. Maid maid = maidArray[i];
  8084. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8085. {
  8086. maid.body0.MuneYureL(0f);
  8087. maid.body0.MuneYureR(0f);
  8088. }
  8089. else
  8090. {
  8091. maid.body0.MuneYureL(1f);
  8092. maid.body0.MuneYureR(1f);
  8093. }
  8094. if (array[0].Contains("MultipleMaidsPose"))
  8095. {
  8096. string path = array[0].Split(new char[] { '/' })[1];
  8097. byte[] array2 = new byte[0];
  8098. try
  8099. {
  8100. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8101. {
  8102. array2 = new byte[fileStream.Length];
  8103. fileStream.Read(array2, 0, array2.Length);
  8104. }
  8105. }
  8106. catch { }
  8107. if (0 < array2.Length)
  8108. {
  8109. string text = Path.GetFileName(path);
  8110. long num5 = text.GetHashCode();
  8111. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8112. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8113. {
  8114. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8115. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8116. };
  8117. for (int m = 0; m < array3.Length; m++)
  8118. {
  8119. maid.SetAutoTwist(array3[m], true);
  8120. }
  8121. }
  8122. }
  8123. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8124. {
  8125. loadPose[i] = array[0];
  8126. }
  8127. else if (!array[0].StartsWith("dance_"))
  8128. {
  8129. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8130. }
  8131. else
  8132. {
  8133. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8134. {
  8135. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8136. GameUty.FileSystem,
  8137. array[0] + ".anm",
  8138. false,
  8139. false);
  8140. }
  8141. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8142. }
  8143. if (array.Length > 1)
  8144. {
  8145. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8146. isStop[i] = true;
  8147. if (array.Length > 2)
  8148. {
  8149. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8150. isPoseIti[i] = true;
  8151. poseIti[i] = maidArray[i].transform.position;
  8152. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8153. }
  8154. }
  8155. }
  8156. }
  8157. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8158. {
  8159. if (maidArray[1] && maidArray[1].Visible)
  8160. {
  8161. if (maidArray[0].transform.position == maidArray[1].transform.position
  8162. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8163. {
  8164. Vector3 vector = Vector3.zero;
  8165. vector.x = 0.6f;
  8166. maidArray[1].SetPos(vector);
  8167. if (maidArray[2] && maidArray[2].Visible)
  8168. {
  8169. vector.x = -0.6f;
  8170. maidArray[2].SetPos(vector);
  8171. }
  8172. if (maidArray[3] && maidArray[3].Visible)
  8173. {
  8174. vector.x = 1.2f;
  8175. maidArray[3].SetPos(vector);
  8176. }
  8177. if (maidArray[4] && maidArray[4].Visible)
  8178. {
  8179. vector.x = -1.2f;
  8180. maidArray[4].SetPos(vector);
  8181. }
  8182. if (maidArray[5] && maidArray[5].Visible)
  8183. {
  8184. vector.x = 1.8f;
  8185. maidArray[5].SetPos(vector);
  8186. }
  8187. if (maidArray[6] && maidArray[6].Visible)
  8188. {
  8189. vector.x = -1.8f;
  8190. maidArray[6].SetPos(vector);
  8191. }
  8192. if (maidArray[7] && maidArray[7].Visible)
  8193. {
  8194. vector.x = 2.4f;
  8195. maidArray[7].SetPos(vector);
  8196. }
  8197. if (maidArray[8] && maidArray[8].Visible)
  8198. {
  8199. vector.x = -2.4f;
  8200. maidArray[8].SetPos(vector);
  8201. }
  8202. if (maidArray[9] && maidArray[9].Visible)
  8203. {
  8204. vector.x = 3f;
  8205. maidArray[9].SetPos(vector);
  8206. }
  8207. if (maidArray[10] && maidArray[10].Visible)
  8208. {
  8209. vector.x = -3f;
  8210. maidArray[10].SetPos(vector);
  8211. }
  8212. if (maidArray[11] && maidArray[11].Visible)
  8213. {
  8214. vector.x = 3.6f;
  8215. maidArray[11].SetPos(vector);
  8216. }
  8217. if (maidArray[12] && maidArray[12].Visible)
  8218. {
  8219. vector.x = -3.6f;
  8220. maidArray[12].SetPos(vector);
  8221. }
  8222. if (maidArray[13] && maidArray[13].Visible)
  8223. {
  8224. vector.x = 4.2f;
  8225. maidArray[13].SetPos(vector);
  8226. }
  8227. }
  8228. }
  8229. poseIndex[i]++;
  8230. if (poseIndex[i] == poseArray.Length)
  8231. {
  8232. poseIndex[i] = 0;
  8233. }
  8234. if (maidArray[i] && maidArray[i].Visible)
  8235. {
  8236. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8237. isStop[i] = false;
  8238. poseCount[i] = 20;
  8239. Maid maid = maidArray[i];
  8240. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8241. {
  8242. maid.body0.MuneYureL(0f);
  8243. maid.body0.MuneYureR(0f);
  8244. }
  8245. else
  8246. {
  8247. maid.body0.MuneYureL(1f);
  8248. maid.body0.MuneYureR(1f);
  8249. }
  8250. if (array[0].Contains("MultipleMaidsPose"))
  8251. {
  8252. string path = array[0].Split(new char[] { '/' })[1];
  8253. byte[] array2 = new byte[0];
  8254. try
  8255. {
  8256. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8257. {
  8258. array2 = new byte[fileStream.Length];
  8259. fileStream.Read(array2, 0, array2.Length);
  8260. }
  8261. }
  8262. catch { }
  8263. if (0 < array2.Length)
  8264. {
  8265. string text = Path.GetFileName(path);
  8266. long num5 = text.GetHashCode();
  8267. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8268. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8269. {
  8270. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8271. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8272. };
  8273. for (int m = 0; m < array3.Length; m++)
  8274. {
  8275. maid.SetAutoTwist(array3[m], true);
  8276. }
  8277. }
  8278. }
  8279. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8280. {
  8281. loadPose[i] = array[0];
  8282. }
  8283. else if (!array[0].StartsWith("dance_"))
  8284. {
  8285. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8286. }
  8287. else
  8288. {
  8289. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8290. {
  8291. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8292. GameUty.FileSystem,
  8293. array[0] + ".anm",
  8294. false,
  8295. false);
  8296. }
  8297. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8298. }
  8299. if (array.Length > 1)
  8300. {
  8301. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8302. isStop[i] = true;
  8303. if (array.Length > 2)
  8304. {
  8305. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8306. isPoseIti[i] = true;
  8307. poseIti[i] = maidArray[i].transform.position;
  8308. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8309. }
  8310. }
  8311. }
  8312. }
  8313. }
  8314. }
  8315. if (isDanceChu)
  8316. {
  8317. for (int j = 0; j < maidCnt; j++)
  8318. {
  8319. if (maidArray[j] && maidArray[j].Visible)
  8320. {
  8321. string text2 = danceName[j];
  8322. float num = 0f;
  8323. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8324. || text2 == "dance_cm3d_004_kano_f1.anm")
  8325. {
  8326. num = 0.166666f;
  8327. }
  8328. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8329. {
  8330. num = -0.35f;
  8331. }
  8332. if (text2 != null)
  8333. {
  8334. if (danceCount > 0)
  8335. {
  8336. danceCount--;
  8337. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8338. }
  8339. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8340. {
  8341. danceCount = 20;
  8342. }
  8343. }
  8344. }
  8345. }
  8346. }
  8347. if (isDanceStart1)
  8348. {
  8349. for (int j = 0; j < maidCnt; j++)
  8350. {
  8351. if (maidArray[j] && maidArray[j].Visible)
  8352. {
  8353. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8354. if (!isShift)
  8355. {
  8356. if (j == 0)
  8357. {
  8358. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8359. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8360. danceName[j] = "dance_cm3d2_001_f1.anm";
  8361. }
  8362. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8363. {
  8364. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8365. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8366. danceName[j] = "dance_cm3d2_001_f2.anm";
  8367. }
  8368. else
  8369. {
  8370. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8371. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8372. danceName[j] = "dance_cm3d2_001_f3.anm";
  8373. }
  8374. }
  8375. else
  8376. {
  8377. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8378. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8379. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8380. }
  8381. }
  8382. }
  8383. isDanceStart1 = false;
  8384. isDanceStart1F = true;
  8385. isShift = false;
  8386. }
  8387. if (isDanceStart2)
  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. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8395. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8396. danceName[j] = "dance_cm3d_001_f1.anm";
  8397. }
  8398. }
  8399. isDanceStart2 = false;
  8400. isDanceStart2F = true;
  8401. }
  8402. if (isDanceStart3)
  8403. {
  8404. for (int j = 0; j < maidCnt; j++)
  8405. {
  8406. if (maidArray[j] && maidArray[j].Visible)
  8407. {
  8408. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8409. if (!isShift)
  8410. {
  8411. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8412. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8413. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8414. }
  8415. else
  8416. {
  8417. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8418. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8419. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8420. }
  8421. }
  8422. }
  8423. isDanceStart3 = false;
  8424. isDanceStart3F = true;
  8425. isShift = false;
  8426. }
  8427. if (isDanceStart4)
  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. if (!isShift)
  8435. {
  8436. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8437. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8438. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8439. }
  8440. else
  8441. {
  8442. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8443. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8444. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8445. }
  8446. }
  8447. }
  8448. isDanceStart4 = false;
  8449. isDanceStart4F = true;
  8450. isShift = false;
  8451. }
  8452. if (isDanceStart5)
  8453. {
  8454. for (int j = 0; j < maidCnt; j++)
  8455. {
  8456. if (maidArray[j] && maidArray[j].Visible)
  8457. {
  8458. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8459. if (!isShift)
  8460. {
  8461. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8462. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8463. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8464. }
  8465. else
  8466. {
  8467. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8468. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8469. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8470. }
  8471. }
  8472. }
  8473. isDanceStart5 = false;
  8474. isDanceStart5F = true;
  8475. isShift = false;
  8476. }
  8477. if (isDanceStart6)
  8478. {
  8479. for (int j = 0; j < maidCnt; j++)
  8480. {
  8481. if (maidArray[j] && maidArray[j].Visible)
  8482. {
  8483. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8484. if (!isShift)
  8485. {
  8486. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8487. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8488. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8489. }
  8490. else
  8491. {
  8492. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8493. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8494. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8495. }
  8496. }
  8497. }
  8498. isDanceStart6 = false;
  8499. isDanceStart6F = true;
  8500. isShift = false;
  8501. }
  8502. if (isDanceStart7)
  8503. {
  8504. for (int j = 0; j < maidCnt; j++)
  8505. {
  8506. if (maidArray[j] && maidArray[j].Visible)
  8507. {
  8508. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8509. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8510. {
  8511. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8512. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8513. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8514. }
  8515. else
  8516. {
  8517. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8518. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8519. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8520. }
  8521. }
  8522. }
  8523. isDanceStart7 = false;
  8524. isDanceStart7V = true;
  8525. isDanceStart7F = true;
  8526. }
  8527. if (isDanceStart8)
  8528. {
  8529. for (int j = 0; j < maidCnt; j++)
  8530. {
  8531. if (maidArray[j] && maidArray[j].Visible)
  8532. {
  8533. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8534. if (j == 0 || j == 4 || j == 8 || j == 12)
  8535. {
  8536. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8537. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8538. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8539. }
  8540. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8541. {
  8542. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8543. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8544. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8545. }
  8546. else if (j == 2 || j == 6 || j == 10)
  8547. {
  8548. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8549. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8550. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8551. }
  8552. else
  8553. {
  8554. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8555. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8556. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8557. }
  8558. }
  8559. }
  8560. isDanceStart8 = false;
  8561. isDanceStart8V = true;
  8562. isDanceStart8F = true;
  8563. }
  8564. if (isDanceStart9)
  8565. {
  8566. isDanceStart9Count++;
  8567. if (isShift)
  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. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8575. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8576. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8577. }
  8578. }
  8579. isDanceStart9 = false;
  8580. isDanceStart9F = true;
  8581. isDanceStart9Count = 0;
  8582. isShift = false;
  8583. }
  8584. if (isDanceStart9Count == 10)
  8585. {
  8586. for (int j = 0; j < maidCnt; j++)
  8587. {
  8588. if (maidArray[j] && maidArray[j].Visible)
  8589. {
  8590. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8591. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8592. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8593. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8594. }
  8595. }
  8596. isDanceStart9 = false;
  8597. isDanceStart9F = true;
  8598. isDanceStart9Count = 0;
  8599. }
  8600. }
  8601. if (isDanceStart10)
  8602. {
  8603. for (int j = 0; j < maidCnt; j++)
  8604. {
  8605. if (maidArray[j] && maidArray[j].Visible)
  8606. {
  8607. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8608. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8609. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8610. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8611. }
  8612. }
  8613. isDanceStart10 = false;
  8614. isDanceStart10F = true;
  8615. }
  8616. if (isDanceStart11)
  8617. {
  8618. for (int j = 0; j < maidCnt; j++)
  8619. {
  8620. if (maidArray[j] && maidArray[j].Visible)
  8621. {
  8622. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8623. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8624. {
  8625. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8626. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8627. danceName[j] = nameA + danceNo2 + ".anm";
  8628. }
  8629. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8630. {
  8631. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8632. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8633. danceName[j] = nameA + danceNo3 + ".anm";
  8634. }
  8635. else
  8636. {
  8637. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8638. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8639. danceName[j] = nameA + danceNo1 + ".anm";
  8640. }
  8641. }
  8642. }
  8643. isDanceStart11 = false;
  8644. isDanceStart11V = true;
  8645. isDanceStart11F = true;
  8646. }
  8647. if (isDanceStart12)
  8648. {
  8649. for (int j = 0; j < maidCnt; j++)
  8650. {
  8651. if (maidArray[j] && maidArray[j].Visible)
  8652. {
  8653. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8654. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8655. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8656. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8657. }
  8658. }
  8659. isDanceStart12 = false;
  8660. isDanceStart12F = true;
  8661. }
  8662. if (isDanceStart13)
  8663. {
  8664. for (int j = 0; j < maidCnt; j++)
  8665. {
  8666. if (maidArray[j] && maidArray[j].Visible)
  8667. {
  8668. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8669. if (!isShift)
  8670. {
  8671. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8672. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8673. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8674. }
  8675. else
  8676. {
  8677. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8678. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8679. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8680. }
  8681. }
  8682. }
  8683. isDanceStart13 = false;
  8684. isDanceStart13F = true;
  8685. isShift = false;
  8686. }
  8687. if (isDanceStart14)
  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. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8695. {
  8696. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8697. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8698. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8699. }
  8700. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8701. {
  8702. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8703. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8704. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8705. }
  8706. else
  8707. {
  8708. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8709. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8710. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8711. }
  8712. }
  8713. }
  8714. isDanceStart14 = false;
  8715. isDanceStart14V = true;
  8716. isDanceStart14F = true;
  8717. }
  8718. if (isDanceStart15)
  8719. {
  8720. isDanceStart15Count++;
  8721. }
  8722. if (isDanceStart15Count == 10)
  8723. {
  8724. for (int j = 0; j < maidCnt; j++)
  8725. {
  8726. if (maidArray[j] && maidArray[j].Visible)
  8727. {
  8728. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8729. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8730. {
  8731. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8732. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8733. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8734. }
  8735. else
  8736. {
  8737. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8738. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8739. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8740. }
  8741. }
  8742. }
  8743. isDanceStart15 = false;
  8744. isDanceStart15V = true;
  8745. isDanceStart15F = true;
  8746. isDanceStart15Count = 0;
  8747. }
  8748. if (isDance)
  8749. {
  8750. for (int j = 0; j < maidCnt; j++)
  8751. {
  8752. if (maidArray[j].Visible)
  8753. {
  8754. if (isDanceStart1F)
  8755. {
  8756. if (isDanceStart1K)
  8757. {
  8758. foreach (string text3 in dance1KArray)
  8759. {
  8760. string[] array = text3.Split(new char[] { ',' });
  8761. float num10 = float.Parse(array[0]);
  8762. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8763. {
  8764. danceFace[j] = num10;
  8765. FaceName[j] = FaceName2[j];
  8766. FaceName2[j] = array[1];
  8767. FaceName3[j] = array[2];
  8768. FaceTime[j] = 0.0166666675f;
  8769. break;
  8770. }
  8771. }
  8772. }
  8773. else if (j == 0)
  8774. {
  8775. foreach (string text3 in dance1Array)
  8776. {
  8777. string[] array = text3.Split(new char[] { ',' });
  8778. float num10 = float.Parse(array[0]);
  8779. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8780. {
  8781. danceFace[j] = num10;
  8782. FaceName[j] = FaceName2[j];
  8783. FaceName2[j] = array[1];
  8784. FaceName3[j] = array[2];
  8785. FaceTime[j] = 0.0166666675f;
  8786. break;
  8787. }
  8788. }
  8789. }
  8790. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8791. {
  8792. foreach (string text3 in dance1BArray)
  8793. {
  8794. string[] array = text3.Split(new char[] { ',' });
  8795. float num10 = float.Parse(array[0]);
  8796. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8797. {
  8798. danceFace[j] = num10;
  8799. FaceName[j] = FaceName2[j];
  8800. FaceName2[j] = array[1];
  8801. FaceName3[j] = array[2];
  8802. FaceTime[j] = 0.0166666675f;
  8803. break;
  8804. }
  8805. }
  8806. }
  8807. else
  8808. {
  8809. foreach (string text3 in dance1CArray)
  8810. {
  8811. string[] array = text3.Split(new char[] { ',' });
  8812. float num10 = float.Parse(array[0]);
  8813. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8814. {
  8815. danceFace[j] = num10;
  8816. FaceName[j] = FaceName2[j];
  8817. FaceName2[j] = array[1];
  8818. FaceName3[j] = array[2];
  8819. FaceTime[j] = 0.0166666675f;
  8820. break;
  8821. }
  8822. }
  8823. }
  8824. }
  8825. if (isDanceStart2F)
  8826. {
  8827. foreach (string text3 in dance2Array)
  8828. {
  8829. string[] array = text3.Split(new char[] { ',' });
  8830. float num10 = float.Parse(array[0]);
  8831. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8832. {
  8833. danceFace[j] = num10;
  8834. FaceName[j] = FaceName2[j];
  8835. FaceName2[j] = array[1];
  8836. FaceName3[j] = array[2];
  8837. FaceTime[j] = 0.0166666675f;
  8838. break;
  8839. }
  8840. }
  8841. }
  8842. if (isDanceStart3F)
  8843. {
  8844. if (isDanceStart3K)
  8845. {
  8846. foreach (string text3 in dance3KArray)
  8847. {
  8848. string[] array = text3.Split(new char[] { ',' });
  8849. float num10 = float.Parse(array[0]);
  8850. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8851. {
  8852. danceFace[j] = num10;
  8853. FaceName[j] = FaceName2[j];
  8854. FaceName2[j] = array[1];
  8855. FaceName3[j] = array[2];
  8856. FaceTime[j] = 0.0166666675f;
  8857. break;
  8858. }
  8859. }
  8860. }
  8861. else
  8862. {
  8863. foreach (string text3 in dance3Array)
  8864. {
  8865. string[] array = text3.Split(new char[] { ',' });
  8866. float num10 = float.Parse(array[0]);
  8867. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8868. {
  8869. danceFace[j] = num10;
  8870. FaceName[j] = FaceName2[j];
  8871. FaceName2[j] = array[1];
  8872. FaceName3[j] = array[2];
  8873. FaceTime[j] = 0.0166666675f;
  8874. break;
  8875. }
  8876. }
  8877. }
  8878. }
  8879. if (isDanceStart4F)
  8880. {
  8881. if (isDanceStart4K)
  8882. {
  8883. foreach (string text3 in dance4KArray)
  8884. {
  8885. string[] array = text3.Split(new char[] { ',' });
  8886. float num10 = float.Parse(array[0]);
  8887. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8888. {
  8889. danceFace[j] = num10;
  8890. FaceName[j] = FaceName2[j];
  8891. FaceName2[j] = array[1];
  8892. FaceName3[j] = array[2];
  8893. FaceTime[j] = 0.0166666675f;
  8894. break;
  8895. }
  8896. }
  8897. }
  8898. else
  8899. {
  8900. foreach (string text3 in dance4Array)
  8901. {
  8902. string[] array = text3.Split(new char[] { ',' });
  8903. float num10 = float.Parse(array[0]);
  8904. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8905. {
  8906. danceFace[j] = num10;
  8907. FaceName[j] = FaceName2[j];
  8908. FaceName2[j] = array[1];
  8909. FaceName3[j] = array[2];
  8910. FaceTime[j] = 0.0166666675f;
  8911. break;
  8912. }
  8913. }
  8914. }
  8915. }
  8916. if (isDanceStart5F)
  8917. {
  8918. if (isDanceStart5K)
  8919. {
  8920. foreach (string text3 in dance5KArray)
  8921. {
  8922. string[] array = text3.Split(new char[] { ',' });
  8923. float num10 = float.Parse(array[0]);
  8924. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8925. {
  8926. danceFace[j] = num10;
  8927. FaceName[j] = FaceName2[j];
  8928. FaceName2[j] = array[1];
  8929. FaceName3[j] = array[2];
  8930. FaceTime[j] = 0.0166666675f;
  8931. break;
  8932. }
  8933. }
  8934. }
  8935. else
  8936. {
  8937. foreach (string text3 in dance5Array)
  8938. {
  8939. string[] array = text3.Split(new char[] { ',' });
  8940. float num10 = float.Parse(array[0]);
  8941. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8942. {
  8943. danceFace[j] = num10;
  8944. FaceName[j] = FaceName2[j];
  8945. FaceName2[j] = array[1];
  8946. FaceName3[j] = array[2];
  8947. FaceTime[j] = 0.0166666675f;
  8948. break;
  8949. }
  8950. }
  8951. }
  8952. }
  8953. if (isDanceStart6F)
  8954. {
  8955. if (isDanceStart6K)
  8956. {
  8957. foreach (string text3 in dance6KArray)
  8958. {
  8959. string[] array = text3.Split(new char[] { ',' });
  8960. float num10 = float.Parse(array[0]);
  8961. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8962. {
  8963. danceFace[j] = num10;
  8964. FaceName[j] = FaceName2[j];
  8965. FaceName2[j] = array[1];
  8966. FaceName3[j] = array[2];
  8967. FaceTime[j] = 0.0166666675f;
  8968. break;
  8969. }
  8970. }
  8971. }
  8972. else
  8973. {
  8974. foreach (string text3 in dance6Array)
  8975. {
  8976. string[] array = text3.Split(new char[] { ',' });
  8977. float num10 = float.Parse(array[0]);
  8978. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8979. {
  8980. danceFace[j] = num10;
  8981. FaceName[j] = FaceName2[j];
  8982. FaceName2[j] = array[1];
  8983. FaceName3[j] = array[2];
  8984. FaceTime[j] = 0.0166666675f;
  8985. break;
  8986. }
  8987. }
  8988. }
  8989. }
  8990. if (isDanceStart7F)
  8991. {
  8992. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8993. {
  8994. foreach (string text3 in dance6BArray)
  8995. {
  8996. string[] array = text3.Split(new char[] { ',' });
  8997. float num10 = float.Parse(array[0]);
  8998. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8999. {
  9000. danceFace[j] = num10;
  9001. FaceName[j] = FaceName2[j];
  9002. FaceName2[j] = array[1];
  9003. FaceName3[j] = array[2];
  9004. FaceTime[j] = 0.0166666675f;
  9005. break;
  9006. }
  9007. }
  9008. }
  9009. else
  9010. {
  9011. foreach (string text3 in dance6Array)
  9012. {
  9013. string[] array = text3.Split(new char[] { ',' });
  9014. float num10 = float.Parse(array[0]);
  9015. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9016. {
  9017. danceFace[j] = num10;
  9018. FaceName[j] = FaceName2[j];
  9019. FaceName2[j] = array[1];
  9020. FaceName3[j] = array[2];
  9021. FaceTime[j] = 0.0166666675f;
  9022. break;
  9023. }
  9024. }
  9025. }
  9026. }
  9027. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9028. {
  9029. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9030. {
  9031. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9032. }
  9033. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9034. {
  9035. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9036. 100f,
  9037. maidArray[j - 1].transform.position.z));
  9038. }
  9039. }
  9040. if (isDanceStart8F)
  9041. {
  9042. if (j == 1 || j == 5 || j == 9 || j == 13)
  9043. {
  9044. foreach (string text3 in dance6BArray)
  9045. {
  9046. string[] array = text3.Split(new char[] { ',' });
  9047. float num10 = float.Parse(array[0]);
  9048. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9049. {
  9050. danceFace[j] = num10;
  9051. FaceName[j] = FaceName2[j];
  9052. FaceName2[j] = array[1];
  9053. FaceName3[j] = array[2];
  9054. FaceTime[j] = 0.0166666675f;
  9055. break;
  9056. }
  9057. }
  9058. }
  9059. else if (j == 2 || j == 6 || j == 10)
  9060. {
  9061. foreach (string text3 in dance6CArray)
  9062. {
  9063. string[] array = text3.Split(new char[] { ',' });
  9064. float num10 = float.Parse(array[0]);
  9065. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9066. {
  9067. danceFace[j] = num10;
  9068. FaceName[j] = FaceName2[j];
  9069. FaceName2[j] = array[1];
  9070. FaceName3[j] = array[2];
  9071. FaceTime[j] = 0.0166666675f;
  9072. break;
  9073. }
  9074. }
  9075. }
  9076. else if (j == 3 || j == 9 || j == 11)
  9077. {
  9078. foreach (string text3 in dance6DArray)
  9079. {
  9080. string[] array = text3.Split(new char[] { ',' });
  9081. float num10 = float.Parse(array[0]);
  9082. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9083. {
  9084. danceFace[j] = num10;
  9085. FaceName[j] = FaceName2[j];
  9086. FaceName2[j] = array[1];
  9087. FaceName3[j] = array[2];
  9088. FaceTime[j] = 0.0166666675f;
  9089. break;
  9090. }
  9091. }
  9092. }
  9093. else
  9094. {
  9095. foreach (string text3 in dance6Array)
  9096. {
  9097. string[] array = text3.Split(new char[] { ',' });
  9098. float num10 = float.Parse(array[0]);
  9099. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9100. {
  9101. danceFace[j] = num10;
  9102. FaceName[j] = FaceName2[j];
  9103. FaceName2[j] = array[1];
  9104. FaceName3[j] = array[2];
  9105. FaceTime[j] = 0.0166666675f;
  9106. break;
  9107. }
  9108. }
  9109. }
  9110. }
  9111. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9112. {
  9113. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9114. {
  9115. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9116. }
  9117. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9118. {
  9119. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9120. 100f,
  9121. maidArray[j - 1].transform.position.z));
  9122. }
  9123. }
  9124. if (isDanceStart8V)
  9125. {
  9126. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9127. {
  9128. isDanceStart8P = true;
  9129. for (int num11 = 0; num11 < maidCnt; num11++)
  9130. {
  9131. if (maidArray[num11].Visible)
  9132. {
  9133. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9134. {
  9135. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9136. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9137. gameObject6.transform.position =
  9138. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9139. .position;
  9140. }
  9141. }
  9142. }
  9143. }
  9144. }
  9145. if (isDanceStart9F)
  9146. {
  9147. if (isDanceStart9K)
  9148. {
  9149. foreach (string text3 in dance9KArray)
  9150. {
  9151. string[] array = text3.Split(new char[] { ',' });
  9152. float num10 = float.Parse(array[0]);
  9153. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9154. {
  9155. danceFace[j] = num10;
  9156. FaceName[j] = FaceName2[j];
  9157. FaceName2[j] = array[1];
  9158. FaceName3[j] = array[2];
  9159. FaceTime[j] = 0.0166666675f;
  9160. break;
  9161. }
  9162. }
  9163. }
  9164. else
  9165. {
  9166. foreach (string text3 in dance7Array)
  9167. {
  9168. string[] array = text3.Split(new char[] { ',' });
  9169. float num10 = float.Parse(array[0]);
  9170. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9171. {
  9172. danceFace[j] = num10;
  9173. FaceName[j] = FaceName2[j];
  9174. FaceName2[j] = array[1];
  9175. FaceName3[j] = array[2];
  9176. FaceTime[j] = 0.0166666675f;
  9177. break;
  9178. }
  9179. }
  9180. }
  9181. }
  9182. if (isDanceStart10F)
  9183. {
  9184. foreach (string text3 in danceO1Array)
  9185. {
  9186. string[] array = text3.Split(new char[] { ',' });
  9187. float num10 = float.Parse(array[0]);
  9188. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9189. {
  9190. danceFace[j] = num10;
  9191. FaceName[j] = FaceName2[j];
  9192. FaceName2[j] = array[1];
  9193. FaceName3[j] = array[2];
  9194. FaceTime[j] = 0.0166666675f;
  9195. break;
  9196. }
  9197. }
  9198. }
  9199. if (isDanceStart11F)
  9200. {
  9201. string[] array14 = null;
  9202. string[] array12 = null;
  9203. string[] array15 = null;
  9204. if (isSS1)
  9205. {
  9206. array14 = danceO1Array;
  9207. array12 = danceO1CArray;
  9208. array15 = danceO1BArray;
  9209. }
  9210. if (isSS2)
  9211. {
  9212. array14 = danceO2Array;
  9213. array12 = danceO2BArray;
  9214. array15 = danceO2CArray;
  9215. }
  9216. if (isSS3)
  9217. {
  9218. array14 = danceO3CArray;
  9219. array12 = danceO3Array;
  9220. array15 = danceO3BArray;
  9221. }
  9222. if (isSS4)
  9223. {
  9224. array14 = danceO5BArray;
  9225. array12 = danceO5Array;
  9226. array15 = danceO5CArray;
  9227. }
  9228. if (isSS5)
  9229. {
  9230. array14 = danceO4Array;
  9231. array12 = danceO4BArray;
  9232. array15 = danceO4CArray;
  9233. }
  9234. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9235. {
  9236. foreach (string text3 in array12)
  9237. {
  9238. string[] array = text3.Split(new char[] { ',' });
  9239. float num10 = float.Parse(array[0]) - 0.03f;
  9240. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9241. {
  9242. danceFace[j] = num10;
  9243. FaceName[j] = FaceName2[j];
  9244. FaceName2[j] = array[1];
  9245. FaceName3[j] = array[2];
  9246. FaceTime[j] = 0.0166666675f;
  9247. break;
  9248. }
  9249. }
  9250. }
  9251. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9252. {
  9253. foreach (string text3 in array15)
  9254. {
  9255. string[] array = text3.Split(new char[] { ',' });
  9256. float num10 = float.Parse(array[0]) - 0.03f;
  9257. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9258. {
  9259. danceFace[j] = num10;
  9260. FaceName[j] = FaceName2[j];
  9261. FaceName2[j] = array[1];
  9262. FaceName3[j] = array[2];
  9263. FaceTime[j] = 0.0166666675f;
  9264. break;
  9265. }
  9266. }
  9267. }
  9268. else
  9269. {
  9270. foreach (string text3 in array14)
  9271. {
  9272. string[] array = text3.Split(new char[] { ',' });
  9273. float num10 = float.Parse(array[0]) - 0.03f;
  9274. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9275. {
  9276. danceFace[j] = num10;
  9277. FaceName[j] = FaceName2[j];
  9278. FaceName2[j] = array[1];
  9279. FaceName3[j] = array[2];
  9280. FaceTime[j] = 0.0166666675f;
  9281. break;
  9282. }
  9283. }
  9284. }
  9285. }
  9286. if (isDanceStart12F)
  9287. {
  9288. foreach (string text3 in dance12Array)
  9289. {
  9290. string[] array = text3.Split(new char[] { ',' });
  9291. float num10 = float.Parse(array[0]);
  9292. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9293. {
  9294. danceFace[j] = num10;
  9295. FaceName[j] = FaceName2[j];
  9296. FaceName2[j] = array[1];
  9297. FaceName3[j] = array[2];
  9298. FaceTime[j] = 0.0166666675f;
  9299. break;
  9300. }
  9301. }
  9302. }
  9303. if (isDanceStart13F)
  9304. {
  9305. if (!isDanceStart13K)
  9306. {
  9307. foreach (string text3 in dance13Array)
  9308. {
  9309. string[] array = text3.Split(new char[] { ',' });
  9310. float num10 = float.Parse(array[0]);
  9311. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9312. {
  9313. danceFace[j] = num10;
  9314. FaceName[j] = FaceName2[j];
  9315. FaceName2[j] = array[1];
  9316. FaceName3[j] = array[2];
  9317. FaceTime[j] = 0.0166666675f;
  9318. break;
  9319. }
  9320. }
  9321. }
  9322. }
  9323. if (isDanceStart14F)
  9324. {
  9325. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9326. {
  9327. foreach (string text3 in dance13BArray)
  9328. {
  9329. string[] array = text3.Split(new char[] { ',' });
  9330. float num10 = float.Parse(array[0]);
  9331. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9332. {
  9333. danceFace[j] = num10;
  9334. FaceName[j] = FaceName2[j];
  9335. FaceName2[j] = array[1];
  9336. FaceName3[j] = array[2];
  9337. FaceTime[j] = 0.0166666675f;
  9338. break;
  9339. }
  9340. }
  9341. }
  9342. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9343. {
  9344. foreach (string text3 in dance13CArray)
  9345. {
  9346. string[] array = text3.Split(new char[] { ',' });
  9347. float num10 = float.Parse(array[0]);
  9348. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9349. {
  9350. danceFace[j] = num10;
  9351. FaceName[j] = FaceName2[j];
  9352. FaceName2[j] = array[1];
  9353. FaceName3[j] = array[2];
  9354. FaceTime[j] = 0.0166666675f;
  9355. break;
  9356. }
  9357. }
  9358. }
  9359. else
  9360. {
  9361. foreach (string text3 in dance13Array)
  9362. {
  9363. string[] array = text3.Split(new char[] { ',' });
  9364. float num10 = float.Parse(array[0]);
  9365. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9366. {
  9367. danceFace[j] = num10;
  9368. FaceName[j] = FaceName2[j];
  9369. FaceName2[j] = array[1];
  9370. FaceName3[j] = array[2];
  9371. FaceTime[j] = 0.0166666675f;
  9372. break;
  9373. }
  9374. }
  9375. }
  9376. }
  9377. if (isDanceStart15F)
  9378. {
  9379. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9380. {
  9381. foreach (string text3 in dance15BArray)
  9382. {
  9383. string[] array = text3.Split(new char[] { ',' });
  9384. float num10 = float.Parse(array[0]);
  9385. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9386. {
  9387. danceFace[j] = num10;
  9388. FaceName[j] = FaceName2[j];
  9389. FaceName2[j] = array[1];
  9390. FaceName3[j] = array[2];
  9391. FaceTime[j] = 0.0166666675f;
  9392. break;
  9393. }
  9394. }
  9395. }
  9396. else
  9397. {
  9398. foreach (string text3 in dance15Array)
  9399. {
  9400. string[] array = text3.Split(new char[] { ',' });
  9401. float num10 = float.Parse(array[0]);
  9402. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9403. {
  9404. danceFace[j] = num10;
  9405. FaceName[j] = FaceName2[j];
  9406. FaceName2[j] = array[1];
  9407. FaceName3[j] = array[2];
  9408. FaceTime[j] = 0.0166666675f;
  9409. break;
  9410. }
  9411. }
  9412. }
  9413. }
  9414. if (!isFadeOut)
  9415. {
  9416. Maid maid = maidArray[j];
  9417. if (maid && maid.Visible)
  9418. {
  9419. if (maid.transform.position.y != 100f)
  9420. {
  9421. FaceTime[j] += Time.deltaTime;
  9422. if (FaceTime[j] < 1f)
  9423. {
  9424. TMorph morph = maid.body0.Face.morph;
  9425. maid.boMabataki = false;
  9426. maid.body0.Face.morph.EyeMabataki = 0f;
  9427. if (FaceName[j] != string.Empty)
  9428. {
  9429. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9430. }
  9431. if (FaceName2[j] != "")
  9432. {
  9433. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9434. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9435. }
  9436. if (FaceName3[j] != string.Empty)
  9437. {
  9438. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9439. }
  9440. maid.body0.Face.morph.FixBlendValues_Face();
  9441. }
  9442. else
  9443. {
  9444. FaceName[j] = FaceName2[j];
  9445. }
  9446. if (isHenkou)
  9447. {
  9448. TMorph morph = maid.body0.Face.morph;
  9449. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9450. maid.boMabataki = false;
  9451. if (isNamidaH)
  9452. {
  9453. fieldValue[(int)morph.hash["namida"]] = 1f;
  9454. }
  9455. else
  9456. {
  9457. fieldValue[(int)morph.hash["namida"]] = 0f;
  9458. }
  9459. if (isSekimenH)
  9460. {
  9461. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9462. }
  9463. else
  9464. {
  9465. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9466. }
  9467. if (isHohoH)
  9468. {
  9469. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9470. }
  9471. else
  9472. {
  9473. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9474. }
  9475. maid.body0.Face.morph.FixBlendValues_Face();
  9476. }
  9477. }
  9478. }
  9479. }
  9480. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9481. }
  9482. }
  9483. if (Input.GetKey(KeyCode.H) || isVR)
  9484. {
  9485. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9486. {
  9487. h2Flg = true;
  9488. isNamidaH = !isNamidaH;
  9489. isHenkou = true;
  9490. }
  9491. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9492. {
  9493. h2Flg = true;
  9494. isSekimenH = !isSekimenH;
  9495. isHenkou = true;
  9496. }
  9497. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9498. {
  9499. h2Flg = true;
  9500. isHohoH = !isHohoH;
  9501. isHenkou = true;
  9502. }
  9503. }
  9504. danceCheckIndex++;
  9505. if (danceCheckIndex == 10)
  9506. {
  9507. danceCheckIndex = 0;
  9508. }
  9509. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9510. isDanceChu = false;
  9511. for (int k = 0; k < danceCheck.Length; k++)
  9512. {
  9513. if (danceCheck[k] > 0f)
  9514. {
  9515. isDanceChu = true;
  9516. break;
  9517. }
  9518. }
  9519. if (!isDanceChu)
  9520. {
  9521. danceWait--;
  9522. if (danceWait > 0)
  9523. {
  9524. isDanceChu = true;
  9525. }
  9526. }
  9527. if (!isDanceChu)
  9528. {
  9529. for (int j = 0; j < maidCnt; j++)
  9530. {
  9531. if (maidArray[j] && maidArray[j].Visible)
  9532. {
  9533. maidArray[j].StopKuchipakuPattern();
  9534. if (isDanceStart7V)
  9535. {
  9536. maidArray[j].SetPos(dancePos[j]);
  9537. maidArray[j].body0.transform.localRotation = danceRot[j];
  9538. }
  9539. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9540. {
  9541. maidArray[j].SetPos(dancePos[j]);
  9542. maidArray[j].body0.transform.localRotation = danceRot[j];
  9543. }
  9544. if (isDanceStart11V)
  9545. {
  9546. maidArray[j].SetPos(dancePos[j]);
  9547. maidArray[j].body0.transform.localRotation = danceRot[j];
  9548. }
  9549. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9550. || isDanceStart13K)
  9551. {
  9552. maidArray[j].SetPos(dancePos[j]);
  9553. maidArray[j].body0.transform.localRotation = danceRot[j];
  9554. int i = j;
  9555. if (!isVR)
  9556. {
  9557. delCount[i] = 20;
  9558. if (goSlot[(int)selectList[i]] != null)
  9559. {
  9560. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9561. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9562. {
  9563. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9564. }
  9565. }
  9566. }
  9567. Maid maid = maidArray[j];
  9568. maid.DelProp(MPN.handitem, true);
  9569. maid.DelProp(MPN.accvag, true);
  9570. maid.DelProp(MPN.accanl, true);
  9571. maid.DelProp(MPN.kousoku_upper, true);
  9572. maid.DelProp(MPN.kousoku_lower, true);
  9573. maid.AllProcPropSeqStart();
  9574. isStop[i] = true;
  9575. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9576. isPoseIti[i] = true;
  9577. poseIti[i] = maidArray[i].transform.position;
  9578. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9579. }
  9580. if (isDanceStart14V)
  9581. {
  9582. maidArray[j].SetPos(dancePos[j]);
  9583. maidArray[j].body0.transform.localRotation = danceRot[j];
  9584. }
  9585. if (isDanceStart15V)
  9586. {
  9587. maidArray[j].SetPos(dancePos[j]);
  9588. maidArray[j].body0.transform.localRotation = danceRot[j];
  9589. }
  9590. }
  9591. }
  9592. isDanceStart1F = false;
  9593. isDanceStart1K = false;
  9594. isDanceStart2F = false;
  9595. isDanceStart3F = false;
  9596. isDanceStart3K = false;
  9597. isDanceStart4F = false;
  9598. isDanceStart4K = false;
  9599. isDanceStart5F = false;
  9600. isDanceStart5K = false;
  9601. isDanceStart6F = false;
  9602. isDanceStart6K = false;
  9603. isDanceStart7F = false;
  9604. isDanceStart7V = false;
  9605. isDanceStart8F = false;
  9606. isDanceStart8V = false;
  9607. isDanceStart8P = false;
  9608. isDanceStart9F = false;
  9609. isDanceStart9K = false;
  9610. isDanceStart10F = false;
  9611. isDanceStart11F = false;
  9612. isDanceStart11V = false;
  9613. isDanceStart12F = false;
  9614. isDanceStart13F = false;
  9615. isDanceStart13K = false;
  9616. isDanceStart14F = false;
  9617. isDanceStart14V = false;
  9618. isDanceStart15F = false;
  9619. isDanceStart15V = false;
  9620. for (int j = 0; j < maidCnt; j++)
  9621. {
  9622. danceFace[j] = 0f;
  9623. }
  9624. danceCheckIndex = 0;
  9625. for (int k = 0; k < danceCheck.Length; k++)
  9626. {
  9627. danceCheck[danceCheckIndex] = 1f;
  9628. }
  9629. isDance = false;
  9630. }
  9631. }
  9632. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9633. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9634. {
  9635. if (getModKeyPressing(modKey.Shift))
  9636. {
  9637. isShift = true;
  9638. }
  9639. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9640. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9641. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9642. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9643. if (!isShift)
  9644. {
  9645. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9646. }
  9647. for (int j = 0; j < maidCnt; j++)
  9648. {
  9649. string text5 = "dance_cm3d2_001_f1.anm";
  9650. switch (j)
  9651. {
  9652. case 1:
  9653. case 3:
  9654. case 5:
  9655. case 7:
  9656. case 9:
  9657. case 11:
  9658. case 13:
  9659. text5 = "dance_cm3d2_001_f2.anm";
  9660. break;
  9661. case 2:
  9662. case 4:
  9663. case 6:
  9664. case 8:
  9665. case 10:
  9666. case 12:
  9667. text5 = "dance_cm3d2_001_f3.anm";
  9668. break;
  9669. }
  9670. if (!isShift)
  9671. {
  9672. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9673. {
  9674. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9675. }
  9676. }
  9677. else
  9678. {
  9679. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9680. {
  9681. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9682. GameUty.FileSystem,
  9683. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9684. false,
  9685. false);
  9686. }
  9687. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9688. text4 = textAsset.text;
  9689. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9690. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9691. && !isDanceStart9K && !isDanceStart13K)
  9692. {
  9693. dancePos[j] = maidArray[j].transform.position;
  9694. danceRot[j] = maidArray[j].transform.localRotation;
  9695. }
  9696. }
  9697. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9698. }
  9699. if (!isShift)
  9700. {
  9701. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9702. sw = new Stopwatch();
  9703. sw.Start();
  9704. }
  9705. else if (getModKeyPressing(modKey.Ctrl))
  9706. {
  9707. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9708. }
  9709. else
  9710. {
  9711. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9712. }
  9713. for (int j = 0; j < maidCnt; j++)
  9714. {
  9715. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9716. Vector3 vector = Vector3.zero;
  9717. switch (j)
  9718. {
  9719. case 3:
  9720. vector.x = 1f;
  9721. break;
  9722. case 4:
  9723. vector.x = -1f;
  9724. break;
  9725. case 5:
  9726. vector.x = 2f;
  9727. break;
  9728. case 6:
  9729. vector.x = -2f;
  9730. break;
  9731. case 7:
  9732. vector.x = 3f;
  9733. break;
  9734. case 8:
  9735. vector.x = -3f;
  9736. break;
  9737. case 9:
  9738. vector.x = 4f;
  9739. break;
  9740. case 10:
  9741. vector.x = -4f;
  9742. break;
  9743. case 11:
  9744. vector.x = 5f;
  9745. break;
  9746. case 12:
  9747. vector.x = -5f;
  9748. break;
  9749. case 13:
  9750. vector.x = 6f;
  9751. break;
  9752. }
  9753. if (!isShift)
  9754. {
  9755. maidArray[j].SetPos(vector);
  9756. }
  9757. isStop[j] = false;
  9758. isLock[j] = false;
  9759. pHandL[j] = 0;
  9760. pHandR[j] = 0;
  9761. muneIKL[j] = false;
  9762. muneIKR[j] = false;
  9763. if (!isVR)
  9764. {
  9765. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9766. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9767. }
  9768. }
  9769. ikBui = 5;
  9770. isDanceStart1F = false;
  9771. isDanceStart2F = false;
  9772. isDanceStart3F = false;
  9773. isDanceStart4F = false;
  9774. isDanceStart5F = false;
  9775. isDanceStart6F = false;
  9776. isDanceStart7F = false;
  9777. isDanceStart8F = false;
  9778. isDanceStart9F = false;
  9779. isDanceStart10F = false;
  9780. isDanceStart11F = false;
  9781. isDanceStart12F = false;
  9782. isDanceStart13F = false;
  9783. isDanceStart14F = false;
  9784. isDanceStart15F = false;
  9785. for (int j = 0; j < maidCnt; j++)
  9786. {
  9787. danceFace[j] = 0f;
  9788. }
  9789. if (isDanceStart7V)
  9790. {
  9791. for (int j = 0; j < maidCnt; j++)
  9792. {
  9793. if (maidArray[j] && maidArray[j].Visible)
  9794. {
  9795. if (isDanceStart7V)
  9796. {
  9797. maidArray[j].SetPos(dancePos[j]);
  9798. maidArray[j].body0.transform.localRotation = danceRot[j];
  9799. }
  9800. }
  9801. }
  9802. isDanceStart7V = false;
  9803. }
  9804. if (isDanceStart8V)
  9805. {
  9806. for (int j = 0; j < maidCnt; j++)
  9807. {
  9808. if (maidArray[j] && maidArray[j].Visible)
  9809. {
  9810. if (isDanceStart8V)
  9811. {
  9812. maidArray[j].SetPos(dancePos[j]);
  9813. maidArray[j].body0.transform.localRotation = danceRot[j];
  9814. }
  9815. }
  9816. }
  9817. isDanceStart8V = false;
  9818. isDanceStart8P = false;
  9819. }
  9820. if (isDanceStart11V)
  9821. {
  9822. for (int j = 0; j < maidCnt; j++)
  9823. {
  9824. if (maidArray[j] && maidArray[j].Visible)
  9825. {
  9826. if (isDanceStart11V)
  9827. {
  9828. maidArray[j].SetPos(dancePos[j]);
  9829. maidArray[j].body0.transform.localRotation = danceRot[j];
  9830. }
  9831. }
  9832. }
  9833. isDanceStart11V = false;
  9834. }
  9835. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9836. || isDanceStart13K)
  9837. {
  9838. for (int j = 0; j < maidCnt; j++)
  9839. {
  9840. if (maidArray[j] && maidArray[j].Visible)
  9841. {
  9842. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9843. || isDanceStart13K)
  9844. {
  9845. maidArray[j].SetPos(dancePos[j]);
  9846. maidArray[j].body0.transform.localRotation = danceRot[j];
  9847. int i = j;
  9848. if (!isVR)
  9849. {
  9850. delCount[i] = 20;
  9851. if (goSlot[(int)selectList[i]] != null)
  9852. {
  9853. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9854. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9855. {
  9856. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9857. }
  9858. }
  9859. }
  9860. Maid maid = maidArray[j];
  9861. maid.DelProp(MPN.handitem, true);
  9862. maid.DelProp(MPN.accvag, true);
  9863. maid.DelProp(MPN.accanl, true);
  9864. maid.DelProp(MPN.kousoku_upper, true);
  9865. maid.DelProp(MPN.kousoku_lower, true);
  9866. maid.AllProcPropSeqStart();
  9867. }
  9868. }
  9869. }
  9870. isDanceStart1K = false;
  9871. isDanceStart3K = false;
  9872. isDanceStart4K = false;
  9873. isDanceStart5K = false;
  9874. isDanceStart6K = false;
  9875. isDanceStart9K = false;
  9876. isDanceStart13K = false;
  9877. }
  9878. if (isDanceStart14V)
  9879. {
  9880. for (int j = 0; j < maidCnt; j++)
  9881. {
  9882. if (maidArray[j] && maidArray[j].Visible)
  9883. {
  9884. if (isDanceStart14V)
  9885. {
  9886. maidArray[j].SetPos(dancePos[j]);
  9887. maidArray[j].body0.transform.localRotation = danceRot[j];
  9888. }
  9889. }
  9890. }
  9891. isDanceStart14V = false;
  9892. }
  9893. if (isDanceStart15V)
  9894. {
  9895. for (int j = 0; j < maidCnt; j++)
  9896. {
  9897. if (maidArray[j] && maidArray[j].Visible)
  9898. {
  9899. if (isDanceStart15V)
  9900. {
  9901. maidArray[j].SetPos(dancePos[j]);
  9902. maidArray[j].body0.transform.localRotation = danceRot[j];
  9903. }
  9904. }
  9905. }
  9906. isDanceStart15V = false;
  9907. }
  9908. if (isShift)
  9909. {
  9910. if (maidArray[1] && maidArray[1].Visible)
  9911. {
  9912. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9913. {
  9914. Vector3 vector = Vector3.zero;
  9915. vector.x = 0.6f;
  9916. maidArray[1].SetPos(vector);
  9917. if (maidArray[2] && maidArray[2].Visible)
  9918. {
  9919. vector.x = -0.6f;
  9920. maidArray[2].SetPos(vector);
  9921. }
  9922. if (maidArray[3] && maidArray[3].Visible)
  9923. {
  9924. vector.x = 1.2f;
  9925. maidArray[3].SetPos(vector);
  9926. }
  9927. if (maidArray[4] && maidArray[4].Visible)
  9928. {
  9929. vector.x = -1.2f;
  9930. maidArray[4].SetPos(vector);
  9931. }
  9932. if (maidArray[5] && maidArray[5].Visible)
  9933. {
  9934. vector.x = 1.8f;
  9935. maidArray[5].SetPos(vector);
  9936. }
  9937. if (maidArray[6] && maidArray[6].Visible)
  9938. {
  9939. vector.x = -1.8f;
  9940. maidArray[6].SetPos(vector);
  9941. }
  9942. if (maidArray[7] && maidArray[7].Visible)
  9943. {
  9944. vector.x = 2.4f;
  9945. maidArray[7].SetPos(vector);
  9946. }
  9947. if (maidArray[8] && maidArray[8].Visible)
  9948. {
  9949. vector.x = -2.4f;
  9950. maidArray[8].SetPos(vector);
  9951. }
  9952. if (maidArray[9] && maidArray[9].Visible)
  9953. {
  9954. vector.x = 3f;
  9955. maidArray[9].SetPos(vector);
  9956. }
  9957. if (maidArray[10] && maidArray[10].Visible)
  9958. {
  9959. vector.x = -3f;
  9960. maidArray[10].SetPos(vector);
  9961. }
  9962. if (maidArray[11] && maidArray[11].Visible)
  9963. {
  9964. vector.x = 3.6f;
  9965. maidArray[11].SetPos(vector);
  9966. }
  9967. if (maidArray[12] && maidArray[12].Visible)
  9968. {
  9969. vector.x = -3.6f;
  9970. maidArray[12].SetPos(vector);
  9971. }
  9972. if (maidArray[13] && maidArray[13].Visible)
  9973. {
  9974. vector.x = 4.2f;
  9975. maidArray[13].SetPos(vector);
  9976. }
  9977. }
  9978. }
  9979. isDanceStart1K = true;
  9980. for (int j = 0; j < maidCnt; j++)
  9981. {
  9982. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9983. maidArray[j].body0.transform.localRotation.y + 90f,
  9984. maidArray[j].body0.transform.localRotation.z));
  9985. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9986. maidArray[j].body0.transform.position.y,
  9987. maidArray[j].body0.transform.position.z + 4f));
  9988. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9989. int i = j;
  9990. Maid maid = maidArray[j];
  9991. if (!isVR)
  9992. {
  9993. delCount[i] = 20;
  9994. if (goSlot[(int)selectList[i]] != null)
  9995. {
  9996. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9997. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9998. {
  9999. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10000. }
  10001. }
  10002. }
  10003. string[] array = new string[2];
  10004. array = text2.Split(new char[] { ',' });
  10005. maid.DelProp(MPN.handitem, true);
  10006. maid.DelProp(MPN.accvag, true);
  10007. maid.DelProp(MPN.accanl, true);
  10008. maid.DelProp(MPN.kousoku_upper, true);
  10009. maid.DelProp(MPN.kousoku_lower, true);
  10010. if (array[0] != "")
  10011. {
  10012. maid.SetProp(array[0], array[1], 0, true, false);
  10013. }
  10014. maid.AllProcPropSeqStart();
  10015. }
  10016. }
  10017. isDance = true;
  10018. isDanceStart1 = true;
  10019. }
  10020. if (isF2)
  10021. {
  10022. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10023. string text4 = textAsset.text;
  10024. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10025. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10026. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10027. for (int j = 0; j < maidCnt; j++)
  10028. {
  10029. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10030. {
  10031. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10032. GameUty.FileSystem,
  10033. "dance_cm3d_001_f1.anm",
  10034. false,
  10035. false);
  10036. }
  10037. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10038. }
  10039. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10040. for (int j = 0; j < maidCnt; j++)
  10041. {
  10042. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10043. isStop[j] = false;
  10044. isLock[j] = false;
  10045. pHandL[j] = 0;
  10046. pHandR[j] = 0;
  10047. muneIKL[j] = false;
  10048. muneIKR[j] = false;
  10049. if (!isVR)
  10050. {
  10051. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10052. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10053. }
  10054. }
  10055. ikBui = 5;
  10056. isDanceStart1F = false;
  10057. isDanceStart2F = false;
  10058. isDanceStart3F = false;
  10059. isDanceStart4F = false;
  10060. isDanceStart5F = false;
  10061. isDanceStart6F = false;
  10062. isDanceStart7F = false;
  10063. isDanceStart8F = false;
  10064. isDanceStart9F = false;
  10065. isDanceStart10F = false;
  10066. isDanceStart11F = false;
  10067. isDanceStart12F = false;
  10068. isDanceStart13F = false;
  10069. isDanceStart14F = false;
  10070. isDanceStart15F = false;
  10071. for (int j = 0; j < maidCnt; j++)
  10072. {
  10073. danceFace[j] = 0f;
  10074. }
  10075. if (isDanceStart7V)
  10076. {
  10077. for (int j = 0; j < maidCnt; j++)
  10078. {
  10079. if (maidArray[j] && maidArray[j].Visible)
  10080. {
  10081. if (isDanceStart7V)
  10082. {
  10083. maidArray[j].SetPos(dancePos[j]);
  10084. maidArray[j].body0.transform.localRotation = danceRot[j];
  10085. }
  10086. }
  10087. }
  10088. isDanceStart7V = false;
  10089. }
  10090. if (isDanceStart8V)
  10091. {
  10092. for (int j = 0; j < maidCnt; j++)
  10093. {
  10094. if (maidArray[j] && maidArray[j].Visible)
  10095. {
  10096. if (isDanceStart8V)
  10097. {
  10098. maidArray[j].SetPos(dancePos[j]);
  10099. maidArray[j].body0.transform.localRotation = danceRot[j];
  10100. }
  10101. }
  10102. }
  10103. isDanceStart8V = false;
  10104. isDanceStart8P = false;
  10105. }
  10106. if (isDanceStart11V)
  10107. {
  10108. for (int j = 0; j < maidCnt; j++)
  10109. {
  10110. if (maidArray[j] && maidArray[j].Visible)
  10111. {
  10112. if (isDanceStart11V)
  10113. {
  10114. maidArray[j].SetPos(dancePos[j]);
  10115. maidArray[j].body0.transform.localRotation = danceRot[j];
  10116. }
  10117. }
  10118. }
  10119. isDanceStart11V = false;
  10120. }
  10121. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10122. || isDanceStart13K)
  10123. {
  10124. for (int j = 0; j < maidCnt; j++)
  10125. {
  10126. if (maidArray[j] && maidArray[j].Visible)
  10127. {
  10128. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10129. || isDanceStart13K)
  10130. {
  10131. maidArray[j].SetPos(dancePos[j]);
  10132. maidArray[j].body0.transform.localRotation = danceRot[j];
  10133. int i = j;
  10134. if (!isVR)
  10135. {
  10136. delCount[i] = 20;
  10137. if (goSlot[(int)selectList[i]] != null)
  10138. {
  10139. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10140. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10141. {
  10142. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10143. }
  10144. }
  10145. }
  10146. Maid maid = maidArray[j];
  10147. maid.DelProp(MPN.handitem, true);
  10148. maid.DelProp(MPN.accvag, true);
  10149. maid.DelProp(MPN.accanl, true);
  10150. maid.DelProp(MPN.kousoku_upper, true);
  10151. maid.DelProp(MPN.kousoku_lower, true);
  10152. maid.AllProcPropSeqStart();
  10153. }
  10154. }
  10155. }
  10156. isDanceStart1K = false;
  10157. isDanceStart3K = false;
  10158. isDanceStart4K = false;
  10159. isDanceStart5K = false;
  10160. isDanceStart6K = false;
  10161. isDanceStart9K = false;
  10162. isDanceStart13K = false;
  10163. }
  10164. if (isDanceStart14V)
  10165. {
  10166. for (int j = 0; j < maidCnt; j++)
  10167. {
  10168. if (maidArray[j] && maidArray[j].Visible)
  10169. {
  10170. if (isDanceStart14V)
  10171. {
  10172. maidArray[j].SetPos(dancePos[j]);
  10173. maidArray[j].body0.transform.localRotation = danceRot[j];
  10174. }
  10175. }
  10176. }
  10177. isDanceStart14V = false;
  10178. }
  10179. if (isDanceStart15V)
  10180. {
  10181. for (int j = 0; j < maidCnt; j++)
  10182. {
  10183. if (maidArray[j] && maidArray[j].Visible)
  10184. {
  10185. if (isDanceStart15V)
  10186. {
  10187. maidArray[j].SetPos(dancePos[j]);
  10188. maidArray[j].body0.transform.localRotation = danceRot[j];
  10189. }
  10190. }
  10191. }
  10192. isDanceStart15V = false;
  10193. }
  10194. if (maidArray[1] && maidArray[1].Visible)
  10195. {
  10196. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10197. {
  10198. Vector3 vector = Vector3.zero;
  10199. vector.x = 0.6f;
  10200. maidArray[1].SetPos(vector);
  10201. if (maidArray[2] && maidArray[2].Visible)
  10202. {
  10203. vector.x = -0.6f;
  10204. maidArray[2].SetPos(vector);
  10205. }
  10206. if (maidArray[3] && maidArray[3].Visible)
  10207. {
  10208. vector.x = 1.2f;
  10209. maidArray[3].SetPos(vector);
  10210. }
  10211. if (maidArray[4] && maidArray[4].Visible)
  10212. {
  10213. vector.x = -1.2f;
  10214. maidArray[4].SetPos(vector);
  10215. }
  10216. if (maidArray[5] && maidArray[5].Visible)
  10217. {
  10218. vector.x = 1.8f;
  10219. maidArray[5].SetPos(vector);
  10220. }
  10221. if (maidArray[6] && maidArray[6].Visible)
  10222. {
  10223. vector.x = -1.8f;
  10224. maidArray[6].SetPos(vector);
  10225. }
  10226. if (maidArray[7] && maidArray[7].Visible)
  10227. {
  10228. vector.x = 2.4f;
  10229. maidArray[7].SetPos(vector);
  10230. }
  10231. if (maidArray[8] && maidArray[8].Visible)
  10232. {
  10233. vector.x = -2.4f;
  10234. maidArray[8].SetPos(vector);
  10235. }
  10236. if (maidArray[9] && maidArray[9].Visible)
  10237. {
  10238. vector.x = 3f;
  10239. maidArray[9].SetPos(vector);
  10240. }
  10241. if (maidArray[10] && maidArray[10].Visible)
  10242. {
  10243. vector.x = -3f;
  10244. maidArray[10].SetPos(vector);
  10245. }
  10246. if (maidArray[11] && maidArray[11].Visible)
  10247. {
  10248. vector.x = 3.6f;
  10249. maidArray[11].SetPos(vector);
  10250. }
  10251. if (maidArray[12] && maidArray[12].Visible)
  10252. {
  10253. vector.x = -3.6f;
  10254. maidArray[12].SetPos(vector);
  10255. }
  10256. if (maidArray[13] && maidArray[13].Visible)
  10257. {
  10258. vector.x = 4.2f;
  10259. maidArray[13].SetPos(vector);
  10260. }
  10261. }
  10262. }
  10263. isDance = true;
  10264. isDanceStart2 = true;
  10265. isF2 = false;
  10266. }
  10267. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10268. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10269. {
  10270. GameMain.Instance.SoundMgr.StopBGM(0f);
  10271. isF2 = true;
  10272. }
  10273. if (isF3)
  10274. {
  10275. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10276. string text4 = textAsset.text;
  10277. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10278. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10279. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10280. for (int j = 0; j < maidCnt; j++)
  10281. {
  10282. if (!isShift)
  10283. {
  10284. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10285. {
  10286. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10287. GameUty.FileSystem,
  10288. "dance_cm3d_002_end_f1.anm",
  10289. false,
  10290. false);
  10291. }
  10292. }
  10293. else
  10294. {
  10295. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10296. {
  10297. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10298. GameUty.FileSystem,
  10299. "dance_cm3d2_kara_001_sl_f1.anm",
  10300. false,
  10301. false);
  10302. }
  10303. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10304. text4 = textAsset.text;
  10305. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10306. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10307. && !isDanceStart9K && !isDanceStart13K)
  10308. {
  10309. dancePos[j] = maidArray[j].transform.position;
  10310. danceRot[j] = maidArray[j].transform.localRotation;
  10311. }
  10312. }
  10313. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10314. }
  10315. if (!isShift)
  10316. {
  10317. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10318. }
  10319. else
  10320. {
  10321. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10322. }
  10323. for (int j = 0; j < maidCnt; j++)
  10324. {
  10325. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10326. isStop[j] = false;
  10327. isLock[j] = false;
  10328. pHandL[j] = 0;
  10329. pHandR[j] = 0;
  10330. muneIKL[j] = false;
  10331. muneIKR[j] = false;
  10332. if (!isVR)
  10333. {
  10334. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10335. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10336. }
  10337. }
  10338. ikBui = 5;
  10339. isDanceStart1F = false;
  10340. isDanceStart2F = false;
  10341. isDanceStart3F = false;
  10342. isDanceStart4F = false;
  10343. isDanceStart5F = false;
  10344. isDanceStart6F = false;
  10345. isDanceStart7F = false;
  10346. isDanceStart8F = false;
  10347. isDanceStart9F = false;
  10348. isDanceStart10F = false;
  10349. isDanceStart11F = false;
  10350. isDanceStart12F = false;
  10351. isDanceStart13F = false;
  10352. isDanceStart14F = false;
  10353. isDanceStart15F = false;
  10354. for (int j = 0; j < maidCnt; j++)
  10355. {
  10356. danceFace[j] = 0f;
  10357. }
  10358. if (isDanceStart7V)
  10359. {
  10360. for (int j = 0; j < maidCnt; j++)
  10361. {
  10362. if (maidArray[j] && maidArray[j].Visible)
  10363. {
  10364. if (isDanceStart7V)
  10365. {
  10366. maidArray[j].SetPos(dancePos[j]);
  10367. maidArray[j].body0.transform.localRotation = danceRot[j];
  10368. }
  10369. }
  10370. }
  10371. isDanceStart7V = false;
  10372. }
  10373. if (isDanceStart8V)
  10374. {
  10375. for (int j = 0; j < maidCnt; j++)
  10376. {
  10377. if (maidArray[j] && maidArray[j].Visible)
  10378. {
  10379. if (isDanceStart8V)
  10380. {
  10381. maidArray[j].SetPos(dancePos[j]);
  10382. maidArray[j].body0.transform.localRotation = danceRot[j];
  10383. }
  10384. }
  10385. }
  10386. isDanceStart8V = false;
  10387. isDanceStart8P = false;
  10388. }
  10389. if (isDanceStart11V)
  10390. {
  10391. for (int j = 0; j < maidCnt; j++)
  10392. {
  10393. if (maidArray[j] && maidArray[j].Visible)
  10394. {
  10395. if (isDanceStart11V)
  10396. {
  10397. maidArray[j].SetPos(dancePos[j]);
  10398. maidArray[j].body0.transform.localRotation = danceRot[j];
  10399. }
  10400. }
  10401. }
  10402. isDanceStart11V = false;
  10403. }
  10404. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10405. || isDanceStart13K)
  10406. {
  10407. for (int j = 0; j < maidCnt; j++)
  10408. {
  10409. if (maidArray[j] && maidArray[j].Visible)
  10410. {
  10411. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10412. || isDanceStart13K)
  10413. {
  10414. maidArray[j].SetPos(dancePos[j]);
  10415. maidArray[j].body0.transform.localRotation = danceRot[j];
  10416. int i = j;
  10417. if (!isVR)
  10418. {
  10419. delCount[i] = 20;
  10420. if (goSlot[(int)selectList[i]] != null)
  10421. {
  10422. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10423. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10424. {
  10425. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10426. }
  10427. }
  10428. }
  10429. Maid maid = maidArray[j];
  10430. maid.DelProp(MPN.handitem, true);
  10431. maid.DelProp(MPN.accvag, true);
  10432. maid.DelProp(MPN.accanl, true);
  10433. maid.DelProp(MPN.kousoku_upper, true);
  10434. maid.DelProp(MPN.kousoku_lower, true);
  10435. maid.AllProcPropSeqStart();
  10436. }
  10437. }
  10438. }
  10439. isDanceStart1K = false;
  10440. isDanceStart3K = false;
  10441. isDanceStart4K = false;
  10442. isDanceStart5K = false;
  10443. isDanceStart6K = false;
  10444. isDanceStart9K = false;
  10445. isDanceStart13K = false;
  10446. }
  10447. if (isDanceStart14V)
  10448. {
  10449. for (int j = 0; j < maidCnt; j++)
  10450. {
  10451. if (maidArray[j] && maidArray[j].Visible)
  10452. {
  10453. if (isDanceStart14V)
  10454. {
  10455. maidArray[j].SetPos(dancePos[j]);
  10456. maidArray[j].body0.transform.localRotation = danceRot[j];
  10457. }
  10458. }
  10459. }
  10460. isDanceStart14V = false;
  10461. }
  10462. if (isDanceStart15V)
  10463. {
  10464. for (int j = 0; j < maidCnt; j++)
  10465. {
  10466. if (maidArray[j] && maidArray[j].Visible)
  10467. {
  10468. if (isDanceStart15V)
  10469. {
  10470. maidArray[j].SetPos(dancePos[j]);
  10471. maidArray[j].body0.transform.localRotation = danceRot[j];
  10472. }
  10473. }
  10474. }
  10475. isDanceStart15V = false;
  10476. }
  10477. if (maidArray[1] && maidArray[1].Visible)
  10478. {
  10479. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10480. {
  10481. Vector3 vector = Vector3.zero;
  10482. vector.x = 0.6f;
  10483. maidArray[1].SetPos(vector);
  10484. if (maidArray[2] && maidArray[2].Visible)
  10485. {
  10486. vector.x = -0.6f;
  10487. maidArray[2].SetPos(vector);
  10488. }
  10489. if (maidArray[3] && maidArray[3].Visible)
  10490. {
  10491. vector.x = 1.2f;
  10492. maidArray[3].SetPos(vector);
  10493. }
  10494. if (maidArray[4] && maidArray[4].Visible)
  10495. {
  10496. vector.x = -1.2f;
  10497. maidArray[4].SetPos(vector);
  10498. }
  10499. if (maidArray[5] && maidArray[5].Visible)
  10500. {
  10501. vector.x = 1.8f;
  10502. maidArray[5].SetPos(vector);
  10503. }
  10504. if (maidArray[6] && maidArray[6].Visible)
  10505. {
  10506. vector.x = -1.8f;
  10507. maidArray[6].SetPos(vector);
  10508. }
  10509. if (maidArray[7] && maidArray[7].Visible)
  10510. {
  10511. vector.x = 2.4f;
  10512. maidArray[7].SetPos(vector);
  10513. }
  10514. if (maidArray[8] && maidArray[8].Visible)
  10515. {
  10516. vector.x = -2.4f;
  10517. maidArray[8].SetPos(vector);
  10518. }
  10519. if (maidArray[9] && maidArray[9].Visible)
  10520. {
  10521. vector.x = 3f;
  10522. maidArray[9].SetPos(vector);
  10523. }
  10524. if (maidArray[10] && maidArray[10].Visible)
  10525. {
  10526. vector.x = -3f;
  10527. maidArray[10].SetPos(vector);
  10528. }
  10529. if (maidArray[11] && maidArray[11].Visible)
  10530. {
  10531. vector.x = 3.6f;
  10532. maidArray[11].SetPos(vector);
  10533. }
  10534. if (maidArray[12] && maidArray[12].Visible)
  10535. {
  10536. vector.x = -3.6f;
  10537. maidArray[12].SetPos(vector);
  10538. }
  10539. if (maidArray[13] && maidArray[13].Visible)
  10540. {
  10541. vector.x = 4.2f;
  10542. maidArray[13].SetPos(vector);
  10543. }
  10544. }
  10545. }
  10546. if (isShift)
  10547. {
  10548. isDanceStart3K = true;
  10549. for (int j = 0; j < maidCnt; j++)
  10550. {
  10551. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10552. maidArray[j].body0.transform.localRotation.y + 90f,
  10553. maidArray[j].body0.transform.localRotation.z));
  10554. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10555. maidArray[j].body0.transform.position.y,
  10556. maidArray[j].body0.transform.position.z + 4f));
  10557. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10558. int i = j;
  10559. Maid maid = maidArray[j];
  10560. if (!isVR)
  10561. {
  10562. delCount[i] = 20;
  10563. if (goSlot[(int)selectList[i]] != null)
  10564. {
  10565. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10566. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10567. {
  10568. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10569. }
  10570. }
  10571. }
  10572. string[] array = new string[2];
  10573. array = text2.Split(new char[] { ',' });
  10574. maid.DelProp(MPN.handitem, true);
  10575. maid.DelProp(MPN.accvag, true);
  10576. maid.DelProp(MPN.accanl, true);
  10577. maid.DelProp(MPN.kousoku_upper, true);
  10578. maid.DelProp(MPN.kousoku_lower, true);
  10579. if (array[0] != "")
  10580. {
  10581. maid.SetProp(array[0], array[1], 0, true, false);
  10582. }
  10583. maid.AllProcPropSeqStart();
  10584. }
  10585. }
  10586. isDance = true;
  10587. isDanceStart3 = true;
  10588. isF3 = false;
  10589. }
  10590. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10591. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10592. {
  10593. GameMain.Instance.SoundMgr.StopBGM(0f);
  10594. isF3 = true;
  10595. if (getModKeyPressing(modKey.Shift))
  10596. {
  10597. isShift = true;
  10598. }
  10599. }
  10600. if (isSF1 || isSF2 || isSF3)
  10601. {
  10602. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10603. string text4 = textAsset.text;
  10604. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10605. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10606. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10607. for (int j = 0; j < maidCnt; j++)
  10608. {
  10609. if (!isShift)
  10610. {
  10611. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10612. {
  10613. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10614. GameUty.FileSystem,
  10615. "dance_cm3d2_002_smt_f.anm",
  10616. false,
  10617. false);
  10618. }
  10619. }
  10620. else
  10621. {
  10622. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10623. {
  10624. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10625. GameUty.FileSystem,
  10626. "dance_cm3d2_kara02_001_smt_f1.anm",
  10627. false,
  10628. false);
  10629. }
  10630. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10631. text4 = textAsset.text;
  10632. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10633. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10634. && !isDanceStart9K && !isDanceStart13K)
  10635. {
  10636. dancePos[j] = maidArray[j].transform.position;
  10637. danceRot[j] = maidArray[j].transform.localRotation;
  10638. }
  10639. }
  10640. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10641. }
  10642. if (!isShift)
  10643. {
  10644. if (isSF1)
  10645. {
  10646. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10647. }
  10648. if (isSF2)
  10649. {
  10650. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10651. }
  10652. if (isSF3)
  10653. {
  10654. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10655. }
  10656. }
  10657. else
  10658. {
  10659. if (isSF1)
  10660. {
  10661. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10662. }
  10663. if (isSF2)
  10664. {
  10665. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10666. }
  10667. if (isSF3)
  10668. {
  10669. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10670. }
  10671. }
  10672. for (int j = 0; j < maidCnt; j++)
  10673. {
  10674. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10675. isStop[j] = false;
  10676. isLock[j] = false;
  10677. pHandL[j] = 0;
  10678. pHandR[j] = 0;
  10679. muneIKL[j] = false;
  10680. muneIKR[j] = false;
  10681. if (!isVR)
  10682. {
  10683. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10684. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10685. }
  10686. }
  10687. ikBui = 5;
  10688. isDanceStart1F = false;
  10689. isDanceStart2F = false;
  10690. isDanceStart3F = false;
  10691. isDanceStart4F = false;
  10692. isDanceStart5F = false;
  10693. isDanceStart6F = false;
  10694. isDanceStart7F = false;
  10695. isDanceStart8F = false;
  10696. isDanceStart9F = false;
  10697. isDanceStart10F = false;
  10698. isDanceStart11F = false;
  10699. isDanceStart12F = false;
  10700. isDanceStart13F = false;
  10701. isDanceStart14F = false;
  10702. isDanceStart15F = false;
  10703. for (int j = 0; j < maidCnt; j++)
  10704. {
  10705. danceFace[j] = 0f;
  10706. }
  10707. if (isDanceStart7V)
  10708. {
  10709. for (int j = 0; j < maidCnt; j++)
  10710. {
  10711. if (maidArray[j] && maidArray[j].Visible)
  10712. {
  10713. if (isDanceStart7V)
  10714. {
  10715. maidArray[j].SetPos(dancePos[j]);
  10716. maidArray[j].body0.transform.localRotation = danceRot[j];
  10717. }
  10718. }
  10719. }
  10720. isDanceStart7V = false;
  10721. }
  10722. if (isDanceStart8V)
  10723. {
  10724. for (int j = 0; j < maidCnt; j++)
  10725. {
  10726. if (maidArray[j] && maidArray[j].Visible)
  10727. {
  10728. if (isDanceStart8V)
  10729. {
  10730. maidArray[j].SetPos(dancePos[j]);
  10731. maidArray[j].body0.transform.localRotation = danceRot[j];
  10732. }
  10733. }
  10734. }
  10735. isDanceStart8V = false;
  10736. isDanceStart8P = false;
  10737. }
  10738. if (isDanceStart11V)
  10739. {
  10740. for (int j = 0; j < maidCnt; j++)
  10741. {
  10742. if (maidArray[j] && maidArray[j].Visible)
  10743. {
  10744. if (isDanceStart11V)
  10745. {
  10746. maidArray[j].SetPos(dancePos[j]);
  10747. maidArray[j].body0.transform.localRotation = danceRot[j];
  10748. }
  10749. }
  10750. }
  10751. isDanceStart11V = false;
  10752. }
  10753. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10754. || isDanceStart13K)
  10755. {
  10756. for (int j = 0; j < maidCnt; j++)
  10757. {
  10758. if (maidArray[j] && maidArray[j].Visible)
  10759. {
  10760. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10761. || isDanceStart13K)
  10762. {
  10763. maidArray[j].SetPos(dancePos[j]);
  10764. maidArray[j].body0.transform.localRotation = danceRot[j];
  10765. int i = j;
  10766. if (!isVR)
  10767. {
  10768. delCount[i] = 20;
  10769. if (goSlot[(int)selectList[i]] != null)
  10770. {
  10771. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10772. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10773. {
  10774. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10775. }
  10776. }
  10777. }
  10778. Maid maid = maidArray[j];
  10779. maid.DelProp(MPN.handitem, true);
  10780. maid.DelProp(MPN.accvag, true);
  10781. maid.DelProp(MPN.accanl, true);
  10782. maid.DelProp(MPN.kousoku_upper, true);
  10783. maid.DelProp(MPN.kousoku_lower, true);
  10784. maid.AllProcPropSeqStart();
  10785. }
  10786. }
  10787. }
  10788. isDanceStart1K = false;
  10789. isDanceStart3K = false;
  10790. isDanceStart4K = false;
  10791. isDanceStart5K = false;
  10792. isDanceStart6K = false;
  10793. isDanceStart9K = false;
  10794. isDanceStart13K = false;
  10795. }
  10796. if (isDanceStart14V)
  10797. {
  10798. for (int j = 0; j < maidCnt; j++)
  10799. {
  10800. if (maidArray[j] && maidArray[j].Visible)
  10801. {
  10802. if (isDanceStart14V)
  10803. {
  10804. maidArray[j].SetPos(dancePos[j]);
  10805. maidArray[j].body0.transform.localRotation = danceRot[j];
  10806. }
  10807. }
  10808. }
  10809. isDanceStart14V = false;
  10810. }
  10811. if (isDanceStart15V)
  10812. {
  10813. for (int j = 0; j < maidCnt; j++)
  10814. {
  10815. if (maidArray[j] && maidArray[j].Visible)
  10816. {
  10817. if (isDanceStart15V)
  10818. {
  10819. maidArray[j].SetPos(dancePos[j]);
  10820. maidArray[j].body0.transform.localRotation = danceRot[j];
  10821. }
  10822. }
  10823. }
  10824. isDanceStart15V = false;
  10825. }
  10826. if (maidArray[1] && maidArray[1].Visible)
  10827. {
  10828. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10829. {
  10830. Vector3 vector = Vector3.zero;
  10831. vector.x = 0.6f;
  10832. maidArray[1].SetPos(vector);
  10833. if (maidArray[2] && maidArray[2].Visible)
  10834. {
  10835. vector.x = -0.6f;
  10836. maidArray[2].SetPos(vector);
  10837. }
  10838. if (maidArray[3] && maidArray[3].Visible)
  10839. {
  10840. vector.x = 1.2f;
  10841. maidArray[3].SetPos(vector);
  10842. }
  10843. if (maidArray[4] && maidArray[4].Visible)
  10844. {
  10845. vector.x = -1.2f;
  10846. maidArray[4].SetPos(vector);
  10847. }
  10848. if (maidArray[5] && maidArray[5].Visible)
  10849. {
  10850. vector.x = 1.8f;
  10851. maidArray[5].SetPos(vector);
  10852. }
  10853. if (maidArray[6] && maidArray[6].Visible)
  10854. {
  10855. vector.x = -1.8f;
  10856. maidArray[6].SetPos(vector);
  10857. }
  10858. if (maidArray[7] && maidArray[7].Visible)
  10859. {
  10860. vector.x = 2.4f;
  10861. maidArray[7].SetPos(vector);
  10862. }
  10863. if (maidArray[8] && maidArray[8].Visible)
  10864. {
  10865. vector.x = -2.4f;
  10866. maidArray[8].SetPos(vector);
  10867. }
  10868. if (maidArray[9] && maidArray[9].Visible)
  10869. {
  10870. vector.x = 3f;
  10871. maidArray[9].SetPos(vector);
  10872. }
  10873. if (maidArray[10] && maidArray[10].Visible)
  10874. {
  10875. vector.x = -3f;
  10876. maidArray[10].SetPos(vector);
  10877. }
  10878. if (maidArray[11] && maidArray[11].Visible)
  10879. {
  10880. vector.x = 3.6f;
  10881. maidArray[11].SetPos(vector);
  10882. }
  10883. if (maidArray[12] && maidArray[12].Visible)
  10884. {
  10885. vector.x = -3.6f;
  10886. maidArray[12].SetPos(vector);
  10887. }
  10888. if (maidArray[13] && maidArray[13].Visible)
  10889. {
  10890. vector.x = 4.2f;
  10891. maidArray[13].SetPos(vector);
  10892. }
  10893. }
  10894. }
  10895. if (isShift)
  10896. {
  10897. isDanceStart4K = true;
  10898. for (int j = 0; j < maidCnt; j++)
  10899. {
  10900. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10901. maidArray[j].body0.transform.localRotation.y + 90f,
  10902. maidArray[j].body0.transform.localRotation.z));
  10903. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10904. maidArray[j].body0.transform.position.y,
  10905. maidArray[j].body0.transform.position.z + 4f));
  10906. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10907. int i = j;
  10908. Maid maid = maidArray[j];
  10909. if (!isVR)
  10910. {
  10911. delCount[i] = 20;
  10912. if (goSlot[(int)selectList[i]] != null)
  10913. {
  10914. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10915. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10916. {
  10917. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10918. }
  10919. }
  10920. }
  10921. string[] array = new string[2];
  10922. array = text2.Split(new char[] { ',' });
  10923. maid.DelProp(MPN.handitem, true);
  10924. maid.DelProp(MPN.accvag, true);
  10925. maid.DelProp(MPN.accanl, true);
  10926. maid.DelProp(MPN.kousoku_upper, true);
  10927. maid.DelProp(MPN.kousoku_lower, true);
  10928. if (array[0] != "")
  10929. {
  10930. maid.SetProp(array[0], array[1], 0, true, false);
  10931. }
  10932. maid.AllProcPropSeqStart();
  10933. }
  10934. }
  10935. isDance = true;
  10936. isDanceStart4 = true;
  10937. isSF1 = false;
  10938. isSF2 = false;
  10939. isSF3 = false;
  10940. }
  10941. if (isHS1 || isHS2 || isHS3)
  10942. {
  10943. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10944. string text4 = textAsset.text;
  10945. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10946. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10947. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10948. for (int j = 0; j < maidCnt; j++)
  10949. {
  10950. if (!isShift)
  10951. {
  10952. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10953. {
  10954. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10955. GameUty.FileSystem,
  10956. "dance_cm3d2_003_hs_f1.anm",
  10957. false,
  10958. false);
  10959. }
  10960. }
  10961. else
  10962. {
  10963. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10964. {
  10965. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10966. GameUty.FileSystem,
  10967. "dance_cm3d2_kara02_003_hs_f1.anm",
  10968. false,
  10969. false);
  10970. }
  10971. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10972. text4 = textAsset.text;
  10973. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10974. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10975. && !isDanceStart9K && !isDanceStart13K)
  10976. {
  10977. dancePos[j] = maidArray[j].transform.position;
  10978. danceRot[j] = maidArray[j].transform.localRotation;
  10979. }
  10980. }
  10981. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10982. }
  10983. if (!isShift)
  10984. {
  10985. if (isHS1)
  10986. {
  10987. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10988. }
  10989. if (isHS2)
  10990. {
  10991. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10992. }
  10993. if (isHS3)
  10994. {
  10995. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10996. }
  10997. }
  10998. else
  10999. {
  11000. if (isHS1)
  11001. {
  11002. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11003. }
  11004. if (isHS2)
  11005. {
  11006. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11007. }
  11008. if (isHS3)
  11009. {
  11010. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11011. }
  11012. }
  11013. for (int j = 0; j < maidCnt; j++)
  11014. {
  11015. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11016. isStop[j] = false;
  11017. isLock[j] = false;
  11018. pHandL[j] = 0;
  11019. pHandR[j] = 0;
  11020. muneIKL[j] = false;
  11021. muneIKR[j] = false;
  11022. if (!isVR)
  11023. {
  11024. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11025. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11026. }
  11027. }
  11028. ikBui = 5;
  11029. isDanceStart1F = false;
  11030. isDanceStart2F = false;
  11031. isDanceStart3F = false;
  11032. isDanceStart4F = false;
  11033. isDanceStart5F = false;
  11034. isDanceStart6F = false;
  11035. isDanceStart7F = false;
  11036. isDanceStart8F = false;
  11037. isDanceStart9F = false;
  11038. isDanceStart10F = false;
  11039. isDanceStart11F = false;
  11040. isDanceStart12F = false;
  11041. isDanceStart13F = false;
  11042. isDanceStart14F = false;
  11043. isDanceStart15F = false;
  11044. for (int j = 0; j < maidCnt; j++)
  11045. {
  11046. danceFace[j] = 0f;
  11047. }
  11048. if (isDanceStart7V)
  11049. {
  11050. for (int j = 0; j < maidCnt; j++)
  11051. {
  11052. if (maidArray[j] && maidArray[j].Visible)
  11053. {
  11054. if (isDanceStart7V)
  11055. {
  11056. maidArray[j].SetPos(dancePos[j]);
  11057. maidArray[j].body0.transform.localRotation = danceRot[j];
  11058. }
  11059. }
  11060. }
  11061. isDanceStart7V = false;
  11062. }
  11063. if (isDanceStart8V)
  11064. {
  11065. for (int j = 0; j < maidCnt; j++)
  11066. {
  11067. if (maidArray[j] && maidArray[j].Visible)
  11068. {
  11069. if (isDanceStart8V)
  11070. {
  11071. maidArray[j].SetPos(dancePos[j]);
  11072. maidArray[j].body0.transform.localRotation = danceRot[j];
  11073. }
  11074. }
  11075. }
  11076. isDanceStart8V = false;
  11077. isDanceStart8P = false;
  11078. }
  11079. if (isDanceStart11V)
  11080. {
  11081. for (int j = 0; j < maidCnt; j++)
  11082. {
  11083. if (maidArray[j] && maidArray[j].Visible)
  11084. {
  11085. if (isDanceStart11V)
  11086. {
  11087. maidArray[j].SetPos(dancePos[j]);
  11088. maidArray[j].body0.transform.localRotation = danceRot[j];
  11089. }
  11090. }
  11091. }
  11092. isDanceStart11V = false;
  11093. }
  11094. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11095. || isDanceStart13K)
  11096. {
  11097. for (int j = 0; j < maidCnt; j++)
  11098. {
  11099. if (maidArray[j] && maidArray[j].Visible)
  11100. {
  11101. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11102. || isDanceStart13K)
  11103. {
  11104. maidArray[j].SetPos(dancePos[j]);
  11105. maidArray[j].body0.transform.localRotation = danceRot[j];
  11106. int i = j;
  11107. if (!isVR)
  11108. {
  11109. delCount[i] = 20;
  11110. if (goSlot[(int)selectList[i]] != null)
  11111. {
  11112. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11113. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11114. {
  11115. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11116. }
  11117. }
  11118. }
  11119. Maid maid = maidArray[j];
  11120. maid.DelProp(MPN.handitem, true);
  11121. maid.DelProp(MPN.accvag, true);
  11122. maid.DelProp(MPN.accanl, true);
  11123. maid.DelProp(MPN.kousoku_upper, true);
  11124. maid.DelProp(MPN.kousoku_lower, true);
  11125. maid.AllProcPropSeqStart();
  11126. }
  11127. }
  11128. }
  11129. isDanceStart1K = false;
  11130. isDanceStart3K = false;
  11131. isDanceStart4K = false;
  11132. isDanceStart5K = false;
  11133. isDanceStart6K = false;
  11134. isDanceStart9K = false;
  11135. isDanceStart13K = false;
  11136. }
  11137. if (isDanceStart14V)
  11138. {
  11139. for (int j = 0; j < maidCnt; j++)
  11140. {
  11141. if (maidArray[j] && maidArray[j].Visible)
  11142. {
  11143. if (isDanceStart14V)
  11144. {
  11145. maidArray[j].SetPos(dancePos[j]);
  11146. maidArray[j].body0.transform.localRotation = danceRot[j];
  11147. }
  11148. }
  11149. }
  11150. isDanceStart14V = false;
  11151. }
  11152. if (isDanceStart15V)
  11153. {
  11154. for (int j = 0; j < maidCnt; j++)
  11155. {
  11156. if (maidArray[j] && maidArray[j].Visible)
  11157. {
  11158. if (isDanceStart15V)
  11159. {
  11160. maidArray[j].SetPos(dancePos[j]);
  11161. maidArray[j].body0.transform.localRotation = danceRot[j];
  11162. }
  11163. }
  11164. }
  11165. isDanceStart15V = false;
  11166. }
  11167. if (maidArray[1] && maidArray[1].Visible)
  11168. {
  11169. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11170. {
  11171. Vector3 vector = Vector3.zero;
  11172. vector.x = 0.6f;
  11173. maidArray[1].SetPos(vector);
  11174. if (maidArray[2] && maidArray[2].Visible)
  11175. {
  11176. vector.x = -0.6f;
  11177. maidArray[2].SetPos(vector);
  11178. }
  11179. if (maidArray[3] && maidArray[3].Visible)
  11180. {
  11181. vector.x = 1.2f;
  11182. maidArray[3].SetPos(vector);
  11183. }
  11184. if (maidArray[4] && maidArray[4].Visible)
  11185. {
  11186. vector.x = -1.2f;
  11187. maidArray[4].SetPos(vector);
  11188. }
  11189. if (maidArray[5] && maidArray[5].Visible)
  11190. {
  11191. vector.x = 1.8f;
  11192. maidArray[5].SetPos(vector);
  11193. }
  11194. if (maidArray[6] && maidArray[6].Visible)
  11195. {
  11196. vector.x = -1.8f;
  11197. maidArray[6].SetPos(vector);
  11198. }
  11199. if (maidArray[7] && maidArray[7].Visible)
  11200. {
  11201. vector.x = 2.4f;
  11202. maidArray[7].SetPos(vector);
  11203. }
  11204. if (maidArray[8] && maidArray[8].Visible)
  11205. {
  11206. vector.x = -2.4f;
  11207. maidArray[8].SetPos(vector);
  11208. }
  11209. if (maidArray[9] && maidArray[9].Visible)
  11210. {
  11211. vector.x = 3f;
  11212. maidArray[9].SetPos(vector);
  11213. }
  11214. if (maidArray[10] && maidArray[10].Visible)
  11215. {
  11216. vector.x = -3f;
  11217. maidArray[10].SetPos(vector);
  11218. }
  11219. if (maidArray[11] && maidArray[11].Visible)
  11220. {
  11221. vector.x = 3.6f;
  11222. maidArray[11].SetPos(vector);
  11223. }
  11224. if (maidArray[12] && maidArray[12].Visible)
  11225. {
  11226. vector.x = -3.6f;
  11227. maidArray[12].SetPos(vector);
  11228. }
  11229. if (maidArray[13] && maidArray[13].Visible)
  11230. {
  11231. vector.x = 4.2f;
  11232. maidArray[13].SetPos(vector);
  11233. }
  11234. }
  11235. }
  11236. if (isShift)
  11237. {
  11238. isDanceStart6K = true;
  11239. for (int j = 0; j < maidCnt; j++)
  11240. {
  11241. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11242. maidArray[j].body0.transform.localRotation.y + 90f,
  11243. maidArray[j].body0.transform.localRotation.z));
  11244. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11245. maidArray[j].body0.transform.position.y,
  11246. maidArray[j].body0.transform.position.z + 4f));
  11247. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11248. int i = j;
  11249. Maid maid = maidArray[j];
  11250. if (!isVR)
  11251. {
  11252. delCount[i] = 20;
  11253. if (goSlot[(int)selectList[i]] != null)
  11254. {
  11255. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11256. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11257. {
  11258. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11259. }
  11260. }
  11261. }
  11262. string[] array = new string[2];
  11263. array = text2.Split(new char[] { ',' });
  11264. maid.DelProp(MPN.handitem, true);
  11265. maid.DelProp(MPN.accvag, true);
  11266. maid.DelProp(MPN.accanl, true);
  11267. maid.DelProp(MPN.kousoku_upper, true);
  11268. maid.DelProp(MPN.kousoku_lower, true);
  11269. if (array[0] != "")
  11270. {
  11271. maid.SetProp(array[0], array[1], 0, true, false);
  11272. }
  11273. maid.AllProcPropSeqStart();
  11274. }
  11275. }
  11276. isDance = true;
  11277. isDanceStart6 = true;
  11278. isHS1 = false;
  11279. isHS2 = false;
  11280. isHS3 = false;
  11281. }
  11282. if (isHS4 || isHS5 || isHS6)
  11283. {
  11284. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11285. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11286. for (int j = 0; j < maidCnt; j++)
  11287. {
  11288. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11289. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11290. switch (j)
  11291. {
  11292. case 1:
  11293. case 3:
  11294. case 5:
  11295. case 7:
  11296. case 9:
  11297. case 11:
  11298. case 13:
  11299. text5 = "dance_cm3d2_003_hs_f2.anm";
  11300. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11301. break;
  11302. }
  11303. if (maidArray[j] && maidArray[j].Visible)
  11304. {
  11305. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11306. {
  11307. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11308. }
  11309. string text4 = textAsset.text;
  11310. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11311. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11312. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11313. }
  11314. }
  11315. if (isHS4)
  11316. {
  11317. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11318. }
  11319. if (isHS5)
  11320. {
  11321. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11322. }
  11323. if (isHS6)
  11324. {
  11325. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11326. }
  11327. ikBui = 5;
  11328. isDanceStart1F = false;
  11329. isDanceStart2F = false;
  11330. isDanceStart3F = false;
  11331. isDanceStart4F = false;
  11332. isDanceStart5F = false;
  11333. isDanceStart6F = false;
  11334. isDanceStart7F = false;
  11335. isDanceStart8F = false;
  11336. isDanceStart9F = false;
  11337. isDanceStart10F = false;
  11338. isDanceStart11F = false;
  11339. isDanceStart12F = false;
  11340. isDanceStart13F = false;
  11341. isDanceStart14F = false;
  11342. isDanceStart15F = false;
  11343. for (int j = 0; j < maidCnt; j++)
  11344. {
  11345. danceFace[j] = 0f;
  11346. }
  11347. if (isDanceStart7V)
  11348. {
  11349. for (int j = 0; j < maidCnt; j++)
  11350. {
  11351. if (maidArray[j] && maidArray[j].Visible)
  11352. {
  11353. if (isDanceStart7V)
  11354. {
  11355. maidArray[j].SetPos(dancePos[j]);
  11356. maidArray[j].body0.transform.localRotation = danceRot[j];
  11357. }
  11358. }
  11359. }
  11360. isDanceStart7V = false;
  11361. }
  11362. if (isDanceStart8V)
  11363. {
  11364. for (int j = 0; j < maidCnt; j++)
  11365. {
  11366. if (maidArray[j] && maidArray[j].Visible)
  11367. {
  11368. if (isDanceStart8V)
  11369. {
  11370. maidArray[j].SetPos(dancePos[j]);
  11371. maidArray[j].body0.transform.localRotation = danceRot[j];
  11372. }
  11373. }
  11374. }
  11375. isDanceStart8V = false;
  11376. isDanceStart8P = false;
  11377. }
  11378. if (isDanceStart11V)
  11379. {
  11380. for (int j = 0; j < maidCnt; j++)
  11381. {
  11382. if (maidArray[j] && maidArray[j].Visible)
  11383. {
  11384. if (isDanceStart11V)
  11385. {
  11386. maidArray[j].SetPos(dancePos[j]);
  11387. maidArray[j].body0.transform.localRotation = danceRot[j];
  11388. }
  11389. }
  11390. }
  11391. isDanceStart11V = false;
  11392. }
  11393. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11394. || isDanceStart13K)
  11395. {
  11396. for (int j = 0; j < maidCnt; j++)
  11397. {
  11398. if (maidArray[j] && maidArray[j].Visible)
  11399. {
  11400. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11401. || isDanceStart13K)
  11402. {
  11403. maidArray[j].SetPos(dancePos[j]);
  11404. maidArray[j].body0.transform.localRotation = danceRot[j];
  11405. int i = j;
  11406. if (!isVR)
  11407. {
  11408. delCount[i] = 20;
  11409. if (goSlot[(int)selectList[i]] != null)
  11410. {
  11411. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11412. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11413. {
  11414. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11415. }
  11416. }
  11417. }
  11418. Maid maid = maidArray[j];
  11419. maid.DelProp(MPN.handitem, true);
  11420. maid.DelProp(MPN.accvag, true);
  11421. maid.DelProp(MPN.accanl, true);
  11422. maid.DelProp(MPN.kousoku_upper, true);
  11423. maid.DelProp(MPN.kousoku_lower, true);
  11424. maid.AllProcPropSeqStart();
  11425. }
  11426. }
  11427. }
  11428. isDanceStart1K = false;
  11429. isDanceStart3K = false;
  11430. isDanceStart4K = false;
  11431. isDanceStart5K = false;
  11432. isDanceStart6K = false;
  11433. isDanceStart9K = false;
  11434. isDanceStart13K = false;
  11435. }
  11436. if (isDanceStart14V)
  11437. {
  11438. for (int j = 0; j < maidCnt; j++)
  11439. {
  11440. if (maidArray[j] && maidArray[j].Visible)
  11441. {
  11442. if (isDanceStart14V)
  11443. {
  11444. maidArray[j].SetPos(dancePos[j]);
  11445. maidArray[j].body0.transform.localRotation = danceRot[j];
  11446. }
  11447. }
  11448. }
  11449. isDanceStart14V = false;
  11450. }
  11451. if (isDanceStart15V)
  11452. {
  11453. for (int j = 0; j < maidCnt; j++)
  11454. {
  11455. if (maidArray[j] && maidArray[j].Visible)
  11456. {
  11457. if (isDanceStart15V)
  11458. {
  11459. maidArray[j].SetPos(dancePos[j]);
  11460. maidArray[j].body0.transform.localRotation = danceRot[j];
  11461. }
  11462. }
  11463. }
  11464. isDanceStart15V = false;
  11465. }
  11466. for (int j = 0; j < maidCnt; j++)
  11467. {
  11468. isStop[j] = false;
  11469. isLock[j] = false;
  11470. pHandL[j] = 0;
  11471. pHandR[j] = 0;
  11472. muneIKL[j] = false;
  11473. muneIKR[j] = false;
  11474. if (!isVR)
  11475. {
  11476. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11477. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11478. }
  11479. if (maidArray[j].transform.position.y != 100f)
  11480. {
  11481. dancePos[j] = maidArray[j].transform.position;
  11482. }
  11483. else
  11484. {
  11485. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11486. }
  11487. danceRot[j] = maidArray[j].transform.localRotation;
  11488. }
  11489. if (maidArray[1] && maidArray[1].Visible)
  11490. {
  11491. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11492. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11493. }
  11494. if (maidArray[3] && maidArray[3].Visible)
  11495. {
  11496. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11497. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11498. }
  11499. if (maidArray[5] && maidArray[5].Visible)
  11500. {
  11501. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11502. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11503. }
  11504. if (maidArray[7] && maidArray[7].Visible)
  11505. {
  11506. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11507. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11508. }
  11509. if (maidArray[9] && maidArray[9].Visible)
  11510. {
  11511. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11512. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11513. }
  11514. if (maidArray[11] && maidArray[11].Visible)
  11515. {
  11516. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11517. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11518. }
  11519. if (maidArray[13] && maidArray[13].Visible)
  11520. {
  11521. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11522. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11523. }
  11524. if (maidArray[2] && maidArray[2].Visible)
  11525. {
  11526. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11527. {
  11528. Vector3 vector = Vector3.zero;
  11529. vector.x = 0.6f;
  11530. maidArray[1].SetPos(vector);
  11531. if (maidArray[2] && maidArray[2].Visible)
  11532. {
  11533. vector.x = -0.6f;
  11534. maidArray[2].SetPos(vector);
  11535. }
  11536. if (maidArray[3] && maidArray[3].Visible)
  11537. {
  11538. vector.x = 1.2f;
  11539. maidArray[3].SetPos(vector);
  11540. }
  11541. if (maidArray[4] && maidArray[4].Visible)
  11542. {
  11543. vector.x = -1.2f;
  11544. maidArray[4].SetPos(vector);
  11545. }
  11546. if (maidArray[5] && maidArray[5].Visible)
  11547. {
  11548. vector.x = 1.8f;
  11549. maidArray[5].SetPos(vector);
  11550. }
  11551. if (maidArray[6] && maidArray[6].Visible)
  11552. {
  11553. vector.x = -1.8f;
  11554. maidArray[6].SetPos(vector);
  11555. }
  11556. if (maidArray[7] && maidArray[7].Visible)
  11557. {
  11558. vector.x = 2.4f;
  11559. maidArray[7].SetPos(vector);
  11560. }
  11561. if (maidArray[8] && maidArray[8].Visible)
  11562. {
  11563. vector.x = -2.4f;
  11564. maidArray[8].SetPos(vector);
  11565. }
  11566. if (maidArray[9] && maidArray[9].Visible)
  11567. {
  11568. vector.x = 3f;
  11569. maidArray[9].SetPos(vector);
  11570. }
  11571. if (maidArray[10] && maidArray[10].Visible)
  11572. {
  11573. vector.x = -3f;
  11574. maidArray[10].SetPos(vector);
  11575. }
  11576. if (maidArray[11] && maidArray[11].Visible)
  11577. {
  11578. vector.x = 3.6f;
  11579. maidArray[11].SetPos(vector);
  11580. }
  11581. if (maidArray[12] && maidArray[12].Visible)
  11582. {
  11583. vector.x = -3.6f;
  11584. maidArray[12].SetPos(vector);
  11585. }
  11586. if (maidArray[13] && maidArray[13].Visible)
  11587. {
  11588. vector.x = 4.2f;
  11589. maidArray[13].SetPos(vector);
  11590. }
  11591. }
  11592. }
  11593. isDance = true;
  11594. isDanceStart7 = true;
  11595. isHS4 = false;
  11596. isHS5 = false;
  11597. isHS6 = false;
  11598. }
  11599. if (isHS7 || isHS8 || isHS9)
  11600. {
  11601. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11602. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11603. for (int j = 0; j < maidCnt; j++)
  11604. {
  11605. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11606. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11607. switch (j)
  11608. {
  11609. case 1:
  11610. case 5:
  11611. case 9:
  11612. case 13:
  11613. text5 = "dance_cm3d2_003_hs_f2.anm";
  11614. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11615. break;
  11616. case 2:
  11617. case 6:
  11618. case 10:
  11619. text5 = "dance_cm3d2_003_hs_f3.anm";
  11620. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11621. break;
  11622. case 3:
  11623. case 7:
  11624. case 11:
  11625. text5 = "dance_cm3d2_003_hs_f4.anm";
  11626. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11627. break;
  11628. }
  11629. if (maidArray[j] && maidArray[j].Visible)
  11630. {
  11631. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11632. {
  11633. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11634. }
  11635. }
  11636. string text4 = textAsset.text;
  11637. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11638. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11639. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11640. }
  11641. if (isHS7)
  11642. {
  11643. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11644. }
  11645. if (isHS8)
  11646. {
  11647. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11648. }
  11649. if (isHS9)
  11650. {
  11651. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11652. }
  11653. ikBui = 5;
  11654. isDanceStart1F = false;
  11655. isDanceStart2F = false;
  11656. isDanceStart3F = false;
  11657. isDanceStart4F = false;
  11658. isDanceStart5F = false;
  11659. isDanceStart6F = false;
  11660. isDanceStart7F = false;
  11661. isDanceStart8F = false;
  11662. isDanceStart9F = false;
  11663. isDanceStart10F = false;
  11664. isDanceStart11F = false;
  11665. isDanceStart12F = false;
  11666. isDanceStart13F = false;
  11667. isDanceStart14F = false;
  11668. isDanceStart15F = false;
  11669. for (int j = 0; j < maidCnt; j++)
  11670. {
  11671. danceFace[j] = 0f;
  11672. }
  11673. if (isDanceStart8V)
  11674. {
  11675. for (int j = 0; j < maidCnt; j++)
  11676. {
  11677. if (maidArray[j] && maidArray[j].Visible)
  11678. {
  11679. if (isDanceStart8V)
  11680. {
  11681. maidArray[j].SetPos(dancePos[j]);
  11682. maidArray[j].body0.transform.localRotation = danceRot[j];
  11683. }
  11684. }
  11685. }
  11686. isDanceStart8V = false;
  11687. isDanceStart8P = false;
  11688. }
  11689. for (int j = 0; j < maidCnt; j++)
  11690. {
  11691. isStop[j] = false;
  11692. isLock[j] = false;
  11693. pHandL[j] = 0;
  11694. pHandR[j] = 0;
  11695. muneIKL[j] = false;
  11696. muneIKR[j] = false;
  11697. if (!isVR)
  11698. {
  11699. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11700. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11701. }
  11702. if (maidArray[j].transform.position.y != 100f)
  11703. {
  11704. dancePos[j] = maidArray[j].transform.position;
  11705. }
  11706. else
  11707. {
  11708. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11709. }
  11710. danceRot[j] = maidArray[j].transform.localRotation;
  11711. }
  11712. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11713. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11714. {
  11715. maidArray[0].SetPos(Vector3.zero);
  11716. maidArray[0].SetRot(Vector3.zero);
  11717. }
  11718. if (maidArray[1] && maidArray[1].Visible)
  11719. {
  11720. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11721. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11722. }
  11723. if (maidArray[2] && maidArray[2].Visible)
  11724. {
  11725. maidArray[2].SetPos(maidArray[0].transform.position);
  11726. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11727. }
  11728. if (maidArray[3] && maidArray[3].Visible)
  11729. {
  11730. maidArray[3].SetPos(maidArray[0].transform.position);
  11731. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11732. }
  11733. if (maidArray[5] && maidArray[5].Visible)
  11734. {
  11735. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11736. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11737. }
  11738. if (maidArray[6] && maidArray[6].Visible)
  11739. {
  11740. maidArray[6].SetPos(maidArray[4].transform.position);
  11741. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11742. }
  11743. if (maidArray[7] && maidArray[7].Visible)
  11744. {
  11745. maidArray[7].SetPos(maidArray[4].transform.position);
  11746. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11747. }
  11748. if (maidArray[9] && maidArray[9].Visible)
  11749. {
  11750. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11751. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11752. }
  11753. if (maidArray[10] && maidArray[10].Visible)
  11754. {
  11755. maidArray[10].SetPos(maidArray[8].transform.position);
  11756. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11757. }
  11758. if (maidArray[11] && maidArray[11].Visible)
  11759. {
  11760. maidArray[11].SetPos(maidArray[8].transform.position);
  11761. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11762. }
  11763. if (maidArray[13] && maidArray[13].Visible)
  11764. {
  11765. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11766. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11767. }
  11768. if (maidArray[4] && maidArray[4].Visible)
  11769. {
  11770. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11771. {
  11772. Vector3 vector = Vector3.zero;
  11773. vector.x = 0.6f;
  11774. maidArray[1].SetPos(vector);
  11775. if (maidArray[2] && maidArray[2].Visible)
  11776. {
  11777. vector.x = -0.6f;
  11778. maidArray[2].SetPos(vector);
  11779. }
  11780. if (maidArray[3] && maidArray[3].Visible)
  11781. {
  11782. vector.x = 1.2f;
  11783. maidArray[3].SetPos(vector);
  11784. }
  11785. if (maidArray[4] && maidArray[4].Visible)
  11786. {
  11787. vector.x = -1.2f;
  11788. maidArray[4].SetPos(vector);
  11789. }
  11790. if (maidArray[5] && maidArray[5].Visible)
  11791. {
  11792. vector.x = 1.8f;
  11793. maidArray[5].SetPos(vector);
  11794. }
  11795. if (maidArray[6] && maidArray[6].Visible)
  11796. {
  11797. vector.x = -1.8f;
  11798. maidArray[6].SetPos(vector);
  11799. }
  11800. if (maidArray[7] && maidArray[7].Visible)
  11801. {
  11802. vector.x = 2.4f;
  11803. maidArray[7].SetPos(vector);
  11804. }
  11805. if (maidArray[8] && maidArray[8].Visible)
  11806. {
  11807. vector.x = -2.4f;
  11808. maidArray[8].SetPos(vector);
  11809. }
  11810. if (maidArray[9] && maidArray[9].Visible)
  11811. {
  11812. vector.x = 3f;
  11813. maidArray[9].SetPos(vector);
  11814. }
  11815. if (maidArray[10] && maidArray[10].Visible)
  11816. {
  11817. vector.x = -3f;
  11818. maidArray[10].SetPos(vector);
  11819. }
  11820. if (maidArray[11] && maidArray[11].Visible)
  11821. {
  11822. vector.x = 3.6f;
  11823. maidArray[11].SetPos(vector);
  11824. }
  11825. if (maidArray[12] && maidArray[12].Visible)
  11826. {
  11827. vector.x = -3.6f;
  11828. maidArray[12].SetPos(vector);
  11829. }
  11830. if (maidArray[13] && maidArray[13].Visible)
  11831. {
  11832. vector.x = 4.2f;
  11833. maidArray[13].SetPos(vector);
  11834. }
  11835. }
  11836. }
  11837. isDance = true;
  11838. isDanceStart8 = true;
  11839. isHS7 = false;
  11840. isHS8 = false;
  11841. isHS9 = false;
  11842. }
  11843. if (isCF1)
  11844. {
  11845. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11846. string text4 = textAsset.text;
  11847. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11848. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11849. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11850. for (int j = 0; j < maidCnt; j++)
  11851. {
  11852. if (!isShift)
  11853. {
  11854. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11855. {
  11856. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11857. GameUty.FileSystem,
  11858. "dance_cm3d_003_sp2_f1.anm",
  11859. false,
  11860. false);
  11861. }
  11862. }
  11863. else
  11864. {
  11865. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11866. {
  11867. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11868. GameUty.FileSystem,
  11869. "dance_cm3d2_kara02_002_rty_f1.anm",
  11870. false,
  11871. false);
  11872. }
  11873. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11874. text4 = textAsset.text;
  11875. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11876. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11877. && !isDanceStart9K && !isDanceStart13K)
  11878. {
  11879. dancePos[j] = maidArray[j].transform.position;
  11880. danceRot[j] = maidArray[j].transform.localRotation;
  11881. }
  11882. }
  11883. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11884. }
  11885. if (!isShift)
  11886. {
  11887. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11888. }
  11889. else
  11890. {
  11891. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11892. }
  11893. for (int j = 0; j < maidCnt; j++)
  11894. {
  11895. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11896. isStop[j] = false;
  11897. isLock[j] = false;
  11898. pHandL[j] = 0;
  11899. pHandR[j] = 0;
  11900. muneIKL[j] = false;
  11901. muneIKR[j] = false;
  11902. if (!isVR)
  11903. {
  11904. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11905. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11906. }
  11907. }
  11908. ikBui = 5;
  11909. isDanceStart1F = false;
  11910. isDanceStart2F = false;
  11911. isDanceStart3F = false;
  11912. isDanceStart4F = false;
  11913. isDanceStart5F = false;
  11914. isDanceStart6F = false;
  11915. isDanceStart7F = false;
  11916. isDanceStart8F = false;
  11917. isDanceStart9F = false;
  11918. isDanceStart10F = false;
  11919. isDanceStart11F = false;
  11920. isDanceStart12F = false;
  11921. isDanceStart13F = false;
  11922. isDanceStart14F = false;
  11923. isDanceStart15F = false;
  11924. for (int j = 0; j < maidCnt; j++)
  11925. {
  11926. danceFace[j] = 0f;
  11927. }
  11928. if (isDanceStart7V)
  11929. {
  11930. for (int j = 0; j < maidCnt; j++)
  11931. {
  11932. if (maidArray[j] && maidArray[j].Visible)
  11933. {
  11934. if (isDanceStart7V)
  11935. {
  11936. maidArray[j].SetPos(dancePos[j]);
  11937. maidArray[j].body0.transform.localRotation = danceRot[j];
  11938. }
  11939. }
  11940. }
  11941. isDanceStart7V = false;
  11942. }
  11943. if (isDanceStart8V)
  11944. {
  11945. for (int j = 0; j < maidCnt; j++)
  11946. {
  11947. if (maidArray[j] && maidArray[j].Visible)
  11948. {
  11949. if (isDanceStart8V)
  11950. {
  11951. maidArray[j].SetPos(dancePos[j]);
  11952. maidArray[j].body0.transform.localRotation = danceRot[j];
  11953. }
  11954. }
  11955. }
  11956. isDanceStart8V = false;
  11957. isDanceStart8P = false;
  11958. }
  11959. if (isDanceStart11V)
  11960. {
  11961. for (int j = 0; j < maidCnt; j++)
  11962. {
  11963. if (maidArray[j] && maidArray[j].Visible)
  11964. {
  11965. if (isDanceStart11V)
  11966. {
  11967. maidArray[j].SetPos(dancePos[j]);
  11968. maidArray[j].body0.transform.localRotation = danceRot[j];
  11969. }
  11970. }
  11971. }
  11972. isDanceStart11V = false;
  11973. }
  11974. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11975. || isDanceStart13K)
  11976. {
  11977. for (int j = 0; j < maidCnt; j++)
  11978. {
  11979. if (maidArray[j] && maidArray[j].Visible)
  11980. {
  11981. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11982. || isDanceStart13K)
  11983. {
  11984. maidArray[j].SetPos(dancePos[j]);
  11985. maidArray[j].body0.transform.localRotation = danceRot[j];
  11986. int i = j;
  11987. if (!isVR)
  11988. {
  11989. delCount[i] = 20;
  11990. if (goSlot[(int)selectList[i]] != null)
  11991. {
  11992. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11993. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11994. {
  11995. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11996. }
  11997. }
  11998. }
  11999. Maid maid = maidArray[j];
  12000. maid.DelProp(MPN.handitem, true);
  12001. maid.DelProp(MPN.accvag, true);
  12002. maid.DelProp(MPN.accanl, true);
  12003. maid.DelProp(MPN.kousoku_upper, true);
  12004. maid.DelProp(MPN.kousoku_lower, true);
  12005. maid.AllProcPropSeqStart();
  12006. }
  12007. }
  12008. }
  12009. isDanceStart1K = false;
  12010. isDanceStart3K = false;
  12011. isDanceStart4K = false;
  12012. isDanceStart5K = false;
  12013. isDanceStart6K = false;
  12014. isDanceStart9K = false;
  12015. isDanceStart13K = false;
  12016. }
  12017. if (isDanceStart14V)
  12018. {
  12019. for (int j = 0; j < maidCnt; j++)
  12020. {
  12021. if (maidArray[j] && maidArray[j].Visible)
  12022. {
  12023. if (isDanceStart14V)
  12024. {
  12025. maidArray[j].SetPos(dancePos[j]);
  12026. maidArray[j].body0.transform.localRotation = danceRot[j];
  12027. }
  12028. }
  12029. }
  12030. isDanceStart14V = false;
  12031. }
  12032. if (isDanceStart15V)
  12033. {
  12034. for (int j = 0; j < maidCnt; j++)
  12035. {
  12036. if (maidArray[j] && maidArray[j].Visible)
  12037. {
  12038. if (isDanceStart15V)
  12039. {
  12040. maidArray[j].SetPos(dancePos[j]);
  12041. maidArray[j].body0.transform.localRotation = danceRot[j];
  12042. }
  12043. }
  12044. }
  12045. isDanceStart15V = false;
  12046. }
  12047. if (maidArray[1] && maidArray[1].Visible)
  12048. {
  12049. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12050. {
  12051. Vector3 vector = Vector3.zero;
  12052. vector.x = 0.6f;
  12053. maidArray[1].SetPos(vector);
  12054. if (maidArray[2] && maidArray[2].Visible)
  12055. {
  12056. vector.x = -0.6f;
  12057. maidArray[2].SetPos(vector);
  12058. }
  12059. if (maidArray[3] && maidArray[3].Visible)
  12060. {
  12061. vector.x = 1.2f;
  12062. maidArray[3].SetPos(vector);
  12063. }
  12064. if (maidArray[4] && maidArray[4].Visible)
  12065. {
  12066. vector.x = -1.2f;
  12067. maidArray[4].SetPos(vector);
  12068. }
  12069. if (maidArray[5] && maidArray[5].Visible)
  12070. {
  12071. vector.x = 1.8f;
  12072. maidArray[5].SetPos(vector);
  12073. }
  12074. if (maidArray[6] && maidArray[6].Visible)
  12075. {
  12076. vector.x = -1.8f;
  12077. maidArray[6].SetPos(vector);
  12078. }
  12079. if (maidArray[7] && maidArray[7].Visible)
  12080. {
  12081. vector.x = 2.4f;
  12082. maidArray[7].SetPos(vector);
  12083. }
  12084. if (maidArray[8] && maidArray[8].Visible)
  12085. {
  12086. vector.x = -2.4f;
  12087. maidArray[8].SetPos(vector);
  12088. }
  12089. if (maidArray[9] && maidArray[9].Visible)
  12090. {
  12091. vector.x = 3f;
  12092. maidArray[9].SetPos(vector);
  12093. }
  12094. if (maidArray[10] && maidArray[10].Visible)
  12095. {
  12096. vector.x = -3f;
  12097. maidArray[10].SetPos(vector);
  12098. }
  12099. if (maidArray[11] && maidArray[11].Visible)
  12100. {
  12101. vector.x = 3.6f;
  12102. maidArray[11].SetPos(vector);
  12103. }
  12104. if (maidArray[12] && maidArray[12].Visible)
  12105. {
  12106. vector.x = -3.6f;
  12107. maidArray[12].SetPos(vector);
  12108. }
  12109. if (maidArray[13] && maidArray[13].Visible)
  12110. {
  12111. vector.x = 4.2f;
  12112. maidArray[13].SetPos(vector);
  12113. }
  12114. }
  12115. }
  12116. if (isShift)
  12117. {
  12118. isDanceStart5K = true;
  12119. for (int j = 0; j < maidCnt; j++)
  12120. {
  12121. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12122. maidArray[j].body0.transform.localRotation.y + 90f,
  12123. maidArray[j].body0.transform.localRotation.z));
  12124. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12125. maidArray[j].body0.transform.position.y,
  12126. maidArray[j].body0.transform.position.z + 4f));
  12127. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12128. int i = j;
  12129. Maid maid = maidArray[j];
  12130. if (!isVR)
  12131. {
  12132. delCount[i] = 20;
  12133. if (goSlot[(int)selectList[i]] != null)
  12134. {
  12135. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12136. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12137. {
  12138. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12139. }
  12140. }
  12141. }
  12142. string[] array = new string[2];
  12143. array = text2.Split(new char[] { ',' });
  12144. maid.DelProp(MPN.handitem, true);
  12145. maid.DelProp(MPN.accvag, true);
  12146. maid.DelProp(MPN.accanl, true);
  12147. maid.DelProp(MPN.kousoku_upper, true);
  12148. maid.DelProp(MPN.kousoku_lower, true);
  12149. if (array[0] != "")
  12150. {
  12151. maid.SetProp(array[0], array[1], 0, true, false);
  12152. }
  12153. maid.AllProcPropSeqStart();
  12154. }
  12155. }
  12156. isDance = true;
  12157. isDanceStart5 = true;
  12158. isCF1 = false;
  12159. }
  12160. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12161. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12162. {
  12163. GameMain.Instance.SoundMgr.StopBGM(0f);
  12164. isCF1 = true;
  12165. if (getModKeyPressing(modKey.Shift))
  12166. {
  12167. isShift = true;
  12168. }
  12169. }
  12170. if (isKT1)
  12171. {
  12172. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12173. string text4 = textAsset.text;
  12174. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12175. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12176. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12177. for (int j = 0; j < maidCnt; j++)
  12178. {
  12179. if (!isShift)
  12180. {
  12181. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12182. {
  12183. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12184. GameUty.FileSystem,
  12185. "dance_cm3d_004_kano_f1.anm",
  12186. false,
  12187. false);
  12188. }
  12189. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12190. }
  12191. else
  12192. {
  12193. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12194. {
  12195. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12196. GameUty.FileSystem,
  12197. "dance_cm3d2_kara_002_cktc_f1.anm",
  12198. false,
  12199. false);
  12200. }
  12201. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12202. text4 = textAsset.text;
  12203. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12204. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12205. && !isDanceStart9K && !isDanceStart13K)
  12206. {
  12207. dancePos[j] = maidArray[j].transform.position;
  12208. danceRot[j] = maidArray[j].transform.localRotation;
  12209. }
  12210. }
  12211. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12212. }
  12213. if (!isShift)
  12214. {
  12215. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12216. }
  12217. else
  12218. {
  12219. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12220. }
  12221. for (int j = 0; j < maidCnt; j++)
  12222. {
  12223. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12224. isStop[j] = false;
  12225. isLock[j] = false;
  12226. pHandL[j] = 0;
  12227. pHandR[j] = 0;
  12228. muneIKL[j] = false;
  12229. muneIKR[j] = false;
  12230. if (!isVR)
  12231. {
  12232. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12233. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12234. }
  12235. }
  12236. ikBui = 5;
  12237. isDanceStart1F = false;
  12238. isDanceStart2F = false;
  12239. isDanceStart3F = false;
  12240. isDanceStart4F = false;
  12241. isDanceStart5F = false;
  12242. isDanceStart6F = false;
  12243. isDanceStart7F = false;
  12244. isDanceStart8F = false;
  12245. isDanceStart9F = false;
  12246. isDanceStart10F = false;
  12247. isDanceStart11F = false;
  12248. isDanceStart12F = false;
  12249. isDanceStart13F = false;
  12250. isDanceStart14F = false;
  12251. isDanceStart15F = false;
  12252. for (int j = 0; j < maidCnt; j++)
  12253. {
  12254. danceFace[j] = 0f;
  12255. }
  12256. if (isDanceStart7V)
  12257. {
  12258. for (int j = 0; j < maidCnt; j++)
  12259. {
  12260. if (maidArray[j] && maidArray[j].Visible)
  12261. {
  12262. if (isDanceStart7V)
  12263. {
  12264. maidArray[j].SetPos(dancePos[j]);
  12265. maidArray[j].body0.transform.localRotation = danceRot[j];
  12266. }
  12267. }
  12268. }
  12269. isDanceStart7V = false;
  12270. }
  12271. if (isDanceStart8V)
  12272. {
  12273. for (int j = 0; j < maidCnt; j++)
  12274. {
  12275. if (maidArray[j] && maidArray[j].Visible)
  12276. {
  12277. if (isDanceStart8V)
  12278. {
  12279. maidArray[j].SetPos(dancePos[j]);
  12280. maidArray[j].body0.transform.localRotation = danceRot[j];
  12281. }
  12282. }
  12283. }
  12284. isDanceStart8V = false;
  12285. isDanceStart8P = false;
  12286. }
  12287. if (isDanceStart11V)
  12288. {
  12289. for (int j = 0; j < maidCnt; j++)
  12290. {
  12291. if (maidArray[j] && maidArray[j].Visible)
  12292. {
  12293. if (isDanceStart11V)
  12294. {
  12295. maidArray[j].SetPos(dancePos[j]);
  12296. maidArray[j].body0.transform.localRotation = danceRot[j];
  12297. }
  12298. }
  12299. }
  12300. isDanceStart11V = false;
  12301. }
  12302. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12303. || isDanceStart13K)
  12304. {
  12305. for (int j = 0; j < maidCnt; j++)
  12306. {
  12307. if (maidArray[j] && maidArray[j].Visible)
  12308. {
  12309. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12310. || isDanceStart13K)
  12311. {
  12312. maidArray[j].SetPos(dancePos[j]);
  12313. maidArray[j].body0.transform.localRotation = danceRot[j];
  12314. int i = j;
  12315. if (!isVR)
  12316. {
  12317. delCount[i] = 20;
  12318. if (goSlot[(int)selectList[i]] != null)
  12319. {
  12320. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12321. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12322. {
  12323. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12324. }
  12325. }
  12326. }
  12327. Maid maid = maidArray[j];
  12328. maid.DelProp(MPN.handitem, true);
  12329. maid.DelProp(MPN.accvag, true);
  12330. maid.DelProp(MPN.accanl, true);
  12331. maid.DelProp(MPN.kousoku_upper, true);
  12332. maid.DelProp(MPN.kousoku_lower, true);
  12333. maid.AllProcPropSeqStart();
  12334. }
  12335. }
  12336. }
  12337. isDanceStart1K = false;
  12338. isDanceStart3K = false;
  12339. isDanceStart4K = false;
  12340. isDanceStart5K = false;
  12341. isDanceStart6K = false;
  12342. isDanceStart9K = false;
  12343. isDanceStart13K = false;
  12344. }
  12345. if (isDanceStart14V)
  12346. {
  12347. for (int j = 0; j < maidCnt; j++)
  12348. {
  12349. if (maidArray[j] && maidArray[j].Visible)
  12350. {
  12351. if (isDanceStart14V)
  12352. {
  12353. maidArray[j].SetPos(dancePos[j]);
  12354. maidArray[j].body0.transform.localRotation = danceRot[j];
  12355. }
  12356. }
  12357. }
  12358. isDanceStart14V = false;
  12359. }
  12360. if (isDanceStart15V)
  12361. {
  12362. for (int j = 0; j < maidCnt; j++)
  12363. {
  12364. if (maidArray[j] && maidArray[j].Visible)
  12365. {
  12366. if (isDanceStart15V)
  12367. {
  12368. maidArray[j].SetPos(dancePos[j]);
  12369. maidArray[j].body0.transform.localRotation = danceRot[j];
  12370. }
  12371. }
  12372. }
  12373. isDanceStart15V = false;
  12374. }
  12375. if (maidArray[1] && maidArray[1].Visible)
  12376. {
  12377. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12378. {
  12379. Vector3 vector = Vector3.zero;
  12380. vector.x = 0.6f;
  12381. maidArray[1].SetPos(vector);
  12382. if (maidArray[2] && maidArray[2].Visible)
  12383. {
  12384. vector.x = -0.6f;
  12385. maidArray[2].SetPos(vector);
  12386. }
  12387. if (maidArray[3] && maidArray[3].Visible)
  12388. {
  12389. vector.x = 1.2f;
  12390. maidArray[3].SetPos(vector);
  12391. }
  12392. if (maidArray[4] && maidArray[4].Visible)
  12393. {
  12394. vector.x = -1.2f;
  12395. maidArray[4].SetPos(vector);
  12396. }
  12397. if (maidArray[5] && maidArray[5].Visible)
  12398. {
  12399. vector.x = 1.8f;
  12400. maidArray[5].SetPos(vector);
  12401. }
  12402. if (maidArray[6] && maidArray[6].Visible)
  12403. {
  12404. vector.x = -1.8f;
  12405. maidArray[6].SetPos(vector);
  12406. }
  12407. if (maidArray[7] && maidArray[7].Visible)
  12408. {
  12409. vector.x = 2.4f;
  12410. maidArray[7].SetPos(vector);
  12411. }
  12412. if (maidArray[8] && maidArray[8].Visible)
  12413. {
  12414. vector.x = -2.4f;
  12415. maidArray[8].SetPos(vector);
  12416. }
  12417. if (maidArray[9] && maidArray[9].Visible)
  12418. {
  12419. vector.x = 3f;
  12420. maidArray[9].SetPos(vector);
  12421. }
  12422. if (maidArray[10] && maidArray[10].Visible)
  12423. {
  12424. vector.x = -3f;
  12425. maidArray[10].SetPos(vector);
  12426. }
  12427. if (maidArray[11] && maidArray[11].Visible)
  12428. {
  12429. vector.x = 3.6f;
  12430. maidArray[11].SetPos(vector);
  12431. }
  12432. if (maidArray[12] && maidArray[12].Visible)
  12433. {
  12434. vector.x = -3.6f;
  12435. maidArray[12].SetPos(vector);
  12436. }
  12437. if (maidArray[13] && maidArray[13].Visible)
  12438. {
  12439. vector.x = 4.2f;
  12440. maidArray[13].SetPos(vector);
  12441. }
  12442. }
  12443. }
  12444. if (maidArray[2] && maidArray[2].Visible)
  12445. {
  12446. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12447. {
  12448. Vector3 vector = Vector3.zero;
  12449. vector.x = 0.6f;
  12450. maidArray[1].SetPos(vector);
  12451. if (maidArray[2] && maidArray[2].Visible)
  12452. {
  12453. vector.x = -0.6f;
  12454. maidArray[2].SetPos(vector);
  12455. }
  12456. if (maidArray[3] && maidArray[3].Visible)
  12457. {
  12458. vector.x = 1.2f;
  12459. maidArray[3].SetPos(vector);
  12460. }
  12461. if (maidArray[4] && maidArray[4].Visible)
  12462. {
  12463. vector.x = -1.2f;
  12464. maidArray[4].SetPos(vector);
  12465. }
  12466. if (maidArray[5] && maidArray[5].Visible)
  12467. {
  12468. vector.x = 1.8f;
  12469. maidArray[5].SetPos(vector);
  12470. }
  12471. if (maidArray[6] && maidArray[6].Visible)
  12472. {
  12473. vector.x = -1.8f;
  12474. maidArray[6].SetPos(vector);
  12475. }
  12476. if (maidArray[7] && maidArray[7].Visible)
  12477. {
  12478. vector.x = 2.4f;
  12479. maidArray[7].SetPos(vector);
  12480. }
  12481. if (maidArray[8] && maidArray[8].Visible)
  12482. {
  12483. vector.x = -2.4f;
  12484. maidArray[8].SetPos(vector);
  12485. }
  12486. if (maidArray[9] && maidArray[9].Visible)
  12487. {
  12488. vector.x = 3f;
  12489. maidArray[9].SetPos(vector);
  12490. }
  12491. if (maidArray[10] && maidArray[10].Visible)
  12492. {
  12493. vector.x = -3f;
  12494. maidArray[10].SetPos(vector);
  12495. }
  12496. if (maidArray[11] && maidArray[11].Visible)
  12497. {
  12498. vector.x = 3.6f;
  12499. maidArray[11].SetPos(vector);
  12500. }
  12501. if (maidArray[12] && maidArray[12].Visible)
  12502. {
  12503. vector.x = -3.6f;
  12504. maidArray[12].SetPos(vector);
  12505. }
  12506. if (maidArray[13] && maidArray[13].Visible)
  12507. {
  12508. vector.x = 4.2f;
  12509. maidArray[13].SetPos(vector);
  12510. }
  12511. }
  12512. }
  12513. if (isShift)
  12514. {
  12515. isDanceStart9K = true;
  12516. for (int j = 0; j < maidCnt; j++)
  12517. {
  12518. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12519. maidArray[j].body0.transform.localRotation.y + 90f,
  12520. maidArray[j].body0.transform.localRotation.z));
  12521. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12522. maidArray[j].body0.transform.position.y,
  12523. maidArray[j].body0.transform.position.z + 4f));
  12524. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12525. int i = j;
  12526. Maid maid = maidArray[j];
  12527. if (!isVR)
  12528. {
  12529. delCount[i] = 20;
  12530. if (goSlot[(int)selectList[i]] != null)
  12531. {
  12532. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12533. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12534. {
  12535. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12536. }
  12537. }
  12538. }
  12539. string[] array = new string[2];
  12540. array = text2.Split(new char[] { ',' });
  12541. maid.DelProp(MPN.handitem, true);
  12542. maid.DelProp(MPN.accvag, true);
  12543. maid.DelProp(MPN.accanl, true);
  12544. maid.DelProp(MPN.kousoku_upper, true);
  12545. maid.DelProp(MPN.kousoku_lower, true);
  12546. if (array[0] != "")
  12547. {
  12548. maid.SetProp(array[0], array[1], 0, true, false);
  12549. }
  12550. maid.AllProcPropSeqStart();
  12551. }
  12552. }
  12553. isDance = true;
  12554. isDanceStart9 = true;
  12555. isKT1 = false;
  12556. }
  12557. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12558. {
  12559. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12560. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12561. if (isSS1)
  12562. {
  12563. nameK = "dance_BlD_m";
  12564. nameA = "dance_cm3d21_002_bid_f";
  12565. nameS = "bloomingdreaming_short";
  12566. danceNo1 = 1;
  12567. danceNo2 = 3;
  12568. danceNo3 = 2;
  12569. }
  12570. if (isSS2)
  12571. {
  12572. nameK = "dance_KAD_m";
  12573. nameA = "dance_cm3d21_003_kad_f";
  12574. nameS = "kiminiaijodelicious_short";
  12575. danceNo1 = 1;
  12576. danceNo2 = 2;
  12577. danceNo3 = 3;
  12578. }
  12579. if (isSS3)
  12580. {
  12581. nameK = "dance_LUM_m";
  12582. nameA = "dance_cm3d21_004_lm_f";
  12583. nameS = "luminousmoment_short";
  12584. danceNo1 = 3;
  12585. danceNo2 = 1;
  12586. danceNo3 = 2;
  12587. }
  12588. if (isSS4)
  12589. {
  12590. nameK = "dance_NmF_m";
  12591. nameA = "dance_cm3d21_001_nmf_f";
  12592. nameS = "nightmagicfire_short";
  12593. danceNo1 = 2;
  12594. danceNo2 = 1;
  12595. danceNo3 = 3;
  12596. }
  12597. if (isSS5)
  12598. {
  12599. nameK = "dance_MoE_m";
  12600. nameA = "dance_cm3d21_005_moe_f";
  12601. nameS = "melodyofempire_short";
  12602. danceNo1 = 1;
  12603. danceNo2 = 3;
  12604. danceNo3 = 2;
  12605. }
  12606. if (isSS6)
  12607. {
  12608. nameK = "dance_NmF_m";
  12609. nameA = "dance_cm3d21_kara_001_nmf_f";
  12610. nameS = "nightmagicfire_short";
  12611. danceNo1 = 1;
  12612. danceNo2 = 1;
  12613. danceNo3 = 1;
  12614. }
  12615. for (int j = 0; j < maidCnt; j++)
  12616. {
  12617. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12618. string text5 = nameA + danceNo1 + ".anm";
  12619. switch (j)
  12620. {
  12621. case 1:
  12622. case 4:
  12623. case 7:
  12624. case 10:
  12625. case 13:
  12626. text5 = nameA + danceNo2 + ".anm";
  12627. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12628. break;
  12629. case 2:
  12630. case 5:
  12631. case 8:
  12632. case 11:
  12633. text5 = nameA + danceNo3 + ".anm";
  12634. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12635. break;
  12636. }
  12637. if (maidArray[j] && maidArray[j].Visible)
  12638. {
  12639. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12640. {
  12641. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12642. }
  12643. string text4 = textAsset.text;
  12644. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12645. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12646. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12647. }
  12648. }
  12649. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12650. ikBui = 5;
  12651. isDanceStart1F = false;
  12652. isDanceStart2F = false;
  12653. isDanceStart3F = false;
  12654. isDanceStart4F = false;
  12655. isDanceStart5F = false;
  12656. isDanceStart6F = false;
  12657. isDanceStart7F = false;
  12658. isDanceStart8F = false;
  12659. isDanceStart9F = false;
  12660. isDanceStart10F = false;
  12661. isDanceStart11F = false;
  12662. isDanceStart12F = false;
  12663. isDanceStart13F = false;
  12664. isDanceStart14F = false;
  12665. isDanceStart15F = false;
  12666. for (int j = 0; j < maidCnt; j++)
  12667. {
  12668. danceFace[j] = 0f;
  12669. }
  12670. if (isDanceStart7V)
  12671. {
  12672. for (int j = 0; j < maidCnt; j++)
  12673. {
  12674. if (maidArray[j] && maidArray[j].Visible)
  12675. {
  12676. if (isDanceStart7V)
  12677. {
  12678. maidArray[j].SetPos(dancePos[j]);
  12679. maidArray[j].body0.transform.localRotation = danceRot[j];
  12680. }
  12681. }
  12682. }
  12683. isDanceStart7V = false;
  12684. }
  12685. if (isDanceStart8V)
  12686. {
  12687. for (int j = 0; j < maidCnt; j++)
  12688. {
  12689. if (maidArray[j] && maidArray[j].Visible)
  12690. {
  12691. if (isDanceStart8V)
  12692. {
  12693. maidArray[j].SetPos(dancePos[j]);
  12694. maidArray[j].body0.transform.localRotation = danceRot[j];
  12695. }
  12696. }
  12697. }
  12698. isDanceStart8V = false;
  12699. isDanceStart8P = false;
  12700. }
  12701. if (isDanceStart11V)
  12702. {
  12703. for (int j = 0; j < maidCnt; j++)
  12704. {
  12705. if (maidArray[j] && maidArray[j].Visible)
  12706. {
  12707. if (isDanceStart11V)
  12708. {
  12709. maidArray[j].SetPos(dancePos[j]);
  12710. maidArray[j].body0.transform.localRotation = danceRot[j];
  12711. }
  12712. }
  12713. }
  12714. isDanceStart11V = false;
  12715. }
  12716. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12717. || isDanceStart13K)
  12718. {
  12719. for (int j = 0; j < maidCnt; j++)
  12720. {
  12721. if (maidArray[j] && maidArray[j].Visible)
  12722. {
  12723. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12724. || isDanceStart13K)
  12725. {
  12726. maidArray[j].SetPos(dancePos[j]);
  12727. maidArray[j].body0.transform.localRotation = danceRot[j];
  12728. int i = j;
  12729. if (!isVR)
  12730. {
  12731. delCount[i] = 20;
  12732. if (goSlot[(int)selectList[i]] != null)
  12733. {
  12734. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12735. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12736. {
  12737. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12738. }
  12739. }
  12740. }
  12741. Maid maid = maidArray[j];
  12742. maid.DelProp(MPN.handitem, true);
  12743. maid.DelProp(MPN.accvag, true);
  12744. maid.DelProp(MPN.accanl, true);
  12745. maid.DelProp(MPN.kousoku_upper, true);
  12746. maid.DelProp(MPN.kousoku_lower, true);
  12747. maid.AllProcPropSeqStart();
  12748. }
  12749. }
  12750. }
  12751. isDanceStart1K = false;
  12752. isDanceStart3K = false;
  12753. isDanceStart4K = false;
  12754. isDanceStart5K = false;
  12755. isDanceStart6K = false;
  12756. isDanceStart9K = false;
  12757. isDanceStart13K = false;
  12758. }
  12759. if (isDanceStart14V)
  12760. {
  12761. for (int j = 0; j < maidCnt; j++)
  12762. {
  12763. if (maidArray[j] && maidArray[j].Visible)
  12764. {
  12765. if (isDanceStart14V)
  12766. {
  12767. maidArray[j].SetPos(dancePos[j]);
  12768. maidArray[j].body0.transform.localRotation = danceRot[j];
  12769. }
  12770. }
  12771. }
  12772. isDanceStart14V = false;
  12773. }
  12774. if (isDanceStart15V)
  12775. {
  12776. for (int j = 0; j < maidCnt; j++)
  12777. {
  12778. if (maidArray[j] && maidArray[j].Visible)
  12779. {
  12780. if (isDanceStart15V)
  12781. {
  12782. maidArray[j].SetPos(dancePos[j]);
  12783. maidArray[j].body0.transform.localRotation = danceRot[j];
  12784. }
  12785. }
  12786. }
  12787. isDanceStart15V = false;
  12788. }
  12789. for (int j = 0; j < maidCnt; j++)
  12790. {
  12791. isStop[j] = false;
  12792. isLock[j] = false;
  12793. pHandL[j] = 0;
  12794. pHandR[j] = 0;
  12795. muneIKL[j] = false;
  12796. muneIKR[j] = false;
  12797. if (!isVR)
  12798. {
  12799. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12800. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12801. }
  12802. if (maidArray[j].transform.position.y != 100f)
  12803. {
  12804. dancePos[j] = maidArray[j].transform.position;
  12805. }
  12806. else
  12807. {
  12808. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12809. }
  12810. danceRot[j] = maidArray[j].transform.localRotation;
  12811. }
  12812. if (maidArray[1] && maidArray[1].Visible)
  12813. {
  12814. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12815. maidArray[0].transform.position.y,
  12816. maidArray[0].transform.position.z));
  12817. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12818. }
  12819. if (maidArray[2] && maidArray[2].Visible)
  12820. {
  12821. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12822. maidArray[0].transform.position.y,
  12823. maidArray[0].transform.position.z));
  12824. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12825. }
  12826. if (maidArray[4] && maidArray[4].Visible)
  12827. {
  12828. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12829. maidArray[3].transform.position.y,
  12830. maidArray[3].transform.position.z));
  12831. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12832. }
  12833. if (maidArray[5] && maidArray[5].Visible)
  12834. {
  12835. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12836. maidArray[3].transform.position.y,
  12837. maidArray[3].transform.position.z));
  12838. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12839. }
  12840. if (maidArray[7] && maidArray[7].Visible)
  12841. {
  12842. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12843. maidArray[6].transform.position.y,
  12844. maidArray[6].transform.position.z));
  12845. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12846. }
  12847. if (maidArray[8] && maidArray[8].Visible)
  12848. {
  12849. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12850. maidArray[6].transform.position.y,
  12851. maidArray[6].transform.position.z));
  12852. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12853. }
  12854. if (maidArray[10] && maidArray[10].Visible)
  12855. {
  12856. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12857. maidArray[9].transform.position.y,
  12858. maidArray[9].transform.position.z));
  12859. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12860. }
  12861. if (maidArray[11] && maidArray[11].Visible)
  12862. {
  12863. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12864. maidArray[9].transform.position.y,
  12865. maidArray[9].transform.position.z));
  12866. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12867. }
  12868. if (maidArray[13] && maidArray[13].Visible)
  12869. {
  12870. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12871. maidArray[12].transform.position.y,
  12872. maidArray[12].transform.position.z));
  12873. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12874. }
  12875. isSS = false;
  12876. isDance = true;
  12877. isDanceStart11 = true;
  12878. }
  12879. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12880. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12881. {
  12882. GameMain.Instance.SoundMgr.StopBGM(0f);
  12883. isSS1 = true;
  12884. isSS2 = false;
  12885. isSS3 = false;
  12886. isSS4 = false;
  12887. isSS5 = false;
  12888. isSS6 = false;
  12889. isSS = true;
  12890. }
  12891. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12892. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12893. {
  12894. GameMain.Instance.SoundMgr.StopBGM(0f);
  12895. isSS1 = false;
  12896. isSS2 = true;
  12897. isSS3 = false;
  12898. isSS4 = false;
  12899. isSS5 = false;
  12900. isSS6 = false;
  12901. isSS = true;
  12902. }
  12903. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12904. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12905. {
  12906. GameMain.Instance.SoundMgr.StopBGM(0f);
  12907. isSS1 = false;
  12908. isSS2 = false;
  12909. isSS3 = true;
  12910. isSS4 = false;
  12911. isSS5 = false;
  12912. isSS6 = false;
  12913. isSS = true;
  12914. }
  12915. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12916. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12917. {
  12918. GameMain.Instance.SoundMgr.StopBGM(0f);
  12919. isSS1 = false;
  12920. isSS2 = false;
  12921. isSS3 = false;
  12922. isSS4 = true;
  12923. isSS5 = false;
  12924. isSS6 = false;
  12925. isSS = true;
  12926. }
  12927. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12928. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12929. {
  12930. GameMain.Instance.SoundMgr.StopBGM(0f);
  12931. isSS1 = false;
  12932. isSS2 = false;
  12933. isSS3 = false;
  12934. isSS4 = false;
  12935. isSS5 = true;
  12936. isSS6 = false;
  12937. isSS = true;
  12938. }
  12939. if (isKHG1 || isKHG2)
  12940. {
  12941. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12942. string text4 = textAsset.text;
  12943. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12944. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12945. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12946. for (int j = 0; j < maidCnt; j++)
  12947. {
  12948. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12949. {
  12950. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12951. GameUty.FileSystem,
  12952. "dance_cm3d2_005_khg_f.anm",
  12953. false,
  12954. false);
  12955. }
  12956. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12957. }
  12958. if (isKHG1)
  12959. {
  12960. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12961. }
  12962. if (isKHG2)
  12963. {
  12964. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12965. }
  12966. for (int j = 0; j < maidCnt; j++)
  12967. {
  12968. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12969. isStop[j] = false;
  12970. isLock[j] = false;
  12971. pHandL[j] = 0;
  12972. pHandR[j] = 0;
  12973. muneIKL[j] = false;
  12974. muneIKR[j] = false;
  12975. if (!isVR)
  12976. {
  12977. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12978. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12979. }
  12980. }
  12981. ikBui = 5;
  12982. isDanceStart1F = false;
  12983. isDanceStart2F = false;
  12984. isDanceStart3F = false;
  12985. isDanceStart4F = false;
  12986. isDanceStart5F = false;
  12987. isDanceStart6F = false;
  12988. isDanceStart7F = false;
  12989. isDanceStart8F = false;
  12990. isDanceStart9F = false;
  12991. isDanceStart10F = false;
  12992. isDanceStart11F = false;
  12993. isDanceStart12F = false;
  12994. isDanceStart13F = false;
  12995. isDanceStart14F = false;
  12996. isDanceStart15F = false;
  12997. for (int j = 0; j < maidCnt; j++)
  12998. {
  12999. danceFace[j] = 0f;
  13000. }
  13001. if (isDanceStart7V)
  13002. {
  13003. for (int j = 0; j < maidCnt; j++)
  13004. {
  13005. if (maidArray[j] && maidArray[j].Visible)
  13006. {
  13007. if (isDanceStart7V)
  13008. {
  13009. maidArray[j].SetPos(dancePos[j]);
  13010. maidArray[j].body0.transform.localRotation = danceRot[j];
  13011. }
  13012. }
  13013. }
  13014. isDanceStart7V = false;
  13015. }
  13016. if (isDanceStart8V)
  13017. {
  13018. for (int j = 0; j < maidCnt; j++)
  13019. {
  13020. if (maidArray[j] && maidArray[j].Visible)
  13021. {
  13022. if (isDanceStart8V)
  13023. {
  13024. maidArray[j].SetPos(dancePos[j]);
  13025. maidArray[j].body0.transform.localRotation = danceRot[j];
  13026. }
  13027. }
  13028. }
  13029. isDanceStart8V = false;
  13030. isDanceStart8P = false;
  13031. }
  13032. if (isDanceStart11V)
  13033. {
  13034. for (int j = 0; j < maidCnt; j++)
  13035. {
  13036. if (maidArray[j] && maidArray[j].Visible)
  13037. {
  13038. if (isDanceStart11V)
  13039. {
  13040. maidArray[j].SetPos(dancePos[j]);
  13041. maidArray[j].body0.transform.localRotation = danceRot[j];
  13042. }
  13043. }
  13044. }
  13045. isDanceStart11V = false;
  13046. }
  13047. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13048. || isDanceStart13K)
  13049. {
  13050. for (int j = 0; j < maidCnt; j++)
  13051. {
  13052. if (maidArray[j] && maidArray[j].Visible)
  13053. {
  13054. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13055. || isDanceStart13K)
  13056. {
  13057. maidArray[j].SetPos(dancePos[j]);
  13058. maidArray[j].body0.transform.localRotation = danceRot[j];
  13059. int i = j;
  13060. if (!isVR)
  13061. {
  13062. delCount[i] = 20;
  13063. if (goSlot[(int)selectList[i]] != null)
  13064. {
  13065. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13066. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13067. {
  13068. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13069. }
  13070. }
  13071. }
  13072. Maid maid = maidArray[j];
  13073. maid.DelProp(MPN.handitem, true);
  13074. maid.DelProp(MPN.accvag, true);
  13075. maid.DelProp(MPN.accanl, true);
  13076. maid.DelProp(MPN.kousoku_upper, true);
  13077. maid.DelProp(MPN.kousoku_lower, true);
  13078. maid.AllProcPropSeqStart();
  13079. }
  13080. }
  13081. }
  13082. isDanceStart1K = false;
  13083. isDanceStart3K = false;
  13084. isDanceStart4K = false;
  13085. isDanceStart5K = false;
  13086. isDanceStart6K = false;
  13087. isDanceStart9K = false;
  13088. isDanceStart13K = false;
  13089. }
  13090. if (isDanceStart14V)
  13091. {
  13092. for (int j = 0; j < maidCnt; j++)
  13093. {
  13094. if (maidArray[j] && maidArray[j].Visible)
  13095. {
  13096. if (isDanceStart14V)
  13097. {
  13098. maidArray[j].SetPos(dancePos[j]);
  13099. maidArray[j].body0.transform.localRotation = danceRot[j];
  13100. }
  13101. }
  13102. }
  13103. isDanceStart14V = false;
  13104. }
  13105. if (isDanceStart15V)
  13106. {
  13107. for (int j = 0; j < maidCnt; j++)
  13108. {
  13109. if (maidArray[j] && maidArray[j].Visible)
  13110. {
  13111. if (isDanceStart15V)
  13112. {
  13113. maidArray[j].SetPos(dancePos[j]);
  13114. maidArray[j].body0.transform.localRotation = danceRot[j];
  13115. }
  13116. }
  13117. }
  13118. isDanceStart15V = false;
  13119. }
  13120. if (maidArray[1] && maidArray[1].Visible)
  13121. {
  13122. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13123. {
  13124. Vector3 vector = Vector3.zero;
  13125. vector.x = 0.6f;
  13126. maidArray[1].SetPos(vector);
  13127. if (maidArray[2] && maidArray[2].Visible)
  13128. {
  13129. vector.x = -0.6f;
  13130. maidArray[2].SetPos(vector);
  13131. }
  13132. if (maidArray[3] && maidArray[3].Visible)
  13133. {
  13134. vector.x = 1.2f;
  13135. maidArray[3].SetPos(vector);
  13136. }
  13137. if (maidArray[4] && maidArray[4].Visible)
  13138. {
  13139. vector.x = -1.2f;
  13140. maidArray[4].SetPos(vector);
  13141. }
  13142. if (maidArray[5] && maidArray[5].Visible)
  13143. {
  13144. vector.x = 1.8f;
  13145. maidArray[5].SetPos(vector);
  13146. }
  13147. if (maidArray[6] && maidArray[6].Visible)
  13148. {
  13149. vector.x = -1.8f;
  13150. maidArray[6].SetPos(vector);
  13151. }
  13152. if (maidArray[7] && maidArray[7].Visible)
  13153. {
  13154. vector.x = 2.4f;
  13155. maidArray[7].SetPos(vector);
  13156. }
  13157. if (maidArray[8] && maidArray[8].Visible)
  13158. {
  13159. vector.x = -2.4f;
  13160. maidArray[8].SetPos(vector);
  13161. }
  13162. if (maidArray[9] && maidArray[9].Visible)
  13163. {
  13164. vector.x = 3f;
  13165. maidArray[9].SetPos(vector);
  13166. }
  13167. if (maidArray[10] && maidArray[10].Visible)
  13168. {
  13169. vector.x = -3f;
  13170. maidArray[10].SetPos(vector);
  13171. }
  13172. if (maidArray[11] && maidArray[11].Visible)
  13173. {
  13174. vector.x = 3.6f;
  13175. maidArray[11].SetPos(vector);
  13176. }
  13177. if (maidArray[12] && maidArray[12].Visible)
  13178. {
  13179. vector.x = -3.6f;
  13180. maidArray[12].SetPos(vector);
  13181. }
  13182. if (maidArray[13] && maidArray[13].Visible)
  13183. {
  13184. vector.x = 4.2f;
  13185. maidArray[13].SetPos(vector);
  13186. }
  13187. }
  13188. }
  13189. isDance = true;
  13190. isDanceStart12 = true;
  13191. isKHG1 = false;
  13192. isKHG2 = false;
  13193. }
  13194. if (isDanceStart13Count > 0)
  13195. {
  13196. isDanceStart13Count++;
  13197. }
  13198. if (isDanceStart13Count == 1)
  13199. {
  13200. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13201. isDanceStart13Count = 0;
  13202. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13203. string text4 = textAsset.text;
  13204. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13205. for (int j = 0; j < maidCnt; j++)
  13206. {
  13207. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13208. }
  13209. }
  13210. if ((isSN1 || isSN2 || isSN3) && isShift)
  13211. {
  13212. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13213. string text4 = textAsset.text;
  13214. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13215. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13216. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13217. for (int j = 0; j < maidCnt; j++)
  13218. {
  13219. if (!isShift)
  13220. {
  13221. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13222. {
  13223. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13224. GameUty.FileSystem,
  13225. "dance_cm3d2_006_ssn_f1.anm",
  13226. false,
  13227. false);
  13228. }
  13229. }
  13230. else
  13231. {
  13232. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13233. {
  13234. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13235. GameUty.FileSystem,
  13236. "dance_cm3d21_kara_001_nmf_f1.anm",
  13237. false,
  13238. false);
  13239. }
  13240. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13241. string text5 = nameA + danceNo1 + ".anm";
  13242. switch (j)
  13243. {
  13244. case 1:
  13245. case 4:
  13246. case 7:
  13247. case 10:
  13248. case 13:
  13249. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13250. break;
  13251. case 2:
  13252. case 5:
  13253. case 8:
  13254. case 11:
  13255. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13256. break;
  13257. }
  13258. text4 = textAsset.text;
  13259. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13260. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13261. && !isDanceStart9K && !isDanceStart13K)
  13262. {
  13263. dancePos[j] = maidArray[j].transform.position;
  13264. danceRot[j] = maidArray[j].transform.localRotation;
  13265. }
  13266. }
  13267. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13268. }
  13269. if (!isShift)
  13270. {
  13271. if (isSN1)
  13272. {
  13273. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13274. }
  13275. if (isSN2)
  13276. {
  13277. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13278. }
  13279. if (isSN3)
  13280. {
  13281. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13282. }
  13283. }
  13284. else
  13285. {
  13286. danceWait = 400;
  13287. isDanceStart13Count++;
  13288. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13289. }
  13290. for (int j = 0; j < maidCnt; j++)
  13291. {
  13292. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13293. isStop[j] = false;
  13294. isLock[j] = false;
  13295. pHandL[j] = 0;
  13296. pHandR[j] = 0;
  13297. muneIKL[j] = false;
  13298. muneIKR[j] = false;
  13299. if (!isVR)
  13300. {
  13301. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13302. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13303. }
  13304. }
  13305. ikBui = 5;
  13306. isDanceStart1F = false;
  13307. isDanceStart2F = false;
  13308. isDanceStart3F = false;
  13309. isDanceStart4F = false;
  13310. isDanceStart5F = false;
  13311. isDanceStart6F = false;
  13312. isDanceStart7F = false;
  13313. isDanceStart8F = false;
  13314. isDanceStart9F = false;
  13315. isDanceStart10F = false;
  13316. isDanceStart11F = false;
  13317. isDanceStart12F = false;
  13318. isDanceStart13F = false;
  13319. isDanceStart14F = false;
  13320. isDanceStart15F = false;
  13321. for (int j = 0; j < maidCnt; j++)
  13322. {
  13323. danceFace[j] = 0f;
  13324. }
  13325. if (isDanceStart7V)
  13326. {
  13327. for (int j = 0; j < maidCnt; j++)
  13328. {
  13329. if (maidArray[j] && maidArray[j].Visible)
  13330. {
  13331. if (isDanceStart7V)
  13332. {
  13333. maidArray[j].SetPos(dancePos[j]);
  13334. maidArray[j].body0.transform.localRotation = danceRot[j];
  13335. }
  13336. }
  13337. }
  13338. isDanceStart7V = false;
  13339. }
  13340. if (isDanceStart8V)
  13341. {
  13342. for (int j = 0; j < maidCnt; j++)
  13343. {
  13344. if (maidArray[j] && maidArray[j].Visible)
  13345. {
  13346. if (isDanceStart8V)
  13347. {
  13348. maidArray[j].SetPos(dancePos[j]);
  13349. maidArray[j].body0.transform.localRotation = danceRot[j];
  13350. }
  13351. }
  13352. }
  13353. isDanceStart8V = false;
  13354. isDanceStart8P = false;
  13355. }
  13356. if (isDanceStart11V)
  13357. {
  13358. for (int j = 0; j < maidCnt; j++)
  13359. {
  13360. if (maidArray[j] && maidArray[j].Visible)
  13361. {
  13362. if (isDanceStart11V)
  13363. {
  13364. maidArray[j].SetPos(dancePos[j]);
  13365. maidArray[j].body0.transform.localRotation = danceRot[j];
  13366. }
  13367. }
  13368. }
  13369. isDanceStart11V = false;
  13370. }
  13371. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13372. || isDanceStart13K)
  13373. {
  13374. for (int j = 0; j < maidCnt; j++)
  13375. {
  13376. if (maidArray[j] && maidArray[j].Visible)
  13377. {
  13378. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13379. || isDanceStart13K)
  13380. {
  13381. maidArray[j].SetPos(dancePos[j]);
  13382. maidArray[j].body0.transform.localRotation = danceRot[j];
  13383. int i = j;
  13384. if (!isVR)
  13385. {
  13386. delCount[i] = 20;
  13387. if (goSlot[(int)selectList[i]] != null)
  13388. {
  13389. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13390. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13391. {
  13392. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13393. }
  13394. }
  13395. }
  13396. Maid maid = maidArray[j];
  13397. maid.DelProp(MPN.handitem, true);
  13398. maid.DelProp(MPN.accvag, true);
  13399. maid.DelProp(MPN.accanl, true);
  13400. maid.DelProp(MPN.kousoku_upper, true);
  13401. maid.DelProp(MPN.kousoku_lower, true);
  13402. maid.AllProcPropSeqStart();
  13403. }
  13404. }
  13405. }
  13406. isDanceStart1K = false;
  13407. isDanceStart3K = false;
  13408. isDanceStart4K = false;
  13409. isDanceStart5K = false;
  13410. isDanceStart6K = false;
  13411. isDanceStart9K = false;
  13412. isDanceStart13K = false;
  13413. }
  13414. if (isDanceStart14V)
  13415. {
  13416. for (int j = 0; j < maidCnt; j++)
  13417. {
  13418. if (maidArray[j] && maidArray[j].Visible)
  13419. {
  13420. if (isDanceStart14V)
  13421. {
  13422. maidArray[j].SetPos(dancePos[j]);
  13423. maidArray[j].body0.transform.localRotation = danceRot[j];
  13424. }
  13425. }
  13426. }
  13427. isDanceStart14V = false;
  13428. }
  13429. if (isDanceStart15V)
  13430. {
  13431. for (int j = 0; j < maidCnt; j++)
  13432. {
  13433. if (maidArray[j] && maidArray[j].Visible)
  13434. {
  13435. if (isDanceStart15V)
  13436. {
  13437. maidArray[j].SetPos(dancePos[j]);
  13438. maidArray[j].body0.transform.localRotation = danceRot[j];
  13439. }
  13440. }
  13441. }
  13442. isDanceStart15V = false;
  13443. }
  13444. if (maidArray[1] && maidArray[1].Visible)
  13445. {
  13446. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13447. {
  13448. Vector3 vector = Vector3.zero;
  13449. vector.x = 0.6f;
  13450. maidArray[1].SetPos(vector);
  13451. if (maidArray[2] && maidArray[2].Visible)
  13452. {
  13453. vector.x = -0.6f;
  13454. maidArray[2].SetPos(vector);
  13455. }
  13456. if (maidArray[3] && maidArray[3].Visible)
  13457. {
  13458. vector.x = 1.2f;
  13459. maidArray[3].SetPos(vector);
  13460. }
  13461. if (maidArray[4] && maidArray[4].Visible)
  13462. {
  13463. vector.x = -1.2f;
  13464. maidArray[4].SetPos(vector);
  13465. }
  13466. if (maidArray[5] && maidArray[5].Visible)
  13467. {
  13468. vector.x = 1.8f;
  13469. maidArray[5].SetPos(vector);
  13470. }
  13471. if (maidArray[6] && maidArray[6].Visible)
  13472. {
  13473. vector.x = -1.8f;
  13474. maidArray[6].SetPos(vector);
  13475. }
  13476. if (maidArray[7] && maidArray[7].Visible)
  13477. {
  13478. vector.x = 2.4f;
  13479. maidArray[7].SetPos(vector);
  13480. }
  13481. if (maidArray[8] && maidArray[8].Visible)
  13482. {
  13483. vector.x = -2.4f;
  13484. maidArray[8].SetPos(vector);
  13485. }
  13486. if (maidArray[9] && maidArray[9].Visible)
  13487. {
  13488. vector.x = 3f;
  13489. maidArray[9].SetPos(vector);
  13490. }
  13491. if (maidArray[10] && maidArray[10].Visible)
  13492. {
  13493. vector.x = -3f;
  13494. maidArray[10].SetPos(vector);
  13495. }
  13496. if (maidArray[11] && maidArray[11].Visible)
  13497. {
  13498. vector.x = 3.6f;
  13499. maidArray[11].SetPos(vector);
  13500. }
  13501. if (maidArray[12] && maidArray[12].Visible)
  13502. {
  13503. vector.x = -3.6f;
  13504. maidArray[12].SetPos(vector);
  13505. }
  13506. if (maidArray[13] && maidArray[13].Visible)
  13507. {
  13508. vector.x = 4.2f;
  13509. maidArray[13].SetPos(vector);
  13510. }
  13511. }
  13512. }
  13513. if (isShift)
  13514. {
  13515. isDanceStart13K = true;
  13516. for (int j = 0; j < maidCnt; j++)
  13517. {
  13518. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13519. maidArray[j].body0.transform.localRotation.y + 90f,
  13520. maidArray[j].body0.transform.localRotation.z));
  13521. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13522. maidArray[j].body0.transform.position.y,
  13523. maidArray[j].body0.transform.position.z + 4f));
  13524. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13525. int i = j;
  13526. Maid maid = maidArray[j];
  13527. if (!isVR)
  13528. {
  13529. delCount[i] = 20;
  13530. if (goSlot[(int)selectList[i]] != null)
  13531. {
  13532. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13533. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13534. {
  13535. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13536. }
  13537. }
  13538. }
  13539. string[] array = new string[2];
  13540. array = text2.Split(new char[] { ',' });
  13541. maid.DelProp(MPN.handitem, true);
  13542. maid.DelProp(MPN.accvag, true);
  13543. maid.DelProp(MPN.accanl, true);
  13544. maid.DelProp(MPN.kousoku_upper, true);
  13545. maid.DelProp(MPN.kousoku_lower, true);
  13546. if (array[0] != "")
  13547. {
  13548. maid.SetProp(array[0], array[1], 0, true, false);
  13549. }
  13550. maid.AllProcPropSeqStart();
  13551. }
  13552. }
  13553. isDance = true;
  13554. isDanceStart13 = true;
  13555. isSN1 = false;
  13556. isSN2 = false;
  13557. isSN3 = false;
  13558. }
  13559. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13560. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13561. {
  13562. GameMain.Instance.SoundMgr.StopBGM(0f);
  13563. isSN1 = true;
  13564. hFlg = true;
  13565. if (getModKeyPressing(modKey.Shift))
  13566. {
  13567. isShift = true;
  13568. }
  13569. }
  13570. if (isSN4 || isSN5 || isSN6)
  13571. {
  13572. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13573. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13574. for (int j = 0; j < maidCnt; j++)
  13575. {
  13576. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13577. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13578. switch (j)
  13579. {
  13580. case 1:
  13581. case 4:
  13582. case 7:
  13583. case 10:
  13584. case 13:
  13585. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13586. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13587. break;
  13588. case 2:
  13589. case 5:
  13590. case 8:
  13591. case 11:
  13592. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13593. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13594. break;
  13595. }
  13596. if (maidArray[j] && maidArray[j].Visible)
  13597. {
  13598. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13599. {
  13600. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13601. }
  13602. string text4 = textAsset.text;
  13603. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13604. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13605. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13606. }
  13607. }
  13608. if (isSN4)
  13609. {
  13610. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13611. }
  13612. if (isSN5)
  13613. {
  13614. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13615. }
  13616. if (isSN6)
  13617. {
  13618. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13619. }
  13620. ikBui = 5;
  13621. isDanceStart1F = false;
  13622. isDanceStart2F = false;
  13623. isDanceStart3F = false;
  13624. isDanceStart4F = false;
  13625. isDanceStart5F = false;
  13626. isDanceStart6F = false;
  13627. isDanceStart7F = false;
  13628. isDanceStart8F = false;
  13629. isDanceStart9F = false;
  13630. isDanceStart10F = false;
  13631. isDanceStart11F = false;
  13632. isDanceStart12F = false;
  13633. isDanceStart13F = false;
  13634. isDanceStart14F = false;
  13635. isDanceStart15F = false;
  13636. for (int j = 0; j < maidCnt; j++)
  13637. {
  13638. danceFace[j] = 0f;
  13639. }
  13640. if (isDanceStart7V)
  13641. {
  13642. for (int j = 0; j < maidCnt; j++)
  13643. {
  13644. if (maidArray[j] && maidArray[j].Visible)
  13645. {
  13646. if (isDanceStart7V)
  13647. {
  13648. maidArray[j].SetPos(dancePos[j]);
  13649. maidArray[j].body0.transform.localRotation = danceRot[j];
  13650. }
  13651. }
  13652. }
  13653. isDanceStart7V = false;
  13654. }
  13655. if (isDanceStart8V)
  13656. {
  13657. for (int j = 0; j < maidCnt; j++)
  13658. {
  13659. if (maidArray[j] && maidArray[j].Visible)
  13660. {
  13661. if (isDanceStart8V)
  13662. {
  13663. maidArray[j].SetPos(dancePos[j]);
  13664. maidArray[j].body0.transform.localRotation = danceRot[j];
  13665. }
  13666. }
  13667. }
  13668. isDanceStart8V = false;
  13669. isDanceStart8P = false;
  13670. }
  13671. if (isDanceStart11V)
  13672. {
  13673. for (int j = 0; j < maidCnt; j++)
  13674. {
  13675. if (maidArray[j] && maidArray[j].Visible)
  13676. {
  13677. if (isDanceStart11V)
  13678. {
  13679. maidArray[j].SetPos(dancePos[j]);
  13680. maidArray[j].body0.transform.localRotation = danceRot[j];
  13681. }
  13682. }
  13683. }
  13684. isDanceStart11V = false;
  13685. }
  13686. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13687. || isDanceStart13K)
  13688. {
  13689. for (int j = 0; j < maidCnt; j++)
  13690. {
  13691. if (maidArray[j] && maidArray[j].Visible)
  13692. {
  13693. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13694. || isDanceStart13K)
  13695. {
  13696. maidArray[j].SetPos(dancePos[j]);
  13697. maidArray[j].body0.transform.localRotation = danceRot[j];
  13698. int i = j;
  13699. if (!isVR)
  13700. {
  13701. delCount[i] = 20;
  13702. if (goSlot[(int)selectList[i]] != null)
  13703. {
  13704. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13705. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13706. {
  13707. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13708. }
  13709. }
  13710. }
  13711. Maid maid = maidArray[j];
  13712. maid.DelProp(MPN.handitem, true);
  13713. maid.DelProp(MPN.accvag, true);
  13714. maid.DelProp(MPN.accanl, true);
  13715. maid.DelProp(MPN.kousoku_upper, true);
  13716. maid.DelProp(MPN.kousoku_lower, true);
  13717. maid.AllProcPropSeqStart();
  13718. }
  13719. }
  13720. }
  13721. isDanceStart1K = false;
  13722. isDanceStart3K = false;
  13723. isDanceStart4K = false;
  13724. isDanceStart5K = false;
  13725. isDanceStart6K = false;
  13726. isDanceStart9K = false;
  13727. isDanceStart13K = false;
  13728. }
  13729. if (isDanceStart14V)
  13730. {
  13731. for (int j = 0; j < maidCnt; j++)
  13732. {
  13733. if (maidArray[j] && maidArray[j].Visible)
  13734. {
  13735. if (isDanceStart14V)
  13736. {
  13737. maidArray[j].SetPos(dancePos[j]);
  13738. maidArray[j].body0.transform.localRotation = danceRot[j];
  13739. }
  13740. }
  13741. }
  13742. isDanceStart14V = false;
  13743. }
  13744. if (isDanceStart15V)
  13745. {
  13746. for (int j = 0; j < maidCnt; j++)
  13747. {
  13748. if (maidArray[j] && maidArray[j].Visible)
  13749. {
  13750. if (isDanceStart15V)
  13751. {
  13752. maidArray[j].SetPos(dancePos[j]);
  13753. maidArray[j].body0.transform.localRotation = danceRot[j];
  13754. }
  13755. }
  13756. }
  13757. isDanceStart15V = false;
  13758. }
  13759. for (int j = 0; j < maidCnt; j++)
  13760. {
  13761. isStop[j] = false;
  13762. isLock[j] = false;
  13763. pHandL[j] = 0;
  13764. pHandR[j] = 0;
  13765. muneIKL[j] = false;
  13766. muneIKR[j] = false;
  13767. if (!isVR)
  13768. {
  13769. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13770. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13771. }
  13772. if (maidArray[j].transform.position.y != 100f)
  13773. {
  13774. dancePos[j] = maidArray[j].transform.position;
  13775. }
  13776. else
  13777. {
  13778. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13779. }
  13780. danceRot[j] = maidArray[j].transform.localRotation;
  13781. }
  13782. if (maidArray[1] && maidArray[1].Visible)
  13783. {
  13784. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13785. maidArray[0].transform.position.y,
  13786. maidArray[0].transform.position.z));
  13787. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13788. }
  13789. if (maidArray[2] && maidArray[2].Visible)
  13790. {
  13791. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13792. maidArray[0].transform.position.y,
  13793. maidArray[0].transform.position.z));
  13794. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13795. }
  13796. if (maidArray[4] && maidArray[4].Visible)
  13797. {
  13798. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13799. maidArray[3].transform.position.y,
  13800. maidArray[3].transform.position.z));
  13801. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13802. }
  13803. if (maidArray[5] && maidArray[5].Visible)
  13804. {
  13805. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13806. maidArray[3].transform.position.y,
  13807. maidArray[3].transform.position.z));
  13808. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13809. }
  13810. if (maidArray[7] && maidArray[7].Visible)
  13811. {
  13812. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13813. maidArray[6].transform.position.y,
  13814. maidArray[6].transform.position.z));
  13815. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13816. }
  13817. if (maidArray[8] && maidArray[8].Visible)
  13818. {
  13819. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13820. maidArray[6].transform.position.y,
  13821. maidArray[6].transform.position.z));
  13822. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13823. }
  13824. if (maidArray[10] && maidArray[10].Visible)
  13825. {
  13826. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13827. maidArray[9].transform.position.y,
  13828. maidArray[9].transform.position.z));
  13829. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13830. }
  13831. if (maidArray[11] && maidArray[11].Visible)
  13832. {
  13833. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13834. maidArray[9].transform.position.y,
  13835. maidArray[9].transform.position.z));
  13836. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13837. }
  13838. if (maidArray[13] && maidArray[13].Visible)
  13839. {
  13840. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13841. maidArray[12].transform.position.y,
  13842. maidArray[12].transform.position.z));
  13843. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13844. }
  13845. isDance = true;
  13846. isDanceStart14 = true;
  13847. isSN4 = false;
  13848. isSN5 = false;
  13849. isSN6 = false;
  13850. }
  13851. if (isSD1)
  13852. {
  13853. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13854. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13855. for (int j = 0; j < maidCnt; j++)
  13856. {
  13857. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13858. string text5 = "dance_cmo_002_sd_f1.anm";
  13859. switch (j)
  13860. {
  13861. case 1:
  13862. case 3:
  13863. case 5:
  13864. case 7:
  13865. case 9:
  13866. case 11:
  13867. case 13:
  13868. text5 = "dance_cmo_002_sd_f2.anm";
  13869. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13870. break;
  13871. }
  13872. danceName[j] = text5;
  13873. if (maidArray[j] && maidArray[j].Visible)
  13874. {
  13875. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13876. {
  13877. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13878. }
  13879. string text4 = textAsset.text;
  13880. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13881. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13882. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13883. }
  13884. }
  13885. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13886. ikBui = 5;
  13887. isDanceStart1F = false;
  13888. isDanceStart2F = false;
  13889. isDanceStart3F = false;
  13890. isDanceStart4F = false;
  13891. isDanceStart5F = false;
  13892. isDanceStart6F = false;
  13893. isDanceStart7F = false;
  13894. isDanceStart8F = false;
  13895. isDanceStart9F = false;
  13896. isDanceStart10F = false;
  13897. isDanceStart11F = false;
  13898. isDanceStart12F = false;
  13899. isDanceStart13F = false;
  13900. isDanceStart14F = false;
  13901. isDanceStart15F = false;
  13902. for (int j = 0; j < maidCnt; j++)
  13903. {
  13904. danceFace[j] = 0f;
  13905. }
  13906. if (isDanceStart7V)
  13907. {
  13908. for (int j = 0; j < maidCnt; j++)
  13909. {
  13910. if (maidArray[j] && maidArray[j].Visible)
  13911. {
  13912. if (isDanceStart7V)
  13913. {
  13914. maidArray[j].SetPos(dancePos[j]);
  13915. maidArray[j].body0.transform.localRotation = danceRot[j];
  13916. }
  13917. }
  13918. }
  13919. isDanceStart7V = false;
  13920. }
  13921. if (isDanceStart8V)
  13922. {
  13923. for (int j = 0; j < maidCnt; j++)
  13924. {
  13925. if (maidArray[j] && maidArray[j].Visible)
  13926. {
  13927. if (isDanceStart8V)
  13928. {
  13929. maidArray[j].SetPos(dancePos[j]);
  13930. maidArray[j].body0.transform.localRotation = danceRot[j];
  13931. }
  13932. }
  13933. }
  13934. isDanceStart8V = false;
  13935. isDanceStart8P = false;
  13936. }
  13937. if (isDanceStart11V)
  13938. {
  13939. for (int j = 0; j < maidCnt; j++)
  13940. {
  13941. if (maidArray[j] && maidArray[j].Visible)
  13942. {
  13943. if (isDanceStart11V)
  13944. {
  13945. maidArray[j].SetPos(dancePos[j]);
  13946. maidArray[j].body0.transform.localRotation = danceRot[j];
  13947. }
  13948. }
  13949. }
  13950. isDanceStart11V = false;
  13951. }
  13952. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13953. || isDanceStart13K)
  13954. {
  13955. for (int j = 0; j < maidCnt; j++)
  13956. {
  13957. if (maidArray[j] && maidArray[j].Visible)
  13958. {
  13959. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13960. || isDanceStart13K)
  13961. {
  13962. maidArray[j].SetPos(dancePos[j]);
  13963. maidArray[j].body0.transform.localRotation = danceRot[j];
  13964. int i = j;
  13965. if (!isVR)
  13966. {
  13967. delCount[i] = 20;
  13968. if (goSlot[(int)selectList[i]] != null)
  13969. {
  13970. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13971. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13972. {
  13973. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13974. }
  13975. }
  13976. }
  13977. Maid maid = maidArray[j];
  13978. maid.DelProp(MPN.handitem, true);
  13979. maid.DelProp(MPN.accvag, true);
  13980. maid.DelProp(MPN.accanl, true);
  13981. maid.DelProp(MPN.kousoku_upper, true);
  13982. maid.DelProp(MPN.kousoku_lower, true);
  13983. maid.AllProcPropSeqStart();
  13984. }
  13985. }
  13986. }
  13987. isDanceStart1K = false;
  13988. isDanceStart3K = false;
  13989. isDanceStart4K = false;
  13990. isDanceStart5K = false;
  13991. isDanceStart6K = false;
  13992. isDanceStart9K = false;
  13993. isDanceStart13K = false;
  13994. }
  13995. if (isDanceStart14V)
  13996. {
  13997. for (int j = 0; j < maidCnt; j++)
  13998. {
  13999. if (maidArray[j] && maidArray[j].Visible)
  14000. {
  14001. if (isDanceStart14V)
  14002. {
  14003. maidArray[j].SetPos(dancePos[j]);
  14004. maidArray[j].body0.transform.localRotation = danceRot[j];
  14005. }
  14006. }
  14007. }
  14008. isDanceStart14V = false;
  14009. }
  14010. if (isDanceStart15V)
  14011. {
  14012. for (int j = 0; j < maidCnt; j++)
  14013. {
  14014. if (maidArray[j] && maidArray[j].Visible)
  14015. {
  14016. if (isDanceStart15V)
  14017. {
  14018. maidArray[j].SetPos(dancePos[j]);
  14019. maidArray[j].body0.transform.localRotation = danceRot[j];
  14020. }
  14021. }
  14022. }
  14023. isDanceStart15V = false;
  14024. }
  14025. for (int j = 0; j < maidCnt; j++)
  14026. {
  14027. isStop[j] = false;
  14028. isLock[j] = false;
  14029. pHandL[j] = 0;
  14030. pHandR[j] = 0;
  14031. muneIKL[j] = false;
  14032. muneIKR[j] = false;
  14033. if (!isVR)
  14034. {
  14035. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14036. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14037. }
  14038. if (maidArray[j].transform.position.y != 100f)
  14039. {
  14040. dancePos[j] = maidArray[j].transform.position;
  14041. }
  14042. else
  14043. {
  14044. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14045. }
  14046. danceRot[j] = maidArray[j].transform.localRotation;
  14047. }
  14048. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14049. {
  14050. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14051. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14052. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14053. maidArray[0].body0.transform.localRotation =
  14054. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14055. }
  14056. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14057. {
  14058. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14059. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14060. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14061. maidArray[2].body0.transform.localRotation =
  14062. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14063. }
  14064. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14065. {
  14066. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14067. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14068. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14069. maidArray[4].body0.transform.localRotation =
  14070. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14071. }
  14072. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14073. {
  14074. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14075. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14076. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14077. maidArray[6].body0.transform.localRotation =
  14078. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14079. }
  14080. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14081. {
  14082. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14083. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14084. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14085. maidArray[8].body0.transform.localRotation =
  14086. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14087. }
  14088. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14089. {
  14090. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14091. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14092. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14093. maidArray[10].body0.transform.localRotation =
  14094. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14095. }
  14096. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14097. {
  14098. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14099. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14100. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14101. maidArray[12].body0.transform.localRotation =
  14102. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14103. }
  14104. if (maidArray[1] && maidArray[1].Visible)
  14105. {
  14106. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14107. maidArray[0].transform.position.y,
  14108. maidArray[0].transform.position.z));
  14109. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14110. }
  14111. if (maidArray[3] && maidArray[3].Visible)
  14112. {
  14113. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14114. maidArray[2].transform.position.y,
  14115. maidArray[2].transform.position.z));
  14116. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14117. }
  14118. if (maidArray[5] && maidArray[5].Visible)
  14119. {
  14120. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14121. maidArray[4].transform.position.y,
  14122. maidArray[4].transform.position.z));
  14123. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14124. }
  14125. if (maidArray[7] && maidArray[7].Visible)
  14126. {
  14127. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14128. maidArray[6].transform.position.y,
  14129. maidArray[6].transform.position.z));
  14130. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14131. }
  14132. if (maidArray[9] && maidArray[9].Visible)
  14133. {
  14134. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14135. maidArray[8].transform.position.y,
  14136. maidArray[8].transform.position.z));
  14137. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14138. }
  14139. if (maidArray[11] && maidArray[11].Visible)
  14140. {
  14141. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14142. maidArray[10].transform.position.y,
  14143. maidArray[10].transform.position.z));
  14144. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14145. }
  14146. if (maidArray[13] && maidArray[13].Visible)
  14147. {
  14148. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14149. maidArray[12].transform.position.y,
  14150. maidArray[12].transform.position.z));
  14151. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14152. }
  14153. if (maidArray[2] && maidArray[2].Visible)
  14154. {
  14155. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14156. {
  14157. Vector3 vector = Vector3.zero;
  14158. vector.x = 0.6f;
  14159. maidArray[1].SetPos(vector);
  14160. if (maidArray[2] && maidArray[2].Visible)
  14161. {
  14162. vector.x = -0.6f;
  14163. maidArray[2].SetPos(vector);
  14164. }
  14165. if (maidArray[3] && maidArray[3].Visible)
  14166. {
  14167. vector.x = 1.2f;
  14168. maidArray[3].SetPos(vector);
  14169. }
  14170. if (maidArray[4] && maidArray[4].Visible)
  14171. {
  14172. vector.x = -1.2f;
  14173. maidArray[4].SetPos(vector);
  14174. }
  14175. if (maidArray[5] && maidArray[5].Visible)
  14176. {
  14177. vector.x = 1.8f;
  14178. maidArray[5].SetPos(vector);
  14179. }
  14180. if (maidArray[6] && maidArray[6].Visible)
  14181. {
  14182. vector.x = -1.8f;
  14183. maidArray[6].SetPos(vector);
  14184. }
  14185. if (maidArray[7] && maidArray[7].Visible)
  14186. {
  14187. vector.x = 2.4f;
  14188. maidArray[7].SetPos(vector);
  14189. }
  14190. if (maidArray[8] && maidArray[8].Visible)
  14191. {
  14192. vector.x = -2.4f;
  14193. maidArray[8].SetPos(vector);
  14194. }
  14195. if (maidArray[9] && maidArray[9].Visible)
  14196. {
  14197. vector.x = 3f;
  14198. maidArray[9].SetPos(vector);
  14199. }
  14200. if (maidArray[10] && maidArray[10].Visible)
  14201. {
  14202. vector.x = -3f;
  14203. maidArray[10].SetPos(vector);
  14204. }
  14205. if (maidArray[11] && maidArray[11].Visible)
  14206. {
  14207. vector.x = 3.6f;
  14208. maidArray[11].SetPos(vector);
  14209. }
  14210. if (maidArray[12] && maidArray[12].Visible)
  14211. {
  14212. vector.x = -3.6f;
  14213. maidArray[12].SetPos(vector);
  14214. }
  14215. if (maidArray[13] && maidArray[13].Visible)
  14216. {
  14217. vector.x = 4.2f;
  14218. maidArray[13].SetPos(vector);
  14219. }
  14220. }
  14221. }
  14222. isDance = true;
  14223. isDanceStart15 = true;
  14224. isSD1 = false;
  14225. }
  14226. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14227. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14228. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14229. || Input.GetKeyDown(KeyCode.Keypad0))
  14230. {
  14231. for (int j = 0; j < maidCnt; j++)
  14232. {
  14233. if (maidArray[j] && maidArray[j].Visible)
  14234. {
  14235. if (!isVR)
  14236. {
  14237. if (goSlot[(int)selectList[j]] != null)
  14238. {
  14239. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14240. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14241. {
  14242. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14243. }
  14244. }
  14245. }
  14246. }
  14247. }
  14248. }
  14249. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14250. {
  14251. if (h2Flg)
  14252. {
  14253. h2Flg = false;
  14254. }
  14255. else
  14256. {
  14257. string text4 = "";
  14258. if (wearIndex == 0)
  14259. {
  14260. text4 = "Underwear";
  14261. wearIndex = 1;
  14262. isWear = false;
  14263. isSkirt = false;
  14264. isBra = true;
  14265. isPanz = true;
  14266. isHeadset = false;
  14267. isGlove = false;
  14268. isStkg = true;
  14269. isShoes = false;
  14270. }
  14271. else if (wearIndex == 1)
  14272. {
  14273. text4 = "Nude";
  14274. wearIndex = 2;
  14275. isWear = false;
  14276. isSkirt = false;
  14277. isBra = false;
  14278. isPanz = false;
  14279. isHeadset = false;
  14280. isGlove = false;
  14281. isStkg = false;
  14282. isShoes = false;
  14283. }
  14284. else if (wearIndex == 2)
  14285. {
  14286. text4 = "None";
  14287. wearIndex = 0;
  14288. isWear = true;
  14289. isSkirt = true;
  14290. isBra = true;
  14291. isPanz = true;
  14292. isHeadset = true;
  14293. isGlove = true;
  14294. isStkg = true;
  14295. isShoes = true;
  14296. }
  14297. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14298. for (int j = 0; j < maidCnt; j++)
  14299. {
  14300. if (maidArray[j] && maidArray[j].Visible)
  14301. {
  14302. if (!isVR)
  14303. {
  14304. if (goSlot[(int)selectList[j]] != null)
  14305. {
  14306. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14307. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14308. {
  14309. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14310. }
  14311. }
  14312. }
  14313. maidArray[j].body0.SetMaskMode(maskMode);
  14314. }
  14315. }
  14316. }
  14317. }
  14318. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14319. {
  14320. quickSaveFlag = true;
  14321. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14322. try
  14323. {
  14324. thum_byte_to_base64_ = string.Empty;
  14325. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14326. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14327. }
  14328. catch { }
  14329. }
  14330. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14331. {
  14332. loadScene = 9999;
  14333. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14334. }
  14335. if (isScreen)
  14336. {
  14337. isScreen = false;
  14338. bGui = isGui;
  14339. isGui = false;
  14340. if (!isMessage)
  14341. {
  14342. foreach (UICamera uicamera in ui_cam_hide_list_)
  14343. {
  14344. uicamera.GetComponent<Camera>().enabled = true;
  14345. }
  14346. ui_cam_hide_list_.Clear();
  14347. }
  14348. else
  14349. {
  14350. if (editUI != null)
  14351. {
  14352. editUI.SetActive(true);
  14353. }
  14354. if (GameMain.Instance.CMSystem.ViewFps)
  14355. {
  14356. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14357. childObject.SetActive(true);
  14358. }
  14359. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14360. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14361. childObject2.SetActive(true);
  14362. childObject3.SetActive(true);
  14363. }
  14364. for (int j = 0; j < maidCnt; j++)
  14365. {
  14366. if (maidArray[j] && maidArray[j].Visible)
  14367. {
  14368. isBone[j] = isBoneN[j];
  14369. if (isBone[j])
  14370. {
  14371. gNeck[j].SetActive(true);
  14372. gSpine[j].SetActive(true);
  14373. gSpine0a[j].SetActive(true);
  14374. gSpine1a[j].SetActive(true);
  14375. gSpine1[j].SetActive(true);
  14376. gPelvis[j].SetActive(true);
  14377. gHandL[j].SetActive(true);
  14378. gArmL[j].SetActive(true);
  14379. gFootL[j].SetActive(true);
  14380. gHizaL[j].SetActive(true);
  14381. gHandR[j].SetActive(true);
  14382. gArmR[j].SetActive(true);
  14383. gFootR[j].SetActive(true);
  14384. gHizaR[j].SetActive(true);
  14385. gClavicleL[j].SetActive(true);
  14386. gClavicleR[j].SetActive(true);
  14387. }
  14388. }
  14389. }
  14390. }
  14391. if (isScreen2)
  14392. {
  14393. isScreen = true;
  14394. isScreen2 = false;
  14395. }
  14396. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14397. && !Input.GetKey(KeyCode.Q))
  14398. {
  14399. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14400. {
  14401. isScreen = true;
  14402. for (int j = 0; j < maidCnt; j++)
  14403. {
  14404. if (maidArray[j] && maidArray[j].Visible)
  14405. {
  14406. if (isBone[j])
  14407. {
  14408. gNeck[j].SetActive(false);
  14409. gSpine[j].SetActive(false);
  14410. gSpine0a[j].SetActive(false);
  14411. gSpine1a[j].SetActive(false);
  14412. gSpine1[j].SetActive(false);
  14413. gPelvis[j].SetActive(false);
  14414. gHandL[j].SetActive(false);
  14415. gArmL[j].SetActive(false);
  14416. gFootL[j].SetActive(false);
  14417. gHizaL[j].SetActive(false);
  14418. gHandR[j].SetActive(false);
  14419. gArmR[j].SetActive(false);
  14420. gFootR[j].SetActive(false);
  14421. gHizaR[j].SetActive(false);
  14422. gClavicleL[j].SetActive(false);
  14423. gClavicleR[j].SetActive(false);
  14424. }
  14425. isBoneN[j] = isBone[j];
  14426. isBone[j] = false;
  14427. }
  14428. }
  14429. if (!isMessage)
  14430. {
  14431. ui_cam_hide_list_.Clear();
  14432. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14433. foreach (UICamera uicamera2 in array16)
  14434. {
  14435. if (uicamera2.GetComponent<Camera>().enabled)
  14436. {
  14437. uicamera2.GetComponent<Camera>().enabled = false;
  14438. ui_cam_hide_list_.Add(uicamera2);
  14439. }
  14440. }
  14441. }
  14442. else
  14443. {
  14444. editUI = GameObject.Find("/UI Root/Camera");
  14445. if (editUI != null)
  14446. {
  14447. editUI.SetActive(false);
  14448. }
  14449. if (GameMain.Instance.CMSystem.ViewFps)
  14450. {
  14451. GameObject childObject =
  14452. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14453. childObject.SetActive(false);
  14454. }
  14455. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14456. GameObject childObject3 =
  14457. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14458. childObject2.SetActive(false);
  14459. childObject3.SetActive(false);
  14460. }
  14461. isGui = bGui;
  14462. bGui = false;
  14463. GameMain.Instance.MainCamera.ScreenShot(false);
  14464. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14465. }
  14466. }
  14467. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14468. {
  14469. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14470. keyFlg2 = true;
  14471. }
  14472. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14473. {
  14474. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14475. keyFlg2 = true;
  14476. }
  14477. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14478. {
  14479. mainCameraTransform.eulerAngles =
  14480. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14481. keyFlg2 = true;
  14482. }
  14483. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14484. {
  14485. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14486. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14487. mainCamera.SetDistance(3f, true);
  14488. keyFlg2 = true;
  14489. }
  14490. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14491. {
  14492. cameraIti = mainCamera.GetTargetPos();
  14493. cameraIti2 = mainCamera.GetPos();
  14494. cameraItiAngle = mainCamera.GetAroundAngle();
  14495. cameraItiDistance = mainCamera.GetDistance();
  14496. keyFlg2 = true;
  14497. }
  14498. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14499. {
  14500. mainCamera.SetTargetPos(cameraIti, true);
  14501. mainCamera.SetPos(cameraIti2);
  14502. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14503. mainCamera.SetDistance(cameraItiDistance, true);
  14504. keyFlg2 = true;
  14505. }
  14506. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14507. {
  14508. if (keyFlg2)
  14509. {
  14510. keyFlg2 = false;
  14511. }
  14512. else
  14513. {
  14514. effectIndex++;
  14515. if (effectIndex == 9)
  14516. {
  14517. kami.SetActive(false);
  14518. effectIndex = 0;
  14519. }
  14520. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14521. if (!isBlur)
  14522. {
  14523. component3.mode = Vignetting.AberrationMode.Simple;
  14524. component3.intensity = -3.98f;
  14525. component3.chromaticAberration = -0.75f;
  14526. component3.axialAberration = 1.18f;
  14527. component3.blurSpread = 4.19f;
  14528. component3.luminanceDependency = 0.494f;
  14529. component3.blurDistance = 1.71f;
  14530. component3.enabled = false;
  14531. }
  14532. if (kami) { }
  14533. if (effectIndex == 0)
  14534. {
  14535. component3.enabled = false;
  14536. }
  14537. if (effectIndex == 1)
  14538. {
  14539. component3.mode = Vignetting.AberrationMode.Simple;
  14540. component3.intensity = -1f;
  14541. component3.chromaticAberration = 0f;
  14542. component3.axialAberration = 0f;
  14543. component3.blurSpread = 5f;
  14544. component3.luminanceDependency = 0f;
  14545. component3.blurDistance = 0f;
  14546. component3.enabled = true;
  14547. }
  14548. if (effectIndex == 2)
  14549. {
  14550. component3.enabled = true;
  14551. }
  14552. if (effectIndex == 3)
  14553. {
  14554. component3.mode = Vignetting.AberrationMode.Simple;
  14555. component3.intensity = 9f;
  14556. component3.chromaticAberration = 0f;
  14557. component3.axialAberration = 0f;
  14558. component3.blurSpread = 5f;
  14559. component3.luminanceDependency = 0f;
  14560. component3.blurDistance = 0f;
  14561. component3.enabled = true;
  14562. }
  14563. if (effectIndex == 4)
  14564. {
  14565. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14566. kami = (GameObject)Instantiate(@object);
  14567. Vector3 localPosition = kami.transform.localPosition;
  14568. localPosition.y = 3.5f;
  14569. kami.transform.localPosition = localPosition;
  14570. }
  14571. if (effectIndex == 5)
  14572. {
  14573. component3.enabled = true;
  14574. component3.mode = Vignetting.AberrationMode.Simple;
  14575. component3.intensity = -2.5f;
  14576. component3.chromaticAberration = -0.3f;
  14577. component3.axialAberration = 0.5f;
  14578. component3.blurSpread = 4.5f;
  14579. component3.luminanceDependency = 0.2f;
  14580. component3.blurDistance = 0.8f;
  14581. component3.enabled = true;
  14582. }
  14583. if (effectIndex == 6)
  14584. {
  14585. kami.SetActive(false);
  14586. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14587. kami = (GameObject)Instantiate(@object);
  14588. Vector3 localPosition = kami.transform.localPosition;
  14589. localPosition.y = 3.5f;
  14590. kami.transform.localPosition = localPosition;
  14591. }
  14592. if (effectIndex == 7)
  14593. {
  14594. component3.enabled = true;
  14595. component3.mode = Vignetting.AberrationMode.Simple;
  14596. component3.intensity = -2.5f;
  14597. component3.chromaticAberration = -0.3f;
  14598. component3.axialAberration = 0.5f;
  14599. component3.blurSpread = 4.5f;
  14600. component3.luminanceDependency = 0.2f;
  14601. component3.blurDistance = 0.8f;
  14602. component3.enabled = true;
  14603. }
  14604. if (effectIndex == 8)
  14605. {
  14606. component3.mode = Vignetting.AberrationMode.Simple;
  14607. component3.intensity = 8f;
  14608. component3.chromaticAberration = 0f;
  14609. component3.axialAberration = 0f;
  14610. component3.blurSpread = 5f;
  14611. component3.luminanceDependency = 0f;
  14612. component3.blurDistance = 0f;
  14613. component3.enabled = true;
  14614. }
  14615. }
  14616. }
  14617. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14618. {
  14619. qFlg = false;
  14620. }
  14621. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14622. {
  14623. bool flag5 = false;
  14624. for (int k = 0; k < keyArray.Length; k++)
  14625. {
  14626. if (Input.GetKey(keyArray[k]))
  14627. {
  14628. flag5 = true;
  14629. break;
  14630. }
  14631. }
  14632. if (!getModKeyPressing(modKey.Shift))
  14633. {
  14634. if (!flag5)
  14635. {
  14636. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14637. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14638. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14639. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14640. {
  14641. Vector3 vector = softG;
  14642. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14643. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14644. softG = vector;
  14645. }
  14646. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14647. {
  14648. Vector3 vector = softG;
  14649. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14650. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14651. softG = vector;
  14652. }
  14653. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14654. {
  14655. Vector3 vector = softG;
  14656. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14657. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14658. softG = vector;
  14659. }
  14660. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14661. {
  14662. Vector3 vector = softG;
  14663. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14664. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14665. softG = vector;
  14666. }
  14667. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14668. {
  14669. Vector3 vector = softG;
  14670. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14671. softG = vector;
  14672. }
  14673. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14674. {
  14675. Vector3 vector = softG;
  14676. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14677. softG = vector;
  14678. }
  14679. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14680. {
  14681. Vector3 vector = softG;
  14682. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14683. softG = vector;
  14684. }
  14685. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14686. {
  14687. Vector3 vector = softG;
  14688. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14689. softG = vector;
  14690. }
  14691. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14692. {
  14693. Vector3 vector = softG;
  14694. vector.y += 6E-05f * speed;
  14695. softG = vector;
  14696. }
  14697. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14698. {
  14699. Vector3 vector = softG;
  14700. vector.y -= 6E-05f * speed;
  14701. softG = vector;
  14702. }
  14703. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14704. {
  14705. softG = new Vector3(0f, -0.003f, 0f);
  14706. }
  14707. for (int j = 0; j < maidCnt; j++)
  14708. {
  14709. Maid maid = maidArray[j];
  14710. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14711. {
  14712. if (maid.body0.goSlot[l].obj != null)
  14713. {
  14714. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14715. if (component2 != null && component2.enabled)
  14716. {
  14717. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14718. }
  14719. }
  14720. List<THair1> fieldValue3 =
  14721. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14722. for (int k = 0; k < fieldValue3.Count; k++)
  14723. {
  14724. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14725. }
  14726. }
  14727. }
  14728. }
  14729. }
  14730. else if (!flag5)
  14731. {
  14732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14735. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14736. {
  14737. Vector3 vector = softG2;
  14738. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14739. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14740. softG2 = vector;
  14741. }
  14742. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14743. {
  14744. Vector3 vector = softG2;
  14745. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14746. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14747. softG2 = vector;
  14748. }
  14749. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14750. {
  14751. Vector3 vector = softG2;
  14752. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14753. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14754. softG2 = vector;
  14755. }
  14756. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14757. {
  14758. Vector3 vector = softG2;
  14759. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14760. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14761. softG2 = vector;
  14762. }
  14763. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14764. {
  14765. Vector3 vector = softG2;
  14766. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14767. softG2 = vector;
  14768. }
  14769. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14770. {
  14771. Vector3 vector = softG2;
  14772. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14773. softG2 = vector;
  14774. }
  14775. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14776. {
  14777. Vector3 vector = softG2;
  14778. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14779. softG2 = vector;
  14780. }
  14781. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14782. {
  14783. Vector3 vector = softG2;
  14784. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14785. softG2 = vector;
  14786. }
  14787. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14788. {
  14789. Vector3 vector = softG2;
  14790. vector.y += 2E-05f * speed;
  14791. softG2 = vector;
  14792. }
  14793. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14794. {
  14795. Vector3 vector = softG2;
  14796. vector.y -= 2E-05f * speed;
  14797. softG2 = vector;
  14798. }
  14799. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14800. {
  14801. softG2 = new Vector3(0f, -0.005f, 0f);
  14802. }
  14803. for (int j = 0; j < maidCnt; j++)
  14804. {
  14805. Maid maid = maidArray[j];
  14806. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14807. {
  14808. if (maid.body0.goSlot[l].obj != null)
  14809. {
  14810. DynamicSkirtBone fieldValue8 =
  14811. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14812. "m_SkirtBone");
  14813. if (fieldValue8 != null)
  14814. {
  14815. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14816. fieldValue8.UpdateParameters();
  14817. }
  14818. }
  14819. }
  14820. }
  14821. }
  14822. }
  14823. if (!isVR)
  14824. {
  14825. if (doguObject.Count > 0)
  14826. {
  14827. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14828. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14829. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14830. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14831. {
  14832. idoFlg2 = true;
  14833. doguObject[doguSelectIndex].transform.localScale =
  14834. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14835. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14836. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14837. }
  14838. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14839. {
  14840. idoFlg2 = true;
  14841. doguObject[doguSelectIndex].transform.localScale =
  14842. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14843. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14844. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14845. }
  14846. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14847. {
  14848. idoFlg2 = true;
  14849. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14850. }
  14851. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14852. {
  14853. doguObject[doguSelectIndex]
  14854. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14855. idoFlg2 = true;
  14856. }
  14857. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14858. {
  14859. doguObject[doguSelectIndex]
  14860. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14861. idoFlg2 = true;
  14862. }
  14863. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14864. && getModKeyPressing(modKey.Alt))
  14865. {
  14866. for (int k = 0; k < 10; k++)
  14867. {
  14868. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14869. Vector3.right,
  14870. -doguObject[doguSelectIndex]
  14871. .transform.rotation.eulerAngles.x);
  14872. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14873. Vector3.forward,
  14874. -doguObject[doguSelectIndex]
  14875. .transform.rotation.eulerAngles.z);
  14876. }
  14877. idoFlg2 = true;
  14878. Vector3 vector = Vector3.zero;
  14879. Vector3 zero3 = Vector3.zero;
  14880. zero3.x = -90f;
  14881. int num12 = doguIndex[doguSelectIndex];
  14882. switch (num12)
  14883. {
  14884. case 3:
  14885. vector.z = 0.5f;
  14886. zero3.z = 90f;
  14887. break;
  14888. case 4:
  14889. case 5:
  14890. case 7:
  14891. case 10:
  14892. case 11: break;
  14893. case 6:
  14894. vector.z = 0.6f;
  14895. zero3.x = 0f;
  14896. break;
  14897. case 8:
  14898. vector.z = 0.5f;
  14899. zero3.x = 0f;
  14900. break;
  14901. case 9:
  14902. vector.z = 0.32f;
  14903. zero3.z = 180f;
  14904. break;
  14905. case 12:
  14906. vector.z = 0.5f;
  14907. zero3.z = 180f;
  14908. break;
  14909. case 13:
  14910. vector.z = 0.7f;
  14911. zero3.z = 180f;
  14912. break;
  14913. default:
  14914. if (num12 != 16)
  14915. {
  14916. switch (num12)
  14917. {
  14918. case 23:
  14919. vector.z = 2.7f;
  14920. vector.x = 0.77f;
  14921. zero3.z = 90f;
  14922. break;
  14923. case 25:
  14924. vector.z = 0.5f;
  14925. vector.y = 0.9f;
  14926. zero3.z = 180f;
  14927. break;
  14928. case 26:
  14929. vector.z = 0.5f;
  14930. vector.y = 0.9f;
  14931. zero3.z = 180f;
  14932. break;
  14933. case 30:
  14934. vector.z = 0f;
  14935. zero3.z = 0f;
  14936. break;
  14937. case 31:
  14938. vector.z = -0.6f;
  14939. vector.y = 0.96f;
  14940. zero3.z = 180f;
  14941. break;
  14942. case 32:
  14943. vector.z = -0.6f;
  14944. vector.y = 0.96f;
  14945. zero3.z = 180f;
  14946. break;
  14947. case 33:
  14948. vector.z = -0.6f;
  14949. vector.y = 0.85f;
  14950. zero3.z = 180f;
  14951. break;
  14952. }
  14953. }
  14954. else
  14955. {
  14956. vector.z = -0.4f;
  14957. zero3.z = 180f;
  14958. }
  14959. break;
  14960. }
  14961. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14962. }
  14963. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14964. && Input.GetKey(KeyCode.J))
  14965. {
  14966. doguObject[doguSelectIndex]
  14967. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14968. new Vector3(vector3.x, 0f, vector3.z),
  14969. 0.3f);
  14970. doguObject[doguSelectIndex]
  14971. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14972. new Vector3(vector2.x, 0f, vector2.z),
  14973. 0.3f);
  14974. idoFlg2 = true;
  14975. }
  14976. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14977. && Input.GetKey(KeyCode.L))
  14978. {
  14979. doguObject[doguSelectIndex]
  14980. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14981. new Vector3(vector3.x, 0f, vector3.z),
  14982. 0.3f);
  14983. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14984. new Vector3(vector2.x, 0f, vector2.z),
  14985. -0.3f);
  14986. idoFlg2 = true;
  14987. }
  14988. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14989. && Input.GetKey(KeyCode.J))
  14990. {
  14991. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14992. new Vector3(vector3.x, 0f, vector3.z),
  14993. -0.3f);
  14994. doguObject[doguSelectIndex]
  14995. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14996. new Vector3(vector2.x, 0f, vector2.z),
  14997. 0.3f);
  14998. idoFlg2 = true;
  14999. }
  15000. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15001. && Input.GetKey(KeyCode.L))
  15002. {
  15003. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15004. new Vector3(vector3.x, 0f, vector3.z),
  15005. -0.3f);
  15006. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15007. new Vector3(vector2.x, 0f, vector2.z),
  15008. -0.3f);
  15009. idoFlg2 = true;
  15010. }
  15011. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15012. {
  15013. doguObject[doguSelectIndex]
  15014. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15015. new Vector3(vector3.x, 0f, vector3.z),
  15016. 0.4f);
  15017. idoFlg2 = true;
  15018. }
  15019. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15020. {
  15021. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15022. new Vector3(vector3.x, 0f, vector3.z),
  15023. -0.4f);
  15024. idoFlg2 = true;
  15025. }
  15026. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15027. {
  15028. doguObject[doguSelectIndex]
  15029. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15030. new Vector3(vector2.x, 0f, vector2.z),
  15031. 0.4f);
  15032. idoFlg2 = true;
  15033. }
  15034. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15035. {
  15036. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15037. new Vector3(vector2.x, 0f, vector2.z),
  15038. -0.4f);
  15039. idoFlg2 = true;
  15040. }
  15041. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15042. {
  15043. doguObject[doguSelectIndex].transform.localRotation =
  15044. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15045. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15046. idoFlg2 = true;
  15047. }
  15048. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15049. {
  15050. doguObject[doguSelectIndex].transform.localRotation =
  15051. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15052. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15053. idoFlg2 = true;
  15054. }
  15055. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15056. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15057. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15058. {
  15059. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15060. new Vector3(vector3.x, 0f, vector3.z),
  15061. -0.7f);
  15062. idoFlg2 = true;
  15063. }
  15064. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15065. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15066. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15067. {
  15068. doguObject[doguSelectIndex]
  15069. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15070. new Vector3(vector3.x, 0f, vector3.z),
  15071. 0.7f);
  15072. idoFlg2 = true;
  15073. }
  15074. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15075. && (Input.GetKey(KeyCode.Minus)
  15076. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15077. {
  15078. doguObject[doguSelectIndex]
  15079. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15080. new Vector3(vector2.x, 0f, vector2.z),
  15081. 0.7f);
  15082. idoFlg2 = true;
  15083. }
  15084. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15085. && (Input.GetKey(KeyCode.Quote)
  15086. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15087. {
  15088. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15089. new Vector3(vector2.x, 0f, vector2.z),
  15090. -0.7f);
  15091. idoFlg2 = true;
  15092. }
  15093. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15094. && Input.GetKey(KeyCode.J))
  15095. {
  15096. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15097. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15098. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15099. doguObject[doguSelectIndex].transform.localPosition = vector;
  15100. idoFlg2 = true;
  15101. }
  15102. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15103. && Input.GetKey(KeyCode.L))
  15104. {
  15105. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15106. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15107. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15108. doguObject[doguSelectIndex].transform.localPosition = vector;
  15109. idoFlg2 = true;
  15110. }
  15111. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15112. && Input.GetKey(KeyCode.J))
  15113. {
  15114. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15115. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15116. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15117. doguObject[doguSelectIndex].transform.localPosition = vector;
  15118. idoFlg2 = true;
  15119. }
  15120. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15121. && Input.GetKey(KeyCode.L))
  15122. {
  15123. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15124. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15125. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15126. doguObject[doguSelectIndex].transform.localPosition = vector;
  15127. idoFlg2 = true;
  15128. }
  15129. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15130. {
  15131. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15132. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15133. doguObject[doguSelectIndex].transform.localPosition = vector;
  15134. idoFlg2 = true;
  15135. }
  15136. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15137. {
  15138. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15139. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15140. doguObject[doguSelectIndex].transform.localPosition = vector;
  15141. idoFlg2 = true;
  15142. }
  15143. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15144. {
  15145. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15146. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15147. doguObject[doguSelectIndex].transform.localPosition = vector;
  15148. idoFlg2 = true;
  15149. }
  15150. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15151. {
  15152. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15153. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15154. doguObject[doguSelectIndex].transform.localPosition = vector;
  15155. idoFlg2 = true;
  15156. }
  15157. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15158. {
  15159. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15160. vector.y += 0.0075f * speed;
  15161. doguObject[doguSelectIndex].transform.localPosition = vector;
  15162. idoFlg2 = true;
  15163. }
  15164. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15165. {
  15166. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15167. vector.y -= 0.0075f * speed;
  15168. doguObject[doguSelectIndex].transform.localPosition = vector;
  15169. idoFlg2 = true;
  15170. }
  15171. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15172. {
  15173. idoFlg2 = true;
  15174. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15175. {
  15176. Destroy(doguObject[doguSelectIndex]);
  15177. doguObject.RemoveAt(doguSelectIndex);
  15178. }
  15179. doguIndex.RemoveAt(doguSelectIndex);
  15180. doguSelectIndex = 0;
  15181. }
  15182. }
  15183. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15184. {
  15185. idoFlg2 = true;
  15186. if (doguSelectIndex == doguObject.Count)
  15187. {
  15188. doguIndex.Add(0);
  15189. }
  15190. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15191. {
  15192. Destroy(doguObject[doguSelectIndex]);
  15193. doguObject.RemoveAt(doguSelectIndex);
  15194. }
  15195. else
  15196. {
  15197. doguIndex.Add(0);
  15198. doguSelectIndex = doguIndex.Count - 1;
  15199. }
  15200. List<int> list2;
  15201. int index;
  15202. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15203. if (doguIndex[doguSelectIndex] <= -1)
  15204. {
  15205. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15206. }
  15207. if (doguIndex[doguSelectIndex] > 0)
  15208. {
  15209. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15210. {
  15211. Object @object = null;
  15212. for (int j = 0; j < 5; j++)
  15213. {
  15214. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15215. if (@object != null)
  15216. {
  15217. break;
  15218. }
  15219. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15220. }
  15221. doguObject.Add(Instantiate(@object) as GameObject);
  15222. }
  15223. else
  15224. {
  15225. Material material = new Material(Shader.Find("Mirror"));
  15226. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15227. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15228. gameObject7.GetComponent<Renderer>().material = material;
  15229. gameObject7.AddComponent<MirrorReflection2>();
  15230. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15231. component5.m_TextureSize = 2048;
  15232. component5.m_ClipPlaneOffset = 0f;
  15233. gameObject7.GetComponent<Renderer>().enabled = true;
  15234. doguObject.Add(gameObject7);
  15235. }
  15236. Vector3 vector = Vector3.zero;
  15237. Vector3 zero3 = Vector3.zero;
  15238. zero3.x = -90f;
  15239. switch (doguIndex[doguSelectIndex])
  15240. {
  15241. case 1:
  15242. vector.z = -0.5f;
  15243. goto IL_344DC;
  15244. case 2:
  15245. vector.z = -0.5f;
  15246. goto IL_344DC;
  15247. case 3:
  15248. vector.z = 0.5f;
  15249. zero3.z = 90f;
  15250. goto IL_344DC;
  15251. case 4:
  15252. vector.z = 0.9f;
  15253. goto IL_344DC;
  15254. case 5:
  15255. vector.z = 0.9f;
  15256. goto IL_344DC;
  15257. case 6:
  15258. vector.z = 0.6f;
  15259. zero3.x = 0f;
  15260. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15261. goto IL_344DC;
  15262. case 7:
  15263. vector.z = 0.6f;
  15264. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15265. goto IL_344DC;
  15266. case 8:
  15267. vector.z = 0.5f;
  15268. zero3.x = 0f;
  15269. goto IL_344DC;
  15270. case 9:
  15271. vector.z = 0.32f;
  15272. zero3.z = 180f;
  15273. goto IL_344DC;
  15274. case 10:
  15275. vector.z = 0.6f;
  15276. goto IL_344DC;
  15277. case 11:
  15278. vector.z = 0.6f;
  15279. goto IL_344DC;
  15280. case 12:
  15281. vector.z = 0.5f;
  15282. zero3.z = 180f;
  15283. goto IL_344DC;
  15284. case 13:
  15285. vector.z = 0.7f;
  15286. zero3.z = 180f;
  15287. goto IL_344DC;
  15288. case 14:
  15289. vector.z = -0.4f;
  15290. goto IL_344DC;
  15291. case 15:
  15292. vector.z = -0.4f;
  15293. goto IL_344DC;
  15294. case 16:
  15295. vector.z = -0.4f;
  15296. zero3.z = 180f;
  15297. goto IL_344DC;
  15298. case 17:
  15299. vector.z = -0.4f;
  15300. goto IL_344DC;
  15301. case 18:
  15302. vector.z = -0.2f;
  15303. goto IL_344DC;
  15304. case 19:
  15305. vector.z = 0f;
  15306. goto IL_344DC;
  15307. case 20:
  15308. vector.z = 3.4f;
  15309. vector.x = -1f;
  15310. goto IL_344DC;
  15311. case 21:
  15312. vector.z = 3.4f;
  15313. vector.x = -1f;
  15314. goto IL_344DC;
  15315. case 22:
  15316. vector.z = 3.4f;
  15317. vector.y = 0.3f;
  15318. vector.x = -1f;
  15319. goto IL_344DC;
  15320. case 23:
  15321. vector.z = 2.7f;
  15322. vector.x = 0.77f;
  15323. zero3.z = 90f;
  15324. goto IL_344DC;
  15325. case 25:
  15326. vector.z = 0.5f;
  15327. vector.y = 0.9f;
  15328. zero3.z = 180f;
  15329. goto IL_344DC;
  15330. case 26:
  15331. vector.z = 0.5f;
  15332. vector.y = 0.9f;
  15333. zero3.z = 180f;
  15334. goto IL_344DC;
  15335. case 29:
  15336. vector.z = 0.5f;
  15337. vector.x = -1.05f;
  15338. goto IL_344DC;
  15339. case 30:
  15340. vector.z = -2.8f;
  15341. zero3.z = 0f;
  15342. zero3.x = 0f;
  15343. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15344. goto IL_344DC;
  15345. case 31:
  15346. vector.z = -0.6f;
  15347. vector.y = 0.96f;
  15348. zero3.z = 180f;
  15349. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15350. goto IL_344DC;
  15351. case 32:
  15352. vector.z = -0.6f;
  15353. vector.y = 0.96f;
  15354. zero3.z = 180f;
  15355. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15356. goto IL_344DC;
  15357. case 33:
  15358. vector.z = -0.6f;
  15359. vector.y = 0.85f;
  15360. zero3.z = 180f;
  15361. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15362. goto IL_344DC;
  15363. }
  15364. vector.z = 0.5f;
  15365. IL_344DC:
  15366. doguObject[doguSelectIndex].transform.localPosition = vector;
  15367. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15368. }
  15369. if (doguIndex[doguSelectIndex] == 0)
  15370. {
  15371. doguIndex.RemoveAt(doguSelectIndex);
  15372. }
  15373. }
  15374. else if (Input.GetKeyDown(KeyCode.W))
  15375. {
  15376. for (int k = 0; k < keyArray.Length; k++)
  15377. {
  15378. if (Input.GetKey(keyArray[k]))
  15379. {
  15380. wFlg = true;
  15381. break;
  15382. }
  15383. }
  15384. }
  15385. else if (Input.GetKeyUp(KeyCode.W))
  15386. {
  15387. if (wFlg)
  15388. {
  15389. wFlg = false;
  15390. }
  15391. else if (idoFlg2)
  15392. {
  15393. idoFlg2 = false;
  15394. }
  15395. else
  15396. {
  15397. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15398. {
  15399. Destroy(doguObject[doguSelectIndex]);
  15400. doguObject.RemoveAt(doguSelectIndex);
  15401. }
  15402. else
  15403. {
  15404. doguIndex.Add(0);
  15405. doguSelectIndex = doguIndex.Count - 1;
  15406. }
  15407. List<int> list2;
  15408. int index;
  15409. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15410. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15411. {
  15412. doguIndex[doguSelectIndex] = 0;
  15413. }
  15414. if (doguIndex[doguSelectIndex] > 0)
  15415. {
  15416. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15417. {
  15418. Object @object = null;
  15419. for (int j = 0; j < 5; j++)
  15420. {
  15421. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15422. if (@object != null)
  15423. {
  15424. break;
  15425. }
  15426. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15427. }
  15428. doguObject.Add(Instantiate(@object) as GameObject);
  15429. }
  15430. else
  15431. {
  15432. Material material = new Material(Shader.Find("Mirror"));
  15433. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15434. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15435. gameObject7.GetComponent<Renderer>().material = material;
  15436. gameObject7.AddComponent<MirrorReflection2>();
  15437. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15438. component5.m_TextureSize = 2048;
  15439. component5.m_ClipPlaneOffset = 0f;
  15440. gameObject7.GetComponent<Renderer>().enabled = true;
  15441. doguObject.Add(gameObject7);
  15442. }
  15443. Vector3 vector = Vector3.zero;
  15444. Vector3 zero3 = Vector3.zero;
  15445. zero3.x = -90f;
  15446. switch (doguIndex[doguSelectIndex])
  15447. {
  15448. case 1:
  15449. vector.z = -0.5f;
  15450. goto IL_34D66;
  15451. case 2:
  15452. vector.z = -0.5f;
  15453. goto IL_34D66;
  15454. case 3:
  15455. vector.z = 0.5f;
  15456. zero3.z = 90f;
  15457. goto IL_34D66;
  15458. case 4:
  15459. vector.z = 0.9f;
  15460. goto IL_34D66;
  15461. case 5:
  15462. vector.z = 0.9f;
  15463. goto IL_34D66;
  15464. case 6:
  15465. vector.z = 0.6f;
  15466. zero3.x = 0f;
  15467. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15468. goto IL_34D66;
  15469. case 7:
  15470. vector.z = 0.6f;
  15471. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15472. goto IL_34D66;
  15473. case 8:
  15474. vector.z = 0.5f;
  15475. zero3.x = 0f;
  15476. goto IL_34D66;
  15477. case 9:
  15478. vector.z = 0.32f;
  15479. zero3.z = 180f;
  15480. goto IL_34D66;
  15481. case 10:
  15482. vector.z = 0.6f;
  15483. goto IL_34D66;
  15484. case 11:
  15485. vector.z = 0.6f;
  15486. goto IL_34D66;
  15487. case 12:
  15488. vector.z = 0.5f;
  15489. zero3.z = 180f;
  15490. goto IL_34D66;
  15491. case 13:
  15492. vector.z = 0.7f;
  15493. zero3.z = 180f;
  15494. goto IL_34D66;
  15495. case 14:
  15496. vector.z = -0.4f;
  15497. goto IL_34D66;
  15498. case 15:
  15499. vector.z = -0.4f;
  15500. goto IL_34D66;
  15501. case 16:
  15502. vector.z = -0.4f;
  15503. zero3.z = 180f;
  15504. goto IL_34D66;
  15505. case 17:
  15506. vector.z = -0.4f;
  15507. goto IL_34D66;
  15508. case 18:
  15509. vector.z = -0.2f;
  15510. goto IL_34D66;
  15511. case 19:
  15512. vector.z = 0f;
  15513. goto IL_34D66;
  15514. case 20:
  15515. vector.z = 3.4f;
  15516. vector.x = -1f;
  15517. goto IL_34D66;
  15518. case 21:
  15519. vector.z = 3.4f;
  15520. vector.x = -1f;
  15521. goto IL_34D66;
  15522. case 22:
  15523. vector.z = 3.4f;
  15524. vector.y = 0.3f;
  15525. vector.x = -1f;
  15526. goto IL_34D66;
  15527. case 23:
  15528. vector.z = 2.7f;
  15529. vector.x = 0.77f;
  15530. zero3.z = 90f;
  15531. goto IL_34D66;
  15532. case 25:
  15533. vector.z = 0.5f;
  15534. vector.y = 0.9f;
  15535. zero3.z = 180f;
  15536. goto IL_34D66;
  15537. case 26:
  15538. vector.z = 0.5f;
  15539. vector.y = 0.9f;
  15540. zero3.z = 180f;
  15541. goto IL_34D66;
  15542. case 29:
  15543. vector.z = 0.5f;
  15544. vector.x = -1.05f;
  15545. goto IL_34D66;
  15546. case 30:
  15547. vector.z = -2.8f;
  15548. zero3.z = 0f;
  15549. zero3.x = 0f;
  15550. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15551. goto IL_34D66;
  15552. case 31:
  15553. vector.z = -0.6f;
  15554. vector.y = 0.96f;
  15555. zero3.z = 180f;
  15556. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15557. goto IL_34D66;
  15558. case 32:
  15559. vector.z = -0.6f;
  15560. vector.y = 0.96f;
  15561. zero3.z = 180f;
  15562. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15563. goto IL_34D66;
  15564. case 33:
  15565. vector.z = -0.6f;
  15566. vector.y = 0.85f;
  15567. zero3.z = 180f;
  15568. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15569. goto IL_34D66;
  15570. }
  15571. vector.z = 0.5f;
  15572. IL_34D66:;
  15573. }
  15574. if (doguIndex[doguSelectIndex] == 0)
  15575. {
  15576. doguIndex.RemoveAt(doguSelectIndex);
  15577. }
  15578. }
  15579. }
  15580. }
  15581. if (!isVR)
  15582. {
  15583. int i;
  15584. for (i = 0; i < 999; i++)
  15585. {
  15586. if (gDogu[i] != null)
  15587. {
  15588. gDogu[i].GetComponent<Renderer>().enabled = false;
  15589. gDogu[i].SetActive(false);
  15590. if (mDogu[i].del)
  15591. {
  15592. mDogu[i].del = false;
  15593. Destroy(doguBObject[i]);
  15594. doguBObject.RemoveAt(i);
  15595. }
  15596. else if (mDogu[i].count > 0)
  15597. {
  15598. mDogu[i].count--;
  15599. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15600. {
  15601. if (mDogu[i].count == 1)
  15602. {
  15603. doguBObject[i].SetActive(false);
  15604. }
  15605. if (mDogu[i].count == 0)
  15606. {
  15607. doguBObject[i].SetActive(true);
  15608. string name = doguBObject[i].name;
  15609. if (name != null)
  15610. {
  15611. if (!(name == "Particle/pLineY"))
  15612. {
  15613. if (!(name == "Particle/pLineP02"))
  15614. {
  15615. if (!(name == "Particle/pLine_act2"))
  15616. {
  15617. if (name == "Particle/pHeart01")
  15618. {
  15619. mDogu[i].count = 77;
  15620. }
  15621. }
  15622. else
  15623. {
  15624. mDogu[i].count = 90;
  15625. }
  15626. }
  15627. else
  15628. {
  15629. mDogu[i].count = 115;
  15630. }
  15631. }
  15632. else
  15633. {
  15634. mDogu[i].count = 180;
  15635. }
  15636. }
  15637. }
  15638. }
  15639. }
  15640. }
  15641. }
  15642. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15643. {
  15644. ikMode2 = 11;
  15645. }
  15646. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15647. {
  15648. ikMode2 = 12;
  15649. }
  15650. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15651. {
  15652. ikMode2 = 14;
  15653. }
  15654. else if (Input.GetKey(KeyCode.X))
  15655. {
  15656. ikMode2 = 9;
  15657. }
  15658. else if (Input.GetKey(KeyCode.Z))
  15659. {
  15660. ikMode2 = 10;
  15661. }
  15662. else if (Input.GetKey(KeyCode.C))
  15663. {
  15664. ikMode2 = 13;
  15665. }
  15666. else if (Input.GetKey(KeyCode.D))
  15667. {
  15668. ikMode2 = 15;
  15669. }
  15670. else
  15671. {
  15672. ikMode2 = 0;
  15673. }
  15674. if (gBg != null)
  15675. {
  15676. if (!isCube3)
  15677. {
  15678. gBg.GetComponent<Renderer>().enabled = false;
  15679. gBg.SetActive(false);
  15680. }
  15681. else
  15682. {
  15683. if (ikMode2 > 0 && ikMode2 != 15)
  15684. {
  15685. gBg.GetComponent<Renderer>().enabled = true;
  15686. gBg.SetActive(true);
  15687. }
  15688. else
  15689. {
  15690. gBg.GetComponent<Renderer>().enabled = false;
  15691. gBg.SetActive(false);
  15692. }
  15693. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15694. {
  15695. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15696. }
  15697. if (ikMode2 == 9 || ikMode2 == 14)
  15698. {
  15699. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15700. mBg.Update();
  15701. }
  15702. if (ikMode2 == 13)
  15703. {
  15704. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15705. mBg.Update();
  15706. }
  15707. if (ikMode2 == 13)
  15708. {
  15709. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15710. {
  15711. mBg.ido = 5;
  15712. mBg.reset = true;
  15713. }
  15714. else
  15715. {
  15716. gBg.transform.position = bg.position;
  15717. gBg.transform.eulerAngles = bg.eulerAngles;
  15718. mBg.maid = bgObject;
  15719. mBg.ido = 5;
  15720. }
  15721. }
  15722. else if (ikMode2 == 11)
  15723. {
  15724. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15725. {
  15726. mBg.ido = 3;
  15727. mBg.reset = true;
  15728. }
  15729. else
  15730. {
  15731. gBg.transform.position = bg.position;
  15732. gBg.transform.eulerAngles = bg.eulerAngles;
  15733. mBg.maid = bgObject;
  15734. mBg.ido = 3;
  15735. }
  15736. }
  15737. else if (ikMode2 == 12)
  15738. {
  15739. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15740. {
  15741. mBg.ido = 2;
  15742. mBg.reset = true;
  15743. }
  15744. else
  15745. {
  15746. gBg.transform.position = bg.position;
  15747. gBg.transform.eulerAngles = bg.eulerAngles;
  15748. mBg.maid = bgObject;
  15749. mBg.ido = 2;
  15750. }
  15751. }
  15752. else if (ikMode2 == 10)
  15753. {
  15754. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15755. {
  15756. mBg.ido = 1;
  15757. mBg.reset = true;
  15758. }
  15759. else
  15760. {
  15761. gBg.transform.position = bg.position;
  15762. gBg.transform.eulerAngles = bg.eulerAngles;
  15763. mBg.maid = bgObject;
  15764. mBg.ido = 1;
  15765. }
  15766. }
  15767. else if (ikMode2 == 9)
  15768. {
  15769. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15770. {
  15771. mBg.ido = 4;
  15772. mBg.reset = true;
  15773. }
  15774. else
  15775. {
  15776. gBg.transform.position = bg.position;
  15777. gBg.transform.eulerAngles = bg.eulerAngles;
  15778. mBg.maid = bgObject;
  15779. mBg.ido = 4;
  15780. }
  15781. }
  15782. else if (ikMode2 == 14)
  15783. {
  15784. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15785. {
  15786. mBg.ido = 6;
  15787. mBg.reset = true;
  15788. }
  15789. else
  15790. {
  15791. gBg.transform.position = bg.position;
  15792. gBg.transform.eulerAngles = bg.eulerAngles;
  15793. mBg.maid = bgObject;
  15794. mBg.ido = 6;
  15795. }
  15796. }
  15797. }
  15798. }
  15799. for (i = 0; i < lightIndex.Count; i++)
  15800. {
  15801. if (gLight[0] == null)
  15802. {
  15803. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15804. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15805. {
  15806. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15807. };
  15808. gLight[0].GetComponent<Renderer>().material = material2;
  15809. gLight[0].layer = 8;
  15810. gLight[0].GetComponent<Renderer>().enabled = false;
  15811. gLight[0].SetActive(false);
  15812. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15813. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15814. mLight[0].obj = gLight[0];
  15815. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15816. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15817. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15818. mLight[0].ido = 1;
  15819. mLight[0].isScale = false;
  15820. }
  15821. if (gLight[i] != null)
  15822. {
  15823. if (!isCube4)
  15824. {
  15825. gLight[i].GetComponent<Renderer>().enabled = false;
  15826. gLight[i].SetActive(false);
  15827. }
  15828. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15829. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15830. {
  15831. if (ikMode2 > 0 && ikMode2 != 15)
  15832. {
  15833. gLight[i].GetComponent<Renderer>().enabled = true;
  15834. gLight[i].SetActive(true);
  15835. }
  15836. else
  15837. {
  15838. gLight[i].GetComponent<Renderer>().enabled = false;
  15839. gLight[i].SetActive(false);
  15840. mLight[i].isAlt = false;
  15841. }
  15842. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15843. {
  15844. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15845. if (mLight[i].isAlt)
  15846. {
  15847. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15848. }
  15849. }
  15850. if (ikMode2 == 9 || ikMode2 == 14)
  15851. {
  15852. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15853. mLight[i].Update();
  15854. }
  15855. if (ikMode2 == 13)
  15856. {
  15857. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15858. mLight[i].Update();
  15859. }
  15860. if (ikMode2 == 13)
  15861. {
  15862. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15863. {
  15864. mLight[i].ido = 15;
  15865. mLight[i].reset = true;
  15866. }
  15867. else
  15868. {
  15869. if (lightList[i].transform.localScale.x == 1f)
  15870. {
  15871. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15872. }
  15873. lightRange[i] = lightList[i].transform.localScale.x;
  15874. gLight[i].transform.position = lightList[i].transform.position;
  15875. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15876. mLight[i].maid = lightList[i];
  15877. mLight[i].ido = 15;
  15878. }
  15879. }
  15880. else if (ikMode2 == 11)
  15881. {
  15882. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15883. {
  15884. mLight[i].ido = 3;
  15885. mLight[i].reset = true;
  15886. }
  15887. else
  15888. {
  15889. gLight[i].transform.position = lightList[i].transform.position;
  15890. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15891. lightX[i] = gLight[i].transform.eulerAngles.x;
  15892. lightY[i] = gLight[i].transform.eulerAngles.y;
  15893. mLight[i].maid = lightList[i];
  15894. mLight[i].ido = 3;
  15895. }
  15896. }
  15897. else if (ikMode2 == 12)
  15898. {
  15899. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15900. {
  15901. mLight[i].ido = 2;
  15902. mLight[i].reset = true;
  15903. }
  15904. else
  15905. {
  15906. gLight[i].transform.position = lightList[i].transform.position;
  15907. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15908. mLight[i].maid = lightList[i];
  15909. mLight[i].ido = 2;
  15910. }
  15911. }
  15912. else if (ikMode2 == 10)
  15913. {
  15914. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15915. {
  15916. mLight[i].ido = 1;
  15917. mLight[i].reset = true;
  15918. }
  15919. else
  15920. {
  15921. gLight[i].transform.position = lightList[i].transform.position;
  15922. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15923. mLight[i].maid = lightList[i];
  15924. mLight[i].maidArray = lightList.ToArray();
  15925. mLight[i].mArray = mLight.ToArray();
  15926. mLight[i].ido = 1;
  15927. }
  15928. }
  15929. else if (ikMode2 == 9)
  15930. {
  15931. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15932. {
  15933. mLight[i].ido = 4;
  15934. mLight[i].reset = true;
  15935. }
  15936. else
  15937. {
  15938. gLight[i].transform.position = lightList[i].transform.position;
  15939. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15940. lightX[i] = gLight[i].transform.eulerAngles.x;
  15941. lightY[i] = gLight[i].transform.eulerAngles.y;
  15942. mLight[i].maid = lightList[i];
  15943. mLight[i].ido = 4;
  15944. }
  15945. }
  15946. else if (ikMode2 == 14)
  15947. {
  15948. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15949. {
  15950. mLight[i].ido = 6;
  15951. mLight[i].reset = true;
  15952. }
  15953. else
  15954. {
  15955. gLight[i].transform.position = lightList[i].transform.position;
  15956. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15957. lightX[i] = gLight[i].transform.eulerAngles.x;
  15958. lightY[i] = gLight[i].transform.eulerAngles.y;
  15959. mLight[i].maid = lightList[i];
  15960. mLight[i].ido = 6;
  15961. }
  15962. }
  15963. }
  15964. }
  15965. }
  15966. for (i = 0; i < doguBObject.Count; i++)
  15967. {
  15968. if (!isCube2)
  15969. {
  15970. gDogu[i].GetComponent<Renderer>().enabled = false;
  15971. gDogu[i].SetActive(false);
  15972. }
  15973. else
  15974. {
  15975. if (ikMode2 > 0)
  15976. {
  15977. gDogu[i].GetComponent<Renderer>().enabled = true;
  15978. gDogu[i].SetActive(true);
  15979. }
  15980. else
  15981. {
  15982. gDogu[i].GetComponent<Renderer>().enabled = false;
  15983. gDogu[i].SetActive(false);
  15984. mDogu[i].isAlt = false;
  15985. }
  15986. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15987. {
  15988. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15989. if (mDogu[i].isAlt)
  15990. {
  15991. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15992. }
  15993. }
  15994. if (ikMode2 == 9 || ikMode2 == 14)
  15995. {
  15996. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15997. mDogu[i].Update();
  15998. }
  15999. if (ikMode2 == 15)
  16000. {
  16001. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16002. }
  16003. if (ikMode2 == 13)
  16004. {
  16005. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16006. mDogu[i].Update();
  16007. }
  16008. if (ikMode2 == 13)
  16009. {
  16010. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16011. {
  16012. mDogu[i].ido = 5;
  16013. mDogu[i].reset = true;
  16014. }
  16015. else
  16016. {
  16017. gDogu[i].transform.position = doguBObject[i].transform.position;
  16018. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16019. mDogu[i].maid = doguBObject[i];
  16020. mDogu[i].ido = 5;
  16021. }
  16022. }
  16023. else if (ikMode2 == 11)
  16024. {
  16025. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16026. {
  16027. mDogu[i].ido = 3;
  16028. mDogu[i].reset = true;
  16029. }
  16030. else
  16031. {
  16032. gDogu[i].transform.position = doguBObject[i].transform.position;
  16033. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16034. mDogu[i].maid = doguBObject[i];
  16035. mDogu[i].ido = 3;
  16036. }
  16037. }
  16038. else if (ikMode2 == 12)
  16039. {
  16040. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16041. {
  16042. mDogu[i].ido = 2;
  16043. mDogu[i].reset = true;
  16044. }
  16045. else
  16046. {
  16047. gDogu[i].transform.position = doguBObject[i].transform.position;
  16048. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16049. mDogu[i].maid = doguBObject[i];
  16050. mDogu[i].ido = 2;
  16051. }
  16052. }
  16053. else if (ikMode2 == 10)
  16054. {
  16055. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16056. {
  16057. mDogu[i].ido = 1;
  16058. mDogu[i].reset = true;
  16059. }
  16060. else
  16061. {
  16062. gDogu[i].transform.position = doguBObject[i].transform.position;
  16063. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16064. mDogu[i].maid = doguBObject[i];
  16065. mDogu[i].maidArray = doguBObject.ToArray();
  16066. mDogu[i].mArray = mDogu.ToArray();
  16067. mDogu[i].ido = 1;
  16068. }
  16069. }
  16070. else if (ikMode2 == 9)
  16071. {
  16072. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16073. {
  16074. mDogu[i].ido = 4;
  16075. mDogu[i].reset = true;
  16076. }
  16077. else
  16078. {
  16079. gDogu[i].transform.position = doguBObject[i].transform.position;
  16080. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16081. mDogu[i].maid = doguBObject[i];
  16082. mDogu[i].ido = 4;
  16083. }
  16084. }
  16085. else if (ikMode2 == 14)
  16086. {
  16087. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16088. {
  16089. mDogu[i].ido = 6;
  16090. mDogu[i].reset = true;
  16091. }
  16092. else
  16093. {
  16094. gDogu[i].transform.position = doguBObject[i].transform.position;
  16095. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16096. mDogu[i].maid = doguBObject[i];
  16097. mDogu[i].ido = 6;
  16098. }
  16099. }
  16100. else if (ikMode2 == 15)
  16101. {
  16102. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16103. {
  16104. mDogu[i].ido = 7;
  16105. mDogu[i].reset = true;
  16106. }
  16107. else
  16108. {
  16109. gDogu[i].transform.position = doguBObject[i].transform.position;
  16110. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16111. mDogu[i].maid = doguBObject[i];
  16112. mDogu[i].ido = 7;
  16113. }
  16114. }
  16115. }
  16116. }
  16117. ikModeOld2 = ikMode2;
  16118. }
  16119. if (isVR)
  16120. {
  16121. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16122. {
  16123. if (!isVR2)
  16124. {
  16125. isVR2 = true;
  16126. Preferences["config"]["shift_f8"].Value = "true";
  16127. SaveConfig();
  16128. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16129. }
  16130. else
  16131. {
  16132. isVR2 = false;
  16133. Preferences["config"]["shift_f8"].Value = "false";
  16134. SaveConfig();
  16135. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16136. }
  16137. }
  16138. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16139. {
  16140. loadScene = 1;
  16141. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16142. }
  16143. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16144. {
  16145. loadScene = 2;
  16146. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16147. }
  16148. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16149. {
  16150. loadScene = 3;
  16151. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16152. }
  16153. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16154. {
  16155. loadScene = 4;
  16156. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16157. }
  16158. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16159. {
  16160. loadScene = 5;
  16161. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16162. }
  16163. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16164. {
  16165. loadScene = 6;
  16166. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16167. }
  16168. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16169. {
  16170. loadScene = 7;
  16171. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16172. }
  16173. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16174. {
  16175. loadScene = 8;
  16176. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16177. }
  16178. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16179. {
  16180. loadScene = 9;
  16181. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16182. }
  16183. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16184. {
  16185. loadScene = 10;
  16186. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16187. }
  16188. for (int j = 0; j < 7; j++)
  16189. {
  16190. if (!maidArray[j])
  16191. {
  16192. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16193. }
  16194. }
  16195. }
  16196. }
  16197. }
  16198. }
  16199. }