MultipleMaids.MaidUpdate.cs 920 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486
  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. float num2 = 2f;
  661. if (Application.unityVersion.StartsWith("4"))
  662. {
  663. num2 = 1f;
  664. }
  665. GameObject gameObject3 = new GameObject("Light");
  666. gameObject3.AddComponent<Light>();
  667. lightList.Add(gameObject3);
  668. lightColorR.Add(1f);
  669. lightColorG.Add(1f);
  670. lightColorB.Add(1f);
  671. lightIndex.Add(0);
  672. lightX.Add(40f);
  673. lightY.Add(180f);
  674. lightAkarusa.Add(num2);
  675. lightKage.Add(0.098f);
  676. lightRange.Add(50f);
  677. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  678. gameObject3.GetComponent<Light>().intensity = num2;
  679. gameObject3.GetComponent<Light>().spotAngle = 50f;
  680. gameObject3.GetComponent<Light>().range = 10f;
  681. gameObject3.GetComponent<Light>().type = LightType.Directional;
  682. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  683. gameObject3.GetComponent<Light>().cullingMask = 256;
  684. }
  685. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  686. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  687. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  688. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  689. {
  690. float axis = Input.GetAxis("Mouse ScrollWheel");
  691. if (axis > 0f)
  692. {
  693. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  694. if (mainCamera.GetDistance() < 0.1f)
  695. {
  696. mainCamera.SetDistance(0.1f, true);
  697. }
  698. }
  699. else if (axis < 0f)
  700. {
  701. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  702. if (mainCamera.GetDistance() > 25f)
  703. {
  704. mainCamera.SetDistance(25f, true);
  705. }
  706. }
  707. }
  708. for (int j = 0; j < maxMaidCnt; j++)
  709. {
  710. if (maidArray[j] && maidArray[j].Visible)
  711. {
  712. maidCnt++;
  713. }
  714. }
  715. if (maidArray[0] != null && maidArray[0].Visible)
  716. {
  717. if (getModKeyPressing(modKey.Shift))
  718. {
  719. speed = 5f * Time.deltaTime * 60f;
  720. }
  721. else
  722. {
  723. speed = 1f * Time.deltaTime * 60f;
  724. }
  725. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  726. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  727. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  728. if (!isVR || isVR2)
  729. {
  730. if (!isVR)
  731. {
  732. if (isBloom)
  733. {
  734. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  735. fieldValue2.enabled = true;
  736. fieldValue2.bloomIntensity = bloom1;
  737. fieldValue2.bloomBlurIterations = (int)bloom2;
  738. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  739. if (isBloomA)
  740. {
  741. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  742. }
  743. else
  744. {
  745. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  746. }
  747. isBloom2 = true;
  748. }
  749. else if (isBloom2)
  750. {
  751. isBloom2 = false;
  752. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  753. fieldValue2.enabled = true;
  754. fieldValue2.bloomIntensity = 2.85f;
  755. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  756. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  757. fieldValue2.bloomBlurIterations = 3;
  758. }
  759. if (isDepth)
  760. {
  761. depth_field_.enabled = true;
  762. depth_field_.focalLength = depth1;
  763. depth_field_.focalSize = depth2;
  764. depth_field_.aperture = depth3;
  765. depth_field_.maxBlurSize = depth4;
  766. if (isDepthA)
  767. {
  768. depth_field_.visualizeFocus = true;
  769. }
  770. else
  771. {
  772. depth_field_.visualizeFocus = false;
  773. }
  774. }
  775. else
  776. {
  777. if (depth_field_ == null)
  778. {
  779. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  780. if (depth_field_.dofHdrShader == null)
  781. {
  782. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  783. }
  784. if (depth_field_.dx11BokehShader == null)
  785. {
  786. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  787. }
  788. if (depth_field_.dx11BokehTexture == null)
  789. {
  790. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  791. }
  792. }
  793. depth_field_.enabled = false;
  794. }
  795. if (isFog)
  796. {
  797. if (fog_.fogShader == null)
  798. {
  799. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  800. }
  801. fog_.enabled = true;
  802. fog_.startDistance = fog1;
  803. fog_.globalDensity = fog2;
  804. fog_.heightScale = fog3;
  805. fog_.height = fog4;
  806. fog_.globalFogColor.r = fog5;
  807. fog_.globalFogColor.g = fog6;
  808. fog_.globalFogColor.b = fog7;
  809. }
  810. else
  811. {
  812. if (fog_ == null)
  813. {
  814. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  815. }
  816. fog_.enabled = false;
  817. }
  818. if (isSepia != isSepian)
  819. {
  820. isSepia = isSepian;
  821. if (isSepia)
  822. {
  823. if (sepia_tone_.shader == null)
  824. {
  825. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  826. }
  827. sepia_tone_.enabled = true;
  828. }
  829. else
  830. {
  831. if (sepia_tone_ == null)
  832. {
  833. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  834. }
  835. sepia_tone_.enabled = false;
  836. }
  837. }
  838. if (bokashi > 0f)
  839. {
  840. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  841. component.enabled = true;
  842. component.blurSize = bokashi / 10f;
  843. component.blurIterations = 0;
  844. component.downsample = 0;
  845. if (bokashi > 3f)
  846. {
  847. component.blurSize -= 0.3f;
  848. component.blurIterations = 1;
  849. component.downsample = 1;
  850. }
  851. }
  852. else
  853. {
  854. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  855. component.enabled = false;
  856. }
  857. if (kamiyure > 0f)
  858. {
  859. for (int j = 0; j < maidCnt; j++)
  860. {
  861. Maid maid = maidArray[j];
  862. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  863. {
  864. if (maid.body0.goSlot[l].obj != null)
  865. {
  866. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  867. if (component2 != null && component2.enabled)
  868. {
  869. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  870. }
  871. }
  872. List<THair1> fieldValue3 =
  873. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  874. for (int k = 0; k < fieldValue3.Count; k++)
  875. {
  876. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  877. }
  878. }
  879. }
  880. }
  881. if (isBlur)
  882. {
  883. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  884. component3.mode = Vignetting.AberrationMode.Simple;
  885. component3.intensity = blur1;
  886. component3.chromaticAberration = blur4;
  887. component3.blur = blur2;
  888. component3.blurSpread = blur3;
  889. component3.enabled = true;
  890. isBlur2 = true;
  891. }
  892. else if (isBlur2)
  893. {
  894. isBlur2 = false;
  895. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  896. component3.mode = Vignetting.AberrationMode.Simple;
  897. component3.intensity = -3.98f;
  898. component3.chromaticAberration = -0.75f;
  899. component3.axialAberration = 1.18f;
  900. component3.blurSpread = 4.19f;
  901. component3.luminanceDependency = 0.494f;
  902. component3.blurDistance = 1.71f;
  903. component3.enabled = false;
  904. }
  905. }
  906. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  907. {
  908. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  909. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  910. }
  911. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  912. {
  913. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. }
  919. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  920. {
  921. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  922. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  923. }
  924. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  925. {
  926. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  927. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  928. }
  929. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  930. {
  931. GameMain.Instance.MainLight.Reset();
  932. GameMain.Instance.MainLight.SetIntensity(0.95f);
  933. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  934. lightIndex[0] = 0;
  935. lightColorR[0] = 1f;
  936. lightColorG[0] = 1f;
  937. lightColorB[0] = 1f;
  938. lightX[0] = 40f;
  939. lightY[0] = 180f;
  940. lightAkarusa[0] = 0.95f;
  941. lightKage[0] = 0.098f;
  942. lightRange[0] = 50f;
  943. bgObject.SetActive(true);
  944. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  945. isIdx1 = false;
  946. isIdx2 = false;
  947. isIdx3 = false;
  948. isIdx4 = false;
  949. }
  950. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  951. {
  952. List<float> list;
  953. (list = lightColorR)[0] = list[0] + 0.01f;
  954. if (lightColorR[0] > 1f)
  955. {
  956. lightColorR[0] = 1f;
  957. }
  958. if (lightIndex[0] != 3)
  959. {
  960. GameMain.Instance.MainLight.GetComponent<Light>().color =
  961. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  962. }
  963. else
  964. {
  965. mainCamera.GetComponent<Camera>().backgroundColor =
  966. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  967. }
  968. }
  969. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  970. {
  971. List<float> list;
  972. (list = lightColorG)[0] = list[0] + 0.01f;
  973. if (lightColorG[0] > 1f)
  974. {
  975. lightColorG[0] = 1f;
  976. }
  977. if (lightIndex[0] != 3)
  978. {
  979. GameMain.Instance.MainLight.GetComponent<Light>().color =
  980. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  981. }
  982. else
  983. {
  984. mainCamera.GetComponent<Camera>().backgroundColor =
  985. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  986. }
  987. }
  988. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  989. {
  990. List<float> list;
  991. (list = lightColorB)[0] = list[0] + 0.01f;
  992. if (lightColorB[0] > 1f)
  993. {
  994. lightColorB[0] = 1f;
  995. }
  996. if (lightIndex[0] != 3)
  997. {
  998. GameMain.Instance.MainLight.GetComponent<Light>().color =
  999. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1000. }
  1001. else
  1002. {
  1003. mainCamera.GetComponent<Camera>().backgroundColor =
  1004. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1005. }
  1006. }
  1007. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1008. {
  1009. List<float> list;
  1010. (list = lightColorR)[0] = list[0] - 0.01f;
  1011. if (lightColorR[0] < 0f)
  1012. {
  1013. lightColorR[0] = 0f;
  1014. }
  1015. if (lightIndex[0] != 3)
  1016. {
  1017. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1018. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1019. }
  1020. else
  1021. {
  1022. mainCamera.GetComponent<Camera>().backgroundColor =
  1023. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1024. }
  1025. }
  1026. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1027. {
  1028. List<float> list;
  1029. (list = lightColorG)[0] = list[0] - 0.01f;
  1030. if (lightColorG[0] < 0f)
  1031. {
  1032. lightColorG[0] = 0f;
  1033. }
  1034. if (lightIndex[0] != 3)
  1035. {
  1036. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1037. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1038. }
  1039. else
  1040. {
  1041. mainCamera.GetComponent<Camera>().backgroundColor =
  1042. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1043. }
  1044. }
  1045. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1046. {
  1047. List<float> list;
  1048. (list = lightColorB)[0] = list[0] - 0.01f;
  1049. if (lightColorB[0] < 0f)
  1050. {
  1051. lightColorB[0] = 0f;
  1052. }
  1053. if (lightIndex[0] != 3)
  1054. {
  1055. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1056. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1057. }
  1058. else
  1059. {
  1060. mainCamera.GetComponent<Camera>().backgroundColor =
  1061. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1062. }
  1063. }
  1064. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1065. {
  1066. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1067. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1068. }
  1069. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1070. {
  1071. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1072. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1073. }
  1074. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1075. {
  1076. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1077. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1078. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1079. }
  1080. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1081. {
  1082. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1083. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1084. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1085. }
  1086. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1087. {
  1088. List<int> list2;
  1089. (list2 = lightIndex)[0] = list2[0] + 1;
  1090. if (lightIndex[0] == 4)
  1091. {
  1092. lightIndex[0] = 0;
  1093. }
  1094. lightColorR[0] = 1f;
  1095. lightColorG[0] = 1f;
  1096. lightColorB[0] = 1f;
  1097. lightX[0] = 40f;
  1098. lightY[0] = 180f;
  1099. lightAkarusa[0] = 0.95f;
  1100. lightKage[0] = 0.098f;
  1101. lightRange[0] = 50f;
  1102. GameMain.Instance.MainLight.Reset();
  1103. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1104. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1105. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1106. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1107. if (lightIndex[0] == 0)
  1108. {
  1109. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1110. bgObject.SetActive(true);
  1111. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1112. }
  1113. else if (lightIndex[0] == 1)
  1114. {
  1115. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1116. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1117. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1118. }
  1119. else if (lightIndex[0] == 2)
  1120. {
  1121. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1122. }
  1123. else if (lightIndex[0] == 3)
  1124. {
  1125. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1126. mainCamera.GetComponent<Camera>().backgroundColor =
  1127. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1128. bgObject.SetActive(false);
  1129. }
  1130. isIdx1 = false;
  1131. isIdx2 = false;
  1132. isIdx3 = false;
  1133. isIdx4 = false;
  1134. }
  1135. }
  1136. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1137. {
  1138. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1139. }
  1140. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1141. {
  1142. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1143. {
  1144. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1145. }
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1148. {
  1149. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1150. }
  1151. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1152. {
  1153. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1154. }
  1155. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1156. {
  1157. GameMain.Instance.MainLight.Reset();
  1158. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1159. }
  1160. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1161. {
  1162. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1163. }
  1164. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1165. {
  1166. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1167. }
  1168. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1169. {
  1170. if (lightIndex[0] == 1)
  1171. {
  1172. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1173. }
  1174. else
  1175. {
  1176. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1177. }
  1178. }
  1179. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1180. {
  1181. if (lightIndex[0] == 1)
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1184. }
  1185. else
  1186. {
  1187. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1188. }
  1189. }
  1190. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1191. {
  1192. List<int> list2;
  1193. (list2 = lightIndex)[0] = list2[0] + 1;
  1194. if (lightIndex[0] == 3)
  1195. {
  1196. lightIndex[0] = 0;
  1197. }
  1198. GameMain.Instance.MainLight.Reset();
  1199. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1200. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1201. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1202. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1203. if (lightIndex[0] == 0)
  1204. {
  1205. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1206. }
  1207. else if (lightIndex[0] == 1)
  1208. {
  1209. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1210. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1211. }
  1212. else if (lightIndex[0] == 2)
  1213. {
  1214. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1215. }
  1216. }
  1217. int i;
  1218. for (i = 0; i < lightList.Count; i++)
  1219. {
  1220. if (i > 0)
  1221. {
  1222. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1223. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1224. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1225. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1226. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1227. {
  1228. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1229. }
  1230. }
  1231. else
  1232. {
  1233. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1234. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1235. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1236. {
  1237. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1238. }
  1239. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1240. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1241. if (lightIndex[i] != 3)
  1242. {
  1243. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1244. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1245. }
  1246. else
  1247. {
  1248. mainCamera.GetComponent<Camera>().backgroundColor =
  1249. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1250. }
  1251. }
  1252. }
  1253. bool flag3 = false;
  1254. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1255. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1256. {
  1257. for (i = 0; i < maidCnt; i++)
  1258. {
  1259. if (goSlot[(int)selectList[i]] != null)
  1260. {
  1261. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1262. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1263. {
  1264. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1265. }
  1266. }
  1267. }
  1268. }
  1269. for (int j = 0; j < maidCnt; j++)
  1270. {
  1271. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1272. {
  1273. bool flag4 = shodaiFlg[(int)selectList[j]];
  1274. shodaiFlg[(int)selectList[j]] = false;
  1275. try
  1276. {
  1277. TMorph morph = maidArray[j].body0.Face.morph;
  1278. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1279. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1280. }
  1281. catch
  1282. {
  1283. shodaiFlg[(int)selectList[j]] = true;
  1284. }
  1285. if (shodaiFlg[(int)selectList[j]] != flag4)
  1286. {
  1287. if (!isVR)
  1288. {
  1289. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1290. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1291. }
  1292. }
  1293. }
  1294. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1295. {
  1296. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1297. }
  1298. if (sceneLevel == 5)
  1299. {
  1300. if (editSelectMaid == maidArray[j])
  1301. {
  1302. flag3 = true;
  1303. }
  1304. }
  1305. Maid maid = maidArray[j];
  1306. }
  1307. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1308. {
  1309. isEditNo = 0;
  1310. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1311. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1312. }
  1313. i = 0;
  1314. while (i < maidCnt)
  1315. {
  1316. Transform transform = maidArray[i].transform;
  1317. Maid maid = maidArray[i];
  1318. if (cafeFlg[i])
  1319. {
  1320. cafeCount[i]++;
  1321. if (cafeCount[i] > 1)
  1322. {
  1323. maid.DelProp(MPN.handitem, true);
  1324. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1325. maid.AllProcPropSeqStart();
  1326. cafeFlg[i] = false;
  1327. cafeCount[i] = 0;
  1328. }
  1329. }
  1330. KeyCode key;
  1331. if (i >= 14)
  1332. {
  1333. bool flag5 = false;
  1334. bool flag6 = false;
  1335. for (int k = 0; k < keyArray.Length; k++)
  1336. {
  1337. if (Input.GetKey(keyArray[k]))
  1338. {
  1339. flag5 = true;
  1340. break;
  1341. }
  1342. if (Input.GetKeyUp(keyArray[k]))
  1343. {
  1344. flag6 = true;
  1345. break;
  1346. }
  1347. }
  1348. key = keyArray[6];
  1349. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1350. {
  1351. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1352. {
  1353. goto IL_49FE;
  1354. }
  1355. idoFlg[i - 7] = false;
  1356. }
  1357. }
  1358. else if (i >= 7)
  1359. {
  1360. bool flag5 = false;
  1361. bool flag6 = false;
  1362. for (int k = 0; k < keyArray.Length; k++)
  1363. {
  1364. if (Input.GetKey(keyArray[k]))
  1365. {
  1366. flag5 = true;
  1367. break;
  1368. }
  1369. if (Input.GetKeyUp(keyArray[k]))
  1370. {
  1371. flag6 = true;
  1372. break;
  1373. }
  1374. }
  1375. key = keyArray[i - 7];
  1376. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1377. {
  1378. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1379. {
  1380. goto IL_49FE;
  1381. }
  1382. idoFlg[i - 7] = false;
  1383. }
  1384. }
  1385. else
  1386. {
  1387. bool flag5 = false;
  1388. for (int k = 0; k < keyArray.Length; k++)
  1389. {
  1390. if (Input.GetKey(keyArray[k]))
  1391. {
  1392. flag5 = true;
  1393. break;
  1394. }
  1395. }
  1396. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1397. {
  1398. key = keyArray[i];
  1399. goto IL_49FE;
  1400. }
  1401. }
  1402. IL_1688E:
  1403. i++;
  1404. continue;
  1405. IL_49FE:
  1406. if (xFlg[i])
  1407. {
  1408. if (!maid.AudioMan.audiosource.isPlaying)
  1409. {
  1410. if (maid.status.personal.uniqueName == "Pride")
  1411. {
  1412. string text = "s0_";
  1413. Random random = new Random();
  1414. int num4 = random.Next(10000);
  1415. bool flag7 = false;
  1416. for (int k = 0; k < tunArray.Length; k++)
  1417. {
  1418. if (tunArray[k] == num4)
  1419. {
  1420. flag7 = true;
  1421. break;
  1422. }
  1423. }
  1424. if (!flag7)
  1425. {
  1426. text = text + "0" + num4.ToString() + ".ogg";
  1427. if (GameUty.FileSystem.IsExistentFile(text))
  1428. {
  1429. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1430. }
  1431. }
  1432. }
  1433. if (maid.status.personal.uniqueName == "Cool")
  1434. {
  1435. string text = "s1_";
  1436. Random random = new Random();
  1437. int num4 = random.Next(10000);
  1438. bool flag7 = false;
  1439. for (int k = 0; k < coolArray.Length; k++)
  1440. {
  1441. if (coolArray[k] == num4)
  1442. {
  1443. flag7 = true;
  1444. break;
  1445. }
  1446. }
  1447. if (!flag7)
  1448. {
  1449. text = text + "0" + num4.ToString() + ".ogg";
  1450. if (GameUty.FileSystem.IsExistentFile(text))
  1451. {
  1452. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1453. }
  1454. }
  1455. }
  1456. if (maid.status.personal.uniqueName == "Pure")
  1457. {
  1458. string text = "s2_";
  1459. Random random = new Random();
  1460. int num4 = random.Next(10000);
  1461. bool flag7 = false;
  1462. for (int k = 0; k < pureArray.Length; k++)
  1463. {
  1464. if (pureArray[k] == num4)
  1465. {
  1466. flag7 = true;
  1467. break;
  1468. }
  1469. }
  1470. if (!flag7)
  1471. {
  1472. text = text + "0" + num4.ToString() + ".ogg";
  1473. if (GameUty.FileSystem.IsExistentFile(text))
  1474. {
  1475. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1476. }
  1477. }
  1478. }
  1479. if (maid.status.personal.uniqueName == "Yandere")
  1480. {
  1481. string text = "s3_";
  1482. Random random = new Random();
  1483. int num4 = random.Next(10000);
  1484. bool flag7 = false;
  1485. for (int k = 0; k < yanArray.Length; k++)
  1486. {
  1487. if (yanArray[k] == num4)
  1488. {
  1489. flag7 = true;
  1490. break;
  1491. }
  1492. }
  1493. if (!flag7)
  1494. {
  1495. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1496. if (GameUty.FileSystem.IsExistentFile(text))
  1497. {
  1498. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1499. }
  1500. }
  1501. }
  1502. if (maid.status.personal.uniqueName == "Muku")
  1503. {
  1504. string text = "h0_";
  1505. Random random = new Random();
  1506. int num4 = random.Next(10000);
  1507. bool flag7 = false;
  1508. for (int k = 0; k < h0Array.Length; k++)
  1509. {
  1510. if (h0Array[k] == num4)
  1511. {
  1512. flag7 = true;
  1513. break;
  1514. }
  1515. }
  1516. if (flag7)
  1517. {
  1518. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1519. if (GameUty.FileSystem.IsExistentFile(text))
  1520. {
  1521. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1522. }
  1523. }
  1524. }
  1525. if (maid.status.personal.uniqueName == "Majime")
  1526. {
  1527. string text = "h1_";
  1528. Random random = new Random();
  1529. int num4 = random.Next(10000);
  1530. bool flag7 = false;
  1531. for (int k = 0; k < h1Array.Length; k++)
  1532. {
  1533. if (h1Array[k] == num4)
  1534. {
  1535. flag7 = true;
  1536. break;
  1537. }
  1538. }
  1539. if (flag7)
  1540. {
  1541. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1542. if (GameUty.FileSystem.IsExistentFile(text))
  1543. {
  1544. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1545. }
  1546. }
  1547. }
  1548. if (maid.status.personal.uniqueName == "Rindere")
  1549. {
  1550. string text = "h2_";
  1551. Random random = new Random();
  1552. int num4 = random.Next(10000);
  1553. bool flag7 = false;
  1554. for (int k = 0; k < h2Array.Length; k++)
  1555. {
  1556. if (h2Array[k] == num4)
  1557. {
  1558. flag7 = true;
  1559. break;
  1560. }
  1561. }
  1562. if (flag7)
  1563. {
  1564. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1565. if (GameUty.FileSystem.IsExistentFile(text))
  1566. {
  1567. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1568. }
  1569. }
  1570. }
  1571. }
  1572. }
  1573. if (zFlg[i])
  1574. {
  1575. if (!maid.AudioMan.audiosource.isPlaying)
  1576. {
  1577. string text = "";
  1578. if (maid.status.personal.uniqueName == "Pride")
  1579. {
  1580. text = "s0_";
  1581. Random random = new Random();
  1582. int num4 = random.Next(tunArray.Length);
  1583. object obj = text;
  1584. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1585. }
  1586. if (maid.status.personal.uniqueName == "Cool")
  1587. {
  1588. text = "s1_";
  1589. Random random = new Random();
  1590. int num4 = random.Next(coolArray.Length);
  1591. object obj = text;
  1592. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1593. }
  1594. if (maid.status.personal.uniqueName == "Pure")
  1595. {
  1596. text = "s2_";
  1597. Random random = new Random();
  1598. int num4 = random.Next(pureArray.Length);
  1599. object obj = text;
  1600. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1601. }
  1602. if (maid.status.personal.uniqueName == "Yandere")
  1603. {
  1604. text = "s3_";
  1605. Random random = new Random();
  1606. int num4 = random.Next(yanArray.Length);
  1607. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1608. }
  1609. if (maid.status.personal.uniqueName == "Muku")
  1610. {
  1611. text = "h0_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(h0tArray.Length);
  1614. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Majime")
  1617. {
  1618. text = "h1_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h1tArray.Length);
  1621. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Rindere")
  1624. {
  1625. text = "h2_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h2tArray.Length);
  1628. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1629. }
  1630. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1631. }
  1632. }
  1633. if (!isVR || isVR2)
  1634. {
  1635. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1636. {
  1637. ikMaid = i;
  1638. isIK[i] = true;
  1639. ikBui = 1;
  1640. ikMode[i] = 0;
  1641. SetIK(maid, i);
  1642. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1643. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1644. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1645. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1646. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1647. idoFlg[i] = true;
  1648. if (i >= 7)
  1649. {
  1650. idoFlg[i - 7] = true;
  1651. }
  1652. qFlg = true;
  1653. }
  1654. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1655. {
  1656. ikMaid = i;
  1657. isIK[i] = true;
  1658. ikBui = 2;
  1659. ikMode[i] = 0;
  1660. SetIK(maid, i);
  1661. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1662. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1663. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1664. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1665. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1666. idoFlg[i] = true;
  1667. if (i >= 7)
  1668. {
  1669. idoFlg[i - 7] = true;
  1670. }
  1671. }
  1672. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1673. {
  1674. ikMaid = i;
  1675. isIK[i] = true;
  1676. ikBui = 3;
  1677. ikMode[i] = 0;
  1678. SetIK(maid, i);
  1679. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1680. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1681. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1682. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1683. idoFlg[i] = true;
  1684. if (i >= 7)
  1685. {
  1686. idoFlg[i - 7] = true;
  1687. }
  1688. }
  1689. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1690. {
  1691. ikMaid = i;
  1692. isIK[i] = true;
  1693. ikBui = 4;
  1694. ikMode[i] = 0;
  1695. SetIK(maid, i);
  1696. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1697. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1698. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1699. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1700. idoFlg[i] = true;
  1701. if (i >= 7)
  1702. {
  1703. idoFlg[i - 7] = true;
  1704. }
  1705. sFlg = true;
  1706. }
  1707. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1708. {
  1709. maid.body0.transform.localRotation =
  1710. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1711. if (i >= 7)
  1712. {
  1713. idoFlg[i - 7] = true;
  1714. }
  1715. idoFlg[i] = true;
  1716. }
  1717. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1718. {
  1719. maid.body0.transform.localRotation =
  1720. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1721. if (i >= 7)
  1722. {
  1723. idoFlg[i - 7] = true;
  1724. }
  1725. idoFlg[i] = true;
  1726. }
  1727. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1728. {
  1729. bGui = true;
  1730. isPoseInit = true;
  1731. isGuiInit = true;
  1732. poseFlg = true;
  1733. faceFlg = false;
  1734. // sceneFlg = false;
  1735. kankyoFlg = false;
  1736. kankyo2Flg = false;
  1737. fFlg = true;
  1738. for (int k = 0; k < maidCnt; k++)
  1739. {
  1740. if (maid == maidArray[k])
  1741. {
  1742. selectMaidIndex = k;
  1743. }
  1744. }
  1745. copyIndex = 0;
  1746. if (i >= 7)
  1747. {
  1748. idoFlg[i - 7] = true;
  1749. }
  1750. idoFlg[i] = true;
  1751. }
  1752. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1753. {
  1754. bGui = true;
  1755. isFaceInit = true;
  1756. isGuiInit = true;
  1757. faceFlg = true;
  1758. poseFlg = false;
  1759. // sceneFlg = false;
  1760. kankyoFlg = false;
  1761. kankyo2Flg = false;
  1762. maid.boMabataki = false;
  1763. for (int k = 0; k < maidCnt; k++)
  1764. {
  1765. if (maid == maidArray[k])
  1766. {
  1767. selectMaidIndex = k;
  1768. }
  1769. }
  1770. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1771. if (i >= 7)
  1772. {
  1773. idoFlg[i - 7] = true;
  1774. }
  1775. idoFlg[i] = true;
  1776. }
  1777. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1778. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1779. {
  1780. if (!xFlg[i])
  1781. {
  1782. xFlg[i] = true;
  1783. zFlg[i] = false;
  1784. if (maid.status.personal.uniqueName == "Pride")
  1785. {
  1786. string text = "s0_";
  1787. Random random = new Random();
  1788. int num4 = random.Next(10000);
  1789. bool flag7 = false;
  1790. for (int k = 0; k < tunArray.Length; k++)
  1791. {
  1792. if (tunArray[k] == num4)
  1793. {
  1794. flag7 = true;
  1795. break;
  1796. }
  1797. }
  1798. if (!flag7)
  1799. {
  1800. text = text + "0" + num4.ToString() + ".ogg";
  1801. if (GameUty.FileSystem.IsExistentFile(text))
  1802. {
  1803. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1804. }
  1805. }
  1806. }
  1807. if (maid.status.personal.uniqueName == "Cool")
  1808. {
  1809. string text = "s1_";
  1810. Random random = new Random();
  1811. int num4 = random.Next(10000);
  1812. bool flag7 = false;
  1813. for (int k = 0; k < coolArray.Length; k++)
  1814. {
  1815. if (coolArray[k] == num4)
  1816. {
  1817. flag7 = true;
  1818. break;
  1819. }
  1820. }
  1821. if (!flag7)
  1822. {
  1823. text = text + "0" + num4.ToString() + ".ogg";
  1824. if (GameUty.FileSystem.IsExistentFile(text))
  1825. {
  1826. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1827. }
  1828. }
  1829. }
  1830. if (maid.status.personal.uniqueName == "Pure")
  1831. {
  1832. string text = "s2_";
  1833. Random random = new Random();
  1834. int num4 = random.Next(10000);
  1835. bool flag7 = false;
  1836. for (int k = 0; k < pureArray.Length; k++)
  1837. {
  1838. if (pureArray[k] == num4)
  1839. {
  1840. flag7 = true;
  1841. break;
  1842. }
  1843. }
  1844. if (!flag7)
  1845. {
  1846. text = text + "0" + num4.ToString() + ".ogg";
  1847. if (GameUty.FileSystem.IsExistentFile(text))
  1848. {
  1849. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1850. }
  1851. }
  1852. }
  1853. if (maid.status.personal.uniqueName == "Yandere")
  1854. {
  1855. string text = "s3_";
  1856. Random random = new Random();
  1857. int num4 = random.Next(10000);
  1858. bool flag7 = false;
  1859. for (int k = 0; k < yanArray.Length; k++)
  1860. {
  1861. if (yanArray[k] == num4)
  1862. {
  1863. flag7 = true;
  1864. break;
  1865. }
  1866. }
  1867. if (!flag7)
  1868. {
  1869. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1870. if (GameUty.FileSystem.IsExistentFile(text))
  1871. {
  1872. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1873. }
  1874. }
  1875. }
  1876. if (maid.status.personal.uniqueName == "Muku")
  1877. {
  1878. string text = "h0_";
  1879. Random random = new Random();
  1880. int num4 = random.Next(10000);
  1881. bool flag7 = false;
  1882. for (int k = 0; k < h0Array.Length; k++)
  1883. {
  1884. if (h0Array[k] == num4)
  1885. {
  1886. flag7 = true;
  1887. break;
  1888. }
  1889. }
  1890. if (flag7)
  1891. {
  1892. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1893. if (GameUty.FileSystem.IsExistentFile(text))
  1894. {
  1895. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1896. }
  1897. }
  1898. }
  1899. if (maid.status.personal.uniqueName == "Majime")
  1900. {
  1901. string text = "h1_";
  1902. Random random = new Random();
  1903. int num4 = random.Next(10000);
  1904. bool flag7 = false;
  1905. for (int k = 0; k < h1Array.Length; k++)
  1906. {
  1907. if (h1Array[k] == num4)
  1908. {
  1909. flag7 = true;
  1910. break;
  1911. }
  1912. }
  1913. if (flag7)
  1914. {
  1915. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1916. if (GameUty.FileSystem.IsExistentFile(text))
  1917. {
  1918. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1919. }
  1920. }
  1921. }
  1922. if (maid.status.personal.uniqueName == "Rindere")
  1923. {
  1924. string text = "h2_";
  1925. Random random = new Random();
  1926. int num4 = random.Next(10000);
  1927. bool flag7 = false;
  1928. for (int k = 0; k < h2Array.Length; k++)
  1929. {
  1930. if (h2Array[k] == num4)
  1931. {
  1932. flag7 = true;
  1933. break;
  1934. }
  1935. }
  1936. if (flag7)
  1937. {
  1938. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1939. if (GameUty.FileSystem.IsExistentFile(text))
  1940. {
  1941. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1942. }
  1943. }
  1944. }
  1945. }
  1946. else
  1947. {
  1948. xFlg[i] = false;
  1949. maid.AudioMan.Clear();
  1950. }
  1951. idoFlg[i] = true;
  1952. if (i >= 7)
  1953. {
  1954. idoFlg[i - 7] = true;
  1955. }
  1956. }
  1957. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1958. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1959. {
  1960. if (!zFlg[i])
  1961. {
  1962. zFlg[i] = true;
  1963. xFlg[i] = false;
  1964. string text = "";
  1965. if (maid.status.personal.uniqueName == "Pride")
  1966. {
  1967. text = "s0_";
  1968. Random random = new Random();
  1969. int num4 = random.Next(tunArray.Length);
  1970. object obj = text;
  1971. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1972. }
  1973. if (maid.status.personal.uniqueName == "Cool")
  1974. {
  1975. text = "s1_";
  1976. Random random = new Random();
  1977. int num4 = random.Next(coolArray.Length);
  1978. object obj = text;
  1979. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1980. }
  1981. if (maid.status.personal.uniqueName == "Pure")
  1982. {
  1983. text = "s2_";
  1984. Random random = new Random();
  1985. int num4 = random.Next(pureArray.Length);
  1986. object obj = text;
  1987. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1988. }
  1989. if (maid.status.personal.uniqueName == "Yandere")
  1990. {
  1991. text = "s3_";
  1992. Random random = new Random();
  1993. int num4 = random.Next(yanArray.Length);
  1994. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1995. }
  1996. if (maid.status.personal.uniqueName == "Muku")
  1997. {
  1998. text = "h0_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(h0tArray.Length);
  2001. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Majime")
  2004. {
  2005. text = "h1_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h1tArray.Length);
  2008. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Rindere")
  2011. {
  2012. text = "h2_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h2tArray.Length);
  2015. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2016. }
  2017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2018. }
  2019. else
  2020. {
  2021. zFlg[i] = false;
  2022. maid.AudioMan.Clear();
  2023. }
  2024. idoFlg[i] = true;
  2025. if (i >= 7)
  2026. {
  2027. idoFlg[i - 7] = true;
  2028. }
  2029. }
  2030. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2031. {
  2032. string text = "";
  2033. if (maid.status.personal.uniqueName == "Pride")
  2034. {
  2035. text = "s0_";
  2036. Random random = new Random();
  2037. int num4 = random.Next(tunArray.Length);
  2038. object obj = text;
  2039. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2040. }
  2041. if (maid.status.personal.uniqueName == "Cool")
  2042. {
  2043. text = "s1_";
  2044. Random random = new Random();
  2045. int num4 = random.Next(coolArray.Length);
  2046. object obj = text;
  2047. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2048. }
  2049. if (maid.status.personal.uniqueName == "Pure")
  2050. {
  2051. text = "s2_";
  2052. Random random = new Random();
  2053. int num4 = random.Next(pureArray.Length);
  2054. object obj = text;
  2055. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2056. }
  2057. if (maid.status.personal.uniqueName == "Yandere")
  2058. {
  2059. text = "s3_";
  2060. Random random = new Random();
  2061. int num4 = random.Next(yanArray.Length);
  2062. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2063. }
  2064. if (maid.status.personal.uniqueName == "Muku")
  2065. {
  2066. text = "h0_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(h0tArray.Length);
  2069. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Majime")
  2072. {
  2073. text = "h1_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h1tArray.Length);
  2076. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Rindere")
  2079. {
  2080. text = "h2_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h2tArray.Length);
  2083. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2084. }
  2085. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2086. idoFlg[i] = true;
  2087. if (i >= 7)
  2088. {
  2089. idoFlg[i - 7] = true;
  2090. }
  2091. }
  2092. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2093. {
  2094. if (maid.status.personal.uniqueName == "Pride")
  2095. {
  2096. string text = "s0_";
  2097. Random random = new Random();
  2098. int num4 = random.Next(10000);
  2099. bool flag7 = false;
  2100. for (int k = 0; k < tunArray.Length; k++)
  2101. {
  2102. if (tunArray[k] == num4)
  2103. {
  2104. flag7 = true;
  2105. break;
  2106. }
  2107. }
  2108. if (!flag7)
  2109. {
  2110. text = text + "0" + num4.ToString() + ".ogg";
  2111. if (GameUty.FileSystem.IsExistentFile(text))
  2112. {
  2113. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2114. }
  2115. }
  2116. }
  2117. if (maid.status.personal.uniqueName == "Cool")
  2118. {
  2119. string text = "s1_";
  2120. Random random = new Random();
  2121. int num4 = random.Next(10000);
  2122. bool flag7 = false;
  2123. for (int k = 0; k < coolArray.Length; k++)
  2124. {
  2125. if (coolArray[k] == num4)
  2126. {
  2127. flag7 = true;
  2128. break;
  2129. }
  2130. }
  2131. if (!flag7)
  2132. {
  2133. text = text + "0" + num4.ToString() + ".ogg";
  2134. if (GameUty.FileSystem.IsExistentFile(text))
  2135. {
  2136. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2137. }
  2138. }
  2139. }
  2140. if (maid.status.personal.uniqueName == "Pure")
  2141. {
  2142. string text = "s2_";
  2143. Random random = new Random();
  2144. int num4 = random.Next(10000);
  2145. bool flag7 = false;
  2146. for (int k = 0; k < pureArray.Length; k++)
  2147. {
  2148. if (pureArray[k] == num4)
  2149. {
  2150. flag7 = true;
  2151. break;
  2152. }
  2153. }
  2154. if (!flag7)
  2155. {
  2156. text = text + "0" + num4.ToString() + ".ogg";
  2157. if (GameUty.FileSystem.IsExistentFile(text))
  2158. {
  2159. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2160. }
  2161. }
  2162. }
  2163. if (maid.status.personal.uniqueName == "Yandere")
  2164. {
  2165. string text = "s3_";
  2166. Random random = new Random();
  2167. int num4 = random.Next(10000);
  2168. bool flag7 = false;
  2169. for (int k = 0; k < yanArray.Length; k++)
  2170. {
  2171. if (yanArray[k] == num4)
  2172. {
  2173. flag7 = true;
  2174. break;
  2175. }
  2176. }
  2177. if (!flag7)
  2178. {
  2179. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2180. if (GameUty.FileSystem.IsExistentFile(text))
  2181. {
  2182. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2183. }
  2184. }
  2185. }
  2186. if (maid.status.personal.uniqueName == "Muku")
  2187. {
  2188. string text = "h0_";
  2189. Random random = new Random();
  2190. int num4 = random.Next(10000);
  2191. bool flag7 = false;
  2192. for (int k = 0; k < h0Array.Length; k++)
  2193. {
  2194. if (h0Array[k] == num4)
  2195. {
  2196. flag7 = true;
  2197. break;
  2198. }
  2199. }
  2200. if (flag7)
  2201. {
  2202. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2203. if (GameUty.FileSystem.IsExistentFile(text))
  2204. {
  2205. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2206. }
  2207. }
  2208. }
  2209. if (maid.status.personal.uniqueName == "Majime")
  2210. {
  2211. string text = "h1_";
  2212. Random random = new Random();
  2213. int num4 = random.Next(10000);
  2214. bool flag7 = false;
  2215. for (int k = 0; k < h1Array.Length; k++)
  2216. {
  2217. if (h1Array[k] == num4)
  2218. {
  2219. flag7 = true;
  2220. break;
  2221. }
  2222. }
  2223. if (flag7)
  2224. {
  2225. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2226. if (GameUty.FileSystem.IsExistentFile(text))
  2227. {
  2228. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2229. }
  2230. }
  2231. }
  2232. if (maid.status.personal.uniqueName == "Rindere")
  2233. {
  2234. string text = "h2_";
  2235. Random random = new Random();
  2236. int num4 = random.Next(10000);
  2237. bool flag7 = false;
  2238. for (int k = 0; k < h2Array.Length; k++)
  2239. {
  2240. if (h2Array[k] == num4)
  2241. {
  2242. flag7 = true;
  2243. break;
  2244. }
  2245. }
  2246. if (flag7)
  2247. {
  2248. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2249. if (GameUty.FileSystem.IsExistentFile(text))
  2250. {
  2251. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2252. }
  2253. }
  2254. }
  2255. idoFlg[i] = true;
  2256. if (i >= 7)
  2257. {
  2258. idoFlg[i - 7] = true;
  2259. }
  2260. }
  2261. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2262. {
  2263. delCount[i] = 20;
  2264. if (goSlot[(int)selectList[i]] != null)
  2265. {
  2266. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2267. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2268. {
  2269. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2270. }
  2271. }
  2272. itemIndex[i]++;
  2273. if (itemIndex[i] == itemArray.Length - 1)
  2274. {
  2275. itemIndex[i] = 0;
  2276. }
  2277. string[] array = new string[2];
  2278. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2279. if (itemIndex[i] > 13)
  2280. {
  2281. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2282. }
  2283. maid.DelProp(MPN.handitem, true);
  2284. maid.DelProp(MPN.accvag, true);
  2285. maid.DelProp(MPN.accanl, true);
  2286. bool flag8 = false;
  2287. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2288. {
  2289. flag8 = true;
  2290. }
  2291. if (!flag8)
  2292. {
  2293. maid.DelProp(MPN.kousoku_upper, true);
  2294. maid.DelProp(MPN.kousoku_lower, true);
  2295. }
  2296. if (array[0] != "")
  2297. {
  2298. maid.SetProp(array[0], array[1], 0, true, false);
  2299. }
  2300. if (itemIndex[i] == 13)
  2301. {
  2302. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2303. maid.SetProp(array[0], array[1], 0, true, false);
  2304. }
  2305. if (itemIndex[i] == 23)
  2306. {
  2307. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2308. maid.SetProp(array[0], array[1], 0, true, false);
  2309. cafeFlg[i] = true;
  2310. }
  2311. maid.AllProcPropSeqStart();
  2312. idoFlg[i] = true;
  2313. if (i >= 7)
  2314. {
  2315. idoFlg[i - 7] = true;
  2316. }
  2317. mFlg = true;
  2318. }
  2319. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2320. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2321. {
  2322. for (int k = 0; k < 10; k++)
  2323. {
  2324. maid.transform.RotateAround(maid.transform.position,
  2325. Vector3.right,
  2326. -maid.transform.rotation.eulerAngles.x);
  2327. maid.transform.RotateAround(maid.transform.position,
  2328. Vector3.forward,
  2329. -maid.transform.rotation.eulerAngles.z);
  2330. }
  2331. idoFlg[i] = true;
  2332. atFlg = true;
  2333. if (i >= 7)
  2334. {
  2335. idoFlg[i - 7] = true;
  2336. }
  2337. }
  2338. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2339. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2340. {
  2341. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2342. idoFlg[i] = true;
  2343. if (i >= 7)
  2344. {
  2345. idoFlg[i - 7] = true;
  2346. }
  2347. }
  2348. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2349. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2350. {
  2351. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2352. idoFlg[i] = true;
  2353. if (i >= 7)
  2354. {
  2355. idoFlg[i - 7] = true;
  2356. }
  2357. }
  2358. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2359. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2360. {
  2361. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2362. idoFlg[i] = true;
  2363. if (i >= 7)
  2364. {
  2365. idoFlg[i - 7] = true;
  2366. }
  2367. }
  2368. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2369. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2370. {
  2371. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2372. idoFlg[i] = true;
  2373. if (i >= 7)
  2374. {
  2375. idoFlg[i - 7] = true;
  2376. }
  2377. }
  2378. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2379. {
  2380. Vector3 vector = maid.transform.position;
  2381. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2382. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2383. maid.SetPos(vector);
  2384. idoFlg[i] = true;
  2385. if (i >= 7)
  2386. {
  2387. idoFlg[i - 7] = true;
  2388. }
  2389. }
  2390. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2391. {
  2392. Vector3 vector = maid.transform.position;
  2393. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2394. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2395. maid.SetPos(vector);
  2396. idoFlg[i] = true;
  2397. if (i >= 7)
  2398. {
  2399. idoFlg[i - 7] = true;
  2400. }
  2401. }
  2402. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2403. {
  2404. Vector3 vector = maid.transform.position;
  2405. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2406. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2407. maid.SetPos(vector);
  2408. idoFlg[i] = true;
  2409. if (i >= 7)
  2410. {
  2411. idoFlg[i - 7] = true;
  2412. }
  2413. }
  2414. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2415. {
  2416. Vector3 vector = maid.transform.position;
  2417. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2418. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2419. maid.SetPos(vector);
  2420. idoFlg[i] = true;
  2421. if (i >= 7)
  2422. {
  2423. idoFlg[i - 7] = true;
  2424. }
  2425. }
  2426. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2427. {
  2428. Vector3 vector = maid.transform.position;
  2429. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2430. maid.SetPos(vector);
  2431. idoFlg[i] = true;
  2432. if (i >= 7)
  2433. {
  2434. idoFlg[i - 7] = true;
  2435. }
  2436. }
  2437. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2438. {
  2439. Vector3 vector = maid.transform.position;
  2440. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2441. maid.SetPos(vector);
  2442. idoFlg[i] = true;
  2443. if (i >= 7)
  2444. {
  2445. idoFlg[i - 7] = true;
  2446. }
  2447. }
  2448. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2449. {
  2450. Vector3 vector = maid.transform.position;
  2451. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2452. maid.SetPos(vector);
  2453. idoFlg[i] = true;
  2454. if (i >= 7)
  2455. {
  2456. idoFlg[i - 7] = true;
  2457. }
  2458. }
  2459. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2460. {
  2461. Vector3 vector = maid.transform.position;
  2462. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2463. maid.SetPos(vector);
  2464. idoFlg[i] = true;
  2465. if (i >= 7)
  2466. {
  2467. idoFlg[i - 7] = true;
  2468. }
  2469. }
  2470. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2471. {
  2472. Vector3 vector = maid.transform.position;
  2473. vector.y += 0.0075f * speed;
  2474. maid.SetPos(vector);
  2475. idoFlg[i] = true;
  2476. if (i >= 7)
  2477. {
  2478. idoFlg[i - 7] = true;
  2479. }
  2480. }
  2481. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2482. {
  2483. Vector3 vector = maid.transform.position;
  2484. vector.y -= 0.0075f * speed;
  2485. maid.SetPos(vector);
  2486. idoFlg[i] = true;
  2487. if (i >= 7)
  2488. {
  2489. idoFlg[i - 7] = true;
  2490. }
  2491. }
  2492. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2493. && getModKeyPressing(modKey.Shift))
  2494. {
  2495. faceIndex[i]--;
  2496. if (faceIndex[i] <= -1)
  2497. {
  2498. faceIndex[i] = faceArray.Length - 1;
  2499. }
  2500. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2501. idoFlg[i] = true;
  2502. if (i >= 7)
  2503. {
  2504. idoFlg[i - 7] = true;
  2505. }
  2506. }
  2507. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2508. {
  2509. faceIndex[i]++;
  2510. if (faceIndex[i] == faceArray.Length)
  2511. {
  2512. faceIndex[i] = 0;
  2513. }
  2514. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2515. idoFlg[i] = true;
  2516. if (i >= 7)
  2517. {
  2518. idoFlg[i - 7] = true;
  2519. }
  2520. }
  2521. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2522. {
  2523. faceBlendIndex[i]++;
  2524. if (faceBlendIndex[i] == faceBlendArray.Length)
  2525. {
  2526. faceBlendIndex[i] = 0;
  2527. }
  2528. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2529. idoFlg[i] = true;
  2530. if (i >= 7)
  2531. {
  2532. idoFlg[i - 7] = true;
  2533. }
  2534. }
  2535. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2536. {
  2537. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2538. isStop[i] = false;
  2539. poseCount[i] = 20;
  2540. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2541. {
  2542. maid.body0.MuneYureL(0f);
  2543. maid.body0.MuneYureR(0f);
  2544. }
  2545. else
  2546. {
  2547. maid.body0.MuneYureL(1f);
  2548. maid.body0.MuneYureR(1f);
  2549. maid.body0.jbMuneL.enabled = true;
  2550. maid.body0.jbMuneR.enabled = true;
  2551. }
  2552. if (array[0].Contains("MultipleMaidsPose"))
  2553. {
  2554. string path = array[0].Split(new char[] { '/' })[1];
  2555. byte[] array2 = new byte[0];
  2556. try
  2557. {
  2558. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2559. {
  2560. array2 = new byte[fileStream.Length];
  2561. fileStream.Read(array2, 0, array2.Length);
  2562. }
  2563. }
  2564. catch { }
  2565. if (0 < array2.Length)
  2566. {
  2567. string text = Path.GetFileName(path);
  2568. long num5 = text.GetHashCode();
  2569. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2570. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2571. {
  2572. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2573. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2574. };
  2575. for (int m = 0; m < array3.Length; m++)
  2576. {
  2577. maid.SetAutoTwist(array3[m], true);
  2578. }
  2579. }
  2580. }
  2581. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2582. {
  2583. loadPose[i] = array[0];
  2584. }
  2585. else if (!array[0].StartsWith("dance_"))
  2586. {
  2587. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2588. }
  2589. else
  2590. {
  2591. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2592. {
  2593. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2594. GameUty.FileSystem,
  2595. array[0] + ".anm",
  2596. false,
  2597. false);
  2598. }
  2599. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2600. }
  2601. if (array.Length > 1)
  2602. {
  2603. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2604. isStop[i] = true;
  2605. if (array.Length > 2)
  2606. {
  2607. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2608. isPoseIti[i] = true;
  2609. poseIti[i] = maidArray[i].transform.position;
  2610. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2611. }
  2612. }
  2613. isLock[i] = false;
  2614. idoFlg[i] = true;
  2615. mHandL[i].initFlg = false;
  2616. mHandR[i].initFlg = false;
  2617. mFootL[i].initFlg = false;
  2618. mFootR[i].initFlg = false;
  2619. pHandL[i] = 0;
  2620. pHandR[i] = 0;
  2621. muneIKL[i] = false;
  2622. muneIKR[i] = false;
  2623. if (!isVR)
  2624. {
  2625. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2626. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2627. }
  2628. if (i >= 7)
  2629. {
  2630. idoFlg[i - 7] = true;
  2631. }
  2632. }
  2633. else if (maid.body0.isLoadedBody)
  2634. {
  2635. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2636. {
  2637. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2638. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2639. }
  2640. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2641. {
  2642. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2643. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2644. }
  2645. if (!HandL1[i])
  2646. {
  2647. SetIKInit(i);
  2648. SetIK(maid, i);
  2649. ikBui = 5;
  2650. }
  2651. else
  2652. {
  2653. bool flag5 = false;
  2654. for (int k = 0; k < keyArray.Length; k++)
  2655. {
  2656. if (Input.GetKey(keyArray[k]))
  2657. {
  2658. flag5 = true;
  2659. break;
  2660. }
  2661. }
  2662. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2663. || Input.GetKey(KeyCode.Y))
  2664. {
  2665. flag5 = true;
  2666. }
  2667. if (!flag5)
  2668. {
  2669. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2670. && getModKeyPressing(modKey.Shift))
  2671. {
  2672. ikMode[i] = 15;
  2673. }
  2674. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2675. {
  2676. ikMode[i] = 5;
  2677. }
  2678. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2679. {
  2680. ikMode[i] = 6;
  2681. }
  2682. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2683. {
  2684. ikMode[i] = 7;
  2685. }
  2686. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2687. {
  2688. ikMode[i] = 11;
  2689. }
  2690. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2691. {
  2692. ikMode[i] = 12;
  2693. }
  2694. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2695. {
  2696. ikMode[i] = 14;
  2697. }
  2698. else if (getModKeyPressing(modKey.Shift))
  2699. {
  2700. ikMode[i] = 1;
  2701. }
  2702. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2703. {
  2704. ikMode[i] = 8;
  2705. }
  2706. else if (getModKeyPressing(modKey.Ctrl))
  2707. {
  2708. ikMode[i] = 2;
  2709. }
  2710. else if (getModKeyPressing(modKey.Alt))
  2711. {
  2712. ikMode[i] = 3;
  2713. }
  2714. else if (Input.GetKey(KeyCode.Space))
  2715. {
  2716. ikMode[i] = 4;
  2717. }
  2718. else if (Input.GetKey(KeyCode.X))
  2719. {
  2720. ikMode[i] = 9;
  2721. }
  2722. else if (Input.GetKey(KeyCode.Z))
  2723. {
  2724. ikMode[i] = 10;
  2725. }
  2726. else if (Input.GetKey(KeyCode.C))
  2727. {
  2728. ikMode[i] = 13;
  2729. }
  2730. else if (Input.GetKey(KeyCode.A))
  2731. {
  2732. ikMode[i] = 16;
  2733. }
  2734. else
  2735. {
  2736. ikMode[i] = 0;
  2737. }
  2738. if (!isIK[i])
  2739. {
  2740. if (ikMode[i] < 9)
  2741. {
  2742. ikMode[i] = 0;
  2743. }
  2744. }
  2745. bool flag9 = false;
  2746. bool flag10 = false;
  2747. bool flag11 = false;
  2748. bool flag12 = false;
  2749. if (gFinger[i, 0])
  2750. {
  2751. for (int j = 0; j < 15; j++)
  2752. {
  2753. if (mFinger[i, j].isStop)
  2754. {
  2755. flag9 = true;
  2756. }
  2757. }
  2758. for (int j = 15; j < 30; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag10 = true;
  2763. }
  2764. }
  2765. for (int j = 0; j < 6; j++)
  2766. {
  2767. if (mFinger2[i, j].isStop)
  2768. {
  2769. flag11 = true;
  2770. }
  2771. }
  2772. for (int j = 6; j < 12; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag12 = true;
  2777. }
  2778. }
  2779. }
  2780. if (gMaid[i] != null)
  2781. {
  2782. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2783. {
  2784. gMaid[i].SetActive(true);
  2785. if (isCube)
  2786. {
  2787. gMaidC[i].SetActive(true);
  2788. }
  2789. }
  2790. else
  2791. {
  2792. gMaid[i].SetActive(false);
  2793. gMaidC[i].SetActive(false);
  2794. }
  2795. }
  2796. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2797. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2798. {
  2799. ikBui = 1;
  2800. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2801. {
  2802. ikMaid = i;
  2803. }
  2804. if (ikMaid == i)
  2805. {
  2806. SetIK(maid, i);
  2807. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2808. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2809. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2810. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2811. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2812. }
  2813. if (Input.GetKeyDown(KeyCode.Q))
  2814. {
  2815. qFlg = true;
  2816. }
  2817. }
  2818. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2819. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2820. {
  2821. ikBui = 2;
  2822. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2823. {
  2824. ikMaid = i;
  2825. }
  2826. if (ikMaid == i)
  2827. {
  2828. SetIK(maid, i);
  2829. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2830. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2831. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2832. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2833. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2834. }
  2835. if (Input.GetKeyDown(KeyCode.W))
  2836. {
  2837. wFlg = true;
  2838. }
  2839. }
  2840. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2841. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2842. {
  2843. ikBui = 3;
  2844. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2845. {
  2846. ikMaid = i;
  2847. }
  2848. if (ikMaid == i)
  2849. {
  2850. SetIK(maid, i);
  2851. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2852. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2853. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2854. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2855. }
  2856. }
  2857. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2858. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2859. {
  2860. ikBui = 4;
  2861. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2862. {
  2863. ikMaid = i;
  2864. }
  2865. if (ikMaid == i)
  2866. {
  2867. SetIK(maid, i);
  2868. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2869. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2870. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2871. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2872. }
  2873. if (Input.GetKeyDown(KeyCode.S))
  2874. {
  2875. sFlg = true;
  2876. }
  2877. }
  2878. mHandR[i].isSelect = false;
  2879. mArmR[i].isSelect = false;
  2880. mHandL[i].isSelect = false;
  2881. mArmL[i].isSelect = false;
  2882. mFootR[i].isSelect = false;
  2883. mHizaR[i].isSelect = false;
  2884. mFootL[i].isSelect = false;
  2885. mHizaL[i].isSelect = false;
  2886. mClavicleL[i].isSelect = false;
  2887. mClavicleR[i].isSelect = false;
  2888. if (ikMode[i] == 16)
  2889. {
  2890. if (!gHead2[i])
  2891. {
  2892. SetIKInit6(i);
  2893. }
  2894. if (mHead2[i].isClick)
  2895. {
  2896. mHead2[i].isClick = false;
  2897. bGui = true;
  2898. isFaceInit = true;
  2899. // isGuiInit = true;
  2900. faceFlg = true;
  2901. poseFlg = false;
  2902. // sceneFlg = false;
  2903. kankyoFlg = false;
  2904. kankyo2Flg = false;
  2905. maid.boMabataki = false;
  2906. selectMaidIndex = mHead2[i].no;
  2907. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2908. }
  2909. if (mMaid2[i].isClick)
  2910. {
  2911. mMaid2[i].isClick = false;
  2912. bGui = true;
  2913. isPoseInit = true;
  2914. // isGuiInit = true;
  2915. poseFlg = true;
  2916. faceFlg = false;
  2917. // sceneFlg = false;
  2918. kankyoFlg = false;
  2919. kankyo2Flg = false;
  2920. selectMaidIndex = mMaid2[i].no;
  2921. copyIndex = 0;
  2922. }
  2923. gHead2[i].transform.position =
  2924. new Vector3(Head2[i].position.x,
  2925. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2926. Head2[i].position.z);
  2927. gHead2[i].transform.eulerAngles =
  2928. new Vector3(Head2[i].transform.eulerAngles.x,
  2929. Head2[i].transform.eulerAngles.y,
  2930. Head2[i].transform.eulerAngles.z + 90f);
  2931. mHead2[i].no = i;
  2932. mHead2[i].maid = maid;
  2933. mHead2[i].ido = 1;
  2934. gMaid2[i].transform.position =
  2935. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2936. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2937. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2938. gMaid2[i].transform.eulerAngles =
  2939. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2940. Spine0a2[i].transform.eulerAngles.y,
  2941. Spine0a2[i].transform.eulerAngles.z + 90f);
  2942. mMaid2[i].no = i;
  2943. mMaid2[i].maid = maid;
  2944. mMaid2[i].ido = 2;
  2945. gArmL[i].SetActive(false);
  2946. gFootL[i].SetActive(false);
  2947. gHizaL[i].SetActive(false);
  2948. gHandR[i].SetActive(false);
  2949. gArmR[i].SetActive(false);
  2950. gFootR[i].SetActive(false);
  2951. gHizaR[i].SetActive(false);
  2952. gClavicleL[i].SetActive(false);
  2953. gClavicleR[i].SetActive(false);
  2954. gNeck[i].SetActive(false);
  2955. gSpine[i].SetActive(false);
  2956. gSpine0a[i].SetActive(false);
  2957. gSpine1a[i].SetActive(false);
  2958. gSpine1[i].SetActive(false);
  2959. gPelvis[i].SetActive(false);
  2960. }
  2961. else if (ikMode[i] == 8)
  2962. {
  2963. if (ikModeOld[i] == 15 && gIKHandL[i])
  2964. {
  2965. mIKHandL[i].ido = 1;
  2966. mIKHandL[i].reset = true;
  2967. mIKHandR[i].ido = 1;
  2968. mIKHandR[i].reset = true;
  2969. }
  2970. else if (ikModeOld[i] == 3 && gHead[i])
  2971. {
  2972. mHead[i].ido = 7;
  2973. mHead[i].reset = true;
  2974. }
  2975. else
  2976. {
  2977. if (!gIKHandL[i])
  2978. {
  2979. SetIKInit5(i);
  2980. }
  2981. gIKHandL[i].transform.position = IKHandL[i].position;
  2982. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2983. mIKHandL[i].maid = maid;
  2984. mIKHandL[i].HandL = IKHandL[i];
  2985. mIKHandL[i].ido = 1;
  2986. gIKHandR[i].transform.position = IKHandR[i].position;
  2987. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2988. mIKHandR[i].maid = maid;
  2989. mIKHandR[i].HandL = IKHandR[i];
  2990. mIKHandR[i].ido = 1;
  2991. if (!gIKMuneL[i])
  2992. {
  2993. SetIKInit7(i);
  2994. }
  2995. if (!gHead[i])
  2996. {
  2997. SetIKInit4(i);
  2998. }
  2999. mIKMuneL[i].maid = maid;
  3000. mIKMuneL[i].HandL = IKMuneLSub[i];
  3001. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3002. mIKMuneL[i].ForearmL = IKMuneL[i];
  3003. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3004. mIKMuneR[i].maid = maid;
  3005. mIKMuneR[i].HandL = IKMuneRSub[i];
  3006. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3007. mIKMuneR[i].ForearmL = IKMuneR[i];
  3008. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3009. gHead[i].transform.position =
  3010. new Vector3(Head2[i].position.x,
  3011. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3012. Head2[i].position.z);
  3013. gHead[i].transform.eulerAngles =
  3014. new Vector3(Head2[i].transform.eulerAngles.x,
  3015. Head2[i].transform.eulerAngles.y,
  3016. Head2[i].transform.eulerAngles.z + 90f);
  3017. mHead[i].head = Head1[i];
  3018. mHead[i].maid = maid;
  3019. mHead[i].ido = 7;
  3020. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3021. gHead[i].SetActive(true);
  3022. if (mHead[i].isClick)
  3023. {
  3024. mHead[i].isClick = false;
  3025. mHead[i].isClick2 = false;
  3026. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3027. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3028. }
  3029. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3030. {
  3031. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3032. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3033. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3034. IKMuneLSub[i].localEulerAngles.y,
  3035. IKMuneLSub[i].localEulerAngles.z);
  3036. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3037. IKMuneL[i].localEulerAngles.y,
  3038. IKMuneL[i].localEulerAngles.z);
  3039. muneIKL[i] = true;
  3040. isStop[i] = true;
  3041. isLock[i] = true;
  3042. mIKMuneL[i].isMouseDrag = false;
  3043. }
  3044. if (mIKMuneL[i].isMouseDown)
  3045. {
  3046. maid.body0.MuneYureL(0f);
  3047. maid.body0.MuneYureR(0f);
  3048. maid.body0.jbMuneL.enabled = false;
  3049. maid.body0.jbMuneR.enabled = false;
  3050. muneIKL[i] = false;
  3051. mIKMuneL[i].isMouseUp = false;
  3052. }
  3053. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3054. {
  3055. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3056. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3057. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3058. IKMuneRSub[i].localEulerAngles.y,
  3059. IKMuneRSub[i].localEulerAngles.z);
  3060. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3061. IKMuneR[i].localEulerAngles.y,
  3062. IKMuneR[i].localEulerAngles.z);
  3063. muneIKR[i] = true;
  3064. isStop[i] = true;
  3065. isLock[i] = true;
  3066. mIKMuneR[i].isMouseDrag = false;
  3067. }
  3068. if (mIKMuneR[i].isMouseDown)
  3069. {
  3070. maid.body0.MuneYureL(0f);
  3071. maid.body0.MuneYureR(0f);
  3072. maid.body0.jbMuneL.enabled = false;
  3073. maid.body0.jbMuneR.enabled = false;
  3074. muneIKR[i] = false;
  3075. mIKMuneL[i].isMouseUp = false;
  3076. }
  3077. if (mHead[i].isStop)
  3078. {
  3079. isStop[i] = true;
  3080. isLock[i] = true;
  3081. mHead[i].isStop = false;
  3082. }
  3083. gJotai[i].SetActive(false);
  3084. gKahuku[i].SetActive(false);
  3085. gHandL[i].SetActive(false);
  3086. gArmL[i].SetActive(false);
  3087. gFootL[i].SetActive(false);
  3088. gHizaL[i].SetActive(false);
  3089. gHandR[i].SetActive(false);
  3090. gArmR[i].SetActive(false);
  3091. gFootR[i].SetActive(false);
  3092. gHizaR[i].SetActive(false);
  3093. gClavicleL[i].SetActive(false);
  3094. gClavicleR[i].SetActive(false);
  3095. gNeck[i].SetActive(false);
  3096. gSpine[i].SetActive(false);
  3097. gSpine0a[i].SetActive(false);
  3098. gSpine1a[i].SetActive(false);
  3099. gSpine1[i].SetActive(false);
  3100. gPelvis[i].SetActive(false);
  3101. }
  3102. }
  3103. else if (ikMode[i] == 15)
  3104. {
  3105. if (ikModeOld[i] == 8 && gIKHandL[i])
  3106. {
  3107. mIKHandL[i].ido = 2;
  3108. mIKHandL[i].reset = true;
  3109. mIKHandR[i].ido = 2;
  3110. mIKHandR[i].reset = true;
  3111. }
  3112. else
  3113. {
  3114. if (!gIKHandL[i])
  3115. {
  3116. SetIKInit5(i);
  3117. }
  3118. gIKHandL[i].transform.position = IKHandL[i].position;
  3119. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3120. mIKHandL[i].maid = maid;
  3121. mIKHandL[i].HandL = IKHandL[i];
  3122. mIKHandL[i].ido = 2;
  3123. gIKHandR[i].transform.position = IKHandR[i].position;
  3124. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3125. mIKHandR[i].maid = maid;
  3126. mIKHandR[i].HandL = IKHandR[i];
  3127. mIKHandR[i].ido = 2;
  3128. Destroy(gHead[i]);
  3129. Destroy(gJotai[i]);
  3130. Destroy(gKahuku[i]);
  3131. gHandL[i].SetActive(false);
  3132. gArmL[i].SetActive(false);
  3133. gFootL[i].SetActive(false);
  3134. gHizaL[i].SetActive(false);
  3135. gHandR[i].SetActive(false);
  3136. gArmR[i].SetActive(false);
  3137. gFootR[i].SetActive(false);
  3138. gHizaR[i].SetActive(false);
  3139. gClavicleL[i].SetActive(false);
  3140. gClavicleR[i].SetActive(false);
  3141. gNeck[i].SetActive(false);
  3142. gSpine[i].SetActive(false);
  3143. gSpine0a[i].SetActive(false);
  3144. gSpine1a[i].SetActive(false);
  3145. gSpine1[i].SetActive(false);
  3146. gPelvis[i].SetActive(false);
  3147. }
  3148. }
  3149. else if (ikMode[i] == 1)
  3150. {
  3151. mHandL[i].ido = 10;
  3152. mHandR[i].ido = 10;
  3153. mFootL[i].ido = 10;
  3154. mFootR[i].ido = 10;
  3155. if (ikModeOld[i] == 0 && gNeck[i])
  3156. {
  3157. if (isBone[i])
  3158. {
  3159. mNeck[i].ido = 4;
  3160. mNeck[i].reset = true;
  3161. mSpine[i].ido = 4;
  3162. mSpine[i].reset = true;
  3163. mSpine0a[i].ido = 4;
  3164. mSpine0a[i].reset = true;
  3165. mSpine1a[i].ido = 4;
  3166. mSpine1a[i].reset = true;
  3167. mSpine1[i].ido = 4;
  3168. mSpine1[i].reset = true;
  3169. mPelvis[i].ido = 4;
  3170. mPelvis[i].reset = true;
  3171. mHizaL[i].ido = 5;
  3172. mHizaL[i].reset = true;
  3173. mHizaR[i].ido = 5;
  3174. mHizaR[i].reset = true;
  3175. }
  3176. }
  3177. else
  3178. {
  3179. gArmL[i].SetActive(false);
  3180. gArmR[i].SetActive(false);
  3181. if (!isBone[i])
  3182. {
  3183. gHizaL[i].SetActive(false);
  3184. gHizaR[i].SetActive(false);
  3185. }
  3186. gClavicleL[i].SetActive(false);
  3187. gClavicleR[i].SetActive(false);
  3188. if (isBone[i])
  3189. {
  3190. mNeck[i].maid = maid;
  3191. mNeck[i].head = Neck[i];
  3192. mNeck[i].no = i;
  3193. mNeck[i].ido = 4;
  3194. gNeck[i].transform.position = Neck[i].position;
  3195. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3196. if (mNeck[i].isHead)
  3197. {
  3198. mNeck[i].isHead = false;
  3199. isLookn[i] = isLook[i];
  3200. isLook[i] = !isLook[i];
  3201. }
  3202. mSpine[i].maid = maid;
  3203. mSpine[i].head = Spine2[i];
  3204. mSpine[i].no = i;
  3205. mSpine[i].ido = 4;
  3206. gSpine[i].transform.position = Spine2[i].position;
  3207. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3208. mSpine0a[i].maid = maid;
  3209. mSpine0a[i].head = Spine0a2[i];
  3210. mSpine0a[i].no = i;
  3211. mSpine0a[i].ido = 4;
  3212. gSpine0a[i].transform.position = Spine0a2[i].position;
  3213. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3214. mSpine1a[i].maid = maid;
  3215. mSpine1a[i].head = Spine1a2[i];
  3216. mSpine1a[i].no = i;
  3217. mSpine1a[i].ido = 4;
  3218. gSpine1a[i].transform.position = Spine1a2[i].position;
  3219. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3220. mSpine1[i].maid = maid;
  3221. mSpine1[i].head = Spine12[i];
  3222. mSpine1[i].no = i;
  3223. mSpine1[i].ido = 4;
  3224. gSpine1[i].transform.position = Spine12[i].position;
  3225. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3226. mPelvis[i].maid = maid;
  3227. mPelvis[i].head = Pelvis2[i];
  3228. mPelvis[i].no = i;
  3229. mPelvis[i].ido = 8;
  3230. gPelvis[i].transform.position = Pelvis2[i].position;
  3231. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3232. mHizaL[i].ido = 5;
  3233. mHizaR[i].ido = 5;
  3234. }
  3235. }
  3236. }
  3237. else if (ikMode[i] == 2)
  3238. {
  3239. if (ikModeOld[i] == 0 && gPelvis[i])
  3240. {
  3241. mPelvis[i].ido = 9;
  3242. mPelvis[i].reset = true;
  3243. }
  3244. else
  3245. {
  3246. gArmL[i].SetActive(false);
  3247. gHizaL[i].SetActive(false);
  3248. gArmR[i].SetActive(false);
  3249. gHizaR[i].SetActive(false);
  3250. gClavicleL[i].SetActive(false);
  3251. gClavicleR[i].SetActive(false);
  3252. gNeck[i].SetActive(false);
  3253. gSpine[i].SetActive(false);
  3254. gSpine0a[i].SetActive(false);
  3255. gSpine1a[i].SetActive(false);
  3256. gSpine1[i].SetActive(false);
  3257. mPelvis[i].maid = maid;
  3258. mPelvis[i].head = Pelvis2[i];
  3259. mPelvis[i].no = i;
  3260. mPelvis[i].ido = 9;
  3261. gPelvis[i].transform.position = Pelvis2[i].position;
  3262. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3263. }
  3264. }
  3265. else if (ikMode[i] == 3)
  3266. {
  3267. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3268. {
  3269. mHead[i].ido = 1;
  3270. mHead[i].reset = true;
  3271. mJotai[i].ido = 2;
  3272. mJotai[i].reset = true;
  3273. mKahuku[i].ido = 3;
  3274. mKahuku[i].reset = true;
  3275. mHandL[i].ido = 1;
  3276. mHandR[i].ido = 1;
  3277. mFootL[i].ido = 3;
  3278. mFootR[i].ido = 3;
  3279. mHizaL[i].ido = 5;
  3280. mHizaR[i].ido = 5;
  3281. mHandL[i].reset = true;
  3282. mHandR[i].reset = true;
  3283. mFootL[i].reset = true;
  3284. mFootR[i].reset = true;
  3285. mHizaL[i].reset = true;
  3286. mHizaR[i].reset = true;
  3287. }
  3288. else if (ikModeOld[i] == 0)
  3289. {
  3290. mHandL[i].ido = 1;
  3291. mHandR[i].ido = 1;
  3292. mFootL[i].ido = 3;
  3293. mFootR[i].ido = 3;
  3294. mHizaL[i].ido = 5;
  3295. mHizaR[i].ido = 5;
  3296. mHandL[i].reset = true;
  3297. mHandR[i].reset = true;
  3298. mFootL[i].reset = true;
  3299. mFootR[i].reset = true;
  3300. mHizaL[i].reset = true;
  3301. mHizaR[i].reset = true;
  3302. }
  3303. else
  3304. {
  3305. if (!gHead[i])
  3306. {
  3307. SetIKInit4(i);
  3308. }
  3309. if (mHead[i].isHead)
  3310. {
  3311. mHead[i].isHead = false;
  3312. isLookn[i] = isLook[i];
  3313. isLook[i] = !isLook[i];
  3314. }
  3315. gHead[i].transform.position =
  3316. new Vector3(Head2[i].position.x,
  3317. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3318. Head2[i].position.z);
  3319. gHead[i].transform.eulerAngles =
  3320. new Vector3(Head2[i].transform.eulerAngles.x,
  3321. Head2[i].transform.eulerAngles.y,
  3322. Head2[i].transform.eulerAngles.z + 90f);
  3323. mHead[i].head = Head1[i];
  3324. mHead[i].maid = maid;
  3325. mHead[i].no = i;
  3326. mHead[i].ido = 1;
  3327. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3328. Transform transform3 =
  3329. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3330. Transform transform4 =
  3331. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3332. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3333. Transform transform6 =
  3334. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3335. gJotai[i].transform.position =
  3336. new Vector3(transform3.position.x,
  3337. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3338. transform3.position.z);
  3339. gJotai[i].transform.eulerAngles =
  3340. new Vector3(transform3.transform.eulerAngles.x,
  3341. transform3.transform.eulerAngles.y,
  3342. transform3.transform.eulerAngles.z + 90f);
  3343. mJotai[i].Spine0a = spine0a;
  3344. mJotai[i].Spine1 = transform3;
  3345. mJotai[i].Spine1a = transform4;
  3346. mJotai[i].Spine = transform5;
  3347. mJotai[i].maid = maid;
  3348. mJotai[i].ido = 2;
  3349. gKahuku[i].transform.position =
  3350. new Vector3(transform6.position.x,
  3351. (transform6.position.y + transform5.position.y) / 2f,
  3352. transform6.position.z);
  3353. gKahuku[i].transform.eulerAngles =
  3354. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3355. transform6.transform.eulerAngles.y + 90f,
  3356. transform6.transform.eulerAngles.z);
  3357. mKahuku[i].Pelvis = transform6;
  3358. mKahuku[i].maid = maid;
  3359. mKahuku[i].ido = 3;
  3360. mHandL[i].ido = 1;
  3361. mHandR[i].ido = 1;
  3362. mFootL[i].ido = 3;
  3363. mFootR[i].ido = 3;
  3364. mHizaL[i].ido = 5;
  3365. mHizaR[i].ido = 5;
  3366. gJotai[i].SetActive(true);
  3367. gKahuku[i].SetActive(true);
  3368. gHandL[i].SetActive(true);
  3369. gArmL[i].SetActive(false);
  3370. gFootL[i].SetActive(true);
  3371. gHizaL[i].SetActive(true);
  3372. gHandR[i].SetActive(true);
  3373. gArmR[i].SetActive(false);
  3374. gFootR[i].SetActive(true);
  3375. gHizaR[i].SetActive(true);
  3376. Destroy(gIKHandL[i]);
  3377. Destroy(gIKHandR[i]);
  3378. Destroy(gIKMuneL[i]);
  3379. Destroy(gIKMuneR[i]);
  3380. if (isBone[i])
  3381. {
  3382. gHizaL[i].SetActive(false);
  3383. gHizaR[i].SetActive(false);
  3384. gHead[i].SetActive(false);
  3385. gJotai[i].SetActive(false);
  3386. gKahuku[i].SetActive(false);
  3387. }
  3388. else
  3389. {
  3390. gHizaL[i].SetActive(true);
  3391. gHizaR[i].SetActive(true);
  3392. gHead[i].SetActive(true);
  3393. gJotai[i].SetActive(true);
  3394. gKahuku[i].SetActive(true);
  3395. }
  3396. gClavicleL[i].SetActive(false);
  3397. gClavicleR[i].SetActive(false);
  3398. gNeck[i].SetActive(false);
  3399. gSpine[i].SetActive(false);
  3400. gSpine0a[i].SetActive(false);
  3401. gSpine1a[i].SetActive(false);
  3402. gSpine1[i].SetActive(false);
  3403. gPelvis[i].SetActive(false);
  3404. if (mHead[i].isStop)
  3405. {
  3406. isStop[i] = true;
  3407. isLock[i] = true;
  3408. mHead[i].isStop = false;
  3409. }
  3410. if (mJotai[i].isStop)
  3411. {
  3412. isStop[i] = true;
  3413. isLock[i] = true;
  3414. mJotai[i].isStop = false;
  3415. }
  3416. if (mKahuku[i].isStop)
  3417. {
  3418. isStop[i] = true;
  3419. isLock[i] = true;
  3420. mKahuku[i].isStop = false;
  3421. }
  3422. if (mKahuku[i].isSelect)
  3423. {
  3424. mKahuku[i].isSelect = false;
  3425. if (ikMaid != i)
  3426. {
  3427. ikMaid = i;
  3428. ikBui = 5;
  3429. SetIK(maid, i);
  3430. }
  3431. }
  3432. if (mJotai[i].isSelect)
  3433. {
  3434. mJotai[i].isSelect = false;
  3435. if (ikMaid != i)
  3436. {
  3437. ikMaid = i;
  3438. ikBui = 5;
  3439. SetIK(maid, i);
  3440. }
  3441. }
  3442. if (mKahuku[i].isSelect)
  3443. {
  3444. mKahuku[i].isSelect = false;
  3445. if (ikMaid != i)
  3446. {
  3447. ikMaid = i;
  3448. ikBui = 5;
  3449. SetIK(maid, i);
  3450. }
  3451. }
  3452. }
  3453. }
  3454. else if (ikMode[i] == 5)
  3455. {
  3456. if (ikModeOld[i] == 3 && gHead[i])
  3457. {
  3458. mHead[i].ido = 4;
  3459. mHead[i].reset = true;
  3460. mJotai[i].ido = 5;
  3461. mJotai[i].reset = true;
  3462. mKahuku[i].ido = 6;
  3463. mKahuku[i].reset = true;
  3464. mHandL[i].ido = 2;
  3465. mHandR[i].ido = 2;
  3466. mFootL[i].ido = 4;
  3467. mFootR[i].ido = 4;
  3468. mHizaL[i].ido = 5;
  3469. mHizaR[i].ido = 5;
  3470. mHandL[i].reset = true;
  3471. mHandR[i].reset = true;
  3472. mFootL[i].reset = true;
  3473. mFootR[i].reset = true;
  3474. mHizaL[i].reset = true;
  3475. mHizaR[i].reset = true;
  3476. }
  3477. else if (ikModeOld[i] == 0)
  3478. {
  3479. mHandL[i].ido = 2;
  3480. mHandR[i].ido = 2;
  3481. mFootL[i].ido = 4;
  3482. mFootR[i].ido = 4;
  3483. mHizaL[i].ido = 5;
  3484. mHizaR[i].ido = 5;
  3485. mHandL[i].reset = true;
  3486. mHandR[i].reset = true;
  3487. mFootL[i].reset = true;
  3488. mFootR[i].reset = true;
  3489. mHizaL[i].reset = true;
  3490. mHizaR[i].reset = true;
  3491. }
  3492. else
  3493. {
  3494. if (!gHead[i])
  3495. {
  3496. SetIKInit4(i);
  3497. }
  3498. if (mHead[i].isHead)
  3499. {
  3500. mHead[i].isHead = false;
  3501. isLookn[i] = isLook[i];
  3502. isLook[i] = !isLook[i];
  3503. }
  3504. gHead[i].transform.position =
  3505. new Vector3(Head2[i].position.x,
  3506. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3507. Head2[i].position.z);
  3508. gHead[i].transform.eulerAngles =
  3509. new Vector3(Head2[i].transform.eulerAngles.x,
  3510. Head2[i].transform.eulerAngles.y,
  3511. Head2[i].transform.eulerAngles.z + 90f);
  3512. mHead[i].head = Head1[i];
  3513. mHead[i].maid = maid;
  3514. mHead[i].ido = 4;
  3515. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3516. Transform transform3 =
  3517. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3518. Transform transform4 =
  3519. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3520. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3521. Transform transform6 =
  3522. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3523. gJotai[i].transform.position =
  3524. new Vector3(transform3.position.x,
  3525. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3526. transform3.position.z);
  3527. gJotai[i].transform.eulerAngles =
  3528. new Vector3(transform3.transform.eulerAngles.x,
  3529. transform3.transform.eulerAngles.y,
  3530. transform3.transform.eulerAngles.z + 90f);
  3531. mJotai[i].Spine0a = spine0a;
  3532. mJotai[i].Spine1 = transform3;
  3533. mJotai[i].Spine1a = transform4;
  3534. mJotai[i].Spine = transform5;
  3535. mJotai[i].maid = maid;
  3536. mJotai[i].ido = 5;
  3537. gKahuku[i].transform.position =
  3538. new Vector3(transform6.position.x,
  3539. (transform6.position.y + transform5.position.y) / 2f,
  3540. transform6.position.z);
  3541. gKahuku[i].transform.eulerAngles =
  3542. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3543. transform6.transform.eulerAngles.y + 90f,
  3544. transform6.transform.eulerAngles.z);
  3545. mKahuku[i].Pelvis = transform6;
  3546. mKahuku[i].maid = maid;
  3547. mKahuku[i].ido = 6;
  3548. mHandL[i].ido = 2;
  3549. mHandR[i].ido = 2;
  3550. mFootL[i].ido = 4;
  3551. mFootR[i].ido = 4;
  3552. mHizaL[i].ido = 5;
  3553. mHizaR[i].ido = 5;
  3554. gArmL[i].SetActive(false);
  3555. gArmR[i].SetActive(false);
  3556. gClavicleL[i].SetActive(false);
  3557. gClavicleR[i].SetActive(false);
  3558. gNeck[i].SetActive(false);
  3559. gSpine[i].SetActive(false);
  3560. gSpine0a[i].SetActive(false);
  3561. gSpine1a[i].SetActive(false);
  3562. gSpine1[i].SetActive(false);
  3563. gPelvis[i].SetActive(false);
  3564. if (isBone[i])
  3565. {
  3566. gHizaL[i].SetActive(false);
  3567. gHizaR[i].SetActive(false);
  3568. gHead[i].SetActive(false);
  3569. gJotai[i].SetActive(false);
  3570. gKahuku[i].SetActive(false);
  3571. }
  3572. else
  3573. {
  3574. gHizaL[i].SetActive(true);
  3575. gHizaR[i].SetActive(true);
  3576. gHead[i].SetActive(true);
  3577. gJotai[i].SetActive(true);
  3578. gKahuku[i].SetActive(true);
  3579. }
  3580. if (mHead[i].isStop)
  3581. {
  3582. isStop[i] = true;
  3583. isLock[i] = true;
  3584. mHead[i].isStop = false;
  3585. }
  3586. if (mJotai[i].isStop)
  3587. {
  3588. isStop[i] = true;
  3589. isLock[i] = true;
  3590. mJotai[i].isStop = false;
  3591. }
  3592. if (mKahuku[i].isStop)
  3593. {
  3594. isStop[i] = true;
  3595. isLock[i] = true;
  3596. mKahuku[i].isStop = false;
  3597. }
  3598. if (mHead[i].isSelect)
  3599. {
  3600. mHead[i].isSelect = false;
  3601. if (ikMaid != i)
  3602. {
  3603. ikMaid = i;
  3604. ikBui = 5;
  3605. SetIK(maid, i);
  3606. }
  3607. }
  3608. if (mJotai[i].isSelect)
  3609. {
  3610. mJotai[i].isSelect = false;
  3611. if (ikMaid != i)
  3612. {
  3613. ikMaid = i;
  3614. ikBui = 5;
  3615. SetIK(maid, i);
  3616. }
  3617. }
  3618. if (mKahuku[i].isSelect)
  3619. {
  3620. mKahuku[i].isSelect = false;
  3621. if (ikMaid != i)
  3622. {
  3623. ikMaid = i;
  3624. ikBui = 5;
  3625. SetIK(maid, i);
  3626. }
  3627. }
  3628. }
  3629. }
  3630. else if (ikMode[i] == 13)
  3631. {
  3632. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3633. {
  3634. mMaid[i].ido = 5;
  3635. mMaid[i].reset = true;
  3636. mMaidC[i].ido = 5;
  3637. mMaidC[i].reset = true;
  3638. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3639. }
  3640. else
  3641. {
  3642. if (!gMaid[i])
  3643. {
  3644. SetIKInit3(i);
  3645. }
  3646. gMaid[i].transform.position =
  3647. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3648. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3649. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3650. gMaid[i].transform.eulerAngles =
  3651. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3652. Spine0a2[i].transform.eulerAngles.y,
  3653. Spine0a2[i].transform.eulerAngles.z + 90f);
  3654. mMaid[i].maid = maid;
  3655. mMaid[i].ido = 5;
  3656. gMaidC[i].transform.position = maid.transform.position;
  3657. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3658. mMaidC[i].maid = maid;
  3659. mMaidC[i].ido = 5;
  3660. if (isCube)
  3661. {
  3662. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3663. gMaidC[i].SetActive(true);
  3664. }
  3665. else
  3666. {
  3667. gMaidC[i].SetActive(false);
  3668. }
  3669. gHandL[i].SetActive(false);
  3670. gArmL[i].SetActive(false);
  3671. gFootL[i].SetActive(false);
  3672. gHizaL[i].SetActive(false);
  3673. gHandR[i].SetActive(false);
  3674. gArmR[i].SetActive(false);
  3675. gFootR[i].SetActive(false);
  3676. gHizaR[i].SetActive(false);
  3677. gClavicleL[i].SetActive(false);
  3678. gClavicleR[i].SetActive(false);
  3679. gNeck[i].SetActive(false);
  3680. gSpine[i].SetActive(false);
  3681. gSpine0a[i].SetActive(false);
  3682. gSpine1a[i].SetActive(false);
  3683. gSpine1[i].SetActive(false);
  3684. gPelvis[i].SetActive(false);
  3685. }
  3686. if (mMaid[i].isSelect)
  3687. {
  3688. mMaid[i].isSelect = false;
  3689. if (ikMaid != i)
  3690. {
  3691. ikMaid = i;
  3692. ikBui = 5;
  3693. SetIK(maid, i);
  3694. }
  3695. }
  3696. }
  3697. else if (ikMode[i] == 11)
  3698. {
  3699. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3700. {
  3701. mMaid[i].ido = 3;
  3702. mMaid[i].reset = true;
  3703. mMaidC[i].ido = 3;
  3704. mMaidC[i].reset = true;
  3705. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3706. }
  3707. else
  3708. {
  3709. if (!gMaid[i])
  3710. {
  3711. SetIKInit3(i);
  3712. }
  3713. gMaid[i].transform.position =
  3714. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3715. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3716. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3717. gMaid[i].transform.eulerAngles =
  3718. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3719. Spine0a2[i].transform.eulerAngles.y,
  3720. Spine0a2[i].transform.eulerAngles.z + 90f);
  3721. mMaid[i].maid = maid;
  3722. mMaid[i].ido = 3;
  3723. gMaidC[i].transform.position = maid.transform.position;
  3724. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3725. mMaidC[i].maid = maid;
  3726. mMaidC[i].ido = 3;
  3727. if (isCube)
  3728. {
  3729. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3730. gMaidC[i].SetActive(true);
  3731. }
  3732. else
  3733. {
  3734. gMaidC[i].SetActive(false);
  3735. }
  3736. gHandL[i].SetActive(false);
  3737. gArmL[i].SetActive(false);
  3738. gFootL[i].SetActive(false);
  3739. gHizaL[i].SetActive(false);
  3740. gHandR[i].SetActive(false);
  3741. gArmR[i].SetActive(false);
  3742. gFootR[i].SetActive(false);
  3743. gHizaR[i].SetActive(false);
  3744. gClavicleL[i].SetActive(false);
  3745. gClavicleR[i].SetActive(false);
  3746. gNeck[i].SetActive(false);
  3747. gSpine[i].SetActive(false);
  3748. gSpine0a[i].SetActive(false);
  3749. gSpine1a[i].SetActive(false);
  3750. gSpine1[i].SetActive(false);
  3751. gPelvis[i].SetActive(false);
  3752. }
  3753. if (mMaid[i].isSelect)
  3754. {
  3755. mMaid[i].isSelect = false;
  3756. if (ikMaid != i)
  3757. {
  3758. ikMaid = i;
  3759. ikBui = 5;
  3760. SetIK(maid, i);
  3761. }
  3762. }
  3763. }
  3764. else if (ikMode[i] == 12)
  3765. {
  3766. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3767. {
  3768. mMaid[i].ido = 2;
  3769. mMaid[i].reset = true;
  3770. mMaidC[i].ido = 2;
  3771. mMaidC[i].reset = true;
  3772. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3773. }
  3774. else
  3775. {
  3776. if (!gMaid[i])
  3777. {
  3778. SetIKInit3(i);
  3779. }
  3780. gMaid[i].transform.position =
  3781. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3782. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3783. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3784. gMaid[i].transform.eulerAngles =
  3785. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3786. Spine0a2[i].transform.eulerAngles.y,
  3787. Spine0a2[i].transform.eulerAngles.z + 90f);
  3788. mMaid[i].maid = maid;
  3789. mMaid[i].ido = 2;
  3790. gMaidC[i].transform.position = maid.transform.position;
  3791. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3792. mMaidC[i].maid = maid;
  3793. mMaidC[i].ido = 2;
  3794. if (isCube)
  3795. {
  3796. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3797. gMaidC[i].SetActive(true);
  3798. }
  3799. else
  3800. {
  3801. gMaidC[i].SetActive(false);
  3802. }
  3803. gHandL[i].SetActive(false);
  3804. gArmL[i].SetActive(false);
  3805. gFootL[i].SetActive(false);
  3806. gHizaL[i].SetActive(false);
  3807. gHandR[i].SetActive(false);
  3808. gArmR[i].SetActive(false);
  3809. gFootR[i].SetActive(false);
  3810. gHizaR[i].SetActive(false);
  3811. gClavicleL[i].SetActive(false);
  3812. gClavicleR[i].SetActive(false);
  3813. gNeck[i].SetActive(false);
  3814. gSpine[i].SetActive(false);
  3815. gSpine0a[i].SetActive(false);
  3816. gSpine1a[i].SetActive(false);
  3817. gSpine1[i].SetActive(false);
  3818. gPelvis[i].SetActive(false);
  3819. }
  3820. if (mMaid[i].isSelect)
  3821. {
  3822. mMaid[i].isSelect = false;
  3823. if (ikMaid != i)
  3824. {
  3825. ikMaid = i;
  3826. ikBui = 5;
  3827. SetIK(maid, i);
  3828. }
  3829. }
  3830. }
  3831. else if (ikMode[i] == 10)
  3832. {
  3833. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3834. {
  3835. mMaid[i].ido = 1;
  3836. mMaid[i].reset = true;
  3837. mMaidC[i].ido = 1;
  3838. mMaidC[i].reset = true;
  3839. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3840. }
  3841. else
  3842. {
  3843. if (!gMaid[i])
  3844. {
  3845. SetIKInit3(i);
  3846. }
  3847. gMaid[i].transform.position =
  3848. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3849. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3850. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3851. gMaid[i].transform.eulerAngles =
  3852. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3853. Spine0a2[i].transform.eulerAngles.y,
  3854. Spine0a2[i].transform.eulerAngles.z + 90f);
  3855. mMaid[i].maid = maid;
  3856. mMaid[i].ido = 1;
  3857. gMaidC[i].transform.position = maid.transform.position;
  3858. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3859. mMaidC[i].maid = maid;
  3860. mMaidC[i].ido = 1;
  3861. if (isCube)
  3862. {
  3863. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3864. gMaidC[i].SetActive(true);
  3865. }
  3866. else
  3867. {
  3868. gMaidC[i].SetActive(false);
  3869. }
  3870. gHandL[i].SetActive(false);
  3871. gArmL[i].SetActive(false);
  3872. gFootL[i].SetActive(false);
  3873. gHizaL[i].SetActive(false);
  3874. gHandR[i].SetActive(false);
  3875. gArmR[i].SetActive(false);
  3876. gFootR[i].SetActive(false);
  3877. gHizaR[i].SetActive(false);
  3878. gClavicleL[i].SetActive(false);
  3879. gClavicleR[i].SetActive(false);
  3880. gNeck[i].SetActive(false);
  3881. gSpine[i].SetActive(false);
  3882. gSpine0a[i].SetActive(false);
  3883. gSpine1a[i].SetActive(false);
  3884. gSpine1[i].SetActive(false);
  3885. gPelvis[i].SetActive(false);
  3886. }
  3887. if (mMaid[i].isSelect)
  3888. {
  3889. mMaid[i].isSelect = false;
  3890. if (ikMaid != i)
  3891. {
  3892. ikMaid = i;
  3893. ikBui = 5;
  3894. SetIK(maid, i);
  3895. }
  3896. }
  3897. }
  3898. else if (ikMode[i] == 9)
  3899. {
  3900. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3901. {
  3902. mMaid[i].ido = 4;
  3903. mMaid[i].reset = true;
  3904. mMaidC[i].ido = 4;
  3905. mMaidC[i].reset = true;
  3906. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3907. }
  3908. else
  3909. {
  3910. if (!gMaid[i])
  3911. {
  3912. SetIKInit3(i);
  3913. }
  3914. gMaid[i].transform.position =
  3915. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3916. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3917. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3918. gMaid[i].transform.eulerAngles =
  3919. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3920. Spine0a2[i].transform.eulerAngles.y,
  3921. Spine0a2[i].transform.eulerAngles.z + 90f);
  3922. mMaid[i].maid = maid;
  3923. mMaid[i].ido = 4;
  3924. gMaidC[i].transform.position = maid.transform.position;
  3925. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3926. mMaidC[i].maid = maid;
  3927. mMaidC[i].ido = 4;
  3928. if (isCube)
  3929. {
  3930. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3931. gMaidC[i].SetActive(true);
  3932. }
  3933. else
  3934. {
  3935. gMaidC[i].SetActive(false);
  3936. }
  3937. gHandL[i].SetActive(false);
  3938. gArmL[i].SetActive(false);
  3939. gFootL[i].SetActive(false);
  3940. gHizaL[i].SetActive(false);
  3941. gHandR[i].SetActive(false);
  3942. gArmR[i].SetActive(false);
  3943. gFootR[i].SetActive(false);
  3944. gHizaR[i].SetActive(false);
  3945. gClavicleL[i].SetActive(false);
  3946. gClavicleR[i].SetActive(false);
  3947. gNeck[i].SetActive(false);
  3948. gSpine[i].SetActive(false);
  3949. gSpine0a[i].SetActive(false);
  3950. gSpine1a[i].SetActive(false);
  3951. gSpine1[i].SetActive(false);
  3952. gPelvis[i].SetActive(false);
  3953. }
  3954. if (mMaid[i].isSelect)
  3955. {
  3956. mMaid[i].isSelect = false;
  3957. if (ikMaid != i)
  3958. {
  3959. ikMaid = i;
  3960. ikBui = 5;
  3961. SetIK(maid, i);
  3962. }
  3963. }
  3964. }
  3965. else if (ikMode[i] == 14)
  3966. {
  3967. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3968. {
  3969. mMaid[i].ido = 6;
  3970. mMaid[i].reset = true;
  3971. mMaidC[i].ido = 6;
  3972. mMaidC[i].reset = true;
  3973. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3974. }
  3975. else
  3976. {
  3977. if (!gMaid[i])
  3978. {
  3979. SetIKInit3(i);
  3980. }
  3981. gMaid[i].transform.position =
  3982. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3983. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3984. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3985. gMaid[i].transform.eulerAngles =
  3986. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3987. Spine0a2[i].transform.eulerAngles.y,
  3988. Spine0a2[i].transform.eulerAngles.z + 90f);
  3989. mMaid[i].maid = maid;
  3990. mMaid[i].ido = 6;
  3991. gMaidC[i].transform.position = maid.transform.position;
  3992. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3993. mMaidC[i].maid = maid;
  3994. mMaidC[i].ido = 6;
  3995. if (isCube)
  3996. {
  3997. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3998. gMaidC[i].SetActive(true);
  3999. }
  4000. else
  4001. {
  4002. gMaidC[i].SetActive(false);
  4003. }
  4004. gHandL[i].SetActive(false);
  4005. gArmL[i].SetActive(false);
  4006. gFootL[i].SetActive(false);
  4007. gHizaL[i].SetActive(false);
  4008. gHandR[i].SetActive(false);
  4009. gArmR[i].SetActive(false);
  4010. gFootR[i].SetActive(false);
  4011. gHizaR[i].SetActive(false);
  4012. gClavicleL[i].SetActive(false);
  4013. gClavicleR[i].SetActive(false);
  4014. gNeck[i].SetActive(false);
  4015. gSpine[i].SetActive(false);
  4016. gSpine0a[i].SetActive(false);
  4017. gSpine1a[i].SetActive(false);
  4018. gSpine1[i].SetActive(false);
  4019. gPelvis[i].SetActive(false);
  4020. }
  4021. if (mMaid[i].isSelect)
  4022. {
  4023. mMaid[i].isSelect = false;
  4024. if (ikMaid != i)
  4025. {
  4026. ikMaid = i;
  4027. ikBui = 5;
  4028. SetIK(maid, i);
  4029. }
  4030. }
  4031. }
  4032. else if (ikMode[i] == 6)
  4033. {
  4034. if (!gFinger[i, 0])
  4035. {
  4036. SetIKInit2(i);
  4037. }
  4038. Destroy(gMaid[i]);
  4039. Destroy(gMaidC[i]);
  4040. Destroy(gHead[i]);
  4041. Destroy(gJotai[i]);
  4042. Destroy(gKahuku[i]);
  4043. gHandL[i].SetActive(false);
  4044. gArmL[i].SetActive(false);
  4045. gFootL[i].SetActive(false);
  4046. gHizaL[i].SetActive(false);
  4047. gHandR[i].SetActive(false);
  4048. gArmR[i].SetActive(false);
  4049. gFootR[i].SetActive(false);
  4050. gHizaR[i].SetActive(false);
  4051. gClavicleL[i].SetActive(false);
  4052. gClavicleR[i].SetActive(false);
  4053. gNeck[i].SetActive(false);
  4054. gSpine[i].SetActive(false);
  4055. gSpine0a[i].SetActive(false);
  4056. gSpine1a[i].SetActive(false);
  4057. gSpine1[i].SetActive(false);
  4058. gPelvis[i].SetActive(false);
  4059. for (int j = 0; j < 10; j++)
  4060. {
  4061. mFinger[i, j * 3 + 2].maid = maid;
  4062. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4063. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4064. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4065. mFinger[i, j * 3 + 2].ido = 12;
  4066. if (j == 0 || j == 5)
  4067. {
  4068. mFinger[i, j * 3 + 2].ido = 15;
  4069. }
  4070. mFinger[i, j * 3 + 1].maid = maid;
  4071. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4073. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4074. mFinger[i, j * 3 + 1].ido = 11;
  4075. if (j == 0 || j == 5)
  4076. {
  4077. mFinger[i, j * 3 + 1].ido = 14;
  4078. }
  4079. mFinger[i, j * 3].maid = maid;
  4080. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4082. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4083. mFinger[i, j * 3].ido = 13;
  4084. if (j == 0 || j == 5)
  4085. {
  4086. mFinger[i, j * 3].ido = 0;
  4087. }
  4088. gFinger[i, j * 3 + 2].SetActive(false);
  4089. gFinger[i, j * 3 + 1].SetActive(false);
  4090. gFinger[i, j * 3].SetActive(true);
  4091. gFinger[i, j * 3].SetActive(true);
  4092. mFinger[i, j * 3].ido = 16;
  4093. if (ikModeOld[i] != 6)
  4094. {
  4095. mFinger[i, j * 3].reset = true;
  4096. }
  4097. gFinger[i, j * 3 + 2].transform.position =
  4098. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4099. + Finger[i, j * 4 + 2].position) / 3f;
  4100. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4101. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4102. if (mFinger[i, j * 3 + 2].isStop)
  4103. {
  4104. isStop[i] = true;
  4105. isLock[i] = true;
  4106. mFinger[i, j * 3 + 2].isStop = false;
  4107. }
  4108. if (mFinger[i, j * 3 + 1].isStop)
  4109. {
  4110. isStop[i] = true;
  4111. isLock[i] = true;
  4112. mFinger[i, j * 3 + 1].isStop = false;
  4113. }
  4114. if (mFinger[i, j * 3].isStop)
  4115. {
  4116. isStop[i] = true;
  4117. isLock[i] = true;
  4118. mFinger[i, j * 3].isStop = false;
  4119. }
  4120. }
  4121. for (int j = 0; j < 6; j++)
  4122. {
  4123. mFinger2[i, j * 2 + 1].maid = maid;
  4124. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4125. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4126. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4127. mFinger2[i, j * 2 + 1].ido = 0;
  4128. mFinger2[i, j * 2].maid = maid;
  4129. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4130. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4131. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4132. mFinger2[i, j * 2].ido = 0;
  4133. gFinger2[i, j * 2 + 1].SetActive(false);
  4134. gFinger2[i, j * 2].SetActive(false);
  4135. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4136. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4137. if (mFinger2[i, j * 2 + 1].isStop)
  4138. {
  4139. isStop[i] = true;
  4140. isLock[i] = true;
  4141. mFinger2[i, j * 2 + 1].isStop = false;
  4142. }
  4143. if (mFinger2[i, j * 2].isStop)
  4144. {
  4145. isStop[i] = true;
  4146. isLock[i] = true;
  4147. mFinger2[i, j * 2].isStop = false;
  4148. }
  4149. }
  4150. }
  4151. else if (ikMode[i] == 4)
  4152. {
  4153. if (!gFinger[i, 0])
  4154. {
  4155. SetIKInit2(i);
  4156. }
  4157. Destroy(gMaid[i]);
  4158. Destroy(gMaidC[i]);
  4159. Destroy(gHead[i]);
  4160. Destroy(gJotai[i]);
  4161. Destroy(gKahuku[i]);
  4162. gHandL[i].SetActive(false);
  4163. gArmL[i].SetActive(false);
  4164. gFootL[i].SetActive(false);
  4165. gHizaL[i].SetActive(false);
  4166. gHandR[i].SetActive(false);
  4167. gArmR[i].SetActive(false);
  4168. gFootR[i].SetActive(false);
  4169. gHizaR[i].SetActive(false);
  4170. gClavicleL[i].SetActive(false);
  4171. gClavicleR[i].SetActive(false);
  4172. gNeck[i].SetActive(false);
  4173. gSpine[i].SetActive(false);
  4174. gSpine0a[i].SetActive(false);
  4175. gSpine1a[i].SetActive(false);
  4176. gSpine1[i].SetActive(false);
  4177. gPelvis[i].SetActive(false);
  4178. for (int j = 0; j < 10; j++)
  4179. {
  4180. mFinger[i, j * 3 + 2].maid = maid;
  4181. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4182. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4183. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4184. mFinger[i, j * 3 + 2].ido = 12;
  4185. mFinger[i, j * 3 + 2].onFlg = true;
  4186. if (j == 0 || j == 5)
  4187. {
  4188. mFinger[i, j * 3 + 2].ido = 15;
  4189. }
  4190. mFinger[i, j * 3 + 1].maid = maid;
  4191. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4192. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4193. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4194. mFinger[i, j * 3 + 1].ido = 11;
  4195. mFinger[i, j * 3 + 1].onFlg = true;
  4196. if (j == 0 || j == 5)
  4197. {
  4198. mFinger[i, j * 3 + 1].ido = 14;
  4199. }
  4200. mFinger[i, j * 3].maid = maid;
  4201. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4202. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4203. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4204. mFinger[i, j * 3].ido = 13;
  4205. mFinger[i, j * 3].onFlg = true;
  4206. if (j == 0 || j == 5)
  4207. {
  4208. mFinger[i, j * 3].ido = 0;
  4209. }
  4210. if (ikModeOld[i] != 4)
  4211. {
  4212. mFinger[i, j * 3].reset = true;
  4213. }
  4214. gFinger[i, j * 3 + 2].SetActive(true);
  4215. gFinger[i, j * 3 + 1].SetActive(true);
  4216. gFinger[i, j * 3].SetActive(true);
  4217. gFinger[i, j * 3 + 2].transform.position =
  4218. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4219. + Finger[i, j * 4 + 2].position) / 3f;
  4220. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4221. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4222. if (mFinger[i, j * 3 + 2].isStop)
  4223. {
  4224. isStop[i] = true;
  4225. isLock[i] = true;
  4226. mFinger[i, j * 3 + 2].isStop = false;
  4227. }
  4228. if (mFinger[i, j * 3 + 1].isStop)
  4229. {
  4230. isStop[i] = true;
  4231. isLock[i] = true;
  4232. mFinger[i, j * 3 + 1].isStop = false;
  4233. }
  4234. if (mFinger[i, j * 3].isStop)
  4235. {
  4236. isStop[i] = true;
  4237. isLock[i] = true;
  4238. mFinger[i, j * 3].isStop = false;
  4239. }
  4240. }
  4241. for (int j = 0; j < 6; j++)
  4242. {
  4243. mFinger2[i, j * 2 + 1].maid = maid;
  4244. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4245. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4246. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4247. mFinger2[i, j * 2 + 1].ido = 17;
  4248. mFinger2[i, j * 2].maid = maid;
  4249. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4250. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4251. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4252. mFinger2[i, j * 2].ido = 0;
  4253. gFinger2[i, j * 2 + 1].SetActive(true);
  4254. gFinger2[i, j * 2].SetActive(true);
  4255. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4256. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4257. if (mFinger2[i, j * 2 + 1].isStop)
  4258. {
  4259. isStop[i] = true;
  4260. isLock[i] = true;
  4261. mFinger2[i, j * 2 + 1].isStop = false;
  4262. }
  4263. if (mFinger2[i, j * 2].isStop)
  4264. {
  4265. isStop[i] = true;
  4266. isLock[i] = true;
  4267. mFinger2[i, j * 2].isStop = false;
  4268. }
  4269. }
  4270. }
  4271. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4272. {
  4273. mHandL[i].ido = 0;
  4274. mHandR[i].ido = 0;
  4275. mFootL[i].ido = 0;
  4276. mFootR[i].ido = 0;
  4277. mHizaL[i].ido = 0;
  4278. mHizaR[i].ido = 0;
  4279. mHandL[i].reset = true;
  4280. mHandR[i].reset = true;
  4281. mFootL[i].reset = true;
  4282. mFootR[i].reset = true;
  4283. mHizaL[i].reset = true;
  4284. mHizaR[i].reset = true;
  4285. }
  4286. else
  4287. {
  4288. if (gFinger[i, 0])
  4289. {
  4290. for (int j = 0; j < 30; j++)
  4291. {
  4292. gFinger[i, j].SetActive(false);
  4293. }
  4294. for (int j = 0; j < 12; j++)
  4295. {
  4296. gFinger2[i, j].SetActive(false);
  4297. }
  4298. }
  4299. Destroy(gHead[i]);
  4300. Destroy(gJotai[i]);
  4301. Destroy(gKahuku[i]);
  4302. Destroy(gIKHandL[i]);
  4303. Destroy(gIKHandR[i]);
  4304. Destroy(gIKMuneL[i]);
  4305. Destroy(gIKMuneR[i]);
  4306. Destroy(gHead2[i]);
  4307. Destroy(gMaid2[i]);
  4308. gHandL[i].SetActive(true);
  4309. gArmL[i].SetActive(true);
  4310. gFootL[i].SetActive(true);
  4311. gHizaL[i].SetActive(true);
  4312. gHandR[i].SetActive(true);
  4313. gArmR[i].SetActive(true);
  4314. gFootR[i].SetActive(true);
  4315. gHizaR[i].SetActive(true);
  4316. mHandL[i].ido = 0;
  4317. mHandR[i].ido = 0;
  4318. mFootL[i].ido = 0;
  4319. mFootR[i].ido = 0;
  4320. gClavicleL[i].SetActive(true);
  4321. gClavicleR[i].SetActive(true);
  4322. }
  4323. if (!isIK[i])
  4324. {
  4325. gHandL[i].SetActive(false);
  4326. gArmL[i].SetActive(false);
  4327. gFootL[i].SetActive(false);
  4328. gHizaL[i].SetActive(false);
  4329. gHandR[i].SetActive(false);
  4330. gArmR[i].SetActive(false);
  4331. gFootR[i].SetActive(false);
  4332. gHizaR[i].SetActive(false);
  4333. gClavicleL[i].SetActive(false);
  4334. gClavicleR[i].SetActive(false);
  4335. gNeck[i].SetActive(false);
  4336. gSpine[i].SetActive(false);
  4337. gSpine0a[i].SetActive(false);
  4338. gSpine1a[i].SetActive(false);
  4339. gSpine1[i].SetActive(false);
  4340. gPelvis[i].SetActive(false);
  4341. }
  4342. if (isIK[i])
  4343. {
  4344. mHandL[i].maid = maid;
  4345. mHandL[i].HandL = HandL1[i];
  4346. if (ikMode[i] == 2)
  4347. {
  4348. mHandL[i].UpperArmL = ForearmL1[i];
  4349. }
  4350. else
  4351. {
  4352. mHandL[i].UpperArmL = UpperArmL1[i];
  4353. if (ikModeOld[i] == 2 && isLock[i])
  4354. {
  4355. mHandL[i].OnMouseDown();
  4356. mHandL[i].isSelect = false;
  4357. }
  4358. }
  4359. mHandL[i].ForearmL = ForearmL1[i];
  4360. mArmL[i].maid = maid;
  4361. mArmL[i].HandL = ForearmL1[i];
  4362. mArmL[i].UpperArmL = UpperArmL1[i];
  4363. mArmL[i].ForearmL = UpperArmL1[i];
  4364. mArmL[i].onFlg = true;
  4365. if (mArmL[i].onFlg2)
  4366. {
  4367. mArmL[i].onFlg2 = false;
  4368. mHandL[i].initFlg = false;
  4369. }
  4370. if (ikMode[i] == 2)
  4371. {
  4372. mHandL[i].initFlg = false;
  4373. mHandR[i].initFlg = false;
  4374. mFootL[i].initFlg = false;
  4375. mFootR[i].initFlg = false;
  4376. mHandL[i].onFlg = true;
  4377. mHandR[i].onFlg = true;
  4378. mFootL[i].onFlg = true;
  4379. mFootR[i].onFlg = true;
  4380. }
  4381. else
  4382. {
  4383. mHandL[i].onFlg = false;
  4384. mHandR[i].onFlg = false;
  4385. mFootL[i].onFlg = false;
  4386. mFootR[i].onFlg = false;
  4387. }
  4388. gHandL[i].transform.position = HandL1[i].position;
  4389. gArmL[i].transform.position = ForearmL1[i].position;
  4390. mClavicleL[i].maid = maid;
  4391. mClavicleL[i].HandL = UpperArmL1[i];
  4392. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4393. mClavicleL[i].ForearmL = ClavicleL1[i];
  4394. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4395. if (mHandL[i].isStop)
  4396. {
  4397. isStop[i] = true;
  4398. isLock[i] = true;
  4399. mHandL[i].isStop = false;
  4400. }
  4401. if (mArmL[i].isStop)
  4402. {
  4403. isStop[i] = true;
  4404. isLock[i] = true;
  4405. mArmL[i].isStop = false;
  4406. }
  4407. if (mClavicleL[i].isStop)
  4408. {
  4409. isStop[i] = true;
  4410. isLock[i] = true;
  4411. mClavicleL[i].isStop = false;
  4412. }
  4413. mHandR[i].maid = maid;
  4414. mHandR[i].HandL = HandR1[i];
  4415. if (ikMode[i] == 2)
  4416. {
  4417. mHandR[i].UpperArmL = ForearmR1[i];
  4418. }
  4419. else
  4420. {
  4421. mHandR[i].UpperArmL = UpperArmR1[i];
  4422. if (ikModeOld[i] == 2 && isLock[i])
  4423. {
  4424. mHandR[i].OnMouseDown();
  4425. mHandR[i].isSelect = false;
  4426. }
  4427. }
  4428. mHandR[i].ForearmL = ForearmR1[i];
  4429. mArmR[i].maid = maid;
  4430. mArmR[i].HandL = ForearmR1[i];
  4431. mArmR[i].UpperArmL = UpperArmR1[i];
  4432. mArmR[i].ForearmL = UpperArmR1[i];
  4433. mArmR[i].onFlg = true;
  4434. if (mArmR[i].onFlg2)
  4435. {
  4436. mArmR[i].onFlg2 = false;
  4437. mHandR[i].initFlg = false;
  4438. }
  4439. gHandR[i].transform.position = HandR1[i].position;
  4440. gArmR[i].transform.position = ForearmR1[i].position;
  4441. mClavicleR[i].maid = maid;
  4442. mClavicleR[i].HandL = UpperArmR1[i];
  4443. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4444. mClavicleR[i].ForearmL = ClavicleR1[i];
  4445. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4446. if (mHandR[i].isStop)
  4447. {
  4448. isStop[i] = true;
  4449. isLock[i] = true;
  4450. mHandR[i].isStop = false;
  4451. }
  4452. if (mArmR[i].isStop)
  4453. {
  4454. isStop[i] = true;
  4455. isLock[i] = true;
  4456. mArmR[i].isStop = false;
  4457. }
  4458. if (mClavicleL[i].isStop)
  4459. {
  4460. isStop[i] = true;
  4461. isLock[i] = true;
  4462. mClavicleL[i].isStop = false;
  4463. }
  4464. mFootL[i].maid = maid;
  4465. mFootL[i].HandL = HandL2[i];
  4466. if (ikMode[i] == 2)
  4467. {
  4468. mFootL[i].UpperArmL = ForearmL2[i];
  4469. }
  4470. else
  4471. {
  4472. mFootL[i].UpperArmL = UpperArmL2[i];
  4473. if (ikModeOld[i] == 2 && isLock[i])
  4474. {
  4475. mFootL[i].OnMouseDown();
  4476. mFootL[i].isSelect = false;
  4477. }
  4478. }
  4479. mFootL[i].ForearmL = ForearmL2[i];
  4480. mHizaL[i].maid = maid;
  4481. mHizaL[i].HandL = ForearmL2[i];
  4482. mHizaL[i].UpperArmL = UpperArmL2[i];
  4483. mHizaL[i].ForearmL = UpperArmL2[i];
  4484. mHizaL[i].onFlg = true;
  4485. if (mHizaL[i].onFlg2)
  4486. {
  4487. mHizaL[i].onFlg2 = false;
  4488. mFootL[i].initFlg = false;
  4489. }
  4490. gFootL[i].transform.position = HandL2[i].position;
  4491. gHizaL[i].transform.position = ForearmL2[i].position;
  4492. if (mFootL[i].isStop)
  4493. {
  4494. isStop[i] = true;
  4495. isLock[i] = true;
  4496. mFootL[i].isStop = false;
  4497. }
  4498. if (mHizaL[i].isStop)
  4499. {
  4500. isStop[i] = true;
  4501. isLock[i] = true;
  4502. mHizaL[i].isStop = false;
  4503. }
  4504. mFootR[i].maid = maid;
  4505. mFootR[i].HandL = HandR2[i];
  4506. if (ikMode[i] == 2)
  4507. {
  4508. mFootR[i].UpperArmL = ForearmR2[i];
  4509. }
  4510. else
  4511. {
  4512. mFootR[i].UpperArmL = UpperArmR2[i];
  4513. if (ikModeOld[i] == 2 && isLock[i])
  4514. {
  4515. mFootR[i].OnMouseDown();
  4516. mFootR[i].isSelect = false;
  4517. }
  4518. }
  4519. mFootR[i].ForearmL = ForearmR2[i];
  4520. mHizaR[i].maid = maid;
  4521. mHizaR[i].HandL = ForearmR2[i];
  4522. mHizaR[i].UpperArmL = UpperArmR2[i];
  4523. mHizaR[i].ForearmL = UpperArmR2[i];
  4524. mHizaR[i].onFlg = true;
  4525. if (mHizaR[i].onFlg2)
  4526. {
  4527. mHizaR[i].onFlg2 = false;
  4528. mFootR[i].initFlg = false;
  4529. }
  4530. gFootR[i].transform.position = HandR2[i].position;
  4531. gHizaR[i].transform.position = ForearmR2[i].position;
  4532. if (mFootR[i].isStop)
  4533. {
  4534. isStop[i] = true;
  4535. isLock[i] = true;
  4536. mFootR[i].isStop = false;
  4537. }
  4538. if (mHizaR[i].isStop)
  4539. {
  4540. isStop[i] = true;
  4541. isLock[i] = true;
  4542. mHizaR[i].isStop = false;
  4543. }
  4544. bool flag13 = false;
  4545. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4546. || ikModeOld[i] == 14)
  4547. {
  4548. flag13 = true;
  4549. }
  4550. if (isBone[i])
  4551. {
  4552. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4553. || isChange[i])
  4554. {
  4555. float gizmoSizeSpine = 0.2f;
  4556. gizmoNeck[i].Visible = false;
  4557. gizmoFootL[i].Visible = false;
  4558. gizmoHandR[i].Visible = false;
  4559. gizmoHandL[i].Visible = false;
  4560. gizmoFootR[i].Visible = false;
  4561. gizmoPelvis[i].Visible = false;
  4562. if (ikMode[i] == 2 || ikMode[i] == 1)
  4563. {
  4564. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4565. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4566. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4567. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4568. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4569. if (ikMode[i] == 2)
  4570. {
  4571. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4572. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4573. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4574. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4575. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4576. if (isDragging)
  4577. {
  4578. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4579. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4580. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4581. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4582. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4583. }
  4584. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4585. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4586. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4587. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4588. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4589. gizmoNeck[i].Visible = true;
  4590. gizmoHandL[i].Visible = true;
  4591. gizmoHandR[i].Visible = true;
  4592. gizmoFootL[i].Visible = true;
  4593. gizmoFootR[i].Visible = true;
  4594. gNeck[i].SetActive(false);
  4595. gSpine[i].SetActive(false);
  4596. gSpine0a[i].SetActive(false);
  4597. gSpine1[i].SetActive(false);
  4598. gSpine1a[i].SetActive(false);
  4599. }
  4600. else
  4601. {
  4602. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4603. if (isDragging)
  4604. {
  4605. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4606. }
  4607. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4608. gizmoPelvis[i].Visible = true;
  4609. gPelvis[i].SetActive(false);
  4610. }
  4611. if (!isLock[i])
  4612. {
  4613. if (isDragging)
  4614. {
  4615. isStop[i] = true;
  4616. isLock[i] = true;
  4617. }
  4618. }
  4619. }
  4620. }
  4621. else
  4622. {
  4623. float gizmoSizeLimb = 0.25f;
  4624. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4625. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4626. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4627. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4628. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4629. if (ikMode[i] == 3)
  4630. {
  4631. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4632. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4633. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4634. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4635. if (isDragging)
  4636. {
  4637. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4638. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4639. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4640. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4641. }
  4642. else
  4643. {
  4644. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4645. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4646. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4647. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4648. }
  4649. }
  4650. else if (ikMode[i] == 5)
  4651. {
  4652. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4653. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4654. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4655. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4656. if (isDragging)
  4657. {
  4658. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4659. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4660. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4661. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4662. flag13 = true;
  4663. }
  4664. else
  4665. {
  4666. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4667. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4668. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4669. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4670. }
  4671. }
  4672. else if (ikMode[i] == 8)
  4673. {
  4674. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4675. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4676. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4677. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4678. if (isDragging)
  4679. {
  4680. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4681. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4682. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4683. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4684. flag13 = true;
  4685. }
  4686. else
  4687. {
  4688. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4689. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4690. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4691. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4692. }
  4693. }
  4694. gizmoHandL[i].Visible = true;
  4695. gizmoHandR[i].Visible = true;
  4696. gizmoFootL[i].Visible = true;
  4697. gizmoFootR[i].Visible = true;
  4698. gHandL[i].SetActive(false);
  4699. gFootL[i].SetActive(false);
  4700. gHandR[i].SetActive(false);
  4701. gFootR[i].SetActive(false);
  4702. if (!isLock[i])
  4703. {
  4704. if (isDragging)
  4705. {
  4706. isStop[i] = true;
  4707. isLock[i] = true;
  4708. }
  4709. }
  4710. }
  4711. if (isChange[i])
  4712. {
  4713. isChange[i] = false;
  4714. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4715. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4716. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4717. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4718. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4719. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4720. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4721. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gHandL[i].GetComponent<Renderer>().enabled = true;
  4725. gHandR[i].GetComponent<Renderer>().enabled = true;
  4726. gArmL[i].GetComponent<Renderer>().enabled = true;
  4727. gArmR[i].GetComponent<Renderer>().enabled = true;
  4728. gFootL[i].GetComponent<Renderer>().enabled = true;
  4729. gFootR[i].GetComponent<Renderer>().enabled = true;
  4730. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4731. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4732. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4733. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4734. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4735. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4736. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4737. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4738. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4739. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4740. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4741. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4742. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4743. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4744. }
  4745. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4746. {
  4747. mNeck[i].ido = 1;
  4748. mNeck[i].reset = true;
  4749. mSpine[i].ido = 1;
  4750. mSpine[i].reset = true;
  4751. mSpine0a[i].ido = 1;
  4752. mSpine0a[i].reset = true;
  4753. mSpine1a[i].ido = 1;
  4754. mSpine1a[i].reset = true;
  4755. mSpine1[i].ido = 1;
  4756. mSpine1[i].reset = true;
  4757. mPelvis[i].ido = 1;
  4758. mPelvis[i].reset = true;
  4759. }
  4760. else if (ikMode[i] == 0)
  4761. {
  4762. gNeck[i].SetActive(true);
  4763. gSpine[i].SetActive(true);
  4764. gSpine0a[i].SetActive(true);
  4765. gSpine1a[i].SetActive(true);
  4766. gSpine1[i].SetActive(true);
  4767. gPelvis[i].SetActive(true);
  4768. if (mNeck[i].isHead)
  4769. {
  4770. mNeck[i].isHead = false;
  4771. isLookn[i] = isLook[i];
  4772. isLook[i] = !isLook[i];
  4773. }
  4774. mNeck[i].maid = maid;
  4775. mNeck[i].head = Neck[i];
  4776. mNeck[i].no = i;
  4777. mNeck[i].ido = 1;
  4778. gNeck[i].transform.position = Neck[i].position;
  4779. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4780. mSpine[i].maid = maid;
  4781. mSpine[i].head = Spine2[i];
  4782. mSpine[i].no = i;
  4783. mSpine[i].ido = 1;
  4784. gSpine[i].transform.position = Spine2[i].position;
  4785. gSpine[i].transform.eulerAngles =
  4786. new Vector3(Spine2[i].localEulerAngles.z,
  4787. Spine2[i].localEulerAngles.y,
  4788. Spine2[i].localEulerAngles.x);
  4789. mSpine0a[i].maid = maid;
  4790. mSpine0a[i].head = Spine0a2[i];
  4791. mSpine0a[i].no = i;
  4792. mSpine0a[i].ido = 1;
  4793. gSpine0a[i].transform.position = Spine0a2[i].position;
  4794. gSpine0a[i].transform.eulerAngles =
  4795. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4796. Spine0a2[i].localEulerAngles.x,
  4797. Spine0a2[i].localEulerAngles.y);
  4798. mSpine1a[i].maid = maid;
  4799. mSpine1a[i].head = Spine1a2[i];
  4800. mSpine1a[i].no = i;
  4801. mSpine1a[i].ido = 1;
  4802. gSpine1a[i].transform.position = Spine1a2[i].position;
  4803. gSpine1a[i].transform.localEulerAngles =
  4804. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4805. Spine1a2[i].localEulerAngles.x,
  4806. Spine1a2[i].localEulerAngles.y);
  4807. mSpine1[i].maid = maid;
  4808. mSpine1[i].head = Spine12[i];
  4809. mSpine1[i].no = i;
  4810. mSpine1[i].ido = 1;
  4811. gSpine1[i].transform.position = Spine12[i].position;
  4812. gSpine1[i].transform.localEulerAngles =
  4813. new Vector3(-Spine12[i].localEulerAngles.z,
  4814. Spine12[i].localEulerAngles.x,
  4815. Spine12[i].localEulerAngles.y);
  4816. mPelvis[i].maid = maid;
  4817. mPelvis[i].head = Pelvis2[i];
  4818. mPelvis[i].no = i;
  4819. mPelvis[i].ido = 1;
  4820. gPelvis[i].transform.position = Pelvis2[i].position;
  4821. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4822. if (mNeck[i].isIdo)
  4823. {
  4824. mNeck[i].isIdo = false;
  4825. isLock[i] = true;
  4826. }
  4827. if (mSpine[i].isIdo)
  4828. {
  4829. mSpine[i].isIdo = false;
  4830. flag13 = true;
  4831. isLock[i] = true;
  4832. }
  4833. if (mSpine0a[i].isIdo)
  4834. {
  4835. mSpine0a[i].isIdo = false;
  4836. flag13 = true;
  4837. isLock[i] = true;
  4838. }
  4839. if (mSpine1a[i].isIdo)
  4840. {
  4841. mSpine1a[i].isIdo = false;
  4842. flag13 = true;
  4843. isLock[i] = true;
  4844. }
  4845. if (mSpine1[i].isIdo)
  4846. {
  4847. mSpine1[i].isIdo = false;
  4848. flag13 = true;
  4849. isLock[i] = true;
  4850. }
  4851. if (mPelvis[i].isIdo)
  4852. {
  4853. mPelvis[i].isIdo = false;
  4854. flag13 = true;
  4855. isLock[i] = true;
  4856. }
  4857. if (mClavicleL[i].isIdo)
  4858. {
  4859. mClavicleL[i].isIdo = false;
  4860. flag13 = true;
  4861. isLock[i] = true;
  4862. }
  4863. if (mClavicleR[i].isIdo)
  4864. {
  4865. mClavicleR[i].isIdo = false;
  4866. flag13 = true;
  4867. isLock[i] = true;
  4868. }
  4869. }
  4870. }
  4871. else if (isChange[i])
  4872. {
  4873. isChange[i] = false;
  4874. gHandL[i].GetComponent<Renderer>().enabled = false;
  4875. gArmL[i].GetComponent<Renderer>().enabled = false;
  4876. gFootL[i].GetComponent<Renderer>().enabled = false;
  4877. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4878. gHandR[i].GetComponent<Renderer>().enabled = false;
  4879. gArmR[i].GetComponent<Renderer>().enabled = false;
  4880. gFootR[i].GetComponent<Renderer>().enabled = false;
  4881. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4882. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4883. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4884. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4885. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4886. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4887. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4888. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4889. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4890. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4891. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4892. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4893. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4894. gNeck[i].SetActive(false);
  4895. gSpine[i].SetActive(false);
  4896. gSpine0a[i].SetActive(false);
  4897. gSpine1a[i].SetActive(false);
  4898. gSpine1[i].SetActive(false);
  4899. gPelvis[i].SetActive(false);
  4900. gizmoHandL[i].Visible = false;
  4901. gizmoHandR[i].Visible = false;
  4902. gizmoFootL[i].Visible = false;
  4903. gizmoFootR[i].Visible = false;
  4904. }
  4905. if (flag13)
  4906. {
  4907. mHandL[i].initFlg = false;
  4908. mHandR[i].initFlg = false;
  4909. mFootL[i].initFlg = false;
  4910. mFootR[i].initFlg = false;
  4911. }
  4912. }
  4913. ikModeOld[i] = ikMode[i];
  4914. bool flag14 = false;
  4915. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4916. {
  4917. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4918. {
  4919. for (int k = 0; k < 10; k++)
  4920. {
  4921. maid.transform.RotateAround(maid.transform.position,
  4922. Vector3.right,
  4923. -maid.transform.rotation.eulerAngles.x);
  4924. maid.transform.RotateAround(maid.transform.position,
  4925. Vector3.forward,
  4926. -maid.transform.rotation.eulerAngles.z);
  4927. }
  4928. flag14 = true;
  4929. }
  4930. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4931. {
  4932. maid.transform.RotateAround(maid.transform.position,
  4933. new Vector3(vector3.x, 0f, vector3.z),
  4934. 0.3f);
  4935. maid.transform.RotateAround(maid.transform.position,
  4936. new Vector3(vector2.x, 0f, vector2.z),
  4937. 0.3f);
  4938. flag14 = true;
  4939. }
  4940. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4941. {
  4942. maid.transform.RotateAround(maid.transform.position,
  4943. new Vector3(vector3.x, 0f, vector3.z),
  4944. 0.3f);
  4945. maid.transform.RotateAround(maid.transform.position,
  4946. new Vector3(vector2.x, 0f, vector2.z),
  4947. -0.3f);
  4948. flag14 = true;
  4949. }
  4950. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4951. {
  4952. maid.transform.RotateAround(maid.transform.position,
  4953. new Vector3(vector3.x, 0f, vector3.z),
  4954. -0.3f);
  4955. maid.transform.RotateAround(maid.transform.position,
  4956. new Vector3(vector2.x, 0f, vector2.z),
  4957. 0.3f);
  4958. flag14 = true;
  4959. }
  4960. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4961. {
  4962. maid.transform.RotateAround(maid.transform.position,
  4963. new Vector3(vector3.x, 0f, vector3.z),
  4964. -0.3f);
  4965. maid.transform.RotateAround(maid.transform.position,
  4966. new Vector3(vector2.x, 0f, vector2.z),
  4967. -0.3f);
  4968. flag14 = true;
  4969. }
  4970. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4971. {
  4972. maid.transform.RotateAround(maid.transform.position,
  4973. new Vector3(vector3.x, 0f, vector3.z),
  4974. 0.4f);
  4975. flag14 = true;
  4976. }
  4977. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4978. {
  4979. maid.transform.RotateAround(maid.transform.position,
  4980. new Vector3(vector3.x, 0f, vector3.z),
  4981. -0.4f);
  4982. flag14 = true;
  4983. }
  4984. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4985. {
  4986. maid.transform.RotateAround(maid.transform.position,
  4987. new Vector3(vector2.x, 0f, vector2.z),
  4988. 0.4f);
  4989. flag14 = true;
  4990. }
  4991. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4992. {
  4993. maid.transform.RotateAround(maid.transform.position,
  4994. new Vector3(vector2.x, 0f, vector2.z),
  4995. -0.4f);
  4996. flag14 = true;
  4997. }
  4998. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4999. {
  5000. maid.body0.transform.localRotation =
  5001. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5002. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5003. flag14 = true;
  5004. }
  5005. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5006. {
  5007. maid.body0.transform.localRotation =
  5008. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5009. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5010. flag14 = true;
  5011. }
  5012. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5013. {
  5014. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5015. flag14 = true;
  5016. }
  5017. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5018. {
  5019. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5020. flag14 = true;
  5021. }
  5022. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5023. {
  5024. Vector3 vector = maid.transform.position;
  5025. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5026. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5027. maid.SetPos(vector);
  5028. flag14 = true;
  5029. }
  5030. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5031. {
  5032. Vector3 vector = maid.transform.position;
  5033. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5034. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5035. maid.SetPos(vector);
  5036. flag14 = true;
  5037. }
  5038. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5039. {
  5040. Vector3 vector = maid.transform.position;
  5041. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5042. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5043. maid.SetPos(vector);
  5044. flag14 = true;
  5045. }
  5046. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5047. {
  5048. Vector3 vector = maid.transform.position;
  5049. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5050. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5051. maid.SetPos(vector);
  5052. flag14 = true;
  5053. }
  5054. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5055. {
  5056. Vector3 vector = maid.transform.position;
  5057. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5058. maid.SetPos(vector);
  5059. flag14 = true;
  5060. }
  5061. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5062. {
  5063. Vector3 vector = maid.transform.position;
  5064. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5065. maid.SetPos(vector);
  5066. flag14 = true;
  5067. }
  5068. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5069. {
  5070. Vector3 vector = maid.transform.position;
  5071. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5072. maid.SetPos(vector);
  5073. flag14 = true;
  5074. }
  5075. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5076. {
  5077. Vector3 vector = maid.transform.position;
  5078. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5079. maid.SetPos(vector);
  5080. flag14 = true;
  5081. }
  5082. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5083. {
  5084. Vector3 vector = maid.transform.position;
  5085. vector.y += 0.0075f * speed;
  5086. maid.SetPos(vector);
  5087. flag14 = true;
  5088. }
  5089. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5090. {
  5091. Vector3 vector = maid.transform.position;
  5092. vector.y -= 0.0075f * speed;
  5093. maid.SetPos(vector);
  5094. flag14 = true;
  5095. }
  5096. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5097. {
  5098. maid.transform.localScale =
  5099. new Vector3(maid.transform.localScale.x * 1.005f,
  5100. maid.transform.localScale.y * 1.005f,
  5101. maid.transform.localScale.z * 1.005f);
  5102. flag14 = true;
  5103. }
  5104. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5105. {
  5106. maid.transform.localScale =
  5107. new Vector3(maid.transform.localScale.x * 0.995f,
  5108. maid.transform.localScale.y * 0.995f,
  5109. maid.transform.localScale.z * 0.995f);
  5110. flag14 = true;
  5111. }
  5112. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5113. {
  5114. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5115. flag14 = true;
  5116. }
  5117. }
  5118. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5119. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5120. && i == ikMaid)
  5121. {
  5122. if (Input.GetKey(KeyCode.I))
  5123. {
  5124. if (ikMode[i] == 0)
  5125. {
  5126. Vector3 vector5 = HandL.position;
  5127. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5128. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5129. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5130. }
  5131. else if (ikMode[i] == 2)
  5132. {
  5133. Vector3 vector5 = HandL.position;
  5134. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5135. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5136. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5137. }
  5138. else if (ikMode[i] == 3)
  5139. {
  5140. if (ikBui == 1 || ikBui == 2)
  5141. {
  5142. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5143. }
  5144. else
  5145. {
  5146. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5147. }
  5148. }
  5149. else if (ikMode[i] == 4)
  5150. {
  5151. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5152. }
  5153. else if (ikMode[i] == 8)
  5154. {
  5155. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5156. }
  5157. else if (ikMode[i] == 6)
  5158. {
  5159. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5160. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5161. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5162. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5163. }
  5164. else if (ikMode[i] == 7)
  5165. {
  5166. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5167. }
  5168. else if (ikMode[i] == 5)
  5169. {
  5170. Vector3 vector5 = ForearmL.position;
  5171. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5172. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5173. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5174. }
  5175. else
  5176. {
  5177. Vector3 vector5 = ForearmL.position;
  5178. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5179. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5180. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5181. }
  5182. isStop[i] = true;
  5183. isLock[i] = true;
  5184. }
  5185. else if (Input.GetKey(KeyCode.K))
  5186. {
  5187. if (ikMode[i] == 0)
  5188. {
  5189. Vector3 vector5 = HandL.position;
  5190. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5191. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5192. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5193. }
  5194. else if (ikMode[i] == 2)
  5195. {
  5196. Vector3 vector5 = HandL.position;
  5197. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5198. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5199. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5200. }
  5201. else if (ikMode[i] == 3)
  5202. {
  5203. if (ikBui == 1 || ikBui == 2)
  5204. {
  5205. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5206. }
  5207. else
  5208. {
  5209. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5210. }
  5211. }
  5212. else if (ikMode[i] == 4)
  5213. {
  5214. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5215. }
  5216. else if (ikMode[i] == 8)
  5217. {
  5218. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5219. }
  5220. else if (ikMode[i] == 6)
  5221. {
  5222. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5223. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5224. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5225. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5226. }
  5227. else if (ikMode[i] == 7)
  5228. {
  5229. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5230. }
  5231. else if (ikMode[i] == 5)
  5232. {
  5233. Vector3 vector5 = ForearmL.position;
  5234. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5235. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5236. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5237. }
  5238. else
  5239. {
  5240. Vector3 vector5 = ForearmL.position;
  5241. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5242. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5243. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5244. }
  5245. isStop[i] = true;
  5246. isLock[i] = true;
  5247. }
  5248. else if (Input.GetKey(KeyCode.J))
  5249. {
  5250. if (ikMode[i] == 0)
  5251. {
  5252. Vector3 vector5 = HandL.position;
  5253. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5254. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5255. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5256. }
  5257. else if (ikMode[i] == 2)
  5258. {
  5259. Vector3 vector5 = HandL.position;
  5260. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5261. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5262. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5263. }
  5264. else if (ikMode[i] == 3)
  5265. {
  5266. if (ikBui == 1 || ikBui == 2)
  5267. {
  5268. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5269. }
  5270. else
  5271. {
  5272. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5273. }
  5274. }
  5275. else if (ikMode[i] == 4)
  5276. {
  5277. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5278. }
  5279. else if (ikMode[i] == 8)
  5280. {
  5281. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5282. }
  5283. else if (ikMode[i] == 6)
  5284. {
  5285. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5286. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5287. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5288. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5289. }
  5290. else if (ikMode[i] == 7)
  5291. {
  5292. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5293. }
  5294. else if (ikMode[i] == 5)
  5295. {
  5296. Vector3 vector5 = ForearmL.position;
  5297. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5298. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5299. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5300. }
  5301. else
  5302. {
  5303. Vector3 vector5 = ForearmL.position;
  5304. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5305. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5306. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5307. }
  5308. isStop[i] = true;
  5309. isLock[i] = true;
  5310. }
  5311. else if (Input.GetKey(KeyCode.L))
  5312. {
  5313. if (ikMode[i] == 0)
  5314. {
  5315. Vector3 vector5 = HandL.position;
  5316. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5317. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5318. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5319. }
  5320. else if (ikMode[i] == 2)
  5321. {
  5322. Vector3 vector5 = HandL.position;
  5323. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5324. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5325. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5326. }
  5327. else if (ikMode[i] == 3)
  5328. {
  5329. if (ikBui == 1 || ikBui == 2)
  5330. {
  5331. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5332. }
  5333. else
  5334. {
  5335. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5336. }
  5337. }
  5338. else if (ikMode[i] == 4)
  5339. {
  5340. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5341. }
  5342. else if (ikMode[i] == 8)
  5343. {
  5344. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5345. }
  5346. else if (ikMode[i] == 6)
  5347. {
  5348. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5349. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5350. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5351. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5352. }
  5353. else if (ikMode[i] == 7)
  5354. {
  5355. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5356. }
  5357. else if (ikMode[i] == 5)
  5358. {
  5359. Vector3 vector5 = ForearmL.position;
  5360. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5361. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5362. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5363. }
  5364. else
  5365. {
  5366. Vector3 vector5 = ForearmL.position;
  5367. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5368. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5369. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5370. }
  5371. isStop[i] = true;
  5372. isLock[i] = true;
  5373. }
  5374. else if (Input.GetKey(KeyCode.U))
  5375. {
  5376. if (ikMode[i] == 3)
  5377. {
  5378. HandL.localRotation =
  5379. Quaternion.Euler(HandL.localEulerAngles)
  5380. * Quaternion.AngleAxis(1f, Vector3.right);
  5381. isStop[i] = true;
  5382. isLock[i] = true;
  5383. }
  5384. else if (ikMode[i] == 4)
  5385. {
  5386. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5387. isStop[i] = true;
  5388. isLock[i] = true;
  5389. }
  5390. else if (ikMode[i] == 8)
  5391. {
  5392. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5393. isStop[i] = true;
  5394. isLock[i] = true;
  5395. }
  5396. else if (ikMode[i] == 6)
  5397. {
  5398. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5399. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5400. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5401. isStop[i] = true;
  5402. isLock[i] = true;
  5403. }
  5404. else if (ikMode[i] == 7)
  5405. {
  5406. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5407. isStop[i] = true;
  5408. isLock[i] = true;
  5409. }
  5410. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5411. {
  5412. UpperArmL.localRotation =
  5413. Quaternion.Euler(UpperArmL.localEulerAngles)
  5414. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5415. isStop[i] = true;
  5416. isLock[i] = true;
  5417. }
  5418. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5419. {
  5420. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5421. isStop[i] = true;
  5422. isLock[i] = true;
  5423. }
  5424. }
  5425. else if (Input.GetKey(KeyCode.O))
  5426. {
  5427. if (ikMode[i] == 3)
  5428. {
  5429. HandL.localRotation =
  5430. Quaternion.Euler(HandL.localEulerAngles)
  5431. * Quaternion.AngleAxis(-1f, Vector3.right);
  5432. isStop[i] = true;
  5433. isLock[i] = true;
  5434. }
  5435. else if (ikMode[i] == 4)
  5436. {
  5437. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5438. isStop[i] = true;
  5439. isLock[i] = true;
  5440. }
  5441. else if (ikMode[i] == 8)
  5442. {
  5443. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5444. isStop[i] = true;
  5445. isLock[i] = true;
  5446. }
  5447. else if (ikMode[i] == 6)
  5448. {
  5449. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5450. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5451. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5452. isStop[i] = true;
  5453. isLock[i] = true;
  5454. }
  5455. else if (ikMode[i] == 7)
  5456. {
  5457. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5458. isStop[i] = true;
  5459. isLock[i] = true;
  5460. }
  5461. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5462. {
  5463. UpperArmL.localRotation =
  5464. Quaternion.Euler(UpperArmL.localEulerAngles)
  5465. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5466. isStop[i] = true;
  5467. isLock[i] = true;
  5468. }
  5469. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5470. {
  5471. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5472. isStop[i] = true;
  5473. isLock[i] = true;
  5474. }
  5475. }
  5476. else if (Input.GetKey(KeyCode.Alpha0))
  5477. {
  5478. if (ikMode[i] == 0)
  5479. {
  5480. Vector3 vector5 = HandL.position;
  5481. vector5.y += 0.005f;
  5482. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5483. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5484. }
  5485. else if (ikMode[i] == 2)
  5486. {
  5487. Vector3 vector5 = HandL.position;
  5488. vector5.y += 0.005f;
  5489. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5490. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5491. }
  5492. else if (ikMode[i] == 5)
  5493. {
  5494. Vector3 vector5 = ForearmL.position;
  5495. vector5.y += 0.0035f;
  5496. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5497. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5498. }
  5499. else
  5500. {
  5501. Vector3 vector5 = ForearmL.position;
  5502. vector5.y += 0.0035f;
  5503. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5504. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5505. }
  5506. isStop[i] = true;
  5507. isLock[i] = true;
  5508. }
  5509. else if (Input.GetKey(KeyCode.P))
  5510. {
  5511. if (ikMode[i] == 0)
  5512. {
  5513. Vector3 vector5 = HandL.position;
  5514. vector5.y -= 0.005f;
  5515. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5516. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5517. }
  5518. else if (ikMode[i] == 2)
  5519. {
  5520. Vector3 vector5 = HandL.position;
  5521. vector5.y -= 0.005f;
  5522. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5523. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5524. }
  5525. else if (ikMode[i] == 5)
  5526. {
  5527. Vector3 vector5 = ForearmL.position;
  5528. vector5.y -= 0.0035f;
  5529. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5530. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5531. }
  5532. else
  5533. {
  5534. Vector3 vector5 = ForearmL.position;
  5535. vector5.y -= 0.0035f;
  5536. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5537. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5538. }
  5539. isStop[i] = true;
  5540. isLock[i] = true;
  5541. }
  5542. }
  5543. }
  5544. }
  5545. }
  5546. }
  5547. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5548. {
  5549. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5550. idoFlg[i] = true;
  5551. }
  5552. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5553. {
  5554. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5555. idoFlg[i] = true;
  5556. }
  5557. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5558. {
  5559. if (!xFlg[i])
  5560. {
  5561. xFlg[i] = true;
  5562. zFlg[i] = false;
  5563. if (maid.status.personal.uniqueName == "Pride")
  5564. {
  5565. string text = "s0_";
  5566. Random random = new Random();
  5567. int num4 = random.Next(10000);
  5568. bool flag7 = false;
  5569. for (int k = 0; k < tunArray.Length; k++)
  5570. {
  5571. if (tunArray[k] == num4)
  5572. {
  5573. flag7 = true;
  5574. break;
  5575. }
  5576. }
  5577. if (!flag7)
  5578. {
  5579. text = text + "0" + num4.ToString() + ".ogg";
  5580. if (GameUty.FileSystem.IsExistentFile(text))
  5581. {
  5582. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5583. }
  5584. }
  5585. }
  5586. if (maid.status.personal.uniqueName == "Cool")
  5587. {
  5588. string text = "s1_";
  5589. Random random = new Random();
  5590. int num4 = random.Next(10000);
  5591. bool flag7 = false;
  5592. for (int k = 0; k < coolArray.Length; k++)
  5593. {
  5594. if (coolArray[k] == num4)
  5595. {
  5596. flag7 = true;
  5597. break;
  5598. }
  5599. }
  5600. if (!flag7)
  5601. {
  5602. text = text + "0" + num4.ToString() + ".ogg";
  5603. if (GameUty.FileSystem.IsExistentFile(text))
  5604. {
  5605. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5606. }
  5607. }
  5608. }
  5609. if (maid.status.personal.uniqueName == "Pure")
  5610. {
  5611. string text = "s2_";
  5612. Random random = new Random();
  5613. int num4 = random.Next(10000);
  5614. bool flag7 = false;
  5615. for (int k = 0; k < pureArray.Length; k++)
  5616. {
  5617. if (pureArray[k] == num4)
  5618. {
  5619. flag7 = true;
  5620. break;
  5621. }
  5622. }
  5623. if (!flag7)
  5624. {
  5625. text = text + "0" + num4.ToString() + ".ogg";
  5626. if (GameUty.FileSystem.IsExistentFile(text))
  5627. {
  5628. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5629. }
  5630. }
  5631. }
  5632. if (maid.status.personal.uniqueName == "Yandere")
  5633. {
  5634. string text = "s3_";
  5635. Random random = new Random();
  5636. int num4 = random.Next(10000);
  5637. bool flag7 = false;
  5638. for (int k = 0; k < yanArray.Length; k++)
  5639. {
  5640. if (yanArray[k] == num4)
  5641. {
  5642. flag7 = true;
  5643. break;
  5644. }
  5645. }
  5646. if (!flag7)
  5647. {
  5648. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5649. if (GameUty.FileSystem.IsExistentFile(text))
  5650. {
  5651. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5652. }
  5653. }
  5654. }
  5655. if (maid.status.personal.uniqueName == "Muku")
  5656. {
  5657. string text = "h0_";
  5658. Random random = new Random();
  5659. int num4 = random.Next(10000);
  5660. bool flag7 = false;
  5661. for (int k = 0; k < h0Array.Length; k++)
  5662. {
  5663. if (h0Array[k] == num4)
  5664. {
  5665. flag7 = true;
  5666. break;
  5667. }
  5668. }
  5669. if (flag7)
  5670. {
  5671. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5672. if (GameUty.FileSystem.IsExistentFile(text))
  5673. {
  5674. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5675. }
  5676. }
  5677. }
  5678. if (maid.status.personal.uniqueName == "Majime")
  5679. {
  5680. string text = "h1_";
  5681. Random random = new Random();
  5682. int num4 = random.Next(10000);
  5683. bool flag7 = false;
  5684. for (int k = 0; k < h1Array.Length; k++)
  5685. {
  5686. if (h1Array[k] == num4)
  5687. {
  5688. flag7 = true;
  5689. break;
  5690. }
  5691. }
  5692. if (flag7)
  5693. {
  5694. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5695. if (GameUty.FileSystem.IsExistentFile(text))
  5696. {
  5697. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5698. }
  5699. }
  5700. }
  5701. if (maid.status.personal.uniqueName == "Rindere")
  5702. {
  5703. string text = "h2_";
  5704. Random random = new Random();
  5705. int num4 = random.Next(10000);
  5706. bool flag7 = false;
  5707. for (int k = 0; k < h2Array.Length; k++)
  5708. {
  5709. if (h2Array[k] == num4)
  5710. {
  5711. flag7 = true;
  5712. break;
  5713. }
  5714. }
  5715. if (flag7)
  5716. {
  5717. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5718. if (GameUty.FileSystem.IsExistentFile(text))
  5719. {
  5720. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5721. }
  5722. }
  5723. }
  5724. }
  5725. else
  5726. {
  5727. xFlg[i] = false;
  5728. maid.AudioMan.Clear();
  5729. }
  5730. idoFlg[i] = true;
  5731. }
  5732. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5733. {
  5734. if (!zFlg[i])
  5735. {
  5736. zFlg[i] = true;
  5737. xFlg[i] = false;
  5738. string text = "";
  5739. if (maid.status.personal.uniqueName == "Pride")
  5740. {
  5741. text = "s0_";
  5742. Random random = new Random();
  5743. int num4 = random.Next(tunArray.Length);
  5744. object obj = text;
  5745. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5746. }
  5747. if (maid.status.personal.uniqueName == "Cool")
  5748. {
  5749. text = "s1_";
  5750. Random random = new Random();
  5751. int num4 = random.Next(coolArray.Length);
  5752. object obj = text;
  5753. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5754. }
  5755. if (maid.status.personal.uniqueName == "Pure")
  5756. {
  5757. text = "s2_";
  5758. Random random = new Random();
  5759. int num4 = random.Next(pureArray.Length);
  5760. object obj = text;
  5761. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5762. }
  5763. if (maid.status.personal.uniqueName == "Yandere")
  5764. {
  5765. text = "s3_";
  5766. Random random = new Random();
  5767. int num4 = random.Next(yanArray.Length);
  5768. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5769. }
  5770. if (maid.status.personal.uniqueName == "Muku")
  5771. {
  5772. text = "h0_";
  5773. Random random = new Random();
  5774. int num4 = random.Next(h0tArray.Length);
  5775. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5776. }
  5777. if (maid.status.personal.uniqueName == "Majime")
  5778. {
  5779. text = "h1_";
  5780. Random random = new Random();
  5781. int num4 = random.Next(h1tArray.Length);
  5782. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5783. }
  5784. if (maid.status.personal.uniqueName == "Rindere")
  5785. {
  5786. text = "h2_";
  5787. Random random = new Random();
  5788. int num4 = random.Next(h2tArray.Length);
  5789. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5790. }
  5791. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5792. }
  5793. else
  5794. {
  5795. zFlg[i] = false;
  5796. maid.AudioMan.Clear();
  5797. }
  5798. idoFlg[i] = true;
  5799. }
  5800. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5801. {
  5802. string text = "";
  5803. if (maid.status.personal.uniqueName == "Pride")
  5804. {
  5805. text = "s0_";
  5806. Random random = new Random();
  5807. int num4 = random.Next(tunArray.Length);
  5808. object obj = text;
  5809. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5810. }
  5811. if (maid.status.personal.uniqueName == "Cool")
  5812. {
  5813. text = "s1_";
  5814. Random random = new Random();
  5815. int num4 = random.Next(coolArray.Length);
  5816. object obj = text;
  5817. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5818. }
  5819. if (maid.status.personal.uniqueName == "Pure")
  5820. {
  5821. text = "s2_";
  5822. Random random = new Random();
  5823. int num4 = random.Next(pureArray.Length);
  5824. object obj = text;
  5825. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5826. }
  5827. if (maid.status.personal.uniqueName == "Yandere")
  5828. {
  5829. text = "s3_";
  5830. Random random = new Random();
  5831. int num4 = random.Next(yanArray.Length);
  5832. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5833. }
  5834. if (maid.status.personal.uniqueName == "Muku")
  5835. {
  5836. text = "h0_";
  5837. Random random = new Random();
  5838. int num4 = random.Next(h0tArray.Length);
  5839. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5840. }
  5841. if (maid.status.personal.uniqueName == "Majime")
  5842. {
  5843. text = "h1_";
  5844. Random random = new Random();
  5845. int num4 = random.Next(h1tArray.Length);
  5846. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5847. }
  5848. if (maid.status.personal.uniqueName == "Rindere")
  5849. {
  5850. text = "h2_";
  5851. Random random = new Random();
  5852. int num4 = random.Next(h2tArray.Length);
  5853. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5854. }
  5855. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5856. idoFlg[i] = true;
  5857. }
  5858. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5859. {
  5860. if (maid.status.personal.uniqueName == "Pride")
  5861. {
  5862. string text = "s0_";
  5863. Random random = new Random();
  5864. int num4 = random.Next(10000);
  5865. bool flag7 = false;
  5866. for (int k = 0; k < tunArray.Length; k++)
  5867. {
  5868. if (tunArray[k] == num4)
  5869. {
  5870. flag7 = true;
  5871. break;
  5872. }
  5873. }
  5874. if (!flag7)
  5875. {
  5876. text = text + "0" + num4.ToString() + ".ogg";
  5877. if (GameUty.FileSystem.IsExistentFile(text))
  5878. {
  5879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5880. }
  5881. }
  5882. }
  5883. if (maid.status.personal.uniqueName == "Cool")
  5884. {
  5885. string text = "s1_";
  5886. Random random = new Random();
  5887. int num4 = random.Next(10000);
  5888. bool flag7 = false;
  5889. for (int k = 0; k < coolArray.Length; k++)
  5890. {
  5891. if (coolArray[k] == num4)
  5892. {
  5893. flag7 = true;
  5894. break;
  5895. }
  5896. }
  5897. if (!flag7)
  5898. {
  5899. text = text + "0" + num4.ToString() + ".ogg";
  5900. if (GameUty.FileSystem.IsExistentFile(text))
  5901. {
  5902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5903. }
  5904. }
  5905. }
  5906. if (maid.status.personal.uniqueName == "Pure")
  5907. {
  5908. string text = "s2_";
  5909. Random random = new Random();
  5910. int num4 = random.Next(10000);
  5911. bool flag7 = false;
  5912. for (int k = 0; k < pureArray.Length; k++)
  5913. {
  5914. if (pureArray[k] == num4)
  5915. {
  5916. flag7 = true;
  5917. break;
  5918. }
  5919. }
  5920. if (!flag7)
  5921. {
  5922. text = text + "0" + num4.ToString() + ".ogg";
  5923. if (GameUty.FileSystem.IsExistentFile(text))
  5924. {
  5925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5926. }
  5927. }
  5928. }
  5929. if (maid.status.personal.uniqueName == "Yandere")
  5930. {
  5931. string text = "s3_";
  5932. Random random = new Random();
  5933. int num4 = random.Next(10000);
  5934. bool flag7 = false;
  5935. for (int k = 0; k < yanArray.Length; k++)
  5936. {
  5937. if (yanArray[k] == num4)
  5938. {
  5939. flag7 = true;
  5940. break;
  5941. }
  5942. }
  5943. if (!flag7)
  5944. {
  5945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5946. if (GameUty.FileSystem.IsExistentFile(text))
  5947. {
  5948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5949. }
  5950. }
  5951. }
  5952. if (maid.status.personal.uniqueName == "Muku")
  5953. {
  5954. string text = "h0_";
  5955. Random random = new Random();
  5956. int num4 = random.Next(10000);
  5957. bool flag7 = false;
  5958. for (int k = 0; k < h0Array.Length; k++)
  5959. {
  5960. if (h0Array[k] == num4)
  5961. {
  5962. flag7 = true;
  5963. break;
  5964. }
  5965. }
  5966. if (flag7)
  5967. {
  5968. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5969. if (GameUty.FileSystem.IsExistentFile(text))
  5970. {
  5971. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5972. }
  5973. }
  5974. }
  5975. if (maid.status.personal.uniqueName == "Majime")
  5976. {
  5977. string text = "h1_";
  5978. Random random = new Random();
  5979. int num4 = random.Next(10000);
  5980. bool flag7 = false;
  5981. for (int k = 0; k < h1Array.Length; k++)
  5982. {
  5983. if (h1Array[k] == num4)
  5984. {
  5985. flag7 = true;
  5986. break;
  5987. }
  5988. }
  5989. if (flag7)
  5990. {
  5991. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5992. if (GameUty.FileSystem.IsExistentFile(text))
  5993. {
  5994. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5995. }
  5996. }
  5997. }
  5998. if (maid.status.personal.uniqueName == "Rindere")
  5999. {
  6000. string text = "h2_";
  6001. Random random = new Random();
  6002. int num4 = random.Next(10000);
  6003. bool flag7 = false;
  6004. for (int k = 0; k < h2Array.Length; k++)
  6005. {
  6006. if (h2Array[k] == num4)
  6007. {
  6008. flag7 = true;
  6009. break;
  6010. }
  6011. }
  6012. if (flag7)
  6013. {
  6014. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6015. if (GameUty.FileSystem.IsExistentFile(text))
  6016. {
  6017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6018. }
  6019. }
  6020. }
  6021. idoFlg[i] = true;
  6022. }
  6023. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6024. {
  6025. Vector3 vector = maid.transform.position;
  6026. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6027. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6028. maid.SetPos(vector);
  6029. idoFlg[i] = true;
  6030. }
  6031. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6032. {
  6033. Vector3 vector = maid.transform.position;
  6034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6035. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6036. maid.SetPos(vector);
  6037. idoFlg[i] = true;
  6038. }
  6039. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6040. {
  6041. Vector3 vector = maid.transform.position;
  6042. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6043. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6044. maid.SetPos(vector);
  6045. idoFlg[i] = true;
  6046. }
  6047. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6048. {
  6049. Vector3 vector = maid.transform.position;
  6050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6051. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6052. maid.SetPos(vector);
  6053. idoFlg[i] = true;
  6054. }
  6055. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6056. {
  6057. Vector3 vector = maid.transform.position;
  6058. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6059. maid.SetPos(vector);
  6060. idoFlg[i] = true;
  6061. }
  6062. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6063. {
  6064. Vector3 vector = maid.transform.position;
  6065. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6066. maid.SetPos(vector);
  6067. idoFlg[i] = true;
  6068. }
  6069. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6070. {
  6071. Vector3 vector = maid.transform.position;
  6072. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6073. maid.SetPos(vector);
  6074. idoFlg[i] = true;
  6075. }
  6076. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6077. {
  6078. Vector3 vector = maid.transform.position;
  6079. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6080. maid.SetPos(vector);
  6081. idoFlg[i] = true;
  6082. }
  6083. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6084. {
  6085. Vector3 vector = maid.transform.position;
  6086. vector.y += 0.0075f * speed;
  6087. maid.SetPos(vector);
  6088. idoFlg[i] = true;
  6089. }
  6090. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6091. {
  6092. Vector3 vector = maid.transform.position;
  6093. vector.y -= 0.0075f * speed;
  6094. maid.SetPos(vector);
  6095. idoFlg[i] = true;
  6096. }
  6097. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6098. {
  6099. faceIndex[i]--;
  6100. if (faceIndex[i] <= -1)
  6101. {
  6102. faceIndex[i] = faceArray.Length - 1;
  6103. }
  6104. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6105. idoFlg[i] = true;
  6106. }
  6107. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6108. {
  6109. faceIndex[i]++;
  6110. if (faceIndex[i] == faceArray.Length)
  6111. {
  6112. faceIndex[i] = 0;
  6113. }
  6114. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6115. idoFlg[i] = true;
  6116. }
  6117. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6118. {
  6119. faceBlendIndex[i]++;
  6120. if (faceBlendIndex[i] == faceBlendArray.Length)
  6121. {
  6122. faceBlendIndex[i] = 0;
  6123. }
  6124. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6125. idoFlg[i] = true;
  6126. }
  6127. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6128. {
  6129. idoFlg[i] = true;
  6130. if (i >= 7)
  6131. {
  6132. idoFlg[i - 7] = true;
  6133. }
  6134. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6135. maid.transform.localScale.y * 1.005f,
  6136. maid.transform.localScale.z * 1.005f);
  6137. }
  6138. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6139. {
  6140. idoFlg[i] = true;
  6141. if (i >= 7)
  6142. {
  6143. idoFlg[i - 7] = true;
  6144. }
  6145. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6146. maid.transform.localScale.y * 0.995f,
  6147. maid.transform.localScale.z * 0.995f);
  6148. }
  6149. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6150. {
  6151. idoFlg[i] = true;
  6152. if (i >= 7)
  6153. {
  6154. idoFlg[i - 7] = true;
  6155. }
  6156. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6159. {
  6160. if (!isVR)
  6161. {
  6162. if (goSlot[(int)selectList[i]] != null)
  6163. {
  6164. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6165. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6166. {
  6167. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6168. }
  6169. }
  6170. }
  6171. maid.body0.SetMask(TBody.SlotID.wear, true);
  6172. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6173. maid.body0.SetMask(TBody.SlotID.bra, true);
  6174. maid.body0.SetMask(TBody.SlotID.panz, true);
  6175. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6176. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6177. isWear = true;
  6178. isSkirt = true;
  6179. isBra = true;
  6180. isPanz = true;
  6181. Random random = new Random();
  6182. int num4 = random.Next(2);
  6183. if (num4 == 1)
  6184. {
  6185. maid.body0.SetMask(TBody.SlotID.wear, false);
  6186. }
  6187. if (num4 == 1)
  6188. {
  6189. isWear = false;
  6190. }
  6191. num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isSkirt = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.bra, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isBra = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.panz, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isPanz = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6222. }
  6223. num4 = random.Next(2);
  6224. if (num4 == 1)
  6225. {
  6226. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6227. }
  6228. hFlg = true;
  6229. idoFlg[i] = true;
  6230. if (i >= 7)
  6231. {
  6232. idoFlg[i - 7] = true;
  6233. }
  6234. }
  6235. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6236. {
  6237. poseIndex[i]--;
  6238. if (poseIndex[i] <= -1)
  6239. {
  6240. poseIndex[i] = poseArray.Length - 1;
  6241. }
  6242. if (maid && maid.Visible)
  6243. {
  6244. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6245. isStop[i] = false;
  6246. poseCount[i] = 20;
  6247. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6248. {
  6249. maid.body0.MuneYureL(0f);
  6250. maid.body0.MuneYureR(0f);
  6251. }
  6252. else
  6253. {
  6254. maid.body0.MuneYureL(1f);
  6255. maid.body0.MuneYureR(1f);
  6256. }
  6257. if (array[0].Contains("MultipleMaidsPose"))
  6258. {
  6259. string path = array[0].Split(new char[] { '/' })[1];
  6260. byte[] array2 = new byte[0];
  6261. try
  6262. {
  6263. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6264. {
  6265. array2 = new byte[fileStream.Length];
  6266. fileStream.Read(array2, 0, array2.Length);
  6267. }
  6268. }
  6269. catch { }
  6270. if (0 < array2.Length)
  6271. {
  6272. string text = Path.GetFileName(path);
  6273. long num5 = text.GetHashCode();
  6274. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6275. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6276. {
  6277. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6278. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6279. };
  6280. for (int m = 0; m < array3.Length; m++)
  6281. {
  6282. maid.SetAutoTwist(array3[m], true);
  6283. }
  6284. }
  6285. }
  6286. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6287. {
  6288. loadPose[i] = array[0];
  6289. }
  6290. else if (!array[0].StartsWith("dance_"))
  6291. {
  6292. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6293. }
  6294. else
  6295. {
  6296. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6297. {
  6298. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6299. }
  6300. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6301. }
  6302. if (array.Length > 1)
  6303. {
  6304. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6305. isStop[i] = true;
  6306. if (array.Length > 2)
  6307. {
  6308. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6309. isPoseIti[i] = true;
  6310. poseIti[i] = maidArray[i].transform.position;
  6311. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6312. }
  6313. }
  6314. }
  6315. idoFlg[i] = true;
  6316. if (i >= 7)
  6317. {
  6318. idoFlg[i - 7] = true;
  6319. }
  6320. }
  6321. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6322. {
  6323. int num7 = poseIndex[i];
  6324. for (int k = 0; k < groupList.Count; k++)
  6325. {
  6326. if (poseIndex[i] < (int)groupList[k])
  6327. {
  6328. poseIndex[i] = (int)groupList[k];
  6329. break;
  6330. }
  6331. }
  6332. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6333. {
  6334. poseIndex[i] = 0;
  6335. }
  6336. if (maid && maid.Visible)
  6337. {
  6338. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6339. isStop[i] = false;
  6340. poseCount[i] = 20;
  6341. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6342. {
  6343. maid.body0.MuneYureL(0f);
  6344. maid.body0.MuneYureR(0f);
  6345. }
  6346. else
  6347. {
  6348. maid.body0.MuneYureL(1f);
  6349. maid.body0.MuneYureR(1f);
  6350. }
  6351. if (array[0].Contains("MultipleMaidsPose"))
  6352. {
  6353. string path = array[0].Split(new char[] { '/' })[1];
  6354. byte[] array2 = new byte[0];
  6355. try
  6356. {
  6357. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6358. {
  6359. array2 = new byte[fileStream.Length];
  6360. fileStream.Read(array2, 0, array2.Length);
  6361. }
  6362. }
  6363. catch { }
  6364. if (0 < array2.Length)
  6365. {
  6366. string text = Path.GetFileName(path);
  6367. long num5 = text.GetHashCode();
  6368. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6369. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6370. {
  6371. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6372. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6373. };
  6374. for (int m = 0; m < array3.Length; m++)
  6375. {
  6376. maid.SetAutoTwist(array3[m], true);
  6377. }
  6378. }
  6379. }
  6380. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6381. {
  6382. loadPose[i] = array[0];
  6383. }
  6384. else if (!array[0].StartsWith("dance_"))
  6385. {
  6386. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6387. }
  6388. else
  6389. {
  6390. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6391. {
  6392. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6393. }
  6394. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6395. }
  6396. if (array.Length > 1)
  6397. {
  6398. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6399. isStop[i] = true;
  6400. if (array.Length > 2)
  6401. {
  6402. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6403. isPoseIti[i] = true;
  6404. poseIti[i] = maidArray[i].transform.position;
  6405. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6406. }
  6407. }
  6408. }
  6409. idoFlg[i] = true;
  6410. if (i >= 7)
  6411. {
  6412. idoFlg[i - 7] = true;
  6413. }
  6414. }
  6415. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6416. {
  6417. for (int k = 0; k < groupList.Count; k++)
  6418. {
  6419. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6420. {
  6421. if (poseIndex[i] == 0)
  6422. {
  6423. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6424. }
  6425. else
  6426. {
  6427. poseIndex[i] = 0;
  6428. }
  6429. break;
  6430. }
  6431. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6432. {
  6433. poseIndex[i] = (int)groupList[k - 1];
  6434. break;
  6435. }
  6436. }
  6437. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6438. {
  6439. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6440. }
  6441. if (maid && maid.Visible)
  6442. {
  6443. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6444. isStop[i] = false;
  6445. poseCount[i] = 20;
  6446. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6447. {
  6448. maid.body0.MuneYureL(0f);
  6449. maid.body0.MuneYureR(0f);
  6450. }
  6451. else
  6452. {
  6453. maid.body0.MuneYureL(1f);
  6454. maid.body0.MuneYureR(1f);
  6455. }
  6456. if (array[0].Contains("MultipleMaidsPose"))
  6457. {
  6458. string path = array[0].Split(new char[] { '/' })[1];
  6459. byte[] array2 = new byte[0];
  6460. try
  6461. {
  6462. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6463. {
  6464. array2 = new byte[fileStream.Length];
  6465. fileStream.Read(array2, 0, array2.Length);
  6466. }
  6467. }
  6468. catch { }
  6469. if (0 < array2.Length)
  6470. {
  6471. string text = Path.GetFileName(path);
  6472. long num5 = text.GetHashCode();
  6473. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6474. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6475. {
  6476. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6477. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6478. };
  6479. for (int m = 0; m < array3.Length; m++)
  6480. {
  6481. maid.SetAutoTwist(array3[m], true);
  6482. }
  6483. }
  6484. }
  6485. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6486. {
  6487. loadPose[i] = array[0];
  6488. }
  6489. else if (!array[0].StartsWith("dance_"))
  6490. {
  6491. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6492. }
  6493. else
  6494. {
  6495. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6496. {
  6497. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6498. }
  6499. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6500. }
  6501. if (array.Length > 1)
  6502. {
  6503. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6504. isStop[i] = true;
  6505. if (array.Length > 2)
  6506. {
  6507. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6508. isPoseIti[i] = true;
  6509. poseIti[i] = maidArray[i].transform.position;
  6510. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6511. }
  6512. }
  6513. }
  6514. idoFlg[i] = true;
  6515. if (i >= 7)
  6516. {
  6517. idoFlg[i - 7] = true;
  6518. }
  6519. }
  6520. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6521. {
  6522. headEyeIndex[i]++;
  6523. if (headEyeIndex[i] == headEyeArray.Length)
  6524. {
  6525. headEyeIndex[i] = 0;
  6526. }
  6527. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6528. maid.body0.boHeadToCam = true;
  6529. maid.body0.boEyeToCam = true;
  6530. if (headEyeIndex[i] == 0)
  6531. {
  6532. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6533. maid.body0.boHeadToCam = true;
  6534. maid.body0.boEyeToCam = true;
  6535. }
  6536. else
  6537. {
  6538. maid.body0.trsLookTarget = null;
  6539. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6540. if (headEyeIndex[i] == 1)
  6541. {
  6542. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6543. }
  6544. if (headEyeIndex[i] == 2)
  6545. {
  6546. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6547. }
  6548. if (headEyeIndex[i] == 3)
  6549. {
  6550. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6551. }
  6552. if (headEyeIndex[i] == 4)
  6553. {
  6554. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6555. }
  6556. if (headEyeIndex[i] == 5)
  6557. {
  6558. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6559. }
  6560. if (headEyeIndex[i] == 6)
  6561. {
  6562. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6563. }
  6564. if (headEyeIndex[i] == 7)
  6565. {
  6566. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6567. }
  6568. if (headEyeIndex[i] == 8)
  6569. {
  6570. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6571. }
  6572. if (headEyeIndex[i] == 9)
  6573. {
  6574. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6575. }
  6576. }
  6577. idoFlg[i] = true;
  6578. if (i >= 7)
  6579. {
  6580. idoFlg[i - 7] = true;
  6581. }
  6582. }
  6583. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6584. {
  6585. idoFlg[i] = true;
  6586. if (i >= 7)
  6587. {
  6588. idoFlg[i - 7] = true;
  6589. }
  6590. }
  6591. else if (Input.GetKeyUp(key))
  6592. {
  6593. if (idoFlg[i])
  6594. {
  6595. idoFlg[i] = false;
  6596. }
  6597. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6598. {
  6599. if (!isLock[i])
  6600. {
  6601. poseIndex[i]++;
  6602. if (poseIndex[i] == poseArray.Length)
  6603. {
  6604. poseIndex[i] = 0;
  6605. }
  6606. if (maid && maid.Visible)
  6607. {
  6608. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6609. isStop[i] = false;
  6610. poseCount[i] = 20;
  6611. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6612. {
  6613. maid.body0.MuneYureL(0f);
  6614. maid.body0.MuneYureR(0f);
  6615. }
  6616. else
  6617. {
  6618. maid.body0.MuneYureL(1f);
  6619. maid.body0.MuneYureR(1f);
  6620. }
  6621. if (array[0].Contains("MultipleMaidsPose"))
  6622. {
  6623. string path = array[0].Split(new char[] { '/' })[1];
  6624. byte[] array2 = new byte[0];
  6625. try
  6626. {
  6627. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6628. {
  6629. array2 = new byte[fileStream.Length];
  6630. fileStream.Read(array2, 0, array2.Length);
  6631. }
  6632. }
  6633. catch { }
  6634. if (0 < array2.Length)
  6635. {
  6636. string text = Path.GetFileName(path);
  6637. long num5 = text.GetHashCode();
  6638. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6639. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6640. {
  6641. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6642. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6643. };
  6644. for (int m = 0; m < array3.Length; m++)
  6645. {
  6646. maid.SetAutoTwist(array3[m], true);
  6647. }
  6648. }
  6649. }
  6650. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6651. {
  6652. loadPose[i] = array[0];
  6653. }
  6654. else if (!array[0].StartsWith("dance_"))
  6655. {
  6656. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6657. }
  6658. else
  6659. {
  6660. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6661. {
  6662. maid.body0.LoadAnime(array[0] + ".anm",
  6663. GameUty.FileSystem,
  6664. array[0] + ".anm",
  6665. false,
  6666. false);
  6667. }
  6668. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6669. }
  6670. if (array.Length > 1)
  6671. {
  6672. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6673. isStop[i] = true;
  6674. if (array.Length > 2)
  6675. {
  6676. Transform transform2 =
  6677. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6678. isPoseIti[i] = true;
  6679. poseIti[i] = maidArray[i].transform.position;
  6680. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6681. }
  6682. }
  6683. }
  6684. }
  6685. }
  6686. }
  6687. goto IL_1688E;
  6688. }
  6689. }
  6690. if (Input.GetKeyDown(KeyCode.E)) { }
  6691. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6692. {
  6693. bGui = false;
  6694. }
  6695. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6696. {
  6697. sceneFlg = true;
  6698. bGui = true;
  6699. if (!sceneManagerInitialize) InitializeSceneManager();
  6700. }
  6701. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6702. {
  6703. bgmIndex--;
  6704. if (bgmIndex <= -1)
  6705. {
  6706. bgmIndex = bgmArray.Length - 1;
  6707. }
  6708. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6709. bgmCombo.selectedItemIndex = bgmIndex;
  6710. }
  6711. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6712. {
  6713. bgmIndex++;
  6714. if (bgmIndex == bgmArray.Length)
  6715. {
  6716. bgmIndex = 0;
  6717. }
  6718. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6719. bgmCombo.selectedItemIndex = bgmIndex;
  6720. }
  6721. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6722. {
  6723. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6724. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6725. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6726. if (isMessage)
  6727. {
  6728. isMessage = false;
  6729. messageWindowMgr.CloseMessageWindowPanel();
  6730. }
  6731. else if (!bGuiMessage)
  6732. {
  6733. bGuiMessage = true;
  6734. }
  6735. else
  6736. {
  6737. bGuiMessage = false;
  6738. isMessage = false;
  6739. messageWindowMgr.CloseMessageWindowPanel();
  6740. }
  6741. }
  6742. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6743. {
  6744. escFlg = true;
  6745. for (int j = 0; j < maidCnt; j++)
  6746. {
  6747. if (maidArray[j] && maidArray[j].Visible)
  6748. {
  6749. maidArray[j].StopKuchipakuPattern();
  6750. if (isDanceStart7V)
  6751. {
  6752. maidArray[j].SetPos(dancePos[j]);
  6753. maidArray[j].body0.transform.localRotation = danceRot[j];
  6754. }
  6755. if (isDanceStart8V)
  6756. {
  6757. maidArray[j].SetPos(dancePos[j]);
  6758. maidArray[j].body0.transform.localRotation = danceRot[j];
  6759. }
  6760. if (isDanceStart11V)
  6761. {
  6762. maidArray[j].SetPos(dancePos[j]);
  6763. maidArray[j].body0.transform.localRotation = danceRot[j];
  6764. }
  6765. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6766. || isDanceStart13K)
  6767. {
  6768. maidArray[j].SetPos(dancePos[j]);
  6769. maidArray[j].body0.transform.localRotation = danceRot[j];
  6770. int i = j;
  6771. if (!isVR)
  6772. {
  6773. delCount[i] = 20;
  6774. if (goSlot[(int)selectList[i]] != null)
  6775. {
  6776. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6777. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6778. {
  6779. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6780. }
  6781. }
  6782. }
  6783. Maid maid = maidArray[j];
  6784. maid.DelProp(MPN.handitem, true);
  6785. maid.DelProp(MPN.accvag, true);
  6786. maid.DelProp(MPN.accanl, true);
  6787. maid.DelProp(MPN.kousoku_upper, true);
  6788. maid.DelProp(MPN.kousoku_lower, true);
  6789. maid.AllProcPropSeqStart();
  6790. }
  6791. if (isDanceStart14V)
  6792. {
  6793. maidArray[j].SetPos(dancePos[j]);
  6794. maidArray[j].body0.transform.localRotation = danceRot[j];
  6795. }
  6796. if (isDanceStart15V)
  6797. {
  6798. maidArray[j].SetPos(dancePos[j]);
  6799. maidArray[j].body0.transform.localRotation = danceRot[j];
  6800. }
  6801. }
  6802. }
  6803. isDanceStart1F = false;
  6804. isDanceStart1K = false;
  6805. isDanceStart2F = false;
  6806. isDanceStart3F = false;
  6807. isDanceStart3K = false;
  6808. isDanceStart4F = false;
  6809. isDanceStart4K = false;
  6810. isDanceStart5F = false;
  6811. isDanceStart5K = false;
  6812. isDanceStart6F = false;
  6813. isDanceStart6K = false;
  6814. isDanceStart7F = false;
  6815. isDanceStart7V = false;
  6816. isDanceStart8F = false;
  6817. isDanceStart8V = false;
  6818. isDanceStart8P = false;
  6819. isDanceStart9F = false;
  6820. isDanceStart9K = false;
  6821. isDanceStart10F = false;
  6822. isDanceStart11F = false;
  6823. isDanceStart11V = false;
  6824. isDanceStart12F = false;
  6825. isDanceStart13F = false;
  6826. isDanceStart13K = false;
  6827. isDanceStart14F = false;
  6828. isDanceStart14V = false;
  6829. isDanceStart15F = false;
  6830. isDanceStart15V = false;
  6831. for (int j = 0; j < maidCnt; j++)
  6832. {
  6833. danceFace[j] = 0f;
  6834. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6835. maidArray[j].SetAutoTwistAll(true);
  6836. }
  6837. danceCheckIndex = 0;
  6838. for (int k = 0; k < danceCheck.Length; k++)
  6839. {
  6840. danceCheck[danceCheckIndex] = 1f;
  6841. }
  6842. isDance = false;
  6843. isDanceChu = false;
  6844. if (maidArray[1] && maidArray[1].Visible)
  6845. {
  6846. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6847. {
  6848. Vector3 vector = Vector3.zero;
  6849. vector.x = 0.6f;
  6850. maidArray[1].SetPos(vector);
  6851. if (maidArray[2] && maidArray[2].Visible)
  6852. {
  6853. vector.x = -0.6f;
  6854. maidArray[2].SetPos(vector);
  6855. }
  6856. if (maidArray[3] && maidArray[3].Visible)
  6857. {
  6858. vector.x = 1.2f;
  6859. maidArray[3].SetPos(vector);
  6860. }
  6861. if (maidArray[4] && maidArray[4].Visible)
  6862. {
  6863. vector.x = -1.2f;
  6864. maidArray[4].SetPos(vector);
  6865. }
  6866. if (maidArray[5] && maidArray[5].Visible)
  6867. {
  6868. vector.x = 1.8f;
  6869. maidArray[5].SetPos(vector);
  6870. }
  6871. if (maidArray[6] && maidArray[6].Visible)
  6872. {
  6873. vector.x = -1.8f;
  6874. maidArray[6].SetPos(vector);
  6875. }
  6876. if (maidArray[7] && maidArray[7].Visible)
  6877. {
  6878. vector.x = 2.4f;
  6879. maidArray[7].SetPos(vector);
  6880. }
  6881. if (maidArray[8] && maidArray[8].Visible)
  6882. {
  6883. vector.x = -2.4f;
  6884. maidArray[8].SetPos(vector);
  6885. }
  6886. if (maidArray[9] && maidArray[9].Visible)
  6887. {
  6888. vector.x = 3f;
  6889. maidArray[9].SetPos(vector);
  6890. }
  6891. if (maidArray[10] && maidArray[10].Visible)
  6892. {
  6893. vector.x = -3f;
  6894. maidArray[10].SetPos(vector);
  6895. }
  6896. if (maidArray[11] && maidArray[11].Visible)
  6897. {
  6898. vector.x = 3.6f;
  6899. maidArray[11].SetPos(vector);
  6900. }
  6901. if (maidArray[12] && maidArray[12].Visible)
  6902. {
  6903. vector.x = -3.6f;
  6904. maidArray[12].SetPos(vector);
  6905. }
  6906. if (maidArray[13] && maidArray[13].Visible)
  6907. {
  6908. vector.x = 4.2f;
  6909. maidArray[13].SetPos(vector);
  6910. }
  6911. }
  6912. }
  6913. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6914. }
  6915. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6916. {
  6917. if (isScript)
  6918. {
  6919. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6920. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6921. if (isPanel)
  6922. {
  6923. isPanel = false;
  6924. }
  6925. else
  6926. {
  6927. isPanel = true;
  6928. }
  6929. gameObject5.SetActive(isPanel);
  6930. }
  6931. else
  6932. {
  6933. bGui = !bGui;
  6934. }
  6935. }
  6936. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6937. {
  6938. keyFlg = true;
  6939. bgIndex--;
  6940. if (bgIndex <= -1)
  6941. {
  6942. bgIndex = bgArray.Length - 1;
  6943. }
  6944. if (!moveBg)
  6945. {
  6946. bg.localScale = new Vector3(1f, 1f, 1f);
  6947. if (bgArray[bgIndex].Length == 36)
  6948. {
  6949. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6950. }
  6951. else
  6952. {
  6953. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6954. }
  6955. bgCombo.selectedItemIndex = bgIndex;
  6956. if (bgArray[bgIndex] == "karaokeroom")
  6957. {
  6958. bg.transform.position = bgObject.transform.position;
  6959. Vector3 vector = Vector3.zero;
  6960. Vector3 zero3 = Vector3.zero;
  6961. zero3.y = 90f;
  6962. vector.z = 4f;
  6963. vector.x = 1f;
  6964. bg.transform.localPosition = vector;
  6965. bg.transform.localRotation = Quaternion.Euler(zero3);
  6966. }
  6967. }
  6968. }
  6969. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6970. {
  6971. keyFlg = true;
  6972. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6973. }
  6974. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6975. {
  6976. keyFlg = true;
  6977. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6978. }
  6979. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6980. {
  6981. keyFlg = true;
  6982. bg.localScale = new Vector3(1f, 1f, 1f);
  6983. }
  6984. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6985. {
  6986. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6987. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6988. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6989. Vector3 vector = bg.position;
  6990. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6991. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6992. bg.localPosition = vector;
  6993. if (Input.GetKey(KeyCode.Y))
  6994. {
  6995. keyFlg = true;
  6996. }
  6997. }
  6998. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  6999. {
  7000. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7001. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7002. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7003. Vector3 vector = bg.position;
  7004. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7005. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7006. bg.localPosition = vector;
  7007. if (Input.GetKey(KeyCode.Y))
  7008. {
  7009. keyFlg = true;
  7010. }
  7011. }
  7012. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7013. {
  7014. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7015. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7016. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7017. Vector3 vector = bg.position;
  7018. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7019. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7020. bg.localPosition = vector;
  7021. if (Input.GetKey(KeyCode.Y))
  7022. {
  7023. keyFlg = true;
  7024. }
  7025. }
  7026. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7027. {
  7028. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7029. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7030. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7031. Vector3 vector = bg.position;
  7032. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7033. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7034. bg.localPosition = vector;
  7035. if (Input.GetKey(KeyCode.Y))
  7036. {
  7037. keyFlg = true;
  7038. }
  7039. }
  7040. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7041. {
  7042. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7043. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7044. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7045. Vector3 vector = bg.position;
  7046. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7047. bg.localPosition = vector;
  7048. if (Input.GetKey(KeyCode.Y))
  7049. {
  7050. keyFlg = true;
  7051. }
  7052. }
  7053. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7054. {
  7055. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7056. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7057. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7058. Vector3 vector = bg.position;
  7059. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7060. bg.localPosition = vector;
  7061. if (Input.GetKey(KeyCode.Y))
  7062. {
  7063. keyFlg = true;
  7064. }
  7065. }
  7066. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7067. {
  7068. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7069. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7070. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7071. Vector3 vector = bg.position;
  7072. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7073. bg.localPosition = vector;
  7074. if (Input.GetKey(KeyCode.Y))
  7075. {
  7076. keyFlg = true;
  7077. }
  7078. }
  7079. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7080. {
  7081. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7082. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7083. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7084. Vector3 vector = bg.position;
  7085. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7086. bg.localPosition = vector;
  7087. if (Input.GetKey(KeyCode.Y))
  7088. {
  7089. keyFlg = true;
  7090. }
  7091. }
  7092. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7093. {
  7094. Vector3 vector = bg.position;
  7095. vector.y -= 0.015f * speed;
  7096. bg.localPosition = vector;
  7097. if (Input.GetKey(KeyCode.Y))
  7098. {
  7099. keyFlg = true;
  7100. }
  7101. }
  7102. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7103. {
  7104. Vector3 vector = bg.position;
  7105. vector.y += 0.015f * speed;
  7106. bg.localPosition = vector;
  7107. if (Input.GetKey(KeyCode.Y))
  7108. {
  7109. keyFlg = true;
  7110. }
  7111. }
  7112. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7113. {
  7114. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7115. if (Input.GetKey(KeyCode.Y))
  7116. {
  7117. keyFlg = true;
  7118. }
  7119. }
  7120. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7121. {
  7122. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7123. if (Input.GetKey(KeyCode.Y))
  7124. {
  7125. keyFlg = true;
  7126. }
  7127. }
  7128. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7129. {
  7130. if (Input.GetKey(KeyCode.Y))
  7131. {
  7132. keyFlg = true;
  7133. }
  7134. }
  7135. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7136. {
  7137. if (keyFlg)
  7138. {
  7139. keyFlg = false;
  7140. }
  7141. else
  7142. {
  7143. bgIndex++;
  7144. if (bgIndex == bgArray.Length)
  7145. {
  7146. bgIndex = 0;
  7147. }
  7148. if (!moveBg)
  7149. {
  7150. bg.localScale = new Vector3(1f, 1f, 1f);
  7151. if (bgArray[bgIndex].Length == 36)
  7152. {
  7153. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7154. }
  7155. else
  7156. {
  7157. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7158. }
  7159. bgCombo.selectedItemIndex = bgIndex;
  7160. if (bgArray[bgIndex] == "karaokeroom")
  7161. {
  7162. bg.transform.position = bgObject.transform.position;
  7163. Vector3 vector = Vector3.zero;
  7164. Vector3 zero3 = Vector3.zero;
  7165. zero3.y = 90f;
  7166. vector.z = 4f;
  7167. vector.x = 1f;
  7168. bg.transform.localPosition = vector;
  7169. bg.transform.localRotation = Quaternion.Euler(zero3);
  7170. }
  7171. }
  7172. }
  7173. }
  7174. if (maidArray[0] != null && maidArray[0].Visible)
  7175. {
  7176. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7177. {
  7178. int[] array6 = new int[1];
  7179. int[] array7 = array6;
  7180. if (maidCnt == 2)
  7181. {
  7182. array7 = new int[] { 0, 1 };
  7183. }
  7184. if (maidCnt == 3)
  7185. {
  7186. array7 = new int[] { 0, 1, 2 };
  7187. }
  7188. if (maidCnt == 4)
  7189. {
  7190. array7 = new int[] { 0, 1, 2, 3 };
  7191. }
  7192. if (maidCnt == 5)
  7193. {
  7194. array7 = new int[] { 0, 1, 2, 3, 4 };
  7195. }
  7196. if (maidCnt == 6)
  7197. {
  7198. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7199. }
  7200. if (maidCnt == 7)
  7201. {
  7202. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7203. }
  7204. if (maidCnt == 8)
  7205. {
  7206. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7207. }
  7208. if (maidCnt == 9)
  7209. {
  7210. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7211. }
  7212. if (maidCnt == 10)
  7213. {
  7214. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7215. }
  7216. if (maidCnt == 11)
  7217. {
  7218. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7219. }
  7220. if (maidCnt == 12)
  7221. {
  7222. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7223. }
  7224. Random random = new Random();
  7225. int n = array7.Length;
  7226. while (n > 1)
  7227. {
  7228. n--;
  7229. int j = random.Next(n + 1);
  7230. int num8 = array7[j];
  7231. array7[j] = array7[n];
  7232. array7[n] = num8;
  7233. }
  7234. int[] array8 = new int[maidCnt];
  7235. Vector3[] array9 = new Vector3[maidCnt];
  7236. Vector3[] array10 = new Vector3[maidCnt];
  7237. int[] array11 = new int[maidCnt];
  7238. for (int i = 0; i < maidCnt; i++)
  7239. {
  7240. array8[array7[i]] = poseIndex[array7[i]];
  7241. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7242. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7243. array11[array7[i]] = headEyeIndex[array7[i]];
  7244. }
  7245. for (int i = 0; i < maidCnt; i++)
  7246. {
  7247. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7248. {
  7249. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7250. isStop[i] = false;
  7251. poseCount[i] = 20;
  7252. Maid maid = maidArray[i];
  7253. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7254. {
  7255. maid.body0.MuneYureL(0f);
  7256. maid.body0.MuneYureR(0f);
  7257. }
  7258. else
  7259. {
  7260. maid.body0.MuneYureL(1f);
  7261. maid.body0.MuneYureR(1f);
  7262. }
  7263. if (array12[0].Contains("MultipleMaidsPose"))
  7264. {
  7265. string path = array12[0].Split(new char[] { '/' })[1];
  7266. byte[] array2 = new byte[0];
  7267. try
  7268. {
  7269. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7270. {
  7271. array2 = new byte[fileStream.Length];
  7272. fileStream.Read(array2, 0, array2.Length);
  7273. }
  7274. }
  7275. catch { }
  7276. if (0 < array2.Length)
  7277. {
  7278. string text = Path.GetFileName(path);
  7279. long num5 = text.GetHashCode();
  7280. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7281. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7282. {
  7283. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7284. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7285. };
  7286. for (int m = 0; m < array3.Length; m++)
  7287. {
  7288. maid.SetAutoTwist(array3[m], true);
  7289. }
  7290. }
  7291. }
  7292. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7293. {
  7294. loadPose[i] = array12[0];
  7295. }
  7296. else if (!array12[0].StartsWith("dance_"))
  7297. {
  7298. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7299. }
  7300. else
  7301. {
  7302. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7303. {
  7304. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7305. GameUty.FileSystem,
  7306. array12[0] + ".anm",
  7307. false,
  7308. false);
  7309. }
  7310. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7311. }
  7312. if (array12.Length > 1)
  7313. {
  7314. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7315. float.Parse(array12[1]);
  7316. isStop[i] = true;
  7317. if (array12.Length > 2)
  7318. {
  7319. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7320. isPoseIti[i] = true;
  7321. poseIti[i] = maidArray[i].transform.position;
  7322. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7323. }
  7324. }
  7325. }
  7326. poseIndex[i] = array8[array7[i]];
  7327. maidArray[i].SetRot(array9[array7[i]]);
  7328. maidArray[i].SetPos(array10[array7[i]]);
  7329. headEyeIndex[i] = array11[array7[i]];
  7330. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7331. maidArray[i].body0.boHeadToCam = true;
  7332. maidArray[i].body0.boEyeToCam = true;
  7333. if (headEyeIndex[i] == 0)
  7334. {
  7335. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7336. maidArray[i].body0.boHeadToCam = true;
  7337. maidArray[i].body0.boEyeToCam = true;
  7338. }
  7339. else
  7340. {
  7341. maidArray[i].body0.trsLookTarget = null;
  7342. if (headEyeIndex[i] == 1)
  7343. {
  7344. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7345. }
  7346. if (headEyeIndex[i] == 2)
  7347. {
  7348. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7349. }
  7350. if (headEyeIndex[i] == 3)
  7351. {
  7352. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7353. }
  7354. if (headEyeIndex[i] == 4)
  7355. {
  7356. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7357. }
  7358. if (headEyeIndex[i] == 5)
  7359. {
  7360. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7361. }
  7362. if (headEyeIndex[i] == 6)
  7363. {
  7364. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7365. }
  7366. if (headEyeIndex[i] == 7)
  7367. {
  7368. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7369. }
  7370. if (headEyeIndex[i] == 8)
  7371. {
  7372. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7373. }
  7374. if (headEyeIndex[i] == 9)
  7375. {
  7376. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7377. }
  7378. }
  7379. }
  7380. }
  7381. else if (Input.GetKeyDown(KeyCode.Comma))
  7382. {
  7383. int[] array8 = new int[maidCnt];
  7384. Vector3[] array9 = new Vector3[maidCnt];
  7385. Vector3[] array10 = new Vector3[maidCnt];
  7386. int[] array11 = new int[maidCnt];
  7387. for (int i = 0; i < maidCnt; i++)
  7388. {
  7389. array8[i] = poseIndex[i];
  7390. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7391. array10[i] = maidArray[i].transform.position;
  7392. array11[i] = headEyeIndex[i];
  7393. }
  7394. for (int i = 0; i < maidCnt; i++)
  7395. {
  7396. if (i == 0)
  7397. {
  7398. if (!isLock[i])
  7399. {
  7400. if (maidArray[i] && maidArray[i].Visible)
  7401. {
  7402. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7403. isStop[i] = false;
  7404. poseCount[i] = 20;
  7405. Maid maid = maidArray[i];
  7406. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7407. {
  7408. maid.body0.MuneYureL(0f);
  7409. maid.body0.MuneYureR(0f);
  7410. }
  7411. else
  7412. {
  7413. maid.body0.MuneYureL(1f);
  7414. maid.body0.MuneYureR(1f);
  7415. }
  7416. if (array12[0].Contains("MultipleMaidsPose"))
  7417. {
  7418. string path = array12[0].Split(new char[] { '/' })[1];
  7419. byte[] array2 = new byte[0];
  7420. try
  7421. {
  7422. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7423. {
  7424. array2 = new byte[fileStream.Length];
  7425. fileStream.Read(array2, 0, array2.Length);
  7426. }
  7427. }
  7428. catch { }
  7429. if (0 < array2.Length)
  7430. {
  7431. string text = Path.GetFileName(path);
  7432. long num5 = text.GetHashCode();
  7433. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7434. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7435. {
  7436. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7437. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7438. };
  7439. for (int m = 0; m < array3.Length; m++)
  7440. {
  7441. maid.SetAutoTwist(array3[m], true);
  7442. }
  7443. }
  7444. }
  7445. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7446. {
  7447. loadPose[i] = array12[0];
  7448. }
  7449. else if (!array12[0].StartsWith("dance_"))
  7450. {
  7451. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7452. }
  7453. else
  7454. {
  7455. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7456. {
  7457. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7458. GameUty.FileSystem,
  7459. array12[0] + ".anm",
  7460. false,
  7461. false);
  7462. }
  7463. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7464. }
  7465. if (array12.Length > 1)
  7466. {
  7467. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7468. float.Parse(array12[1]);
  7469. isStop[i] = true;
  7470. if (array12.Length > 2)
  7471. {
  7472. Transform transform2 =
  7473. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7474. isPoseIti[i] = true;
  7475. poseIti[i] = maidArray[i].transform.position;
  7476. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7477. }
  7478. }
  7479. }
  7480. }
  7481. poseIndex[i] = array8[maidCnt - i - 1];
  7482. headEyeIndex[i] = array11[maidCnt - i - 1];
  7483. }
  7484. else
  7485. {
  7486. if (!isLock[i])
  7487. {
  7488. if (maidArray[i] && maidArray[i].Visible)
  7489. {
  7490. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7491. isStop[i] = false;
  7492. poseCount[i] = 20;
  7493. Maid maid = maidArray[i];
  7494. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7495. {
  7496. maid.body0.MuneYureL(0f);
  7497. maid.body0.MuneYureR(0f);
  7498. }
  7499. else
  7500. {
  7501. maid.body0.MuneYureL(1f);
  7502. maid.body0.MuneYureR(1f);
  7503. }
  7504. if (array12[0].Contains("MultipleMaidsPose"))
  7505. {
  7506. string path = array12[0].Split(new char[] { '/' })[1];
  7507. byte[] array2 = new byte[0];
  7508. try
  7509. {
  7510. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7511. {
  7512. array2 = new byte[fileStream.Length];
  7513. fileStream.Read(array2, 0, array2.Length);
  7514. }
  7515. }
  7516. catch { }
  7517. if (0 < array2.Length)
  7518. {
  7519. string text = Path.GetFileName(path);
  7520. long num5 = text.GetHashCode();
  7521. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7522. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7523. {
  7524. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7525. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7526. };
  7527. for (int m = 0; m < array3.Length; m++)
  7528. {
  7529. maid.SetAutoTwist(array3[m], true);
  7530. }
  7531. }
  7532. }
  7533. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7534. {
  7535. loadPose[i] = array12[0];
  7536. }
  7537. else if (!array12[0].StartsWith("dance_"))
  7538. {
  7539. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7540. }
  7541. else
  7542. {
  7543. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7544. {
  7545. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7546. GameUty.FileSystem,
  7547. array12[0] + ".anm",
  7548. false,
  7549. false);
  7550. }
  7551. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7552. }
  7553. if (array12.Length > 1)
  7554. {
  7555. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7556. float.Parse(array12[1]);
  7557. isStop[i] = true;
  7558. if (array12.Length > 2)
  7559. {
  7560. Transform transform2 =
  7561. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7562. isPoseIti[i] = true;
  7563. poseIti[i] = maidArray[i].transform.position;
  7564. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7565. }
  7566. }
  7567. }
  7568. }
  7569. poseIndex[i] = array8[i - 1];
  7570. headEyeIndex[i] = array11[i - 1];
  7571. }
  7572. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7573. maidArray[i].body0.boHeadToCam = true;
  7574. maidArray[i].body0.boEyeToCam = true;
  7575. if (headEyeIndex[i] == 0)
  7576. {
  7577. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7578. maidArray[i].body0.boHeadToCam = true;
  7579. maidArray[i].body0.boEyeToCam = true;
  7580. }
  7581. else
  7582. {
  7583. maidArray[i].body0.trsLookTarget = null;
  7584. if (headEyeIndex[i] == 1)
  7585. {
  7586. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7587. }
  7588. if (headEyeIndex[i] == 2)
  7589. {
  7590. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7591. }
  7592. if (headEyeIndex[i] == 3)
  7593. {
  7594. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7595. }
  7596. if (headEyeIndex[i] == 4)
  7597. {
  7598. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7599. }
  7600. if (headEyeIndex[i] == 5)
  7601. {
  7602. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7603. }
  7604. if (headEyeIndex[i] == 6)
  7605. {
  7606. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7607. }
  7608. if (headEyeIndex[i] == 7)
  7609. {
  7610. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7611. }
  7612. if (headEyeIndex[i] == 8)
  7613. {
  7614. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7615. }
  7616. if (headEyeIndex[i] == 9)
  7617. {
  7618. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7619. }
  7620. }
  7621. if (i == 0)
  7622. {
  7623. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7624. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7625. }
  7626. else
  7627. {
  7628. maidArray[i].SetRot(array9[i - 1]);
  7629. maidArray[i].SetPos(array10[i - 1]);
  7630. }
  7631. }
  7632. }
  7633. for (int i = 0; i < maidCnt; i++)
  7634. {
  7635. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7636. {
  7637. if (maidArray[i] && maidArray[i].Visible)
  7638. {
  7639. maidArray[i].body0.transform.localRotation =
  7640. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7641. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7642. }
  7643. }
  7644. else if (Input.GetKey(KeyCode.B))
  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. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7654. {
  7655. if (maidArray[1] && maidArray[1].Visible)
  7656. {
  7657. if (maidArray[0].transform.position == maidArray[1].transform.position
  7658. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7659. {
  7660. Vector3 vector = Vector3.zero;
  7661. vector.x = 0.6f;
  7662. maidArray[1].SetPos(vector);
  7663. if (maidArray[2] && maidArray[2].Visible)
  7664. {
  7665. vector.x = -0.6f;
  7666. maidArray[2].SetPos(vector);
  7667. }
  7668. if (maidArray[3] && maidArray[3].Visible)
  7669. {
  7670. vector.x = 1.2f;
  7671. maidArray[3].SetPos(vector);
  7672. }
  7673. if (maidArray[4] && maidArray[4].Visible)
  7674. {
  7675. vector.x = -1.2f;
  7676. maidArray[4].SetPos(vector);
  7677. }
  7678. if (maidArray[5] && maidArray[5].Visible)
  7679. {
  7680. vector.x = 1.8f;
  7681. maidArray[5].SetPos(vector);
  7682. }
  7683. if (maidArray[6] && maidArray[6].Visible)
  7684. {
  7685. vector.x = -1.8f;
  7686. maidArray[6].SetPos(vector);
  7687. }
  7688. if (maidArray[7] && maidArray[7].Visible)
  7689. {
  7690. vector.x = 2.4f;
  7691. maidArray[7].SetPos(vector);
  7692. }
  7693. if (maidArray[8] && maidArray[8].Visible)
  7694. {
  7695. vector.x = -2.4f;
  7696. maidArray[8].SetPos(vector);
  7697. }
  7698. if (maidArray[9] && maidArray[9].Visible)
  7699. {
  7700. vector.x = 3f;
  7701. maidArray[9].SetPos(vector);
  7702. }
  7703. if (maidArray[10] && maidArray[10].Visible)
  7704. {
  7705. vector.x = -3f;
  7706. maidArray[10].SetPos(vector);
  7707. }
  7708. if (maidArray[11] && maidArray[11].Visible)
  7709. {
  7710. vector.x = 3.6f;
  7711. maidArray[11].SetPos(vector);
  7712. }
  7713. if (maidArray[12] && maidArray[12].Visible)
  7714. {
  7715. vector.x = -3.6f;
  7716. maidArray[12].SetPos(vector);
  7717. }
  7718. if (maidArray[13] && maidArray[13].Visible)
  7719. {
  7720. vector.x = 4.2f;
  7721. maidArray[13].SetPos(vector);
  7722. }
  7723. }
  7724. }
  7725. for (int k = 0; k < groupList.Count; k++)
  7726. {
  7727. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7728. {
  7729. if (poseIndex[i] == 0)
  7730. {
  7731. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7732. }
  7733. else
  7734. {
  7735. poseIndex[i] = 0;
  7736. }
  7737. break;
  7738. }
  7739. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7740. {
  7741. poseIndex[i] = (int)groupList[k - 1];
  7742. break;
  7743. }
  7744. }
  7745. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7746. {
  7747. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7748. }
  7749. if (maidArray[i] && maidArray[i].Visible)
  7750. {
  7751. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7752. isStop[i] = false;
  7753. poseCount[i] = 20;
  7754. Maid maid = maidArray[i];
  7755. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7756. {
  7757. maid.body0.MuneYureL(0f);
  7758. maid.body0.MuneYureR(0f);
  7759. }
  7760. else
  7761. {
  7762. maid.body0.MuneYureL(1f);
  7763. maid.body0.MuneYureR(1f);
  7764. }
  7765. if (array[0].Contains("MultipleMaidsPose"))
  7766. {
  7767. string path = array[0].Split(new char[] { '/' })[1];
  7768. byte[] array2 = new byte[0];
  7769. try
  7770. {
  7771. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7772. {
  7773. array2 = new byte[fileStream.Length];
  7774. fileStream.Read(array2, 0, array2.Length);
  7775. }
  7776. }
  7777. catch { }
  7778. if (0 < array2.Length)
  7779. {
  7780. string text = Path.GetFileName(path);
  7781. long num5 = text.GetHashCode();
  7782. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7783. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7784. {
  7785. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7786. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7787. };
  7788. for (int m = 0; m < array3.Length; m++)
  7789. {
  7790. maid.SetAutoTwist(array3[m], true);
  7791. }
  7792. }
  7793. }
  7794. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7795. {
  7796. loadPose[i] = array[0];
  7797. }
  7798. else if (!array[0].StartsWith("dance_"))
  7799. {
  7800. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7801. }
  7802. else
  7803. {
  7804. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7805. {
  7806. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7807. GameUty.FileSystem,
  7808. array[0] + ".anm",
  7809. false,
  7810. false);
  7811. }
  7812. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7813. }
  7814. if (array.Length > 1)
  7815. {
  7816. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7817. isStop[i] = true;
  7818. if (array.Length > 2)
  7819. {
  7820. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7821. isPoseIti[i] = true;
  7822. poseIti[i] = maidArray[i].transform.position;
  7823. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7824. }
  7825. }
  7826. }
  7827. }
  7828. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7829. {
  7830. if (maidArray[1] && maidArray[1].Visible)
  7831. {
  7832. if (maidArray[0].transform.position == maidArray[1].transform.position
  7833. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7834. {
  7835. Vector3 vector = Vector3.zero;
  7836. vector.x = 0.6f;
  7837. maidArray[1].SetPos(vector);
  7838. if (maidArray[2] && maidArray[2].Visible)
  7839. {
  7840. vector.x = -0.6f;
  7841. maidArray[2].SetPos(vector);
  7842. }
  7843. if (maidArray[3] && maidArray[3].Visible)
  7844. {
  7845. vector.x = 1.2f;
  7846. maidArray[3].SetPos(vector);
  7847. }
  7848. if (maidArray[4] && maidArray[4].Visible)
  7849. {
  7850. vector.x = -1.2f;
  7851. maidArray[4].SetPos(vector);
  7852. }
  7853. if (maidArray[5] && maidArray[5].Visible)
  7854. {
  7855. vector.x = 1.8f;
  7856. maidArray[5].SetPos(vector);
  7857. }
  7858. if (maidArray[6] && maidArray[6].Visible)
  7859. {
  7860. vector.x = -1.8f;
  7861. maidArray[6].SetPos(vector);
  7862. }
  7863. if (maidArray[7] && maidArray[7].Visible)
  7864. {
  7865. vector.x = 2.4f;
  7866. maidArray[7].SetPos(vector);
  7867. }
  7868. if (maidArray[8] && maidArray[8].Visible)
  7869. {
  7870. vector.x = -2.4f;
  7871. maidArray[8].SetPos(vector);
  7872. }
  7873. if (maidArray[9] && maidArray[9].Visible)
  7874. {
  7875. vector.x = 3f;
  7876. maidArray[9].SetPos(vector);
  7877. }
  7878. if (maidArray[10] && maidArray[10].Visible)
  7879. {
  7880. vector.x = -3f;
  7881. maidArray[10].SetPos(vector);
  7882. }
  7883. if (maidArray[11] && maidArray[11].Visible)
  7884. {
  7885. vector.x = 3.6f;
  7886. maidArray[11].SetPos(vector);
  7887. }
  7888. if (maidArray[12] && maidArray[12].Visible)
  7889. {
  7890. vector.x = -3.6f;
  7891. maidArray[12].SetPos(vector);
  7892. }
  7893. if (maidArray[13] && maidArray[13].Visible)
  7894. {
  7895. vector.x = 4.2f;
  7896. maidArray[13].SetPos(vector);
  7897. }
  7898. }
  7899. }
  7900. int num7 = poseIndex[i];
  7901. for (int k = 0; k < groupList.Count; k++)
  7902. {
  7903. if (poseIndex[i] < (int)groupList[k])
  7904. {
  7905. poseIndex[i] = (int)groupList[k];
  7906. break;
  7907. }
  7908. }
  7909. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7910. {
  7911. poseIndex[i] = 0;
  7912. }
  7913. if (maidArray[i] && maidArray[i].Visible)
  7914. {
  7915. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7916. isStop[i] = false;
  7917. poseCount[i] = 20;
  7918. Maid maid = maidArray[i];
  7919. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7920. {
  7921. maid.body0.MuneYureL(0f);
  7922. maid.body0.MuneYureR(0f);
  7923. }
  7924. else
  7925. {
  7926. maid.body0.MuneYureL(1f);
  7927. maid.body0.MuneYureR(1f);
  7928. }
  7929. if (array[0].Contains("MultipleMaidsPose"))
  7930. {
  7931. string path = array[0].Split(new char[] { '/' })[1];
  7932. byte[] array2 = new byte[0];
  7933. try
  7934. {
  7935. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7936. {
  7937. array2 = new byte[fileStream.Length];
  7938. fileStream.Read(array2, 0, array2.Length);
  7939. }
  7940. }
  7941. catch { }
  7942. if (0 < array2.Length)
  7943. {
  7944. string text = Path.GetFileName(path);
  7945. long num5 = text.GetHashCode();
  7946. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7947. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7948. {
  7949. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7950. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7951. };
  7952. for (int m = 0; m < array3.Length; m++)
  7953. {
  7954. maid.SetAutoTwist(array3[m], true);
  7955. }
  7956. }
  7957. }
  7958. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7959. {
  7960. loadPose[i] = array[0];
  7961. }
  7962. else if (!array[0].StartsWith("dance_"))
  7963. {
  7964. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7965. }
  7966. else
  7967. {
  7968. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7969. {
  7970. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7971. GameUty.FileSystem,
  7972. array[0] + ".anm",
  7973. false,
  7974. false);
  7975. }
  7976. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7977. }
  7978. if (array.Length > 1)
  7979. {
  7980. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7981. isStop[i] = true;
  7982. if (array.Length > 2)
  7983. {
  7984. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7985. isPoseIti[i] = true;
  7986. poseIti[i] = maidArray[i].transform.position;
  7987. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7988. }
  7989. }
  7990. }
  7991. }
  7992. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  7993. {
  7994. if (maidArray[1] && maidArray[1].Visible)
  7995. {
  7996. if (maidArray[0].transform.position == maidArray[1].transform.position
  7997. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7998. {
  7999. Vector3 vector = Vector3.zero;
  8000. vector.x = 0.6f;
  8001. maidArray[1].SetPos(vector);
  8002. if (maidArray[2] && maidArray[2].Visible)
  8003. {
  8004. vector.x = -0.6f;
  8005. maidArray[2].SetPos(vector);
  8006. }
  8007. if (maidArray[3] && maidArray[3].Visible)
  8008. {
  8009. vector.x = 1.2f;
  8010. maidArray[3].SetPos(vector);
  8011. }
  8012. if (maidArray[4] && maidArray[4].Visible)
  8013. {
  8014. vector.x = -1.2f;
  8015. maidArray[4].SetPos(vector);
  8016. }
  8017. if (maidArray[5] && maidArray[5].Visible)
  8018. {
  8019. vector.x = 1.8f;
  8020. maidArray[5].SetPos(vector);
  8021. }
  8022. if (maidArray[6] && maidArray[6].Visible)
  8023. {
  8024. vector.x = -1.8f;
  8025. maidArray[6].SetPos(vector);
  8026. }
  8027. if (maidArray[7] && maidArray[7].Visible)
  8028. {
  8029. vector.x = 2.4f;
  8030. maidArray[7].SetPos(vector);
  8031. }
  8032. if (maidArray[8] && maidArray[8].Visible)
  8033. {
  8034. vector.x = -2.4f;
  8035. maidArray[8].SetPos(vector);
  8036. }
  8037. if (maidArray[9] && maidArray[9].Visible)
  8038. {
  8039. vector.x = 3f;
  8040. maidArray[9].SetPos(vector);
  8041. }
  8042. if (maidArray[10] && maidArray[10].Visible)
  8043. {
  8044. vector.x = -3f;
  8045. maidArray[10].SetPos(vector);
  8046. }
  8047. if (maidArray[11] && maidArray[11].Visible)
  8048. {
  8049. vector.x = 3.6f;
  8050. maidArray[11].SetPos(vector);
  8051. }
  8052. if (maidArray[12] && maidArray[12].Visible)
  8053. {
  8054. vector.x = -3.6f;
  8055. maidArray[12].SetPos(vector);
  8056. }
  8057. if (maidArray[13] && maidArray[13].Visible)
  8058. {
  8059. vector.x = 4.2f;
  8060. maidArray[13].SetPos(vector);
  8061. }
  8062. }
  8063. }
  8064. poseIndex[i]--;
  8065. if (poseIndex[i] <= -1)
  8066. {
  8067. poseIndex[i] = poseArray.Length - 1;
  8068. }
  8069. if (maidArray[i] && maidArray[i].Visible)
  8070. {
  8071. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8072. isStop[i] = false;
  8073. poseCount[i] = 20;
  8074. Maid maid = maidArray[i];
  8075. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8076. {
  8077. maid.body0.MuneYureL(0f);
  8078. maid.body0.MuneYureR(0f);
  8079. }
  8080. else
  8081. {
  8082. maid.body0.MuneYureL(1f);
  8083. maid.body0.MuneYureR(1f);
  8084. }
  8085. if (array[0].Contains("MultipleMaidsPose"))
  8086. {
  8087. string path = array[0].Split(new char[] { '/' })[1];
  8088. byte[] array2 = new byte[0];
  8089. try
  8090. {
  8091. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8092. {
  8093. array2 = new byte[fileStream.Length];
  8094. fileStream.Read(array2, 0, array2.Length);
  8095. }
  8096. }
  8097. catch { }
  8098. if (0 < array2.Length)
  8099. {
  8100. string text = Path.GetFileName(path);
  8101. long num5 = text.GetHashCode();
  8102. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8103. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8104. {
  8105. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8106. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8107. };
  8108. for (int m = 0; m < array3.Length; m++)
  8109. {
  8110. maid.SetAutoTwist(array3[m], true);
  8111. }
  8112. }
  8113. }
  8114. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8115. {
  8116. loadPose[i] = array[0];
  8117. }
  8118. else if (!array[0].StartsWith("dance_"))
  8119. {
  8120. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8121. }
  8122. else
  8123. {
  8124. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8125. {
  8126. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8127. GameUty.FileSystem,
  8128. array[0] + ".anm",
  8129. false,
  8130. false);
  8131. }
  8132. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8133. }
  8134. if (array.Length > 1)
  8135. {
  8136. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8137. isStop[i] = true;
  8138. if (array.Length > 2)
  8139. {
  8140. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8141. isPoseIti[i] = true;
  8142. poseIti[i] = maidArray[i].transform.position;
  8143. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8144. }
  8145. }
  8146. }
  8147. }
  8148. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8149. {
  8150. if (maidArray[1] && maidArray[1].Visible)
  8151. {
  8152. if (maidArray[0].transform.position == maidArray[1].transform.position
  8153. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8154. {
  8155. Vector3 vector = Vector3.zero;
  8156. vector.x = 0.6f;
  8157. maidArray[1].SetPos(vector);
  8158. if (maidArray[2] && maidArray[2].Visible)
  8159. {
  8160. vector.x = -0.6f;
  8161. maidArray[2].SetPos(vector);
  8162. }
  8163. if (maidArray[3] && maidArray[3].Visible)
  8164. {
  8165. vector.x = 1.2f;
  8166. maidArray[3].SetPos(vector);
  8167. }
  8168. if (maidArray[4] && maidArray[4].Visible)
  8169. {
  8170. vector.x = -1.2f;
  8171. maidArray[4].SetPos(vector);
  8172. }
  8173. if (maidArray[5] && maidArray[5].Visible)
  8174. {
  8175. vector.x = 1.8f;
  8176. maidArray[5].SetPos(vector);
  8177. }
  8178. if (maidArray[6] && maidArray[6].Visible)
  8179. {
  8180. vector.x = -1.8f;
  8181. maidArray[6].SetPos(vector);
  8182. }
  8183. if (maidArray[7] && maidArray[7].Visible)
  8184. {
  8185. vector.x = 2.4f;
  8186. maidArray[7].SetPos(vector);
  8187. }
  8188. if (maidArray[8] && maidArray[8].Visible)
  8189. {
  8190. vector.x = -2.4f;
  8191. maidArray[8].SetPos(vector);
  8192. }
  8193. if (maidArray[9] && maidArray[9].Visible)
  8194. {
  8195. vector.x = 3f;
  8196. maidArray[9].SetPos(vector);
  8197. }
  8198. if (maidArray[10] && maidArray[10].Visible)
  8199. {
  8200. vector.x = -3f;
  8201. maidArray[10].SetPos(vector);
  8202. }
  8203. if (maidArray[11] && maidArray[11].Visible)
  8204. {
  8205. vector.x = 3.6f;
  8206. maidArray[11].SetPos(vector);
  8207. }
  8208. if (maidArray[12] && maidArray[12].Visible)
  8209. {
  8210. vector.x = -3.6f;
  8211. maidArray[12].SetPos(vector);
  8212. }
  8213. if (maidArray[13] && maidArray[13].Visible)
  8214. {
  8215. vector.x = 4.2f;
  8216. maidArray[13].SetPos(vector);
  8217. }
  8218. }
  8219. }
  8220. poseIndex[i]++;
  8221. if (poseIndex[i] == poseArray.Length)
  8222. {
  8223. poseIndex[i] = 0;
  8224. }
  8225. if (maidArray[i] && maidArray[i].Visible)
  8226. {
  8227. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8228. isStop[i] = false;
  8229. poseCount[i] = 20;
  8230. Maid maid = maidArray[i];
  8231. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8232. {
  8233. maid.body0.MuneYureL(0f);
  8234. maid.body0.MuneYureR(0f);
  8235. }
  8236. else
  8237. {
  8238. maid.body0.MuneYureL(1f);
  8239. maid.body0.MuneYureR(1f);
  8240. }
  8241. if (array[0].Contains("MultipleMaidsPose"))
  8242. {
  8243. string path = array[0].Split(new char[] { '/' })[1];
  8244. byte[] array2 = new byte[0];
  8245. try
  8246. {
  8247. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8248. {
  8249. array2 = new byte[fileStream.Length];
  8250. fileStream.Read(array2, 0, array2.Length);
  8251. }
  8252. }
  8253. catch { }
  8254. if (0 < array2.Length)
  8255. {
  8256. string text = Path.GetFileName(path);
  8257. long num5 = text.GetHashCode();
  8258. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8259. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8260. {
  8261. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8262. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8263. };
  8264. for (int m = 0; m < array3.Length; m++)
  8265. {
  8266. maid.SetAutoTwist(array3[m], true);
  8267. }
  8268. }
  8269. }
  8270. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8271. {
  8272. loadPose[i] = array[0];
  8273. }
  8274. else if (!array[0].StartsWith("dance_"))
  8275. {
  8276. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8277. }
  8278. else
  8279. {
  8280. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8281. {
  8282. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8283. GameUty.FileSystem,
  8284. array[0] + ".anm",
  8285. false,
  8286. false);
  8287. }
  8288. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8289. }
  8290. if (array.Length > 1)
  8291. {
  8292. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8293. isStop[i] = true;
  8294. if (array.Length > 2)
  8295. {
  8296. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8297. isPoseIti[i] = true;
  8298. poseIti[i] = maidArray[i].transform.position;
  8299. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8300. }
  8301. }
  8302. }
  8303. }
  8304. }
  8305. }
  8306. if (isDanceChu)
  8307. {
  8308. for (int j = 0; j < maidCnt; j++)
  8309. {
  8310. if (maidArray[j] && maidArray[j].Visible)
  8311. {
  8312. string text2 = danceName[j];
  8313. float num = 0f;
  8314. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8315. || text2 == "dance_cm3d_004_kano_f1.anm")
  8316. {
  8317. num = 0.166666f;
  8318. }
  8319. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8320. {
  8321. num = -0.35f;
  8322. }
  8323. if (text2 != null)
  8324. {
  8325. if (danceCount > 0)
  8326. {
  8327. danceCount--;
  8328. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8329. }
  8330. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8331. {
  8332. danceCount = 20;
  8333. }
  8334. }
  8335. }
  8336. }
  8337. }
  8338. if (isDanceStart1)
  8339. {
  8340. for (int j = 0; j < maidCnt; j++)
  8341. {
  8342. if (maidArray[j] && maidArray[j].Visible)
  8343. {
  8344. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8345. if (!isShift)
  8346. {
  8347. if (j == 0)
  8348. {
  8349. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8350. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8351. danceName[j] = "dance_cm3d2_001_f1.anm";
  8352. }
  8353. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8354. {
  8355. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8356. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8357. danceName[j] = "dance_cm3d2_001_f2.anm";
  8358. }
  8359. else
  8360. {
  8361. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8362. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8363. danceName[j] = "dance_cm3d2_001_f3.anm";
  8364. }
  8365. }
  8366. else
  8367. {
  8368. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8369. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8370. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8371. }
  8372. }
  8373. }
  8374. isDanceStart1 = false;
  8375. isDanceStart1F = true;
  8376. isShift = false;
  8377. }
  8378. if (isDanceStart2)
  8379. {
  8380. for (int j = 0; j < maidCnt; j++)
  8381. {
  8382. if (maidArray[j] && maidArray[j].Visible)
  8383. {
  8384. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8385. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8386. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8387. danceName[j] = "dance_cm3d_001_f1.anm";
  8388. }
  8389. }
  8390. isDanceStart2 = false;
  8391. isDanceStart2F = true;
  8392. }
  8393. if (isDanceStart3)
  8394. {
  8395. for (int j = 0; j < maidCnt; j++)
  8396. {
  8397. if (maidArray[j] && maidArray[j].Visible)
  8398. {
  8399. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8400. if (!isShift)
  8401. {
  8402. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8403. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8404. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8405. }
  8406. else
  8407. {
  8408. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8409. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8410. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8411. }
  8412. }
  8413. }
  8414. isDanceStart3 = false;
  8415. isDanceStart3F = true;
  8416. isShift = false;
  8417. }
  8418. if (isDanceStart4)
  8419. {
  8420. for (int j = 0; j < maidCnt; j++)
  8421. {
  8422. if (maidArray[j] && maidArray[j].Visible)
  8423. {
  8424. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8425. if (!isShift)
  8426. {
  8427. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8428. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8429. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8430. }
  8431. else
  8432. {
  8433. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8434. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8435. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8436. }
  8437. }
  8438. }
  8439. isDanceStart4 = false;
  8440. isDanceStart4F = true;
  8441. isShift = false;
  8442. }
  8443. if (isDanceStart5)
  8444. {
  8445. for (int j = 0; j < maidCnt; j++)
  8446. {
  8447. if (maidArray[j] && maidArray[j].Visible)
  8448. {
  8449. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8450. if (!isShift)
  8451. {
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8453. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8454. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8455. }
  8456. else
  8457. {
  8458. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8459. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8460. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8461. }
  8462. }
  8463. }
  8464. isDanceStart5 = false;
  8465. isDanceStart5F = true;
  8466. isShift = false;
  8467. }
  8468. if (isDanceStart6)
  8469. {
  8470. for (int j = 0; j < maidCnt; j++)
  8471. {
  8472. if (maidArray[j] && maidArray[j].Visible)
  8473. {
  8474. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8475. if (!isShift)
  8476. {
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8478. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8479. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8480. }
  8481. else
  8482. {
  8483. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8484. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8485. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8486. }
  8487. }
  8488. }
  8489. isDanceStart6 = false;
  8490. isDanceStart6F = true;
  8491. isShift = false;
  8492. }
  8493. if (isDanceStart7)
  8494. {
  8495. for (int j = 0; j < maidCnt; j++)
  8496. {
  8497. if (maidArray[j] && maidArray[j].Visible)
  8498. {
  8499. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8500. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8501. {
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8503. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8504. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8505. }
  8506. else
  8507. {
  8508. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8509. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8510. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8511. }
  8512. }
  8513. }
  8514. isDanceStart7 = false;
  8515. isDanceStart7V = true;
  8516. isDanceStart7F = true;
  8517. }
  8518. if (isDanceStart8)
  8519. {
  8520. for (int j = 0; j < maidCnt; j++)
  8521. {
  8522. if (maidArray[j] && maidArray[j].Visible)
  8523. {
  8524. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8525. if (j == 0 || j == 4 || j == 8 || j == 12)
  8526. {
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8528. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8529. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8530. }
  8531. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8532. {
  8533. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8534. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8535. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8536. }
  8537. else if (j == 2 || j == 6 || j == 10)
  8538. {
  8539. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8540. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8541. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8542. }
  8543. else
  8544. {
  8545. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8546. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8547. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8548. }
  8549. }
  8550. }
  8551. isDanceStart8 = false;
  8552. isDanceStart8V = true;
  8553. isDanceStart8F = true;
  8554. }
  8555. if (isDanceStart9)
  8556. {
  8557. isDanceStart9Count++;
  8558. if (isShift)
  8559. {
  8560. for (int j = 0; j < maidCnt; j++)
  8561. {
  8562. if (maidArray[j] && maidArray[j].Visible)
  8563. {
  8564. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8565. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8566. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8567. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8568. }
  8569. }
  8570. isDanceStart9 = false;
  8571. isDanceStart9F = true;
  8572. isDanceStart9Count = 0;
  8573. isShift = false;
  8574. }
  8575. if (isDanceStart9Count == 10)
  8576. {
  8577. for (int j = 0; j < maidCnt; j++)
  8578. {
  8579. if (maidArray[j] && maidArray[j].Visible)
  8580. {
  8581. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8582. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8584. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8585. }
  8586. }
  8587. isDanceStart9 = false;
  8588. isDanceStart9F = true;
  8589. isDanceStart9Count = 0;
  8590. }
  8591. }
  8592. if (isDanceStart10)
  8593. {
  8594. for (int j = 0; j < maidCnt; j++)
  8595. {
  8596. if (maidArray[j] && maidArray[j].Visible)
  8597. {
  8598. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8599. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8600. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8601. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8602. }
  8603. }
  8604. isDanceStart10 = false;
  8605. isDanceStart10F = true;
  8606. }
  8607. if (isDanceStart11)
  8608. {
  8609. for (int j = 0; j < maidCnt; j++)
  8610. {
  8611. if (maidArray[j] && maidArray[j].Visible)
  8612. {
  8613. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8614. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8615. {
  8616. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8617. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8618. danceName[j] = nameA + danceNo2 + ".anm";
  8619. }
  8620. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8621. {
  8622. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8623. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8624. danceName[j] = nameA + danceNo3 + ".anm";
  8625. }
  8626. else
  8627. {
  8628. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8629. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8630. danceName[j] = nameA + danceNo1 + ".anm";
  8631. }
  8632. }
  8633. }
  8634. isDanceStart11 = false;
  8635. isDanceStart11V = true;
  8636. isDanceStart11F = true;
  8637. }
  8638. if (isDanceStart12)
  8639. {
  8640. for (int j = 0; j < maidCnt; j++)
  8641. {
  8642. if (maidArray[j] && maidArray[j].Visible)
  8643. {
  8644. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8645. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8646. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8647. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8648. }
  8649. }
  8650. isDanceStart12 = false;
  8651. isDanceStart12F = true;
  8652. }
  8653. if (isDanceStart13)
  8654. {
  8655. for (int j = 0; j < maidCnt; j++)
  8656. {
  8657. if (maidArray[j] && maidArray[j].Visible)
  8658. {
  8659. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8660. if (!isShift)
  8661. {
  8662. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8663. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8664. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8665. }
  8666. else
  8667. {
  8668. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8669. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8670. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8671. }
  8672. }
  8673. }
  8674. isDanceStart13 = false;
  8675. isDanceStart13F = true;
  8676. isShift = false;
  8677. }
  8678. if (isDanceStart14)
  8679. {
  8680. for (int j = 0; j < maidCnt; j++)
  8681. {
  8682. if (maidArray[j] && maidArray[j].Visible)
  8683. {
  8684. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8685. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8686. {
  8687. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8688. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8689. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8690. }
  8691. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8692. {
  8693. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8694. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8695. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8696. }
  8697. else
  8698. {
  8699. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8700. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8701. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8702. }
  8703. }
  8704. }
  8705. isDanceStart14 = false;
  8706. isDanceStart14V = true;
  8707. isDanceStart14F = true;
  8708. }
  8709. if (isDanceStart15)
  8710. {
  8711. isDanceStart15Count++;
  8712. }
  8713. if (isDanceStart15Count == 10)
  8714. {
  8715. for (int j = 0; j < maidCnt; j++)
  8716. {
  8717. if (maidArray[j] && maidArray[j].Visible)
  8718. {
  8719. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8720. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8721. {
  8722. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8723. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8724. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8725. }
  8726. else
  8727. {
  8728. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8729. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8730. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8731. }
  8732. }
  8733. }
  8734. isDanceStart15 = false;
  8735. isDanceStart15V = true;
  8736. isDanceStart15F = true;
  8737. isDanceStart15Count = 0;
  8738. }
  8739. if (isDance)
  8740. {
  8741. for (int j = 0; j < maidCnt; j++)
  8742. {
  8743. if (maidArray[j].Visible)
  8744. {
  8745. if (isDanceStart1F)
  8746. {
  8747. if (isDanceStart1K)
  8748. {
  8749. foreach (string text3 in dance1KArray)
  8750. {
  8751. string[] array = text3.Split(new char[] { ',' });
  8752. float num10 = float.Parse(array[0]);
  8753. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8754. {
  8755. danceFace[j] = num10;
  8756. FaceName[j] = FaceName2[j];
  8757. FaceName2[j] = array[1];
  8758. FaceName3[j] = array[2];
  8759. FaceTime[j] = 0.0166666675f;
  8760. break;
  8761. }
  8762. }
  8763. }
  8764. else if (j == 0)
  8765. {
  8766. foreach (string text3 in dance1Array)
  8767. {
  8768. string[] array = text3.Split(new char[] { ',' });
  8769. float num10 = float.Parse(array[0]);
  8770. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8771. {
  8772. danceFace[j] = num10;
  8773. FaceName[j] = FaceName2[j];
  8774. FaceName2[j] = array[1];
  8775. FaceName3[j] = array[2];
  8776. FaceTime[j] = 0.0166666675f;
  8777. break;
  8778. }
  8779. }
  8780. }
  8781. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8782. {
  8783. foreach (string text3 in dance1BArray)
  8784. {
  8785. string[] array = text3.Split(new char[] { ',' });
  8786. float num10 = float.Parse(array[0]);
  8787. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8788. {
  8789. danceFace[j] = num10;
  8790. FaceName[j] = FaceName2[j];
  8791. FaceName2[j] = array[1];
  8792. FaceName3[j] = array[2];
  8793. FaceTime[j] = 0.0166666675f;
  8794. break;
  8795. }
  8796. }
  8797. }
  8798. else
  8799. {
  8800. foreach (string text3 in dance1CArray)
  8801. {
  8802. string[] array = text3.Split(new char[] { ',' });
  8803. float num10 = float.Parse(array[0]);
  8804. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8805. {
  8806. danceFace[j] = num10;
  8807. FaceName[j] = FaceName2[j];
  8808. FaceName2[j] = array[1];
  8809. FaceName3[j] = array[2];
  8810. FaceTime[j] = 0.0166666675f;
  8811. break;
  8812. }
  8813. }
  8814. }
  8815. }
  8816. if (isDanceStart2F)
  8817. {
  8818. foreach (string text3 in dance2Array)
  8819. {
  8820. string[] array = text3.Split(new char[] { ',' });
  8821. float num10 = float.Parse(array[0]);
  8822. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8823. {
  8824. danceFace[j] = num10;
  8825. FaceName[j] = FaceName2[j];
  8826. FaceName2[j] = array[1];
  8827. FaceName3[j] = array[2];
  8828. FaceTime[j] = 0.0166666675f;
  8829. break;
  8830. }
  8831. }
  8832. }
  8833. if (isDanceStart3F)
  8834. {
  8835. if (isDanceStart3K)
  8836. {
  8837. foreach (string text3 in dance3KArray)
  8838. {
  8839. string[] array = text3.Split(new char[] { ',' });
  8840. float num10 = float.Parse(array[0]);
  8841. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8842. {
  8843. danceFace[j] = num10;
  8844. FaceName[j] = FaceName2[j];
  8845. FaceName2[j] = array[1];
  8846. FaceName3[j] = array[2];
  8847. FaceTime[j] = 0.0166666675f;
  8848. break;
  8849. }
  8850. }
  8851. }
  8852. else
  8853. {
  8854. foreach (string text3 in dance3Array)
  8855. {
  8856. string[] array = text3.Split(new char[] { ',' });
  8857. float num10 = float.Parse(array[0]);
  8858. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8859. {
  8860. danceFace[j] = num10;
  8861. FaceName[j] = FaceName2[j];
  8862. FaceName2[j] = array[1];
  8863. FaceName3[j] = array[2];
  8864. FaceTime[j] = 0.0166666675f;
  8865. break;
  8866. }
  8867. }
  8868. }
  8869. }
  8870. if (isDanceStart4F)
  8871. {
  8872. if (isDanceStart4K)
  8873. {
  8874. foreach (string text3 in dance4KArray)
  8875. {
  8876. string[] array = text3.Split(new char[] { ',' });
  8877. float num10 = float.Parse(array[0]);
  8878. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8879. {
  8880. danceFace[j] = num10;
  8881. FaceName[j] = FaceName2[j];
  8882. FaceName2[j] = array[1];
  8883. FaceName3[j] = array[2];
  8884. FaceTime[j] = 0.0166666675f;
  8885. break;
  8886. }
  8887. }
  8888. }
  8889. else
  8890. {
  8891. foreach (string text3 in dance4Array)
  8892. {
  8893. string[] array = text3.Split(new char[] { ',' });
  8894. float num10 = float.Parse(array[0]);
  8895. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8896. {
  8897. danceFace[j] = num10;
  8898. FaceName[j] = FaceName2[j];
  8899. FaceName2[j] = array[1];
  8900. FaceName3[j] = array[2];
  8901. FaceTime[j] = 0.0166666675f;
  8902. break;
  8903. }
  8904. }
  8905. }
  8906. }
  8907. if (isDanceStart5F)
  8908. {
  8909. if (isDanceStart5K)
  8910. {
  8911. foreach (string text3 in dance5KArray)
  8912. {
  8913. string[] array = text3.Split(new char[] { ',' });
  8914. float num10 = float.Parse(array[0]);
  8915. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8916. {
  8917. danceFace[j] = num10;
  8918. FaceName[j] = FaceName2[j];
  8919. FaceName2[j] = array[1];
  8920. FaceName3[j] = array[2];
  8921. FaceTime[j] = 0.0166666675f;
  8922. break;
  8923. }
  8924. }
  8925. }
  8926. else
  8927. {
  8928. foreach (string text3 in dance5Array)
  8929. {
  8930. string[] array = text3.Split(new char[] { ',' });
  8931. float num10 = float.Parse(array[0]);
  8932. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8933. {
  8934. danceFace[j] = num10;
  8935. FaceName[j] = FaceName2[j];
  8936. FaceName2[j] = array[1];
  8937. FaceName3[j] = array[2];
  8938. FaceTime[j] = 0.0166666675f;
  8939. break;
  8940. }
  8941. }
  8942. }
  8943. }
  8944. if (isDanceStart6F)
  8945. {
  8946. if (isDanceStart6K)
  8947. {
  8948. foreach (string text3 in dance6KArray)
  8949. {
  8950. string[] array = text3.Split(new char[] { ',' });
  8951. float num10 = float.Parse(array[0]);
  8952. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8953. {
  8954. danceFace[j] = num10;
  8955. FaceName[j] = FaceName2[j];
  8956. FaceName2[j] = array[1];
  8957. FaceName3[j] = array[2];
  8958. FaceTime[j] = 0.0166666675f;
  8959. break;
  8960. }
  8961. }
  8962. }
  8963. else
  8964. {
  8965. foreach (string text3 in dance6Array)
  8966. {
  8967. string[] array = text3.Split(new char[] { ',' });
  8968. float num10 = float.Parse(array[0]);
  8969. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8970. {
  8971. danceFace[j] = num10;
  8972. FaceName[j] = FaceName2[j];
  8973. FaceName2[j] = array[1];
  8974. FaceName3[j] = array[2];
  8975. FaceTime[j] = 0.0166666675f;
  8976. break;
  8977. }
  8978. }
  8979. }
  8980. }
  8981. if (isDanceStart7F)
  8982. {
  8983. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8984. {
  8985. foreach (string text3 in dance6BArray)
  8986. {
  8987. string[] array = text3.Split(new char[] { ',' });
  8988. float num10 = float.Parse(array[0]);
  8989. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8990. {
  8991. danceFace[j] = num10;
  8992. FaceName[j] = FaceName2[j];
  8993. FaceName2[j] = array[1];
  8994. FaceName3[j] = array[2];
  8995. FaceTime[j] = 0.0166666675f;
  8996. break;
  8997. }
  8998. }
  8999. }
  9000. else
  9001. {
  9002. foreach (string text3 in dance6Array)
  9003. {
  9004. string[] array = text3.Split(new char[] { ',' });
  9005. float num10 = float.Parse(array[0]);
  9006. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9007. {
  9008. danceFace[j] = num10;
  9009. FaceName[j] = FaceName2[j];
  9010. FaceName2[j] = array[1];
  9011. FaceName3[j] = array[2];
  9012. FaceTime[j] = 0.0166666675f;
  9013. break;
  9014. }
  9015. }
  9016. }
  9017. }
  9018. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9019. {
  9020. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9021. {
  9022. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9023. }
  9024. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9025. {
  9026. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9027. 100f,
  9028. maidArray[j - 1].transform.position.z));
  9029. }
  9030. }
  9031. if (isDanceStart8F)
  9032. {
  9033. if (j == 1 || j == 5 || j == 9 || j == 13)
  9034. {
  9035. foreach (string text3 in dance6BArray)
  9036. {
  9037. string[] array = text3.Split(new char[] { ',' });
  9038. float num10 = float.Parse(array[0]);
  9039. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9040. {
  9041. danceFace[j] = num10;
  9042. FaceName[j] = FaceName2[j];
  9043. FaceName2[j] = array[1];
  9044. FaceName3[j] = array[2];
  9045. FaceTime[j] = 0.0166666675f;
  9046. break;
  9047. }
  9048. }
  9049. }
  9050. else if (j == 2 || j == 6 || j == 10)
  9051. {
  9052. foreach (string text3 in dance6CArray)
  9053. {
  9054. string[] array = text3.Split(new char[] { ',' });
  9055. float num10 = float.Parse(array[0]);
  9056. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9057. {
  9058. danceFace[j] = num10;
  9059. FaceName[j] = FaceName2[j];
  9060. FaceName2[j] = array[1];
  9061. FaceName3[j] = array[2];
  9062. FaceTime[j] = 0.0166666675f;
  9063. break;
  9064. }
  9065. }
  9066. }
  9067. else if (j == 3 || j == 9 || j == 11)
  9068. {
  9069. foreach (string text3 in dance6DArray)
  9070. {
  9071. string[] array = text3.Split(new char[] { ',' });
  9072. float num10 = float.Parse(array[0]);
  9073. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9074. {
  9075. danceFace[j] = num10;
  9076. FaceName[j] = FaceName2[j];
  9077. FaceName2[j] = array[1];
  9078. FaceName3[j] = array[2];
  9079. FaceTime[j] = 0.0166666675f;
  9080. break;
  9081. }
  9082. }
  9083. }
  9084. else
  9085. {
  9086. foreach (string text3 in dance6Array)
  9087. {
  9088. string[] array = text3.Split(new char[] { ',' });
  9089. float num10 = float.Parse(array[0]);
  9090. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9091. {
  9092. danceFace[j] = num10;
  9093. FaceName[j] = FaceName2[j];
  9094. FaceName2[j] = array[1];
  9095. FaceName3[j] = array[2];
  9096. FaceTime[j] = 0.0166666675f;
  9097. break;
  9098. }
  9099. }
  9100. }
  9101. }
  9102. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9103. {
  9104. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9105. {
  9106. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9107. }
  9108. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9109. {
  9110. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9111. 100f,
  9112. maidArray[j - 1].transform.position.z));
  9113. }
  9114. }
  9115. if (isDanceStart8V)
  9116. {
  9117. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9118. {
  9119. isDanceStart8P = true;
  9120. for (int num11 = 0; num11 < maidCnt; num11++)
  9121. {
  9122. if (maidArray[num11].Visible)
  9123. {
  9124. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9125. {
  9126. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9127. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9128. gameObject6.transform.position =
  9129. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9130. .position;
  9131. }
  9132. }
  9133. }
  9134. }
  9135. }
  9136. if (isDanceStart9F)
  9137. {
  9138. if (isDanceStart9K)
  9139. {
  9140. foreach (string text3 in dance9KArray)
  9141. {
  9142. string[] array = text3.Split(new char[] { ',' });
  9143. float num10 = float.Parse(array[0]);
  9144. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9145. {
  9146. danceFace[j] = num10;
  9147. FaceName[j] = FaceName2[j];
  9148. FaceName2[j] = array[1];
  9149. FaceName3[j] = array[2];
  9150. FaceTime[j] = 0.0166666675f;
  9151. break;
  9152. }
  9153. }
  9154. }
  9155. else
  9156. {
  9157. foreach (string text3 in dance7Array)
  9158. {
  9159. string[] array = text3.Split(new char[] { ',' });
  9160. float num10 = float.Parse(array[0]);
  9161. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9162. {
  9163. danceFace[j] = num10;
  9164. FaceName[j] = FaceName2[j];
  9165. FaceName2[j] = array[1];
  9166. FaceName3[j] = array[2];
  9167. FaceTime[j] = 0.0166666675f;
  9168. break;
  9169. }
  9170. }
  9171. }
  9172. }
  9173. if (isDanceStart10F)
  9174. {
  9175. foreach (string text3 in danceO1Array)
  9176. {
  9177. string[] array = text3.Split(new char[] { ',' });
  9178. float num10 = float.Parse(array[0]);
  9179. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9180. {
  9181. danceFace[j] = num10;
  9182. FaceName[j] = FaceName2[j];
  9183. FaceName2[j] = array[1];
  9184. FaceName3[j] = array[2];
  9185. FaceTime[j] = 0.0166666675f;
  9186. break;
  9187. }
  9188. }
  9189. }
  9190. if (isDanceStart11F)
  9191. {
  9192. string[] array14 = null;
  9193. string[] array12 = null;
  9194. string[] array15 = null;
  9195. if (isSS1)
  9196. {
  9197. array14 = danceO1Array;
  9198. array12 = danceO1CArray;
  9199. array15 = danceO1BArray;
  9200. }
  9201. if (isSS2)
  9202. {
  9203. array14 = danceO2Array;
  9204. array12 = danceO2BArray;
  9205. array15 = danceO2CArray;
  9206. }
  9207. if (isSS3)
  9208. {
  9209. array14 = danceO3CArray;
  9210. array12 = danceO3Array;
  9211. array15 = danceO3BArray;
  9212. }
  9213. if (isSS4)
  9214. {
  9215. array14 = danceO5BArray;
  9216. array12 = danceO5Array;
  9217. array15 = danceO5CArray;
  9218. }
  9219. if (isSS5)
  9220. {
  9221. array14 = danceO4Array;
  9222. array12 = danceO4BArray;
  9223. array15 = danceO4CArray;
  9224. }
  9225. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9226. {
  9227. foreach (string text3 in array12)
  9228. {
  9229. string[] array = text3.Split(new char[] { ',' });
  9230. float num10 = float.Parse(array[0]) - 0.03f;
  9231. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9232. {
  9233. danceFace[j] = num10;
  9234. FaceName[j] = FaceName2[j];
  9235. FaceName2[j] = array[1];
  9236. FaceName3[j] = array[2];
  9237. FaceTime[j] = 0.0166666675f;
  9238. break;
  9239. }
  9240. }
  9241. }
  9242. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9243. {
  9244. foreach (string text3 in array15)
  9245. {
  9246. string[] array = text3.Split(new char[] { ',' });
  9247. float num10 = float.Parse(array[0]) - 0.03f;
  9248. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9249. {
  9250. danceFace[j] = num10;
  9251. FaceName[j] = FaceName2[j];
  9252. FaceName2[j] = array[1];
  9253. FaceName3[j] = array[2];
  9254. FaceTime[j] = 0.0166666675f;
  9255. break;
  9256. }
  9257. }
  9258. }
  9259. else
  9260. {
  9261. foreach (string text3 in array14)
  9262. {
  9263. string[] array = text3.Split(new char[] { ',' });
  9264. float num10 = float.Parse(array[0]) - 0.03f;
  9265. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9266. {
  9267. danceFace[j] = num10;
  9268. FaceName[j] = FaceName2[j];
  9269. FaceName2[j] = array[1];
  9270. FaceName3[j] = array[2];
  9271. FaceTime[j] = 0.0166666675f;
  9272. break;
  9273. }
  9274. }
  9275. }
  9276. }
  9277. if (isDanceStart12F)
  9278. {
  9279. foreach (string text3 in dance12Array)
  9280. {
  9281. string[] array = text3.Split(new char[] { ',' });
  9282. float num10 = float.Parse(array[0]);
  9283. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9284. {
  9285. danceFace[j] = num10;
  9286. FaceName[j] = FaceName2[j];
  9287. FaceName2[j] = array[1];
  9288. FaceName3[j] = array[2];
  9289. FaceTime[j] = 0.0166666675f;
  9290. break;
  9291. }
  9292. }
  9293. }
  9294. if (isDanceStart13F)
  9295. {
  9296. if (!isDanceStart13K)
  9297. {
  9298. foreach (string text3 in dance13Array)
  9299. {
  9300. string[] array = text3.Split(new char[] { ',' });
  9301. float num10 = float.Parse(array[0]);
  9302. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9303. {
  9304. danceFace[j] = num10;
  9305. FaceName[j] = FaceName2[j];
  9306. FaceName2[j] = array[1];
  9307. FaceName3[j] = array[2];
  9308. FaceTime[j] = 0.0166666675f;
  9309. break;
  9310. }
  9311. }
  9312. }
  9313. }
  9314. if (isDanceStart14F)
  9315. {
  9316. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9317. {
  9318. foreach (string text3 in dance13BArray)
  9319. {
  9320. string[] array = text3.Split(new char[] { ',' });
  9321. float num10 = float.Parse(array[0]);
  9322. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9323. {
  9324. danceFace[j] = num10;
  9325. FaceName[j] = FaceName2[j];
  9326. FaceName2[j] = array[1];
  9327. FaceName3[j] = array[2];
  9328. FaceTime[j] = 0.0166666675f;
  9329. break;
  9330. }
  9331. }
  9332. }
  9333. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9334. {
  9335. foreach (string text3 in dance13CArray)
  9336. {
  9337. string[] array = text3.Split(new char[] { ',' });
  9338. float num10 = float.Parse(array[0]);
  9339. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9340. {
  9341. danceFace[j] = num10;
  9342. FaceName[j] = FaceName2[j];
  9343. FaceName2[j] = array[1];
  9344. FaceName3[j] = array[2];
  9345. FaceTime[j] = 0.0166666675f;
  9346. break;
  9347. }
  9348. }
  9349. }
  9350. else
  9351. {
  9352. foreach (string text3 in dance13Array)
  9353. {
  9354. string[] array = text3.Split(new char[] { ',' });
  9355. float num10 = float.Parse(array[0]);
  9356. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9357. {
  9358. danceFace[j] = num10;
  9359. FaceName[j] = FaceName2[j];
  9360. FaceName2[j] = array[1];
  9361. FaceName3[j] = array[2];
  9362. FaceTime[j] = 0.0166666675f;
  9363. break;
  9364. }
  9365. }
  9366. }
  9367. }
  9368. if (isDanceStart15F)
  9369. {
  9370. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9371. {
  9372. foreach (string text3 in dance15BArray)
  9373. {
  9374. string[] array = text3.Split(new char[] { ',' });
  9375. float num10 = float.Parse(array[0]);
  9376. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9377. {
  9378. danceFace[j] = num10;
  9379. FaceName[j] = FaceName2[j];
  9380. FaceName2[j] = array[1];
  9381. FaceName3[j] = array[2];
  9382. FaceTime[j] = 0.0166666675f;
  9383. break;
  9384. }
  9385. }
  9386. }
  9387. else
  9388. {
  9389. foreach (string text3 in dance15Array)
  9390. {
  9391. string[] array = text3.Split(new char[] { ',' });
  9392. float num10 = float.Parse(array[0]);
  9393. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9394. {
  9395. danceFace[j] = num10;
  9396. FaceName[j] = FaceName2[j];
  9397. FaceName2[j] = array[1];
  9398. FaceName3[j] = array[2];
  9399. FaceTime[j] = 0.0166666675f;
  9400. break;
  9401. }
  9402. }
  9403. }
  9404. }
  9405. if (!isFadeOut)
  9406. {
  9407. Maid maid = maidArray[j];
  9408. if (maid && maid.Visible)
  9409. {
  9410. if (maid.transform.position.y != 100f)
  9411. {
  9412. FaceTime[j] += Time.deltaTime;
  9413. if (FaceTime[j] < 1f)
  9414. {
  9415. TMorph morph = maid.body0.Face.morph;
  9416. maid.boMabataki = false;
  9417. maid.body0.Face.morph.EyeMabataki = 0f;
  9418. if (FaceName[j] != string.Empty)
  9419. {
  9420. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9421. }
  9422. if (FaceName2[j] != "")
  9423. {
  9424. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9425. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9426. }
  9427. if (FaceName3[j] != string.Empty)
  9428. {
  9429. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9430. }
  9431. maid.body0.Face.morph.FixBlendValues_Face();
  9432. }
  9433. else
  9434. {
  9435. FaceName[j] = FaceName2[j];
  9436. }
  9437. if (isHenkou)
  9438. {
  9439. TMorph morph = maid.body0.Face.morph;
  9440. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9441. maid.boMabataki = false;
  9442. if (isNamidaH)
  9443. {
  9444. fieldValue[(int)morph.hash["namida"]] = 1f;
  9445. }
  9446. else
  9447. {
  9448. fieldValue[(int)morph.hash["namida"]] = 0f;
  9449. }
  9450. if (isSekimenH)
  9451. {
  9452. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9453. }
  9454. else
  9455. {
  9456. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9457. }
  9458. if (isHohoH)
  9459. {
  9460. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9461. }
  9462. else
  9463. {
  9464. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9465. }
  9466. maid.body0.Face.morph.FixBlendValues_Face();
  9467. }
  9468. }
  9469. }
  9470. }
  9471. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9472. }
  9473. }
  9474. if (Input.GetKey(KeyCode.H) || isVR)
  9475. {
  9476. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9477. {
  9478. h2Flg = true;
  9479. isNamidaH = !isNamidaH;
  9480. isHenkou = true;
  9481. }
  9482. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9483. {
  9484. h2Flg = true;
  9485. isSekimenH = !isSekimenH;
  9486. isHenkou = true;
  9487. }
  9488. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9489. {
  9490. h2Flg = true;
  9491. isHohoH = !isHohoH;
  9492. isHenkou = true;
  9493. }
  9494. }
  9495. danceCheckIndex++;
  9496. if (danceCheckIndex == 10)
  9497. {
  9498. danceCheckIndex = 0;
  9499. }
  9500. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9501. isDanceChu = false;
  9502. for (int k = 0; k < danceCheck.Length; k++)
  9503. {
  9504. if (danceCheck[k] > 0f)
  9505. {
  9506. isDanceChu = true;
  9507. break;
  9508. }
  9509. }
  9510. if (!isDanceChu)
  9511. {
  9512. danceWait--;
  9513. if (danceWait > 0)
  9514. {
  9515. isDanceChu = true;
  9516. }
  9517. }
  9518. if (!isDanceChu)
  9519. {
  9520. for (int j = 0; j < maidCnt; j++)
  9521. {
  9522. if (maidArray[j] && maidArray[j].Visible)
  9523. {
  9524. maidArray[j].StopKuchipakuPattern();
  9525. if (isDanceStart7V)
  9526. {
  9527. maidArray[j].SetPos(dancePos[j]);
  9528. maidArray[j].body0.transform.localRotation = danceRot[j];
  9529. }
  9530. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9531. {
  9532. maidArray[j].SetPos(dancePos[j]);
  9533. maidArray[j].body0.transform.localRotation = danceRot[j];
  9534. }
  9535. if (isDanceStart11V)
  9536. {
  9537. maidArray[j].SetPos(dancePos[j]);
  9538. maidArray[j].body0.transform.localRotation = danceRot[j];
  9539. }
  9540. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9541. || isDanceStart13K)
  9542. {
  9543. maidArray[j].SetPos(dancePos[j]);
  9544. maidArray[j].body0.transform.localRotation = danceRot[j];
  9545. int i = j;
  9546. if (!isVR)
  9547. {
  9548. delCount[i] = 20;
  9549. if (goSlot[(int)selectList[i]] != null)
  9550. {
  9551. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9552. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9553. {
  9554. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9555. }
  9556. }
  9557. }
  9558. Maid maid = maidArray[j];
  9559. maid.DelProp(MPN.handitem, true);
  9560. maid.DelProp(MPN.accvag, true);
  9561. maid.DelProp(MPN.accanl, true);
  9562. maid.DelProp(MPN.kousoku_upper, true);
  9563. maid.DelProp(MPN.kousoku_lower, true);
  9564. maid.AllProcPropSeqStart();
  9565. isStop[i] = true;
  9566. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9567. isPoseIti[i] = true;
  9568. poseIti[i] = maidArray[i].transform.position;
  9569. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9570. }
  9571. if (isDanceStart14V)
  9572. {
  9573. maidArray[j].SetPos(dancePos[j]);
  9574. maidArray[j].body0.transform.localRotation = danceRot[j];
  9575. }
  9576. if (isDanceStart15V)
  9577. {
  9578. maidArray[j].SetPos(dancePos[j]);
  9579. maidArray[j].body0.transform.localRotation = danceRot[j];
  9580. }
  9581. }
  9582. }
  9583. isDanceStart1F = false;
  9584. isDanceStart1K = false;
  9585. isDanceStart2F = false;
  9586. isDanceStart3F = false;
  9587. isDanceStart3K = false;
  9588. isDanceStart4F = false;
  9589. isDanceStart4K = false;
  9590. isDanceStart5F = false;
  9591. isDanceStart5K = false;
  9592. isDanceStart6F = false;
  9593. isDanceStart6K = false;
  9594. isDanceStart7F = false;
  9595. isDanceStart7V = false;
  9596. isDanceStart8F = false;
  9597. isDanceStart8V = false;
  9598. isDanceStart8P = false;
  9599. isDanceStart9F = false;
  9600. isDanceStart9K = false;
  9601. isDanceStart10F = false;
  9602. isDanceStart11F = false;
  9603. isDanceStart11V = false;
  9604. isDanceStart12F = false;
  9605. isDanceStart13F = false;
  9606. isDanceStart13K = false;
  9607. isDanceStart14F = false;
  9608. isDanceStart14V = false;
  9609. isDanceStart15F = false;
  9610. isDanceStart15V = false;
  9611. for (int j = 0; j < maidCnt; j++)
  9612. {
  9613. danceFace[j] = 0f;
  9614. }
  9615. danceCheckIndex = 0;
  9616. for (int k = 0; k < danceCheck.Length; k++)
  9617. {
  9618. danceCheck[danceCheckIndex] = 1f;
  9619. }
  9620. isDance = false;
  9621. }
  9622. }
  9623. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9624. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9625. {
  9626. if (getModKeyPressing(modKey.Shift))
  9627. {
  9628. isShift = true;
  9629. }
  9630. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9631. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9632. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9633. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9634. if (!isShift)
  9635. {
  9636. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9637. }
  9638. for (int j = 0; j < maidCnt; j++)
  9639. {
  9640. string text5 = "dance_cm3d2_001_f1.anm";
  9641. switch (j)
  9642. {
  9643. case 1:
  9644. case 3:
  9645. case 5:
  9646. case 7:
  9647. case 9:
  9648. case 11:
  9649. case 13:
  9650. text5 = "dance_cm3d2_001_f2.anm";
  9651. break;
  9652. case 2:
  9653. case 4:
  9654. case 6:
  9655. case 8:
  9656. case 10:
  9657. case 12:
  9658. text5 = "dance_cm3d2_001_f3.anm";
  9659. break;
  9660. }
  9661. if (!isShift)
  9662. {
  9663. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9664. {
  9665. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9666. }
  9667. }
  9668. else
  9669. {
  9670. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9671. {
  9672. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9673. GameUty.FileSystem,
  9674. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9675. false,
  9676. false);
  9677. }
  9678. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9679. text4 = textAsset.text;
  9680. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9681. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9682. && !isDanceStart9K && !isDanceStart13K)
  9683. {
  9684. dancePos[j] = maidArray[j].transform.position;
  9685. danceRot[j] = maidArray[j].transform.localRotation;
  9686. }
  9687. }
  9688. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9689. }
  9690. if (!isShift)
  9691. {
  9692. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9693. sw = new Stopwatch();
  9694. sw.Start();
  9695. }
  9696. else if (getModKeyPressing(modKey.Ctrl))
  9697. {
  9698. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9699. }
  9700. else
  9701. {
  9702. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9703. }
  9704. for (int j = 0; j < maidCnt; j++)
  9705. {
  9706. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9707. Vector3 vector = Vector3.zero;
  9708. switch (j)
  9709. {
  9710. case 3:
  9711. vector.x = 1f;
  9712. break;
  9713. case 4:
  9714. vector.x = -1f;
  9715. break;
  9716. case 5:
  9717. vector.x = 2f;
  9718. break;
  9719. case 6:
  9720. vector.x = -2f;
  9721. break;
  9722. case 7:
  9723. vector.x = 3f;
  9724. break;
  9725. case 8:
  9726. vector.x = -3f;
  9727. break;
  9728. case 9:
  9729. vector.x = 4f;
  9730. break;
  9731. case 10:
  9732. vector.x = -4f;
  9733. break;
  9734. case 11:
  9735. vector.x = 5f;
  9736. break;
  9737. case 12:
  9738. vector.x = -5f;
  9739. break;
  9740. case 13:
  9741. vector.x = 6f;
  9742. break;
  9743. }
  9744. if (!isShift)
  9745. {
  9746. maidArray[j].SetPos(vector);
  9747. }
  9748. isStop[j] = false;
  9749. isLock[j] = false;
  9750. pHandL[j] = 0;
  9751. pHandR[j] = 0;
  9752. muneIKL[j] = false;
  9753. muneIKR[j] = false;
  9754. if (!isVR)
  9755. {
  9756. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9757. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9758. }
  9759. }
  9760. ikBui = 5;
  9761. isDanceStart1F = false;
  9762. isDanceStart2F = false;
  9763. isDanceStart3F = false;
  9764. isDanceStart4F = false;
  9765. isDanceStart5F = false;
  9766. isDanceStart6F = false;
  9767. isDanceStart7F = false;
  9768. isDanceStart8F = false;
  9769. isDanceStart9F = false;
  9770. isDanceStart10F = false;
  9771. isDanceStart11F = false;
  9772. isDanceStart12F = false;
  9773. isDanceStart13F = false;
  9774. isDanceStart14F = false;
  9775. isDanceStart15F = false;
  9776. for (int j = 0; j < maidCnt; j++)
  9777. {
  9778. danceFace[j] = 0f;
  9779. }
  9780. if (isDanceStart7V)
  9781. {
  9782. for (int j = 0; j < maidCnt; j++)
  9783. {
  9784. if (maidArray[j] && maidArray[j].Visible)
  9785. {
  9786. if (isDanceStart7V)
  9787. {
  9788. maidArray[j].SetPos(dancePos[j]);
  9789. maidArray[j].body0.transform.localRotation = danceRot[j];
  9790. }
  9791. }
  9792. }
  9793. isDanceStart7V = false;
  9794. }
  9795. if (isDanceStart8V)
  9796. {
  9797. for (int j = 0; j < maidCnt; j++)
  9798. {
  9799. if (maidArray[j] && maidArray[j].Visible)
  9800. {
  9801. if (isDanceStart8V)
  9802. {
  9803. maidArray[j].SetPos(dancePos[j]);
  9804. maidArray[j].body0.transform.localRotation = danceRot[j];
  9805. }
  9806. }
  9807. }
  9808. isDanceStart8V = false;
  9809. isDanceStart8P = false;
  9810. }
  9811. if (isDanceStart11V)
  9812. {
  9813. for (int j = 0; j < maidCnt; j++)
  9814. {
  9815. if (maidArray[j] && maidArray[j].Visible)
  9816. {
  9817. if (isDanceStart11V)
  9818. {
  9819. maidArray[j].SetPos(dancePos[j]);
  9820. maidArray[j].body0.transform.localRotation = danceRot[j];
  9821. }
  9822. }
  9823. }
  9824. isDanceStart11V = false;
  9825. }
  9826. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9827. || isDanceStart13K)
  9828. {
  9829. for (int j = 0; j < maidCnt; j++)
  9830. {
  9831. if (maidArray[j] && maidArray[j].Visible)
  9832. {
  9833. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9834. || isDanceStart13K)
  9835. {
  9836. maidArray[j].SetPos(dancePos[j]);
  9837. maidArray[j].body0.transform.localRotation = danceRot[j];
  9838. int i = j;
  9839. if (!isVR)
  9840. {
  9841. delCount[i] = 20;
  9842. if (goSlot[(int)selectList[i]] != null)
  9843. {
  9844. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9845. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9846. {
  9847. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9848. }
  9849. }
  9850. }
  9851. Maid maid = maidArray[j];
  9852. maid.DelProp(MPN.handitem, true);
  9853. maid.DelProp(MPN.accvag, true);
  9854. maid.DelProp(MPN.accanl, true);
  9855. maid.DelProp(MPN.kousoku_upper, true);
  9856. maid.DelProp(MPN.kousoku_lower, true);
  9857. maid.AllProcPropSeqStart();
  9858. }
  9859. }
  9860. }
  9861. isDanceStart1K = false;
  9862. isDanceStart3K = false;
  9863. isDanceStart4K = false;
  9864. isDanceStart5K = false;
  9865. isDanceStart6K = false;
  9866. isDanceStart9K = false;
  9867. isDanceStart13K = false;
  9868. }
  9869. if (isDanceStart14V)
  9870. {
  9871. for (int j = 0; j < maidCnt; j++)
  9872. {
  9873. if (maidArray[j] && maidArray[j].Visible)
  9874. {
  9875. if (isDanceStart14V)
  9876. {
  9877. maidArray[j].SetPos(dancePos[j]);
  9878. maidArray[j].body0.transform.localRotation = danceRot[j];
  9879. }
  9880. }
  9881. }
  9882. isDanceStart14V = false;
  9883. }
  9884. if (isDanceStart15V)
  9885. {
  9886. for (int j = 0; j < maidCnt; j++)
  9887. {
  9888. if (maidArray[j] && maidArray[j].Visible)
  9889. {
  9890. if (isDanceStart15V)
  9891. {
  9892. maidArray[j].SetPos(dancePos[j]);
  9893. maidArray[j].body0.transform.localRotation = danceRot[j];
  9894. }
  9895. }
  9896. }
  9897. isDanceStart15V = false;
  9898. }
  9899. if (isShift)
  9900. {
  9901. if (maidArray[1] && maidArray[1].Visible)
  9902. {
  9903. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9904. {
  9905. Vector3 vector = Vector3.zero;
  9906. vector.x = 0.6f;
  9907. maidArray[1].SetPos(vector);
  9908. if (maidArray[2] && maidArray[2].Visible)
  9909. {
  9910. vector.x = -0.6f;
  9911. maidArray[2].SetPos(vector);
  9912. }
  9913. if (maidArray[3] && maidArray[3].Visible)
  9914. {
  9915. vector.x = 1.2f;
  9916. maidArray[3].SetPos(vector);
  9917. }
  9918. if (maidArray[4] && maidArray[4].Visible)
  9919. {
  9920. vector.x = -1.2f;
  9921. maidArray[4].SetPos(vector);
  9922. }
  9923. if (maidArray[5] && maidArray[5].Visible)
  9924. {
  9925. vector.x = 1.8f;
  9926. maidArray[5].SetPos(vector);
  9927. }
  9928. if (maidArray[6] && maidArray[6].Visible)
  9929. {
  9930. vector.x = -1.8f;
  9931. maidArray[6].SetPos(vector);
  9932. }
  9933. if (maidArray[7] && maidArray[7].Visible)
  9934. {
  9935. vector.x = 2.4f;
  9936. maidArray[7].SetPos(vector);
  9937. }
  9938. if (maidArray[8] && maidArray[8].Visible)
  9939. {
  9940. vector.x = -2.4f;
  9941. maidArray[8].SetPos(vector);
  9942. }
  9943. if (maidArray[9] && maidArray[9].Visible)
  9944. {
  9945. vector.x = 3f;
  9946. maidArray[9].SetPos(vector);
  9947. }
  9948. if (maidArray[10] && maidArray[10].Visible)
  9949. {
  9950. vector.x = -3f;
  9951. maidArray[10].SetPos(vector);
  9952. }
  9953. if (maidArray[11] && maidArray[11].Visible)
  9954. {
  9955. vector.x = 3.6f;
  9956. maidArray[11].SetPos(vector);
  9957. }
  9958. if (maidArray[12] && maidArray[12].Visible)
  9959. {
  9960. vector.x = -3.6f;
  9961. maidArray[12].SetPos(vector);
  9962. }
  9963. if (maidArray[13] && maidArray[13].Visible)
  9964. {
  9965. vector.x = 4.2f;
  9966. maidArray[13].SetPos(vector);
  9967. }
  9968. }
  9969. }
  9970. isDanceStart1K = true;
  9971. for (int j = 0; j < maidCnt; j++)
  9972. {
  9973. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9974. maidArray[j].body0.transform.localRotation.y + 90f,
  9975. maidArray[j].body0.transform.localRotation.z));
  9976. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9977. maidArray[j].body0.transform.position.y,
  9978. maidArray[j].body0.transform.position.z + 4f));
  9979. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9980. int i = j;
  9981. Maid maid = maidArray[j];
  9982. if (!isVR)
  9983. {
  9984. delCount[i] = 20;
  9985. if (goSlot[(int)selectList[i]] != null)
  9986. {
  9987. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9988. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9989. {
  9990. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9991. }
  9992. }
  9993. }
  9994. string[] array = new string[2];
  9995. array = text2.Split(new char[] { ',' });
  9996. maid.DelProp(MPN.handitem, true);
  9997. maid.DelProp(MPN.accvag, true);
  9998. maid.DelProp(MPN.accanl, true);
  9999. maid.DelProp(MPN.kousoku_upper, true);
  10000. maid.DelProp(MPN.kousoku_lower, true);
  10001. if (array[0] != "")
  10002. {
  10003. maid.SetProp(array[0], array[1], 0, true, false);
  10004. }
  10005. maid.AllProcPropSeqStart();
  10006. }
  10007. }
  10008. isDance = true;
  10009. isDanceStart1 = true;
  10010. }
  10011. if (isF2)
  10012. {
  10013. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10014. string text4 = textAsset.text;
  10015. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10016. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10017. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10018. for (int j = 0; j < maidCnt; j++)
  10019. {
  10020. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10021. {
  10022. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10023. GameUty.FileSystem,
  10024. "dance_cm3d_001_f1.anm",
  10025. false,
  10026. false);
  10027. }
  10028. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10029. }
  10030. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10031. for (int j = 0; j < maidCnt; j++)
  10032. {
  10033. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10034. isStop[j] = false;
  10035. isLock[j] = false;
  10036. pHandL[j] = 0;
  10037. pHandR[j] = 0;
  10038. muneIKL[j] = false;
  10039. muneIKR[j] = false;
  10040. if (!isVR)
  10041. {
  10042. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10043. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10044. }
  10045. }
  10046. ikBui = 5;
  10047. isDanceStart1F = false;
  10048. isDanceStart2F = false;
  10049. isDanceStart3F = false;
  10050. isDanceStart4F = false;
  10051. isDanceStart5F = false;
  10052. isDanceStart6F = false;
  10053. isDanceStart7F = false;
  10054. isDanceStart8F = false;
  10055. isDanceStart9F = false;
  10056. isDanceStart10F = false;
  10057. isDanceStart11F = false;
  10058. isDanceStart12F = false;
  10059. isDanceStart13F = false;
  10060. isDanceStart14F = false;
  10061. isDanceStart15F = false;
  10062. for (int j = 0; j < maidCnt; j++)
  10063. {
  10064. danceFace[j] = 0f;
  10065. }
  10066. if (isDanceStart7V)
  10067. {
  10068. for (int j = 0; j < maidCnt; j++)
  10069. {
  10070. if (maidArray[j] && maidArray[j].Visible)
  10071. {
  10072. if (isDanceStart7V)
  10073. {
  10074. maidArray[j].SetPos(dancePos[j]);
  10075. maidArray[j].body0.transform.localRotation = danceRot[j];
  10076. }
  10077. }
  10078. }
  10079. isDanceStart7V = false;
  10080. }
  10081. if (isDanceStart8V)
  10082. {
  10083. for (int j = 0; j < maidCnt; j++)
  10084. {
  10085. if (maidArray[j] && maidArray[j].Visible)
  10086. {
  10087. if (isDanceStart8V)
  10088. {
  10089. maidArray[j].SetPos(dancePos[j]);
  10090. maidArray[j].body0.transform.localRotation = danceRot[j];
  10091. }
  10092. }
  10093. }
  10094. isDanceStart8V = false;
  10095. isDanceStart8P = false;
  10096. }
  10097. if (isDanceStart11V)
  10098. {
  10099. for (int j = 0; j < maidCnt; j++)
  10100. {
  10101. if (maidArray[j] && maidArray[j].Visible)
  10102. {
  10103. if (isDanceStart11V)
  10104. {
  10105. maidArray[j].SetPos(dancePos[j]);
  10106. maidArray[j].body0.transform.localRotation = danceRot[j];
  10107. }
  10108. }
  10109. }
  10110. isDanceStart11V = false;
  10111. }
  10112. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10113. || isDanceStart13K)
  10114. {
  10115. for (int j = 0; j < maidCnt; j++)
  10116. {
  10117. if (maidArray[j] && maidArray[j].Visible)
  10118. {
  10119. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10120. || isDanceStart13K)
  10121. {
  10122. maidArray[j].SetPos(dancePos[j]);
  10123. maidArray[j].body0.transform.localRotation = danceRot[j];
  10124. int i = j;
  10125. if (!isVR)
  10126. {
  10127. delCount[i] = 20;
  10128. if (goSlot[(int)selectList[i]] != null)
  10129. {
  10130. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10131. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10132. {
  10133. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10134. }
  10135. }
  10136. }
  10137. Maid maid = maidArray[j];
  10138. maid.DelProp(MPN.handitem, true);
  10139. maid.DelProp(MPN.accvag, true);
  10140. maid.DelProp(MPN.accanl, true);
  10141. maid.DelProp(MPN.kousoku_upper, true);
  10142. maid.DelProp(MPN.kousoku_lower, true);
  10143. maid.AllProcPropSeqStart();
  10144. }
  10145. }
  10146. }
  10147. isDanceStart1K = false;
  10148. isDanceStart3K = false;
  10149. isDanceStart4K = false;
  10150. isDanceStart5K = false;
  10151. isDanceStart6K = false;
  10152. isDanceStart9K = false;
  10153. isDanceStart13K = false;
  10154. }
  10155. if (isDanceStart14V)
  10156. {
  10157. for (int j = 0; j < maidCnt; j++)
  10158. {
  10159. if (maidArray[j] && maidArray[j].Visible)
  10160. {
  10161. if (isDanceStart14V)
  10162. {
  10163. maidArray[j].SetPos(dancePos[j]);
  10164. maidArray[j].body0.transform.localRotation = danceRot[j];
  10165. }
  10166. }
  10167. }
  10168. isDanceStart14V = false;
  10169. }
  10170. if (isDanceStart15V)
  10171. {
  10172. for (int j = 0; j < maidCnt; j++)
  10173. {
  10174. if (maidArray[j] && maidArray[j].Visible)
  10175. {
  10176. if (isDanceStart15V)
  10177. {
  10178. maidArray[j].SetPos(dancePos[j]);
  10179. maidArray[j].body0.transform.localRotation = danceRot[j];
  10180. }
  10181. }
  10182. }
  10183. isDanceStart15V = false;
  10184. }
  10185. if (maidArray[1] && maidArray[1].Visible)
  10186. {
  10187. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10188. {
  10189. Vector3 vector = Vector3.zero;
  10190. vector.x = 0.6f;
  10191. maidArray[1].SetPos(vector);
  10192. if (maidArray[2] && maidArray[2].Visible)
  10193. {
  10194. vector.x = -0.6f;
  10195. maidArray[2].SetPos(vector);
  10196. }
  10197. if (maidArray[3] && maidArray[3].Visible)
  10198. {
  10199. vector.x = 1.2f;
  10200. maidArray[3].SetPos(vector);
  10201. }
  10202. if (maidArray[4] && maidArray[4].Visible)
  10203. {
  10204. vector.x = -1.2f;
  10205. maidArray[4].SetPos(vector);
  10206. }
  10207. if (maidArray[5] && maidArray[5].Visible)
  10208. {
  10209. vector.x = 1.8f;
  10210. maidArray[5].SetPos(vector);
  10211. }
  10212. if (maidArray[6] && maidArray[6].Visible)
  10213. {
  10214. vector.x = -1.8f;
  10215. maidArray[6].SetPos(vector);
  10216. }
  10217. if (maidArray[7] && maidArray[7].Visible)
  10218. {
  10219. vector.x = 2.4f;
  10220. maidArray[7].SetPos(vector);
  10221. }
  10222. if (maidArray[8] && maidArray[8].Visible)
  10223. {
  10224. vector.x = -2.4f;
  10225. maidArray[8].SetPos(vector);
  10226. }
  10227. if (maidArray[9] && maidArray[9].Visible)
  10228. {
  10229. vector.x = 3f;
  10230. maidArray[9].SetPos(vector);
  10231. }
  10232. if (maidArray[10] && maidArray[10].Visible)
  10233. {
  10234. vector.x = -3f;
  10235. maidArray[10].SetPos(vector);
  10236. }
  10237. if (maidArray[11] && maidArray[11].Visible)
  10238. {
  10239. vector.x = 3.6f;
  10240. maidArray[11].SetPos(vector);
  10241. }
  10242. if (maidArray[12] && maidArray[12].Visible)
  10243. {
  10244. vector.x = -3.6f;
  10245. maidArray[12].SetPos(vector);
  10246. }
  10247. if (maidArray[13] && maidArray[13].Visible)
  10248. {
  10249. vector.x = 4.2f;
  10250. maidArray[13].SetPos(vector);
  10251. }
  10252. }
  10253. }
  10254. isDance = true;
  10255. isDanceStart2 = true;
  10256. isF2 = false;
  10257. }
  10258. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10259. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10260. {
  10261. GameMain.Instance.SoundMgr.StopBGM(0f);
  10262. isF2 = true;
  10263. }
  10264. if (isF3)
  10265. {
  10266. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10267. string text4 = textAsset.text;
  10268. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10269. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10270. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10271. for (int j = 0; j < maidCnt; j++)
  10272. {
  10273. if (!isShift)
  10274. {
  10275. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10276. {
  10277. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10278. GameUty.FileSystem,
  10279. "dance_cm3d_002_end_f1.anm",
  10280. false,
  10281. false);
  10282. }
  10283. }
  10284. else
  10285. {
  10286. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10287. {
  10288. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10289. GameUty.FileSystem,
  10290. "dance_cm3d2_kara_001_sl_f1.anm",
  10291. false,
  10292. false);
  10293. }
  10294. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10295. text4 = textAsset.text;
  10296. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10297. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10298. && !isDanceStart9K && !isDanceStart13K)
  10299. {
  10300. dancePos[j] = maidArray[j].transform.position;
  10301. danceRot[j] = maidArray[j].transform.localRotation;
  10302. }
  10303. }
  10304. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10305. }
  10306. if (!isShift)
  10307. {
  10308. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10309. }
  10310. else
  10311. {
  10312. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10313. }
  10314. for (int j = 0; j < maidCnt; j++)
  10315. {
  10316. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10317. isStop[j] = false;
  10318. isLock[j] = false;
  10319. pHandL[j] = 0;
  10320. pHandR[j] = 0;
  10321. muneIKL[j] = false;
  10322. muneIKR[j] = false;
  10323. if (!isVR)
  10324. {
  10325. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10326. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10327. }
  10328. }
  10329. ikBui = 5;
  10330. isDanceStart1F = false;
  10331. isDanceStart2F = false;
  10332. isDanceStart3F = false;
  10333. isDanceStart4F = false;
  10334. isDanceStart5F = false;
  10335. isDanceStart6F = false;
  10336. isDanceStart7F = false;
  10337. isDanceStart8F = false;
  10338. isDanceStart9F = false;
  10339. isDanceStart10F = false;
  10340. isDanceStart11F = false;
  10341. isDanceStart12F = false;
  10342. isDanceStart13F = false;
  10343. isDanceStart14F = false;
  10344. isDanceStart15F = false;
  10345. for (int j = 0; j < maidCnt; j++)
  10346. {
  10347. danceFace[j] = 0f;
  10348. }
  10349. if (isDanceStart7V)
  10350. {
  10351. for (int j = 0; j < maidCnt; j++)
  10352. {
  10353. if (maidArray[j] && maidArray[j].Visible)
  10354. {
  10355. if (isDanceStart7V)
  10356. {
  10357. maidArray[j].SetPos(dancePos[j]);
  10358. maidArray[j].body0.transform.localRotation = danceRot[j];
  10359. }
  10360. }
  10361. }
  10362. isDanceStart7V = false;
  10363. }
  10364. if (isDanceStart8V)
  10365. {
  10366. for (int j = 0; j < maidCnt; j++)
  10367. {
  10368. if (maidArray[j] && maidArray[j].Visible)
  10369. {
  10370. if (isDanceStart8V)
  10371. {
  10372. maidArray[j].SetPos(dancePos[j]);
  10373. maidArray[j].body0.transform.localRotation = danceRot[j];
  10374. }
  10375. }
  10376. }
  10377. isDanceStart8V = false;
  10378. isDanceStart8P = false;
  10379. }
  10380. if (isDanceStart11V)
  10381. {
  10382. for (int j = 0; j < maidCnt; j++)
  10383. {
  10384. if (maidArray[j] && maidArray[j].Visible)
  10385. {
  10386. if (isDanceStart11V)
  10387. {
  10388. maidArray[j].SetPos(dancePos[j]);
  10389. maidArray[j].body0.transform.localRotation = danceRot[j];
  10390. }
  10391. }
  10392. }
  10393. isDanceStart11V = false;
  10394. }
  10395. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10396. || isDanceStart13K)
  10397. {
  10398. for (int j = 0; j < maidCnt; j++)
  10399. {
  10400. if (maidArray[j] && maidArray[j].Visible)
  10401. {
  10402. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10403. || isDanceStart13K)
  10404. {
  10405. maidArray[j].SetPos(dancePos[j]);
  10406. maidArray[j].body0.transform.localRotation = danceRot[j];
  10407. int i = j;
  10408. if (!isVR)
  10409. {
  10410. delCount[i] = 20;
  10411. if (goSlot[(int)selectList[i]] != null)
  10412. {
  10413. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10414. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10415. {
  10416. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10417. }
  10418. }
  10419. }
  10420. Maid maid = maidArray[j];
  10421. maid.DelProp(MPN.handitem, true);
  10422. maid.DelProp(MPN.accvag, true);
  10423. maid.DelProp(MPN.accanl, true);
  10424. maid.DelProp(MPN.kousoku_upper, true);
  10425. maid.DelProp(MPN.kousoku_lower, true);
  10426. maid.AllProcPropSeqStart();
  10427. }
  10428. }
  10429. }
  10430. isDanceStart1K = false;
  10431. isDanceStart3K = false;
  10432. isDanceStart4K = false;
  10433. isDanceStart5K = false;
  10434. isDanceStart6K = false;
  10435. isDanceStart9K = false;
  10436. isDanceStart13K = false;
  10437. }
  10438. if (isDanceStart14V)
  10439. {
  10440. for (int j = 0; j < maidCnt; j++)
  10441. {
  10442. if (maidArray[j] && maidArray[j].Visible)
  10443. {
  10444. if (isDanceStart14V)
  10445. {
  10446. maidArray[j].SetPos(dancePos[j]);
  10447. maidArray[j].body0.transform.localRotation = danceRot[j];
  10448. }
  10449. }
  10450. }
  10451. isDanceStart14V = false;
  10452. }
  10453. if (isDanceStart15V)
  10454. {
  10455. for (int j = 0; j < maidCnt; j++)
  10456. {
  10457. if (maidArray[j] && maidArray[j].Visible)
  10458. {
  10459. if (isDanceStart15V)
  10460. {
  10461. maidArray[j].SetPos(dancePos[j]);
  10462. maidArray[j].body0.transform.localRotation = danceRot[j];
  10463. }
  10464. }
  10465. }
  10466. isDanceStart15V = false;
  10467. }
  10468. if (maidArray[1] && maidArray[1].Visible)
  10469. {
  10470. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10471. {
  10472. Vector3 vector = Vector3.zero;
  10473. vector.x = 0.6f;
  10474. maidArray[1].SetPos(vector);
  10475. if (maidArray[2] && maidArray[2].Visible)
  10476. {
  10477. vector.x = -0.6f;
  10478. maidArray[2].SetPos(vector);
  10479. }
  10480. if (maidArray[3] && maidArray[3].Visible)
  10481. {
  10482. vector.x = 1.2f;
  10483. maidArray[3].SetPos(vector);
  10484. }
  10485. if (maidArray[4] && maidArray[4].Visible)
  10486. {
  10487. vector.x = -1.2f;
  10488. maidArray[4].SetPos(vector);
  10489. }
  10490. if (maidArray[5] && maidArray[5].Visible)
  10491. {
  10492. vector.x = 1.8f;
  10493. maidArray[5].SetPos(vector);
  10494. }
  10495. if (maidArray[6] && maidArray[6].Visible)
  10496. {
  10497. vector.x = -1.8f;
  10498. maidArray[6].SetPos(vector);
  10499. }
  10500. if (maidArray[7] && maidArray[7].Visible)
  10501. {
  10502. vector.x = 2.4f;
  10503. maidArray[7].SetPos(vector);
  10504. }
  10505. if (maidArray[8] && maidArray[8].Visible)
  10506. {
  10507. vector.x = -2.4f;
  10508. maidArray[8].SetPos(vector);
  10509. }
  10510. if (maidArray[9] && maidArray[9].Visible)
  10511. {
  10512. vector.x = 3f;
  10513. maidArray[9].SetPos(vector);
  10514. }
  10515. if (maidArray[10] && maidArray[10].Visible)
  10516. {
  10517. vector.x = -3f;
  10518. maidArray[10].SetPos(vector);
  10519. }
  10520. if (maidArray[11] && maidArray[11].Visible)
  10521. {
  10522. vector.x = 3.6f;
  10523. maidArray[11].SetPos(vector);
  10524. }
  10525. if (maidArray[12] && maidArray[12].Visible)
  10526. {
  10527. vector.x = -3.6f;
  10528. maidArray[12].SetPos(vector);
  10529. }
  10530. if (maidArray[13] && maidArray[13].Visible)
  10531. {
  10532. vector.x = 4.2f;
  10533. maidArray[13].SetPos(vector);
  10534. }
  10535. }
  10536. }
  10537. if (isShift)
  10538. {
  10539. isDanceStart3K = true;
  10540. for (int j = 0; j < maidCnt; j++)
  10541. {
  10542. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10543. maidArray[j].body0.transform.localRotation.y + 90f,
  10544. maidArray[j].body0.transform.localRotation.z));
  10545. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10546. maidArray[j].body0.transform.position.y,
  10547. maidArray[j].body0.transform.position.z + 4f));
  10548. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10549. int i = j;
  10550. Maid maid = maidArray[j];
  10551. if (!isVR)
  10552. {
  10553. delCount[i] = 20;
  10554. if (goSlot[(int)selectList[i]] != null)
  10555. {
  10556. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10557. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10558. {
  10559. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10560. }
  10561. }
  10562. }
  10563. string[] array = new string[2];
  10564. array = text2.Split(new char[] { ',' });
  10565. maid.DelProp(MPN.handitem, true);
  10566. maid.DelProp(MPN.accvag, true);
  10567. maid.DelProp(MPN.accanl, true);
  10568. maid.DelProp(MPN.kousoku_upper, true);
  10569. maid.DelProp(MPN.kousoku_lower, true);
  10570. if (array[0] != "")
  10571. {
  10572. maid.SetProp(array[0], array[1], 0, true, false);
  10573. }
  10574. maid.AllProcPropSeqStart();
  10575. }
  10576. }
  10577. isDance = true;
  10578. isDanceStart3 = true;
  10579. isF3 = false;
  10580. }
  10581. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10582. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10583. {
  10584. GameMain.Instance.SoundMgr.StopBGM(0f);
  10585. isF3 = true;
  10586. if (getModKeyPressing(modKey.Shift))
  10587. {
  10588. isShift = true;
  10589. }
  10590. }
  10591. if (isSF1 || isSF2 || isSF3)
  10592. {
  10593. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10594. string text4 = textAsset.text;
  10595. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10596. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10597. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10598. for (int j = 0; j < maidCnt; j++)
  10599. {
  10600. if (!isShift)
  10601. {
  10602. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10603. {
  10604. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10605. GameUty.FileSystem,
  10606. "dance_cm3d2_002_smt_f.anm",
  10607. false,
  10608. false);
  10609. }
  10610. }
  10611. else
  10612. {
  10613. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10614. {
  10615. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10616. GameUty.FileSystem,
  10617. "dance_cm3d2_kara02_001_smt_f1.anm",
  10618. false,
  10619. false);
  10620. }
  10621. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10622. text4 = textAsset.text;
  10623. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10624. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10625. && !isDanceStart9K && !isDanceStart13K)
  10626. {
  10627. dancePos[j] = maidArray[j].transform.position;
  10628. danceRot[j] = maidArray[j].transform.localRotation;
  10629. }
  10630. }
  10631. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10632. }
  10633. if (!isShift)
  10634. {
  10635. if (isSF1)
  10636. {
  10637. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10638. }
  10639. if (isSF2)
  10640. {
  10641. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10642. }
  10643. if (isSF3)
  10644. {
  10645. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10646. }
  10647. }
  10648. else
  10649. {
  10650. if (isSF1)
  10651. {
  10652. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10653. }
  10654. if (isSF2)
  10655. {
  10656. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10657. }
  10658. if (isSF3)
  10659. {
  10660. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10661. }
  10662. }
  10663. for (int j = 0; j < maidCnt; j++)
  10664. {
  10665. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10666. isStop[j] = false;
  10667. isLock[j] = false;
  10668. pHandL[j] = 0;
  10669. pHandR[j] = 0;
  10670. muneIKL[j] = false;
  10671. muneIKR[j] = false;
  10672. if (!isVR)
  10673. {
  10674. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10675. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10676. }
  10677. }
  10678. ikBui = 5;
  10679. isDanceStart1F = false;
  10680. isDanceStart2F = false;
  10681. isDanceStart3F = false;
  10682. isDanceStart4F = false;
  10683. isDanceStart5F = false;
  10684. isDanceStart6F = false;
  10685. isDanceStart7F = false;
  10686. isDanceStart8F = false;
  10687. isDanceStart9F = false;
  10688. isDanceStart10F = false;
  10689. isDanceStart11F = false;
  10690. isDanceStart12F = false;
  10691. isDanceStart13F = false;
  10692. isDanceStart14F = false;
  10693. isDanceStart15F = false;
  10694. for (int j = 0; j < maidCnt; j++)
  10695. {
  10696. danceFace[j] = 0f;
  10697. }
  10698. if (isDanceStart7V)
  10699. {
  10700. for (int j = 0; j < maidCnt; j++)
  10701. {
  10702. if (maidArray[j] && maidArray[j].Visible)
  10703. {
  10704. if (isDanceStart7V)
  10705. {
  10706. maidArray[j].SetPos(dancePos[j]);
  10707. maidArray[j].body0.transform.localRotation = danceRot[j];
  10708. }
  10709. }
  10710. }
  10711. isDanceStart7V = false;
  10712. }
  10713. if (isDanceStart8V)
  10714. {
  10715. for (int j = 0; j < maidCnt; j++)
  10716. {
  10717. if (maidArray[j] && maidArray[j].Visible)
  10718. {
  10719. if (isDanceStart8V)
  10720. {
  10721. maidArray[j].SetPos(dancePos[j]);
  10722. maidArray[j].body0.transform.localRotation = danceRot[j];
  10723. }
  10724. }
  10725. }
  10726. isDanceStart8V = false;
  10727. isDanceStart8P = false;
  10728. }
  10729. if (isDanceStart11V)
  10730. {
  10731. for (int j = 0; j < maidCnt; j++)
  10732. {
  10733. if (maidArray[j] && maidArray[j].Visible)
  10734. {
  10735. if (isDanceStart11V)
  10736. {
  10737. maidArray[j].SetPos(dancePos[j]);
  10738. maidArray[j].body0.transform.localRotation = danceRot[j];
  10739. }
  10740. }
  10741. }
  10742. isDanceStart11V = false;
  10743. }
  10744. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10745. || isDanceStart13K)
  10746. {
  10747. for (int j = 0; j < maidCnt; j++)
  10748. {
  10749. if (maidArray[j] && maidArray[j].Visible)
  10750. {
  10751. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10752. || isDanceStart13K)
  10753. {
  10754. maidArray[j].SetPos(dancePos[j]);
  10755. maidArray[j].body0.transform.localRotation = danceRot[j];
  10756. int i = j;
  10757. if (!isVR)
  10758. {
  10759. delCount[i] = 20;
  10760. if (goSlot[(int)selectList[i]] != null)
  10761. {
  10762. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10763. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10764. {
  10765. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10766. }
  10767. }
  10768. }
  10769. Maid maid = maidArray[j];
  10770. maid.DelProp(MPN.handitem, true);
  10771. maid.DelProp(MPN.accvag, true);
  10772. maid.DelProp(MPN.accanl, true);
  10773. maid.DelProp(MPN.kousoku_upper, true);
  10774. maid.DelProp(MPN.kousoku_lower, true);
  10775. maid.AllProcPropSeqStart();
  10776. }
  10777. }
  10778. }
  10779. isDanceStart1K = false;
  10780. isDanceStart3K = false;
  10781. isDanceStart4K = false;
  10782. isDanceStart5K = false;
  10783. isDanceStart6K = false;
  10784. isDanceStart9K = false;
  10785. isDanceStart13K = false;
  10786. }
  10787. if (isDanceStart14V)
  10788. {
  10789. for (int j = 0; j < maidCnt; j++)
  10790. {
  10791. if (maidArray[j] && maidArray[j].Visible)
  10792. {
  10793. if (isDanceStart14V)
  10794. {
  10795. maidArray[j].SetPos(dancePos[j]);
  10796. maidArray[j].body0.transform.localRotation = danceRot[j];
  10797. }
  10798. }
  10799. }
  10800. isDanceStart14V = false;
  10801. }
  10802. if (isDanceStart15V)
  10803. {
  10804. for (int j = 0; j < maidCnt; j++)
  10805. {
  10806. if (maidArray[j] && maidArray[j].Visible)
  10807. {
  10808. if (isDanceStart15V)
  10809. {
  10810. maidArray[j].SetPos(dancePos[j]);
  10811. maidArray[j].body0.transform.localRotation = danceRot[j];
  10812. }
  10813. }
  10814. }
  10815. isDanceStart15V = false;
  10816. }
  10817. if (maidArray[1] && maidArray[1].Visible)
  10818. {
  10819. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10820. {
  10821. Vector3 vector = Vector3.zero;
  10822. vector.x = 0.6f;
  10823. maidArray[1].SetPos(vector);
  10824. if (maidArray[2] && maidArray[2].Visible)
  10825. {
  10826. vector.x = -0.6f;
  10827. maidArray[2].SetPos(vector);
  10828. }
  10829. if (maidArray[3] && maidArray[3].Visible)
  10830. {
  10831. vector.x = 1.2f;
  10832. maidArray[3].SetPos(vector);
  10833. }
  10834. if (maidArray[4] && maidArray[4].Visible)
  10835. {
  10836. vector.x = -1.2f;
  10837. maidArray[4].SetPos(vector);
  10838. }
  10839. if (maidArray[5] && maidArray[5].Visible)
  10840. {
  10841. vector.x = 1.8f;
  10842. maidArray[5].SetPos(vector);
  10843. }
  10844. if (maidArray[6] && maidArray[6].Visible)
  10845. {
  10846. vector.x = -1.8f;
  10847. maidArray[6].SetPos(vector);
  10848. }
  10849. if (maidArray[7] && maidArray[7].Visible)
  10850. {
  10851. vector.x = 2.4f;
  10852. maidArray[7].SetPos(vector);
  10853. }
  10854. if (maidArray[8] && maidArray[8].Visible)
  10855. {
  10856. vector.x = -2.4f;
  10857. maidArray[8].SetPos(vector);
  10858. }
  10859. if (maidArray[9] && maidArray[9].Visible)
  10860. {
  10861. vector.x = 3f;
  10862. maidArray[9].SetPos(vector);
  10863. }
  10864. if (maidArray[10] && maidArray[10].Visible)
  10865. {
  10866. vector.x = -3f;
  10867. maidArray[10].SetPos(vector);
  10868. }
  10869. if (maidArray[11] && maidArray[11].Visible)
  10870. {
  10871. vector.x = 3.6f;
  10872. maidArray[11].SetPos(vector);
  10873. }
  10874. if (maidArray[12] && maidArray[12].Visible)
  10875. {
  10876. vector.x = -3.6f;
  10877. maidArray[12].SetPos(vector);
  10878. }
  10879. if (maidArray[13] && maidArray[13].Visible)
  10880. {
  10881. vector.x = 4.2f;
  10882. maidArray[13].SetPos(vector);
  10883. }
  10884. }
  10885. }
  10886. if (isShift)
  10887. {
  10888. isDanceStart4K = true;
  10889. for (int j = 0; j < maidCnt; j++)
  10890. {
  10891. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10892. maidArray[j].body0.transform.localRotation.y + 90f,
  10893. maidArray[j].body0.transform.localRotation.z));
  10894. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10895. maidArray[j].body0.transform.position.y,
  10896. maidArray[j].body0.transform.position.z + 4f));
  10897. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10898. int i = j;
  10899. Maid maid = maidArray[j];
  10900. if (!isVR)
  10901. {
  10902. delCount[i] = 20;
  10903. if (goSlot[(int)selectList[i]] != null)
  10904. {
  10905. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10906. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10907. {
  10908. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10909. }
  10910. }
  10911. }
  10912. string[] array = new string[2];
  10913. array = text2.Split(new char[] { ',' });
  10914. maid.DelProp(MPN.handitem, true);
  10915. maid.DelProp(MPN.accvag, true);
  10916. maid.DelProp(MPN.accanl, true);
  10917. maid.DelProp(MPN.kousoku_upper, true);
  10918. maid.DelProp(MPN.kousoku_lower, true);
  10919. if (array[0] != "")
  10920. {
  10921. maid.SetProp(array[0], array[1], 0, true, false);
  10922. }
  10923. maid.AllProcPropSeqStart();
  10924. }
  10925. }
  10926. isDance = true;
  10927. isDanceStart4 = true;
  10928. isSF1 = false;
  10929. isSF2 = false;
  10930. isSF3 = false;
  10931. }
  10932. if (isHS1 || isHS2 || isHS3)
  10933. {
  10934. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10935. string text4 = textAsset.text;
  10936. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10937. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10938. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10939. for (int j = 0; j < maidCnt; j++)
  10940. {
  10941. if (!isShift)
  10942. {
  10943. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10944. {
  10945. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10946. GameUty.FileSystem,
  10947. "dance_cm3d2_003_hs_f1.anm",
  10948. false,
  10949. false);
  10950. }
  10951. }
  10952. else
  10953. {
  10954. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10955. {
  10956. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10957. GameUty.FileSystem,
  10958. "dance_cm3d2_kara02_003_hs_f1.anm",
  10959. false,
  10960. false);
  10961. }
  10962. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10963. text4 = textAsset.text;
  10964. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10965. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10966. && !isDanceStart9K && !isDanceStart13K)
  10967. {
  10968. dancePos[j] = maidArray[j].transform.position;
  10969. danceRot[j] = maidArray[j].transform.localRotation;
  10970. }
  10971. }
  10972. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10973. }
  10974. if (!isShift)
  10975. {
  10976. if (isHS1)
  10977. {
  10978. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10979. }
  10980. if (isHS2)
  10981. {
  10982. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10983. }
  10984. if (isHS3)
  10985. {
  10986. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10987. }
  10988. }
  10989. else
  10990. {
  10991. if (isHS1)
  10992. {
  10993. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  10994. }
  10995. if (isHS2)
  10996. {
  10997. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  10998. }
  10999. if (isHS3)
  11000. {
  11001. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11002. }
  11003. }
  11004. for (int j = 0; j < maidCnt; j++)
  11005. {
  11006. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11007. isStop[j] = false;
  11008. isLock[j] = false;
  11009. pHandL[j] = 0;
  11010. pHandR[j] = 0;
  11011. muneIKL[j] = false;
  11012. muneIKR[j] = false;
  11013. if (!isVR)
  11014. {
  11015. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11016. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11017. }
  11018. }
  11019. ikBui = 5;
  11020. isDanceStart1F = false;
  11021. isDanceStart2F = false;
  11022. isDanceStart3F = false;
  11023. isDanceStart4F = false;
  11024. isDanceStart5F = false;
  11025. isDanceStart6F = false;
  11026. isDanceStart7F = false;
  11027. isDanceStart8F = false;
  11028. isDanceStart9F = false;
  11029. isDanceStart10F = false;
  11030. isDanceStart11F = false;
  11031. isDanceStart12F = false;
  11032. isDanceStart13F = false;
  11033. isDanceStart14F = false;
  11034. isDanceStart15F = false;
  11035. for (int j = 0; j < maidCnt; j++)
  11036. {
  11037. danceFace[j] = 0f;
  11038. }
  11039. if (isDanceStart7V)
  11040. {
  11041. for (int j = 0; j < maidCnt; j++)
  11042. {
  11043. if (maidArray[j] && maidArray[j].Visible)
  11044. {
  11045. if (isDanceStart7V)
  11046. {
  11047. maidArray[j].SetPos(dancePos[j]);
  11048. maidArray[j].body0.transform.localRotation = danceRot[j];
  11049. }
  11050. }
  11051. }
  11052. isDanceStart7V = false;
  11053. }
  11054. if (isDanceStart8V)
  11055. {
  11056. for (int j = 0; j < maidCnt; j++)
  11057. {
  11058. if (maidArray[j] && maidArray[j].Visible)
  11059. {
  11060. if (isDanceStart8V)
  11061. {
  11062. maidArray[j].SetPos(dancePos[j]);
  11063. maidArray[j].body0.transform.localRotation = danceRot[j];
  11064. }
  11065. }
  11066. }
  11067. isDanceStart8V = false;
  11068. isDanceStart8P = false;
  11069. }
  11070. if (isDanceStart11V)
  11071. {
  11072. for (int j = 0; j < maidCnt; j++)
  11073. {
  11074. if (maidArray[j] && maidArray[j].Visible)
  11075. {
  11076. if (isDanceStart11V)
  11077. {
  11078. maidArray[j].SetPos(dancePos[j]);
  11079. maidArray[j].body0.transform.localRotation = danceRot[j];
  11080. }
  11081. }
  11082. }
  11083. isDanceStart11V = false;
  11084. }
  11085. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11086. || isDanceStart13K)
  11087. {
  11088. for (int j = 0; j < maidCnt; j++)
  11089. {
  11090. if (maidArray[j] && maidArray[j].Visible)
  11091. {
  11092. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11093. || isDanceStart13K)
  11094. {
  11095. maidArray[j].SetPos(dancePos[j]);
  11096. maidArray[j].body0.transform.localRotation = danceRot[j];
  11097. int i = j;
  11098. if (!isVR)
  11099. {
  11100. delCount[i] = 20;
  11101. if (goSlot[(int)selectList[i]] != null)
  11102. {
  11103. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11104. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11105. {
  11106. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11107. }
  11108. }
  11109. }
  11110. Maid maid = maidArray[j];
  11111. maid.DelProp(MPN.handitem, true);
  11112. maid.DelProp(MPN.accvag, true);
  11113. maid.DelProp(MPN.accanl, true);
  11114. maid.DelProp(MPN.kousoku_upper, true);
  11115. maid.DelProp(MPN.kousoku_lower, true);
  11116. maid.AllProcPropSeqStart();
  11117. }
  11118. }
  11119. }
  11120. isDanceStart1K = false;
  11121. isDanceStart3K = false;
  11122. isDanceStart4K = false;
  11123. isDanceStart5K = false;
  11124. isDanceStart6K = false;
  11125. isDanceStart9K = false;
  11126. isDanceStart13K = false;
  11127. }
  11128. if (isDanceStart14V)
  11129. {
  11130. for (int j = 0; j < maidCnt; j++)
  11131. {
  11132. if (maidArray[j] && maidArray[j].Visible)
  11133. {
  11134. if (isDanceStart14V)
  11135. {
  11136. maidArray[j].SetPos(dancePos[j]);
  11137. maidArray[j].body0.transform.localRotation = danceRot[j];
  11138. }
  11139. }
  11140. }
  11141. isDanceStart14V = false;
  11142. }
  11143. if (isDanceStart15V)
  11144. {
  11145. for (int j = 0; j < maidCnt; j++)
  11146. {
  11147. if (maidArray[j] && maidArray[j].Visible)
  11148. {
  11149. if (isDanceStart15V)
  11150. {
  11151. maidArray[j].SetPos(dancePos[j]);
  11152. maidArray[j].body0.transform.localRotation = danceRot[j];
  11153. }
  11154. }
  11155. }
  11156. isDanceStart15V = false;
  11157. }
  11158. if (maidArray[1] && maidArray[1].Visible)
  11159. {
  11160. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11161. {
  11162. Vector3 vector = Vector3.zero;
  11163. vector.x = 0.6f;
  11164. maidArray[1].SetPos(vector);
  11165. if (maidArray[2] && maidArray[2].Visible)
  11166. {
  11167. vector.x = -0.6f;
  11168. maidArray[2].SetPos(vector);
  11169. }
  11170. if (maidArray[3] && maidArray[3].Visible)
  11171. {
  11172. vector.x = 1.2f;
  11173. maidArray[3].SetPos(vector);
  11174. }
  11175. if (maidArray[4] && maidArray[4].Visible)
  11176. {
  11177. vector.x = -1.2f;
  11178. maidArray[4].SetPos(vector);
  11179. }
  11180. if (maidArray[5] && maidArray[5].Visible)
  11181. {
  11182. vector.x = 1.8f;
  11183. maidArray[5].SetPos(vector);
  11184. }
  11185. if (maidArray[6] && maidArray[6].Visible)
  11186. {
  11187. vector.x = -1.8f;
  11188. maidArray[6].SetPos(vector);
  11189. }
  11190. if (maidArray[7] && maidArray[7].Visible)
  11191. {
  11192. vector.x = 2.4f;
  11193. maidArray[7].SetPos(vector);
  11194. }
  11195. if (maidArray[8] && maidArray[8].Visible)
  11196. {
  11197. vector.x = -2.4f;
  11198. maidArray[8].SetPos(vector);
  11199. }
  11200. if (maidArray[9] && maidArray[9].Visible)
  11201. {
  11202. vector.x = 3f;
  11203. maidArray[9].SetPos(vector);
  11204. }
  11205. if (maidArray[10] && maidArray[10].Visible)
  11206. {
  11207. vector.x = -3f;
  11208. maidArray[10].SetPos(vector);
  11209. }
  11210. if (maidArray[11] && maidArray[11].Visible)
  11211. {
  11212. vector.x = 3.6f;
  11213. maidArray[11].SetPos(vector);
  11214. }
  11215. if (maidArray[12] && maidArray[12].Visible)
  11216. {
  11217. vector.x = -3.6f;
  11218. maidArray[12].SetPos(vector);
  11219. }
  11220. if (maidArray[13] && maidArray[13].Visible)
  11221. {
  11222. vector.x = 4.2f;
  11223. maidArray[13].SetPos(vector);
  11224. }
  11225. }
  11226. }
  11227. if (isShift)
  11228. {
  11229. isDanceStart6K = true;
  11230. for (int j = 0; j < maidCnt; j++)
  11231. {
  11232. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11233. maidArray[j].body0.transform.localRotation.y + 90f,
  11234. maidArray[j].body0.transform.localRotation.z));
  11235. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11236. maidArray[j].body0.transform.position.y,
  11237. maidArray[j].body0.transform.position.z + 4f));
  11238. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11239. int i = j;
  11240. Maid maid = maidArray[j];
  11241. if (!isVR)
  11242. {
  11243. delCount[i] = 20;
  11244. if (goSlot[(int)selectList[i]] != null)
  11245. {
  11246. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11247. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11248. {
  11249. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11250. }
  11251. }
  11252. }
  11253. string[] array = new string[2];
  11254. array = text2.Split(new char[] { ',' });
  11255. maid.DelProp(MPN.handitem, true);
  11256. maid.DelProp(MPN.accvag, true);
  11257. maid.DelProp(MPN.accanl, true);
  11258. maid.DelProp(MPN.kousoku_upper, true);
  11259. maid.DelProp(MPN.kousoku_lower, true);
  11260. if (array[0] != "")
  11261. {
  11262. maid.SetProp(array[0], array[1], 0, true, false);
  11263. }
  11264. maid.AllProcPropSeqStart();
  11265. }
  11266. }
  11267. isDance = true;
  11268. isDanceStart6 = true;
  11269. isHS1 = false;
  11270. isHS2 = false;
  11271. isHS3 = false;
  11272. }
  11273. if (isHS4 || isHS5 || isHS6)
  11274. {
  11275. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11276. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11277. for (int j = 0; j < maidCnt; j++)
  11278. {
  11279. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11280. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11281. switch (j)
  11282. {
  11283. case 1:
  11284. case 3:
  11285. case 5:
  11286. case 7:
  11287. case 9:
  11288. case 11:
  11289. case 13:
  11290. text5 = "dance_cm3d2_003_hs_f2.anm";
  11291. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11292. break;
  11293. }
  11294. if (maidArray[j] && maidArray[j].Visible)
  11295. {
  11296. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11297. {
  11298. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11299. }
  11300. string text4 = textAsset.text;
  11301. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11302. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11303. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11304. }
  11305. }
  11306. if (isHS4)
  11307. {
  11308. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11309. }
  11310. if (isHS5)
  11311. {
  11312. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11313. }
  11314. if (isHS6)
  11315. {
  11316. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11317. }
  11318. ikBui = 5;
  11319. isDanceStart1F = false;
  11320. isDanceStart2F = false;
  11321. isDanceStart3F = false;
  11322. isDanceStart4F = false;
  11323. isDanceStart5F = false;
  11324. isDanceStart6F = false;
  11325. isDanceStart7F = false;
  11326. isDanceStart8F = false;
  11327. isDanceStart9F = false;
  11328. isDanceStart10F = false;
  11329. isDanceStart11F = false;
  11330. isDanceStart12F = false;
  11331. isDanceStart13F = false;
  11332. isDanceStart14F = false;
  11333. isDanceStart15F = false;
  11334. for (int j = 0; j < maidCnt; j++)
  11335. {
  11336. danceFace[j] = 0f;
  11337. }
  11338. if (isDanceStart7V)
  11339. {
  11340. for (int j = 0; j < maidCnt; j++)
  11341. {
  11342. if (maidArray[j] && maidArray[j].Visible)
  11343. {
  11344. if (isDanceStart7V)
  11345. {
  11346. maidArray[j].SetPos(dancePos[j]);
  11347. maidArray[j].body0.transform.localRotation = danceRot[j];
  11348. }
  11349. }
  11350. }
  11351. isDanceStart7V = false;
  11352. }
  11353. if (isDanceStart8V)
  11354. {
  11355. for (int j = 0; j < maidCnt; j++)
  11356. {
  11357. if (maidArray[j] && maidArray[j].Visible)
  11358. {
  11359. if (isDanceStart8V)
  11360. {
  11361. maidArray[j].SetPos(dancePos[j]);
  11362. maidArray[j].body0.transform.localRotation = danceRot[j];
  11363. }
  11364. }
  11365. }
  11366. isDanceStart8V = false;
  11367. isDanceStart8P = false;
  11368. }
  11369. if (isDanceStart11V)
  11370. {
  11371. for (int j = 0; j < maidCnt; j++)
  11372. {
  11373. if (maidArray[j] && maidArray[j].Visible)
  11374. {
  11375. if (isDanceStart11V)
  11376. {
  11377. maidArray[j].SetPos(dancePos[j]);
  11378. maidArray[j].body0.transform.localRotation = danceRot[j];
  11379. }
  11380. }
  11381. }
  11382. isDanceStart11V = false;
  11383. }
  11384. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11385. || isDanceStart13K)
  11386. {
  11387. for (int j = 0; j < maidCnt; j++)
  11388. {
  11389. if (maidArray[j] && maidArray[j].Visible)
  11390. {
  11391. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11392. || isDanceStart13K)
  11393. {
  11394. maidArray[j].SetPos(dancePos[j]);
  11395. maidArray[j].body0.transform.localRotation = danceRot[j];
  11396. int i = j;
  11397. if (!isVR)
  11398. {
  11399. delCount[i] = 20;
  11400. if (goSlot[(int)selectList[i]] != null)
  11401. {
  11402. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11403. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11404. {
  11405. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11406. }
  11407. }
  11408. }
  11409. Maid maid = maidArray[j];
  11410. maid.DelProp(MPN.handitem, true);
  11411. maid.DelProp(MPN.accvag, true);
  11412. maid.DelProp(MPN.accanl, true);
  11413. maid.DelProp(MPN.kousoku_upper, true);
  11414. maid.DelProp(MPN.kousoku_lower, true);
  11415. maid.AllProcPropSeqStart();
  11416. }
  11417. }
  11418. }
  11419. isDanceStart1K = false;
  11420. isDanceStart3K = false;
  11421. isDanceStart4K = false;
  11422. isDanceStart5K = false;
  11423. isDanceStart6K = false;
  11424. isDanceStart9K = false;
  11425. isDanceStart13K = false;
  11426. }
  11427. if (isDanceStart14V)
  11428. {
  11429. for (int j = 0; j < maidCnt; j++)
  11430. {
  11431. if (maidArray[j] && maidArray[j].Visible)
  11432. {
  11433. if (isDanceStart14V)
  11434. {
  11435. maidArray[j].SetPos(dancePos[j]);
  11436. maidArray[j].body0.transform.localRotation = danceRot[j];
  11437. }
  11438. }
  11439. }
  11440. isDanceStart14V = false;
  11441. }
  11442. if (isDanceStart15V)
  11443. {
  11444. for (int j = 0; j < maidCnt; j++)
  11445. {
  11446. if (maidArray[j] && maidArray[j].Visible)
  11447. {
  11448. if (isDanceStart15V)
  11449. {
  11450. maidArray[j].SetPos(dancePos[j]);
  11451. maidArray[j].body0.transform.localRotation = danceRot[j];
  11452. }
  11453. }
  11454. }
  11455. isDanceStart15V = false;
  11456. }
  11457. for (int j = 0; j < maidCnt; j++)
  11458. {
  11459. isStop[j] = false;
  11460. isLock[j] = false;
  11461. pHandL[j] = 0;
  11462. pHandR[j] = 0;
  11463. muneIKL[j] = false;
  11464. muneIKR[j] = false;
  11465. if (!isVR)
  11466. {
  11467. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11468. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11469. }
  11470. if (maidArray[j].transform.position.y != 100f)
  11471. {
  11472. dancePos[j] = maidArray[j].transform.position;
  11473. }
  11474. else
  11475. {
  11476. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11477. }
  11478. danceRot[j] = maidArray[j].transform.localRotation;
  11479. }
  11480. if (maidArray[1] && maidArray[1].Visible)
  11481. {
  11482. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11483. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11484. }
  11485. if (maidArray[3] && maidArray[3].Visible)
  11486. {
  11487. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11488. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11489. }
  11490. if (maidArray[5] && maidArray[5].Visible)
  11491. {
  11492. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11493. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11494. }
  11495. if (maidArray[7] && maidArray[7].Visible)
  11496. {
  11497. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11498. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11499. }
  11500. if (maidArray[9] && maidArray[9].Visible)
  11501. {
  11502. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11503. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11504. }
  11505. if (maidArray[11] && maidArray[11].Visible)
  11506. {
  11507. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11508. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11509. }
  11510. if (maidArray[13] && maidArray[13].Visible)
  11511. {
  11512. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11513. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11514. }
  11515. if (maidArray[2] && maidArray[2].Visible)
  11516. {
  11517. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11518. {
  11519. Vector3 vector = Vector3.zero;
  11520. vector.x = 0.6f;
  11521. maidArray[1].SetPos(vector);
  11522. if (maidArray[2] && maidArray[2].Visible)
  11523. {
  11524. vector.x = -0.6f;
  11525. maidArray[2].SetPos(vector);
  11526. }
  11527. if (maidArray[3] && maidArray[3].Visible)
  11528. {
  11529. vector.x = 1.2f;
  11530. maidArray[3].SetPos(vector);
  11531. }
  11532. if (maidArray[4] && maidArray[4].Visible)
  11533. {
  11534. vector.x = -1.2f;
  11535. maidArray[4].SetPos(vector);
  11536. }
  11537. if (maidArray[5] && maidArray[5].Visible)
  11538. {
  11539. vector.x = 1.8f;
  11540. maidArray[5].SetPos(vector);
  11541. }
  11542. if (maidArray[6] && maidArray[6].Visible)
  11543. {
  11544. vector.x = -1.8f;
  11545. maidArray[6].SetPos(vector);
  11546. }
  11547. if (maidArray[7] && maidArray[7].Visible)
  11548. {
  11549. vector.x = 2.4f;
  11550. maidArray[7].SetPos(vector);
  11551. }
  11552. if (maidArray[8] && maidArray[8].Visible)
  11553. {
  11554. vector.x = -2.4f;
  11555. maidArray[8].SetPos(vector);
  11556. }
  11557. if (maidArray[9] && maidArray[9].Visible)
  11558. {
  11559. vector.x = 3f;
  11560. maidArray[9].SetPos(vector);
  11561. }
  11562. if (maidArray[10] && maidArray[10].Visible)
  11563. {
  11564. vector.x = -3f;
  11565. maidArray[10].SetPos(vector);
  11566. }
  11567. if (maidArray[11] && maidArray[11].Visible)
  11568. {
  11569. vector.x = 3.6f;
  11570. maidArray[11].SetPos(vector);
  11571. }
  11572. if (maidArray[12] && maidArray[12].Visible)
  11573. {
  11574. vector.x = -3.6f;
  11575. maidArray[12].SetPos(vector);
  11576. }
  11577. if (maidArray[13] && maidArray[13].Visible)
  11578. {
  11579. vector.x = 4.2f;
  11580. maidArray[13].SetPos(vector);
  11581. }
  11582. }
  11583. }
  11584. isDance = true;
  11585. isDanceStart7 = true;
  11586. isHS4 = false;
  11587. isHS5 = false;
  11588. isHS6 = false;
  11589. }
  11590. if (isHS7 || isHS8 || isHS9)
  11591. {
  11592. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11593. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11594. for (int j = 0; j < maidCnt; j++)
  11595. {
  11596. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11597. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11598. switch (j)
  11599. {
  11600. case 1:
  11601. case 5:
  11602. case 9:
  11603. case 13:
  11604. text5 = "dance_cm3d2_003_hs_f2.anm";
  11605. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11606. break;
  11607. case 2:
  11608. case 6:
  11609. case 10:
  11610. text5 = "dance_cm3d2_003_hs_f3.anm";
  11611. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11612. break;
  11613. case 3:
  11614. case 7:
  11615. case 11:
  11616. text5 = "dance_cm3d2_003_hs_f4.anm";
  11617. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11618. break;
  11619. }
  11620. if (maidArray[j] && maidArray[j].Visible)
  11621. {
  11622. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11623. {
  11624. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11625. }
  11626. }
  11627. string text4 = textAsset.text;
  11628. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11629. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11630. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11631. }
  11632. if (isHS7)
  11633. {
  11634. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11635. }
  11636. if (isHS8)
  11637. {
  11638. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11639. }
  11640. if (isHS9)
  11641. {
  11642. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11643. }
  11644. ikBui = 5;
  11645. isDanceStart1F = false;
  11646. isDanceStart2F = false;
  11647. isDanceStart3F = false;
  11648. isDanceStart4F = false;
  11649. isDanceStart5F = false;
  11650. isDanceStart6F = false;
  11651. isDanceStart7F = false;
  11652. isDanceStart8F = false;
  11653. isDanceStart9F = false;
  11654. isDanceStart10F = false;
  11655. isDanceStart11F = false;
  11656. isDanceStart12F = false;
  11657. isDanceStart13F = false;
  11658. isDanceStart14F = false;
  11659. isDanceStart15F = false;
  11660. for (int j = 0; j < maidCnt; j++)
  11661. {
  11662. danceFace[j] = 0f;
  11663. }
  11664. if (isDanceStart8V)
  11665. {
  11666. for (int j = 0; j < maidCnt; j++)
  11667. {
  11668. if (maidArray[j] && maidArray[j].Visible)
  11669. {
  11670. if (isDanceStart8V)
  11671. {
  11672. maidArray[j].SetPos(dancePos[j]);
  11673. maidArray[j].body0.transform.localRotation = danceRot[j];
  11674. }
  11675. }
  11676. }
  11677. isDanceStart8V = false;
  11678. isDanceStart8P = false;
  11679. }
  11680. for (int j = 0; j < maidCnt; j++)
  11681. {
  11682. isStop[j] = false;
  11683. isLock[j] = false;
  11684. pHandL[j] = 0;
  11685. pHandR[j] = 0;
  11686. muneIKL[j] = false;
  11687. muneIKR[j] = false;
  11688. if (!isVR)
  11689. {
  11690. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11691. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11692. }
  11693. if (maidArray[j].transform.position.y != 100f)
  11694. {
  11695. dancePos[j] = maidArray[j].transform.position;
  11696. }
  11697. else
  11698. {
  11699. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11700. }
  11701. danceRot[j] = maidArray[j].transform.localRotation;
  11702. }
  11703. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11704. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11705. {
  11706. maidArray[0].SetPos(Vector3.zero);
  11707. maidArray[0].SetRot(Vector3.zero);
  11708. }
  11709. if (maidArray[1] && maidArray[1].Visible)
  11710. {
  11711. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11712. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11713. }
  11714. if (maidArray[2] && maidArray[2].Visible)
  11715. {
  11716. maidArray[2].SetPos(maidArray[0].transform.position);
  11717. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11718. }
  11719. if (maidArray[3] && maidArray[3].Visible)
  11720. {
  11721. maidArray[3].SetPos(maidArray[0].transform.position);
  11722. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11723. }
  11724. if (maidArray[5] && maidArray[5].Visible)
  11725. {
  11726. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11727. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11728. }
  11729. if (maidArray[6] && maidArray[6].Visible)
  11730. {
  11731. maidArray[6].SetPos(maidArray[4].transform.position);
  11732. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11733. }
  11734. if (maidArray[7] && maidArray[7].Visible)
  11735. {
  11736. maidArray[7].SetPos(maidArray[4].transform.position);
  11737. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11738. }
  11739. if (maidArray[9] && maidArray[9].Visible)
  11740. {
  11741. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11742. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11743. }
  11744. if (maidArray[10] && maidArray[10].Visible)
  11745. {
  11746. maidArray[10].SetPos(maidArray[8].transform.position);
  11747. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11748. }
  11749. if (maidArray[11] && maidArray[11].Visible)
  11750. {
  11751. maidArray[11].SetPos(maidArray[8].transform.position);
  11752. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11753. }
  11754. if (maidArray[13] && maidArray[13].Visible)
  11755. {
  11756. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11757. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11758. }
  11759. if (maidArray[4] && maidArray[4].Visible)
  11760. {
  11761. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11762. {
  11763. Vector3 vector = Vector3.zero;
  11764. vector.x = 0.6f;
  11765. maidArray[1].SetPos(vector);
  11766. if (maidArray[2] && maidArray[2].Visible)
  11767. {
  11768. vector.x = -0.6f;
  11769. maidArray[2].SetPos(vector);
  11770. }
  11771. if (maidArray[3] && maidArray[3].Visible)
  11772. {
  11773. vector.x = 1.2f;
  11774. maidArray[3].SetPos(vector);
  11775. }
  11776. if (maidArray[4] && maidArray[4].Visible)
  11777. {
  11778. vector.x = -1.2f;
  11779. maidArray[4].SetPos(vector);
  11780. }
  11781. if (maidArray[5] && maidArray[5].Visible)
  11782. {
  11783. vector.x = 1.8f;
  11784. maidArray[5].SetPos(vector);
  11785. }
  11786. if (maidArray[6] && maidArray[6].Visible)
  11787. {
  11788. vector.x = -1.8f;
  11789. maidArray[6].SetPos(vector);
  11790. }
  11791. if (maidArray[7] && maidArray[7].Visible)
  11792. {
  11793. vector.x = 2.4f;
  11794. maidArray[7].SetPos(vector);
  11795. }
  11796. if (maidArray[8] && maidArray[8].Visible)
  11797. {
  11798. vector.x = -2.4f;
  11799. maidArray[8].SetPos(vector);
  11800. }
  11801. if (maidArray[9] && maidArray[9].Visible)
  11802. {
  11803. vector.x = 3f;
  11804. maidArray[9].SetPos(vector);
  11805. }
  11806. if (maidArray[10] && maidArray[10].Visible)
  11807. {
  11808. vector.x = -3f;
  11809. maidArray[10].SetPos(vector);
  11810. }
  11811. if (maidArray[11] && maidArray[11].Visible)
  11812. {
  11813. vector.x = 3.6f;
  11814. maidArray[11].SetPos(vector);
  11815. }
  11816. if (maidArray[12] && maidArray[12].Visible)
  11817. {
  11818. vector.x = -3.6f;
  11819. maidArray[12].SetPos(vector);
  11820. }
  11821. if (maidArray[13] && maidArray[13].Visible)
  11822. {
  11823. vector.x = 4.2f;
  11824. maidArray[13].SetPos(vector);
  11825. }
  11826. }
  11827. }
  11828. isDance = true;
  11829. isDanceStart8 = true;
  11830. isHS7 = false;
  11831. isHS8 = false;
  11832. isHS9 = false;
  11833. }
  11834. if (isCF1)
  11835. {
  11836. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11837. string text4 = textAsset.text;
  11838. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11839. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11840. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11841. for (int j = 0; j < maidCnt; j++)
  11842. {
  11843. if (!isShift)
  11844. {
  11845. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11846. {
  11847. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11848. GameUty.FileSystem,
  11849. "dance_cm3d_003_sp2_f1.anm",
  11850. false,
  11851. false);
  11852. }
  11853. }
  11854. else
  11855. {
  11856. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11857. {
  11858. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11859. GameUty.FileSystem,
  11860. "dance_cm3d2_kara02_002_rty_f1.anm",
  11861. false,
  11862. false);
  11863. }
  11864. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11865. text4 = textAsset.text;
  11866. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11867. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11868. && !isDanceStart9K && !isDanceStart13K)
  11869. {
  11870. dancePos[j] = maidArray[j].transform.position;
  11871. danceRot[j] = maidArray[j].transform.localRotation;
  11872. }
  11873. }
  11874. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11875. }
  11876. if (!isShift)
  11877. {
  11878. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11879. }
  11880. else
  11881. {
  11882. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11883. }
  11884. for (int j = 0; j < maidCnt; j++)
  11885. {
  11886. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11887. isStop[j] = false;
  11888. isLock[j] = false;
  11889. pHandL[j] = 0;
  11890. pHandR[j] = 0;
  11891. muneIKL[j] = false;
  11892. muneIKR[j] = false;
  11893. if (!isVR)
  11894. {
  11895. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11896. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11897. }
  11898. }
  11899. ikBui = 5;
  11900. isDanceStart1F = false;
  11901. isDanceStart2F = false;
  11902. isDanceStart3F = false;
  11903. isDanceStart4F = false;
  11904. isDanceStart5F = false;
  11905. isDanceStart6F = false;
  11906. isDanceStart7F = false;
  11907. isDanceStart8F = false;
  11908. isDanceStart9F = false;
  11909. isDanceStart10F = false;
  11910. isDanceStart11F = false;
  11911. isDanceStart12F = false;
  11912. isDanceStart13F = false;
  11913. isDanceStart14F = false;
  11914. isDanceStart15F = false;
  11915. for (int j = 0; j < maidCnt; j++)
  11916. {
  11917. danceFace[j] = 0f;
  11918. }
  11919. if (isDanceStart7V)
  11920. {
  11921. for (int j = 0; j < maidCnt; j++)
  11922. {
  11923. if (maidArray[j] && maidArray[j].Visible)
  11924. {
  11925. if (isDanceStart7V)
  11926. {
  11927. maidArray[j].SetPos(dancePos[j]);
  11928. maidArray[j].body0.transform.localRotation = danceRot[j];
  11929. }
  11930. }
  11931. }
  11932. isDanceStart7V = false;
  11933. }
  11934. if (isDanceStart8V)
  11935. {
  11936. for (int j = 0; j < maidCnt; j++)
  11937. {
  11938. if (maidArray[j] && maidArray[j].Visible)
  11939. {
  11940. if (isDanceStart8V)
  11941. {
  11942. maidArray[j].SetPos(dancePos[j]);
  11943. maidArray[j].body0.transform.localRotation = danceRot[j];
  11944. }
  11945. }
  11946. }
  11947. isDanceStart8V = false;
  11948. isDanceStart8P = false;
  11949. }
  11950. if (isDanceStart11V)
  11951. {
  11952. for (int j = 0; j < maidCnt; j++)
  11953. {
  11954. if (maidArray[j] && maidArray[j].Visible)
  11955. {
  11956. if (isDanceStart11V)
  11957. {
  11958. maidArray[j].SetPos(dancePos[j]);
  11959. maidArray[j].body0.transform.localRotation = danceRot[j];
  11960. }
  11961. }
  11962. }
  11963. isDanceStart11V = false;
  11964. }
  11965. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11966. || isDanceStart13K)
  11967. {
  11968. for (int j = 0; j < maidCnt; j++)
  11969. {
  11970. if (maidArray[j] && maidArray[j].Visible)
  11971. {
  11972. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11973. || isDanceStart13K)
  11974. {
  11975. maidArray[j].SetPos(dancePos[j]);
  11976. maidArray[j].body0.transform.localRotation = danceRot[j];
  11977. int i = j;
  11978. if (!isVR)
  11979. {
  11980. delCount[i] = 20;
  11981. if (goSlot[(int)selectList[i]] != null)
  11982. {
  11983. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11984. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11985. {
  11986. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11987. }
  11988. }
  11989. }
  11990. Maid maid = maidArray[j];
  11991. maid.DelProp(MPN.handitem, true);
  11992. maid.DelProp(MPN.accvag, true);
  11993. maid.DelProp(MPN.accanl, true);
  11994. maid.DelProp(MPN.kousoku_upper, true);
  11995. maid.DelProp(MPN.kousoku_lower, true);
  11996. maid.AllProcPropSeqStart();
  11997. }
  11998. }
  11999. }
  12000. isDanceStart1K = false;
  12001. isDanceStart3K = false;
  12002. isDanceStart4K = false;
  12003. isDanceStart5K = false;
  12004. isDanceStart6K = false;
  12005. isDanceStart9K = false;
  12006. isDanceStart13K = false;
  12007. }
  12008. if (isDanceStart14V)
  12009. {
  12010. for (int j = 0; j < maidCnt; j++)
  12011. {
  12012. if (maidArray[j] && maidArray[j].Visible)
  12013. {
  12014. if (isDanceStart14V)
  12015. {
  12016. maidArray[j].SetPos(dancePos[j]);
  12017. maidArray[j].body0.transform.localRotation = danceRot[j];
  12018. }
  12019. }
  12020. }
  12021. isDanceStart14V = false;
  12022. }
  12023. if (isDanceStart15V)
  12024. {
  12025. for (int j = 0; j < maidCnt; j++)
  12026. {
  12027. if (maidArray[j] && maidArray[j].Visible)
  12028. {
  12029. if (isDanceStart15V)
  12030. {
  12031. maidArray[j].SetPos(dancePos[j]);
  12032. maidArray[j].body0.transform.localRotation = danceRot[j];
  12033. }
  12034. }
  12035. }
  12036. isDanceStart15V = false;
  12037. }
  12038. if (maidArray[1] && maidArray[1].Visible)
  12039. {
  12040. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12041. {
  12042. Vector3 vector = Vector3.zero;
  12043. vector.x = 0.6f;
  12044. maidArray[1].SetPos(vector);
  12045. if (maidArray[2] && maidArray[2].Visible)
  12046. {
  12047. vector.x = -0.6f;
  12048. maidArray[2].SetPos(vector);
  12049. }
  12050. if (maidArray[3] && maidArray[3].Visible)
  12051. {
  12052. vector.x = 1.2f;
  12053. maidArray[3].SetPos(vector);
  12054. }
  12055. if (maidArray[4] && maidArray[4].Visible)
  12056. {
  12057. vector.x = -1.2f;
  12058. maidArray[4].SetPos(vector);
  12059. }
  12060. if (maidArray[5] && maidArray[5].Visible)
  12061. {
  12062. vector.x = 1.8f;
  12063. maidArray[5].SetPos(vector);
  12064. }
  12065. if (maidArray[6] && maidArray[6].Visible)
  12066. {
  12067. vector.x = -1.8f;
  12068. maidArray[6].SetPos(vector);
  12069. }
  12070. if (maidArray[7] && maidArray[7].Visible)
  12071. {
  12072. vector.x = 2.4f;
  12073. maidArray[7].SetPos(vector);
  12074. }
  12075. if (maidArray[8] && maidArray[8].Visible)
  12076. {
  12077. vector.x = -2.4f;
  12078. maidArray[8].SetPos(vector);
  12079. }
  12080. if (maidArray[9] && maidArray[9].Visible)
  12081. {
  12082. vector.x = 3f;
  12083. maidArray[9].SetPos(vector);
  12084. }
  12085. if (maidArray[10] && maidArray[10].Visible)
  12086. {
  12087. vector.x = -3f;
  12088. maidArray[10].SetPos(vector);
  12089. }
  12090. if (maidArray[11] && maidArray[11].Visible)
  12091. {
  12092. vector.x = 3.6f;
  12093. maidArray[11].SetPos(vector);
  12094. }
  12095. if (maidArray[12] && maidArray[12].Visible)
  12096. {
  12097. vector.x = -3.6f;
  12098. maidArray[12].SetPos(vector);
  12099. }
  12100. if (maidArray[13] && maidArray[13].Visible)
  12101. {
  12102. vector.x = 4.2f;
  12103. maidArray[13].SetPos(vector);
  12104. }
  12105. }
  12106. }
  12107. if (isShift)
  12108. {
  12109. isDanceStart5K = true;
  12110. for (int j = 0; j < maidCnt; j++)
  12111. {
  12112. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12113. maidArray[j].body0.transform.localRotation.y + 90f,
  12114. maidArray[j].body0.transform.localRotation.z));
  12115. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12116. maidArray[j].body0.transform.position.y,
  12117. maidArray[j].body0.transform.position.z + 4f));
  12118. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12119. int i = j;
  12120. Maid maid = maidArray[j];
  12121. if (!isVR)
  12122. {
  12123. delCount[i] = 20;
  12124. if (goSlot[(int)selectList[i]] != null)
  12125. {
  12126. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12127. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12128. {
  12129. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12130. }
  12131. }
  12132. }
  12133. string[] array = new string[2];
  12134. array = text2.Split(new char[] { ',' });
  12135. maid.DelProp(MPN.handitem, true);
  12136. maid.DelProp(MPN.accvag, true);
  12137. maid.DelProp(MPN.accanl, true);
  12138. maid.DelProp(MPN.kousoku_upper, true);
  12139. maid.DelProp(MPN.kousoku_lower, true);
  12140. if (array[0] != "")
  12141. {
  12142. maid.SetProp(array[0], array[1], 0, true, false);
  12143. }
  12144. maid.AllProcPropSeqStart();
  12145. }
  12146. }
  12147. isDance = true;
  12148. isDanceStart5 = true;
  12149. isCF1 = false;
  12150. }
  12151. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12152. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12153. {
  12154. GameMain.Instance.SoundMgr.StopBGM(0f);
  12155. isCF1 = true;
  12156. if (getModKeyPressing(modKey.Shift))
  12157. {
  12158. isShift = true;
  12159. }
  12160. }
  12161. if (isKT1)
  12162. {
  12163. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12164. string text4 = textAsset.text;
  12165. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12166. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12167. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12168. for (int j = 0; j < maidCnt; j++)
  12169. {
  12170. if (!isShift)
  12171. {
  12172. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12173. {
  12174. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12175. GameUty.FileSystem,
  12176. "dance_cm3d_004_kano_f1.anm",
  12177. false,
  12178. false);
  12179. }
  12180. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12181. }
  12182. else
  12183. {
  12184. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12185. {
  12186. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12187. GameUty.FileSystem,
  12188. "dance_cm3d2_kara_002_cktc_f1.anm",
  12189. false,
  12190. false);
  12191. }
  12192. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12193. text4 = textAsset.text;
  12194. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12195. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12196. && !isDanceStart9K && !isDanceStart13K)
  12197. {
  12198. dancePos[j] = maidArray[j].transform.position;
  12199. danceRot[j] = maidArray[j].transform.localRotation;
  12200. }
  12201. }
  12202. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12203. }
  12204. if (!isShift)
  12205. {
  12206. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12207. }
  12208. else
  12209. {
  12210. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12211. }
  12212. for (int j = 0; j < maidCnt; j++)
  12213. {
  12214. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12215. isStop[j] = false;
  12216. isLock[j] = false;
  12217. pHandL[j] = 0;
  12218. pHandR[j] = 0;
  12219. muneIKL[j] = false;
  12220. muneIKR[j] = false;
  12221. if (!isVR)
  12222. {
  12223. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12224. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12225. }
  12226. }
  12227. ikBui = 5;
  12228. isDanceStart1F = false;
  12229. isDanceStart2F = false;
  12230. isDanceStart3F = false;
  12231. isDanceStart4F = false;
  12232. isDanceStart5F = false;
  12233. isDanceStart6F = false;
  12234. isDanceStart7F = false;
  12235. isDanceStart8F = false;
  12236. isDanceStart9F = false;
  12237. isDanceStart10F = false;
  12238. isDanceStart11F = false;
  12239. isDanceStart12F = false;
  12240. isDanceStart13F = false;
  12241. isDanceStart14F = false;
  12242. isDanceStart15F = false;
  12243. for (int j = 0; j < maidCnt; j++)
  12244. {
  12245. danceFace[j] = 0f;
  12246. }
  12247. if (isDanceStart7V)
  12248. {
  12249. for (int j = 0; j < maidCnt; j++)
  12250. {
  12251. if (maidArray[j] && maidArray[j].Visible)
  12252. {
  12253. if (isDanceStart7V)
  12254. {
  12255. maidArray[j].SetPos(dancePos[j]);
  12256. maidArray[j].body0.transform.localRotation = danceRot[j];
  12257. }
  12258. }
  12259. }
  12260. isDanceStart7V = false;
  12261. }
  12262. if (isDanceStart8V)
  12263. {
  12264. for (int j = 0; j < maidCnt; j++)
  12265. {
  12266. if (maidArray[j] && maidArray[j].Visible)
  12267. {
  12268. if (isDanceStart8V)
  12269. {
  12270. maidArray[j].SetPos(dancePos[j]);
  12271. maidArray[j].body0.transform.localRotation = danceRot[j];
  12272. }
  12273. }
  12274. }
  12275. isDanceStart8V = false;
  12276. isDanceStart8P = false;
  12277. }
  12278. if (isDanceStart11V)
  12279. {
  12280. for (int j = 0; j < maidCnt; j++)
  12281. {
  12282. if (maidArray[j] && maidArray[j].Visible)
  12283. {
  12284. if (isDanceStart11V)
  12285. {
  12286. maidArray[j].SetPos(dancePos[j]);
  12287. maidArray[j].body0.transform.localRotation = danceRot[j];
  12288. }
  12289. }
  12290. }
  12291. isDanceStart11V = false;
  12292. }
  12293. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12294. || isDanceStart13K)
  12295. {
  12296. for (int j = 0; j < maidCnt; j++)
  12297. {
  12298. if (maidArray[j] && maidArray[j].Visible)
  12299. {
  12300. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12301. || isDanceStart13K)
  12302. {
  12303. maidArray[j].SetPos(dancePos[j]);
  12304. maidArray[j].body0.transform.localRotation = danceRot[j];
  12305. int i = j;
  12306. if (!isVR)
  12307. {
  12308. delCount[i] = 20;
  12309. if (goSlot[(int)selectList[i]] != null)
  12310. {
  12311. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12312. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12313. {
  12314. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12315. }
  12316. }
  12317. }
  12318. Maid maid = maidArray[j];
  12319. maid.DelProp(MPN.handitem, true);
  12320. maid.DelProp(MPN.accvag, true);
  12321. maid.DelProp(MPN.accanl, true);
  12322. maid.DelProp(MPN.kousoku_upper, true);
  12323. maid.DelProp(MPN.kousoku_lower, true);
  12324. maid.AllProcPropSeqStart();
  12325. }
  12326. }
  12327. }
  12328. isDanceStart1K = false;
  12329. isDanceStart3K = false;
  12330. isDanceStart4K = false;
  12331. isDanceStart5K = false;
  12332. isDanceStart6K = false;
  12333. isDanceStart9K = false;
  12334. isDanceStart13K = false;
  12335. }
  12336. if (isDanceStart14V)
  12337. {
  12338. for (int j = 0; j < maidCnt; j++)
  12339. {
  12340. if (maidArray[j] && maidArray[j].Visible)
  12341. {
  12342. if (isDanceStart14V)
  12343. {
  12344. maidArray[j].SetPos(dancePos[j]);
  12345. maidArray[j].body0.transform.localRotation = danceRot[j];
  12346. }
  12347. }
  12348. }
  12349. isDanceStart14V = false;
  12350. }
  12351. if (isDanceStart15V)
  12352. {
  12353. for (int j = 0; j < maidCnt; j++)
  12354. {
  12355. if (maidArray[j] && maidArray[j].Visible)
  12356. {
  12357. if (isDanceStart15V)
  12358. {
  12359. maidArray[j].SetPos(dancePos[j]);
  12360. maidArray[j].body0.transform.localRotation = danceRot[j];
  12361. }
  12362. }
  12363. }
  12364. isDanceStart15V = false;
  12365. }
  12366. if (maidArray[1] && maidArray[1].Visible)
  12367. {
  12368. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12369. {
  12370. Vector3 vector = Vector3.zero;
  12371. vector.x = 0.6f;
  12372. maidArray[1].SetPos(vector);
  12373. if (maidArray[2] && maidArray[2].Visible)
  12374. {
  12375. vector.x = -0.6f;
  12376. maidArray[2].SetPos(vector);
  12377. }
  12378. if (maidArray[3] && maidArray[3].Visible)
  12379. {
  12380. vector.x = 1.2f;
  12381. maidArray[3].SetPos(vector);
  12382. }
  12383. if (maidArray[4] && maidArray[4].Visible)
  12384. {
  12385. vector.x = -1.2f;
  12386. maidArray[4].SetPos(vector);
  12387. }
  12388. if (maidArray[5] && maidArray[5].Visible)
  12389. {
  12390. vector.x = 1.8f;
  12391. maidArray[5].SetPos(vector);
  12392. }
  12393. if (maidArray[6] && maidArray[6].Visible)
  12394. {
  12395. vector.x = -1.8f;
  12396. maidArray[6].SetPos(vector);
  12397. }
  12398. if (maidArray[7] && maidArray[7].Visible)
  12399. {
  12400. vector.x = 2.4f;
  12401. maidArray[7].SetPos(vector);
  12402. }
  12403. if (maidArray[8] && maidArray[8].Visible)
  12404. {
  12405. vector.x = -2.4f;
  12406. maidArray[8].SetPos(vector);
  12407. }
  12408. if (maidArray[9] && maidArray[9].Visible)
  12409. {
  12410. vector.x = 3f;
  12411. maidArray[9].SetPos(vector);
  12412. }
  12413. if (maidArray[10] && maidArray[10].Visible)
  12414. {
  12415. vector.x = -3f;
  12416. maidArray[10].SetPos(vector);
  12417. }
  12418. if (maidArray[11] && maidArray[11].Visible)
  12419. {
  12420. vector.x = 3.6f;
  12421. maidArray[11].SetPos(vector);
  12422. }
  12423. if (maidArray[12] && maidArray[12].Visible)
  12424. {
  12425. vector.x = -3.6f;
  12426. maidArray[12].SetPos(vector);
  12427. }
  12428. if (maidArray[13] && maidArray[13].Visible)
  12429. {
  12430. vector.x = 4.2f;
  12431. maidArray[13].SetPos(vector);
  12432. }
  12433. }
  12434. }
  12435. if (maidArray[2] && maidArray[2].Visible)
  12436. {
  12437. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12438. {
  12439. Vector3 vector = Vector3.zero;
  12440. vector.x = 0.6f;
  12441. maidArray[1].SetPos(vector);
  12442. if (maidArray[2] && maidArray[2].Visible)
  12443. {
  12444. vector.x = -0.6f;
  12445. maidArray[2].SetPos(vector);
  12446. }
  12447. if (maidArray[3] && maidArray[3].Visible)
  12448. {
  12449. vector.x = 1.2f;
  12450. maidArray[3].SetPos(vector);
  12451. }
  12452. if (maidArray[4] && maidArray[4].Visible)
  12453. {
  12454. vector.x = -1.2f;
  12455. maidArray[4].SetPos(vector);
  12456. }
  12457. if (maidArray[5] && maidArray[5].Visible)
  12458. {
  12459. vector.x = 1.8f;
  12460. maidArray[5].SetPos(vector);
  12461. }
  12462. if (maidArray[6] && maidArray[6].Visible)
  12463. {
  12464. vector.x = -1.8f;
  12465. maidArray[6].SetPos(vector);
  12466. }
  12467. if (maidArray[7] && maidArray[7].Visible)
  12468. {
  12469. vector.x = 2.4f;
  12470. maidArray[7].SetPos(vector);
  12471. }
  12472. if (maidArray[8] && maidArray[8].Visible)
  12473. {
  12474. vector.x = -2.4f;
  12475. maidArray[8].SetPos(vector);
  12476. }
  12477. if (maidArray[9] && maidArray[9].Visible)
  12478. {
  12479. vector.x = 3f;
  12480. maidArray[9].SetPos(vector);
  12481. }
  12482. if (maidArray[10] && maidArray[10].Visible)
  12483. {
  12484. vector.x = -3f;
  12485. maidArray[10].SetPos(vector);
  12486. }
  12487. if (maidArray[11] && maidArray[11].Visible)
  12488. {
  12489. vector.x = 3.6f;
  12490. maidArray[11].SetPos(vector);
  12491. }
  12492. if (maidArray[12] && maidArray[12].Visible)
  12493. {
  12494. vector.x = -3.6f;
  12495. maidArray[12].SetPos(vector);
  12496. }
  12497. if (maidArray[13] && maidArray[13].Visible)
  12498. {
  12499. vector.x = 4.2f;
  12500. maidArray[13].SetPos(vector);
  12501. }
  12502. }
  12503. }
  12504. if (isShift)
  12505. {
  12506. isDanceStart9K = true;
  12507. for (int j = 0; j < maidCnt; j++)
  12508. {
  12509. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12510. maidArray[j].body0.transform.localRotation.y + 90f,
  12511. maidArray[j].body0.transform.localRotation.z));
  12512. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12513. maidArray[j].body0.transform.position.y,
  12514. maidArray[j].body0.transform.position.z + 4f));
  12515. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12516. int i = j;
  12517. Maid maid = maidArray[j];
  12518. if (!isVR)
  12519. {
  12520. delCount[i] = 20;
  12521. if (goSlot[(int)selectList[i]] != null)
  12522. {
  12523. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12524. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12525. {
  12526. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12527. }
  12528. }
  12529. }
  12530. string[] array = new string[2];
  12531. array = text2.Split(new char[] { ',' });
  12532. maid.DelProp(MPN.handitem, true);
  12533. maid.DelProp(MPN.accvag, true);
  12534. maid.DelProp(MPN.accanl, true);
  12535. maid.DelProp(MPN.kousoku_upper, true);
  12536. maid.DelProp(MPN.kousoku_lower, true);
  12537. if (array[0] != "")
  12538. {
  12539. maid.SetProp(array[0], array[1], 0, true, false);
  12540. }
  12541. maid.AllProcPropSeqStart();
  12542. }
  12543. }
  12544. isDance = true;
  12545. isDanceStart9 = true;
  12546. isKT1 = false;
  12547. }
  12548. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12549. {
  12550. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12551. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12552. if (isSS1)
  12553. {
  12554. nameK = "dance_BlD_m";
  12555. nameA = "dance_cm3d21_002_bid_f";
  12556. nameS = "bloomingdreaming_short";
  12557. danceNo1 = 1;
  12558. danceNo2 = 3;
  12559. danceNo3 = 2;
  12560. }
  12561. if (isSS2)
  12562. {
  12563. nameK = "dance_KAD_m";
  12564. nameA = "dance_cm3d21_003_kad_f";
  12565. nameS = "kiminiaijodelicious_short";
  12566. danceNo1 = 1;
  12567. danceNo2 = 2;
  12568. danceNo3 = 3;
  12569. }
  12570. if (isSS3)
  12571. {
  12572. nameK = "dance_LUM_m";
  12573. nameA = "dance_cm3d21_004_lm_f";
  12574. nameS = "luminousmoment_short";
  12575. danceNo1 = 3;
  12576. danceNo2 = 1;
  12577. danceNo3 = 2;
  12578. }
  12579. if (isSS4)
  12580. {
  12581. nameK = "dance_NmF_m";
  12582. nameA = "dance_cm3d21_001_nmf_f";
  12583. nameS = "nightmagicfire_short";
  12584. danceNo1 = 2;
  12585. danceNo2 = 1;
  12586. danceNo3 = 3;
  12587. }
  12588. if (isSS5)
  12589. {
  12590. nameK = "dance_MoE_m";
  12591. nameA = "dance_cm3d21_005_moe_f";
  12592. nameS = "melodyofempire_short";
  12593. danceNo1 = 1;
  12594. danceNo2 = 3;
  12595. danceNo3 = 2;
  12596. }
  12597. if (isSS6)
  12598. {
  12599. nameK = "dance_NmF_m";
  12600. nameA = "dance_cm3d21_kara_001_nmf_f";
  12601. nameS = "nightmagicfire_short";
  12602. danceNo1 = 1;
  12603. danceNo2 = 1;
  12604. danceNo3 = 1;
  12605. }
  12606. for (int j = 0; j < maidCnt; j++)
  12607. {
  12608. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12609. string text5 = nameA + danceNo1 + ".anm";
  12610. switch (j)
  12611. {
  12612. case 1:
  12613. case 4:
  12614. case 7:
  12615. case 10:
  12616. case 13:
  12617. text5 = nameA + danceNo2 + ".anm";
  12618. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12619. break;
  12620. case 2:
  12621. case 5:
  12622. case 8:
  12623. case 11:
  12624. text5 = nameA + danceNo3 + ".anm";
  12625. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12626. break;
  12627. }
  12628. if (maidArray[j] && maidArray[j].Visible)
  12629. {
  12630. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12631. {
  12632. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12633. }
  12634. string text4 = textAsset.text;
  12635. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12636. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12637. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12638. }
  12639. }
  12640. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12641. ikBui = 5;
  12642. isDanceStart1F = false;
  12643. isDanceStart2F = false;
  12644. isDanceStart3F = false;
  12645. isDanceStart4F = false;
  12646. isDanceStart5F = false;
  12647. isDanceStart6F = false;
  12648. isDanceStart7F = false;
  12649. isDanceStart8F = false;
  12650. isDanceStart9F = false;
  12651. isDanceStart10F = false;
  12652. isDanceStart11F = false;
  12653. isDanceStart12F = false;
  12654. isDanceStart13F = false;
  12655. isDanceStart14F = false;
  12656. isDanceStart15F = false;
  12657. for (int j = 0; j < maidCnt; j++)
  12658. {
  12659. danceFace[j] = 0f;
  12660. }
  12661. if (isDanceStart7V)
  12662. {
  12663. for (int j = 0; j < maidCnt; j++)
  12664. {
  12665. if (maidArray[j] && maidArray[j].Visible)
  12666. {
  12667. if (isDanceStart7V)
  12668. {
  12669. maidArray[j].SetPos(dancePos[j]);
  12670. maidArray[j].body0.transform.localRotation = danceRot[j];
  12671. }
  12672. }
  12673. }
  12674. isDanceStart7V = false;
  12675. }
  12676. if (isDanceStart8V)
  12677. {
  12678. for (int j = 0; j < maidCnt; j++)
  12679. {
  12680. if (maidArray[j] && maidArray[j].Visible)
  12681. {
  12682. if (isDanceStart8V)
  12683. {
  12684. maidArray[j].SetPos(dancePos[j]);
  12685. maidArray[j].body0.transform.localRotation = danceRot[j];
  12686. }
  12687. }
  12688. }
  12689. isDanceStart8V = false;
  12690. isDanceStart8P = false;
  12691. }
  12692. if (isDanceStart11V)
  12693. {
  12694. for (int j = 0; j < maidCnt; j++)
  12695. {
  12696. if (maidArray[j] && maidArray[j].Visible)
  12697. {
  12698. if (isDanceStart11V)
  12699. {
  12700. maidArray[j].SetPos(dancePos[j]);
  12701. maidArray[j].body0.transform.localRotation = danceRot[j];
  12702. }
  12703. }
  12704. }
  12705. isDanceStart11V = false;
  12706. }
  12707. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12708. || isDanceStart13K)
  12709. {
  12710. for (int j = 0; j < maidCnt; j++)
  12711. {
  12712. if (maidArray[j] && maidArray[j].Visible)
  12713. {
  12714. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12715. || isDanceStart13K)
  12716. {
  12717. maidArray[j].SetPos(dancePos[j]);
  12718. maidArray[j].body0.transform.localRotation = danceRot[j];
  12719. int i = j;
  12720. if (!isVR)
  12721. {
  12722. delCount[i] = 20;
  12723. if (goSlot[(int)selectList[i]] != null)
  12724. {
  12725. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12726. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12727. {
  12728. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12729. }
  12730. }
  12731. }
  12732. Maid maid = maidArray[j];
  12733. maid.DelProp(MPN.handitem, true);
  12734. maid.DelProp(MPN.accvag, true);
  12735. maid.DelProp(MPN.accanl, true);
  12736. maid.DelProp(MPN.kousoku_upper, true);
  12737. maid.DelProp(MPN.kousoku_lower, true);
  12738. maid.AllProcPropSeqStart();
  12739. }
  12740. }
  12741. }
  12742. isDanceStart1K = false;
  12743. isDanceStart3K = false;
  12744. isDanceStart4K = false;
  12745. isDanceStart5K = false;
  12746. isDanceStart6K = false;
  12747. isDanceStart9K = false;
  12748. isDanceStart13K = false;
  12749. }
  12750. if (isDanceStart14V)
  12751. {
  12752. for (int j = 0; j < maidCnt; j++)
  12753. {
  12754. if (maidArray[j] && maidArray[j].Visible)
  12755. {
  12756. if (isDanceStart14V)
  12757. {
  12758. maidArray[j].SetPos(dancePos[j]);
  12759. maidArray[j].body0.transform.localRotation = danceRot[j];
  12760. }
  12761. }
  12762. }
  12763. isDanceStart14V = false;
  12764. }
  12765. if (isDanceStart15V)
  12766. {
  12767. for (int j = 0; j < maidCnt; j++)
  12768. {
  12769. if (maidArray[j] && maidArray[j].Visible)
  12770. {
  12771. if (isDanceStart15V)
  12772. {
  12773. maidArray[j].SetPos(dancePos[j]);
  12774. maidArray[j].body0.transform.localRotation = danceRot[j];
  12775. }
  12776. }
  12777. }
  12778. isDanceStart15V = false;
  12779. }
  12780. for (int j = 0; j < maidCnt; j++)
  12781. {
  12782. isStop[j] = false;
  12783. isLock[j] = false;
  12784. pHandL[j] = 0;
  12785. pHandR[j] = 0;
  12786. muneIKL[j] = false;
  12787. muneIKR[j] = false;
  12788. if (!isVR)
  12789. {
  12790. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12791. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12792. }
  12793. if (maidArray[j].transform.position.y != 100f)
  12794. {
  12795. dancePos[j] = maidArray[j].transform.position;
  12796. }
  12797. else
  12798. {
  12799. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12800. }
  12801. danceRot[j] = maidArray[j].transform.localRotation;
  12802. }
  12803. if (maidArray[1] && maidArray[1].Visible)
  12804. {
  12805. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12806. maidArray[0].transform.position.y,
  12807. maidArray[0].transform.position.z));
  12808. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12809. }
  12810. if (maidArray[2] && maidArray[2].Visible)
  12811. {
  12812. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12813. maidArray[0].transform.position.y,
  12814. maidArray[0].transform.position.z));
  12815. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12816. }
  12817. if (maidArray[4] && maidArray[4].Visible)
  12818. {
  12819. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12820. maidArray[3].transform.position.y,
  12821. maidArray[3].transform.position.z));
  12822. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12823. }
  12824. if (maidArray[5] && maidArray[5].Visible)
  12825. {
  12826. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12827. maidArray[3].transform.position.y,
  12828. maidArray[3].transform.position.z));
  12829. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12830. }
  12831. if (maidArray[7] && maidArray[7].Visible)
  12832. {
  12833. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12834. maidArray[6].transform.position.y,
  12835. maidArray[6].transform.position.z));
  12836. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12837. }
  12838. if (maidArray[8] && maidArray[8].Visible)
  12839. {
  12840. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12841. maidArray[6].transform.position.y,
  12842. maidArray[6].transform.position.z));
  12843. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12844. }
  12845. if (maidArray[10] && maidArray[10].Visible)
  12846. {
  12847. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12848. maidArray[9].transform.position.y,
  12849. maidArray[9].transform.position.z));
  12850. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12851. }
  12852. if (maidArray[11] && maidArray[11].Visible)
  12853. {
  12854. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12855. maidArray[9].transform.position.y,
  12856. maidArray[9].transform.position.z));
  12857. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12858. }
  12859. if (maidArray[13] && maidArray[13].Visible)
  12860. {
  12861. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12862. maidArray[12].transform.position.y,
  12863. maidArray[12].transform.position.z));
  12864. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12865. }
  12866. isSS = false;
  12867. isDance = true;
  12868. isDanceStart11 = true;
  12869. }
  12870. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12871. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12872. {
  12873. GameMain.Instance.SoundMgr.StopBGM(0f);
  12874. isSS1 = true;
  12875. isSS2 = false;
  12876. isSS3 = false;
  12877. isSS4 = false;
  12878. isSS5 = false;
  12879. isSS6 = false;
  12880. isSS = true;
  12881. }
  12882. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12883. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12884. {
  12885. GameMain.Instance.SoundMgr.StopBGM(0f);
  12886. isSS1 = false;
  12887. isSS2 = true;
  12888. isSS3 = false;
  12889. isSS4 = false;
  12890. isSS5 = false;
  12891. isSS6 = false;
  12892. isSS = true;
  12893. }
  12894. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12895. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12896. {
  12897. GameMain.Instance.SoundMgr.StopBGM(0f);
  12898. isSS1 = false;
  12899. isSS2 = false;
  12900. isSS3 = true;
  12901. isSS4 = false;
  12902. isSS5 = false;
  12903. isSS6 = false;
  12904. isSS = true;
  12905. }
  12906. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12907. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12908. {
  12909. GameMain.Instance.SoundMgr.StopBGM(0f);
  12910. isSS1 = false;
  12911. isSS2 = false;
  12912. isSS3 = false;
  12913. isSS4 = true;
  12914. isSS5 = false;
  12915. isSS6 = false;
  12916. isSS = true;
  12917. }
  12918. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12919. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12920. {
  12921. GameMain.Instance.SoundMgr.StopBGM(0f);
  12922. isSS1 = false;
  12923. isSS2 = false;
  12924. isSS3 = false;
  12925. isSS4 = false;
  12926. isSS5 = true;
  12927. isSS6 = false;
  12928. isSS = true;
  12929. }
  12930. if (isKHG1 || isKHG2)
  12931. {
  12932. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12933. string text4 = textAsset.text;
  12934. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12935. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12936. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12937. for (int j = 0; j < maidCnt; j++)
  12938. {
  12939. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12940. {
  12941. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12942. GameUty.FileSystem,
  12943. "dance_cm3d2_005_khg_f.anm",
  12944. false,
  12945. false);
  12946. }
  12947. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12948. }
  12949. if (isKHG1)
  12950. {
  12951. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12952. }
  12953. if (isKHG2)
  12954. {
  12955. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12956. }
  12957. for (int j = 0; j < maidCnt; j++)
  12958. {
  12959. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12960. isStop[j] = false;
  12961. isLock[j] = false;
  12962. pHandL[j] = 0;
  12963. pHandR[j] = 0;
  12964. muneIKL[j] = false;
  12965. muneIKR[j] = false;
  12966. if (!isVR)
  12967. {
  12968. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12969. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12970. }
  12971. }
  12972. ikBui = 5;
  12973. isDanceStart1F = false;
  12974. isDanceStart2F = false;
  12975. isDanceStart3F = false;
  12976. isDanceStart4F = false;
  12977. isDanceStart5F = false;
  12978. isDanceStart6F = false;
  12979. isDanceStart7F = false;
  12980. isDanceStart8F = false;
  12981. isDanceStart9F = false;
  12982. isDanceStart10F = false;
  12983. isDanceStart11F = false;
  12984. isDanceStart12F = false;
  12985. isDanceStart13F = false;
  12986. isDanceStart14F = false;
  12987. isDanceStart15F = false;
  12988. for (int j = 0; j < maidCnt; j++)
  12989. {
  12990. danceFace[j] = 0f;
  12991. }
  12992. if (isDanceStart7V)
  12993. {
  12994. for (int j = 0; j < maidCnt; j++)
  12995. {
  12996. if (maidArray[j] && maidArray[j].Visible)
  12997. {
  12998. if (isDanceStart7V)
  12999. {
  13000. maidArray[j].SetPos(dancePos[j]);
  13001. maidArray[j].body0.transform.localRotation = danceRot[j];
  13002. }
  13003. }
  13004. }
  13005. isDanceStart7V = false;
  13006. }
  13007. if (isDanceStart8V)
  13008. {
  13009. for (int j = 0; j < maidCnt; j++)
  13010. {
  13011. if (maidArray[j] && maidArray[j].Visible)
  13012. {
  13013. if (isDanceStart8V)
  13014. {
  13015. maidArray[j].SetPos(dancePos[j]);
  13016. maidArray[j].body0.transform.localRotation = danceRot[j];
  13017. }
  13018. }
  13019. }
  13020. isDanceStart8V = false;
  13021. isDanceStart8P = false;
  13022. }
  13023. if (isDanceStart11V)
  13024. {
  13025. for (int j = 0; j < maidCnt; j++)
  13026. {
  13027. if (maidArray[j] && maidArray[j].Visible)
  13028. {
  13029. if (isDanceStart11V)
  13030. {
  13031. maidArray[j].SetPos(dancePos[j]);
  13032. maidArray[j].body0.transform.localRotation = danceRot[j];
  13033. }
  13034. }
  13035. }
  13036. isDanceStart11V = false;
  13037. }
  13038. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13039. || isDanceStart13K)
  13040. {
  13041. for (int j = 0; j < maidCnt; j++)
  13042. {
  13043. if (maidArray[j] && maidArray[j].Visible)
  13044. {
  13045. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13046. || isDanceStart13K)
  13047. {
  13048. maidArray[j].SetPos(dancePos[j]);
  13049. maidArray[j].body0.transform.localRotation = danceRot[j];
  13050. int i = j;
  13051. if (!isVR)
  13052. {
  13053. delCount[i] = 20;
  13054. if (goSlot[(int)selectList[i]] != null)
  13055. {
  13056. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13057. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13058. {
  13059. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13060. }
  13061. }
  13062. }
  13063. Maid maid = maidArray[j];
  13064. maid.DelProp(MPN.handitem, true);
  13065. maid.DelProp(MPN.accvag, true);
  13066. maid.DelProp(MPN.accanl, true);
  13067. maid.DelProp(MPN.kousoku_upper, true);
  13068. maid.DelProp(MPN.kousoku_lower, true);
  13069. maid.AllProcPropSeqStart();
  13070. }
  13071. }
  13072. }
  13073. isDanceStart1K = false;
  13074. isDanceStart3K = false;
  13075. isDanceStart4K = false;
  13076. isDanceStart5K = false;
  13077. isDanceStart6K = false;
  13078. isDanceStart9K = false;
  13079. isDanceStart13K = false;
  13080. }
  13081. if (isDanceStart14V)
  13082. {
  13083. for (int j = 0; j < maidCnt; j++)
  13084. {
  13085. if (maidArray[j] && maidArray[j].Visible)
  13086. {
  13087. if (isDanceStart14V)
  13088. {
  13089. maidArray[j].SetPos(dancePos[j]);
  13090. maidArray[j].body0.transform.localRotation = danceRot[j];
  13091. }
  13092. }
  13093. }
  13094. isDanceStart14V = false;
  13095. }
  13096. if (isDanceStart15V)
  13097. {
  13098. for (int j = 0; j < maidCnt; j++)
  13099. {
  13100. if (maidArray[j] && maidArray[j].Visible)
  13101. {
  13102. if (isDanceStart15V)
  13103. {
  13104. maidArray[j].SetPos(dancePos[j]);
  13105. maidArray[j].body0.transform.localRotation = danceRot[j];
  13106. }
  13107. }
  13108. }
  13109. isDanceStart15V = false;
  13110. }
  13111. if (maidArray[1] && maidArray[1].Visible)
  13112. {
  13113. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13114. {
  13115. Vector3 vector = Vector3.zero;
  13116. vector.x = 0.6f;
  13117. maidArray[1].SetPos(vector);
  13118. if (maidArray[2] && maidArray[2].Visible)
  13119. {
  13120. vector.x = -0.6f;
  13121. maidArray[2].SetPos(vector);
  13122. }
  13123. if (maidArray[3] && maidArray[3].Visible)
  13124. {
  13125. vector.x = 1.2f;
  13126. maidArray[3].SetPos(vector);
  13127. }
  13128. if (maidArray[4] && maidArray[4].Visible)
  13129. {
  13130. vector.x = -1.2f;
  13131. maidArray[4].SetPos(vector);
  13132. }
  13133. if (maidArray[5] && maidArray[5].Visible)
  13134. {
  13135. vector.x = 1.8f;
  13136. maidArray[5].SetPos(vector);
  13137. }
  13138. if (maidArray[6] && maidArray[6].Visible)
  13139. {
  13140. vector.x = -1.8f;
  13141. maidArray[6].SetPos(vector);
  13142. }
  13143. if (maidArray[7] && maidArray[7].Visible)
  13144. {
  13145. vector.x = 2.4f;
  13146. maidArray[7].SetPos(vector);
  13147. }
  13148. if (maidArray[8] && maidArray[8].Visible)
  13149. {
  13150. vector.x = -2.4f;
  13151. maidArray[8].SetPos(vector);
  13152. }
  13153. if (maidArray[9] && maidArray[9].Visible)
  13154. {
  13155. vector.x = 3f;
  13156. maidArray[9].SetPos(vector);
  13157. }
  13158. if (maidArray[10] && maidArray[10].Visible)
  13159. {
  13160. vector.x = -3f;
  13161. maidArray[10].SetPos(vector);
  13162. }
  13163. if (maidArray[11] && maidArray[11].Visible)
  13164. {
  13165. vector.x = 3.6f;
  13166. maidArray[11].SetPos(vector);
  13167. }
  13168. if (maidArray[12] && maidArray[12].Visible)
  13169. {
  13170. vector.x = -3.6f;
  13171. maidArray[12].SetPos(vector);
  13172. }
  13173. if (maidArray[13] && maidArray[13].Visible)
  13174. {
  13175. vector.x = 4.2f;
  13176. maidArray[13].SetPos(vector);
  13177. }
  13178. }
  13179. }
  13180. isDance = true;
  13181. isDanceStart12 = true;
  13182. isKHG1 = false;
  13183. isKHG2 = false;
  13184. }
  13185. if (isDanceStart13Count > 0)
  13186. {
  13187. isDanceStart13Count++;
  13188. }
  13189. if (isDanceStart13Count == 1)
  13190. {
  13191. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13192. isDanceStart13Count = 0;
  13193. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13194. string text4 = textAsset.text;
  13195. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13196. for (int j = 0; j < maidCnt; j++)
  13197. {
  13198. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13199. }
  13200. }
  13201. if ((isSN1 || isSN2 || isSN3) && isShift)
  13202. {
  13203. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13204. string text4 = textAsset.text;
  13205. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13206. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13207. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13208. for (int j = 0; j < maidCnt; j++)
  13209. {
  13210. if (!isShift)
  13211. {
  13212. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13213. {
  13214. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13215. GameUty.FileSystem,
  13216. "dance_cm3d2_006_ssn_f1.anm",
  13217. false,
  13218. false);
  13219. }
  13220. }
  13221. else
  13222. {
  13223. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13224. {
  13225. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13226. GameUty.FileSystem,
  13227. "dance_cm3d21_kara_001_nmf_f1.anm",
  13228. false,
  13229. false);
  13230. }
  13231. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13232. string text5 = nameA + danceNo1 + ".anm";
  13233. switch (j)
  13234. {
  13235. case 1:
  13236. case 4:
  13237. case 7:
  13238. case 10:
  13239. case 13:
  13240. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13241. break;
  13242. case 2:
  13243. case 5:
  13244. case 8:
  13245. case 11:
  13246. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13247. break;
  13248. }
  13249. text4 = textAsset.text;
  13250. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13251. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13252. && !isDanceStart9K && !isDanceStart13K)
  13253. {
  13254. dancePos[j] = maidArray[j].transform.position;
  13255. danceRot[j] = maidArray[j].transform.localRotation;
  13256. }
  13257. }
  13258. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13259. }
  13260. if (!isShift)
  13261. {
  13262. if (isSN1)
  13263. {
  13264. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13265. }
  13266. if (isSN2)
  13267. {
  13268. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13269. }
  13270. if (isSN3)
  13271. {
  13272. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13273. }
  13274. }
  13275. else
  13276. {
  13277. danceWait = 400;
  13278. isDanceStart13Count++;
  13279. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13280. }
  13281. for (int j = 0; j < maidCnt; j++)
  13282. {
  13283. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13284. isStop[j] = false;
  13285. isLock[j] = false;
  13286. pHandL[j] = 0;
  13287. pHandR[j] = 0;
  13288. muneIKL[j] = false;
  13289. muneIKR[j] = false;
  13290. if (!isVR)
  13291. {
  13292. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13293. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13294. }
  13295. }
  13296. ikBui = 5;
  13297. isDanceStart1F = false;
  13298. isDanceStart2F = false;
  13299. isDanceStart3F = false;
  13300. isDanceStart4F = false;
  13301. isDanceStart5F = false;
  13302. isDanceStart6F = false;
  13303. isDanceStart7F = false;
  13304. isDanceStart8F = false;
  13305. isDanceStart9F = false;
  13306. isDanceStart10F = false;
  13307. isDanceStart11F = false;
  13308. isDanceStart12F = false;
  13309. isDanceStart13F = false;
  13310. isDanceStart14F = false;
  13311. isDanceStart15F = false;
  13312. for (int j = 0; j < maidCnt; j++)
  13313. {
  13314. danceFace[j] = 0f;
  13315. }
  13316. if (isDanceStart7V)
  13317. {
  13318. for (int j = 0; j < maidCnt; j++)
  13319. {
  13320. if (maidArray[j] && maidArray[j].Visible)
  13321. {
  13322. if (isDanceStart7V)
  13323. {
  13324. maidArray[j].SetPos(dancePos[j]);
  13325. maidArray[j].body0.transform.localRotation = danceRot[j];
  13326. }
  13327. }
  13328. }
  13329. isDanceStart7V = false;
  13330. }
  13331. if (isDanceStart8V)
  13332. {
  13333. for (int j = 0; j < maidCnt; j++)
  13334. {
  13335. if (maidArray[j] && maidArray[j].Visible)
  13336. {
  13337. if (isDanceStart8V)
  13338. {
  13339. maidArray[j].SetPos(dancePos[j]);
  13340. maidArray[j].body0.transform.localRotation = danceRot[j];
  13341. }
  13342. }
  13343. }
  13344. isDanceStart8V = false;
  13345. isDanceStart8P = false;
  13346. }
  13347. if (isDanceStart11V)
  13348. {
  13349. for (int j = 0; j < maidCnt; j++)
  13350. {
  13351. if (maidArray[j] && maidArray[j].Visible)
  13352. {
  13353. if (isDanceStart11V)
  13354. {
  13355. maidArray[j].SetPos(dancePos[j]);
  13356. maidArray[j].body0.transform.localRotation = danceRot[j];
  13357. }
  13358. }
  13359. }
  13360. isDanceStart11V = false;
  13361. }
  13362. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13363. || isDanceStart13K)
  13364. {
  13365. for (int j = 0; j < maidCnt; j++)
  13366. {
  13367. if (maidArray[j] && maidArray[j].Visible)
  13368. {
  13369. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13370. || isDanceStart13K)
  13371. {
  13372. maidArray[j].SetPos(dancePos[j]);
  13373. maidArray[j].body0.transform.localRotation = danceRot[j];
  13374. int i = j;
  13375. if (!isVR)
  13376. {
  13377. delCount[i] = 20;
  13378. if (goSlot[(int)selectList[i]] != null)
  13379. {
  13380. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13381. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13382. {
  13383. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13384. }
  13385. }
  13386. }
  13387. Maid maid = maidArray[j];
  13388. maid.DelProp(MPN.handitem, true);
  13389. maid.DelProp(MPN.accvag, true);
  13390. maid.DelProp(MPN.accanl, true);
  13391. maid.DelProp(MPN.kousoku_upper, true);
  13392. maid.DelProp(MPN.kousoku_lower, true);
  13393. maid.AllProcPropSeqStart();
  13394. }
  13395. }
  13396. }
  13397. isDanceStart1K = false;
  13398. isDanceStart3K = false;
  13399. isDanceStart4K = false;
  13400. isDanceStart5K = false;
  13401. isDanceStart6K = false;
  13402. isDanceStart9K = false;
  13403. isDanceStart13K = false;
  13404. }
  13405. if (isDanceStart14V)
  13406. {
  13407. for (int j = 0; j < maidCnt; j++)
  13408. {
  13409. if (maidArray[j] && maidArray[j].Visible)
  13410. {
  13411. if (isDanceStart14V)
  13412. {
  13413. maidArray[j].SetPos(dancePos[j]);
  13414. maidArray[j].body0.transform.localRotation = danceRot[j];
  13415. }
  13416. }
  13417. }
  13418. isDanceStart14V = false;
  13419. }
  13420. if (isDanceStart15V)
  13421. {
  13422. for (int j = 0; j < maidCnt; j++)
  13423. {
  13424. if (maidArray[j] && maidArray[j].Visible)
  13425. {
  13426. if (isDanceStart15V)
  13427. {
  13428. maidArray[j].SetPos(dancePos[j]);
  13429. maidArray[j].body0.transform.localRotation = danceRot[j];
  13430. }
  13431. }
  13432. }
  13433. isDanceStart15V = false;
  13434. }
  13435. if (maidArray[1] && maidArray[1].Visible)
  13436. {
  13437. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13438. {
  13439. Vector3 vector = Vector3.zero;
  13440. vector.x = 0.6f;
  13441. maidArray[1].SetPos(vector);
  13442. if (maidArray[2] && maidArray[2].Visible)
  13443. {
  13444. vector.x = -0.6f;
  13445. maidArray[2].SetPos(vector);
  13446. }
  13447. if (maidArray[3] && maidArray[3].Visible)
  13448. {
  13449. vector.x = 1.2f;
  13450. maidArray[3].SetPos(vector);
  13451. }
  13452. if (maidArray[4] && maidArray[4].Visible)
  13453. {
  13454. vector.x = -1.2f;
  13455. maidArray[4].SetPos(vector);
  13456. }
  13457. if (maidArray[5] && maidArray[5].Visible)
  13458. {
  13459. vector.x = 1.8f;
  13460. maidArray[5].SetPos(vector);
  13461. }
  13462. if (maidArray[6] && maidArray[6].Visible)
  13463. {
  13464. vector.x = -1.8f;
  13465. maidArray[6].SetPos(vector);
  13466. }
  13467. if (maidArray[7] && maidArray[7].Visible)
  13468. {
  13469. vector.x = 2.4f;
  13470. maidArray[7].SetPos(vector);
  13471. }
  13472. if (maidArray[8] && maidArray[8].Visible)
  13473. {
  13474. vector.x = -2.4f;
  13475. maidArray[8].SetPos(vector);
  13476. }
  13477. if (maidArray[9] && maidArray[9].Visible)
  13478. {
  13479. vector.x = 3f;
  13480. maidArray[9].SetPos(vector);
  13481. }
  13482. if (maidArray[10] && maidArray[10].Visible)
  13483. {
  13484. vector.x = -3f;
  13485. maidArray[10].SetPos(vector);
  13486. }
  13487. if (maidArray[11] && maidArray[11].Visible)
  13488. {
  13489. vector.x = 3.6f;
  13490. maidArray[11].SetPos(vector);
  13491. }
  13492. if (maidArray[12] && maidArray[12].Visible)
  13493. {
  13494. vector.x = -3.6f;
  13495. maidArray[12].SetPos(vector);
  13496. }
  13497. if (maidArray[13] && maidArray[13].Visible)
  13498. {
  13499. vector.x = 4.2f;
  13500. maidArray[13].SetPos(vector);
  13501. }
  13502. }
  13503. }
  13504. if (isShift)
  13505. {
  13506. isDanceStart13K = true;
  13507. for (int j = 0; j < maidCnt; j++)
  13508. {
  13509. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13510. maidArray[j].body0.transform.localRotation.y + 90f,
  13511. maidArray[j].body0.transform.localRotation.z));
  13512. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13513. maidArray[j].body0.transform.position.y,
  13514. maidArray[j].body0.transform.position.z + 4f));
  13515. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13516. int i = j;
  13517. Maid maid = maidArray[j];
  13518. if (!isVR)
  13519. {
  13520. delCount[i] = 20;
  13521. if (goSlot[(int)selectList[i]] != null)
  13522. {
  13523. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13524. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13525. {
  13526. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13527. }
  13528. }
  13529. }
  13530. string[] array = new string[2];
  13531. array = text2.Split(new char[] { ',' });
  13532. maid.DelProp(MPN.handitem, true);
  13533. maid.DelProp(MPN.accvag, true);
  13534. maid.DelProp(MPN.accanl, true);
  13535. maid.DelProp(MPN.kousoku_upper, true);
  13536. maid.DelProp(MPN.kousoku_lower, true);
  13537. if (array[0] != "")
  13538. {
  13539. maid.SetProp(array[0], array[1], 0, true, false);
  13540. }
  13541. maid.AllProcPropSeqStart();
  13542. }
  13543. }
  13544. isDance = true;
  13545. isDanceStart13 = true;
  13546. isSN1 = false;
  13547. isSN2 = false;
  13548. isSN3 = false;
  13549. }
  13550. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13551. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13552. {
  13553. GameMain.Instance.SoundMgr.StopBGM(0f);
  13554. isSN1 = true;
  13555. hFlg = true;
  13556. if (getModKeyPressing(modKey.Shift))
  13557. {
  13558. isShift = true;
  13559. }
  13560. }
  13561. if (isSN4 || isSN5 || isSN6)
  13562. {
  13563. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13564. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13565. for (int j = 0; j < maidCnt; j++)
  13566. {
  13567. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13568. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13569. switch (j)
  13570. {
  13571. case 1:
  13572. case 4:
  13573. case 7:
  13574. case 10:
  13575. case 13:
  13576. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13577. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13578. break;
  13579. case 2:
  13580. case 5:
  13581. case 8:
  13582. case 11:
  13583. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13584. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13585. break;
  13586. }
  13587. if (maidArray[j] && maidArray[j].Visible)
  13588. {
  13589. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13590. {
  13591. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13592. }
  13593. string text4 = textAsset.text;
  13594. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13595. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13596. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13597. }
  13598. }
  13599. if (isSN4)
  13600. {
  13601. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13602. }
  13603. if (isSN5)
  13604. {
  13605. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13606. }
  13607. if (isSN6)
  13608. {
  13609. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13610. }
  13611. ikBui = 5;
  13612. isDanceStart1F = false;
  13613. isDanceStart2F = false;
  13614. isDanceStart3F = false;
  13615. isDanceStart4F = false;
  13616. isDanceStart5F = false;
  13617. isDanceStart6F = false;
  13618. isDanceStart7F = false;
  13619. isDanceStart8F = false;
  13620. isDanceStart9F = false;
  13621. isDanceStart10F = false;
  13622. isDanceStart11F = false;
  13623. isDanceStart12F = false;
  13624. isDanceStart13F = false;
  13625. isDanceStart14F = false;
  13626. isDanceStart15F = false;
  13627. for (int j = 0; j < maidCnt; j++)
  13628. {
  13629. danceFace[j] = 0f;
  13630. }
  13631. if (isDanceStart7V)
  13632. {
  13633. for (int j = 0; j < maidCnt; j++)
  13634. {
  13635. if (maidArray[j] && maidArray[j].Visible)
  13636. {
  13637. if (isDanceStart7V)
  13638. {
  13639. maidArray[j].SetPos(dancePos[j]);
  13640. maidArray[j].body0.transform.localRotation = danceRot[j];
  13641. }
  13642. }
  13643. }
  13644. isDanceStart7V = false;
  13645. }
  13646. if (isDanceStart8V)
  13647. {
  13648. for (int j = 0; j < maidCnt; j++)
  13649. {
  13650. if (maidArray[j] && maidArray[j].Visible)
  13651. {
  13652. if (isDanceStart8V)
  13653. {
  13654. maidArray[j].SetPos(dancePos[j]);
  13655. maidArray[j].body0.transform.localRotation = danceRot[j];
  13656. }
  13657. }
  13658. }
  13659. isDanceStart8V = false;
  13660. isDanceStart8P = false;
  13661. }
  13662. if (isDanceStart11V)
  13663. {
  13664. for (int j = 0; j < maidCnt; j++)
  13665. {
  13666. if (maidArray[j] && maidArray[j].Visible)
  13667. {
  13668. if (isDanceStart11V)
  13669. {
  13670. maidArray[j].SetPos(dancePos[j]);
  13671. maidArray[j].body0.transform.localRotation = danceRot[j];
  13672. }
  13673. }
  13674. }
  13675. isDanceStart11V = false;
  13676. }
  13677. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13678. || isDanceStart13K)
  13679. {
  13680. for (int j = 0; j < maidCnt; j++)
  13681. {
  13682. if (maidArray[j] && maidArray[j].Visible)
  13683. {
  13684. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13685. || isDanceStart13K)
  13686. {
  13687. maidArray[j].SetPos(dancePos[j]);
  13688. maidArray[j].body0.transform.localRotation = danceRot[j];
  13689. int i = j;
  13690. if (!isVR)
  13691. {
  13692. delCount[i] = 20;
  13693. if (goSlot[(int)selectList[i]] != null)
  13694. {
  13695. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13696. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13697. {
  13698. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13699. }
  13700. }
  13701. }
  13702. Maid maid = maidArray[j];
  13703. maid.DelProp(MPN.handitem, true);
  13704. maid.DelProp(MPN.accvag, true);
  13705. maid.DelProp(MPN.accanl, true);
  13706. maid.DelProp(MPN.kousoku_upper, true);
  13707. maid.DelProp(MPN.kousoku_lower, true);
  13708. maid.AllProcPropSeqStart();
  13709. }
  13710. }
  13711. }
  13712. isDanceStart1K = false;
  13713. isDanceStart3K = false;
  13714. isDanceStart4K = false;
  13715. isDanceStart5K = false;
  13716. isDanceStart6K = false;
  13717. isDanceStart9K = false;
  13718. isDanceStart13K = false;
  13719. }
  13720. if (isDanceStart14V)
  13721. {
  13722. for (int j = 0; j < maidCnt; j++)
  13723. {
  13724. if (maidArray[j] && maidArray[j].Visible)
  13725. {
  13726. if (isDanceStart14V)
  13727. {
  13728. maidArray[j].SetPos(dancePos[j]);
  13729. maidArray[j].body0.transform.localRotation = danceRot[j];
  13730. }
  13731. }
  13732. }
  13733. isDanceStart14V = false;
  13734. }
  13735. if (isDanceStart15V)
  13736. {
  13737. for (int j = 0; j < maidCnt; j++)
  13738. {
  13739. if (maidArray[j] && maidArray[j].Visible)
  13740. {
  13741. if (isDanceStart15V)
  13742. {
  13743. maidArray[j].SetPos(dancePos[j]);
  13744. maidArray[j].body0.transform.localRotation = danceRot[j];
  13745. }
  13746. }
  13747. }
  13748. isDanceStart15V = false;
  13749. }
  13750. for (int j = 0; j < maidCnt; j++)
  13751. {
  13752. isStop[j] = false;
  13753. isLock[j] = false;
  13754. pHandL[j] = 0;
  13755. pHandR[j] = 0;
  13756. muneIKL[j] = false;
  13757. muneIKR[j] = false;
  13758. if (!isVR)
  13759. {
  13760. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13761. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13762. }
  13763. if (maidArray[j].transform.position.y != 100f)
  13764. {
  13765. dancePos[j] = maidArray[j].transform.position;
  13766. }
  13767. else
  13768. {
  13769. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13770. }
  13771. danceRot[j] = maidArray[j].transform.localRotation;
  13772. }
  13773. if (maidArray[1] && maidArray[1].Visible)
  13774. {
  13775. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13776. maidArray[0].transform.position.y,
  13777. maidArray[0].transform.position.z));
  13778. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13779. }
  13780. if (maidArray[2] && maidArray[2].Visible)
  13781. {
  13782. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13783. maidArray[0].transform.position.y,
  13784. maidArray[0].transform.position.z));
  13785. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13786. }
  13787. if (maidArray[4] && maidArray[4].Visible)
  13788. {
  13789. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13790. maidArray[3].transform.position.y,
  13791. maidArray[3].transform.position.z));
  13792. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13793. }
  13794. if (maidArray[5] && maidArray[5].Visible)
  13795. {
  13796. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13797. maidArray[3].transform.position.y,
  13798. maidArray[3].transform.position.z));
  13799. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13800. }
  13801. if (maidArray[7] && maidArray[7].Visible)
  13802. {
  13803. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13804. maidArray[6].transform.position.y,
  13805. maidArray[6].transform.position.z));
  13806. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13807. }
  13808. if (maidArray[8] && maidArray[8].Visible)
  13809. {
  13810. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13811. maidArray[6].transform.position.y,
  13812. maidArray[6].transform.position.z));
  13813. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13814. }
  13815. if (maidArray[10] && maidArray[10].Visible)
  13816. {
  13817. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13818. maidArray[9].transform.position.y,
  13819. maidArray[9].transform.position.z));
  13820. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13821. }
  13822. if (maidArray[11] && maidArray[11].Visible)
  13823. {
  13824. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13825. maidArray[9].transform.position.y,
  13826. maidArray[9].transform.position.z));
  13827. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13828. }
  13829. if (maidArray[13] && maidArray[13].Visible)
  13830. {
  13831. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13832. maidArray[12].transform.position.y,
  13833. maidArray[12].transform.position.z));
  13834. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13835. }
  13836. isDance = true;
  13837. isDanceStart14 = true;
  13838. isSN4 = false;
  13839. isSN5 = false;
  13840. isSN6 = false;
  13841. }
  13842. if (isSD1)
  13843. {
  13844. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13845. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13846. for (int j = 0; j < maidCnt; j++)
  13847. {
  13848. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13849. string text5 = "dance_cmo_002_sd_f1.anm";
  13850. switch (j)
  13851. {
  13852. case 1:
  13853. case 3:
  13854. case 5:
  13855. case 7:
  13856. case 9:
  13857. case 11:
  13858. case 13:
  13859. text5 = "dance_cmo_002_sd_f2.anm";
  13860. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13861. break;
  13862. }
  13863. danceName[j] = text5;
  13864. if (maidArray[j] && maidArray[j].Visible)
  13865. {
  13866. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13867. {
  13868. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13869. }
  13870. string text4 = textAsset.text;
  13871. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13872. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13873. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13874. }
  13875. }
  13876. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13877. ikBui = 5;
  13878. isDanceStart1F = false;
  13879. isDanceStart2F = false;
  13880. isDanceStart3F = false;
  13881. isDanceStart4F = false;
  13882. isDanceStart5F = false;
  13883. isDanceStart6F = false;
  13884. isDanceStart7F = false;
  13885. isDanceStart8F = false;
  13886. isDanceStart9F = false;
  13887. isDanceStart10F = false;
  13888. isDanceStart11F = false;
  13889. isDanceStart12F = false;
  13890. isDanceStart13F = false;
  13891. isDanceStart14F = false;
  13892. isDanceStart15F = false;
  13893. for (int j = 0; j < maidCnt; j++)
  13894. {
  13895. danceFace[j] = 0f;
  13896. }
  13897. if (isDanceStart7V)
  13898. {
  13899. for (int j = 0; j < maidCnt; j++)
  13900. {
  13901. if (maidArray[j] && maidArray[j].Visible)
  13902. {
  13903. if (isDanceStart7V)
  13904. {
  13905. maidArray[j].SetPos(dancePos[j]);
  13906. maidArray[j].body0.transform.localRotation = danceRot[j];
  13907. }
  13908. }
  13909. }
  13910. isDanceStart7V = false;
  13911. }
  13912. if (isDanceStart8V)
  13913. {
  13914. for (int j = 0; j < maidCnt; j++)
  13915. {
  13916. if (maidArray[j] && maidArray[j].Visible)
  13917. {
  13918. if (isDanceStart8V)
  13919. {
  13920. maidArray[j].SetPos(dancePos[j]);
  13921. maidArray[j].body0.transform.localRotation = danceRot[j];
  13922. }
  13923. }
  13924. }
  13925. isDanceStart8V = false;
  13926. isDanceStart8P = false;
  13927. }
  13928. if (isDanceStart11V)
  13929. {
  13930. for (int j = 0; j < maidCnt; j++)
  13931. {
  13932. if (maidArray[j] && maidArray[j].Visible)
  13933. {
  13934. if (isDanceStart11V)
  13935. {
  13936. maidArray[j].SetPos(dancePos[j]);
  13937. maidArray[j].body0.transform.localRotation = danceRot[j];
  13938. }
  13939. }
  13940. }
  13941. isDanceStart11V = false;
  13942. }
  13943. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13944. || isDanceStart13K)
  13945. {
  13946. for (int j = 0; j < maidCnt; j++)
  13947. {
  13948. if (maidArray[j] && maidArray[j].Visible)
  13949. {
  13950. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13951. || isDanceStart13K)
  13952. {
  13953. maidArray[j].SetPos(dancePos[j]);
  13954. maidArray[j].body0.transform.localRotation = danceRot[j];
  13955. int i = j;
  13956. if (!isVR)
  13957. {
  13958. delCount[i] = 20;
  13959. if (goSlot[(int)selectList[i]] != null)
  13960. {
  13961. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13962. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13963. {
  13964. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13965. }
  13966. }
  13967. }
  13968. Maid maid = maidArray[j];
  13969. maid.DelProp(MPN.handitem, true);
  13970. maid.DelProp(MPN.accvag, true);
  13971. maid.DelProp(MPN.accanl, true);
  13972. maid.DelProp(MPN.kousoku_upper, true);
  13973. maid.DelProp(MPN.kousoku_lower, true);
  13974. maid.AllProcPropSeqStart();
  13975. }
  13976. }
  13977. }
  13978. isDanceStart1K = false;
  13979. isDanceStart3K = false;
  13980. isDanceStart4K = false;
  13981. isDanceStart5K = false;
  13982. isDanceStart6K = false;
  13983. isDanceStart9K = false;
  13984. isDanceStart13K = false;
  13985. }
  13986. if (isDanceStart14V)
  13987. {
  13988. for (int j = 0; j < maidCnt; j++)
  13989. {
  13990. if (maidArray[j] && maidArray[j].Visible)
  13991. {
  13992. if (isDanceStart14V)
  13993. {
  13994. maidArray[j].SetPos(dancePos[j]);
  13995. maidArray[j].body0.transform.localRotation = danceRot[j];
  13996. }
  13997. }
  13998. }
  13999. isDanceStart14V = false;
  14000. }
  14001. if (isDanceStart15V)
  14002. {
  14003. for (int j = 0; j < maidCnt; j++)
  14004. {
  14005. if (maidArray[j] && maidArray[j].Visible)
  14006. {
  14007. if (isDanceStart15V)
  14008. {
  14009. maidArray[j].SetPos(dancePos[j]);
  14010. maidArray[j].body0.transform.localRotation = danceRot[j];
  14011. }
  14012. }
  14013. }
  14014. isDanceStart15V = false;
  14015. }
  14016. for (int j = 0; j < maidCnt; j++)
  14017. {
  14018. isStop[j] = false;
  14019. isLock[j] = false;
  14020. pHandL[j] = 0;
  14021. pHandR[j] = 0;
  14022. muneIKL[j] = false;
  14023. muneIKR[j] = false;
  14024. if (!isVR)
  14025. {
  14026. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14027. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14028. }
  14029. if (maidArray[j].transform.position.y != 100f)
  14030. {
  14031. dancePos[j] = maidArray[j].transform.position;
  14032. }
  14033. else
  14034. {
  14035. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14036. }
  14037. danceRot[j] = maidArray[j].transform.localRotation;
  14038. }
  14039. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14040. {
  14041. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14042. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14043. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14044. maidArray[0].body0.transform.localRotation =
  14045. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14046. }
  14047. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14048. {
  14049. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14050. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14051. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14052. maidArray[2].body0.transform.localRotation =
  14053. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14054. }
  14055. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14056. {
  14057. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14058. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14059. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14060. maidArray[4].body0.transform.localRotation =
  14061. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14062. }
  14063. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14064. {
  14065. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14066. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14067. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14068. maidArray[6].body0.transform.localRotation =
  14069. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14070. }
  14071. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14072. {
  14073. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14074. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14075. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14076. maidArray[8].body0.transform.localRotation =
  14077. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14078. }
  14079. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14080. {
  14081. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14082. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14083. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14084. maidArray[10].body0.transform.localRotation =
  14085. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14086. }
  14087. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14088. {
  14089. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14090. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14091. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14092. maidArray[12].body0.transform.localRotation =
  14093. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14094. }
  14095. if (maidArray[1] && maidArray[1].Visible)
  14096. {
  14097. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14098. maidArray[0].transform.position.y,
  14099. maidArray[0].transform.position.z));
  14100. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14101. }
  14102. if (maidArray[3] && maidArray[3].Visible)
  14103. {
  14104. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14105. maidArray[2].transform.position.y,
  14106. maidArray[2].transform.position.z));
  14107. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14108. }
  14109. if (maidArray[5] && maidArray[5].Visible)
  14110. {
  14111. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14112. maidArray[4].transform.position.y,
  14113. maidArray[4].transform.position.z));
  14114. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14115. }
  14116. if (maidArray[7] && maidArray[7].Visible)
  14117. {
  14118. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14119. maidArray[6].transform.position.y,
  14120. maidArray[6].transform.position.z));
  14121. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14122. }
  14123. if (maidArray[9] && maidArray[9].Visible)
  14124. {
  14125. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14126. maidArray[8].transform.position.y,
  14127. maidArray[8].transform.position.z));
  14128. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14129. }
  14130. if (maidArray[11] && maidArray[11].Visible)
  14131. {
  14132. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14133. maidArray[10].transform.position.y,
  14134. maidArray[10].transform.position.z));
  14135. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14136. }
  14137. if (maidArray[13] && maidArray[13].Visible)
  14138. {
  14139. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14140. maidArray[12].transform.position.y,
  14141. maidArray[12].transform.position.z));
  14142. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14143. }
  14144. if (maidArray[2] && maidArray[2].Visible)
  14145. {
  14146. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14147. {
  14148. Vector3 vector = Vector3.zero;
  14149. vector.x = 0.6f;
  14150. maidArray[1].SetPos(vector);
  14151. if (maidArray[2] && maidArray[2].Visible)
  14152. {
  14153. vector.x = -0.6f;
  14154. maidArray[2].SetPos(vector);
  14155. }
  14156. if (maidArray[3] && maidArray[3].Visible)
  14157. {
  14158. vector.x = 1.2f;
  14159. maidArray[3].SetPos(vector);
  14160. }
  14161. if (maidArray[4] && maidArray[4].Visible)
  14162. {
  14163. vector.x = -1.2f;
  14164. maidArray[4].SetPos(vector);
  14165. }
  14166. if (maidArray[5] && maidArray[5].Visible)
  14167. {
  14168. vector.x = 1.8f;
  14169. maidArray[5].SetPos(vector);
  14170. }
  14171. if (maidArray[6] && maidArray[6].Visible)
  14172. {
  14173. vector.x = -1.8f;
  14174. maidArray[6].SetPos(vector);
  14175. }
  14176. if (maidArray[7] && maidArray[7].Visible)
  14177. {
  14178. vector.x = 2.4f;
  14179. maidArray[7].SetPos(vector);
  14180. }
  14181. if (maidArray[8] && maidArray[8].Visible)
  14182. {
  14183. vector.x = -2.4f;
  14184. maidArray[8].SetPos(vector);
  14185. }
  14186. if (maidArray[9] && maidArray[9].Visible)
  14187. {
  14188. vector.x = 3f;
  14189. maidArray[9].SetPos(vector);
  14190. }
  14191. if (maidArray[10] && maidArray[10].Visible)
  14192. {
  14193. vector.x = -3f;
  14194. maidArray[10].SetPos(vector);
  14195. }
  14196. if (maidArray[11] && maidArray[11].Visible)
  14197. {
  14198. vector.x = 3.6f;
  14199. maidArray[11].SetPos(vector);
  14200. }
  14201. if (maidArray[12] && maidArray[12].Visible)
  14202. {
  14203. vector.x = -3.6f;
  14204. maidArray[12].SetPos(vector);
  14205. }
  14206. if (maidArray[13] && maidArray[13].Visible)
  14207. {
  14208. vector.x = 4.2f;
  14209. maidArray[13].SetPos(vector);
  14210. }
  14211. }
  14212. }
  14213. isDance = true;
  14214. isDanceStart15 = true;
  14215. isSD1 = false;
  14216. }
  14217. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14218. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14219. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14220. || Input.GetKeyDown(KeyCode.Keypad0))
  14221. {
  14222. for (int j = 0; j < maidCnt; j++)
  14223. {
  14224. if (maidArray[j] && maidArray[j].Visible)
  14225. {
  14226. if (!isVR)
  14227. {
  14228. if (goSlot[(int)selectList[j]] != null)
  14229. {
  14230. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14231. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14232. {
  14233. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14234. }
  14235. }
  14236. }
  14237. }
  14238. }
  14239. }
  14240. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14241. {
  14242. if (h2Flg)
  14243. {
  14244. h2Flg = false;
  14245. }
  14246. else
  14247. {
  14248. string text4 = "";
  14249. if (wearIndex == 0)
  14250. {
  14251. text4 = "Underwear";
  14252. wearIndex = 1;
  14253. isWear = false;
  14254. isSkirt = false;
  14255. isBra = true;
  14256. isPanz = true;
  14257. isHeadset = false;
  14258. isGlove = false;
  14259. isStkg = true;
  14260. isShoes = false;
  14261. }
  14262. else if (wearIndex == 1)
  14263. {
  14264. text4 = "Nude";
  14265. wearIndex = 2;
  14266. isWear = false;
  14267. isSkirt = false;
  14268. isBra = false;
  14269. isPanz = false;
  14270. isHeadset = false;
  14271. isGlove = false;
  14272. isStkg = false;
  14273. isShoes = false;
  14274. }
  14275. else if (wearIndex == 2)
  14276. {
  14277. text4 = "None";
  14278. wearIndex = 0;
  14279. isWear = true;
  14280. isSkirt = true;
  14281. isBra = true;
  14282. isPanz = true;
  14283. isHeadset = true;
  14284. isGlove = true;
  14285. isStkg = true;
  14286. isShoes = true;
  14287. }
  14288. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14289. for (int j = 0; j < maidCnt; j++)
  14290. {
  14291. if (maidArray[j] && maidArray[j].Visible)
  14292. {
  14293. if (!isVR)
  14294. {
  14295. if (goSlot[(int)selectList[j]] != null)
  14296. {
  14297. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14298. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14299. {
  14300. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14301. }
  14302. }
  14303. }
  14304. maidArray[j].body0.SetMaskMode(maskMode);
  14305. }
  14306. }
  14307. }
  14308. }
  14309. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14310. {
  14311. quickSaveFlag = true;
  14312. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14313. try
  14314. {
  14315. thum_byte_to_base64_ = string.Empty;
  14316. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14317. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14318. }
  14319. catch { }
  14320. }
  14321. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14322. {
  14323. loadScene = 9999;
  14324. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14325. }
  14326. if (isScreen)
  14327. {
  14328. isScreen = false;
  14329. bGui = isGui;
  14330. isGui = false;
  14331. if (!isMessage)
  14332. {
  14333. foreach (UICamera uicamera in ui_cam_hide_list_)
  14334. {
  14335. uicamera.GetComponent<Camera>().enabled = true;
  14336. }
  14337. ui_cam_hide_list_.Clear();
  14338. }
  14339. else
  14340. {
  14341. if (editUI != null)
  14342. {
  14343. editUI.SetActive(true);
  14344. }
  14345. if (GameMain.Instance.CMSystem.ViewFps)
  14346. {
  14347. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14348. childObject.SetActive(true);
  14349. }
  14350. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14351. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14352. childObject2.SetActive(true);
  14353. childObject3.SetActive(true);
  14354. }
  14355. for (int j = 0; j < maidCnt; j++)
  14356. {
  14357. if (maidArray[j] && maidArray[j].Visible)
  14358. {
  14359. isBone[j] = isBoneN[j];
  14360. if (isBone[j])
  14361. {
  14362. gNeck[j].SetActive(true);
  14363. gSpine[j].SetActive(true);
  14364. gSpine0a[j].SetActive(true);
  14365. gSpine1a[j].SetActive(true);
  14366. gSpine1[j].SetActive(true);
  14367. gPelvis[j].SetActive(true);
  14368. gHandL[j].SetActive(true);
  14369. gArmL[j].SetActive(true);
  14370. gFootL[j].SetActive(true);
  14371. gHizaL[j].SetActive(true);
  14372. gHandR[j].SetActive(true);
  14373. gArmR[j].SetActive(true);
  14374. gFootR[j].SetActive(true);
  14375. gHizaR[j].SetActive(true);
  14376. gClavicleL[j].SetActive(true);
  14377. gClavicleR[j].SetActive(true);
  14378. }
  14379. }
  14380. }
  14381. }
  14382. if (isScreen2)
  14383. {
  14384. isScreen = true;
  14385. isScreen2 = false;
  14386. }
  14387. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14388. && !Input.GetKey(KeyCode.Q))
  14389. {
  14390. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14391. {
  14392. isScreen = true;
  14393. for (int j = 0; j < maidCnt; j++)
  14394. {
  14395. if (maidArray[j] && maidArray[j].Visible)
  14396. {
  14397. if (isBone[j])
  14398. {
  14399. gNeck[j].SetActive(false);
  14400. gSpine[j].SetActive(false);
  14401. gSpine0a[j].SetActive(false);
  14402. gSpine1a[j].SetActive(false);
  14403. gSpine1[j].SetActive(false);
  14404. gPelvis[j].SetActive(false);
  14405. gHandL[j].SetActive(false);
  14406. gArmL[j].SetActive(false);
  14407. gFootL[j].SetActive(false);
  14408. gHizaL[j].SetActive(false);
  14409. gHandR[j].SetActive(false);
  14410. gArmR[j].SetActive(false);
  14411. gFootR[j].SetActive(false);
  14412. gHizaR[j].SetActive(false);
  14413. gClavicleL[j].SetActive(false);
  14414. gClavicleR[j].SetActive(false);
  14415. }
  14416. isBoneN[j] = isBone[j];
  14417. isBone[j] = false;
  14418. }
  14419. }
  14420. if (!isMessage)
  14421. {
  14422. ui_cam_hide_list_.Clear();
  14423. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14424. foreach (UICamera uicamera2 in array16)
  14425. {
  14426. if (uicamera2.GetComponent<Camera>().enabled)
  14427. {
  14428. uicamera2.GetComponent<Camera>().enabled = false;
  14429. ui_cam_hide_list_.Add(uicamera2);
  14430. }
  14431. }
  14432. }
  14433. else
  14434. {
  14435. editUI = GameObject.Find("/UI Root/Camera");
  14436. if (editUI != null)
  14437. {
  14438. editUI.SetActive(false);
  14439. }
  14440. if (GameMain.Instance.CMSystem.ViewFps)
  14441. {
  14442. GameObject childObject =
  14443. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14444. childObject.SetActive(false);
  14445. }
  14446. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14447. GameObject childObject3 =
  14448. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14449. childObject2.SetActive(false);
  14450. childObject3.SetActive(false);
  14451. }
  14452. isGui = bGui;
  14453. bGui = false;
  14454. GameMain.Instance.MainCamera.ScreenShot(false);
  14455. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14456. }
  14457. }
  14458. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14459. {
  14460. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14461. keyFlg2 = true;
  14462. }
  14463. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14464. {
  14465. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14466. keyFlg2 = true;
  14467. }
  14468. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14469. {
  14470. mainCameraTransform.eulerAngles =
  14471. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14472. keyFlg2 = true;
  14473. }
  14474. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14475. {
  14476. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14477. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14478. mainCamera.SetDistance(3f, true);
  14479. keyFlg2 = true;
  14480. }
  14481. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14482. {
  14483. cameraIti = mainCamera.GetTargetPos();
  14484. cameraIti2 = mainCamera.GetPos();
  14485. cameraItiAngle = mainCamera.GetAroundAngle();
  14486. cameraItiDistance = mainCamera.GetDistance();
  14487. keyFlg2 = true;
  14488. }
  14489. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14490. {
  14491. mainCamera.SetTargetPos(cameraIti, true);
  14492. mainCamera.SetPos(cameraIti2);
  14493. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14494. mainCamera.SetDistance(cameraItiDistance, true);
  14495. keyFlg2 = true;
  14496. }
  14497. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14498. {
  14499. if (keyFlg2)
  14500. {
  14501. keyFlg2 = false;
  14502. }
  14503. else
  14504. {
  14505. effectIndex++;
  14506. if (effectIndex == 9)
  14507. {
  14508. kami.SetActive(false);
  14509. effectIndex = 0;
  14510. }
  14511. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14512. if (!isBlur)
  14513. {
  14514. component3.mode = Vignetting.AberrationMode.Simple;
  14515. component3.intensity = -3.98f;
  14516. component3.chromaticAberration = -0.75f;
  14517. component3.axialAberration = 1.18f;
  14518. component3.blurSpread = 4.19f;
  14519. component3.luminanceDependency = 0.494f;
  14520. component3.blurDistance = 1.71f;
  14521. component3.enabled = false;
  14522. }
  14523. if (kami) { }
  14524. if (effectIndex == 0)
  14525. {
  14526. component3.enabled = false;
  14527. }
  14528. if (effectIndex == 1)
  14529. {
  14530. component3.mode = Vignetting.AberrationMode.Simple;
  14531. component3.intensity = -1f;
  14532. component3.chromaticAberration = 0f;
  14533. component3.axialAberration = 0f;
  14534. component3.blurSpread = 5f;
  14535. component3.luminanceDependency = 0f;
  14536. component3.blurDistance = 0f;
  14537. component3.enabled = true;
  14538. }
  14539. if (effectIndex == 2)
  14540. {
  14541. component3.enabled = true;
  14542. }
  14543. if (effectIndex == 3)
  14544. {
  14545. component3.mode = Vignetting.AberrationMode.Simple;
  14546. component3.intensity = 9f;
  14547. component3.chromaticAberration = 0f;
  14548. component3.axialAberration = 0f;
  14549. component3.blurSpread = 5f;
  14550. component3.luminanceDependency = 0f;
  14551. component3.blurDistance = 0f;
  14552. component3.enabled = true;
  14553. }
  14554. if (effectIndex == 4)
  14555. {
  14556. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14557. kami = (GameObject)Instantiate(@object);
  14558. Vector3 localPosition = kami.transform.localPosition;
  14559. localPosition.y = 3.5f;
  14560. kami.transform.localPosition = localPosition;
  14561. }
  14562. if (effectIndex == 5)
  14563. {
  14564. component3.enabled = true;
  14565. component3.mode = Vignetting.AberrationMode.Simple;
  14566. component3.intensity = -2.5f;
  14567. component3.chromaticAberration = -0.3f;
  14568. component3.axialAberration = 0.5f;
  14569. component3.blurSpread = 4.5f;
  14570. component3.luminanceDependency = 0.2f;
  14571. component3.blurDistance = 0.8f;
  14572. component3.enabled = true;
  14573. }
  14574. if (effectIndex == 6)
  14575. {
  14576. kami.SetActive(false);
  14577. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14578. kami = (GameObject)Instantiate(@object);
  14579. Vector3 localPosition = kami.transform.localPosition;
  14580. localPosition.y = 3.5f;
  14581. kami.transform.localPosition = localPosition;
  14582. }
  14583. if (effectIndex == 7)
  14584. {
  14585. component3.enabled = true;
  14586. component3.mode = Vignetting.AberrationMode.Simple;
  14587. component3.intensity = -2.5f;
  14588. component3.chromaticAberration = -0.3f;
  14589. component3.axialAberration = 0.5f;
  14590. component3.blurSpread = 4.5f;
  14591. component3.luminanceDependency = 0.2f;
  14592. component3.blurDistance = 0.8f;
  14593. component3.enabled = true;
  14594. }
  14595. if (effectIndex == 8)
  14596. {
  14597. component3.mode = Vignetting.AberrationMode.Simple;
  14598. component3.intensity = 8f;
  14599. component3.chromaticAberration = 0f;
  14600. component3.axialAberration = 0f;
  14601. component3.blurSpread = 5f;
  14602. component3.luminanceDependency = 0f;
  14603. component3.blurDistance = 0f;
  14604. component3.enabled = true;
  14605. }
  14606. }
  14607. }
  14608. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14609. {
  14610. qFlg = false;
  14611. }
  14612. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14613. {
  14614. bool flag5 = false;
  14615. for (int k = 0; k < keyArray.Length; k++)
  14616. {
  14617. if (Input.GetKey(keyArray[k]))
  14618. {
  14619. flag5 = true;
  14620. break;
  14621. }
  14622. }
  14623. if (!getModKeyPressing(modKey.Shift))
  14624. {
  14625. if (!flag5)
  14626. {
  14627. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14628. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14629. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14630. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14631. {
  14632. Vector3 vector = softG;
  14633. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14634. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14635. softG = vector;
  14636. }
  14637. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14638. {
  14639. Vector3 vector = softG;
  14640. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14641. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14642. softG = vector;
  14643. }
  14644. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14645. {
  14646. Vector3 vector = softG;
  14647. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14648. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14649. softG = vector;
  14650. }
  14651. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14652. {
  14653. Vector3 vector = softG;
  14654. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14655. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14656. softG = vector;
  14657. }
  14658. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14659. {
  14660. Vector3 vector = softG;
  14661. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14662. softG = vector;
  14663. }
  14664. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14665. {
  14666. Vector3 vector = softG;
  14667. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14668. softG = vector;
  14669. }
  14670. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14671. {
  14672. Vector3 vector = softG;
  14673. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14674. softG = vector;
  14675. }
  14676. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14677. {
  14678. Vector3 vector = softG;
  14679. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14680. softG = vector;
  14681. }
  14682. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14683. {
  14684. Vector3 vector = softG;
  14685. vector.y += 6E-05f * speed;
  14686. softG = vector;
  14687. }
  14688. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14689. {
  14690. Vector3 vector = softG;
  14691. vector.y -= 6E-05f * speed;
  14692. softG = vector;
  14693. }
  14694. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14695. {
  14696. softG = new Vector3(0f, -0.003f, 0f);
  14697. }
  14698. for (int j = 0; j < maidCnt; j++)
  14699. {
  14700. Maid maid = maidArray[j];
  14701. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14702. {
  14703. if (maid.body0.goSlot[l].obj != null)
  14704. {
  14705. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14706. if (component2 != null && component2.enabled)
  14707. {
  14708. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14709. }
  14710. }
  14711. List<THair1> fieldValue3 =
  14712. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14713. for (int k = 0; k < fieldValue3.Count; k++)
  14714. {
  14715. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14716. }
  14717. }
  14718. }
  14719. }
  14720. }
  14721. else if (!flag5)
  14722. {
  14723. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14724. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14725. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14726. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14727. {
  14728. Vector3 vector = softG2;
  14729. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14730. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14731. softG2 = vector;
  14732. }
  14733. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14734. {
  14735. Vector3 vector = softG2;
  14736. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14737. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14738. softG2 = vector;
  14739. }
  14740. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14741. {
  14742. Vector3 vector = softG2;
  14743. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14744. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14745. softG2 = vector;
  14746. }
  14747. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14748. {
  14749. Vector3 vector = softG2;
  14750. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14751. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14752. softG2 = vector;
  14753. }
  14754. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14755. {
  14756. Vector3 vector = softG2;
  14757. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14758. softG2 = vector;
  14759. }
  14760. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14761. {
  14762. Vector3 vector = softG2;
  14763. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14764. softG2 = vector;
  14765. }
  14766. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14767. {
  14768. Vector3 vector = softG2;
  14769. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14770. softG2 = vector;
  14771. }
  14772. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14773. {
  14774. Vector3 vector = softG2;
  14775. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14776. softG2 = vector;
  14777. }
  14778. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14779. {
  14780. Vector3 vector = softG2;
  14781. vector.y += 2E-05f * speed;
  14782. softG2 = vector;
  14783. }
  14784. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14785. {
  14786. Vector3 vector = softG2;
  14787. vector.y -= 2E-05f * speed;
  14788. softG2 = vector;
  14789. }
  14790. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14791. {
  14792. softG2 = new Vector3(0f, -0.005f, 0f);
  14793. }
  14794. for (int j = 0; j < maidCnt; j++)
  14795. {
  14796. Maid maid = maidArray[j];
  14797. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14798. {
  14799. if (maid.body0.goSlot[l].obj != null)
  14800. {
  14801. DynamicSkirtBone fieldValue8 =
  14802. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14803. "m_SkirtBone");
  14804. if (fieldValue8 != null)
  14805. {
  14806. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14807. fieldValue8.UpdateParameters();
  14808. }
  14809. }
  14810. }
  14811. }
  14812. }
  14813. }
  14814. if (!isVR)
  14815. {
  14816. if (doguObject.Count > 0)
  14817. {
  14818. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14819. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14820. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14821. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14822. {
  14823. idoFlg2 = true;
  14824. doguObject[doguSelectIndex].transform.localScale =
  14825. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14826. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14827. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14828. }
  14829. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14830. {
  14831. idoFlg2 = true;
  14832. doguObject[doguSelectIndex].transform.localScale =
  14833. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14834. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14835. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14836. }
  14837. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14838. {
  14839. idoFlg2 = true;
  14840. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14841. }
  14842. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14843. {
  14844. doguObject[doguSelectIndex]
  14845. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14846. idoFlg2 = true;
  14847. }
  14848. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14849. {
  14850. doguObject[doguSelectIndex]
  14851. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14852. idoFlg2 = true;
  14853. }
  14854. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14855. && getModKeyPressing(modKey.Alt))
  14856. {
  14857. for (int k = 0; k < 10; k++)
  14858. {
  14859. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14860. Vector3.right,
  14861. -doguObject[doguSelectIndex]
  14862. .transform.rotation.eulerAngles.x);
  14863. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14864. Vector3.forward,
  14865. -doguObject[doguSelectIndex]
  14866. .transform.rotation.eulerAngles.z);
  14867. }
  14868. idoFlg2 = true;
  14869. Vector3 vector = Vector3.zero;
  14870. Vector3 zero3 = Vector3.zero;
  14871. zero3.x = -90f;
  14872. int num12 = doguIndex[doguSelectIndex];
  14873. switch (num12)
  14874. {
  14875. case 3:
  14876. vector.z = 0.5f;
  14877. zero3.z = 90f;
  14878. break;
  14879. case 4:
  14880. case 5:
  14881. case 7:
  14882. case 10:
  14883. case 11: break;
  14884. case 6:
  14885. vector.z = 0.6f;
  14886. zero3.x = 0f;
  14887. break;
  14888. case 8:
  14889. vector.z = 0.5f;
  14890. zero3.x = 0f;
  14891. break;
  14892. case 9:
  14893. vector.z = 0.32f;
  14894. zero3.z = 180f;
  14895. break;
  14896. case 12:
  14897. vector.z = 0.5f;
  14898. zero3.z = 180f;
  14899. break;
  14900. case 13:
  14901. vector.z = 0.7f;
  14902. zero3.z = 180f;
  14903. break;
  14904. default:
  14905. if (num12 != 16)
  14906. {
  14907. switch (num12)
  14908. {
  14909. case 23:
  14910. vector.z = 2.7f;
  14911. vector.x = 0.77f;
  14912. zero3.z = 90f;
  14913. break;
  14914. case 25:
  14915. vector.z = 0.5f;
  14916. vector.y = 0.9f;
  14917. zero3.z = 180f;
  14918. break;
  14919. case 26:
  14920. vector.z = 0.5f;
  14921. vector.y = 0.9f;
  14922. zero3.z = 180f;
  14923. break;
  14924. case 30:
  14925. vector.z = 0f;
  14926. zero3.z = 0f;
  14927. break;
  14928. case 31:
  14929. vector.z = -0.6f;
  14930. vector.y = 0.96f;
  14931. zero3.z = 180f;
  14932. break;
  14933. case 32:
  14934. vector.z = -0.6f;
  14935. vector.y = 0.96f;
  14936. zero3.z = 180f;
  14937. break;
  14938. case 33:
  14939. vector.z = -0.6f;
  14940. vector.y = 0.85f;
  14941. zero3.z = 180f;
  14942. break;
  14943. }
  14944. }
  14945. else
  14946. {
  14947. vector.z = -0.4f;
  14948. zero3.z = 180f;
  14949. }
  14950. break;
  14951. }
  14952. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14953. }
  14954. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14955. && Input.GetKey(KeyCode.J))
  14956. {
  14957. doguObject[doguSelectIndex]
  14958. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14959. new Vector3(vector3.x, 0f, vector3.z),
  14960. 0.3f);
  14961. doguObject[doguSelectIndex]
  14962. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14963. new Vector3(vector2.x, 0f, vector2.z),
  14964. 0.3f);
  14965. idoFlg2 = true;
  14966. }
  14967. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14968. && Input.GetKey(KeyCode.L))
  14969. {
  14970. doguObject[doguSelectIndex]
  14971. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14972. new Vector3(vector3.x, 0f, vector3.z),
  14973. 0.3f);
  14974. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14975. new Vector3(vector2.x, 0f, vector2.z),
  14976. -0.3f);
  14977. idoFlg2 = true;
  14978. }
  14979. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14980. && Input.GetKey(KeyCode.J))
  14981. {
  14982. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14983. new Vector3(vector3.x, 0f, vector3.z),
  14984. -0.3f);
  14985. doguObject[doguSelectIndex]
  14986. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14987. new Vector3(vector2.x, 0f, vector2.z),
  14988. 0.3f);
  14989. idoFlg2 = true;
  14990. }
  14991. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14992. && Input.GetKey(KeyCode.L))
  14993. {
  14994. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14995. new Vector3(vector3.x, 0f, vector3.z),
  14996. -0.3f);
  14997. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14998. new Vector3(vector2.x, 0f, vector2.z),
  14999. -0.3f);
  15000. idoFlg2 = true;
  15001. }
  15002. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15003. {
  15004. doguObject[doguSelectIndex]
  15005. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15006. new Vector3(vector3.x, 0f, vector3.z),
  15007. 0.4f);
  15008. idoFlg2 = true;
  15009. }
  15010. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15011. {
  15012. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15013. new Vector3(vector3.x, 0f, vector3.z),
  15014. -0.4f);
  15015. idoFlg2 = true;
  15016. }
  15017. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15018. {
  15019. doguObject[doguSelectIndex]
  15020. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15021. new Vector3(vector2.x, 0f, vector2.z),
  15022. 0.4f);
  15023. idoFlg2 = true;
  15024. }
  15025. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15026. {
  15027. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15028. new Vector3(vector2.x, 0f, vector2.z),
  15029. -0.4f);
  15030. idoFlg2 = true;
  15031. }
  15032. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15033. {
  15034. doguObject[doguSelectIndex].transform.localRotation =
  15035. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15036. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15037. idoFlg2 = true;
  15038. }
  15039. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15040. {
  15041. doguObject[doguSelectIndex].transform.localRotation =
  15042. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15043. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15044. idoFlg2 = true;
  15045. }
  15046. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15047. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15048. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15049. {
  15050. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15051. new Vector3(vector3.x, 0f, vector3.z),
  15052. -0.7f);
  15053. idoFlg2 = true;
  15054. }
  15055. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15056. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15057. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15058. {
  15059. doguObject[doguSelectIndex]
  15060. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15061. new Vector3(vector3.x, 0f, vector3.z),
  15062. 0.7f);
  15063. idoFlg2 = true;
  15064. }
  15065. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15066. && (Input.GetKey(KeyCode.Minus)
  15067. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15068. {
  15069. doguObject[doguSelectIndex]
  15070. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15071. new Vector3(vector2.x, 0f, vector2.z),
  15072. 0.7f);
  15073. idoFlg2 = true;
  15074. }
  15075. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15076. && (Input.GetKey(KeyCode.Quote)
  15077. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15078. {
  15079. doguObject[doguSelectIndex].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) && Input.GetKey(KeyCode.I)
  15085. && Input.GetKey(KeyCode.J))
  15086. {
  15087. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15088. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15089. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15090. doguObject[doguSelectIndex].transform.localPosition = vector;
  15091. idoFlg2 = true;
  15092. }
  15093. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15094. && Input.GetKey(KeyCode.L))
  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.K)
  15103. && Input.GetKey(KeyCode.J))
  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.L))
  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.I))
  15121. {
  15122. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15123. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15124. doguObject[doguSelectIndex].transform.localPosition = vector;
  15125. idoFlg2 = true;
  15126. }
  15127. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15128. {
  15129. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15130. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15131. doguObject[doguSelectIndex].transform.localPosition = vector;
  15132. idoFlg2 = true;
  15133. }
  15134. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15135. {
  15136. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15137. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15138. doguObject[doguSelectIndex].transform.localPosition = vector;
  15139. idoFlg2 = true;
  15140. }
  15141. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15142. {
  15143. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15144. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15145. doguObject[doguSelectIndex].transform.localPosition = vector;
  15146. idoFlg2 = true;
  15147. }
  15148. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15149. {
  15150. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15151. vector.y += 0.0075f * speed;
  15152. doguObject[doguSelectIndex].transform.localPosition = vector;
  15153. idoFlg2 = true;
  15154. }
  15155. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15156. {
  15157. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15158. vector.y -= 0.0075f * speed;
  15159. doguObject[doguSelectIndex].transform.localPosition = vector;
  15160. idoFlg2 = true;
  15161. }
  15162. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15163. {
  15164. idoFlg2 = true;
  15165. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15166. {
  15167. Destroy(doguObject[doguSelectIndex]);
  15168. doguObject.RemoveAt(doguSelectIndex);
  15169. }
  15170. doguIndex.RemoveAt(doguSelectIndex);
  15171. doguSelectIndex = 0;
  15172. }
  15173. }
  15174. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15175. {
  15176. idoFlg2 = true;
  15177. if (doguSelectIndex == doguObject.Count)
  15178. {
  15179. doguIndex.Add(0);
  15180. }
  15181. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15182. {
  15183. Destroy(doguObject[doguSelectIndex]);
  15184. doguObject.RemoveAt(doguSelectIndex);
  15185. }
  15186. else
  15187. {
  15188. doguIndex.Add(0);
  15189. doguSelectIndex = doguIndex.Count - 1;
  15190. }
  15191. List<int> list2;
  15192. int index;
  15193. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15194. if (doguIndex[doguSelectIndex] <= -1)
  15195. {
  15196. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15197. }
  15198. if (doguIndex[doguSelectIndex] > 0)
  15199. {
  15200. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15201. {
  15202. Object @object = null;
  15203. for (int j = 0; j < 5; j++)
  15204. {
  15205. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15206. if (@object != null)
  15207. {
  15208. break;
  15209. }
  15210. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15211. }
  15212. doguObject.Add(Instantiate(@object) as GameObject);
  15213. }
  15214. else
  15215. {
  15216. Material material = new Material(Shader.Find("Mirror"));
  15217. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15218. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15219. gameObject7.GetComponent<Renderer>().material = material;
  15220. gameObject7.AddComponent<MirrorReflection2>();
  15221. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15222. component5.m_TextureSize = 2048;
  15223. component5.m_ClipPlaneOffset = 0f;
  15224. gameObject7.GetComponent<Renderer>().enabled = true;
  15225. doguObject.Add(gameObject7);
  15226. }
  15227. Vector3 vector = Vector3.zero;
  15228. Vector3 zero3 = Vector3.zero;
  15229. zero3.x = -90f;
  15230. switch (doguIndex[doguSelectIndex])
  15231. {
  15232. case 1:
  15233. vector.z = -0.5f;
  15234. goto IL_344DC;
  15235. case 2:
  15236. vector.z = -0.5f;
  15237. goto IL_344DC;
  15238. case 3:
  15239. vector.z = 0.5f;
  15240. zero3.z = 90f;
  15241. goto IL_344DC;
  15242. case 4:
  15243. vector.z = 0.9f;
  15244. goto IL_344DC;
  15245. case 5:
  15246. vector.z = 0.9f;
  15247. goto IL_344DC;
  15248. case 6:
  15249. vector.z = 0.6f;
  15250. zero3.x = 0f;
  15251. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15252. goto IL_344DC;
  15253. case 7:
  15254. vector.z = 0.6f;
  15255. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15256. goto IL_344DC;
  15257. case 8:
  15258. vector.z = 0.5f;
  15259. zero3.x = 0f;
  15260. goto IL_344DC;
  15261. case 9:
  15262. vector.z = 0.32f;
  15263. zero3.z = 180f;
  15264. goto IL_344DC;
  15265. case 10:
  15266. vector.z = 0.6f;
  15267. goto IL_344DC;
  15268. case 11:
  15269. vector.z = 0.6f;
  15270. goto IL_344DC;
  15271. case 12:
  15272. vector.z = 0.5f;
  15273. zero3.z = 180f;
  15274. goto IL_344DC;
  15275. case 13:
  15276. vector.z = 0.7f;
  15277. zero3.z = 180f;
  15278. goto IL_344DC;
  15279. case 14:
  15280. vector.z = -0.4f;
  15281. goto IL_344DC;
  15282. case 15:
  15283. vector.z = -0.4f;
  15284. goto IL_344DC;
  15285. case 16:
  15286. vector.z = -0.4f;
  15287. zero3.z = 180f;
  15288. goto IL_344DC;
  15289. case 17:
  15290. vector.z = -0.4f;
  15291. goto IL_344DC;
  15292. case 18:
  15293. vector.z = -0.2f;
  15294. goto IL_344DC;
  15295. case 19:
  15296. vector.z = 0f;
  15297. goto IL_344DC;
  15298. case 20:
  15299. vector.z = 3.4f;
  15300. vector.x = -1f;
  15301. goto IL_344DC;
  15302. case 21:
  15303. vector.z = 3.4f;
  15304. vector.x = -1f;
  15305. goto IL_344DC;
  15306. case 22:
  15307. vector.z = 3.4f;
  15308. vector.y = 0.3f;
  15309. vector.x = -1f;
  15310. goto IL_344DC;
  15311. case 23:
  15312. vector.z = 2.7f;
  15313. vector.x = 0.77f;
  15314. zero3.z = 90f;
  15315. goto IL_344DC;
  15316. case 25:
  15317. vector.z = 0.5f;
  15318. vector.y = 0.9f;
  15319. zero3.z = 180f;
  15320. goto IL_344DC;
  15321. case 26:
  15322. vector.z = 0.5f;
  15323. vector.y = 0.9f;
  15324. zero3.z = 180f;
  15325. goto IL_344DC;
  15326. case 29:
  15327. vector.z = 0.5f;
  15328. vector.x = -1.05f;
  15329. goto IL_344DC;
  15330. case 30:
  15331. vector.z = -2.8f;
  15332. zero3.z = 0f;
  15333. zero3.x = 0f;
  15334. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15335. goto IL_344DC;
  15336. case 31:
  15337. vector.z = -0.6f;
  15338. vector.y = 0.96f;
  15339. zero3.z = 180f;
  15340. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15341. goto IL_344DC;
  15342. case 32:
  15343. vector.z = -0.6f;
  15344. vector.y = 0.96f;
  15345. zero3.z = 180f;
  15346. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15347. goto IL_344DC;
  15348. case 33:
  15349. vector.z = -0.6f;
  15350. vector.y = 0.85f;
  15351. zero3.z = 180f;
  15352. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15353. goto IL_344DC;
  15354. }
  15355. vector.z = 0.5f;
  15356. IL_344DC:
  15357. doguObject[doguSelectIndex].transform.localPosition = vector;
  15358. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15359. }
  15360. if (doguIndex[doguSelectIndex] == 0)
  15361. {
  15362. doguIndex.RemoveAt(doguSelectIndex);
  15363. }
  15364. }
  15365. else if (Input.GetKeyDown(KeyCode.W))
  15366. {
  15367. for (int k = 0; k < keyArray.Length; k++)
  15368. {
  15369. if (Input.GetKey(keyArray[k]))
  15370. {
  15371. wFlg = true;
  15372. break;
  15373. }
  15374. }
  15375. }
  15376. else if (Input.GetKeyUp(KeyCode.W))
  15377. {
  15378. if (wFlg)
  15379. {
  15380. wFlg = false;
  15381. }
  15382. else if (idoFlg2)
  15383. {
  15384. idoFlg2 = false;
  15385. }
  15386. else
  15387. {
  15388. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15389. {
  15390. Destroy(doguObject[doguSelectIndex]);
  15391. doguObject.RemoveAt(doguSelectIndex);
  15392. }
  15393. else
  15394. {
  15395. doguIndex.Add(0);
  15396. doguSelectIndex = doguIndex.Count - 1;
  15397. }
  15398. List<int> list2;
  15399. int index;
  15400. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15401. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15402. {
  15403. doguIndex[doguSelectIndex] = 0;
  15404. }
  15405. if (doguIndex[doguSelectIndex] > 0)
  15406. {
  15407. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15408. {
  15409. Object @object = null;
  15410. for (int j = 0; j < 5; j++)
  15411. {
  15412. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15413. if (@object != null)
  15414. {
  15415. break;
  15416. }
  15417. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15418. }
  15419. doguObject.Add(Instantiate(@object) as GameObject);
  15420. }
  15421. else
  15422. {
  15423. Material material = new Material(Shader.Find("Mirror"));
  15424. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15425. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15426. gameObject7.GetComponent<Renderer>().material = material;
  15427. gameObject7.AddComponent<MirrorReflection2>();
  15428. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15429. component5.m_TextureSize = 2048;
  15430. component5.m_ClipPlaneOffset = 0f;
  15431. gameObject7.GetComponent<Renderer>().enabled = true;
  15432. doguObject.Add(gameObject7);
  15433. }
  15434. Vector3 vector = Vector3.zero;
  15435. Vector3 zero3 = Vector3.zero;
  15436. zero3.x = -90f;
  15437. switch (doguIndex[doguSelectIndex])
  15438. {
  15439. case 1:
  15440. vector.z = -0.5f;
  15441. goto IL_34D66;
  15442. case 2:
  15443. vector.z = -0.5f;
  15444. goto IL_34D66;
  15445. case 3:
  15446. vector.z = 0.5f;
  15447. zero3.z = 90f;
  15448. goto IL_34D66;
  15449. case 4:
  15450. vector.z = 0.9f;
  15451. goto IL_34D66;
  15452. case 5:
  15453. vector.z = 0.9f;
  15454. goto IL_34D66;
  15455. case 6:
  15456. vector.z = 0.6f;
  15457. zero3.x = 0f;
  15458. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15459. goto IL_34D66;
  15460. case 7:
  15461. vector.z = 0.6f;
  15462. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15463. goto IL_34D66;
  15464. case 8:
  15465. vector.z = 0.5f;
  15466. zero3.x = 0f;
  15467. goto IL_34D66;
  15468. case 9:
  15469. vector.z = 0.32f;
  15470. zero3.z = 180f;
  15471. goto IL_34D66;
  15472. case 10:
  15473. vector.z = 0.6f;
  15474. goto IL_34D66;
  15475. case 11:
  15476. vector.z = 0.6f;
  15477. goto IL_34D66;
  15478. case 12:
  15479. vector.z = 0.5f;
  15480. zero3.z = 180f;
  15481. goto IL_34D66;
  15482. case 13:
  15483. vector.z = 0.7f;
  15484. zero3.z = 180f;
  15485. goto IL_34D66;
  15486. case 14:
  15487. vector.z = -0.4f;
  15488. goto IL_34D66;
  15489. case 15:
  15490. vector.z = -0.4f;
  15491. goto IL_34D66;
  15492. case 16:
  15493. vector.z = -0.4f;
  15494. zero3.z = 180f;
  15495. goto IL_34D66;
  15496. case 17:
  15497. vector.z = -0.4f;
  15498. goto IL_34D66;
  15499. case 18:
  15500. vector.z = -0.2f;
  15501. goto IL_34D66;
  15502. case 19:
  15503. vector.z = 0f;
  15504. goto IL_34D66;
  15505. case 20:
  15506. vector.z = 3.4f;
  15507. vector.x = -1f;
  15508. goto IL_34D66;
  15509. case 21:
  15510. vector.z = 3.4f;
  15511. vector.x = -1f;
  15512. goto IL_34D66;
  15513. case 22:
  15514. vector.z = 3.4f;
  15515. vector.y = 0.3f;
  15516. vector.x = -1f;
  15517. goto IL_34D66;
  15518. case 23:
  15519. vector.z = 2.7f;
  15520. vector.x = 0.77f;
  15521. zero3.z = 90f;
  15522. goto IL_34D66;
  15523. case 25:
  15524. vector.z = 0.5f;
  15525. vector.y = 0.9f;
  15526. zero3.z = 180f;
  15527. goto IL_34D66;
  15528. case 26:
  15529. vector.z = 0.5f;
  15530. vector.y = 0.9f;
  15531. zero3.z = 180f;
  15532. goto IL_34D66;
  15533. case 29:
  15534. vector.z = 0.5f;
  15535. vector.x = -1.05f;
  15536. goto IL_34D66;
  15537. case 30:
  15538. vector.z = -2.8f;
  15539. zero3.z = 0f;
  15540. zero3.x = 0f;
  15541. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15542. goto IL_34D66;
  15543. case 31:
  15544. vector.z = -0.6f;
  15545. vector.y = 0.96f;
  15546. zero3.z = 180f;
  15547. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15548. goto IL_34D66;
  15549. case 32:
  15550. vector.z = -0.6f;
  15551. vector.y = 0.96f;
  15552. zero3.z = 180f;
  15553. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15554. goto IL_34D66;
  15555. case 33:
  15556. vector.z = -0.6f;
  15557. vector.y = 0.85f;
  15558. zero3.z = 180f;
  15559. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15560. goto IL_34D66;
  15561. }
  15562. vector.z = 0.5f;
  15563. IL_34D66:;
  15564. }
  15565. if (doguIndex[doguSelectIndex] == 0)
  15566. {
  15567. doguIndex.RemoveAt(doguSelectIndex);
  15568. }
  15569. }
  15570. }
  15571. }
  15572. if (!isVR)
  15573. {
  15574. int i;
  15575. for (i = 0; i < 999; i++)
  15576. {
  15577. if (gDogu[i] != null)
  15578. {
  15579. gDogu[i].GetComponent<Renderer>().enabled = false;
  15580. gDogu[i].SetActive(false);
  15581. if (mDogu[i].del)
  15582. {
  15583. mDogu[i].del = false;
  15584. Destroy(doguBObject[i]);
  15585. doguBObject.RemoveAt(i);
  15586. }
  15587. else if (mDogu[i].count > 0)
  15588. {
  15589. mDogu[i].count--;
  15590. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15591. {
  15592. if (mDogu[i].count == 1)
  15593. {
  15594. doguBObject[i].SetActive(false);
  15595. }
  15596. if (mDogu[i].count == 0)
  15597. {
  15598. doguBObject[i].SetActive(true);
  15599. string name = doguBObject[i].name;
  15600. if (name != null)
  15601. {
  15602. if (!(name == "Particle/pLineY"))
  15603. {
  15604. if (!(name == "Particle/pLineP02"))
  15605. {
  15606. if (!(name == "Particle/pLine_act2"))
  15607. {
  15608. if (name == "Particle/pHeart01")
  15609. {
  15610. mDogu[i].count = 77;
  15611. }
  15612. }
  15613. else
  15614. {
  15615. mDogu[i].count = 90;
  15616. }
  15617. }
  15618. else
  15619. {
  15620. mDogu[i].count = 115;
  15621. }
  15622. }
  15623. else
  15624. {
  15625. mDogu[i].count = 180;
  15626. }
  15627. }
  15628. }
  15629. }
  15630. }
  15631. }
  15632. }
  15633. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15634. {
  15635. ikMode2 = 11;
  15636. }
  15637. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15638. {
  15639. ikMode2 = 12;
  15640. }
  15641. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15642. {
  15643. ikMode2 = 14;
  15644. }
  15645. else if (Input.GetKey(KeyCode.X))
  15646. {
  15647. ikMode2 = 9;
  15648. }
  15649. else if (Input.GetKey(KeyCode.Z))
  15650. {
  15651. ikMode2 = 10;
  15652. }
  15653. else if (Input.GetKey(KeyCode.C))
  15654. {
  15655. ikMode2 = 13;
  15656. }
  15657. else if (Input.GetKey(KeyCode.D))
  15658. {
  15659. ikMode2 = 15;
  15660. }
  15661. else
  15662. {
  15663. ikMode2 = 0;
  15664. }
  15665. if (gBg != null)
  15666. {
  15667. if (!isCube3)
  15668. {
  15669. gBg.GetComponent<Renderer>().enabled = false;
  15670. gBg.SetActive(false);
  15671. }
  15672. else
  15673. {
  15674. if (ikMode2 > 0 && ikMode2 != 15)
  15675. {
  15676. gBg.GetComponent<Renderer>().enabled = true;
  15677. gBg.SetActive(true);
  15678. }
  15679. else
  15680. {
  15681. gBg.GetComponent<Renderer>().enabled = false;
  15682. gBg.SetActive(false);
  15683. }
  15684. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15685. {
  15686. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15687. }
  15688. if (ikMode2 == 9 || ikMode2 == 14)
  15689. {
  15690. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15691. mBg.Update();
  15692. }
  15693. if (ikMode2 == 13)
  15694. {
  15695. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15696. mBg.Update();
  15697. }
  15698. if (ikMode2 == 13)
  15699. {
  15700. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15701. {
  15702. mBg.ido = 5;
  15703. mBg.reset = true;
  15704. }
  15705. else
  15706. {
  15707. gBg.transform.position = bg.position;
  15708. gBg.transform.eulerAngles = bg.eulerAngles;
  15709. mBg.maid = bgObject;
  15710. mBg.ido = 5;
  15711. }
  15712. }
  15713. else if (ikMode2 == 11)
  15714. {
  15715. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15716. {
  15717. mBg.ido = 3;
  15718. mBg.reset = true;
  15719. }
  15720. else
  15721. {
  15722. gBg.transform.position = bg.position;
  15723. gBg.transform.eulerAngles = bg.eulerAngles;
  15724. mBg.maid = bgObject;
  15725. mBg.ido = 3;
  15726. }
  15727. }
  15728. else if (ikMode2 == 12)
  15729. {
  15730. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15731. {
  15732. mBg.ido = 2;
  15733. mBg.reset = true;
  15734. }
  15735. else
  15736. {
  15737. gBg.transform.position = bg.position;
  15738. gBg.transform.eulerAngles = bg.eulerAngles;
  15739. mBg.maid = bgObject;
  15740. mBg.ido = 2;
  15741. }
  15742. }
  15743. else if (ikMode2 == 10)
  15744. {
  15745. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15746. {
  15747. mBg.ido = 1;
  15748. mBg.reset = true;
  15749. }
  15750. else
  15751. {
  15752. gBg.transform.position = bg.position;
  15753. gBg.transform.eulerAngles = bg.eulerAngles;
  15754. mBg.maid = bgObject;
  15755. mBg.ido = 1;
  15756. }
  15757. }
  15758. else if (ikMode2 == 9)
  15759. {
  15760. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15761. {
  15762. mBg.ido = 4;
  15763. mBg.reset = true;
  15764. }
  15765. else
  15766. {
  15767. gBg.transform.position = bg.position;
  15768. gBg.transform.eulerAngles = bg.eulerAngles;
  15769. mBg.maid = bgObject;
  15770. mBg.ido = 4;
  15771. }
  15772. }
  15773. else if (ikMode2 == 14)
  15774. {
  15775. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15776. {
  15777. mBg.ido = 6;
  15778. mBg.reset = true;
  15779. }
  15780. else
  15781. {
  15782. gBg.transform.position = bg.position;
  15783. gBg.transform.eulerAngles = bg.eulerAngles;
  15784. mBg.maid = bgObject;
  15785. mBg.ido = 6;
  15786. }
  15787. }
  15788. }
  15789. }
  15790. for (i = 0; i < lightIndex.Count; i++)
  15791. {
  15792. if (gLight[0] == null)
  15793. {
  15794. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15795. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15796. {
  15797. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15798. };
  15799. gLight[0].GetComponent<Renderer>().material = material2;
  15800. gLight[0].layer = 8;
  15801. gLight[0].GetComponent<Renderer>().enabled = false;
  15802. gLight[0].SetActive(false);
  15803. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15804. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15805. mLight[0].obj = gLight[0];
  15806. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15807. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15808. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15809. mLight[0].ido = 1;
  15810. mLight[0].isScale = false;
  15811. }
  15812. if (gLight[i] != null)
  15813. {
  15814. if (!isCube4)
  15815. {
  15816. gLight[i].GetComponent<Renderer>().enabled = false;
  15817. gLight[i].SetActive(false);
  15818. }
  15819. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15820. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15821. {
  15822. if (ikMode2 > 0 && ikMode2 != 15)
  15823. {
  15824. gLight[i].GetComponent<Renderer>().enabled = true;
  15825. gLight[i].SetActive(true);
  15826. }
  15827. else
  15828. {
  15829. gLight[i].GetComponent<Renderer>().enabled = false;
  15830. gLight[i].SetActive(false);
  15831. mLight[i].isAlt = false;
  15832. }
  15833. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15834. {
  15835. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15836. if (mLight[i].isAlt)
  15837. {
  15838. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15839. }
  15840. }
  15841. if (ikMode2 == 9 || ikMode2 == 14)
  15842. {
  15843. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15844. mLight[i].Update();
  15845. }
  15846. if (ikMode2 == 13)
  15847. {
  15848. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15849. mLight[i].Update();
  15850. }
  15851. if (ikMode2 == 13)
  15852. {
  15853. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15854. {
  15855. mLight[i].ido = 15;
  15856. mLight[i].reset = true;
  15857. }
  15858. else
  15859. {
  15860. if (lightList[i].transform.localScale.x == 1f)
  15861. {
  15862. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15863. }
  15864. lightRange[i] = lightList[i].transform.localScale.x;
  15865. gLight[i].transform.position = lightList[i].transform.position;
  15866. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15867. mLight[i].maid = lightList[i];
  15868. mLight[i].ido = 15;
  15869. }
  15870. }
  15871. else if (ikMode2 == 11)
  15872. {
  15873. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15874. {
  15875. mLight[i].ido = 3;
  15876. mLight[i].reset = true;
  15877. }
  15878. else
  15879. {
  15880. gLight[i].transform.position = lightList[i].transform.position;
  15881. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15882. lightX[i] = gLight[i].transform.eulerAngles.x;
  15883. lightY[i] = gLight[i].transform.eulerAngles.y;
  15884. mLight[i].maid = lightList[i];
  15885. mLight[i].ido = 3;
  15886. }
  15887. }
  15888. else if (ikMode2 == 12)
  15889. {
  15890. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15891. {
  15892. mLight[i].ido = 2;
  15893. mLight[i].reset = true;
  15894. }
  15895. else
  15896. {
  15897. gLight[i].transform.position = lightList[i].transform.position;
  15898. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15899. mLight[i].maid = lightList[i];
  15900. mLight[i].ido = 2;
  15901. }
  15902. }
  15903. else if (ikMode2 == 10)
  15904. {
  15905. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15906. {
  15907. mLight[i].ido = 1;
  15908. mLight[i].reset = true;
  15909. }
  15910. else
  15911. {
  15912. gLight[i].transform.position = lightList[i].transform.position;
  15913. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15914. mLight[i].maid = lightList[i];
  15915. mLight[i].maidArray = lightList.ToArray();
  15916. mLight[i].mArray = mLight.ToArray();
  15917. mLight[i].ido = 1;
  15918. }
  15919. }
  15920. else if (ikMode2 == 9)
  15921. {
  15922. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15923. {
  15924. mLight[i].ido = 4;
  15925. mLight[i].reset = true;
  15926. }
  15927. else
  15928. {
  15929. gLight[i].transform.position = lightList[i].transform.position;
  15930. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15931. lightX[i] = gLight[i].transform.eulerAngles.x;
  15932. lightY[i] = gLight[i].transform.eulerAngles.y;
  15933. mLight[i].maid = lightList[i];
  15934. mLight[i].ido = 4;
  15935. }
  15936. }
  15937. else if (ikMode2 == 14)
  15938. {
  15939. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15940. {
  15941. mLight[i].ido = 6;
  15942. mLight[i].reset = true;
  15943. }
  15944. else
  15945. {
  15946. gLight[i].transform.position = lightList[i].transform.position;
  15947. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15948. lightX[i] = gLight[i].transform.eulerAngles.x;
  15949. lightY[i] = gLight[i].transform.eulerAngles.y;
  15950. mLight[i].maid = lightList[i];
  15951. mLight[i].ido = 6;
  15952. }
  15953. }
  15954. }
  15955. }
  15956. }
  15957. for (i = 0; i < doguBObject.Count; i++)
  15958. {
  15959. if (!isCube2)
  15960. {
  15961. gDogu[i].GetComponent<Renderer>().enabled = false;
  15962. gDogu[i].SetActive(false);
  15963. }
  15964. else
  15965. {
  15966. if (ikMode2 > 0)
  15967. {
  15968. gDogu[i].GetComponent<Renderer>().enabled = true;
  15969. gDogu[i].SetActive(true);
  15970. }
  15971. else
  15972. {
  15973. gDogu[i].GetComponent<Renderer>().enabled = false;
  15974. gDogu[i].SetActive(false);
  15975. mDogu[i].isAlt = false;
  15976. }
  15977. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15978. {
  15979. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15980. if (mDogu[i].isAlt)
  15981. {
  15982. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15983. }
  15984. }
  15985. if (ikMode2 == 9 || ikMode2 == 14)
  15986. {
  15987. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15988. mDogu[i].Update();
  15989. }
  15990. if (ikMode2 == 15)
  15991. {
  15992. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  15993. }
  15994. if (ikMode2 == 13)
  15995. {
  15996. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15997. mDogu[i].Update();
  15998. }
  15999. if (ikMode2 == 13)
  16000. {
  16001. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16002. {
  16003. mDogu[i].ido = 5;
  16004. mDogu[i].reset = true;
  16005. }
  16006. else
  16007. {
  16008. gDogu[i].transform.position = doguBObject[i].transform.position;
  16009. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16010. mDogu[i].maid = doguBObject[i];
  16011. mDogu[i].ido = 5;
  16012. }
  16013. }
  16014. else if (ikMode2 == 11)
  16015. {
  16016. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16017. {
  16018. mDogu[i].ido = 3;
  16019. mDogu[i].reset = true;
  16020. }
  16021. else
  16022. {
  16023. gDogu[i].transform.position = doguBObject[i].transform.position;
  16024. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16025. mDogu[i].maid = doguBObject[i];
  16026. mDogu[i].ido = 3;
  16027. }
  16028. }
  16029. else if (ikMode2 == 12)
  16030. {
  16031. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16032. {
  16033. mDogu[i].ido = 2;
  16034. mDogu[i].reset = true;
  16035. }
  16036. else
  16037. {
  16038. gDogu[i].transform.position = doguBObject[i].transform.position;
  16039. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16040. mDogu[i].maid = doguBObject[i];
  16041. mDogu[i].ido = 2;
  16042. }
  16043. }
  16044. else if (ikMode2 == 10)
  16045. {
  16046. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16047. {
  16048. mDogu[i].ido = 1;
  16049. mDogu[i].reset = true;
  16050. }
  16051. else
  16052. {
  16053. gDogu[i].transform.position = doguBObject[i].transform.position;
  16054. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16055. mDogu[i].maid = doguBObject[i];
  16056. mDogu[i].maidArray = doguBObject.ToArray();
  16057. mDogu[i].mArray = mDogu.ToArray();
  16058. mDogu[i].ido = 1;
  16059. }
  16060. }
  16061. else if (ikMode2 == 9)
  16062. {
  16063. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16064. {
  16065. mDogu[i].ido = 4;
  16066. mDogu[i].reset = true;
  16067. }
  16068. else
  16069. {
  16070. gDogu[i].transform.position = doguBObject[i].transform.position;
  16071. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16072. mDogu[i].maid = doguBObject[i];
  16073. mDogu[i].ido = 4;
  16074. }
  16075. }
  16076. else if (ikMode2 == 14)
  16077. {
  16078. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16079. {
  16080. mDogu[i].ido = 6;
  16081. mDogu[i].reset = true;
  16082. }
  16083. else
  16084. {
  16085. gDogu[i].transform.position = doguBObject[i].transform.position;
  16086. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16087. mDogu[i].maid = doguBObject[i];
  16088. mDogu[i].ido = 6;
  16089. }
  16090. }
  16091. else if (ikMode2 == 15)
  16092. {
  16093. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16094. {
  16095. mDogu[i].ido = 7;
  16096. mDogu[i].reset = true;
  16097. }
  16098. else
  16099. {
  16100. gDogu[i].transform.position = doguBObject[i].transform.position;
  16101. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16102. mDogu[i].maid = doguBObject[i];
  16103. mDogu[i].ido = 7;
  16104. }
  16105. }
  16106. }
  16107. }
  16108. ikModeOld2 = ikMode2;
  16109. }
  16110. if (isVR)
  16111. {
  16112. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16113. {
  16114. if (!isVR2)
  16115. {
  16116. isVR2 = true;
  16117. Preferences["config"]["shift_f8"].Value = "true";
  16118. SaveConfig();
  16119. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16120. }
  16121. else
  16122. {
  16123. isVR2 = false;
  16124. Preferences["config"]["shift_f8"].Value = "false";
  16125. SaveConfig();
  16126. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16127. }
  16128. }
  16129. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16130. {
  16131. loadScene = 1;
  16132. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16133. }
  16134. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16135. {
  16136. loadScene = 2;
  16137. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16138. }
  16139. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16140. {
  16141. loadScene = 3;
  16142. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16143. }
  16144. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16145. {
  16146. loadScene = 4;
  16147. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16148. }
  16149. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16150. {
  16151. loadScene = 5;
  16152. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16153. }
  16154. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16155. {
  16156. loadScene = 6;
  16157. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16158. }
  16159. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16160. {
  16161. loadScene = 7;
  16162. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16163. }
  16164. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16165. {
  16166. loadScene = 8;
  16167. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16168. }
  16169. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16170. {
  16171. loadScene = 9;
  16172. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16173. }
  16174. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16175. {
  16176. loadScene = 10;
  16177. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16178. }
  16179. for (int j = 0; j < 7; j++)
  16180. {
  16181. if (!maidArray[j])
  16182. {
  16183. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16184. }
  16185. }
  16186. }
  16187. }
  16188. }
  16189. }
  16190. }