MultipleMaids.MaidUpdate.cs 923 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. if (lightList.Count == 0)
  661. {
  662. float num2 = 2f;
  663. if (Application.unityVersion.StartsWith("4"))
  664. {
  665. num2 = 1f;
  666. }
  667. GameObject gameObject3 = new GameObject("Light");
  668. gameObject3.AddComponent<Light>();
  669. lightList.Add(gameObject3);
  670. lightColorR.Add(1f);
  671. lightColorG.Add(1f);
  672. lightColorB.Add(1f);
  673. lightIndex.Add(0);
  674. lightX.Add(40f);
  675. lightY.Add(180f);
  676. lightAkarusa.Add(num2);
  677. lightKage.Add(0.098f);
  678. lightRange.Add(50f);
  679. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  680. gameObject3.GetComponent<Light>().intensity = num2;
  681. gameObject3.GetComponent<Light>().spotAngle = 50f;
  682. gameObject3.GetComponent<Light>().range = 10f;
  683. gameObject3.GetComponent<Light>().type = LightType.Directional;
  684. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  685. gameObject3.GetComponent<Light>().cullingMask = 256;
  686. // lightComboList = new GUIContent[lightList.Count];
  687. // lightComboList[0] = new GUIContent("メイン");
  688. // lightCombo.selectedItemIndex = 0;
  689. // selectLightIndex = 0;
  690. }
  691. }
  692. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  693. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  694. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  695. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  696. {
  697. float axis = Input.GetAxis("Mouse ScrollWheel");
  698. if (axis > 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  701. if (mainCamera.GetDistance() < 0.1f)
  702. {
  703. mainCamera.SetDistance(0.1f, true);
  704. }
  705. }
  706. else if (axis < 0f)
  707. {
  708. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  709. if (mainCamera.GetDistance() > 25f)
  710. {
  711. mainCamera.SetDistance(25f, true);
  712. }
  713. }
  714. }
  715. for (int j = 0; j < maxMaidCnt; j++)
  716. {
  717. if (maidArray[j] && maidArray[j].Visible)
  718. {
  719. maidCnt++;
  720. }
  721. }
  722. if (maidArray[0] != null && maidArray[0].Visible)
  723. {
  724. if (getModKeyPressing(modKey.Shift))
  725. {
  726. speed = 5f * Time.deltaTime * 60f;
  727. }
  728. else
  729. {
  730. speed = 1f * Time.deltaTime * 60f;
  731. }
  732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  735. if (!isVR || isVR2)
  736. {
  737. if (!isVR)
  738. {
  739. if (isBloom)
  740. {
  741. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  742. fieldValue2.enabled = true;
  743. fieldValue2.bloomIntensity = bloom1;
  744. fieldValue2.bloomBlurIterations = (int)bloom2;
  745. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  746. if (isBloomA)
  747. {
  748. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  749. }
  750. else
  751. {
  752. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  753. }
  754. isBloom2 = true;
  755. }
  756. else if (isBloom2)
  757. {
  758. isBloom2 = false;
  759. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  760. fieldValue2.enabled = true;
  761. fieldValue2.bloomIntensity = 2.85f;
  762. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  763. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  764. fieldValue2.bloomBlurIterations = 3;
  765. }
  766. if (isDepth)
  767. {
  768. depth_field_.enabled = true;
  769. depth_field_.focalLength = depth1;
  770. depth_field_.focalSize = depth2;
  771. depth_field_.aperture = depth3;
  772. depth_field_.maxBlurSize = depth4;
  773. if (isDepthA)
  774. {
  775. depth_field_.visualizeFocus = true;
  776. }
  777. else
  778. {
  779. depth_field_.visualizeFocus = false;
  780. }
  781. }
  782. else
  783. {
  784. if (depth_field_ == null)
  785. {
  786. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  787. if (depth_field_.dofHdrShader == null)
  788. {
  789. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  790. }
  791. if (depth_field_.dx11BokehShader == null)
  792. {
  793. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  794. }
  795. if (depth_field_.dx11BokehTexture == null)
  796. {
  797. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  798. }
  799. }
  800. depth_field_.enabled = false;
  801. }
  802. if (isFog)
  803. {
  804. if (fog_.fogShader == null)
  805. {
  806. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  807. }
  808. fog_.enabled = true;
  809. fog_.startDistance = fog1;
  810. fog_.globalDensity = fog2;
  811. fog_.heightScale = fog3;
  812. fog_.height = fog4;
  813. fog_.globalFogColor.r = fog5;
  814. fog_.globalFogColor.g = fog6;
  815. fog_.globalFogColor.b = fog7;
  816. }
  817. else
  818. {
  819. if (fog_ == null)
  820. {
  821. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  822. }
  823. fog_.enabled = false;
  824. }
  825. if (isSepia != isSepian)
  826. {
  827. isSepia = isSepian;
  828. if (isSepia)
  829. {
  830. if (sepia_tone_.shader == null)
  831. {
  832. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  833. }
  834. sepia_tone_.enabled = true;
  835. }
  836. else
  837. {
  838. if (sepia_tone_ == null)
  839. {
  840. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  841. }
  842. sepia_tone_.enabled = false;
  843. }
  844. }
  845. if (bokashi > 0f)
  846. {
  847. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  848. component.enabled = true;
  849. component.blurSize = bokashi / 10f;
  850. component.blurIterations = 0;
  851. component.downsample = 0;
  852. if (bokashi > 3f)
  853. {
  854. component.blurSize -= 0.3f;
  855. component.blurIterations = 1;
  856. component.downsample = 1;
  857. }
  858. }
  859. else
  860. {
  861. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  862. component.enabled = false;
  863. }
  864. if (kamiyure > 0f)
  865. {
  866. for (int j = 0; j < maidCnt; j++)
  867. {
  868. Maid maid = maidArray[j];
  869. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  870. {
  871. if (maid.body0.goSlot[l].obj != null)
  872. {
  873. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  874. if (component2 != null && component2.enabled)
  875. {
  876. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  877. }
  878. }
  879. List<THair1> fieldValue3 =
  880. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  881. for (int k = 0; k < fieldValue3.Count; k++)
  882. {
  883. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  884. }
  885. }
  886. }
  887. }
  888. if (isBlur)
  889. {
  890. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  891. component3.mode = Vignetting.AberrationMode.Simple;
  892. component3.intensity = blur1;
  893. component3.chromaticAberration = blur4;
  894. component3.blur = blur2;
  895. component3.blurSpread = blur3;
  896. component3.enabled = true;
  897. isBlur2 = true;
  898. }
  899. else if (isBlur2)
  900. {
  901. isBlur2 = false;
  902. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  903. component3.mode = Vignetting.AberrationMode.Simple;
  904. component3.intensity = -3.98f;
  905. component3.chromaticAberration = -0.75f;
  906. component3.axialAberration = 1.18f;
  907. component3.blurSpread = 4.19f;
  908. component3.luminanceDependency = 0.494f;
  909. component3.blurDistance = 1.71f;
  910. component3.enabled = false;
  911. }
  912. }
  913. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  919. {
  920. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  921. {
  922. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  923. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  924. }
  925. }
  926. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  927. {
  928. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  929. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  930. }
  931. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  932. {
  933. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  934. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  937. {
  938. GameMain.Instance.MainLight.Reset();
  939. GameMain.Instance.MainLight.SetIntensity(0.95f);
  940. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  941. lightIndex[0] = 0;
  942. lightColorR[0] = 1f;
  943. lightColorG[0] = 1f;
  944. lightColorB[0] = 1f;
  945. lightX[0] = 40f;
  946. lightY[0] = 180f;
  947. lightAkarusa[0] = 0.95f;
  948. lightKage[0] = 0.098f;
  949. lightRange[0] = 50f;
  950. bgObject.SetActive(true);
  951. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  952. isIdx1 = false;
  953. isIdx2 = false;
  954. isIdx3 = false;
  955. isIdx4 = false;
  956. }
  957. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  958. {
  959. List<float> list;
  960. (list = lightColorR)[0] = list[0] + 0.01f;
  961. if (lightColorR[0] > 1f)
  962. {
  963. lightColorR[0] = 1f;
  964. }
  965. if (lightIndex[0] != 3)
  966. {
  967. GameMain.Instance.MainLight.GetComponent<Light>().color =
  968. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  969. }
  970. else
  971. {
  972. mainCamera.GetComponent<Camera>().backgroundColor =
  973. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  974. }
  975. }
  976. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  977. {
  978. List<float> list;
  979. (list = lightColorG)[0] = list[0] + 0.01f;
  980. if (lightColorG[0] > 1f)
  981. {
  982. lightColorG[0] = 1f;
  983. }
  984. if (lightIndex[0] != 3)
  985. {
  986. GameMain.Instance.MainLight.GetComponent<Light>().color =
  987. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  988. }
  989. else
  990. {
  991. mainCamera.GetComponent<Camera>().backgroundColor =
  992. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  993. }
  994. }
  995. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  996. {
  997. List<float> list;
  998. (list = lightColorB)[0] = list[0] + 0.01f;
  999. if (lightColorB[0] > 1f)
  1000. {
  1001. lightColorB[0] = 1f;
  1002. }
  1003. if (lightIndex[0] != 3)
  1004. {
  1005. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1006. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1007. }
  1008. else
  1009. {
  1010. mainCamera.GetComponent<Camera>().backgroundColor =
  1011. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1012. }
  1013. }
  1014. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1015. {
  1016. List<float> list;
  1017. (list = lightColorR)[0] = list[0] - 0.01f;
  1018. if (lightColorR[0] < 0f)
  1019. {
  1020. lightColorR[0] = 0f;
  1021. }
  1022. if (lightIndex[0] != 3)
  1023. {
  1024. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1025. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1026. }
  1027. else
  1028. {
  1029. mainCamera.GetComponent<Camera>().backgroundColor =
  1030. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1031. }
  1032. }
  1033. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1034. {
  1035. List<float> list;
  1036. (list = lightColorG)[0] = list[0] - 0.01f;
  1037. if (lightColorG[0] < 0f)
  1038. {
  1039. lightColorG[0] = 0f;
  1040. }
  1041. if (lightIndex[0] != 3)
  1042. {
  1043. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1044. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1045. }
  1046. else
  1047. {
  1048. mainCamera.GetComponent<Camera>().backgroundColor =
  1049. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1050. }
  1051. }
  1052. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1053. {
  1054. List<float> list;
  1055. (list = lightColorB)[0] = list[0] - 0.01f;
  1056. if (lightColorB[0] < 0f)
  1057. {
  1058. lightColorB[0] = 0f;
  1059. }
  1060. if (lightIndex[0] != 3)
  1061. {
  1062. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1063. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1064. }
  1065. else
  1066. {
  1067. mainCamera.GetComponent<Camera>().backgroundColor =
  1068. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1069. }
  1070. }
  1071. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1072. {
  1073. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1074. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1075. }
  1076. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1077. {
  1078. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1079. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1080. }
  1081. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1084. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1085. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1086. }
  1087. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1088. {
  1089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1090. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1091. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1092. }
  1093. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1094. {
  1095. List<int> list2;
  1096. (list2 = lightIndex)[0] = list2[0] + 1;
  1097. if (lightIndex[0] == 4)
  1098. {
  1099. lightIndex[0] = 0;
  1100. }
  1101. lightColorR[0] = 1f;
  1102. lightColorG[0] = 1f;
  1103. lightColorB[0] = 1f;
  1104. lightX[0] = 40f;
  1105. lightY[0] = 180f;
  1106. lightAkarusa[0] = 0.95f;
  1107. lightKage[0] = 0.098f;
  1108. lightRange[0] = 50f;
  1109. GameMain.Instance.MainLight.Reset();
  1110. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1111. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1112. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1113. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1114. if (lightIndex[0] == 0)
  1115. {
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1117. bgObject.SetActive(true);
  1118. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1119. }
  1120. else if (lightIndex[0] == 1)
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1123. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1125. }
  1126. else if (lightIndex[0] == 2)
  1127. {
  1128. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1129. }
  1130. else if (lightIndex[0] == 3)
  1131. {
  1132. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1133. mainCamera.GetComponent<Camera>().backgroundColor =
  1134. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1135. bgObject.SetActive(false);
  1136. }
  1137. isIdx1 = false;
  1138. isIdx2 = false;
  1139. isIdx3 = false;
  1140. isIdx4 = false;
  1141. }
  1142. }
  1143. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1144. {
  1145. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1148. {
  1149. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1150. {
  1151. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1152. }
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1155. {
  1156. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1159. {
  1160. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1163. {
  1164. GameMain.Instance.MainLight.Reset();
  1165. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1168. {
  1169. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1170. }
  1171. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1172. {
  1173. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1174. }
  1175. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1176. {
  1177. if (lightIndex[0] == 1)
  1178. {
  1179. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1180. }
  1181. else
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1184. }
  1185. }
  1186. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1187. {
  1188. if (lightIndex[0] == 1)
  1189. {
  1190. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1191. }
  1192. else
  1193. {
  1194. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1195. }
  1196. }
  1197. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1198. {
  1199. List<int> list2;
  1200. (list2 = lightIndex)[0] = list2[0] + 1;
  1201. if (lightIndex[0] == 3)
  1202. {
  1203. lightIndex[0] = 0;
  1204. }
  1205. GameMain.Instance.MainLight.Reset();
  1206. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1208. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1209. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1210. if (lightIndex[0] == 0)
  1211. {
  1212. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1213. }
  1214. else if (lightIndex[0] == 1)
  1215. {
  1216. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1217. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1218. }
  1219. else if (lightIndex[0] == 2)
  1220. {
  1221. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1222. }
  1223. }
  1224. int i;
  1225. for (i = 0; i < lightList.Count; i++)
  1226. {
  1227. if (i > 0)
  1228. {
  1229. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1230. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1231. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1232. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1233. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1234. {
  1235. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1236. }
  1237. }
  1238. else
  1239. {
  1240. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1241. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1242. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1243. {
  1244. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1245. }
  1246. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1247. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1248. if (lightIndex[i] != 3)
  1249. {
  1250. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1251. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1252. }
  1253. else
  1254. {
  1255. mainCamera.GetComponent<Camera>().backgroundColor =
  1256. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1257. }
  1258. }
  1259. }
  1260. bool flag3 = false;
  1261. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1262. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1263. {
  1264. for (i = 0; i < maidCnt; i++)
  1265. {
  1266. if (goSlot[(int)selectList[i]] != null)
  1267. {
  1268. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1269. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1270. {
  1271. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1272. }
  1273. }
  1274. }
  1275. }
  1276. for (int j = 0; j < maidCnt; j++)
  1277. {
  1278. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1279. {
  1280. bool flag4 = shodaiFlg[(int)selectList[j]];
  1281. shodaiFlg[(int)selectList[j]] = false;
  1282. try
  1283. {
  1284. TMorph morph = maidArray[j].body0.Face.morph;
  1285. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1286. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1287. }
  1288. catch
  1289. {
  1290. shodaiFlg[(int)selectList[j]] = true;
  1291. }
  1292. if (shodaiFlg[(int)selectList[j]] != flag4)
  1293. {
  1294. if (!isVR)
  1295. {
  1296. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1297. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1298. }
  1299. }
  1300. }
  1301. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1302. {
  1303. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1304. }
  1305. if (sceneLevel == 5)
  1306. {
  1307. if (editSelectMaid == maidArray[j])
  1308. {
  1309. flag3 = true;
  1310. }
  1311. }
  1312. Maid maid = maidArray[j];
  1313. }
  1314. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1315. {
  1316. isEditNo = 0;
  1317. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1318. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1319. }
  1320. i = 0;
  1321. while (i < maidCnt)
  1322. {
  1323. Transform transform = maidArray[i].transform;
  1324. Maid maid = maidArray[i];
  1325. if (cafeFlg[i])
  1326. {
  1327. cafeCount[i]++;
  1328. if (cafeCount[i] > 1)
  1329. {
  1330. maid.DelProp(MPN.handitem, true);
  1331. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1332. maid.AllProcPropSeqStart();
  1333. cafeFlg[i] = false;
  1334. cafeCount[i] = 0;
  1335. }
  1336. }
  1337. KeyCode key;
  1338. if (i >= 14)
  1339. {
  1340. bool flag5 = false;
  1341. bool flag6 = false;
  1342. for (int k = 0; k < keyArray.Length; k++)
  1343. {
  1344. if (Input.GetKey(keyArray[k]))
  1345. {
  1346. flag5 = true;
  1347. break;
  1348. }
  1349. if (Input.GetKeyUp(keyArray[k]))
  1350. {
  1351. flag6 = true;
  1352. break;
  1353. }
  1354. }
  1355. key = keyArray[6];
  1356. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1357. {
  1358. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1359. {
  1360. goto IL_49FE;
  1361. }
  1362. idoFlg[i - 7] = false;
  1363. }
  1364. }
  1365. else if (i >= 7)
  1366. {
  1367. bool flag5 = false;
  1368. bool flag6 = false;
  1369. for (int k = 0; k < keyArray.Length; k++)
  1370. {
  1371. if (Input.GetKey(keyArray[k]))
  1372. {
  1373. flag5 = true;
  1374. break;
  1375. }
  1376. if (Input.GetKeyUp(keyArray[k]))
  1377. {
  1378. flag6 = true;
  1379. break;
  1380. }
  1381. }
  1382. key = keyArray[i - 7];
  1383. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1384. {
  1385. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1386. {
  1387. goto IL_49FE;
  1388. }
  1389. idoFlg[i - 7] = false;
  1390. }
  1391. }
  1392. else
  1393. {
  1394. bool flag5 = false;
  1395. for (int k = 0; k < keyArray.Length; k++)
  1396. {
  1397. if (Input.GetKey(keyArray[k]))
  1398. {
  1399. flag5 = true;
  1400. break;
  1401. }
  1402. }
  1403. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1404. {
  1405. key = keyArray[i];
  1406. goto IL_49FE;
  1407. }
  1408. }
  1409. IL_1688E:
  1410. i++;
  1411. continue;
  1412. IL_49FE:
  1413. if (xFlg[i])
  1414. {
  1415. if (!maid.AudioMan.audiosource.isPlaying)
  1416. {
  1417. if (maid.status.personal.uniqueName == "Pride")
  1418. {
  1419. string text = "s0_";
  1420. Random random = new Random();
  1421. int num4 = random.Next(10000);
  1422. bool flag7 = false;
  1423. for (int k = 0; k < tunArray.Length; k++)
  1424. {
  1425. if (tunArray[k] == num4)
  1426. {
  1427. flag7 = true;
  1428. break;
  1429. }
  1430. }
  1431. if (!flag7)
  1432. {
  1433. text = text + "0" + num4.ToString() + ".ogg";
  1434. if (GameUty.FileSystem.IsExistentFile(text))
  1435. {
  1436. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1437. }
  1438. }
  1439. }
  1440. if (maid.status.personal.uniqueName == "Cool")
  1441. {
  1442. string text = "s1_";
  1443. Random random = new Random();
  1444. int num4 = random.Next(10000);
  1445. bool flag7 = false;
  1446. for (int k = 0; k < coolArray.Length; k++)
  1447. {
  1448. if (coolArray[k] == num4)
  1449. {
  1450. flag7 = true;
  1451. break;
  1452. }
  1453. }
  1454. if (!flag7)
  1455. {
  1456. text = text + "0" + num4.ToString() + ".ogg";
  1457. if (GameUty.FileSystem.IsExistentFile(text))
  1458. {
  1459. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1460. }
  1461. }
  1462. }
  1463. if (maid.status.personal.uniqueName == "Pure")
  1464. {
  1465. string text = "s2_";
  1466. Random random = new Random();
  1467. int num4 = random.Next(10000);
  1468. bool flag7 = false;
  1469. for (int k = 0; k < pureArray.Length; k++)
  1470. {
  1471. if (pureArray[k] == num4)
  1472. {
  1473. flag7 = true;
  1474. break;
  1475. }
  1476. }
  1477. if (!flag7)
  1478. {
  1479. text = text + "0" + num4.ToString() + ".ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(text))
  1481. {
  1482. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1483. }
  1484. }
  1485. }
  1486. if (maid.status.personal.uniqueName == "Yandere")
  1487. {
  1488. string text = "s3_";
  1489. Random random = new Random();
  1490. int num4 = random.Next(10000);
  1491. bool flag7 = false;
  1492. for (int k = 0; k < yanArray.Length; k++)
  1493. {
  1494. if (yanArray[k] == num4)
  1495. {
  1496. flag7 = true;
  1497. break;
  1498. }
  1499. }
  1500. if (!flag7)
  1501. {
  1502. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1503. if (GameUty.FileSystem.IsExistentFile(text))
  1504. {
  1505. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1506. }
  1507. }
  1508. }
  1509. if (maid.status.personal.uniqueName == "Muku")
  1510. {
  1511. string text = "h0_";
  1512. Random random = new Random();
  1513. int num4 = random.Next(10000);
  1514. bool flag7 = false;
  1515. for (int k = 0; k < h0Array.Length; k++)
  1516. {
  1517. if (h0Array[k] == num4)
  1518. {
  1519. flag7 = true;
  1520. break;
  1521. }
  1522. }
  1523. if (flag7)
  1524. {
  1525. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1526. if (GameUty.FileSystem.IsExistentFile(text))
  1527. {
  1528. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1529. }
  1530. }
  1531. }
  1532. if (maid.status.personal.uniqueName == "Majime")
  1533. {
  1534. string text = "h1_";
  1535. Random random = new Random();
  1536. int num4 = random.Next(10000);
  1537. bool flag7 = false;
  1538. for (int k = 0; k < h1Array.Length; k++)
  1539. {
  1540. if (h1Array[k] == num4)
  1541. {
  1542. flag7 = true;
  1543. break;
  1544. }
  1545. }
  1546. if (flag7)
  1547. {
  1548. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1549. if (GameUty.FileSystem.IsExistentFile(text))
  1550. {
  1551. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1552. }
  1553. }
  1554. }
  1555. if (maid.status.personal.uniqueName == "Rindere")
  1556. {
  1557. string text = "h2_";
  1558. Random random = new Random();
  1559. int num4 = random.Next(10000);
  1560. bool flag7 = false;
  1561. for (int k = 0; k < h2Array.Length; k++)
  1562. {
  1563. if (h2Array[k] == num4)
  1564. {
  1565. flag7 = true;
  1566. break;
  1567. }
  1568. }
  1569. if (flag7)
  1570. {
  1571. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1572. if (GameUty.FileSystem.IsExistentFile(text))
  1573. {
  1574. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. if (zFlg[i])
  1581. {
  1582. if (!maid.AudioMan.audiosource.isPlaying)
  1583. {
  1584. string text = "";
  1585. if (maid.status.personal.uniqueName == "Pride")
  1586. {
  1587. text = "s0_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(tunArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Cool")
  1594. {
  1595. text = "s1_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(coolArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Pure")
  1602. {
  1603. text = "s2_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(pureArray.Length);
  1606. object obj = text;
  1607. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1608. }
  1609. if (maid.status.personal.uniqueName == "Yandere")
  1610. {
  1611. text = "s3_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(yanArray.Length);
  1614. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Muku")
  1617. {
  1618. text = "h0_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h0tArray.Length);
  1621. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Majime")
  1624. {
  1625. text = "h1_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h1tArray.Length);
  1628. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1629. }
  1630. if (maid.status.personal.uniqueName == "Rindere")
  1631. {
  1632. text = "h2_";
  1633. Random random = new Random();
  1634. int num4 = random.Next(h2tArray.Length);
  1635. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1636. }
  1637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1638. }
  1639. }
  1640. if (!isVR || isVR2)
  1641. {
  1642. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 1;
  1647. ikMode[i] = 0;
  1648. SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. qFlg = true;
  1660. }
  1661. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1662. {
  1663. ikMaid = i;
  1664. isIK[i] = true;
  1665. ikBui = 2;
  1666. ikMode[i] = 0;
  1667. SetIK(maid, i);
  1668. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1669. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1670. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1671. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1672. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1673. idoFlg[i] = true;
  1674. if (i >= 7)
  1675. {
  1676. idoFlg[i - 7] = true;
  1677. }
  1678. }
  1679. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1680. {
  1681. ikMaid = i;
  1682. isIK[i] = true;
  1683. ikBui = 3;
  1684. ikMode[i] = 0;
  1685. SetIK(maid, i);
  1686. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1687. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1688. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1689. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1690. idoFlg[i] = true;
  1691. if (i >= 7)
  1692. {
  1693. idoFlg[i - 7] = true;
  1694. }
  1695. }
  1696. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1697. {
  1698. ikMaid = i;
  1699. isIK[i] = true;
  1700. ikBui = 4;
  1701. ikMode[i] = 0;
  1702. SetIK(maid, i);
  1703. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1704. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1705. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1706. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1707. idoFlg[i] = true;
  1708. if (i >= 7)
  1709. {
  1710. idoFlg[i - 7] = true;
  1711. }
  1712. sFlg = true;
  1713. }
  1714. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1715. {
  1716. maid.body0.transform.localRotation =
  1717. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1718. if (i >= 7)
  1719. {
  1720. idoFlg[i - 7] = true;
  1721. }
  1722. idoFlg[i] = true;
  1723. }
  1724. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1725. {
  1726. maid.body0.transform.localRotation =
  1727. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1728. if (i >= 7)
  1729. {
  1730. idoFlg[i - 7] = true;
  1731. }
  1732. idoFlg[i] = true;
  1733. }
  1734. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1735. {
  1736. bGui = true;
  1737. isPoseInit = true;
  1738. isGuiInit = true;
  1739. poseFlg = true;
  1740. faceFlg = false;
  1741. sceneFlg = false;
  1742. kankyoFlg = false;
  1743. kankyo2Flg = false;
  1744. fFlg = true;
  1745. for (int k = 0; k < maidCnt; k++)
  1746. {
  1747. if (maid == maidArray[k])
  1748. {
  1749. selectMaidIndex = k;
  1750. }
  1751. }
  1752. copyIndex = 0;
  1753. if (i >= 7)
  1754. {
  1755. idoFlg[i - 7] = true;
  1756. }
  1757. idoFlg[i] = true;
  1758. }
  1759. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1760. {
  1761. bGui = true;
  1762. isFaceInit = true;
  1763. isGuiInit = true;
  1764. faceFlg = true;
  1765. poseFlg = false;
  1766. sceneFlg = false;
  1767. kankyoFlg = false;
  1768. kankyo2Flg = false;
  1769. maid.boMabataki = false;
  1770. for (int k = 0; k < maidCnt; k++)
  1771. {
  1772. if (maid == maidArray[k])
  1773. {
  1774. selectMaidIndex = k;
  1775. }
  1776. }
  1777. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1778. if (i >= 7)
  1779. {
  1780. idoFlg[i - 7] = true;
  1781. }
  1782. idoFlg[i] = true;
  1783. }
  1784. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1785. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1786. {
  1787. if (!xFlg[i])
  1788. {
  1789. xFlg[i] = true;
  1790. zFlg[i] = false;
  1791. if (maid.status.personal.uniqueName == "Pride")
  1792. {
  1793. string text = "s0_";
  1794. Random random = new Random();
  1795. int num4 = random.Next(10000);
  1796. bool flag7 = false;
  1797. for (int k = 0; k < tunArray.Length; k++)
  1798. {
  1799. if (tunArray[k] == num4)
  1800. {
  1801. flag7 = true;
  1802. break;
  1803. }
  1804. }
  1805. if (!flag7)
  1806. {
  1807. text = text + "0" + num4.ToString() + ".ogg";
  1808. if (GameUty.FileSystem.IsExistentFile(text))
  1809. {
  1810. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1811. }
  1812. }
  1813. }
  1814. if (maid.status.personal.uniqueName == "Cool")
  1815. {
  1816. string text = "s1_";
  1817. Random random = new Random();
  1818. int num4 = random.Next(10000);
  1819. bool flag7 = false;
  1820. for (int k = 0; k < coolArray.Length; k++)
  1821. {
  1822. if (coolArray[k] == num4)
  1823. {
  1824. flag7 = true;
  1825. break;
  1826. }
  1827. }
  1828. if (!flag7)
  1829. {
  1830. text = text + "0" + num4.ToString() + ".ogg";
  1831. if (GameUty.FileSystem.IsExistentFile(text))
  1832. {
  1833. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1834. }
  1835. }
  1836. }
  1837. if (maid.status.personal.uniqueName == "Pure")
  1838. {
  1839. string text = "s2_";
  1840. Random random = new Random();
  1841. int num4 = random.Next(10000);
  1842. bool flag7 = false;
  1843. for (int k = 0; k < pureArray.Length; k++)
  1844. {
  1845. if (pureArray[k] == num4)
  1846. {
  1847. flag7 = true;
  1848. break;
  1849. }
  1850. }
  1851. if (!flag7)
  1852. {
  1853. text = text + "0" + num4.ToString() + ".ogg";
  1854. if (GameUty.FileSystem.IsExistentFile(text))
  1855. {
  1856. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1857. }
  1858. }
  1859. }
  1860. if (maid.status.personal.uniqueName == "Yandere")
  1861. {
  1862. string text = "s3_";
  1863. Random random = new Random();
  1864. int num4 = random.Next(10000);
  1865. bool flag7 = false;
  1866. for (int k = 0; k < yanArray.Length; k++)
  1867. {
  1868. if (yanArray[k] == num4)
  1869. {
  1870. flag7 = true;
  1871. break;
  1872. }
  1873. }
  1874. if (!flag7)
  1875. {
  1876. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1877. if (GameUty.FileSystem.IsExistentFile(text))
  1878. {
  1879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1880. }
  1881. }
  1882. }
  1883. if (maid.status.personal.uniqueName == "Muku")
  1884. {
  1885. string text = "h0_";
  1886. Random random = new Random();
  1887. int num4 = random.Next(10000);
  1888. bool flag7 = false;
  1889. for (int k = 0; k < h0Array.Length; k++)
  1890. {
  1891. if (h0Array[k] == num4)
  1892. {
  1893. flag7 = true;
  1894. break;
  1895. }
  1896. }
  1897. if (flag7)
  1898. {
  1899. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1900. if (GameUty.FileSystem.IsExistentFile(text))
  1901. {
  1902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1903. }
  1904. }
  1905. }
  1906. if (maid.status.personal.uniqueName == "Majime")
  1907. {
  1908. string text = "h1_";
  1909. Random random = new Random();
  1910. int num4 = random.Next(10000);
  1911. bool flag7 = false;
  1912. for (int k = 0; k < h1Array.Length; k++)
  1913. {
  1914. if (h1Array[k] == num4)
  1915. {
  1916. flag7 = true;
  1917. break;
  1918. }
  1919. }
  1920. if (flag7)
  1921. {
  1922. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1923. if (GameUty.FileSystem.IsExistentFile(text))
  1924. {
  1925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1926. }
  1927. }
  1928. }
  1929. if (maid.status.personal.uniqueName == "Rindere")
  1930. {
  1931. string text = "h2_";
  1932. Random random = new Random();
  1933. int num4 = random.Next(10000);
  1934. bool flag7 = false;
  1935. for (int k = 0; k < h2Array.Length; k++)
  1936. {
  1937. if (h2Array[k] == num4)
  1938. {
  1939. flag7 = true;
  1940. break;
  1941. }
  1942. }
  1943. if (flag7)
  1944. {
  1945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1946. if (GameUty.FileSystem.IsExistentFile(text))
  1947. {
  1948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. else
  1954. {
  1955. xFlg[i] = false;
  1956. maid.AudioMan.Clear();
  1957. }
  1958. idoFlg[i] = true;
  1959. if (i >= 7)
  1960. {
  1961. idoFlg[i - 7] = true;
  1962. }
  1963. }
  1964. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1965. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1966. {
  1967. if (!zFlg[i])
  1968. {
  1969. zFlg[i] = true;
  1970. xFlg[i] = false;
  1971. string text = "";
  1972. if (maid.status.personal.uniqueName == "Pride")
  1973. {
  1974. text = "s0_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(tunArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Cool")
  1981. {
  1982. text = "s1_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(coolArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Pure")
  1989. {
  1990. text = "s2_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(pureArray.Length);
  1993. object obj = text;
  1994. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1995. }
  1996. if (maid.status.personal.uniqueName == "Yandere")
  1997. {
  1998. text = "s3_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(yanArray.Length);
  2001. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Muku")
  2004. {
  2005. text = "h0_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h0tArray.Length);
  2008. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Majime")
  2011. {
  2012. text = "h1_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h1tArray.Length);
  2015. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2016. }
  2017. if (maid.status.personal.uniqueName == "Rindere")
  2018. {
  2019. text = "h2_";
  2020. Random random = new Random();
  2021. int num4 = random.Next(h2tArray.Length);
  2022. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2023. }
  2024. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2025. }
  2026. else
  2027. {
  2028. zFlg[i] = false;
  2029. maid.AudioMan.Clear();
  2030. }
  2031. idoFlg[i] = true;
  2032. if (i >= 7)
  2033. {
  2034. idoFlg[i - 7] = true;
  2035. }
  2036. }
  2037. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2038. {
  2039. string text = "";
  2040. if (maid.status.personal.uniqueName == "Pride")
  2041. {
  2042. text = "s0_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(tunArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Cool")
  2049. {
  2050. text = "s1_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(coolArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Pure")
  2057. {
  2058. text = "s2_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(pureArray.Length);
  2061. object obj = text;
  2062. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2063. }
  2064. if (maid.status.personal.uniqueName == "Yandere")
  2065. {
  2066. text = "s3_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(yanArray.Length);
  2069. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Muku")
  2072. {
  2073. text = "h0_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h0tArray.Length);
  2076. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Majime")
  2079. {
  2080. text = "h1_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h1tArray.Length);
  2083. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2084. }
  2085. if (maid.status.personal.uniqueName == "Rindere")
  2086. {
  2087. text = "h2_";
  2088. Random random = new Random();
  2089. int num4 = random.Next(h2tArray.Length);
  2090. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2091. }
  2092. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2093. idoFlg[i] = true;
  2094. if (i >= 7)
  2095. {
  2096. idoFlg[i - 7] = true;
  2097. }
  2098. }
  2099. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2100. {
  2101. if (maid.status.personal.uniqueName == "Pride")
  2102. {
  2103. string text = "s0_";
  2104. Random random = new Random();
  2105. int num4 = random.Next(10000);
  2106. bool flag7 = false;
  2107. for (int k = 0; k < tunArray.Length; k++)
  2108. {
  2109. if (tunArray[k] == num4)
  2110. {
  2111. flag7 = true;
  2112. break;
  2113. }
  2114. }
  2115. if (!flag7)
  2116. {
  2117. text = text + "0" + num4.ToString() + ".ogg";
  2118. if (GameUty.FileSystem.IsExistentFile(text))
  2119. {
  2120. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2121. }
  2122. }
  2123. }
  2124. if (maid.status.personal.uniqueName == "Cool")
  2125. {
  2126. string text = "s1_";
  2127. Random random = new Random();
  2128. int num4 = random.Next(10000);
  2129. bool flag7 = false;
  2130. for (int k = 0; k < coolArray.Length; k++)
  2131. {
  2132. if (coolArray[k] == num4)
  2133. {
  2134. flag7 = true;
  2135. break;
  2136. }
  2137. }
  2138. if (!flag7)
  2139. {
  2140. text = text + "0" + num4.ToString() + ".ogg";
  2141. if (GameUty.FileSystem.IsExistentFile(text))
  2142. {
  2143. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2144. }
  2145. }
  2146. }
  2147. if (maid.status.personal.uniqueName == "Pure")
  2148. {
  2149. string text = "s2_";
  2150. Random random = new Random();
  2151. int num4 = random.Next(10000);
  2152. bool flag7 = false;
  2153. for (int k = 0; k < pureArray.Length; k++)
  2154. {
  2155. if (pureArray[k] == num4)
  2156. {
  2157. flag7 = true;
  2158. break;
  2159. }
  2160. }
  2161. if (!flag7)
  2162. {
  2163. text = text + "0" + num4.ToString() + ".ogg";
  2164. if (GameUty.FileSystem.IsExistentFile(text))
  2165. {
  2166. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2167. }
  2168. }
  2169. }
  2170. if (maid.status.personal.uniqueName == "Yandere")
  2171. {
  2172. string text = "s3_";
  2173. Random random = new Random();
  2174. int num4 = random.Next(10000);
  2175. bool flag7 = false;
  2176. for (int k = 0; k < yanArray.Length; k++)
  2177. {
  2178. if (yanArray[k] == num4)
  2179. {
  2180. flag7 = true;
  2181. break;
  2182. }
  2183. }
  2184. if (!flag7)
  2185. {
  2186. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2187. if (GameUty.FileSystem.IsExistentFile(text))
  2188. {
  2189. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2190. }
  2191. }
  2192. }
  2193. if (maid.status.personal.uniqueName == "Muku")
  2194. {
  2195. string text = "h0_";
  2196. Random random = new Random();
  2197. int num4 = random.Next(10000);
  2198. bool flag7 = false;
  2199. for (int k = 0; k < h0Array.Length; k++)
  2200. {
  2201. if (h0Array[k] == num4)
  2202. {
  2203. flag7 = true;
  2204. break;
  2205. }
  2206. }
  2207. if (flag7)
  2208. {
  2209. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2210. if (GameUty.FileSystem.IsExistentFile(text))
  2211. {
  2212. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2213. }
  2214. }
  2215. }
  2216. if (maid.status.personal.uniqueName == "Majime")
  2217. {
  2218. string text = "h1_";
  2219. Random random = new Random();
  2220. int num4 = random.Next(10000);
  2221. bool flag7 = false;
  2222. for (int k = 0; k < h1Array.Length; k++)
  2223. {
  2224. if (h1Array[k] == num4)
  2225. {
  2226. flag7 = true;
  2227. break;
  2228. }
  2229. }
  2230. if (flag7)
  2231. {
  2232. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2233. if (GameUty.FileSystem.IsExistentFile(text))
  2234. {
  2235. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2236. }
  2237. }
  2238. }
  2239. if (maid.status.personal.uniqueName == "Rindere")
  2240. {
  2241. string text = "h2_";
  2242. Random random = new Random();
  2243. int num4 = random.Next(10000);
  2244. bool flag7 = false;
  2245. for (int k = 0; k < h2Array.Length; k++)
  2246. {
  2247. if (h2Array[k] == num4)
  2248. {
  2249. flag7 = true;
  2250. break;
  2251. }
  2252. }
  2253. if (flag7)
  2254. {
  2255. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2256. if (GameUty.FileSystem.IsExistentFile(text))
  2257. {
  2258. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2259. }
  2260. }
  2261. }
  2262. idoFlg[i] = true;
  2263. if (i >= 7)
  2264. {
  2265. idoFlg[i - 7] = true;
  2266. }
  2267. }
  2268. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2269. {
  2270. delCount[i] = 20;
  2271. if (goSlot[(int)selectList[i]] != null)
  2272. {
  2273. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2274. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2275. {
  2276. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2277. }
  2278. }
  2279. itemIndex[i]++;
  2280. if (itemIndex[i] == itemArray.Length - 1)
  2281. {
  2282. itemIndex[i] = 0;
  2283. }
  2284. string[] array = new string[2];
  2285. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2286. if (itemIndex[i] > 13)
  2287. {
  2288. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2289. }
  2290. maid.DelProp(MPN.handitem, true);
  2291. maid.DelProp(MPN.accvag, true);
  2292. maid.DelProp(MPN.accanl, true);
  2293. bool flag8 = false;
  2294. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2295. {
  2296. flag8 = true;
  2297. }
  2298. if (!flag8)
  2299. {
  2300. maid.DelProp(MPN.kousoku_upper, true);
  2301. maid.DelProp(MPN.kousoku_lower, true);
  2302. }
  2303. if (array[0] != "")
  2304. {
  2305. maid.SetProp(array[0], array[1], 0, true, false);
  2306. }
  2307. if (itemIndex[i] == 13)
  2308. {
  2309. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2310. maid.SetProp(array[0], array[1], 0, true, false);
  2311. }
  2312. if (itemIndex[i] == 23)
  2313. {
  2314. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2315. maid.SetProp(array[0], array[1], 0, true, false);
  2316. cafeFlg[i] = true;
  2317. }
  2318. maid.AllProcPropSeqStart();
  2319. idoFlg[i] = true;
  2320. if (i >= 7)
  2321. {
  2322. idoFlg[i - 7] = true;
  2323. }
  2324. mFlg = true;
  2325. }
  2326. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2327. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2328. {
  2329. for (int k = 0; k < 10; k++)
  2330. {
  2331. maid.transform.RotateAround(maid.transform.position,
  2332. Vector3.right,
  2333. -maid.transform.rotation.eulerAngles.x);
  2334. maid.transform.RotateAround(maid.transform.position,
  2335. Vector3.forward,
  2336. -maid.transform.rotation.eulerAngles.z);
  2337. }
  2338. idoFlg[i] = true;
  2339. atFlg = true;
  2340. if (i >= 7)
  2341. {
  2342. idoFlg[i - 7] = true;
  2343. }
  2344. }
  2345. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2346. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2347. {
  2348. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2349. idoFlg[i] = true;
  2350. if (i >= 7)
  2351. {
  2352. idoFlg[i - 7] = true;
  2353. }
  2354. }
  2355. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2356. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2357. {
  2358. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2359. idoFlg[i] = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2366. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2367. {
  2368. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2369. idoFlg[i] = true;
  2370. if (i >= 7)
  2371. {
  2372. idoFlg[i - 7] = true;
  2373. }
  2374. }
  2375. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2376. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2377. {
  2378. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2379. idoFlg[i] = true;
  2380. if (i >= 7)
  2381. {
  2382. idoFlg[i - 7] = true;
  2383. }
  2384. }
  2385. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2386. {
  2387. Vector3 vector = maid.transform.position;
  2388. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2389. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2390. maid.SetPos(vector);
  2391. idoFlg[i] = true;
  2392. if (i >= 7)
  2393. {
  2394. idoFlg[i - 7] = true;
  2395. }
  2396. }
  2397. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2398. {
  2399. Vector3 vector = maid.transform.position;
  2400. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2401. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2402. maid.SetPos(vector);
  2403. idoFlg[i] = true;
  2404. if (i >= 7)
  2405. {
  2406. idoFlg[i - 7] = true;
  2407. }
  2408. }
  2409. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2410. {
  2411. Vector3 vector = maid.transform.position;
  2412. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2413. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2414. maid.SetPos(vector);
  2415. idoFlg[i] = true;
  2416. if (i >= 7)
  2417. {
  2418. idoFlg[i - 7] = true;
  2419. }
  2420. }
  2421. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2422. {
  2423. Vector3 vector = maid.transform.position;
  2424. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2425. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2426. maid.SetPos(vector);
  2427. idoFlg[i] = true;
  2428. if (i >= 7)
  2429. {
  2430. idoFlg[i - 7] = true;
  2431. }
  2432. }
  2433. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2434. {
  2435. Vector3 vector = maid.transform.position;
  2436. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2437. maid.SetPos(vector);
  2438. idoFlg[i] = true;
  2439. if (i >= 7)
  2440. {
  2441. idoFlg[i - 7] = true;
  2442. }
  2443. }
  2444. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2445. {
  2446. Vector3 vector = maid.transform.position;
  2447. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2448. maid.SetPos(vector);
  2449. idoFlg[i] = true;
  2450. if (i >= 7)
  2451. {
  2452. idoFlg[i - 7] = true;
  2453. }
  2454. }
  2455. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2456. {
  2457. Vector3 vector = maid.transform.position;
  2458. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2459. maid.SetPos(vector);
  2460. idoFlg[i] = true;
  2461. if (i >= 7)
  2462. {
  2463. idoFlg[i - 7] = true;
  2464. }
  2465. }
  2466. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2467. {
  2468. Vector3 vector = maid.transform.position;
  2469. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2470. maid.SetPos(vector);
  2471. idoFlg[i] = true;
  2472. if (i >= 7)
  2473. {
  2474. idoFlg[i - 7] = true;
  2475. }
  2476. }
  2477. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2478. {
  2479. Vector3 vector = maid.transform.position;
  2480. vector.y += 0.0075f * speed;
  2481. maid.SetPos(vector);
  2482. idoFlg[i] = true;
  2483. if (i >= 7)
  2484. {
  2485. idoFlg[i - 7] = true;
  2486. }
  2487. }
  2488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2489. {
  2490. Vector3 vector = maid.transform.position;
  2491. vector.y -= 0.0075f * speed;
  2492. maid.SetPos(vector);
  2493. idoFlg[i] = true;
  2494. if (i >= 7)
  2495. {
  2496. idoFlg[i - 7] = true;
  2497. }
  2498. }
  2499. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2500. && getModKeyPressing(modKey.Shift))
  2501. {
  2502. faceIndex[i]--;
  2503. if (faceIndex[i] <= -1)
  2504. {
  2505. faceIndex[i] = faceArray.Length - 1;
  2506. }
  2507. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2508. idoFlg[i] = true;
  2509. if (i >= 7)
  2510. {
  2511. idoFlg[i - 7] = true;
  2512. }
  2513. }
  2514. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2515. {
  2516. faceIndex[i]++;
  2517. if (faceIndex[i] == faceArray.Length)
  2518. {
  2519. faceIndex[i] = 0;
  2520. }
  2521. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2522. idoFlg[i] = true;
  2523. if (i >= 7)
  2524. {
  2525. idoFlg[i - 7] = true;
  2526. }
  2527. }
  2528. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2529. {
  2530. faceBlendIndex[i]++;
  2531. if (faceBlendIndex[i] == faceBlendArray.Length)
  2532. {
  2533. faceBlendIndex[i] = 0;
  2534. }
  2535. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2536. idoFlg[i] = true;
  2537. if (i >= 7)
  2538. {
  2539. idoFlg[i - 7] = true;
  2540. }
  2541. }
  2542. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2543. {
  2544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2545. isStop[i] = false;
  2546. poseCount[i] = 20;
  2547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2548. {
  2549. maid.body0.MuneYureL(0f);
  2550. maid.body0.MuneYureR(0f);
  2551. }
  2552. else
  2553. {
  2554. maid.body0.MuneYureL(1f);
  2555. maid.body0.MuneYureR(1f);
  2556. maid.body0.jbMuneL.enabled = true;
  2557. maid.body0.jbMuneR.enabled = true;
  2558. }
  2559. if (array[0].Contains("MultipleMaidsPose"))
  2560. {
  2561. string path = array[0].Split(new char[] { '/' })[1];
  2562. byte[] array2 = new byte[0];
  2563. try
  2564. {
  2565. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2566. {
  2567. array2 = new byte[fileStream.Length];
  2568. fileStream.Read(array2, 0, array2.Length);
  2569. }
  2570. }
  2571. catch { }
  2572. if (0 < array2.Length)
  2573. {
  2574. string text = Path.GetFileName(path);
  2575. long num5 = text.GetHashCode();
  2576. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2577. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2578. {
  2579. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2580. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2581. };
  2582. for (int m = 0; m < array3.Length; m++)
  2583. {
  2584. maid.SetAutoTwist(array3[m], true);
  2585. }
  2586. }
  2587. }
  2588. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2589. {
  2590. loadPose[i] = array[0];
  2591. }
  2592. else if (!array[0].StartsWith("dance_"))
  2593. {
  2594. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2595. }
  2596. else
  2597. {
  2598. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2599. {
  2600. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2601. GameUty.FileSystem,
  2602. array[0] + ".anm",
  2603. false,
  2604. false);
  2605. }
  2606. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2607. }
  2608. if (array.Length > 1)
  2609. {
  2610. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2611. isStop[i] = true;
  2612. if (array.Length > 2)
  2613. {
  2614. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2615. isPoseIti[i] = true;
  2616. poseIti[i] = maidArray[i].transform.position;
  2617. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2618. }
  2619. }
  2620. isLock[i] = false;
  2621. idoFlg[i] = true;
  2622. mHandL[i].initFlg = false;
  2623. mHandR[i].initFlg = false;
  2624. mFootL[i].initFlg = false;
  2625. mFootR[i].initFlg = false;
  2626. pHandL[i] = 0;
  2627. pHandR[i] = 0;
  2628. muneIKL[i] = false;
  2629. muneIKR[i] = false;
  2630. if (!isVR)
  2631. {
  2632. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2633. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2634. }
  2635. if (i >= 7)
  2636. {
  2637. idoFlg[i - 7] = true;
  2638. }
  2639. }
  2640. else if (maid.body0.isLoadedBody)
  2641. {
  2642. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2643. {
  2644. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2645. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2646. }
  2647. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2648. {
  2649. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2650. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2651. }
  2652. if (!HandL1[i])
  2653. {
  2654. SetIKInit(i);
  2655. SetIK(maid, i);
  2656. ikBui = 5;
  2657. }
  2658. else
  2659. {
  2660. bool flag5 = false;
  2661. for (int k = 0; k < keyArray.Length; k++)
  2662. {
  2663. if (Input.GetKey(keyArray[k]))
  2664. {
  2665. flag5 = true;
  2666. break;
  2667. }
  2668. }
  2669. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2670. || Input.GetKey(KeyCode.Y))
  2671. {
  2672. flag5 = true;
  2673. }
  2674. if (!flag5)
  2675. {
  2676. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2677. && getModKeyPressing(modKey.Shift))
  2678. {
  2679. ikMode[i] = 15;
  2680. }
  2681. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2682. {
  2683. ikMode[i] = 5;
  2684. }
  2685. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2686. {
  2687. ikMode[i] = 6;
  2688. }
  2689. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2690. {
  2691. ikMode[i] = 7;
  2692. }
  2693. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 11;
  2696. }
  2697. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2698. {
  2699. ikMode[i] = 12;
  2700. }
  2701. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2702. {
  2703. ikMode[i] = 14;
  2704. }
  2705. else if (getModKeyPressing(modKey.Shift))
  2706. {
  2707. ikMode[i] = 1;
  2708. }
  2709. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 8;
  2712. }
  2713. else if (getModKeyPressing(modKey.Ctrl))
  2714. {
  2715. ikMode[i] = 2;
  2716. }
  2717. else if (getModKeyPressing(modKey.Alt))
  2718. {
  2719. ikMode[i] = 3;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Space))
  2722. {
  2723. ikMode[i] = 4;
  2724. }
  2725. else if (Input.GetKey(KeyCode.X))
  2726. {
  2727. ikMode[i] = 9;
  2728. }
  2729. else if (Input.GetKey(KeyCode.Z))
  2730. {
  2731. ikMode[i] = 10;
  2732. }
  2733. else if (Input.GetKey(KeyCode.C))
  2734. {
  2735. ikMode[i] = 13;
  2736. }
  2737. else if (Input.GetKey(KeyCode.A))
  2738. {
  2739. ikMode[i] = 16;
  2740. }
  2741. else
  2742. {
  2743. ikMode[i] = 0;
  2744. }
  2745. if (!isIK[i])
  2746. {
  2747. if (ikMode[i] < 9)
  2748. {
  2749. ikMode[i] = 0;
  2750. }
  2751. }
  2752. bool flag9 = false;
  2753. bool flag10 = false;
  2754. bool flag11 = false;
  2755. bool flag12 = false;
  2756. if (gFinger[i, 0])
  2757. {
  2758. for (int j = 0; j < 15; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag9 = true;
  2763. }
  2764. }
  2765. for (int j = 15; j < 30; j++)
  2766. {
  2767. if (mFinger[i, j].isStop)
  2768. {
  2769. flag10 = true;
  2770. }
  2771. }
  2772. for (int j = 0; j < 6; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag11 = true;
  2777. }
  2778. }
  2779. for (int j = 6; j < 12; j++)
  2780. {
  2781. if (mFinger2[i, j].isStop)
  2782. {
  2783. flag12 = true;
  2784. }
  2785. }
  2786. }
  2787. if (gMaid[i] != null)
  2788. {
  2789. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2790. {
  2791. gMaid[i].SetActive(true);
  2792. if (isCube)
  2793. {
  2794. gMaidC[i].SetActive(true);
  2795. }
  2796. }
  2797. else
  2798. {
  2799. gMaid[i].SetActive(false);
  2800. gMaidC[i].SetActive(false);
  2801. }
  2802. }
  2803. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2804. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2805. {
  2806. ikBui = 1;
  2807. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2808. {
  2809. ikMaid = i;
  2810. }
  2811. if (ikMaid == i)
  2812. {
  2813. SetIK(maid, i);
  2814. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2815. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2816. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2817. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2818. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2819. }
  2820. if (Input.GetKeyDown(KeyCode.Q))
  2821. {
  2822. qFlg = true;
  2823. }
  2824. }
  2825. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2826. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2827. {
  2828. ikBui = 2;
  2829. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2830. {
  2831. ikMaid = i;
  2832. }
  2833. if (ikMaid == i)
  2834. {
  2835. SetIK(maid, i);
  2836. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2837. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2838. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2839. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2840. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2841. }
  2842. if (Input.GetKeyDown(KeyCode.W))
  2843. {
  2844. wFlg = true;
  2845. }
  2846. }
  2847. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2848. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2849. {
  2850. ikBui = 3;
  2851. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2852. {
  2853. ikMaid = i;
  2854. }
  2855. if (ikMaid == i)
  2856. {
  2857. SetIK(maid, i);
  2858. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2859. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2860. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2861. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2862. }
  2863. }
  2864. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2865. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2866. {
  2867. ikBui = 4;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. if (Input.GetKeyDown(KeyCode.S))
  2881. {
  2882. sFlg = true;
  2883. }
  2884. }
  2885. mHandR[i].isSelect = false;
  2886. mArmR[i].isSelect = false;
  2887. mHandL[i].isSelect = false;
  2888. mArmL[i].isSelect = false;
  2889. mFootR[i].isSelect = false;
  2890. mHizaR[i].isSelect = false;
  2891. mFootL[i].isSelect = false;
  2892. mHizaL[i].isSelect = false;
  2893. mClavicleL[i].isSelect = false;
  2894. mClavicleR[i].isSelect = false;
  2895. if (ikMode[i] == 16)
  2896. {
  2897. if (!gHead2[i])
  2898. {
  2899. SetIKInit6(i);
  2900. }
  2901. if (mHead2[i].isClick)
  2902. {
  2903. mHead2[i].isClick = false;
  2904. bGui = true;
  2905. isFaceInit = true;
  2906. // isGuiInit = true;
  2907. faceFlg = true;
  2908. poseFlg = false;
  2909. sceneFlg = false;
  2910. kankyoFlg = false;
  2911. kankyo2Flg = false;
  2912. maid.boMabataki = false;
  2913. selectMaidIndex = mHead2[i].no;
  2914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2915. }
  2916. if (mMaid2[i].isClick)
  2917. {
  2918. mMaid2[i].isClick = false;
  2919. bGui = true;
  2920. isPoseInit = true;
  2921. // isGuiInit = true;
  2922. poseFlg = true;
  2923. faceFlg = false;
  2924. sceneFlg = false;
  2925. kankyoFlg = false;
  2926. kankyo2Flg = false;
  2927. selectMaidIndex = mMaid2[i].no;
  2928. copyIndex = 0;
  2929. }
  2930. gHead2[i].transform.position =
  2931. new Vector3(Head2[i].position.x,
  2932. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2933. Head2[i].position.z);
  2934. gHead2[i].transform.eulerAngles =
  2935. new Vector3(Head2[i].transform.eulerAngles.x,
  2936. Head2[i].transform.eulerAngles.y,
  2937. Head2[i].transform.eulerAngles.z + 90f);
  2938. mHead2[i].no = i;
  2939. mHead2[i].maid = maid;
  2940. mHead2[i].ido = 1;
  2941. gMaid2[i].transform.position =
  2942. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2943. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2944. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2945. gMaid2[i].transform.eulerAngles =
  2946. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2947. Spine0a2[i].transform.eulerAngles.y,
  2948. Spine0a2[i].transform.eulerAngles.z + 90f);
  2949. mMaid2[i].no = i;
  2950. mMaid2[i].maid = maid;
  2951. mMaid2[i].ido = 2;
  2952. gArmL[i].SetActive(false);
  2953. gFootL[i].SetActive(false);
  2954. gHizaL[i].SetActive(false);
  2955. gHandR[i].SetActive(false);
  2956. gArmR[i].SetActive(false);
  2957. gFootR[i].SetActive(false);
  2958. gHizaR[i].SetActive(false);
  2959. gClavicleL[i].SetActive(false);
  2960. gClavicleR[i].SetActive(false);
  2961. gNeck[i].SetActive(false);
  2962. gSpine[i].SetActive(false);
  2963. gSpine0a[i].SetActive(false);
  2964. gSpine1a[i].SetActive(false);
  2965. gSpine1[i].SetActive(false);
  2966. gPelvis[i].SetActive(false);
  2967. }
  2968. else if (ikMode[i] == 8)
  2969. {
  2970. if (ikModeOld[i] == 15 && gIKHandL[i])
  2971. {
  2972. mIKHandL[i].ido = 1;
  2973. mIKHandL[i].reset = true;
  2974. mIKHandR[i].ido = 1;
  2975. mIKHandR[i].reset = true;
  2976. }
  2977. else if (ikModeOld[i] == 3 && gHead[i])
  2978. {
  2979. mHead[i].ido = 7;
  2980. mHead[i].reset = true;
  2981. }
  2982. else
  2983. {
  2984. if (!gIKHandL[i])
  2985. {
  2986. SetIKInit5(i);
  2987. }
  2988. gIKHandL[i].transform.position = IKHandL[i].position;
  2989. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2990. mIKHandL[i].maid = maid;
  2991. mIKHandL[i].HandL = IKHandL[i];
  2992. mIKHandL[i].ido = 1;
  2993. gIKHandR[i].transform.position = IKHandR[i].position;
  2994. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2995. mIKHandR[i].maid = maid;
  2996. mIKHandR[i].HandL = IKHandR[i];
  2997. mIKHandR[i].ido = 1;
  2998. if (!gIKMuneL[i])
  2999. {
  3000. SetIKInit7(i);
  3001. }
  3002. if (!gHead[i])
  3003. {
  3004. SetIKInit4(i);
  3005. }
  3006. mIKMuneL[i].maid = maid;
  3007. mIKMuneL[i].HandL = IKMuneLSub[i];
  3008. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3009. mIKMuneL[i].ForearmL = IKMuneL[i];
  3010. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3011. mIKMuneR[i].maid = maid;
  3012. mIKMuneR[i].HandL = IKMuneRSub[i];
  3013. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3014. mIKMuneR[i].ForearmL = IKMuneR[i];
  3015. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3016. gHead[i].transform.position =
  3017. new Vector3(Head2[i].position.x,
  3018. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3019. Head2[i].position.z);
  3020. gHead[i].transform.eulerAngles =
  3021. new Vector3(Head2[i].transform.eulerAngles.x,
  3022. Head2[i].transform.eulerAngles.y,
  3023. Head2[i].transform.eulerAngles.z + 90f);
  3024. mHead[i].head = Head1[i];
  3025. mHead[i].maid = maid;
  3026. mHead[i].ido = 7;
  3027. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3028. gHead[i].SetActive(true);
  3029. if (mHead[i].isClick)
  3030. {
  3031. mHead[i].isClick = false;
  3032. mHead[i].isClick2 = false;
  3033. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3034. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3035. }
  3036. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3037. {
  3038. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3039. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3040. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3041. IKMuneLSub[i].localEulerAngles.y,
  3042. IKMuneLSub[i].localEulerAngles.z);
  3043. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3044. IKMuneL[i].localEulerAngles.y,
  3045. IKMuneL[i].localEulerAngles.z);
  3046. muneIKL[i] = true;
  3047. isStop[i] = true;
  3048. isLock[i] = true;
  3049. mIKMuneL[i].isMouseDrag = false;
  3050. }
  3051. if (mIKMuneL[i].isMouseDown)
  3052. {
  3053. maid.body0.MuneYureL(0f);
  3054. maid.body0.MuneYureR(0f);
  3055. maid.body0.jbMuneL.enabled = false;
  3056. maid.body0.jbMuneR.enabled = false;
  3057. muneIKL[i] = false;
  3058. mIKMuneL[i].isMouseUp = false;
  3059. }
  3060. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3061. {
  3062. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3063. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3064. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3065. IKMuneRSub[i].localEulerAngles.y,
  3066. IKMuneRSub[i].localEulerAngles.z);
  3067. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3068. IKMuneR[i].localEulerAngles.y,
  3069. IKMuneR[i].localEulerAngles.z);
  3070. muneIKR[i] = true;
  3071. isStop[i] = true;
  3072. isLock[i] = true;
  3073. mIKMuneR[i].isMouseDrag = false;
  3074. }
  3075. if (mIKMuneR[i].isMouseDown)
  3076. {
  3077. maid.body0.MuneYureL(0f);
  3078. maid.body0.MuneYureR(0f);
  3079. maid.body0.jbMuneL.enabled = false;
  3080. maid.body0.jbMuneR.enabled = false;
  3081. muneIKR[i] = false;
  3082. mIKMuneL[i].isMouseUp = false;
  3083. }
  3084. if (mHead[i].isStop)
  3085. {
  3086. isStop[i] = true;
  3087. isLock[i] = true;
  3088. mHead[i].isStop = false;
  3089. }
  3090. gJotai[i].SetActive(false);
  3091. gKahuku[i].SetActive(false);
  3092. gHandL[i].SetActive(false);
  3093. gArmL[i].SetActive(false);
  3094. gFootL[i].SetActive(false);
  3095. gHizaL[i].SetActive(false);
  3096. gHandR[i].SetActive(false);
  3097. gArmR[i].SetActive(false);
  3098. gFootR[i].SetActive(false);
  3099. gHizaR[i].SetActive(false);
  3100. gClavicleL[i].SetActive(false);
  3101. gClavicleR[i].SetActive(false);
  3102. gNeck[i].SetActive(false);
  3103. gSpine[i].SetActive(false);
  3104. gSpine0a[i].SetActive(false);
  3105. gSpine1a[i].SetActive(false);
  3106. gSpine1[i].SetActive(false);
  3107. gPelvis[i].SetActive(false);
  3108. }
  3109. }
  3110. else if (ikMode[i] == 15)
  3111. {
  3112. if (ikModeOld[i] == 8 && gIKHandL[i])
  3113. {
  3114. mIKHandL[i].ido = 2;
  3115. mIKHandL[i].reset = true;
  3116. mIKHandR[i].ido = 2;
  3117. mIKHandR[i].reset = true;
  3118. }
  3119. else
  3120. {
  3121. if (!gIKHandL[i])
  3122. {
  3123. SetIKInit5(i);
  3124. }
  3125. gIKHandL[i].transform.position = IKHandL[i].position;
  3126. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3127. mIKHandL[i].maid = maid;
  3128. mIKHandL[i].HandL = IKHandL[i];
  3129. mIKHandL[i].ido = 2;
  3130. gIKHandR[i].transform.position = IKHandR[i].position;
  3131. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3132. mIKHandR[i].maid = maid;
  3133. mIKHandR[i].HandL = IKHandR[i];
  3134. mIKHandR[i].ido = 2;
  3135. Destroy(gHead[i]);
  3136. Destroy(gJotai[i]);
  3137. Destroy(gKahuku[i]);
  3138. gHandL[i].SetActive(false);
  3139. gArmL[i].SetActive(false);
  3140. gFootL[i].SetActive(false);
  3141. gHizaL[i].SetActive(false);
  3142. gHandR[i].SetActive(false);
  3143. gArmR[i].SetActive(false);
  3144. gFootR[i].SetActive(false);
  3145. gHizaR[i].SetActive(false);
  3146. gClavicleL[i].SetActive(false);
  3147. gClavicleR[i].SetActive(false);
  3148. gNeck[i].SetActive(false);
  3149. gSpine[i].SetActive(false);
  3150. gSpine0a[i].SetActive(false);
  3151. gSpine1a[i].SetActive(false);
  3152. gSpine1[i].SetActive(false);
  3153. gPelvis[i].SetActive(false);
  3154. }
  3155. }
  3156. else if (ikMode[i] == 1)
  3157. {
  3158. mHandL[i].ido = 10;
  3159. mHandR[i].ido = 10;
  3160. mFootL[i].ido = 10;
  3161. mFootR[i].ido = 10;
  3162. if (ikModeOld[i] == 0 && gNeck[i])
  3163. {
  3164. if (isBone[i])
  3165. {
  3166. mNeck[i].ido = 4;
  3167. mNeck[i].reset = true;
  3168. mSpine[i].ido = 4;
  3169. mSpine[i].reset = true;
  3170. mSpine0a[i].ido = 4;
  3171. mSpine0a[i].reset = true;
  3172. mSpine1a[i].ido = 4;
  3173. mSpine1a[i].reset = true;
  3174. mSpine1[i].ido = 4;
  3175. mSpine1[i].reset = true;
  3176. mPelvis[i].ido = 4;
  3177. mPelvis[i].reset = true;
  3178. mHizaL[i].ido = 5;
  3179. mHizaL[i].reset = true;
  3180. mHizaR[i].ido = 5;
  3181. mHizaR[i].reset = true;
  3182. }
  3183. }
  3184. else
  3185. {
  3186. gArmL[i].SetActive(false);
  3187. gArmR[i].SetActive(false);
  3188. if (!isBone[i])
  3189. {
  3190. gHizaL[i].SetActive(false);
  3191. gHizaR[i].SetActive(false);
  3192. }
  3193. gClavicleL[i].SetActive(false);
  3194. gClavicleR[i].SetActive(false);
  3195. if (isBone[i])
  3196. {
  3197. mNeck[i].maid = maid;
  3198. mNeck[i].head = Neck[i];
  3199. mNeck[i].no = i;
  3200. mNeck[i].ido = 4;
  3201. gNeck[i].transform.position = Neck[i].position;
  3202. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3203. if (mNeck[i].isHead)
  3204. {
  3205. mNeck[i].isHead = false;
  3206. isLookn[i] = isLook[i];
  3207. isLook[i] = !isLook[i];
  3208. }
  3209. mSpine[i].maid = maid;
  3210. mSpine[i].head = Spine2[i];
  3211. mSpine[i].no = i;
  3212. mSpine[i].ido = 4;
  3213. gSpine[i].transform.position = Spine2[i].position;
  3214. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3215. mSpine0a[i].maid = maid;
  3216. mSpine0a[i].head = Spine0a2[i];
  3217. mSpine0a[i].no = i;
  3218. mSpine0a[i].ido = 4;
  3219. gSpine0a[i].transform.position = Spine0a2[i].position;
  3220. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3221. mSpine1a[i].maid = maid;
  3222. mSpine1a[i].head = Spine1a2[i];
  3223. mSpine1a[i].no = i;
  3224. mSpine1a[i].ido = 4;
  3225. gSpine1a[i].transform.position = Spine1a2[i].position;
  3226. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3227. mSpine1[i].maid = maid;
  3228. mSpine1[i].head = Spine12[i];
  3229. mSpine1[i].no = i;
  3230. mSpine1[i].ido = 4;
  3231. gSpine1[i].transform.position = Spine12[i].position;
  3232. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3233. mPelvis[i].maid = maid;
  3234. mPelvis[i].head = Pelvis2[i];
  3235. mPelvis[i].no = i;
  3236. mPelvis[i].ido = 8;
  3237. gPelvis[i].transform.position = Pelvis2[i].position;
  3238. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3239. mHizaL[i].ido = 5;
  3240. mHizaR[i].ido = 5;
  3241. }
  3242. }
  3243. }
  3244. else if (ikMode[i] == 2)
  3245. {
  3246. if (ikModeOld[i] == 0 && gPelvis[i])
  3247. {
  3248. mPelvis[i].ido = 9;
  3249. mPelvis[i].reset = true;
  3250. }
  3251. else
  3252. {
  3253. gArmL[i].SetActive(false);
  3254. gHizaL[i].SetActive(false);
  3255. gArmR[i].SetActive(false);
  3256. gHizaR[i].SetActive(false);
  3257. gClavicleL[i].SetActive(false);
  3258. gClavicleR[i].SetActive(false);
  3259. gNeck[i].SetActive(false);
  3260. gSpine[i].SetActive(false);
  3261. gSpine0a[i].SetActive(false);
  3262. gSpine1a[i].SetActive(false);
  3263. gSpine1[i].SetActive(false);
  3264. mPelvis[i].maid = maid;
  3265. mPelvis[i].head = Pelvis2[i];
  3266. mPelvis[i].no = i;
  3267. mPelvis[i].ido = 9;
  3268. gPelvis[i].transform.position = Pelvis2[i].position;
  3269. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3270. }
  3271. }
  3272. else if (ikMode[i] == 3)
  3273. {
  3274. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3275. {
  3276. mHead[i].ido = 1;
  3277. mHead[i].reset = true;
  3278. mJotai[i].ido = 2;
  3279. mJotai[i].reset = true;
  3280. mKahuku[i].ido = 3;
  3281. mKahuku[i].reset = true;
  3282. mHandL[i].ido = 1;
  3283. mHandR[i].ido = 1;
  3284. mFootL[i].ido = 3;
  3285. mFootR[i].ido = 3;
  3286. mHizaL[i].ido = 5;
  3287. mHizaR[i].ido = 5;
  3288. mHandL[i].reset = true;
  3289. mHandR[i].reset = true;
  3290. mFootL[i].reset = true;
  3291. mFootR[i].reset = true;
  3292. mHizaL[i].reset = true;
  3293. mHizaR[i].reset = true;
  3294. }
  3295. else if (ikModeOld[i] == 0)
  3296. {
  3297. mHandL[i].ido = 1;
  3298. mHandR[i].ido = 1;
  3299. mFootL[i].ido = 3;
  3300. mFootR[i].ido = 3;
  3301. mHizaL[i].ido = 5;
  3302. mHizaR[i].ido = 5;
  3303. mHandL[i].reset = true;
  3304. mHandR[i].reset = true;
  3305. mFootL[i].reset = true;
  3306. mFootR[i].reset = true;
  3307. mHizaL[i].reset = true;
  3308. mHizaR[i].reset = true;
  3309. }
  3310. else
  3311. {
  3312. if (!gHead[i])
  3313. {
  3314. SetIKInit4(i);
  3315. }
  3316. if (mHead[i].isHead)
  3317. {
  3318. mHead[i].isHead = false;
  3319. isLookn[i] = isLook[i];
  3320. isLook[i] = !isLook[i];
  3321. }
  3322. gHead[i].transform.position =
  3323. new Vector3(Head2[i].position.x,
  3324. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3325. Head2[i].position.z);
  3326. gHead[i].transform.eulerAngles =
  3327. new Vector3(Head2[i].transform.eulerAngles.x,
  3328. Head2[i].transform.eulerAngles.y,
  3329. Head2[i].transform.eulerAngles.z + 90f);
  3330. mHead[i].head = Head1[i];
  3331. mHead[i].maid = maid;
  3332. mHead[i].no = i;
  3333. mHead[i].ido = 1;
  3334. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3335. Transform transform3 =
  3336. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3337. Transform transform4 =
  3338. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3339. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3340. Transform transform6 =
  3341. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3342. gJotai[i].transform.position =
  3343. new Vector3(transform3.position.x,
  3344. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3345. transform3.position.z);
  3346. gJotai[i].transform.eulerAngles =
  3347. new Vector3(transform3.transform.eulerAngles.x,
  3348. transform3.transform.eulerAngles.y,
  3349. transform3.transform.eulerAngles.z + 90f);
  3350. mJotai[i].Spine0a = spine0a;
  3351. mJotai[i].Spine1 = transform3;
  3352. mJotai[i].Spine1a = transform4;
  3353. mJotai[i].Spine = transform5;
  3354. mJotai[i].maid = maid;
  3355. mJotai[i].ido = 2;
  3356. gKahuku[i].transform.position =
  3357. new Vector3(transform6.position.x,
  3358. (transform6.position.y + transform5.position.y) / 2f,
  3359. transform6.position.z);
  3360. gKahuku[i].transform.eulerAngles =
  3361. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3362. transform6.transform.eulerAngles.y + 90f,
  3363. transform6.transform.eulerAngles.z);
  3364. mKahuku[i].Pelvis = transform6;
  3365. mKahuku[i].maid = maid;
  3366. mKahuku[i].ido = 3;
  3367. mHandL[i].ido = 1;
  3368. mHandR[i].ido = 1;
  3369. mFootL[i].ido = 3;
  3370. mFootR[i].ido = 3;
  3371. mHizaL[i].ido = 5;
  3372. mHizaR[i].ido = 5;
  3373. gJotai[i].SetActive(true);
  3374. gKahuku[i].SetActive(true);
  3375. gHandL[i].SetActive(true);
  3376. gArmL[i].SetActive(false);
  3377. gFootL[i].SetActive(true);
  3378. gHizaL[i].SetActive(true);
  3379. gHandR[i].SetActive(true);
  3380. gArmR[i].SetActive(false);
  3381. gFootR[i].SetActive(true);
  3382. gHizaR[i].SetActive(true);
  3383. Destroy(gIKHandL[i]);
  3384. Destroy(gIKHandR[i]);
  3385. Destroy(gIKMuneL[i]);
  3386. Destroy(gIKMuneR[i]);
  3387. if (isBone[i])
  3388. {
  3389. gHizaL[i].SetActive(false);
  3390. gHizaR[i].SetActive(false);
  3391. gHead[i].SetActive(false);
  3392. gJotai[i].SetActive(false);
  3393. gKahuku[i].SetActive(false);
  3394. }
  3395. else
  3396. {
  3397. gHizaL[i].SetActive(true);
  3398. gHizaR[i].SetActive(true);
  3399. gHead[i].SetActive(true);
  3400. gJotai[i].SetActive(true);
  3401. gKahuku[i].SetActive(true);
  3402. }
  3403. gClavicleL[i].SetActive(false);
  3404. gClavicleR[i].SetActive(false);
  3405. gNeck[i].SetActive(false);
  3406. gSpine[i].SetActive(false);
  3407. gSpine0a[i].SetActive(false);
  3408. gSpine1a[i].SetActive(false);
  3409. gSpine1[i].SetActive(false);
  3410. gPelvis[i].SetActive(false);
  3411. if (mHead[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mHead[i].isStop = false;
  3416. }
  3417. if (mJotai[i].isStop)
  3418. {
  3419. isStop[i] = true;
  3420. isLock[i] = true;
  3421. mJotai[i].isStop = false;
  3422. }
  3423. if (mKahuku[i].isStop)
  3424. {
  3425. isStop[i] = true;
  3426. isLock[i] = true;
  3427. mKahuku[i].isStop = false;
  3428. }
  3429. if (mKahuku[i].isSelect)
  3430. {
  3431. mKahuku[i].isSelect = false;
  3432. if (ikMaid != i)
  3433. {
  3434. ikMaid = i;
  3435. ikBui = 5;
  3436. SetIK(maid, i);
  3437. }
  3438. }
  3439. if (mJotai[i].isSelect)
  3440. {
  3441. mJotai[i].isSelect = false;
  3442. if (ikMaid != i)
  3443. {
  3444. ikMaid = i;
  3445. ikBui = 5;
  3446. SetIK(maid, i);
  3447. }
  3448. }
  3449. if (mKahuku[i].isSelect)
  3450. {
  3451. mKahuku[i].isSelect = false;
  3452. if (ikMaid != i)
  3453. {
  3454. ikMaid = i;
  3455. ikBui = 5;
  3456. SetIK(maid, i);
  3457. }
  3458. }
  3459. }
  3460. }
  3461. else if (ikMode[i] == 5)
  3462. {
  3463. if (ikModeOld[i] == 3 && gHead[i])
  3464. {
  3465. mHead[i].ido = 4;
  3466. mHead[i].reset = true;
  3467. mJotai[i].ido = 5;
  3468. mJotai[i].reset = true;
  3469. mKahuku[i].ido = 6;
  3470. mKahuku[i].reset = true;
  3471. mHandL[i].ido = 2;
  3472. mHandR[i].ido = 2;
  3473. mFootL[i].ido = 4;
  3474. mFootR[i].ido = 4;
  3475. mHizaL[i].ido = 5;
  3476. mHizaR[i].ido = 5;
  3477. mHandL[i].reset = true;
  3478. mHandR[i].reset = true;
  3479. mFootL[i].reset = true;
  3480. mFootR[i].reset = true;
  3481. mHizaL[i].reset = true;
  3482. mHizaR[i].reset = true;
  3483. }
  3484. else if (ikModeOld[i] == 0)
  3485. {
  3486. mHandL[i].ido = 2;
  3487. mHandR[i].ido = 2;
  3488. mFootL[i].ido = 4;
  3489. mFootR[i].ido = 4;
  3490. mHizaL[i].ido = 5;
  3491. mHizaR[i].ido = 5;
  3492. mHandL[i].reset = true;
  3493. mHandR[i].reset = true;
  3494. mFootL[i].reset = true;
  3495. mFootR[i].reset = true;
  3496. mHizaL[i].reset = true;
  3497. mHizaR[i].reset = true;
  3498. }
  3499. else
  3500. {
  3501. if (!gHead[i])
  3502. {
  3503. SetIKInit4(i);
  3504. }
  3505. if (mHead[i].isHead)
  3506. {
  3507. mHead[i].isHead = false;
  3508. isLookn[i] = isLook[i];
  3509. isLook[i] = !isLook[i];
  3510. }
  3511. gHead[i].transform.position =
  3512. new Vector3(Head2[i].position.x,
  3513. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3514. Head2[i].position.z);
  3515. gHead[i].transform.eulerAngles =
  3516. new Vector3(Head2[i].transform.eulerAngles.x,
  3517. Head2[i].transform.eulerAngles.y,
  3518. Head2[i].transform.eulerAngles.z + 90f);
  3519. mHead[i].head = Head1[i];
  3520. mHead[i].maid = maid;
  3521. mHead[i].ido = 4;
  3522. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3523. Transform transform3 =
  3524. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3525. Transform transform4 =
  3526. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3527. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3528. Transform transform6 =
  3529. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3530. gJotai[i].transform.position =
  3531. new Vector3(transform3.position.x,
  3532. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3533. transform3.position.z);
  3534. gJotai[i].transform.eulerAngles =
  3535. new Vector3(transform3.transform.eulerAngles.x,
  3536. transform3.transform.eulerAngles.y,
  3537. transform3.transform.eulerAngles.z + 90f);
  3538. mJotai[i].Spine0a = spine0a;
  3539. mJotai[i].Spine1 = transform3;
  3540. mJotai[i].Spine1a = transform4;
  3541. mJotai[i].Spine = transform5;
  3542. mJotai[i].maid = maid;
  3543. mJotai[i].ido = 5;
  3544. gKahuku[i].transform.position =
  3545. new Vector3(transform6.position.x,
  3546. (transform6.position.y + transform5.position.y) / 2f,
  3547. transform6.position.z);
  3548. gKahuku[i].transform.eulerAngles =
  3549. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3550. transform6.transform.eulerAngles.y + 90f,
  3551. transform6.transform.eulerAngles.z);
  3552. mKahuku[i].Pelvis = transform6;
  3553. mKahuku[i].maid = maid;
  3554. mKahuku[i].ido = 6;
  3555. mHandL[i].ido = 2;
  3556. mHandR[i].ido = 2;
  3557. mFootL[i].ido = 4;
  3558. mFootR[i].ido = 4;
  3559. mHizaL[i].ido = 5;
  3560. mHizaR[i].ido = 5;
  3561. gArmL[i].SetActive(false);
  3562. gArmR[i].SetActive(false);
  3563. gClavicleL[i].SetActive(false);
  3564. gClavicleR[i].SetActive(false);
  3565. gNeck[i].SetActive(false);
  3566. gSpine[i].SetActive(false);
  3567. gSpine0a[i].SetActive(false);
  3568. gSpine1a[i].SetActive(false);
  3569. gSpine1[i].SetActive(false);
  3570. gPelvis[i].SetActive(false);
  3571. if (isBone[i])
  3572. {
  3573. gHizaL[i].SetActive(false);
  3574. gHizaR[i].SetActive(false);
  3575. gHead[i].SetActive(false);
  3576. gJotai[i].SetActive(false);
  3577. gKahuku[i].SetActive(false);
  3578. }
  3579. else
  3580. {
  3581. gHizaL[i].SetActive(true);
  3582. gHizaR[i].SetActive(true);
  3583. gHead[i].SetActive(true);
  3584. gJotai[i].SetActive(true);
  3585. gKahuku[i].SetActive(true);
  3586. }
  3587. if (mHead[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mHead[i].isStop = false;
  3592. }
  3593. if (mJotai[i].isStop)
  3594. {
  3595. isStop[i] = true;
  3596. isLock[i] = true;
  3597. mJotai[i].isStop = false;
  3598. }
  3599. if (mKahuku[i].isStop)
  3600. {
  3601. isStop[i] = true;
  3602. isLock[i] = true;
  3603. mKahuku[i].isStop = false;
  3604. }
  3605. if (mHead[i].isSelect)
  3606. {
  3607. mHead[i].isSelect = false;
  3608. if (ikMaid != i)
  3609. {
  3610. ikMaid = i;
  3611. ikBui = 5;
  3612. SetIK(maid, i);
  3613. }
  3614. }
  3615. if (mJotai[i].isSelect)
  3616. {
  3617. mJotai[i].isSelect = false;
  3618. if (ikMaid != i)
  3619. {
  3620. ikMaid = i;
  3621. ikBui = 5;
  3622. SetIK(maid, i);
  3623. }
  3624. }
  3625. if (mKahuku[i].isSelect)
  3626. {
  3627. mKahuku[i].isSelect = false;
  3628. if (ikMaid != i)
  3629. {
  3630. ikMaid = i;
  3631. ikBui = 5;
  3632. SetIK(maid, i);
  3633. }
  3634. }
  3635. }
  3636. }
  3637. else if (ikMode[i] == 13)
  3638. {
  3639. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3640. {
  3641. mMaid[i].ido = 5;
  3642. mMaid[i].reset = true;
  3643. mMaidC[i].ido = 5;
  3644. mMaidC[i].reset = true;
  3645. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3646. }
  3647. else
  3648. {
  3649. if (!gMaid[i])
  3650. {
  3651. SetIKInit3(i);
  3652. }
  3653. gMaid[i].transform.position =
  3654. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3655. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3656. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3657. gMaid[i].transform.eulerAngles =
  3658. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3659. Spine0a2[i].transform.eulerAngles.y,
  3660. Spine0a2[i].transform.eulerAngles.z + 90f);
  3661. mMaid[i].maid = maid;
  3662. mMaid[i].ido = 5;
  3663. gMaidC[i].transform.position = maid.transform.position;
  3664. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3665. mMaidC[i].maid = maid;
  3666. mMaidC[i].ido = 5;
  3667. if (isCube)
  3668. {
  3669. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3670. gMaidC[i].SetActive(true);
  3671. }
  3672. else
  3673. {
  3674. gMaidC[i].SetActive(false);
  3675. }
  3676. gHandL[i].SetActive(false);
  3677. gArmL[i].SetActive(false);
  3678. gFootL[i].SetActive(false);
  3679. gHizaL[i].SetActive(false);
  3680. gHandR[i].SetActive(false);
  3681. gArmR[i].SetActive(false);
  3682. gFootR[i].SetActive(false);
  3683. gHizaR[i].SetActive(false);
  3684. gClavicleL[i].SetActive(false);
  3685. gClavicleR[i].SetActive(false);
  3686. gNeck[i].SetActive(false);
  3687. gSpine[i].SetActive(false);
  3688. gSpine0a[i].SetActive(false);
  3689. gSpine1a[i].SetActive(false);
  3690. gSpine1[i].SetActive(false);
  3691. gPelvis[i].SetActive(false);
  3692. }
  3693. if (mMaid[i].isSelect)
  3694. {
  3695. mMaid[i].isSelect = false;
  3696. if (ikMaid != i)
  3697. {
  3698. ikMaid = i;
  3699. ikBui = 5;
  3700. SetIK(maid, i);
  3701. }
  3702. }
  3703. }
  3704. else if (ikMode[i] == 11)
  3705. {
  3706. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3707. {
  3708. mMaid[i].ido = 3;
  3709. mMaid[i].reset = true;
  3710. mMaidC[i].ido = 3;
  3711. mMaidC[i].reset = true;
  3712. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3713. }
  3714. else
  3715. {
  3716. if (!gMaid[i])
  3717. {
  3718. SetIKInit3(i);
  3719. }
  3720. gMaid[i].transform.position =
  3721. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3722. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3723. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3724. gMaid[i].transform.eulerAngles =
  3725. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3726. Spine0a2[i].transform.eulerAngles.y,
  3727. Spine0a2[i].transform.eulerAngles.z + 90f);
  3728. mMaid[i].maid = maid;
  3729. mMaid[i].ido = 3;
  3730. gMaidC[i].transform.position = maid.transform.position;
  3731. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3732. mMaidC[i].maid = maid;
  3733. mMaidC[i].ido = 3;
  3734. if (isCube)
  3735. {
  3736. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3737. gMaidC[i].SetActive(true);
  3738. }
  3739. else
  3740. {
  3741. gMaidC[i].SetActive(false);
  3742. }
  3743. gHandL[i].SetActive(false);
  3744. gArmL[i].SetActive(false);
  3745. gFootL[i].SetActive(false);
  3746. gHizaL[i].SetActive(false);
  3747. gHandR[i].SetActive(false);
  3748. gArmR[i].SetActive(false);
  3749. gFootR[i].SetActive(false);
  3750. gHizaR[i].SetActive(false);
  3751. gClavicleL[i].SetActive(false);
  3752. gClavicleR[i].SetActive(false);
  3753. gNeck[i].SetActive(false);
  3754. gSpine[i].SetActive(false);
  3755. gSpine0a[i].SetActive(false);
  3756. gSpine1a[i].SetActive(false);
  3757. gSpine1[i].SetActive(false);
  3758. gPelvis[i].SetActive(false);
  3759. }
  3760. if (mMaid[i].isSelect)
  3761. {
  3762. mMaid[i].isSelect = false;
  3763. if (ikMaid != i)
  3764. {
  3765. ikMaid = i;
  3766. ikBui = 5;
  3767. SetIK(maid, i);
  3768. }
  3769. }
  3770. }
  3771. else if (ikMode[i] == 12)
  3772. {
  3773. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3774. {
  3775. mMaid[i].ido = 2;
  3776. mMaid[i].reset = true;
  3777. mMaidC[i].ido = 2;
  3778. mMaidC[i].reset = true;
  3779. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3780. }
  3781. else
  3782. {
  3783. if (!gMaid[i])
  3784. {
  3785. SetIKInit3(i);
  3786. }
  3787. gMaid[i].transform.position =
  3788. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3789. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3790. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3791. gMaid[i].transform.eulerAngles =
  3792. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3793. Spine0a2[i].transform.eulerAngles.y,
  3794. Spine0a2[i].transform.eulerAngles.z + 90f);
  3795. mMaid[i].maid = maid;
  3796. mMaid[i].ido = 2;
  3797. gMaidC[i].transform.position = maid.transform.position;
  3798. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3799. mMaidC[i].maid = maid;
  3800. mMaidC[i].ido = 2;
  3801. if (isCube)
  3802. {
  3803. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3804. gMaidC[i].SetActive(true);
  3805. }
  3806. else
  3807. {
  3808. gMaidC[i].SetActive(false);
  3809. }
  3810. gHandL[i].SetActive(false);
  3811. gArmL[i].SetActive(false);
  3812. gFootL[i].SetActive(false);
  3813. gHizaL[i].SetActive(false);
  3814. gHandR[i].SetActive(false);
  3815. gArmR[i].SetActive(false);
  3816. gFootR[i].SetActive(false);
  3817. gHizaR[i].SetActive(false);
  3818. gClavicleL[i].SetActive(false);
  3819. gClavicleR[i].SetActive(false);
  3820. gNeck[i].SetActive(false);
  3821. gSpine[i].SetActive(false);
  3822. gSpine0a[i].SetActive(false);
  3823. gSpine1a[i].SetActive(false);
  3824. gSpine1[i].SetActive(false);
  3825. gPelvis[i].SetActive(false);
  3826. }
  3827. if (mMaid[i].isSelect)
  3828. {
  3829. mMaid[i].isSelect = false;
  3830. if (ikMaid != i)
  3831. {
  3832. ikMaid = i;
  3833. ikBui = 5;
  3834. SetIK(maid, i);
  3835. }
  3836. }
  3837. }
  3838. else if (ikMode[i] == 10)
  3839. {
  3840. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3841. {
  3842. mMaid[i].ido = 1;
  3843. mMaid[i].reset = true;
  3844. mMaidC[i].ido = 1;
  3845. mMaidC[i].reset = true;
  3846. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3847. }
  3848. else
  3849. {
  3850. if (!gMaid[i])
  3851. {
  3852. SetIKInit3(i);
  3853. }
  3854. gMaid[i].transform.position =
  3855. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3856. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3857. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3858. gMaid[i].transform.eulerAngles =
  3859. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3860. Spine0a2[i].transform.eulerAngles.y,
  3861. Spine0a2[i].transform.eulerAngles.z + 90f);
  3862. mMaid[i].maid = maid;
  3863. mMaid[i].ido = 1;
  3864. gMaidC[i].transform.position = maid.transform.position;
  3865. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3866. mMaidC[i].maid = maid;
  3867. mMaidC[i].ido = 1;
  3868. if (isCube)
  3869. {
  3870. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3871. gMaidC[i].SetActive(true);
  3872. }
  3873. else
  3874. {
  3875. gMaidC[i].SetActive(false);
  3876. }
  3877. gHandL[i].SetActive(false);
  3878. gArmL[i].SetActive(false);
  3879. gFootL[i].SetActive(false);
  3880. gHizaL[i].SetActive(false);
  3881. gHandR[i].SetActive(false);
  3882. gArmR[i].SetActive(false);
  3883. gFootR[i].SetActive(false);
  3884. gHizaR[i].SetActive(false);
  3885. gClavicleL[i].SetActive(false);
  3886. gClavicleR[i].SetActive(false);
  3887. gNeck[i].SetActive(false);
  3888. gSpine[i].SetActive(false);
  3889. gSpine0a[i].SetActive(false);
  3890. gSpine1a[i].SetActive(false);
  3891. gSpine1[i].SetActive(false);
  3892. gPelvis[i].SetActive(false);
  3893. }
  3894. if (mMaid[i].isSelect)
  3895. {
  3896. mMaid[i].isSelect = false;
  3897. if (ikMaid != i)
  3898. {
  3899. ikMaid = i;
  3900. ikBui = 5;
  3901. SetIK(maid, i);
  3902. }
  3903. }
  3904. }
  3905. else if (ikMode[i] == 9)
  3906. {
  3907. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3908. {
  3909. mMaid[i].ido = 4;
  3910. mMaid[i].reset = true;
  3911. mMaidC[i].ido = 4;
  3912. mMaidC[i].reset = true;
  3913. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3914. }
  3915. else
  3916. {
  3917. if (!gMaid[i])
  3918. {
  3919. SetIKInit3(i);
  3920. }
  3921. gMaid[i].transform.position =
  3922. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3923. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3924. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3925. gMaid[i].transform.eulerAngles =
  3926. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3927. Spine0a2[i].transform.eulerAngles.y,
  3928. Spine0a2[i].transform.eulerAngles.z + 90f);
  3929. mMaid[i].maid = maid;
  3930. mMaid[i].ido = 4;
  3931. gMaidC[i].transform.position = maid.transform.position;
  3932. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3933. mMaidC[i].maid = maid;
  3934. mMaidC[i].ido = 4;
  3935. if (isCube)
  3936. {
  3937. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3938. gMaidC[i].SetActive(true);
  3939. }
  3940. else
  3941. {
  3942. gMaidC[i].SetActive(false);
  3943. }
  3944. gHandL[i].SetActive(false);
  3945. gArmL[i].SetActive(false);
  3946. gFootL[i].SetActive(false);
  3947. gHizaL[i].SetActive(false);
  3948. gHandR[i].SetActive(false);
  3949. gArmR[i].SetActive(false);
  3950. gFootR[i].SetActive(false);
  3951. gHizaR[i].SetActive(false);
  3952. gClavicleL[i].SetActive(false);
  3953. gClavicleR[i].SetActive(false);
  3954. gNeck[i].SetActive(false);
  3955. gSpine[i].SetActive(false);
  3956. gSpine0a[i].SetActive(false);
  3957. gSpine1a[i].SetActive(false);
  3958. gSpine1[i].SetActive(false);
  3959. gPelvis[i].SetActive(false);
  3960. }
  3961. if (mMaid[i].isSelect)
  3962. {
  3963. mMaid[i].isSelect = false;
  3964. if (ikMaid != i)
  3965. {
  3966. ikMaid = i;
  3967. ikBui = 5;
  3968. SetIK(maid, i);
  3969. }
  3970. }
  3971. }
  3972. else if (ikMode[i] == 14)
  3973. {
  3974. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3975. {
  3976. mMaid[i].ido = 6;
  3977. mMaid[i].reset = true;
  3978. mMaidC[i].ido = 6;
  3979. mMaidC[i].reset = true;
  3980. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3981. }
  3982. else
  3983. {
  3984. if (!gMaid[i])
  3985. {
  3986. SetIKInit3(i);
  3987. }
  3988. gMaid[i].transform.position =
  3989. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3990. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3991. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3992. gMaid[i].transform.eulerAngles =
  3993. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3994. Spine0a2[i].transform.eulerAngles.y,
  3995. Spine0a2[i].transform.eulerAngles.z + 90f);
  3996. mMaid[i].maid = maid;
  3997. mMaid[i].ido = 6;
  3998. gMaidC[i].transform.position = maid.transform.position;
  3999. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  4000. mMaidC[i].maid = maid;
  4001. mMaidC[i].ido = 6;
  4002. if (isCube)
  4003. {
  4004. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  4005. gMaidC[i].SetActive(true);
  4006. }
  4007. else
  4008. {
  4009. gMaidC[i].SetActive(false);
  4010. }
  4011. gHandL[i].SetActive(false);
  4012. gArmL[i].SetActive(false);
  4013. gFootL[i].SetActive(false);
  4014. gHizaL[i].SetActive(false);
  4015. gHandR[i].SetActive(false);
  4016. gArmR[i].SetActive(false);
  4017. gFootR[i].SetActive(false);
  4018. gHizaR[i].SetActive(false);
  4019. gClavicleL[i].SetActive(false);
  4020. gClavicleR[i].SetActive(false);
  4021. gNeck[i].SetActive(false);
  4022. gSpine[i].SetActive(false);
  4023. gSpine0a[i].SetActive(false);
  4024. gSpine1a[i].SetActive(false);
  4025. gSpine1[i].SetActive(false);
  4026. gPelvis[i].SetActive(false);
  4027. }
  4028. if (mMaid[i].isSelect)
  4029. {
  4030. mMaid[i].isSelect = false;
  4031. if (ikMaid != i)
  4032. {
  4033. ikMaid = i;
  4034. ikBui = 5;
  4035. SetIK(maid, i);
  4036. }
  4037. }
  4038. }
  4039. else if (ikMode[i] == 6)
  4040. {
  4041. if (!gFinger[i, 0])
  4042. {
  4043. SetIKInit2(i);
  4044. }
  4045. Destroy(gMaid[i]);
  4046. Destroy(gMaidC[i]);
  4047. Destroy(gHead[i]);
  4048. Destroy(gJotai[i]);
  4049. Destroy(gKahuku[i]);
  4050. gHandL[i].SetActive(false);
  4051. gArmL[i].SetActive(false);
  4052. gFootL[i].SetActive(false);
  4053. gHizaL[i].SetActive(false);
  4054. gHandR[i].SetActive(false);
  4055. gArmR[i].SetActive(false);
  4056. gFootR[i].SetActive(false);
  4057. gHizaR[i].SetActive(false);
  4058. gClavicleL[i].SetActive(false);
  4059. gClavicleR[i].SetActive(false);
  4060. gNeck[i].SetActive(false);
  4061. gSpine[i].SetActive(false);
  4062. gSpine0a[i].SetActive(false);
  4063. gSpine1a[i].SetActive(false);
  4064. gSpine1[i].SetActive(false);
  4065. gPelvis[i].SetActive(false);
  4066. for (int j = 0; j < 10; j++)
  4067. {
  4068. mFinger[i, j * 3 + 2].maid = maid;
  4069. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4070. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 2].ido = 12;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3 + 2].ido = 15;
  4076. }
  4077. mFinger[i, j * 3 + 1].maid = maid;
  4078. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4079. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3 + 1].ido = 11;
  4082. if (j == 0 || j == 5)
  4083. {
  4084. mFinger[i, j * 3 + 1].ido = 14;
  4085. }
  4086. mFinger[i, j * 3].maid = maid;
  4087. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4088. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4089. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4090. mFinger[i, j * 3].ido = 13;
  4091. if (j == 0 || j == 5)
  4092. {
  4093. mFinger[i, j * 3].ido = 0;
  4094. }
  4095. gFinger[i, j * 3 + 2].SetActive(false);
  4096. gFinger[i, j * 3 + 1].SetActive(false);
  4097. gFinger[i, j * 3].SetActive(true);
  4098. gFinger[i, j * 3].SetActive(true);
  4099. mFinger[i, j * 3].ido = 16;
  4100. if (ikModeOld[i] != 6)
  4101. {
  4102. mFinger[i, j * 3].reset = true;
  4103. }
  4104. gFinger[i, j * 3 + 2].transform.position =
  4105. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4106. + Finger[i, j * 4 + 2].position) / 3f;
  4107. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4108. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4109. if (mFinger[i, j * 3 + 2].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3 + 2].isStop = false;
  4114. }
  4115. if (mFinger[i, j * 3 + 1].isStop)
  4116. {
  4117. isStop[i] = true;
  4118. isLock[i] = true;
  4119. mFinger[i, j * 3 + 1].isStop = false;
  4120. }
  4121. if (mFinger[i, j * 3].isStop)
  4122. {
  4123. isStop[i] = true;
  4124. isLock[i] = true;
  4125. mFinger[i, j * 3].isStop = false;
  4126. }
  4127. }
  4128. for (int j = 0; j < 6; j++)
  4129. {
  4130. mFinger2[i, j * 2 + 1].maid = maid;
  4131. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4132. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4133. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4134. mFinger2[i, j * 2 + 1].ido = 0;
  4135. mFinger2[i, j * 2].maid = maid;
  4136. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4137. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4138. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4139. mFinger2[i, j * 2].ido = 0;
  4140. gFinger2[i, j * 2 + 1].SetActive(false);
  4141. gFinger2[i, j * 2].SetActive(false);
  4142. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4143. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4144. if (mFinger2[i, j * 2 + 1].isStop)
  4145. {
  4146. isStop[i] = true;
  4147. isLock[i] = true;
  4148. mFinger2[i, j * 2 + 1].isStop = false;
  4149. }
  4150. if (mFinger2[i, j * 2].isStop)
  4151. {
  4152. isStop[i] = true;
  4153. isLock[i] = true;
  4154. mFinger2[i, j * 2].isStop = false;
  4155. }
  4156. }
  4157. }
  4158. else if (ikMode[i] == 4)
  4159. {
  4160. if (!gFinger[i, 0])
  4161. {
  4162. SetIKInit2(i);
  4163. }
  4164. Destroy(gMaid[i]);
  4165. Destroy(gMaidC[i]);
  4166. Destroy(gHead[i]);
  4167. Destroy(gJotai[i]);
  4168. Destroy(gKahuku[i]);
  4169. gHandL[i].SetActive(false);
  4170. gArmL[i].SetActive(false);
  4171. gFootL[i].SetActive(false);
  4172. gHizaL[i].SetActive(false);
  4173. gHandR[i].SetActive(false);
  4174. gArmR[i].SetActive(false);
  4175. gFootR[i].SetActive(false);
  4176. gHizaR[i].SetActive(false);
  4177. gClavicleL[i].SetActive(false);
  4178. gClavicleR[i].SetActive(false);
  4179. gNeck[i].SetActive(false);
  4180. gSpine[i].SetActive(false);
  4181. gSpine0a[i].SetActive(false);
  4182. gSpine1a[i].SetActive(false);
  4183. gSpine1[i].SetActive(false);
  4184. gPelvis[i].SetActive(false);
  4185. for (int j = 0; j < 10; j++)
  4186. {
  4187. mFinger[i, j * 3 + 2].maid = maid;
  4188. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4189. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4190. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 2].ido = 12;
  4192. mFinger[i, j * 3 + 2].onFlg = true;
  4193. if (j == 0 || j == 5)
  4194. {
  4195. mFinger[i, j * 3 + 2].ido = 15;
  4196. }
  4197. mFinger[i, j * 3 + 1].maid = maid;
  4198. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4199. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4200. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3 + 1].ido = 11;
  4202. mFinger[i, j * 3 + 1].onFlg = true;
  4203. if (j == 0 || j == 5)
  4204. {
  4205. mFinger[i, j * 3 + 1].ido = 14;
  4206. }
  4207. mFinger[i, j * 3].maid = maid;
  4208. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4209. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4210. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4211. mFinger[i, j * 3].ido = 13;
  4212. mFinger[i, j * 3].onFlg = true;
  4213. if (j == 0 || j == 5)
  4214. {
  4215. mFinger[i, j * 3].ido = 0;
  4216. }
  4217. if (ikModeOld[i] != 4)
  4218. {
  4219. mFinger[i, j * 3].reset = true;
  4220. }
  4221. gFinger[i, j * 3 + 2].SetActive(true);
  4222. gFinger[i, j * 3 + 1].SetActive(true);
  4223. gFinger[i, j * 3].SetActive(true);
  4224. gFinger[i, j * 3 + 2].transform.position =
  4225. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4226. + Finger[i, j * 4 + 2].position) / 3f;
  4227. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4228. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4229. if (mFinger[i, j * 3 + 2].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3 + 2].isStop = false;
  4234. }
  4235. if (mFinger[i, j * 3 + 1].isStop)
  4236. {
  4237. isStop[i] = true;
  4238. isLock[i] = true;
  4239. mFinger[i, j * 3 + 1].isStop = false;
  4240. }
  4241. if (mFinger[i, j * 3].isStop)
  4242. {
  4243. isStop[i] = true;
  4244. isLock[i] = true;
  4245. mFinger[i, j * 3].isStop = false;
  4246. }
  4247. }
  4248. for (int j = 0; j < 6; j++)
  4249. {
  4250. mFinger2[i, j * 2 + 1].maid = maid;
  4251. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4252. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4253. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4254. mFinger2[i, j * 2 + 1].ido = 17;
  4255. mFinger2[i, j * 2].maid = maid;
  4256. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4257. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4258. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4259. mFinger2[i, j * 2].ido = 0;
  4260. gFinger2[i, j * 2 + 1].SetActive(true);
  4261. gFinger2[i, j * 2].SetActive(true);
  4262. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4263. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4264. if (mFinger2[i, j * 2 + 1].isStop)
  4265. {
  4266. isStop[i] = true;
  4267. isLock[i] = true;
  4268. mFinger2[i, j * 2 + 1].isStop = false;
  4269. }
  4270. if (mFinger2[i, j * 2].isStop)
  4271. {
  4272. isStop[i] = true;
  4273. isLock[i] = true;
  4274. mFinger2[i, j * 2].isStop = false;
  4275. }
  4276. }
  4277. }
  4278. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4279. {
  4280. mHandL[i].ido = 0;
  4281. mHandR[i].ido = 0;
  4282. mFootL[i].ido = 0;
  4283. mFootR[i].ido = 0;
  4284. mHizaL[i].ido = 0;
  4285. mHizaR[i].ido = 0;
  4286. mHandL[i].reset = true;
  4287. mHandR[i].reset = true;
  4288. mFootL[i].reset = true;
  4289. mFootR[i].reset = true;
  4290. mHizaL[i].reset = true;
  4291. mHizaR[i].reset = true;
  4292. }
  4293. else
  4294. {
  4295. if (gFinger[i, 0])
  4296. {
  4297. for (int j = 0; j < 30; j++)
  4298. {
  4299. gFinger[i, j].SetActive(false);
  4300. }
  4301. for (int j = 0; j < 12; j++)
  4302. {
  4303. gFinger2[i, j].SetActive(false);
  4304. }
  4305. }
  4306. Destroy(gHead[i]);
  4307. Destroy(gJotai[i]);
  4308. Destroy(gKahuku[i]);
  4309. Destroy(gIKHandL[i]);
  4310. Destroy(gIKHandR[i]);
  4311. Destroy(gIKMuneL[i]);
  4312. Destroy(gIKMuneR[i]);
  4313. Destroy(gHead2[i]);
  4314. Destroy(gMaid2[i]);
  4315. gHandL[i].SetActive(true);
  4316. gArmL[i].SetActive(true);
  4317. gFootL[i].SetActive(true);
  4318. gHizaL[i].SetActive(true);
  4319. gHandR[i].SetActive(true);
  4320. gArmR[i].SetActive(true);
  4321. gFootR[i].SetActive(true);
  4322. gHizaR[i].SetActive(true);
  4323. mHandL[i].ido = 0;
  4324. mHandR[i].ido = 0;
  4325. mFootL[i].ido = 0;
  4326. mFootR[i].ido = 0;
  4327. gClavicleL[i].SetActive(true);
  4328. gClavicleR[i].SetActive(true);
  4329. }
  4330. if (!isIK[i])
  4331. {
  4332. gHandL[i].SetActive(false);
  4333. gArmL[i].SetActive(false);
  4334. gFootL[i].SetActive(false);
  4335. gHizaL[i].SetActive(false);
  4336. gHandR[i].SetActive(false);
  4337. gArmR[i].SetActive(false);
  4338. gFootR[i].SetActive(false);
  4339. gHizaR[i].SetActive(false);
  4340. gClavicleL[i].SetActive(false);
  4341. gClavicleR[i].SetActive(false);
  4342. gNeck[i].SetActive(false);
  4343. gSpine[i].SetActive(false);
  4344. gSpine0a[i].SetActive(false);
  4345. gSpine1a[i].SetActive(false);
  4346. gSpine1[i].SetActive(false);
  4347. gPelvis[i].SetActive(false);
  4348. }
  4349. if (isIK[i])
  4350. {
  4351. mHandL[i].maid = maid;
  4352. mHandL[i].HandL = HandL1[i];
  4353. if (ikMode[i] == 2)
  4354. {
  4355. mHandL[i].UpperArmL = ForearmL1[i];
  4356. }
  4357. else
  4358. {
  4359. mHandL[i].UpperArmL = UpperArmL1[i];
  4360. if (ikModeOld[i] == 2 && isLock[i])
  4361. {
  4362. mHandL[i].OnMouseDown();
  4363. mHandL[i].isSelect = false;
  4364. }
  4365. }
  4366. mHandL[i].ForearmL = ForearmL1[i];
  4367. mArmL[i].maid = maid;
  4368. mArmL[i].HandL = ForearmL1[i];
  4369. mArmL[i].UpperArmL = UpperArmL1[i];
  4370. mArmL[i].ForearmL = UpperArmL1[i];
  4371. mArmL[i].onFlg = true;
  4372. if (mArmL[i].onFlg2)
  4373. {
  4374. mArmL[i].onFlg2 = false;
  4375. mHandL[i].initFlg = false;
  4376. }
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mHandL[i].initFlg = false;
  4380. mHandR[i].initFlg = false;
  4381. mFootL[i].initFlg = false;
  4382. mFootR[i].initFlg = false;
  4383. mHandL[i].onFlg = true;
  4384. mHandR[i].onFlg = true;
  4385. mFootL[i].onFlg = true;
  4386. mFootR[i].onFlg = true;
  4387. }
  4388. else
  4389. {
  4390. mHandL[i].onFlg = false;
  4391. mHandR[i].onFlg = false;
  4392. mFootL[i].onFlg = false;
  4393. mFootR[i].onFlg = false;
  4394. }
  4395. gHandL[i].transform.position = HandL1[i].position;
  4396. gArmL[i].transform.position = ForearmL1[i].position;
  4397. mClavicleL[i].maid = maid;
  4398. mClavicleL[i].HandL = UpperArmL1[i];
  4399. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4400. mClavicleL[i].ForearmL = ClavicleL1[i];
  4401. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4402. if (mHandL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mHandL[i].isStop = false;
  4407. }
  4408. if (mArmL[i].isStop)
  4409. {
  4410. isStop[i] = true;
  4411. isLock[i] = true;
  4412. mArmL[i].isStop = false;
  4413. }
  4414. if (mClavicleL[i].isStop)
  4415. {
  4416. isStop[i] = true;
  4417. isLock[i] = true;
  4418. mClavicleL[i].isStop = false;
  4419. }
  4420. mHandR[i].maid = maid;
  4421. mHandR[i].HandL = HandR1[i];
  4422. if (ikMode[i] == 2)
  4423. {
  4424. mHandR[i].UpperArmL = ForearmR1[i];
  4425. }
  4426. else
  4427. {
  4428. mHandR[i].UpperArmL = UpperArmR1[i];
  4429. if (ikModeOld[i] == 2 && isLock[i])
  4430. {
  4431. mHandR[i].OnMouseDown();
  4432. mHandR[i].isSelect = false;
  4433. }
  4434. }
  4435. mHandR[i].ForearmL = ForearmR1[i];
  4436. mArmR[i].maid = maid;
  4437. mArmR[i].HandL = ForearmR1[i];
  4438. mArmR[i].UpperArmL = UpperArmR1[i];
  4439. mArmR[i].ForearmL = UpperArmR1[i];
  4440. mArmR[i].onFlg = true;
  4441. if (mArmR[i].onFlg2)
  4442. {
  4443. mArmR[i].onFlg2 = false;
  4444. mHandR[i].initFlg = false;
  4445. }
  4446. gHandR[i].transform.position = HandR1[i].position;
  4447. gArmR[i].transform.position = ForearmR1[i].position;
  4448. mClavicleR[i].maid = maid;
  4449. mClavicleR[i].HandL = UpperArmR1[i];
  4450. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4451. mClavicleR[i].ForearmL = ClavicleR1[i];
  4452. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4453. if (mHandR[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mHandR[i].isStop = false;
  4458. }
  4459. if (mArmR[i].isStop)
  4460. {
  4461. isStop[i] = true;
  4462. isLock[i] = true;
  4463. mArmR[i].isStop = false;
  4464. }
  4465. if (mClavicleL[i].isStop)
  4466. {
  4467. isStop[i] = true;
  4468. isLock[i] = true;
  4469. mClavicleL[i].isStop = false;
  4470. }
  4471. mFootL[i].maid = maid;
  4472. mFootL[i].HandL = HandL2[i];
  4473. if (ikMode[i] == 2)
  4474. {
  4475. mFootL[i].UpperArmL = ForearmL2[i];
  4476. }
  4477. else
  4478. {
  4479. mFootL[i].UpperArmL = UpperArmL2[i];
  4480. if (ikModeOld[i] == 2 && isLock[i])
  4481. {
  4482. mFootL[i].OnMouseDown();
  4483. mFootL[i].isSelect = false;
  4484. }
  4485. }
  4486. mFootL[i].ForearmL = ForearmL2[i];
  4487. mHizaL[i].maid = maid;
  4488. mHizaL[i].HandL = ForearmL2[i];
  4489. mHizaL[i].UpperArmL = UpperArmL2[i];
  4490. mHizaL[i].ForearmL = UpperArmL2[i];
  4491. mHizaL[i].onFlg = true;
  4492. if (mHizaL[i].onFlg2)
  4493. {
  4494. mHizaL[i].onFlg2 = false;
  4495. mFootL[i].initFlg = false;
  4496. }
  4497. gFootL[i].transform.position = HandL2[i].position;
  4498. gHizaL[i].transform.position = ForearmL2[i].position;
  4499. if (mFootL[i].isStop)
  4500. {
  4501. isStop[i] = true;
  4502. isLock[i] = true;
  4503. mFootL[i].isStop = false;
  4504. }
  4505. if (mHizaL[i].isStop)
  4506. {
  4507. isStop[i] = true;
  4508. isLock[i] = true;
  4509. mHizaL[i].isStop = false;
  4510. }
  4511. mFootR[i].maid = maid;
  4512. mFootR[i].HandL = HandR2[i];
  4513. if (ikMode[i] == 2)
  4514. {
  4515. mFootR[i].UpperArmL = ForearmR2[i];
  4516. }
  4517. else
  4518. {
  4519. mFootR[i].UpperArmL = UpperArmR2[i];
  4520. if (ikModeOld[i] == 2 && isLock[i])
  4521. {
  4522. mFootR[i].OnMouseDown();
  4523. mFootR[i].isSelect = false;
  4524. }
  4525. }
  4526. mFootR[i].ForearmL = ForearmR2[i];
  4527. mHizaR[i].maid = maid;
  4528. mHizaR[i].HandL = ForearmR2[i];
  4529. mHizaR[i].UpperArmL = UpperArmR2[i];
  4530. mHizaR[i].ForearmL = UpperArmR2[i];
  4531. mHizaR[i].onFlg = true;
  4532. if (mHizaR[i].onFlg2)
  4533. {
  4534. mHizaR[i].onFlg2 = false;
  4535. mFootR[i].initFlg = false;
  4536. }
  4537. gFootR[i].transform.position = HandR2[i].position;
  4538. gHizaR[i].transform.position = ForearmR2[i].position;
  4539. if (mFootR[i].isStop)
  4540. {
  4541. isStop[i] = true;
  4542. isLock[i] = true;
  4543. mFootR[i].isStop = false;
  4544. }
  4545. if (mHizaR[i].isStop)
  4546. {
  4547. isStop[i] = true;
  4548. isLock[i] = true;
  4549. mHizaR[i].isStop = false;
  4550. }
  4551. bool flag13 = false;
  4552. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4553. || ikModeOld[i] == 14)
  4554. {
  4555. flag13 = true;
  4556. }
  4557. if (isBone[i])
  4558. {
  4559. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8)
  4560. || ikMode[i] != ikModeOld[i] || isChange[i]
  4561. )
  4562. {
  4563. float gizmoSizeSpine = 0.2f;
  4564. if (ikMode[i] == 2 || ikMode[i] == 1)
  4565. {
  4566. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4567. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4568. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4569. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4570. if (ikMode[i] == 2)
  4571. {
  4572. gizmoNeck[i].Visible = true;
  4573. gizmoHandL[i].Visible = true;
  4574. gizmoHandR[i].Visible = true;
  4575. gizmoFootL[i].Visible = true;
  4576. gizmoFootR[i].Visible = true;
  4577. gizmoPelvis[i].Visible = false;
  4578. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4579. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4580. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4581. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4582. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4583. if (CustomGizmo.IsDrag)
  4584. {
  4585. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4586. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4587. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4588. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4589. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4590. }
  4591. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4592. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4596. gNeck[i].SetActive(false);
  4597. gSpine[i].SetActive(false);
  4598. gSpine0a[i].SetActive(false);
  4599. gSpine1[i].SetActive(false);
  4600. gSpine1a[i].SetActive(false);
  4601. }
  4602. else
  4603. {
  4604. gizmoNeck[i].Visible = false;
  4605. gizmoFootL[i].Visible = false;
  4606. gizmoHandR[i].Visible = false;
  4607. gizmoHandL[i].Visible = false;
  4608. gizmoFootR[i].Visible = false;
  4609. gizmoPelvis[i].Visible = true;
  4610. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4611. if (CustomGizmo.IsDrag)
  4612. {
  4613. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4614. }
  4615. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4616. gPelvis[i].SetActive(false);
  4617. }
  4618. if (!isLock[i])
  4619. {
  4620. if (CustomGizmo.IsDrag)
  4621. {
  4622. isStop[i] = true;
  4623. isLock[i] = true;
  4624. }
  4625. }
  4626. }
  4627. else
  4628. {
  4629. gizmoNeck[i].Visible = false;
  4630. gizmoPelvis[i].Visible = false;
  4631. gizmoFootL[i].Visible = false;
  4632. gizmoHandR[i].Visible = false;
  4633. gizmoHandL[i].Visible = false;
  4634. gizmoFootR[i].Visible = false;
  4635. }
  4636. }
  4637. else
  4638. {
  4639. float gizmoSizeLimb = 0.25f;
  4640. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4641. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4642. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4643. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4644. gizmoFootL[i].Visible = true;
  4645. gizmoHandR[i].Visible = true;
  4646. gizmoHandL[i].Visible = true;
  4647. gizmoFootR[i].Visible = true;
  4648. bool isDragging = CustomGizmo.IsDrag;
  4649. if (ikMode[i] == 3)
  4650. {
  4651. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4652. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4653. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4654. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4655. if (isDragging)
  4656. {
  4657. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4658. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4659. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4660. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4661. }
  4662. else
  4663. {
  4664. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4665. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4666. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4667. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4668. }
  4669. }
  4670. else if (ikMode[i] == 5)
  4671. {
  4672. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4673. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4674. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4675. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4676. if (isDragging)
  4677. {
  4678. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4679. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4680. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4681. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4682. flag13 = true;
  4683. }
  4684. else
  4685. {
  4686. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4687. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4688. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4689. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4690. }
  4691. }
  4692. else if (ikMode[i] == 8)
  4693. {
  4694. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4695. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4696. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4697. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4698. if (isDragging)
  4699. {
  4700. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4701. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4702. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4703. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4704. flag13 = true;
  4705. }
  4706. else
  4707. {
  4708. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4709. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4710. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4711. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4712. }
  4713. }
  4714. else
  4715. {
  4716. gizmoFootL[i].Visible = false;
  4717. gizmoHandR[i].Visible = false;
  4718. gizmoHandL[i].Visible = false;
  4719. gizmoFootR[i].Visible = false;
  4720. }
  4721. gHandL[i].SetActive(false);
  4722. gFootL[i].SetActive(false);
  4723. gHandR[i].SetActive(false);
  4724. gFootR[i].SetActive(false);
  4725. if (!isLock[i])
  4726. {
  4727. if (CustomGizmo.IsDrag)
  4728. {
  4729. isStop[i] = true;
  4730. isLock[i] = true;
  4731. }
  4732. }
  4733. }
  4734. if (isChange[i])
  4735. {
  4736. isChange[i] = false;
  4737. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4738. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4739. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4740. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4741. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4742. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4743. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4744. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4745. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4746. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4747. gHandL[i].GetComponent<Renderer>().enabled = true;
  4748. gHandR[i].GetComponent<Renderer>().enabled = true;
  4749. gArmL[i].GetComponent<Renderer>().enabled = true;
  4750. gArmR[i].GetComponent<Renderer>().enabled = true;
  4751. gFootL[i].GetComponent<Renderer>().enabled = true;
  4752. gFootR[i].GetComponent<Renderer>().enabled = true;
  4753. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4754. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4755. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4756. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4757. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4758. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4759. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4760. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4761. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4762. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4763. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4764. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4765. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4766. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4767. }
  4768. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4769. {
  4770. mNeck[i].ido = 1;
  4771. mNeck[i].reset = true;
  4772. mSpine[i].ido = 1;
  4773. mSpine[i].reset = true;
  4774. mSpine0a[i].ido = 1;
  4775. mSpine0a[i].reset = true;
  4776. mSpine1a[i].ido = 1;
  4777. mSpine1a[i].reset = true;
  4778. mSpine1[i].ido = 1;
  4779. mSpine1[i].reset = true;
  4780. mPelvis[i].ido = 1;
  4781. mPelvis[i].reset = true;
  4782. }
  4783. else if (ikMode[i] == 0)
  4784. {
  4785. gNeck[i].SetActive(true);
  4786. gSpine[i].SetActive(true);
  4787. gSpine0a[i].SetActive(true);
  4788. gSpine1a[i].SetActive(true);
  4789. gSpine1[i].SetActive(true);
  4790. gPelvis[i].SetActive(true);
  4791. if (mNeck[i].isHead)
  4792. {
  4793. mNeck[i].isHead = false;
  4794. isLookn[i] = isLook[i];
  4795. isLook[i] = !isLook[i];
  4796. }
  4797. mNeck[i].maid = maid;
  4798. mNeck[i].head = Neck[i];
  4799. mNeck[i].no = i;
  4800. mNeck[i].ido = 1;
  4801. gNeck[i].transform.position = Neck[i].position;
  4802. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4803. mSpine[i].maid = maid;
  4804. mSpine[i].head = Spine2[i];
  4805. mSpine[i].no = i;
  4806. mSpine[i].ido = 1;
  4807. gSpine[i].transform.position = Spine2[i].position;
  4808. gSpine[i].transform.eulerAngles =
  4809. new Vector3(Spine2[i].localEulerAngles.z,
  4810. Spine2[i].localEulerAngles.y,
  4811. Spine2[i].localEulerAngles.x);
  4812. mSpine0a[i].maid = maid;
  4813. mSpine0a[i].head = Spine0a2[i];
  4814. mSpine0a[i].no = i;
  4815. mSpine0a[i].ido = 1;
  4816. gSpine0a[i].transform.position = Spine0a2[i].position;
  4817. gSpine0a[i].transform.eulerAngles =
  4818. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4819. Spine0a2[i].localEulerAngles.x,
  4820. Spine0a2[i].localEulerAngles.y);
  4821. mSpine1a[i].maid = maid;
  4822. mSpine1a[i].head = Spine1a2[i];
  4823. mSpine1a[i].no = i;
  4824. mSpine1a[i].ido = 1;
  4825. gSpine1a[i].transform.position = Spine1a2[i].position;
  4826. gSpine1a[i].transform.localEulerAngles =
  4827. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4828. Spine1a2[i].localEulerAngles.x,
  4829. Spine1a2[i].localEulerAngles.y);
  4830. mSpine1[i].maid = maid;
  4831. mSpine1[i].head = Spine12[i];
  4832. mSpine1[i].no = i;
  4833. mSpine1[i].ido = 1;
  4834. gSpine1[i].transform.position = Spine12[i].position;
  4835. gSpine1[i].transform.localEulerAngles =
  4836. new Vector3(-Spine12[i].localEulerAngles.z,
  4837. Spine12[i].localEulerAngles.x,
  4838. Spine12[i].localEulerAngles.y);
  4839. mPelvis[i].maid = maid;
  4840. mPelvis[i].head = Pelvis2[i];
  4841. mPelvis[i].no = i;
  4842. mPelvis[i].ido = 1;
  4843. gPelvis[i].transform.position = Pelvis2[i].position;
  4844. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4845. if (mNeck[i].isIdo)
  4846. {
  4847. mNeck[i].isIdo = false;
  4848. isLock[i] = true;
  4849. }
  4850. if (mSpine[i].isIdo)
  4851. {
  4852. mSpine[i].isIdo = false;
  4853. flag13 = true;
  4854. isLock[i] = true;
  4855. }
  4856. if (mSpine0a[i].isIdo)
  4857. {
  4858. mSpine0a[i].isIdo = false;
  4859. flag13 = true;
  4860. isLock[i] = true;
  4861. }
  4862. if (mSpine1a[i].isIdo)
  4863. {
  4864. mSpine1a[i].isIdo = false;
  4865. flag13 = true;
  4866. isLock[i] = true;
  4867. }
  4868. if (mSpine1[i].isIdo)
  4869. {
  4870. mSpine1[i].isIdo = false;
  4871. flag13 = true;
  4872. isLock[i] = true;
  4873. }
  4874. if (mPelvis[i].isIdo)
  4875. {
  4876. mPelvis[i].isIdo = false;
  4877. flag13 = true;
  4878. isLock[i] = true;
  4879. }
  4880. if (mClavicleL[i].isIdo)
  4881. {
  4882. mClavicleL[i].isIdo = false;
  4883. flag13 = true;
  4884. isLock[i] = true;
  4885. }
  4886. if (mClavicleR[i].isIdo)
  4887. {
  4888. mClavicleR[i].isIdo = false;
  4889. flag13 = true;
  4890. isLock[i] = true;
  4891. }
  4892. }
  4893. }
  4894. else if (isChange[i])
  4895. {
  4896. isChange[i] = false;
  4897. gHandL[i].GetComponent<Renderer>().enabled = false;
  4898. gArmL[i].GetComponent<Renderer>().enabled = false;
  4899. gFootL[i].GetComponent<Renderer>().enabled = false;
  4900. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4901. gHandR[i].GetComponent<Renderer>().enabled = false;
  4902. gArmR[i].GetComponent<Renderer>().enabled = false;
  4903. gFootR[i].GetComponent<Renderer>().enabled = false;
  4904. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4905. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4906. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4907. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4908. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4909. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4910. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4911. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4912. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4913. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4914. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4915. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4916. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4917. gNeck[i].SetActive(false);
  4918. gSpine[i].SetActive(false);
  4919. gSpine0a[i].SetActive(false);
  4920. gSpine1a[i].SetActive(false);
  4921. gSpine1[i].SetActive(false);
  4922. gPelvis[i].SetActive(false);
  4923. gizmoHandL[i].Visible = false;
  4924. gizmoHandR[i].Visible = false;
  4925. gizmoFootL[i].Visible = false;
  4926. gizmoFootR[i].Visible = false;
  4927. gizmoNeck[i].Visible = false;
  4928. gizmoPelvis[i].Visible = false;
  4929. }
  4930. if (flag13)
  4931. {
  4932. mHandL[i].initFlg = false;
  4933. mHandR[i].initFlg = false;
  4934. mFootL[i].initFlg = false;
  4935. mFootR[i].initFlg = false;
  4936. }
  4937. }
  4938. ikModeOld[i] = ikMode[i];
  4939. bool flag14 = false;
  4940. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4941. {
  4942. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4943. {
  4944. for (int k = 0; k < 10; k++)
  4945. {
  4946. maid.transform.RotateAround(maid.transform.position,
  4947. Vector3.right,
  4948. -maid.transform.rotation.eulerAngles.x);
  4949. maid.transform.RotateAround(maid.transform.position,
  4950. Vector3.forward,
  4951. -maid.transform.rotation.eulerAngles.z);
  4952. }
  4953. flag14 = true;
  4954. }
  4955. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4956. {
  4957. maid.transform.RotateAround(maid.transform.position,
  4958. new Vector3(vector3.x, 0f, vector3.z),
  4959. 0.3f);
  4960. maid.transform.RotateAround(maid.transform.position,
  4961. new Vector3(vector2.x, 0f, vector2.z),
  4962. 0.3f);
  4963. flag14 = true;
  4964. }
  4965. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4966. {
  4967. maid.transform.RotateAround(maid.transform.position,
  4968. new Vector3(vector3.x, 0f, vector3.z),
  4969. 0.3f);
  4970. maid.transform.RotateAround(maid.transform.position,
  4971. new Vector3(vector2.x, 0f, vector2.z),
  4972. -0.3f);
  4973. flag14 = true;
  4974. }
  4975. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4976. {
  4977. maid.transform.RotateAround(maid.transform.position,
  4978. new Vector3(vector3.x, 0f, vector3.z),
  4979. -0.3f);
  4980. maid.transform.RotateAround(maid.transform.position,
  4981. new Vector3(vector2.x, 0f, vector2.z),
  4982. 0.3f);
  4983. flag14 = true;
  4984. }
  4985. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4986. {
  4987. maid.transform.RotateAround(maid.transform.position,
  4988. new Vector3(vector3.x, 0f, vector3.z),
  4989. -0.3f);
  4990. maid.transform.RotateAround(maid.transform.position,
  4991. new Vector3(vector2.x, 0f, vector2.z),
  4992. -0.3f);
  4993. flag14 = true;
  4994. }
  4995. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4996. {
  4997. maid.transform.RotateAround(maid.transform.position,
  4998. new Vector3(vector3.x, 0f, vector3.z),
  4999. 0.4f);
  5000. flag14 = true;
  5001. }
  5002. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  5003. {
  5004. maid.transform.RotateAround(maid.transform.position,
  5005. new Vector3(vector3.x, 0f, vector3.z),
  5006. -0.4f);
  5007. flag14 = true;
  5008. }
  5009. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  5010. {
  5011. maid.transform.RotateAround(maid.transform.position,
  5012. new Vector3(vector2.x, 0f, vector2.z),
  5013. 0.4f);
  5014. flag14 = true;
  5015. }
  5016. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  5017. {
  5018. maid.transform.RotateAround(maid.transform.position,
  5019. new Vector3(vector2.x, 0f, vector2.z),
  5020. -0.4f);
  5021. flag14 = true;
  5022. }
  5023. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  5024. {
  5025. maid.body0.transform.localRotation =
  5026. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5027. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5028. flag14 = true;
  5029. }
  5030. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5031. {
  5032. maid.body0.transform.localRotation =
  5033. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5034. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5035. flag14 = true;
  5036. }
  5037. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5038. {
  5039. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5040. flag14 = true;
  5041. }
  5042. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5043. {
  5044. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5045. flag14 = true;
  5046. }
  5047. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5048. {
  5049. Vector3 vector = maid.transform.position;
  5050. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5052. maid.SetPos(vector);
  5053. flag14 = true;
  5054. }
  5055. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5056. {
  5057. Vector3 vector = maid.transform.position;
  5058. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5059. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5060. maid.SetPos(vector);
  5061. flag14 = true;
  5062. }
  5063. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5064. {
  5065. Vector3 vector = maid.transform.position;
  5066. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5067. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5068. maid.SetPos(vector);
  5069. flag14 = true;
  5070. }
  5071. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5072. {
  5073. Vector3 vector = maid.transform.position;
  5074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5075. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5076. maid.SetPos(vector);
  5077. flag14 = true;
  5078. }
  5079. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5080. {
  5081. Vector3 vector = maid.transform.position;
  5082. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5083. maid.SetPos(vector);
  5084. flag14 = true;
  5085. }
  5086. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5087. {
  5088. Vector3 vector = maid.transform.position;
  5089. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5090. maid.SetPos(vector);
  5091. flag14 = true;
  5092. }
  5093. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5094. {
  5095. Vector3 vector = maid.transform.position;
  5096. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5097. maid.SetPos(vector);
  5098. flag14 = true;
  5099. }
  5100. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5101. {
  5102. Vector3 vector = maid.transform.position;
  5103. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5104. maid.SetPos(vector);
  5105. flag14 = true;
  5106. }
  5107. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5108. {
  5109. Vector3 vector = maid.transform.position;
  5110. vector.y += 0.0075f * speed;
  5111. maid.SetPos(vector);
  5112. flag14 = true;
  5113. }
  5114. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5115. {
  5116. Vector3 vector = maid.transform.position;
  5117. vector.y -= 0.0075f * speed;
  5118. maid.SetPos(vector);
  5119. flag14 = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5122. {
  5123. maid.transform.localScale =
  5124. new Vector3(maid.transform.localScale.x * 1.005f,
  5125. maid.transform.localScale.y * 1.005f,
  5126. maid.transform.localScale.z * 1.005f);
  5127. flag14 = true;
  5128. }
  5129. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5130. {
  5131. maid.transform.localScale =
  5132. new Vector3(maid.transform.localScale.x * 0.995f,
  5133. maid.transform.localScale.y * 0.995f,
  5134. maid.transform.localScale.z * 0.995f);
  5135. flag14 = true;
  5136. }
  5137. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5138. {
  5139. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5140. flag14 = true;
  5141. }
  5142. }
  5143. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5144. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5145. && i == ikMaid)
  5146. {
  5147. if (Input.GetKey(KeyCode.I))
  5148. {
  5149. if (ikMode[i] == 0)
  5150. {
  5151. Vector3 vector5 = HandL.position;
  5152. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5153. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5154. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5155. }
  5156. else if (ikMode[i] == 2)
  5157. {
  5158. Vector3 vector5 = HandL.position;
  5159. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5160. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5161. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5162. }
  5163. else if (ikMode[i] == 3)
  5164. {
  5165. if (ikBui == 1 || ikBui == 2)
  5166. {
  5167. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5168. }
  5169. else
  5170. {
  5171. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5172. }
  5173. }
  5174. else if (ikMode[i] == 4)
  5175. {
  5176. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5177. }
  5178. else if (ikMode[i] == 8)
  5179. {
  5180. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5181. }
  5182. else if (ikMode[i] == 6)
  5183. {
  5184. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5185. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5186. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5187. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5188. }
  5189. else if (ikMode[i] == 7)
  5190. {
  5191. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5192. }
  5193. else if (ikMode[i] == 5)
  5194. {
  5195. Vector3 vector5 = ForearmL.position;
  5196. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5197. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5198. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5199. }
  5200. else
  5201. {
  5202. Vector3 vector5 = ForearmL.position;
  5203. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5204. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5205. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5206. }
  5207. isStop[i] = true;
  5208. isLock[i] = true;
  5209. }
  5210. else if (Input.GetKey(KeyCode.K))
  5211. {
  5212. if (ikMode[i] == 0)
  5213. {
  5214. Vector3 vector5 = HandL.position;
  5215. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5216. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5217. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5218. }
  5219. else if (ikMode[i] == 2)
  5220. {
  5221. Vector3 vector5 = HandL.position;
  5222. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5223. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5224. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5225. }
  5226. else if (ikMode[i] == 3)
  5227. {
  5228. if (ikBui == 1 || ikBui == 2)
  5229. {
  5230. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5231. }
  5232. else
  5233. {
  5234. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5235. }
  5236. }
  5237. else if (ikMode[i] == 4)
  5238. {
  5239. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5240. }
  5241. else if (ikMode[i] == 8)
  5242. {
  5243. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5244. }
  5245. else if (ikMode[i] == 6)
  5246. {
  5247. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5248. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5249. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5250. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5251. }
  5252. else if (ikMode[i] == 7)
  5253. {
  5254. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5255. }
  5256. else if (ikMode[i] == 5)
  5257. {
  5258. Vector3 vector5 = ForearmL.position;
  5259. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5260. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5261. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5262. }
  5263. else
  5264. {
  5265. Vector3 vector5 = ForearmL.position;
  5266. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5267. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5268. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5269. }
  5270. isStop[i] = true;
  5271. isLock[i] = true;
  5272. }
  5273. else if (Input.GetKey(KeyCode.J))
  5274. {
  5275. if (ikMode[i] == 0)
  5276. {
  5277. Vector3 vector5 = HandL.position;
  5278. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5279. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5280. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5281. }
  5282. else if (ikMode[i] == 2)
  5283. {
  5284. Vector3 vector5 = HandL.position;
  5285. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5286. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5287. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5288. }
  5289. else if (ikMode[i] == 3)
  5290. {
  5291. if (ikBui == 1 || ikBui == 2)
  5292. {
  5293. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5294. }
  5295. else
  5296. {
  5297. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5298. }
  5299. }
  5300. else if (ikMode[i] == 4)
  5301. {
  5302. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5303. }
  5304. else if (ikMode[i] == 8)
  5305. {
  5306. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5307. }
  5308. else if (ikMode[i] == 6)
  5309. {
  5310. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5311. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5312. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5313. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5314. }
  5315. else if (ikMode[i] == 7)
  5316. {
  5317. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5318. }
  5319. else if (ikMode[i] == 5)
  5320. {
  5321. Vector3 vector5 = ForearmL.position;
  5322. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5323. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5324. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5325. }
  5326. else
  5327. {
  5328. Vector3 vector5 = ForearmL.position;
  5329. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5330. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5331. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5332. }
  5333. isStop[i] = true;
  5334. isLock[i] = true;
  5335. }
  5336. else if (Input.GetKey(KeyCode.L))
  5337. {
  5338. if (ikMode[i] == 0)
  5339. {
  5340. Vector3 vector5 = HandL.position;
  5341. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5342. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5343. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5344. }
  5345. else if (ikMode[i] == 2)
  5346. {
  5347. Vector3 vector5 = HandL.position;
  5348. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5349. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5350. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5351. }
  5352. else if (ikMode[i] == 3)
  5353. {
  5354. if (ikBui == 1 || ikBui == 2)
  5355. {
  5356. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5357. }
  5358. else
  5359. {
  5360. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5361. }
  5362. }
  5363. else if (ikMode[i] == 4)
  5364. {
  5365. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5366. }
  5367. else if (ikMode[i] == 8)
  5368. {
  5369. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5370. }
  5371. else if (ikMode[i] == 6)
  5372. {
  5373. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5374. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5375. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5376. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5377. }
  5378. else if (ikMode[i] == 7)
  5379. {
  5380. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5381. }
  5382. else if (ikMode[i] == 5)
  5383. {
  5384. Vector3 vector5 = ForearmL.position;
  5385. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5386. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5387. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5388. }
  5389. else
  5390. {
  5391. Vector3 vector5 = ForearmL.position;
  5392. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5393. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5394. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5395. }
  5396. isStop[i] = true;
  5397. isLock[i] = true;
  5398. }
  5399. else if (Input.GetKey(KeyCode.U))
  5400. {
  5401. if (ikMode[i] == 3)
  5402. {
  5403. HandL.localRotation =
  5404. Quaternion.Euler(HandL.localEulerAngles)
  5405. * Quaternion.AngleAxis(1f, Vector3.right);
  5406. isStop[i] = true;
  5407. isLock[i] = true;
  5408. }
  5409. else if (ikMode[i] == 4)
  5410. {
  5411. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5412. isStop[i] = true;
  5413. isLock[i] = true;
  5414. }
  5415. else if (ikMode[i] == 8)
  5416. {
  5417. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5418. isStop[i] = true;
  5419. isLock[i] = true;
  5420. }
  5421. else if (ikMode[i] == 6)
  5422. {
  5423. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5424. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5425. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5426. isStop[i] = true;
  5427. isLock[i] = true;
  5428. }
  5429. else if (ikMode[i] == 7)
  5430. {
  5431. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5432. isStop[i] = true;
  5433. isLock[i] = true;
  5434. }
  5435. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5436. {
  5437. UpperArmL.localRotation =
  5438. Quaternion.Euler(UpperArmL.localEulerAngles)
  5439. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5440. isStop[i] = true;
  5441. isLock[i] = true;
  5442. }
  5443. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5444. {
  5445. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5446. isStop[i] = true;
  5447. isLock[i] = true;
  5448. }
  5449. }
  5450. else if (Input.GetKey(KeyCode.O))
  5451. {
  5452. if (ikMode[i] == 3)
  5453. {
  5454. HandL.localRotation =
  5455. Quaternion.Euler(HandL.localEulerAngles)
  5456. * Quaternion.AngleAxis(-1f, Vector3.right);
  5457. isStop[i] = true;
  5458. isLock[i] = true;
  5459. }
  5460. else if (ikMode[i] == 4)
  5461. {
  5462. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5463. isStop[i] = true;
  5464. isLock[i] = true;
  5465. }
  5466. else if (ikMode[i] == 8)
  5467. {
  5468. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5469. isStop[i] = true;
  5470. isLock[i] = true;
  5471. }
  5472. else if (ikMode[i] == 6)
  5473. {
  5474. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5475. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5476. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5477. isStop[i] = true;
  5478. isLock[i] = true;
  5479. }
  5480. else if (ikMode[i] == 7)
  5481. {
  5482. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5483. isStop[i] = true;
  5484. isLock[i] = true;
  5485. }
  5486. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5487. {
  5488. UpperArmL.localRotation =
  5489. Quaternion.Euler(UpperArmL.localEulerAngles)
  5490. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5491. isStop[i] = true;
  5492. isLock[i] = true;
  5493. }
  5494. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5495. {
  5496. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5497. isStop[i] = true;
  5498. isLock[i] = true;
  5499. }
  5500. }
  5501. else if (Input.GetKey(KeyCode.Alpha0))
  5502. {
  5503. if (ikMode[i] == 0)
  5504. {
  5505. Vector3 vector5 = HandL.position;
  5506. vector5.y += 0.005f;
  5507. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5508. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5509. }
  5510. else if (ikMode[i] == 2)
  5511. {
  5512. Vector3 vector5 = HandL.position;
  5513. vector5.y += 0.005f;
  5514. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5515. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5516. }
  5517. else if (ikMode[i] == 5)
  5518. {
  5519. Vector3 vector5 = ForearmL.position;
  5520. vector5.y += 0.0035f;
  5521. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5522. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5523. }
  5524. else
  5525. {
  5526. Vector3 vector5 = ForearmL.position;
  5527. vector5.y += 0.0035f;
  5528. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5529. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5530. }
  5531. isStop[i] = true;
  5532. isLock[i] = true;
  5533. }
  5534. else if (Input.GetKey(KeyCode.P))
  5535. {
  5536. if (ikMode[i] == 0)
  5537. {
  5538. Vector3 vector5 = HandL.position;
  5539. vector5.y -= 0.005f;
  5540. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5541. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5542. }
  5543. else if (ikMode[i] == 2)
  5544. {
  5545. Vector3 vector5 = HandL.position;
  5546. vector5.y -= 0.005f;
  5547. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5548. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5549. }
  5550. else if (ikMode[i] == 5)
  5551. {
  5552. Vector3 vector5 = ForearmL.position;
  5553. vector5.y -= 0.0035f;
  5554. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5555. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5556. }
  5557. else
  5558. {
  5559. Vector3 vector5 = ForearmL.position;
  5560. vector5.y -= 0.0035f;
  5561. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5562. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5563. }
  5564. isStop[i] = true;
  5565. isLock[i] = true;
  5566. }
  5567. }
  5568. }
  5569. }
  5570. }
  5571. }
  5572. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5573. {
  5574. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5575. idoFlg[i] = true;
  5576. }
  5577. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5578. {
  5579. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5580. idoFlg[i] = true;
  5581. }
  5582. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5583. {
  5584. if (!xFlg[i])
  5585. {
  5586. xFlg[i] = true;
  5587. zFlg[i] = false;
  5588. if (maid.status.personal.uniqueName == "Pride")
  5589. {
  5590. string text = "s0_";
  5591. Random random = new Random();
  5592. int num4 = random.Next(10000);
  5593. bool flag7 = false;
  5594. for (int k = 0; k < tunArray.Length; k++)
  5595. {
  5596. if (tunArray[k] == num4)
  5597. {
  5598. flag7 = true;
  5599. break;
  5600. }
  5601. }
  5602. if (!flag7)
  5603. {
  5604. text = text + "0" + num4.ToString() + ".ogg";
  5605. if (GameUty.FileSystem.IsExistentFile(text))
  5606. {
  5607. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5608. }
  5609. }
  5610. }
  5611. if (maid.status.personal.uniqueName == "Cool")
  5612. {
  5613. string text = "s1_";
  5614. Random random = new Random();
  5615. int num4 = random.Next(10000);
  5616. bool flag7 = false;
  5617. for (int k = 0; k < coolArray.Length; k++)
  5618. {
  5619. if (coolArray[k] == num4)
  5620. {
  5621. flag7 = true;
  5622. break;
  5623. }
  5624. }
  5625. if (!flag7)
  5626. {
  5627. text = text + "0" + num4.ToString() + ".ogg";
  5628. if (GameUty.FileSystem.IsExistentFile(text))
  5629. {
  5630. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5631. }
  5632. }
  5633. }
  5634. if (maid.status.personal.uniqueName == "Pure")
  5635. {
  5636. string text = "s2_";
  5637. Random random = new Random();
  5638. int num4 = random.Next(10000);
  5639. bool flag7 = false;
  5640. for (int k = 0; k < pureArray.Length; k++)
  5641. {
  5642. if (pureArray[k] == num4)
  5643. {
  5644. flag7 = true;
  5645. break;
  5646. }
  5647. }
  5648. if (!flag7)
  5649. {
  5650. text = text + "0" + num4.ToString() + ".ogg";
  5651. if (GameUty.FileSystem.IsExistentFile(text))
  5652. {
  5653. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5654. }
  5655. }
  5656. }
  5657. if (maid.status.personal.uniqueName == "Yandere")
  5658. {
  5659. string text = "s3_";
  5660. Random random = new Random();
  5661. int num4 = random.Next(10000);
  5662. bool flag7 = false;
  5663. for (int k = 0; k < yanArray.Length; k++)
  5664. {
  5665. if (yanArray[k] == num4)
  5666. {
  5667. flag7 = true;
  5668. break;
  5669. }
  5670. }
  5671. if (!flag7)
  5672. {
  5673. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5674. if (GameUty.FileSystem.IsExistentFile(text))
  5675. {
  5676. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5677. }
  5678. }
  5679. }
  5680. if (maid.status.personal.uniqueName == "Muku")
  5681. {
  5682. string text = "h0_";
  5683. Random random = new Random();
  5684. int num4 = random.Next(10000);
  5685. bool flag7 = false;
  5686. for (int k = 0; k < h0Array.Length; k++)
  5687. {
  5688. if (h0Array[k] == num4)
  5689. {
  5690. flag7 = true;
  5691. break;
  5692. }
  5693. }
  5694. if (flag7)
  5695. {
  5696. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5697. if (GameUty.FileSystem.IsExistentFile(text))
  5698. {
  5699. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5700. }
  5701. }
  5702. }
  5703. if (maid.status.personal.uniqueName == "Majime")
  5704. {
  5705. string text = "h1_";
  5706. Random random = new Random();
  5707. int num4 = random.Next(10000);
  5708. bool flag7 = false;
  5709. for (int k = 0; k < h1Array.Length; k++)
  5710. {
  5711. if (h1Array[k] == num4)
  5712. {
  5713. flag7 = true;
  5714. break;
  5715. }
  5716. }
  5717. if (flag7)
  5718. {
  5719. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5720. if (GameUty.FileSystem.IsExistentFile(text))
  5721. {
  5722. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5723. }
  5724. }
  5725. }
  5726. if (maid.status.personal.uniqueName == "Rindere")
  5727. {
  5728. string text = "h2_";
  5729. Random random = new Random();
  5730. int num4 = random.Next(10000);
  5731. bool flag7 = false;
  5732. for (int k = 0; k < h2Array.Length; k++)
  5733. {
  5734. if (h2Array[k] == num4)
  5735. {
  5736. flag7 = true;
  5737. break;
  5738. }
  5739. }
  5740. if (flag7)
  5741. {
  5742. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5743. if (GameUty.FileSystem.IsExistentFile(text))
  5744. {
  5745. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5746. }
  5747. }
  5748. }
  5749. }
  5750. else
  5751. {
  5752. xFlg[i] = false;
  5753. maid.AudioMan.Clear();
  5754. }
  5755. idoFlg[i] = true;
  5756. }
  5757. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5758. {
  5759. if (!zFlg[i])
  5760. {
  5761. zFlg[i] = true;
  5762. xFlg[i] = false;
  5763. string text = "";
  5764. if (maid.status.personal.uniqueName == "Pride")
  5765. {
  5766. text = "s0_";
  5767. Random random = new Random();
  5768. int num4 = random.Next(tunArray.Length);
  5769. object obj = text;
  5770. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5771. }
  5772. if (maid.status.personal.uniqueName == "Cool")
  5773. {
  5774. text = "s1_";
  5775. Random random = new Random();
  5776. int num4 = random.Next(coolArray.Length);
  5777. object obj = text;
  5778. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5779. }
  5780. if (maid.status.personal.uniqueName == "Pure")
  5781. {
  5782. text = "s2_";
  5783. Random random = new Random();
  5784. int num4 = random.Next(pureArray.Length);
  5785. object obj = text;
  5786. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5787. }
  5788. if (maid.status.personal.uniqueName == "Yandere")
  5789. {
  5790. text = "s3_";
  5791. Random random = new Random();
  5792. int num4 = random.Next(yanArray.Length);
  5793. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5794. }
  5795. if (maid.status.personal.uniqueName == "Muku")
  5796. {
  5797. text = "h0_";
  5798. Random random = new Random();
  5799. int num4 = random.Next(h0tArray.Length);
  5800. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5801. }
  5802. if (maid.status.personal.uniqueName == "Majime")
  5803. {
  5804. text = "h1_";
  5805. Random random = new Random();
  5806. int num4 = random.Next(h1tArray.Length);
  5807. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5808. }
  5809. if (maid.status.personal.uniqueName == "Rindere")
  5810. {
  5811. text = "h2_";
  5812. Random random = new Random();
  5813. int num4 = random.Next(h2tArray.Length);
  5814. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5815. }
  5816. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5817. }
  5818. else
  5819. {
  5820. zFlg[i] = false;
  5821. maid.AudioMan.Clear();
  5822. }
  5823. idoFlg[i] = true;
  5824. }
  5825. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5826. {
  5827. string text = "";
  5828. if (maid.status.personal.uniqueName == "Pride")
  5829. {
  5830. text = "s0_";
  5831. Random random = new Random();
  5832. int num4 = random.Next(tunArray.Length);
  5833. object obj = text;
  5834. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5835. }
  5836. if (maid.status.personal.uniqueName == "Cool")
  5837. {
  5838. text = "s1_";
  5839. Random random = new Random();
  5840. int num4 = random.Next(coolArray.Length);
  5841. object obj = text;
  5842. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5843. }
  5844. if (maid.status.personal.uniqueName == "Pure")
  5845. {
  5846. text = "s2_";
  5847. Random random = new Random();
  5848. int num4 = random.Next(pureArray.Length);
  5849. object obj = text;
  5850. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5851. }
  5852. if (maid.status.personal.uniqueName == "Yandere")
  5853. {
  5854. text = "s3_";
  5855. Random random = new Random();
  5856. int num4 = random.Next(yanArray.Length);
  5857. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5858. }
  5859. if (maid.status.personal.uniqueName == "Muku")
  5860. {
  5861. text = "h0_";
  5862. Random random = new Random();
  5863. int num4 = random.Next(h0tArray.Length);
  5864. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5865. }
  5866. if (maid.status.personal.uniqueName == "Majime")
  5867. {
  5868. text = "h1_";
  5869. Random random = new Random();
  5870. int num4 = random.Next(h1tArray.Length);
  5871. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5872. }
  5873. if (maid.status.personal.uniqueName == "Rindere")
  5874. {
  5875. text = "h2_";
  5876. Random random = new Random();
  5877. int num4 = random.Next(h2tArray.Length);
  5878. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5879. }
  5880. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5881. idoFlg[i] = true;
  5882. }
  5883. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5884. {
  5885. if (maid.status.personal.uniqueName == "Pride")
  5886. {
  5887. string text = "s0_";
  5888. Random random = new Random();
  5889. int num4 = random.Next(10000);
  5890. bool flag7 = false;
  5891. for (int k = 0; k < tunArray.Length; k++)
  5892. {
  5893. if (tunArray[k] == num4)
  5894. {
  5895. flag7 = true;
  5896. break;
  5897. }
  5898. }
  5899. if (!flag7)
  5900. {
  5901. text = text + "0" + num4.ToString() + ".ogg";
  5902. if (GameUty.FileSystem.IsExistentFile(text))
  5903. {
  5904. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5905. }
  5906. }
  5907. }
  5908. if (maid.status.personal.uniqueName == "Cool")
  5909. {
  5910. string text = "s1_";
  5911. Random random = new Random();
  5912. int num4 = random.Next(10000);
  5913. bool flag7 = false;
  5914. for (int k = 0; k < coolArray.Length; k++)
  5915. {
  5916. if (coolArray[k] == num4)
  5917. {
  5918. flag7 = true;
  5919. break;
  5920. }
  5921. }
  5922. if (!flag7)
  5923. {
  5924. text = text + "0" + num4.ToString() + ".ogg";
  5925. if (GameUty.FileSystem.IsExistentFile(text))
  5926. {
  5927. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5928. }
  5929. }
  5930. }
  5931. if (maid.status.personal.uniqueName == "Pure")
  5932. {
  5933. string text = "s2_";
  5934. Random random = new Random();
  5935. int num4 = random.Next(10000);
  5936. bool flag7 = false;
  5937. for (int k = 0; k < pureArray.Length; k++)
  5938. {
  5939. if (pureArray[k] == num4)
  5940. {
  5941. flag7 = true;
  5942. break;
  5943. }
  5944. }
  5945. if (!flag7)
  5946. {
  5947. text = text + "0" + num4.ToString() + ".ogg";
  5948. if (GameUty.FileSystem.IsExistentFile(text))
  5949. {
  5950. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5951. }
  5952. }
  5953. }
  5954. if (maid.status.personal.uniqueName == "Yandere")
  5955. {
  5956. string text = "s3_";
  5957. Random random = new Random();
  5958. int num4 = random.Next(10000);
  5959. bool flag7 = false;
  5960. for (int k = 0; k < yanArray.Length; k++)
  5961. {
  5962. if (yanArray[k] == num4)
  5963. {
  5964. flag7 = true;
  5965. break;
  5966. }
  5967. }
  5968. if (!flag7)
  5969. {
  5970. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5971. if (GameUty.FileSystem.IsExistentFile(text))
  5972. {
  5973. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5974. }
  5975. }
  5976. }
  5977. if (maid.status.personal.uniqueName == "Muku")
  5978. {
  5979. string text = "h0_";
  5980. Random random = new Random();
  5981. int num4 = random.Next(10000);
  5982. bool flag7 = false;
  5983. for (int k = 0; k < h0Array.Length; k++)
  5984. {
  5985. if (h0Array[k] == num4)
  5986. {
  5987. flag7 = true;
  5988. break;
  5989. }
  5990. }
  5991. if (flag7)
  5992. {
  5993. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5994. if (GameUty.FileSystem.IsExistentFile(text))
  5995. {
  5996. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5997. }
  5998. }
  5999. }
  6000. if (maid.status.personal.uniqueName == "Majime")
  6001. {
  6002. string text = "h1_";
  6003. Random random = new Random();
  6004. int num4 = random.Next(10000);
  6005. bool flag7 = false;
  6006. for (int k = 0; k < h1Array.Length; k++)
  6007. {
  6008. if (h1Array[k] == num4)
  6009. {
  6010. flag7 = true;
  6011. break;
  6012. }
  6013. }
  6014. if (flag7)
  6015. {
  6016. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6017. if (GameUty.FileSystem.IsExistentFile(text))
  6018. {
  6019. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6020. }
  6021. }
  6022. }
  6023. if (maid.status.personal.uniqueName == "Rindere")
  6024. {
  6025. string text = "h2_";
  6026. Random random = new Random();
  6027. int num4 = random.Next(10000);
  6028. bool flag7 = false;
  6029. for (int k = 0; k < h2Array.Length; k++)
  6030. {
  6031. if (h2Array[k] == num4)
  6032. {
  6033. flag7 = true;
  6034. break;
  6035. }
  6036. }
  6037. if (flag7)
  6038. {
  6039. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6040. if (GameUty.FileSystem.IsExistentFile(text))
  6041. {
  6042. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6043. }
  6044. }
  6045. }
  6046. idoFlg[i] = true;
  6047. }
  6048. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6049. {
  6050. Vector3 vector = maid.transform.position;
  6051. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6053. maid.SetPos(vector);
  6054. idoFlg[i] = true;
  6055. }
  6056. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6057. {
  6058. Vector3 vector = maid.transform.position;
  6059. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6060. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6061. maid.SetPos(vector);
  6062. idoFlg[i] = true;
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6065. {
  6066. Vector3 vector = maid.transform.position;
  6067. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6068. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6069. maid.SetPos(vector);
  6070. idoFlg[i] = true;
  6071. }
  6072. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6073. {
  6074. Vector3 vector = maid.transform.position;
  6075. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6076. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6077. maid.SetPos(vector);
  6078. idoFlg[i] = true;
  6079. }
  6080. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6081. {
  6082. Vector3 vector = maid.transform.position;
  6083. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6084. maid.SetPos(vector);
  6085. idoFlg[i] = true;
  6086. }
  6087. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6088. {
  6089. Vector3 vector = maid.transform.position;
  6090. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6091. maid.SetPos(vector);
  6092. idoFlg[i] = true;
  6093. }
  6094. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6095. {
  6096. Vector3 vector = maid.transform.position;
  6097. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6098. maid.SetPos(vector);
  6099. idoFlg[i] = true;
  6100. }
  6101. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6102. {
  6103. Vector3 vector = maid.transform.position;
  6104. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6105. maid.SetPos(vector);
  6106. idoFlg[i] = true;
  6107. }
  6108. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6109. {
  6110. Vector3 vector = maid.transform.position;
  6111. vector.y += 0.0075f * speed;
  6112. maid.SetPos(vector);
  6113. idoFlg[i] = true;
  6114. }
  6115. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6116. {
  6117. Vector3 vector = maid.transform.position;
  6118. vector.y -= 0.0075f * speed;
  6119. maid.SetPos(vector);
  6120. idoFlg[i] = true;
  6121. }
  6122. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6123. {
  6124. faceIndex[i]--;
  6125. if (faceIndex[i] <= -1)
  6126. {
  6127. faceIndex[i] = faceArray.Length - 1;
  6128. }
  6129. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6130. idoFlg[i] = true;
  6131. }
  6132. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6133. {
  6134. faceIndex[i]++;
  6135. if (faceIndex[i] == faceArray.Length)
  6136. {
  6137. faceIndex[i] = 0;
  6138. }
  6139. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6140. idoFlg[i] = true;
  6141. }
  6142. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6143. {
  6144. faceBlendIndex[i]++;
  6145. if (faceBlendIndex[i] == faceBlendArray.Length)
  6146. {
  6147. faceBlendIndex[i] = 0;
  6148. }
  6149. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6150. idoFlg[i] = true;
  6151. }
  6152. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6153. {
  6154. idoFlg[i] = true;
  6155. if (i >= 7)
  6156. {
  6157. idoFlg[i - 7] = true;
  6158. }
  6159. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6160. maid.transform.localScale.y * 1.005f,
  6161. maid.transform.localScale.z * 1.005f);
  6162. }
  6163. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6164. {
  6165. idoFlg[i] = true;
  6166. if (i >= 7)
  6167. {
  6168. idoFlg[i - 7] = true;
  6169. }
  6170. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6171. maid.transform.localScale.y * 0.995f,
  6172. maid.transform.localScale.z * 0.995f);
  6173. }
  6174. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6175. {
  6176. idoFlg[i] = true;
  6177. if (i >= 7)
  6178. {
  6179. idoFlg[i - 7] = true;
  6180. }
  6181. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6182. }
  6183. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6184. {
  6185. if (!isVR)
  6186. {
  6187. if (goSlot[(int)selectList[i]] != null)
  6188. {
  6189. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6190. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6191. {
  6192. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6193. }
  6194. }
  6195. }
  6196. maid.body0.SetMask(TBody.SlotID.wear, true);
  6197. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6198. maid.body0.SetMask(TBody.SlotID.bra, true);
  6199. maid.body0.SetMask(TBody.SlotID.panz, true);
  6200. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6201. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6202. isWear = true;
  6203. isSkirt = true;
  6204. isBra = true;
  6205. isPanz = true;
  6206. Random random = new Random();
  6207. int num4 = random.Next(2);
  6208. if (num4 == 1)
  6209. {
  6210. maid.body0.SetMask(TBody.SlotID.wear, false);
  6211. }
  6212. if (num4 == 1)
  6213. {
  6214. isWear = false;
  6215. }
  6216. num4 = random.Next(2);
  6217. if (num4 == 1)
  6218. {
  6219. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6220. }
  6221. if (num4 == 1)
  6222. {
  6223. isSkirt = false;
  6224. }
  6225. num4 = random.Next(2);
  6226. if (num4 == 1)
  6227. {
  6228. maid.body0.SetMask(TBody.SlotID.bra, false);
  6229. }
  6230. if (num4 == 1)
  6231. {
  6232. isBra = false;
  6233. }
  6234. num4 = random.Next(2);
  6235. if (num4 == 1)
  6236. {
  6237. maid.body0.SetMask(TBody.SlotID.panz, false);
  6238. }
  6239. if (num4 == 1)
  6240. {
  6241. isPanz = false;
  6242. }
  6243. num4 = random.Next(2);
  6244. if (num4 == 1)
  6245. {
  6246. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6247. }
  6248. num4 = random.Next(2);
  6249. if (num4 == 1)
  6250. {
  6251. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6252. }
  6253. hFlg = true;
  6254. idoFlg[i] = true;
  6255. if (i >= 7)
  6256. {
  6257. idoFlg[i - 7] = true;
  6258. }
  6259. }
  6260. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6261. {
  6262. poseIndex[i]--;
  6263. if (poseIndex[i] <= -1)
  6264. {
  6265. poseIndex[i] = poseArray.Length - 1;
  6266. }
  6267. if (maid && maid.Visible)
  6268. {
  6269. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6270. isStop[i] = false;
  6271. poseCount[i] = 20;
  6272. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6273. {
  6274. maid.body0.MuneYureL(0f);
  6275. maid.body0.MuneYureR(0f);
  6276. }
  6277. else
  6278. {
  6279. maid.body0.MuneYureL(1f);
  6280. maid.body0.MuneYureR(1f);
  6281. }
  6282. if (array[0].Contains("MultipleMaidsPose"))
  6283. {
  6284. string path = array[0].Split(new char[] { '/' })[1];
  6285. byte[] array2 = new byte[0];
  6286. try
  6287. {
  6288. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6289. {
  6290. array2 = new byte[fileStream.Length];
  6291. fileStream.Read(array2, 0, array2.Length);
  6292. }
  6293. }
  6294. catch { }
  6295. if (0 < array2.Length)
  6296. {
  6297. string text = Path.GetFileName(path);
  6298. long num5 = text.GetHashCode();
  6299. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6300. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6301. {
  6302. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6303. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6304. };
  6305. for (int m = 0; m < array3.Length; m++)
  6306. {
  6307. maid.SetAutoTwist(array3[m], true);
  6308. }
  6309. }
  6310. }
  6311. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6312. {
  6313. loadPose[i] = array[0];
  6314. }
  6315. else if (!array[0].StartsWith("dance_"))
  6316. {
  6317. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6318. }
  6319. else
  6320. {
  6321. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6322. {
  6323. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6324. }
  6325. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6326. }
  6327. if (array.Length > 1)
  6328. {
  6329. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6330. isStop[i] = true;
  6331. if (array.Length > 2)
  6332. {
  6333. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6334. isPoseIti[i] = true;
  6335. poseIti[i] = maidArray[i].transform.position;
  6336. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6337. }
  6338. }
  6339. }
  6340. idoFlg[i] = true;
  6341. if (i >= 7)
  6342. {
  6343. idoFlg[i - 7] = true;
  6344. }
  6345. }
  6346. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6347. {
  6348. int num7 = poseIndex[i];
  6349. for (int k = 0; k < groupList.Count; k++)
  6350. {
  6351. if (poseIndex[i] < (int)groupList[k])
  6352. {
  6353. poseIndex[i] = (int)groupList[k];
  6354. break;
  6355. }
  6356. }
  6357. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6358. {
  6359. poseIndex[i] = 0;
  6360. }
  6361. if (maid && maid.Visible)
  6362. {
  6363. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6364. isStop[i] = false;
  6365. poseCount[i] = 20;
  6366. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6367. {
  6368. maid.body0.MuneYureL(0f);
  6369. maid.body0.MuneYureR(0f);
  6370. }
  6371. else
  6372. {
  6373. maid.body0.MuneYureL(1f);
  6374. maid.body0.MuneYureR(1f);
  6375. }
  6376. if (array[0].Contains("MultipleMaidsPose"))
  6377. {
  6378. string path = array[0].Split(new char[] { '/' })[1];
  6379. byte[] array2 = new byte[0];
  6380. try
  6381. {
  6382. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6383. {
  6384. array2 = new byte[fileStream.Length];
  6385. fileStream.Read(array2, 0, array2.Length);
  6386. }
  6387. }
  6388. catch { }
  6389. if (0 < array2.Length)
  6390. {
  6391. string text = Path.GetFileName(path);
  6392. long num5 = text.GetHashCode();
  6393. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6394. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6395. {
  6396. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6397. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6398. };
  6399. for (int m = 0; m < array3.Length; m++)
  6400. {
  6401. maid.SetAutoTwist(array3[m], true);
  6402. }
  6403. }
  6404. }
  6405. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6406. {
  6407. loadPose[i] = array[0];
  6408. }
  6409. else if (!array[0].StartsWith("dance_"))
  6410. {
  6411. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6412. }
  6413. else
  6414. {
  6415. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6416. {
  6417. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6418. }
  6419. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6420. }
  6421. if (array.Length > 1)
  6422. {
  6423. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6424. isStop[i] = true;
  6425. if (array.Length > 2)
  6426. {
  6427. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6428. isPoseIti[i] = true;
  6429. poseIti[i] = maidArray[i].transform.position;
  6430. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6431. }
  6432. }
  6433. }
  6434. idoFlg[i] = true;
  6435. if (i >= 7)
  6436. {
  6437. idoFlg[i - 7] = true;
  6438. }
  6439. }
  6440. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6441. {
  6442. for (int k = 0; k < groupList.Count; k++)
  6443. {
  6444. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6445. {
  6446. if (poseIndex[i] == 0)
  6447. {
  6448. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6449. }
  6450. else
  6451. {
  6452. poseIndex[i] = 0;
  6453. }
  6454. break;
  6455. }
  6456. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6457. {
  6458. poseIndex[i] = (int)groupList[k - 1];
  6459. break;
  6460. }
  6461. }
  6462. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6463. {
  6464. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6465. }
  6466. if (maid && maid.Visible)
  6467. {
  6468. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6469. isStop[i] = false;
  6470. poseCount[i] = 20;
  6471. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6472. {
  6473. maid.body0.MuneYureL(0f);
  6474. maid.body0.MuneYureR(0f);
  6475. }
  6476. else
  6477. {
  6478. maid.body0.MuneYureL(1f);
  6479. maid.body0.MuneYureR(1f);
  6480. }
  6481. if (array[0].Contains("MultipleMaidsPose"))
  6482. {
  6483. string path = array[0].Split(new char[] { '/' })[1];
  6484. byte[] array2 = new byte[0];
  6485. try
  6486. {
  6487. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6488. {
  6489. array2 = new byte[fileStream.Length];
  6490. fileStream.Read(array2, 0, array2.Length);
  6491. }
  6492. }
  6493. catch { }
  6494. if (0 < array2.Length)
  6495. {
  6496. string text = Path.GetFileName(path);
  6497. long num5 = text.GetHashCode();
  6498. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6499. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6500. {
  6501. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6502. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6503. };
  6504. for (int m = 0; m < array3.Length; m++)
  6505. {
  6506. maid.SetAutoTwist(array3[m], true);
  6507. }
  6508. }
  6509. }
  6510. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6511. {
  6512. loadPose[i] = array[0];
  6513. }
  6514. else if (!array[0].StartsWith("dance_"))
  6515. {
  6516. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6517. }
  6518. else
  6519. {
  6520. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6521. {
  6522. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6523. }
  6524. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6525. }
  6526. if (array.Length > 1)
  6527. {
  6528. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6529. isStop[i] = true;
  6530. if (array.Length > 2)
  6531. {
  6532. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6533. isPoseIti[i] = true;
  6534. poseIti[i] = maidArray[i].transform.position;
  6535. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6536. }
  6537. }
  6538. }
  6539. idoFlg[i] = true;
  6540. if (i >= 7)
  6541. {
  6542. idoFlg[i - 7] = true;
  6543. }
  6544. }
  6545. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6546. {
  6547. headEyeIndex[i]++;
  6548. if (headEyeIndex[i] == headEyeArray.Length)
  6549. {
  6550. headEyeIndex[i] = 0;
  6551. }
  6552. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6553. maid.body0.boHeadToCam = true;
  6554. maid.body0.boEyeToCam = true;
  6555. if (headEyeIndex[i] == 0)
  6556. {
  6557. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6558. maid.body0.boHeadToCam = true;
  6559. maid.body0.boEyeToCam = true;
  6560. }
  6561. else
  6562. {
  6563. maid.body0.trsLookTarget = null;
  6564. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6565. if (headEyeIndex[i] == 1)
  6566. {
  6567. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6568. }
  6569. if (headEyeIndex[i] == 2)
  6570. {
  6571. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6572. }
  6573. if (headEyeIndex[i] == 3)
  6574. {
  6575. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6576. }
  6577. if (headEyeIndex[i] == 4)
  6578. {
  6579. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6580. }
  6581. if (headEyeIndex[i] == 5)
  6582. {
  6583. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6584. }
  6585. if (headEyeIndex[i] == 6)
  6586. {
  6587. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6588. }
  6589. if (headEyeIndex[i] == 7)
  6590. {
  6591. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6592. }
  6593. if (headEyeIndex[i] == 8)
  6594. {
  6595. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6596. }
  6597. if (headEyeIndex[i] == 9)
  6598. {
  6599. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6600. }
  6601. }
  6602. idoFlg[i] = true;
  6603. if (i >= 7)
  6604. {
  6605. idoFlg[i - 7] = true;
  6606. }
  6607. }
  6608. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6609. {
  6610. idoFlg[i] = true;
  6611. if (i >= 7)
  6612. {
  6613. idoFlg[i - 7] = true;
  6614. }
  6615. }
  6616. else if (Input.GetKeyUp(key))
  6617. {
  6618. if (idoFlg[i])
  6619. {
  6620. idoFlg[i] = false;
  6621. }
  6622. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6623. {
  6624. if (!isLock[i])
  6625. {
  6626. poseIndex[i]++;
  6627. if (poseIndex[i] == poseArray.Length)
  6628. {
  6629. poseIndex[i] = 0;
  6630. }
  6631. if (maid && maid.Visible)
  6632. {
  6633. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6634. isStop[i] = false;
  6635. poseCount[i] = 20;
  6636. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6637. {
  6638. maid.body0.MuneYureL(0f);
  6639. maid.body0.MuneYureR(0f);
  6640. }
  6641. else
  6642. {
  6643. maid.body0.MuneYureL(1f);
  6644. maid.body0.MuneYureR(1f);
  6645. }
  6646. if (array[0].Contains("MultipleMaidsPose"))
  6647. {
  6648. string path = array[0].Split(new char[] { '/' })[1];
  6649. byte[] array2 = new byte[0];
  6650. try
  6651. {
  6652. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6653. {
  6654. array2 = new byte[fileStream.Length];
  6655. fileStream.Read(array2, 0, array2.Length);
  6656. }
  6657. }
  6658. catch { }
  6659. if (0 < array2.Length)
  6660. {
  6661. string text = Path.GetFileName(path);
  6662. long num5 = text.GetHashCode();
  6663. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6664. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6665. {
  6666. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6667. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6668. };
  6669. for (int m = 0; m < array3.Length; m++)
  6670. {
  6671. maid.SetAutoTwist(array3[m], true);
  6672. }
  6673. }
  6674. }
  6675. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6676. {
  6677. loadPose[i] = array[0];
  6678. }
  6679. else if (!array[0].StartsWith("dance_"))
  6680. {
  6681. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6682. }
  6683. else
  6684. {
  6685. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6686. {
  6687. maid.body0.LoadAnime(array[0] + ".anm",
  6688. GameUty.FileSystem,
  6689. array[0] + ".anm",
  6690. false,
  6691. false);
  6692. }
  6693. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6694. }
  6695. if (array.Length > 1)
  6696. {
  6697. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6698. isStop[i] = true;
  6699. if (array.Length > 2)
  6700. {
  6701. Transform transform2 =
  6702. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6703. isPoseIti[i] = true;
  6704. poseIti[i] = maidArray[i].transform.position;
  6705. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6706. }
  6707. }
  6708. }
  6709. }
  6710. }
  6711. }
  6712. goto IL_1688E;
  6713. }
  6714. }
  6715. if (Input.GetKeyDown(KeyCode.E)) { }
  6716. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6717. {
  6718. bGui = false;
  6719. }
  6720. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6721. {
  6722. sceneFlg = true;
  6723. faceFlg = false;
  6724. poseFlg = false;
  6725. kankyoFlg = false;
  6726. kankyo2Flg = false;
  6727. bGui = true;
  6728. for (int i = 0; i < 10; i++)
  6729. {
  6730. date[i] = "未保存";
  6731. ninzu[i] = "";
  6732. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6733. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6734. {
  6735. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6736. if (array4.Length >= 2)
  6737. {
  6738. string[] array5 = array4[0].Split(new char[] { ',' });
  6739. date[i] = array5[0];
  6740. ninzu[i] = array5[1] + "人";
  6741. }
  6742. }
  6743. }
  6744. }
  6745. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6746. {
  6747. bgmIndex--;
  6748. if (bgmIndex <= -1)
  6749. {
  6750. bgmIndex = bgmArray.Length - 1;
  6751. }
  6752. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6753. bgmCombo.selectedItemIndex = bgmIndex;
  6754. }
  6755. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6756. {
  6757. bgmIndex++;
  6758. if (bgmIndex == bgmArray.Length)
  6759. {
  6760. bgmIndex = 0;
  6761. }
  6762. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6763. bgmCombo.selectedItemIndex = bgmIndex;
  6764. }
  6765. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6766. {
  6767. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6768. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6769. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6770. if (isMessage)
  6771. {
  6772. isMessage = false;
  6773. messageWindowMgr.CloseMessageWindowPanel();
  6774. }
  6775. else if (!bGuiMessage)
  6776. {
  6777. bGuiMessage = true;
  6778. }
  6779. else
  6780. {
  6781. bGuiMessage = false;
  6782. isMessage = false;
  6783. messageWindowMgr.CloseMessageWindowPanel();
  6784. }
  6785. }
  6786. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6787. {
  6788. escFlg = true;
  6789. for (int j = 0; j < maidCnt; j++)
  6790. {
  6791. if (maidArray[j] && maidArray[j].Visible)
  6792. {
  6793. maidArray[j].StopKuchipakuPattern();
  6794. if (isDanceStart7V)
  6795. {
  6796. maidArray[j].SetPos(dancePos[j]);
  6797. maidArray[j].body0.transform.localRotation = danceRot[j];
  6798. }
  6799. if (isDanceStart8V)
  6800. {
  6801. maidArray[j].SetPos(dancePos[j]);
  6802. maidArray[j].body0.transform.localRotation = danceRot[j];
  6803. }
  6804. if (isDanceStart11V)
  6805. {
  6806. maidArray[j].SetPos(dancePos[j]);
  6807. maidArray[j].body0.transform.localRotation = danceRot[j];
  6808. }
  6809. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6810. || isDanceStart13K)
  6811. {
  6812. maidArray[j].SetPos(dancePos[j]);
  6813. maidArray[j].body0.transform.localRotation = danceRot[j];
  6814. int i = j;
  6815. if (!isVR)
  6816. {
  6817. delCount[i] = 20;
  6818. if (goSlot[(int)selectList[i]] != null)
  6819. {
  6820. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6821. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6822. {
  6823. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6824. }
  6825. }
  6826. }
  6827. Maid maid = maidArray[j];
  6828. maid.DelProp(MPN.handitem, true);
  6829. maid.DelProp(MPN.accvag, true);
  6830. maid.DelProp(MPN.accanl, true);
  6831. maid.DelProp(MPN.kousoku_upper, true);
  6832. maid.DelProp(MPN.kousoku_lower, true);
  6833. maid.AllProcPropSeqStart();
  6834. }
  6835. if (isDanceStart14V)
  6836. {
  6837. maidArray[j].SetPos(dancePos[j]);
  6838. maidArray[j].body0.transform.localRotation = danceRot[j];
  6839. }
  6840. if (isDanceStart15V)
  6841. {
  6842. maidArray[j].SetPos(dancePos[j]);
  6843. maidArray[j].body0.transform.localRotation = danceRot[j];
  6844. }
  6845. }
  6846. }
  6847. isDanceStart1F = false;
  6848. isDanceStart1K = false;
  6849. isDanceStart2F = false;
  6850. isDanceStart3F = false;
  6851. isDanceStart3K = false;
  6852. isDanceStart4F = false;
  6853. isDanceStart4K = false;
  6854. isDanceStart5F = false;
  6855. isDanceStart5K = false;
  6856. isDanceStart6F = false;
  6857. isDanceStart6K = false;
  6858. isDanceStart7F = false;
  6859. isDanceStart7V = false;
  6860. isDanceStart8F = false;
  6861. isDanceStart8V = false;
  6862. isDanceStart8P = false;
  6863. isDanceStart9F = false;
  6864. isDanceStart9K = false;
  6865. isDanceStart10F = false;
  6866. isDanceStart11F = false;
  6867. isDanceStart11V = false;
  6868. isDanceStart12F = false;
  6869. isDanceStart13F = false;
  6870. isDanceStart13K = false;
  6871. isDanceStart14F = false;
  6872. isDanceStart14V = false;
  6873. isDanceStart15F = false;
  6874. isDanceStart15V = false;
  6875. for (int j = 0; j < maidCnt; j++)
  6876. {
  6877. danceFace[j] = 0f;
  6878. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6879. maidArray[j].SetAutoTwistAll(true);
  6880. }
  6881. danceCheckIndex = 0;
  6882. for (int k = 0; k < danceCheck.Length; k++)
  6883. {
  6884. danceCheck[danceCheckIndex] = 1f;
  6885. }
  6886. isDance = false;
  6887. isDanceChu = false;
  6888. if (maidArray[1] && maidArray[1].Visible)
  6889. {
  6890. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6891. {
  6892. Vector3 vector = Vector3.zero;
  6893. vector.x = 0.6f;
  6894. maidArray[1].SetPos(vector);
  6895. if (maidArray[2] && maidArray[2].Visible)
  6896. {
  6897. vector.x = -0.6f;
  6898. maidArray[2].SetPos(vector);
  6899. }
  6900. if (maidArray[3] && maidArray[3].Visible)
  6901. {
  6902. vector.x = 1.2f;
  6903. maidArray[3].SetPos(vector);
  6904. }
  6905. if (maidArray[4] && maidArray[4].Visible)
  6906. {
  6907. vector.x = -1.2f;
  6908. maidArray[4].SetPos(vector);
  6909. }
  6910. if (maidArray[5] && maidArray[5].Visible)
  6911. {
  6912. vector.x = 1.8f;
  6913. maidArray[5].SetPos(vector);
  6914. }
  6915. if (maidArray[6] && maidArray[6].Visible)
  6916. {
  6917. vector.x = -1.8f;
  6918. maidArray[6].SetPos(vector);
  6919. }
  6920. if (maidArray[7] && maidArray[7].Visible)
  6921. {
  6922. vector.x = 2.4f;
  6923. maidArray[7].SetPos(vector);
  6924. }
  6925. if (maidArray[8] && maidArray[8].Visible)
  6926. {
  6927. vector.x = -2.4f;
  6928. maidArray[8].SetPos(vector);
  6929. }
  6930. if (maidArray[9] && maidArray[9].Visible)
  6931. {
  6932. vector.x = 3f;
  6933. maidArray[9].SetPos(vector);
  6934. }
  6935. if (maidArray[10] && maidArray[10].Visible)
  6936. {
  6937. vector.x = -3f;
  6938. maidArray[10].SetPos(vector);
  6939. }
  6940. if (maidArray[11] && maidArray[11].Visible)
  6941. {
  6942. vector.x = 3.6f;
  6943. maidArray[11].SetPos(vector);
  6944. }
  6945. if (maidArray[12] && maidArray[12].Visible)
  6946. {
  6947. vector.x = -3.6f;
  6948. maidArray[12].SetPos(vector);
  6949. }
  6950. if (maidArray[13] && maidArray[13].Visible)
  6951. {
  6952. vector.x = 4.2f;
  6953. maidArray[13].SetPos(vector);
  6954. }
  6955. }
  6956. }
  6957. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6958. }
  6959. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6960. {
  6961. if (isScript)
  6962. {
  6963. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6964. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6965. if (isPanel)
  6966. {
  6967. isPanel = false;
  6968. }
  6969. else
  6970. {
  6971. isPanel = true;
  6972. }
  6973. gameObject5.SetActive(isPanel);
  6974. }
  6975. else
  6976. {
  6977. bGui = !bGui;
  6978. }
  6979. }
  6980. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6981. {
  6982. keyFlg = true;
  6983. bgIndex--;
  6984. if (bgIndex <= -1)
  6985. {
  6986. bgIndex = bgArray.Length - 1;
  6987. }
  6988. if (!moveBg)
  6989. {
  6990. bg.localScale = new Vector3(1f, 1f, 1f);
  6991. if (bgArray[bgIndex].Length == 36)
  6992. {
  6993. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6994. }
  6995. else
  6996. {
  6997. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6998. }
  6999. bgCombo.selectedItemIndex = bgIndex;
  7000. if (bgArray[bgIndex] == "karaokeroom")
  7001. {
  7002. bg.transform.position = bgObject.transform.position;
  7003. Vector3 vector = Vector3.zero;
  7004. Vector3 zero3 = Vector3.zero;
  7005. zero3.y = 90f;
  7006. vector.z = 4f;
  7007. vector.x = 1f;
  7008. bg.transform.localPosition = vector;
  7009. bg.transform.localRotation = Quaternion.Euler(zero3);
  7010. }
  7011. }
  7012. }
  7013. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  7014. {
  7015. keyFlg = true;
  7016. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  7017. }
  7018. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  7019. {
  7020. keyFlg = true;
  7021. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  7022. }
  7023. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  7024. {
  7025. keyFlg = true;
  7026. bg.localScale = new Vector3(1f, 1f, 1f);
  7027. }
  7028. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7029. {
  7030. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7031. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7032. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7033. Vector3 vector = bg.position;
  7034. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7035. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7036. bg.localPosition = vector;
  7037. if (Input.GetKey(KeyCode.Y))
  7038. {
  7039. keyFlg = true;
  7040. }
  7041. }
  7042. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7043. {
  7044. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7045. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7046. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7047. Vector3 vector = bg.position;
  7048. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7049. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7050. bg.localPosition = vector;
  7051. if (Input.GetKey(KeyCode.Y))
  7052. {
  7053. keyFlg = true;
  7054. }
  7055. }
  7056. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7057. {
  7058. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7059. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7060. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7061. Vector3 vector = bg.position;
  7062. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7063. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7064. bg.localPosition = vector;
  7065. if (Input.GetKey(KeyCode.Y))
  7066. {
  7067. keyFlg = true;
  7068. }
  7069. }
  7070. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7071. {
  7072. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7073. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7074. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7075. Vector3 vector = bg.position;
  7076. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7077. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7078. bg.localPosition = vector;
  7079. if (Input.GetKey(KeyCode.Y))
  7080. {
  7081. keyFlg = true;
  7082. }
  7083. }
  7084. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7085. {
  7086. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7087. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7088. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7089. Vector3 vector = bg.position;
  7090. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7091. bg.localPosition = vector;
  7092. if (Input.GetKey(KeyCode.Y))
  7093. {
  7094. keyFlg = true;
  7095. }
  7096. }
  7097. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7098. {
  7099. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7100. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7101. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7102. Vector3 vector = bg.position;
  7103. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7104. bg.localPosition = vector;
  7105. if (Input.GetKey(KeyCode.Y))
  7106. {
  7107. keyFlg = true;
  7108. }
  7109. }
  7110. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7111. {
  7112. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7113. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7114. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7115. Vector3 vector = bg.position;
  7116. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7117. bg.localPosition = vector;
  7118. if (Input.GetKey(KeyCode.Y))
  7119. {
  7120. keyFlg = true;
  7121. }
  7122. }
  7123. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7124. {
  7125. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7126. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7127. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7128. Vector3 vector = bg.position;
  7129. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7130. bg.localPosition = vector;
  7131. if (Input.GetKey(KeyCode.Y))
  7132. {
  7133. keyFlg = true;
  7134. }
  7135. }
  7136. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7137. {
  7138. Vector3 vector = bg.position;
  7139. vector.y -= 0.015f * speed;
  7140. bg.localPosition = vector;
  7141. if (Input.GetKey(KeyCode.Y))
  7142. {
  7143. keyFlg = true;
  7144. }
  7145. }
  7146. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7147. {
  7148. Vector3 vector = bg.position;
  7149. vector.y += 0.015f * speed;
  7150. bg.localPosition = vector;
  7151. if (Input.GetKey(KeyCode.Y))
  7152. {
  7153. keyFlg = true;
  7154. }
  7155. }
  7156. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7157. {
  7158. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7159. if (Input.GetKey(KeyCode.Y))
  7160. {
  7161. keyFlg = true;
  7162. }
  7163. }
  7164. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7165. {
  7166. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7167. if (Input.GetKey(KeyCode.Y))
  7168. {
  7169. keyFlg = true;
  7170. }
  7171. }
  7172. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7173. {
  7174. if (Input.GetKey(KeyCode.Y))
  7175. {
  7176. keyFlg = true;
  7177. }
  7178. }
  7179. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7180. {
  7181. if (keyFlg)
  7182. {
  7183. keyFlg = false;
  7184. }
  7185. else
  7186. {
  7187. bgIndex++;
  7188. if (bgIndex == bgArray.Length)
  7189. {
  7190. bgIndex = 0;
  7191. }
  7192. if (!moveBg)
  7193. {
  7194. bg.localScale = new Vector3(1f, 1f, 1f);
  7195. if (bgArray[bgIndex].Length == 36)
  7196. {
  7197. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7198. }
  7199. else
  7200. {
  7201. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7202. }
  7203. bgCombo.selectedItemIndex = bgIndex;
  7204. if (bgArray[bgIndex] == "karaokeroom")
  7205. {
  7206. bg.transform.position = bgObject.transform.position;
  7207. Vector3 vector = Vector3.zero;
  7208. Vector3 zero3 = Vector3.zero;
  7209. zero3.y = 90f;
  7210. vector.z = 4f;
  7211. vector.x = 1f;
  7212. bg.transform.localPosition = vector;
  7213. bg.transform.localRotation = Quaternion.Euler(zero3);
  7214. }
  7215. }
  7216. }
  7217. }
  7218. if (maidArray[0] != null && maidArray[0].Visible)
  7219. {
  7220. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7221. {
  7222. int[] array6 = new int[1];
  7223. int[] array7 = array6;
  7224. if (maidCnt == 2)
  7225. {
  7226. array7 = new int[] { 0, 1 };
  7227. }
  7228. if (maidCnt == 3)
  7229. {
  7230. array7 = new int[] { 0, 1, 2 };
  7231. }
  7232. if (maidCnt == 4)
  7233. {
  7234. array7 = new int[] { 0, 1, 2, 3 };
  7235. }
  7236. if (maidCnt == 5)
  7237. {
  7238. array7 = new int[] { 0, 1, 2, 3, 4 };
  7239. }
  7240. if (maidCnt == 6)
  7241. {
  7242. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7243. }
  7244. if (maidCnt == 7)
  7245. {
  7246. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7247. }
  7248. if (maidCnt == 8)
  7249. {
  7250. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7251. }
  7252. if (maidCnt == 9)
  7253. {
  7254. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7255. }
  7256. if (maidCnt == 10)
  7257. {
  7258. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7259. }
  7260. if (maidCnt == 11)
  7261. {
  7262. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7263. }
  7264. if (maidCnt == 12)
  7265. {
  7266. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7267. }
  7268. Random random = new Random();
  7269. int n = array7.Length;
  7270. while (n > 1)
  7271. {
  7272. n--;
  7273. int j = random.Next(n + 1);
  7274. int num8 = array7[j];
  7275. array7[j] = array7[n];
  7276. array7[n] = num8;
  7277. }
  7278. int[] array8 = new int[maidCnt];
  7279. Vector3[] array9 = new Vector3[maidCnt];
  7280. Vector3[] array10 = new Vector3[maidCnt];
  7281. int[] array11 = new int[maidCnt];
  7282. for (int i = 0; i < maidCnt; i++)
  7283. {
  7284. array8[array7[i]] = poseIndex[array7[i]];
  7285. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7286. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7287. array11[array7[i]] = headEyeIndex[array7[i]];
  7288. }
  7289. for (int i = 0; i < maidCnt; i++)
  7290. {
  7291. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7292. {
  7293. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7294. isStop[i] = false;
  7295. poseCount[i] = 20;
  7296. Maid maid = maidArray[i];
  7297. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7298. {
  7299. maid.body0.MuneYureL(0f);
  7300. maid.body0.MuneYureR(0f);
  7301. }
  7302. else
  7303. {
  7304. maid.body0.MuneYureL(1f);
  7305. maid.body0.MuneYureR(1f);
  7306. }
  7307. if (array12[0].Contains("MultipleMaidsPose"))
  7308. {
  7309. string path = array12[0].Split(new char[] { '/' })[1];
  7310. byte[] array2 = new byte[0];
  7311. try
  7312. {
  7313. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7314. {
  7315. array2 = new byte[fileStream.Length];
  7316. fileStream.Read(array2, 0, array2.Length);
  7317. }
  7318. }
  7319. catch { }
  7320. if (0 < array2.Length)
  7321. {
  7322. string text = Path.GetFileName(path);
  7323. long num5 = text.GetHashCode();
  7324. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7325. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7326. {
  7327. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7328. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7329. };
  7330. for (int m = 0; m < array3.Length; m++)
  7331. {
  7332. maid.SetAutoTwist(array3[m], true);
  7333. }
  7334. }
  7335. }
  7336. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7337. {
  7338. loadPose[i] = array12[0];
  7339. }
  7340. else if (!array12[0].StartsWith("dance_"))
  7341. {
  7342. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7343. }
  7344. else
  7345. {
  7346. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7347. {
  7348. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7349. GameUty.FileSystem,
  7350. array12[0] + ".anm",
  7351. false,
  7352. false);
  7353. }
  7354. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7355. }
  7356. if (array12.Length > 1)
  7357. {
  7358. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7359. float.Parse(array12[1]);
  7360. isStop[i] = true;
  7361. if (array12.Length > 2)
  7362. {
  7363. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7364. isPoseIti[i] = true;
  7365. poseIti[i] = maidArray[i].transform.position;
  7366. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7367. }
  7368. }
  7369. }
  7370. poseIndex[i] = array8[array7[i]];
  7371. maidArray[i].SetRot(array9[array7[i]]);
  7372. maidArray[i].SetPos(array10[array7[i]]);
  7373. headEyeIndex[i] = array11[array7[i]];
  7374. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7375. maidArray[i].body0.boHeadToCam = true;
  7376. maidArray[i].body0.boEyeToCam = true;
  7377. if (headEyeIndex[i] == 0)
  7378. {
  7379. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7380. maidArray[i].body0.boHeadToCam = true;
  7381. maidArray[i].body0.boEyeToCam = true;
  7382. }
  7383. else
  7384. {
  7385. maidArray[i].body0.trsLookTarget = null;
  7386. if (headEyeIndex[i] == 1)
  7387. {
  7388. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7389. }
  7390. if (headEyeIndex[i] == 2)
  7391. {
  7392. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7393. }
  7394. if (headEyeIndex[i] == 3)
  7395. {
  7396. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7397. }
  7398. if (headEyeIndex[i] == 4)
  7399. {
  7400. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7401. }
  7402. if (headEyeIndex[i] == 5)
  7403. {
  7404. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7405. }
  7406. if (headEyeIndex[i] == 6)
  7407. {
  7408. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7409. }
  7410. if (headEyeIndex[i] == 7)
  7411. {
  7412. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7413. }
  7414. if (headEyeIndex[i] == 8)
  7415. {
  7416. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7417. }
  7418. if (headEyeIndex[i] == 9)
  7419. {
  7420. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7421. }
  7422. }
  7423. }
  7424. }
  7425. else if (Input.GetKeyDown(KeyCode.Comma))
  7426. {
  7427. int[] array8 = new int[maidCnt];
  7428. Vector3[] array9 = new Vector3[maidCnt];
  7429. Vector3[] array10 = new Vector3[maidCnt];
  7430. int[] array11 = new int[maidCnt];
  7431. for (int i = 0; i < maidCnt; i++)
  7432. {
  7433. array8[i] = poseIndex[i];
  7434. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7435. array10[i] = maidArray[i].transform.position;
  7436. array11[i] = headEyeIndex[i];
  7437. }
  7438. for (int i = 0; i < maidCnt; i++)
  7439. {
  7440. if (i == 0)
  7441. {
  7442. if (!isLock[i])
  7443. {
  7444. if (maidArray[i] && maidArray[i].Visible)
  7445. {
  7446. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7447. isStop[i] = false;
  7448. poseCount[i] = 20;
  7449. Maid maid = maidArray[i];
  7450. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7451. {
  7452. maid.body0.MuneYureL(0f);
  7453. maid.body0.MuneYureR(0f);
  7454. }
  7455. else
  7456. {
  7457. maid.body0.MuneYureL(1f);
  7458. maid.body0.MuneYureR(1f);
  7459. }
  7460. if (array12[0].Contains("MultipleMaidsPose"))
  7461. {
  7462. string path = array12[0].Split(new char[] { '/' })[1];
  7463. byte[] array2 = new byte[0];
  7464. try
  7465. {
  7466. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7467. {
  7468. array2 = new byte[fileStream.Length];
  7469. fileStream.Read(array2, 0, array2.Length);
  7470. }
  7471. }
  7472. catch { }
  7473. if (0 < array2.Length)
  7474. {
  7475. string text = Path.GetFileName(path);
  7476. long num5 = text.GetHashCode();
  7477. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7478. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7479. {
  7480. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7481. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7482. };
  7483. for (int m = 0; m < array3.Length; m++)
  7484. {
  7485. maid.SetAutoTwist(array3[m], true);
  7486. }
  7487. }
  7488. }
  7489. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7490. {
  7491. loadPose[i] = array12[0];
  7492. }
  7493. else if (!array12[0].StartsWith("dance_"))
  7494. {
  7495. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7496. }
  7497. else
  7498. {
  7499. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7500. {
  7501. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7502. GameUty.FileSystem,
  7503. array12[0] + ".anm",
  7504. false,
  7505. false);
  7506. }
  7507. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7508. }
  7509. if (array12.Length > 1)
  7510. {
  7511. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7512. float.Parse(array12[1]);
  7513. isStop[i] = true;
  7514. if (array12.Length > 2)
  7515. {
  7516. Transform transform2 =
  7517. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7518. isPoseIti[i] = true;
  7519. poseIti[i] = maidArray[i].transform.position;
  7520. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7521. }
  7522. }
  7523. }
  7524. }
  7525. poseIndex[i] = array8[maidCnt - i - 1];
  7526. headEyeIndex[i] = array11[maidCnt - i - 1];
  7527. }
  7528. else
  7529. {
  7530. if (!isLock[i])
  7531. {
  7532. if (maidArray[i] && maidArray[i].Visible)
  7533. {
  7534. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7535. isStop[i] = false;
  7536. poseCount[i] = 20;
  7537. Maid maid = maidArray[i];
  7538. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7539. {
  7540. maid.body0.MuneYureL(0f);
  7541. maid.body0.MuneYureR(0f);
  7542. }
  7543. else
  7544. {
  7545. maid.body0.MuneYureL(1f);
  7546. maid.body0.MuneYureR(1f);
  7547. }
  7548. if (array12[0].Contains("MultipleMaidsPose"))
  7549. {
  7550. string path = array12[0].Split(new char[] { '/' })[1];
  7551. byte[] array2 = new byte[0];
  7552. try
  7553. {
  7554. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7555. {
  7556. array2 = new byte[fileStream.Length];
  7557. fileStream.Read(array2, 0, array2.Length);
  7558. }
  7559. }
  7560. catch { }
  7561. if (0 < array2.Length)
  7562. {
  7563. string text = Path.GetFileName(path);
  7564. long num5 = text.GetHashCode();
  7565. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7566. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7567. {
  7568. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7569. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7570. };
  7571. for (int m = 0; m < array3.Length; m++)
  7572. {
  7573. maid.SetAutoTwist(array3[m], true);
  7574. }
  7575. }
  7576. }
  7577. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7578. {
  7579. loadPose[i] = array12[0];
  7580. }
  7581. else if (!array12[0].StartsWith("dance_"))
  7582. {
  7583. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7584. }
  7585. else
  7586. {
  7587. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7588. {
  7589. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7590. GameUty.FileSystem,
  7591. array12[0] + ".anm",
  7592. false,
  7593. false);
  7594. }
  7595. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7596. }
  7597. if (array12.Length > 1)
  7598. {
  7599. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7600. float.Parse(array12[1]);
  7601. isStop[i] = true;
  7602. if (array12.Length > 2)
  7603. {
  7604. Transform transform2 =
  7605. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7606. isPoseIti[i] = true;
  7607. poseIti[i] = maidArray[i].transform.position;
  7608. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7609. }
  7610. }
  7611. }
  7612. }
  7613. poseIndex[i] = array8[i - 1];
  7614. headEyeIndex[i] = array11[i - 1];
  7615. }
  7616. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7617. maidArray[i].body0.boHeadToCam = true;
  7618. maidArray[i].body0.boEyeToCam = true;
  7619. if (headEyeIndex[i] == 0)
  7620. {
  7621. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7622. maidArray[i].body0.boHeadToCam = true;
  7623. maidArray[i].body0.boEyeToCam = true;
  7624. }
  7625. else
  7626. {
  7627. maidArray[i].body0.trsLookTarget = null;
  7628. if (headEyeIndex[i] == 1)
  7629. {
  7630. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7631. }
  7632. if (headEyeIndex[i] == 2)
  7633. {
  7634. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7635. }
  7636. if (headEyeIndex[i] == 3)
  7637. {
  7638. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7639. }
  7640. if (headEyeIndex[i] == 4)
  7641. {
  7642. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7643. }
  7644. if (headEyeIndex[i] == 5)
  7645. {
  7646. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7647. }
  7648. if (headEyeIndex[i] == 6)
  7649. {
  7650. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7651. }
  7652. if (headEyeIndex[i] == 7)
  7653. {
  7654. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7655. }
  7656. if (headEyeIndex[i] == 8)
  7657. {
  7658. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7659. }
  7660. if (headEyeIndex[i] == 9)
  7661. {
  7662. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7663. }
  7664. }
  7665. if (i == 0)
  7666. {
  7667. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7668. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7669. }
  7670. else
  7671. {
  7672. maidArray[i].SetRot(array9[i - 1]);
  7673. maidArray[i].SetPos(array10[i - 1]);
  7674. }
  7675. }
  7676. }
  7677. for (int i = 0; i < maidCnt; i++)
  7678. {
  7679. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7680. {
  7681. if (maidArray[i] && maidArray[i].Visible)
  7682. {
  7683. maidArray[i].body0.transform.localRotation =
  7684. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7685. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7686. }
  7687. }
  7688. else if (Input.GetKey(KeyCode.B))
  7689. {
  7690. if (maidArray[i] && maidArray[i].Visible)
  7691. {
  7692. maidArray[i].body0.transform.localRotation =
  7693. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7694. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7695. }
  7696. }
  7697. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7698. {
  7699. if (maidArray[1] && maidArray[1].Visible)
  7700. {
  7701. if (maidArray[0].transform.position == maidArray[1].transform.position
  7702. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7703. {
  7704. Vector3 vector = Vector3.zero;
  7705. vector.x = 0.6f;
  7706. maidArray[1].SetPos(vector);
  7707. if (maidArray[2] && maidArray[2].Visible)
  7708. {
  7709. vector.x = -0.6f;
  7710. maidArray[2].SetPos(vector);
  7711. }
  7712. if (maidArray[3] && maidArray[3].Visible)
  7713. {
  7714. vector.x = 1.2f;
  7715. maidArray[3].SetPos(vector);
  7716. }
  7717. if (maidArray[4] && maidArray[4].Visible)
  7718. {
  7719. vector.x = -1.2f;
  7720. maidArray[4].SetPos(vector);
  7721. }
  7722. if (maidArray[5] && maidArray[5].Visible)
  7723. {
  7724. vector.x = 1.8f;
  7725. maidArray[5].SetPos(vector);
  7726. }
  7727. if (maidArray[6] && maidArray[6].Visible)
  7728. {
  7729. vector.x = -1.8f;
  7730. maidArray[6].SetPos(vector);
  7731. }
  7732. if (maidArray[7] && maidArray[7].Visible)
  7733. {
  7734. vector.x = 2.4f;
  7735. maidArray[7].SetPos(vector);
  7736. }
  7737. if (maidArray[8] && maidArray[8].Visible)
  7738. {
  7739. vector.x = -2.4f;
  7740. maidArray[8].SetPos(vector);
  7741. }
  7742. if (maidArray[9] && maidArray[9].Visible)
  7743. {
  7744. vector.x = 3f;
  7745. maidArray[9].SetPos(vector);
  7746. }
  7747. if (maidArray[10] && maidArray[10].Visible)
  7748. {
  7749. vector.x = -3f;
  7750. maidArray[10].SetPos(vector);
  7751. }
  7752. if (maidArray[11] && maidArray[11].Visible)
  7753. {
  7754. vector.x = 3.6f;
  7755. maidArray[11].SetPos(vector);
  7756. }
  7757. if (maidArray[12] && maidArray[12].Visible)
  7758. {
  7759. vector.x = -3.6f;
  7760. maidArray[12].SetPos(vector);
  7761. }
  7762. if (maidArray[13] && maidArray[13].Visible)
  7763. {
  7764. vector.x = 4.2f;
  7765. maidArray[13].SetPos(vector);
  7766. }
  7767. }
  7768. }
  7769. for (int k = 0; k < groupList.Count; k++)
  7770. {
  7771. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7772. {
  7773. if (poseIndex[i] == 0)
  7774. {
  7775. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7776. }
  7777. else
  7778. {
  7779. poseIndex[i] = 0;
  7780. }
  7781. break;
  7782. }
  7783. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7784. {
  7785. poseIndex[i] = (int)groupList[k - 1];
  7786. break;
  7787. }
  7788. }
  7789. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7790. {
  7791. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7792. }
  7793. if (maidArray[i] && maidArray[i].Visible)
  7794. {
  7795. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7796. isStop[i] = false;
  7797. poseCount[i] = 20;
  7798. Maid maid = maidArray[i];
  7799. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7800. {
  7801. maid.body0.MuneYureL(0f);
  7802. maid.body0.MuneYureR(0f);
  7803. }
  7804. else
  7805. {
  7806. maid.body0.MuneYureL(1f);
  7807. maid.body0.MuneYureR(1f);
  7808. }
  7809. if (array[0].Contains("MultipleMaidsPose"))
  7810. {
  7811. string path = array[0].Split(new char[] { '/' })[1];
  7812. byte[] array2 = new byte[0];
  7813. try
  7814. {
  7815. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7816. {
  7817. array2 = new byte[fileStream.Length];
  7818. fileStream.Read(array2, 0, array2.Length);
  7819. }
  7820. }
  7821. catch { }
  7822. if (0 < array2.Length)
  7823. {
  7824. string text = Path.GetFileName(path);
  7825. long num5 = text.GetHashCode();
  7826. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7827. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7828. {
  7829. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7830. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7831. };
  7832. for (int m = 0; m < array3.Length; m++)
  7833. {
  7834. maid.SetAutoTwist(array3[m], true);
  7835. }
  7836. }
  7837. }
  7838. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7839. {
  7840. loadPose[i] = array[0];
  7841. }
  7842. else if (!array[0].StartsWith("dance_"))
  7843. {
  7844. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7845. }
  7846. else
  7847. {
  7848. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7849. {
  7850. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7851. GameUty.FileSystem,
  7852. array[0] + ".anm",
  7853. false,
  7854. false);
  7855. }
  7856. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7857. }
  7858. if (array.Length > 1)
  7859. {
  7860. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7861. isStop[i] = true;
  7862. if (array.Length > 2)
  7863. {
  7864. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7865. isPoseIti[i] = true;
  7866. poseIti[i] = maidArray[i].transform.position;
  7867. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7868. }
  7869. }
  7870. }
  7871. }
  7872. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7873. {
  7874. if (maidArray[1] && maidArray[1].Visible)
  7875. {
  7876. if (maidArray[0].transform.position == maidArray[1].transform.position
  7877. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7878. {
  7879. Vector3 vector = Vector3.zero;
  7880. vector.x = 0.6f;
  7881. maidArray[1].SetPos(vector);
  7882. if (maidArray[2] && maidArray[2].Visible)
  7883. {
  7884. vector.x = -0.6f;
  7885. maidArray[2].SetPos(vector);
  7886. }
  7887. if (maidArray[3] && maidArray[3].Visible)
  7888. {
  7889. vector.x = 1.2f;
  7890. maidArray[3].SetPos(vector);
  7891. }
  7892. if (maidArray[4] && maidArray[4].Visible)
  7893. {
  7894. vector.x = -1.2f;
  7895. maidArray[4].SetPos(vector);
  7896. }
  7897. if (maidArray[5] && maidArray[5].Visible)
  7898. {
  7899. vector.x = 1.8f;
  7900. maidArray[5].SetPos(vector);
  7901. }
  7902. if (maidArray[6] && maidArray[6].Visible)
  7903. {
  7904. vector.x = -1.8f;
  7905. maidArray[6].SetPos(vector);
  7906. }
  7907. if (maidArray[7] && maidArray[7].Visible)
  7908. {
  7909. vector.x = 2.4f;
  7910. maidArray[7].SetPos(vector);
  7911. }
  7912. if (maidArray[8] && maidArray[8].Visible)
  7913. {
  7914. vector.x = -2.4f;
  7915. maidArray[8].SetPos(vector);
  7916. }
  7917. if (maidArray[9] && maidArray[9].Visible)
  7918. {
  7919. vector.x = 3f;
  7920. maidArray[9].SetPos(vector);
  7921. }
  7922. if (maidArray[10] && maidArray[10].Visible)
  7923. {
  7924. vector.x = -3f;
  7925. maidArray[10].SetPos(vector);
  7926. }
  7927. if (maidArray[11] && maidArray[11].Visible)
  7928. {
  7929. vector.x = 3.6f;
  7930. maidArray[11].SetPos(vector);
  7931. }
  7932. if (maidArray[12] && maidArray[12].Visible)
  7933. {
  7934. vector.x = -3.6f;
  7935. maidArray[12].SetPos(vector);
  7936. }
  7937. if (maidArray[13] && maidArray[13].Visible)
  7938. {
  7939. vector.x = 4.2f;
  7940. maidArray[13].SetPos(vector);
  7941. }
  7942. }
  7943. }
  7944. int num7 = poseIndex[i];
  7945. for (int k = 0; k < groupList.Count; k++)
  7946. {
  7947. if (poseIndex[i] < (int)groupList[k])
  7948. {
  7949. poseIndex[i] = (int)groupList[k];
  7950. break;
  7951. }
  7952. }
  7953. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7954. {
  7955. poseIndex[i] = 0;
  7956. }
  7957. if (maidArray[i] && maidArray[i].Visible)
  7958. {
  7959. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7960. isStop[i] = false;
  7961. poseCount[i] = 20;
  7962. Maid maid = maidArray[i];
  7963. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7964. {
  7965. maid.body0.MuneYureL(0f);
  7966. maid.body0.MuneYureR(0f);
  7967. }
  7968. else
  7969. {
  7970. maid.body0.MuneYureL(1f);
  7971. maid.body0.MuneYureR(1f);
  7972. }
  7973. if (array[0].Contains("MultipleMaidsPose"))
  7974. {
  7975. string path = array[0].Split(new char[] { '/' })[1];
  7976. byte[] array2 = new byte[0];
  7977. try
  7978. {
  7979. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7980. {
  7981. array2 = new byte[fileStream.Length];
  7982. fileStream.Read(array2, 0, array2.Length);
  7983. }
  7984. }
  7985. catch { }
  7986. if (0 < array2.Length)
  7987. {
  7988. string text = Path.GetFileName(path);
  7989. long num5 = text.GetHashCode();
  7990. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7991. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7992. {
  7993. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7994. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7995. };
  7996. for (int m = 0; m < array3.Length; m++)
  7997. {
  7998. maid.SetAutoTwist(array3[m], true);
  7999. }
  8000. }
  8001. }
  8002. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8003. {
  8004. loadPose[i] = array[0];
  8005. }
  8006. else if (!array[0].StartsWith("dance_"))
  8007. {
  8008. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8009. }
  8010. else
  8011. {
  8012. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8013. {
  8014. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8015. GameUty.FileSystem,
  8016. array[0] + ".anm",
  8017. false,
  8018. false);
  8019. }
  8020. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8021. }
  8022. if (array.Length > 1)
  8023. {
  8024. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8025. isStop[i] = true;
  8026. if (array.Length > 2)
  8027. {
  8028. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8029. isPoseIti[i] = true;
  8030. poseIti[i] = maidArray[i].transform.position;
  8031. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8032. }
  8033. }
  8034. }
  8035. }
  8036. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8037. {
  8038. if (maidArray[1] && maidArray[1].Visible)
  8039. {
  8040. if (maidArray[0].transform.position == maidArray[1].transform.position
  8041. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8042. {
  8043. Vector3 vector = Vector3.zero;
  8044. vector.x = 0.6f;
  8045. maidArray[1].SetPos(vector);
  8046. if (maidArray[2] && maidArray[2].Visible)
  8047. {
  8048. vector.x = -0.6f;
  8049. maidArray[2].SetPos(vector);
  8050. }
  8051. if (maidArray[3] && maidArray[3].Visible)
  8052. {
  8053. vector.x = 1.2f;
  8054. maidArray[3].SetPos(vector);
  8055. }
  8056. if (maidArray[4] && maidArray[4].Visible)
  8057. {
  8058. vector.x = -1.2f;
  8059. maidArray[4].SetPos(vector);
  8060. }
  8061. if (maidArray[5] && maidArray[5].Visible)
  8062. {
  8063. vector.x = 1.8f;
  8064. maidArray[5].SetPos(vector);
  8065. }
  8066. if (maidArray[6] && maidArray[6].Visible)
  8067. {
  8068. vector.x = -1.8f;
  8069. maidArray[6].SetPos(vector);
  8070. }
  8071. if (maidArray[7] && maidArray[7].Visible)
  8072. {
  8073. vector.x = 2.4f;
  8074. maidArray[7].SetPos(vector);
  8075. }
  8076. if (maidArray[8] && maidArray[8].Visible)
  8077. {
  8078. vector.x = -2.4f;
  8079. maidArray[8].SetPos(vector);
  8080. }
  8081. if (maidArray[9] && maidArray[9].Visible)
  8082. {
  8083. vector.x = 3f;
  8084. maidArray[9].SetPos(vector);
  8085. }
  8086. if (maidArray[10] && maidArray[10].Visible)
  8087. {
  8088. vector.x = -3f;
  8089. maidArray[10].SetPos(vector);
  8090. }
  8091. if (maidArray[11] && maidArray[11].Visible)
  8092. {
  8093. vector.x = 3.6f;
  8094. maidArray[11].SetPos(vector);
  8095. }
  8096. if (maidArray[12] && maidArray[12].Visible)
  8097. {
  8098. vector.x = -3.6f;
  8099. maidArray[12].SetPos(vector);
  8100. }
  8101. if (maidArray[13] && maidArray[13].Visible)
  8102. {
  8103. vector.x = 4.2f;
  8104. maidArray[13].SetPos(vector);
  8105. }
  8106. }
  8107. }
  8108. poseIndex[i]--;
  8109. if (poseIndex[i] <= -1)
  8110. {
  8111. poseIndex[i] = poseArray.Length - 1;
  8112. }
  8113. if (maidArray[i] && maidArray[i].Visible)
  8114. {
  8115. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8116. isStop[i] = false;
  8117. poseCount[i] = 20;
  8118. Maid maid = maidArray[i];
  8119. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8120. {
  8121. maid.body0.MuneYureL(0f);
  8122. maid.body0.MuneYureR(0f);
  8123. }
  8124. else
  8125. {
  8126. maid.body0.MuneYureL(1f);
  8127. maid.body0.MuneYureR(1f);
  8128. }
  8129. if (array[0].Contains("MultipleMaidsPose"))
  8130. {
  8131. string path = array[0].Split(new char[] { '/' })[1];
  8132. byte[] array2 = new byte[0];
  8133. try
  8134. {
  8135. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8136. {
  8137. array2 = new byte[fileStream.Length];
  8138. fileStream.Read(array2, 0, array2.Length);
  8139. }
  8140. }
  8141. catch { }
  8142. if (0 < array2.Length)
  8143. {
  8144. string text = Path.GetFileName(path);
  8145. long num5 = text.GetHashCode();
  8146. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8147. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8148. {
  8149. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8150. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8151. };
  8152. for (int m = 0; m < array3.Length; m++)
  8153. {
  8154. maid.SetAutoTwist(array3[m], true);
  8155. }
  8156. }
  8157. }
  8158. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8159. {
  8160. loadPose[i] = array[0];
  8161. }
  8162. else if (!array[0].StartsWith("dance_"))
  8163. {
  8164. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8165. }
  8166. else
  8167. {
  8168. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8169. {
  8170. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8171. GameUty.FileSystem,
  8172. array[0] + ".anm",
  8173. false,
  8174. false);
  8175. }
  8176. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8177. }
  8178. if (array.Length > 1)
  8179. {
  8180. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8181. isStop[i] = true;
  8182. if (array.Length > 2)
  8183. {
  8184. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8185. isPoseIti[i] = true;
  8186. poseIti[i] = maidArray[i].transform.position;
  8187. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8188. }
  8189. }
  8190. }
  8191. }
  8192. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8193. {
  8194. if (maidArray[1] && maidArray[1].Visible)
  8195. {
  8196. if (maidArray[0].transform.position == maidArray[1].transform.position
  8197. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8198. {
  8199. Vector3 vector = Vector3.zero;
  8200. vector.x = 0.6f;
  8201. maidArray[1].SetPos(vector);
  8202. if (maidArray[2] && maidArray[2].Visible)
  8203. {
  8204. vector.x = -0.6f;
  8205. maidArray[2].SetPos(vector);
  8206. }
  8207. if (maidArray[3] && maidArray[3].Visible)
  8208. {
  8209. vector.x = 1.2f;
  8210. maidArray[3].SetPos(vector);
  8211. }
  8212. if (maidArray[4] && maidArray[4].Visible)
  8213. {
  8214. vector.x = -1.2f;
  8215. maidArray[4].SetPos(vector);
  8216. }
  8217. if (maidArray[5] && maidArray[5].Visible)
  8218. {
  8219. vector.x = 1.8f;
  8220. maidArray[5].SetPos(vector);
  8221. }
  8222. if (maidArray[6] && maidArray[6].Visible)
  8223. {
  8224. vector.x = -1.8f;
  8225. maidArray[6].SetPos(vector);
  8226. }
  8227. if (maidArray[7] && maidArray[7].Visible)
  8228. {
  8229. vector.x = 2.4f;
  8230. maidArray[7].SetPos(vector);
  8231. }
  8232. if (maidArray[8] && maidArray[8].Visible)
  8233. {
  8234. vector.x = -2.4f;
  8235. maidArray[8].SetPos(vector);
  8236. }
  8237. if (maidArray[9] && maidArray[9].Visible)
  8238. {
  8239. vector.x = 3f;
  8240. maidArray[9].SetPos(vector);
  8241. }
  8242. if (maidArray[10] && maidArray[10].Visible)
  8243. {
  8244. vector.x = -3f;
  8245. maidArray[10].SetPos(vector);
  8246. }
  8247. if (maidArray[11] && maidArray[11].Visible)
  8248. {
  8249. vector.x = 3.6f;
  8250. maidArray[11].SetPos(vector);
  8251. }
  8252. if (maidArray[12] && maidArray[12].Visible)
  8253. {
  8254. vector.x = -3.6f;
  8255. maidArray[12].SetPos(vector);
  8256. }
  8257. if (maidArray[13] && maidArray[13].Visible)
  8258. {
  8259. vector.x = 4.2f;
  8260. maidArray[13].SetPos(vector);
  8261. }
  8262. }
  8263. }
  8264. poseIndex[i]++;
  8265. if (poseIndex[i] == poseArray.Length)
  8266. {
  8267. poseIndex[i] = 0;
  8268. }
  8269. if (maidArray[i] && maidArray[i].Visible)
  8270. {
  8271. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8272. isStop[i] = false;
  8273. poseCount[i] = 20;
  8274. Maid maid = maidArray[i];
  8275. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8276. {
  8277. maid.body0.MuneYureL(0f);
  8278. maid.body0.MuneYureR(0f);
  8279. }
  8280. else
  8281. {
  8282. maid.body0.MuneYureL(1f);
  8283. maid.body0.MuneYureR(1f);
  8284. }
  8285. if (array[0].Contains("MultipleMaidsPose"))
  8286. {
  8287. string path = array[0].Split(new char[] { '/' })[1];
  8288. byte[] array2 = new byte[0];
  8289. try
  8290. {
  8291. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8292. {
  8293. array2 = new byte[fileStream.Length];
  8294. fileStream.Read(array2, 0, array2.Length);
  8295. }
  8296. }
  8297. catch { }
  8298. if (0 < array2.Length)
  8299. {
  8300. string text = Path.GetFileName(path);
  8301. long num5 = text.GetHashCode();
  8302. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8303. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8304. {
  8305. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8306. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8307. };
  8308. for (int m = 0; m < array3.Length; m++)
  8309. {
  8310. maid.SetAutoTwist(array3[m], true);
  8311. }
  8312. }
  8313. }
  8314. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8315. {
  8316. loadPose[i] = array[0];
  8317. }
  8318. else if (!array[0].StartsWith("dance_"))
  8319. {
  8320. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8321. }
  8322. else
  8323. {
  8324. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8325. {
  8326. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8327. GameUty.FileSystem,
  8328. array[0] + ".anm",
  8329. false,
  8330. false);
  8331. }
  8332. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8333. }
  8334. if (array.Length > 1)
  8335. {
  8336. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8337. isStop[i] = true;
  8338. if (array.Length > 2)
  8339. {
  8340. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8341. isPoseIti[i] = true;
  8342. poseIti[i] = maidArray[i].transform.position;
  8343. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8344. }
  8345. }
  8346. }
  8347. }
  8348. }
  8349. }
  8350. if (isDanceChu)
  8351. {
  8352. for (int j = 0; j < maidCnt; j++)
  8353. {
  8354. if (maidArray[j] && maidArray[j].Visible)
  8355. {
  8356. string text2 = danceName[j];
  8357. float num = 0f;
  8358. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8359. || text2 == "dance_cm3d_004_kano_f1.anm")
  8360. {
  8361. num = 0.166666f;
  8362. }
  8363. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8364. {
  8365. num = -0.35f;
  8366. }
  8367. if (text2 != null)
  8368. {
  8369. if (danceCount > 0)
  8370. {
  8371. danceCount--;
  8372. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8373. }
  8374. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8375. {
  8376. danceCount = 20;
  8377. }
  8378. }
  8379. }
  8380. }
  8381. }
  8382. if (isDanceStart1)
  8383. {
  8384. for (int j = 0; j < maidCnt; j++)
  8385. {
  8386. if (maidArray[j] && maidArray[j].Visible)
  8387. {
  8388. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8389. if (!isShift)
  8390. {
  8391. if (j == 0)
  8392. {
  8393. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8394. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8395. danceName[j] = "dance_cm3d2_001_f1.anm";
  8396. }
  8397. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8398. {
  8399. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8400. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8401. danceName[j] = "dance_cm3d2_001_f2.anm";
  8402. }
  8403. else
  8404. {
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8406. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8407. danceName[j] = "dance_cm3d2_001_f3.anm";
  8408. }
  8409. }
  8410. else
  8411. {
  8412. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8413. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8414. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8415. }
  8416. }
  8417. }
  8418. isDanceStart1 = false;
  8419. isDanceStart1F = true;
  8420. isShift = false;
  8421. }
  8422. if (isDanceStart2)
  8423. {
  8424. for (int j = 0; j < maidCnt; j++)
  8425. {
  8426. if (maidArray[j] && maidArray[j].Visible)
  8427. {
  8428. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8429. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8430. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8431. danceName[j] = "dance_cm3d_001_f1.anm";
  8432. }
  8433. }
  8434. isDanceStart2 = false;
  8435. isDanceStart2F = true;
  8436. }
  8437. if (isDanceStart3)
  8438. {
  8439. for (int j = 0; j < maidCnt; j++)
  8440. {
  8441. if (maidArray[j] && maidArray[j].Visible)
  8442. {
  8443. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8444. if (!isShift)
  8445. {
  8446. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8447. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8448. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8449. }
  8450. else
  8451. {
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8453. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8454. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8455. }
  8456. }
  8457. }
  8458. isDanceStart3 = false;
  8459. isDanceStart3F = true;
  8460. isShift = false;
  8461. }
  8462. if (isDanceStart4)
  8463. {
  8464. for (int j = 0; j < maidCnt; j++)
  8465. {
  8466. if (maidArray[j] && maidArray[j].Visible)
  8467. {
  8468. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8469. if (!isShift)
  8470. {
  8471. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8472. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8473. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8474. }
  8475. else
  8476. {
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8478. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8479. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8480. }
  8481. }
  8482. }
  8483. isDanceStart4 = false;
  8484. isDanceStart4F = true;
  8485. isShift = false;
  8486. }
  8487. if (isDanceStart5)
  8488. {
  8489. for (int j = 0; j < maidCnt; j++)
  8490. {
  8491. if (maidArray[j] && maidArray[j].Visible)
  8492. {
  8493. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8494. if (!isShift)
  8495. {
  8496. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8497. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8498. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8499. }
  8500. else
  8501. {
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8503. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8504. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8505. }
  8506. }
  8507. }
  8508. isDanceStart5 = false;
  8509. isDanceStart5F = true;
  8510. isShift = false;
  8511. }
  8512. if (isDanceStart6)
  8513. {
  8514. for (int j = 0; j < maidCnt; j++)
  8515. {
  8516. if (maidArray[j] && maidArray[j].Visible)
  8517. {
  8518. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8519. if (!isShift)
  8520. {
  8521. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8522. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8523. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8524. }
  8525. else
  8526. {
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8528. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8529. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8530. }
  8531. }
  8532. }
  8533. isDanceStart6 = false;
  8534. isDanceStart6F = true;
  8535. isShift = false;
  8536. }
  8537. if (isDanceStart7)
  8538. {
  8539. for (int j = 0; j < maidCnt; j++)
  8540. {
  8541. if (maidArray[j] && maidArray[j].Visible)
  8542. {
  8543. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8544. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8545. {
  8546. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8547. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8548. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8549. }
  8550. else
  8551. {
  8552. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8553. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8554. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8555. }
  8556. }
  8557. }
  8558. isDanceStart7 = false;
  8559. isDanceStart7V = true;
  8560. isDanceStart7F = true;
  8561. }
  8562. if (isDanceStart8)
  8563. {
  8564. for (int j = 0; j < maidCnt; j++)
  8565. {
  8566. if (maidArray[j] && maidArray[j].Visible)
  8567. {
  8568. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8569. if (j == 0 || j == 4 || j == 8 || j == 12)
  8570. {
  8571. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8572. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8573. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8574. }
  8575. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8576. {
  8577. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8578. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8579. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8580. }
  8581. else if (j == 2 || j == 6 || j == 10)
  8582. {
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8584. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8585. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8586. }
  8587. else
  8588. {
  8589. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8590. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8591. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8592. }
  8593. }
  8594. }
  8595. isDanceStart8 = false;
  8596. isDanceStart8V = true;
  8597. isDanceStart8F = true;
  8598. }
  8599. if (isDanceStart9)
  8600. {
  8601. isDanceStart9Count++;
  8602. if (isShift)
  8603. {
  8604. for (int j = 0; j < maidCnt; j++)
  8605. {
  8606. if (maidArray[j] && maidArray[j].Visible)
  8607. {
  8608. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8609. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8610. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8611. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8612. }
  8613. }
  8614. isDanceStart9 = false;
  8615. isDanceStart9F = true;
  8616. isDanceStart9Count = 0;
  8617. isShift = false;
  8618. }
  8619. if (isDanceStart9Count == 10)
  8620. {
  8621. for (int j = 0; j < maidCnt; j++)
  8622. {
  8623. if (maidArray[j] && maidArray[j].Visible)
  8624. {
  8625. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8626. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8627. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8628. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8629. }
  8630. }
  8631. isDanceStart9 = false;
  8632. isDanceStart9F = true;
  8633. isDanceStart9Count = 0;
  8634. }
  8635. }
  8636. if (isDanceStart10)
  8637. {
  8638. for (int j = 0; j < maidCnt; j++)
  8639. {
  8640. if (maidArray[j] && maidArray[j].Visible)
  8641. {
  8642. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8643. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8644. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8645. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8646. }
  8647. }
  8648. isDanceStart10 = false;
  8649. isDanceStart10F = true;
  8650. }
  8651. if (isDanceStart11)
  8652. {
  8653. for (int j = 0; j < maidCnt; j++)
  8654. {
  8655. if (maidArray[j] && maidArray[j].Visible)
  8656. {
  8657. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8658. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8659. {
  8660. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8661. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8662. danceName[j] = nameA + danceNo2 + ".anm";
  8663. }
  8664. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8665. {
  8666. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8667. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8668. danceName[j] = nameA + danceNo3 + ".anm";
  8669. }
  8670. else
  8671. {
  8672. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8673. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8674. danceName[j] = nameA + danceNo1 + ".anm";
  8675. }
  8676. }
  8677. }
  8678. isDanceStart11 = false;
  8679. isDanceStart11V = true;
  8680. isDanceStart11F = true;
  8681. }
  8682. if (isDanceStart12)
  8683. {
  8684. for (int j = 0; j < maidCnt; j++)
  8685. {
  8686. if (maidArray[j] && maidArray[j].Visible)
  8687. {
  8688. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8689. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8690. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8691. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8692. }
  8693. }
  8694. isDanceStart12 = false;
  8695. isDanceStart12F = true;
  8696. }
  8697. if (isDanceStart13)
  8698. {
  8699. for (int j = 0; j < maidCnt; j++)
  8700. {
  8701. if (maidArray[j] && maidArray[j].Visible)
  8702. {
  8703. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8704. if (!isShift)
  8705. {
  8706. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8707. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8708. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8709. }
  8710. else
  8711. {
  8712. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8713. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8714. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8715. }
  8716. }
  8717. }
  8718. isDanceStart13 = false;
  8719. isDanceStart13F = true;
  8720. isShift = false;
  8721. }
  8722. if (isDanceStart14)
  8723. {
  8724. for (int j = 0; j < maidCnt; j++)
  8725. {
  8726. if (maidArray[j] && maidArray[j].Visible)
  8727. {
  8728. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8729. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8730. {
  8731. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8732. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8733. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8734. }
  8735. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8736. {
  8737. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8738. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8739. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8740. }
  8741. else
  8742. {
  8743. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8744. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8745. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8746. }
  8747. }
  8748. }
  8749. isDanceStart14 = false;
  8750. isDanceStart14V = true;
  8751. isDanceStart14F = true;
  8752. }
  8753. if (isDanceStart15)
  8754. {
  8755. isDanceStart15Count++;
  8756. }
  8757. if (isDanceStart15Count == 10)
  8758. {
  8759. for (int j = 0; j < maidCnt; j++)
  8760. {
  8761. if (maidArray[j] && maidArray[j].Visible)
  8762. {
  8763. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8764. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8765. {
  8766. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8767. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8768. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8769. }
  8770. else
  8771. {
  8772. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8773. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8774. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8775. }
  8776. }
  8777. }
  8778. isDanceStart15 = false;
  8779. isDanceStart15V = true;
  8780. isDanceStart15F = true;
  8781. isDanceStart15Count = 0;
  8782. }
  8783. if (isDance)
  8784. {
  8785. for (int j = 0; j < maidCnt; j++)
  8786. {
  8787. if (maidArray[j].Visible)
  8788. {
  8789. if (isDanceStart1F)
  8790. {
  8791. if (isDanceStart1K)
  8792. {
  8793. foreach (string text3 in dance1KArray)
  8794. {
  8795. string[] array = text3.Split(new char[] { ',' });
  8796. float num10 = float.Parse(array[0]);
  8797. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8798. {
  8799. danceFace[j] = num10;
  8800. FaceName[j] = FaceName2[j];
  8801. FaceName2[j] = array[1];
  8802. FaceName3[j] = array[2];
  8803. FaceTime[j] = 0.0166666675f;
  8804. break;
  8805. }
  8806. }
  8807. }
  8808. else if (j == 0)
  8809. {
  8810. foreach (string text3 in dance1Array)
  8811. {
  8812. string[] array = text3.Split(new char[] { ',' });
  8813. float num10 = float.Parse(array[0]);
  8814. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8815. {
  8816. danceFace[j] = num10;
  8817. FaceName[j] = FaceName2[j];
  8818. FaceName2[j] = array[1];
  8819. FaceName3[j] = array[2];
  8820. FaceTime[j] = 0.0166666675f;
  8821. break;
  8822. }
  8823. }
  8824. }
  8825. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8826. {
  8827. foreach (string text3 in dance1BArray)
  8828. {
  8829. string[] array = text3.Split(new char[] { ',' });
  8830. float num10 = float.Parse(array[0]);
  8831. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8832. {
  8833. danceFace[j] = num10;
  8834. FaceName[j] = FaceName2[j];
  8835. FaceName2[j] = array[1];
  8836. FaceName3[j] = array[2];
  8837. FaceTime[j] = 0.0166666675f;
  8838. break;
  8839. }
  8840. }
  8841. }
  8842. else
  8843. {
  8844. foreach (string text3 in dance1CArray)
  8845. {
  8846. string[] array = text3.Split(new char[] { ',' });
  8847. float num10 = float.Parse(array[0]);
  8848. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8849. {
  8850. danceFace[j] = num10;
  8851. FaceName[j] = FaceName2[j];
  8852. FaceName2[j] = array[1];
  8853. FaceName3[j] = array[2];
  8854. FaceTime[j] = 0.0166666675f;
  8855. break;
  8856. }
  8857. }
  8858. }
  8859. }
  8860. if (isDanceStart2F)
  8861. {
  8862. foreach (string text3 in dance2Array)
  8863. {
  8864. string[] array = text3.Split(new char[] { ',' });
  8865. float num10 = float.Parse(array[0]);
  8866. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8867. {
  8868. danceFace[j] = num10;
  8869. FaceName[j] = FaceName2[j];
  8870. FaceName2[j] = array[1];
  8871. FaceName3[j] = array[2];
  8872. FaceTime[j] = 0.0166666675f;
  8873. break;
  8874. }
  8875. }
  8876. }
  8877. if (isDanceStart3F)
  8878. {
  8879. if (isDanceStart3K)
  8880. {
  8881. foreach (string text3 in dance3KArray)
  8882. {
  8883. string[] array = text3.Split(new char[] { ',' });
  8884. float num10 = float.Parse(array[0]);
  8885. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8886. {
  8887. danceFace[j] = num10;
  8888. FaceName[j] = FaceName2[j];
  8889. FaceName2[j] = array[1];
  8890. FaceName3[j] = array[2];
  8891. FaceTime[j] = 0.0166666675f;
  8892. break;
  8893. }
  8894. }
  8895. }
  8896. else
  8897. {
  8898. foreach (string text3 in dance3Array)
  8899. {
  8900. string[] array = text3.Split(new char[] { ',' });
  8901. float num10 = float.Parse(array[0]);
  8902. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8903. {
  8904. danceFace[j] = num10;
  8905. FaceName[j] = FaceName2[j];
  8906. FaceName2[j] = array[1];
  8907. FaceName3[j] = array[2];
  8908. FaceTime[j] = 0.0166666675f;
  8909. break;
  8910. }
  8911. }
  8912. }
  8913. }
  8914. if (isDanceStart4F)
  8915. {
  8916. if (isDanceStart4K)
  8917. {
  8918. foreach (string text3 in dance4KArray)
  8919. {
  8920. string[] array = text3.Split(new char[] { ',' });
  8921. float num10 = float.Parse(array[0]);
  8922. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8923. {
  8924. danceFace[j] = num10;
  8925. FaceName[j] = FaceName2[j];
  8926. FaceName2[j] = array[1];
  8927. FaceName3[j] = array[2];
  8928. FaceTime[j] = 0.0166666675f;
  8929. break;
  8930. }
  8931. }
  8932. }
  8933. else
  8934. {
  8935. foreach (string text3 in dance4Array)
  8936. {
  8937. string[] array = text3.Split(new char[] { ',' });
  8938. float num10 = float.Parse(array[0]);
  8939. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8940. {
  8941. danceFace[j] = num10;
  8942. FaceName[j] = FaceName2[j];
  8943. FaceName2[j] = array[1];
  8944. FaceName3[j] = array[2];
  8945. FaceTime[j] = 0.0166666675f;
  8946. break;
  8947. }
  8948. }
  8949. }
  8950. }
  8951. if (isDanceStart5F)
  8952. {
  8953. if (isDanceStart5K)
  8954. {
  8955. foreach (string text3 in dance5KArray)
  8956. {
  8957. string[] array = text3.Split(new char[] { ',' });
  8958. float num10 = float.Parse(array[0]);
  8959. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8960. {
  8961. danceFace[j] = num10;
  8962. FaceName[j] = FaceName2[j];
  8963. FaceName2[j] = array[1];
  8964. FaceName3[j] = array[2];
  8965. FaceTime[j] = 0.0166666675f;
  8966. break;
  8967. }
  8968. }
  8969. }
  8970. else
  8971. {
  8972. foreach (string text3 in dance5Array)
  8973. {
  8974. string[] array = text3.Split(new char[] { ',' });
  8975. float num10 = float.Parse(array[0]);
  8976. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8977. {
  8978. danceFace[j] = num10;
  8979. FaceName[j] = FaceName2[j];
  8980. FaceName2[j] = array[1];
  8981. FaceName3[j] = array[2];
  8982. FaceTime[j] = 0.0166666675f;
  8983. break;
  8984. }
  8985. }
  8986. }
  8987. }
  8988. if (isDanceStart6F)
  8989. {
  8990. if (isDanceStart6K)
  8991. {
  8992. foreach (string text3 in dance6KArray)
  8993. {
  8994. string[] array = text3.Split(new char[] { ',' });
  8995. float num10 = float.Parse(array[0]);
  8996. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8997. {
  8998. danceFace[j] = num10;
  8999. FaceName[j] = FaceName2[j];
  9000. FaceName2[j] = array[1];
  9001. FaceName3[j] = array[2];
  9002. FaceTime[j] = 0.0166666675f;
  9003. break;
  9004. }
  9005. }
  9006. }
  9007. else
  9008. {
  9009. foreach (string text3 in dance6Array)
  9010. {
  9011. string[] array = text3.Split(new char[] { ',' });
  9012. float num10 = float.Parse(array[0]);
  9013. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9014. {
  9015. danceFace[j] = num10;
  9016. FaceName[j] = FaceName2[j];
  9017. FaceName2[j] = array[1];
  9018. FaceName3[j] = array[2];
  9019. FaceTime[j] = 0.0166666675f;
  9020. break;
  9021. }
  9022. }
  9023. }
  9024. }
  9025. if (isDanceStart7F)
  9026. {
  9027. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9028. {
  9029. foreach (string text3 in dance6BArray)
  9030. {
  9031. string[] array = text3.Split(new char[] { ',' });
  9032. float num10 = float.Parse(array[0]);
  9033. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9034. {
  9035. danceFace[j] = num10;
  9036. FaceName[j] = FaceName2[j];
  9037. FaceName2[j] = array[1];
  9038. FaceName3[j] = array[2];
  9039. FaceTime[j] = 0.0166666675f;
  9040. break;
  9041. }
  9042. }
  9043. }
  9044. else
  9045. {
  9046. foreach (string text3 in dance6Array)
  9047. {
  9048. string[] array = text3.Split(new char[] { ',' });
  9049. float num10 = float.Parse(array[0]);
  9050. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9051. {
  9052. danceFace[j] = num10;
  9053. FaceName[j] = FaceName2[j];
  9054. FaceName2[j] = array[1];
  9055. FaceName3[j] = array[2];
  9056. FaceTime[j] = 0.0166666675f;
  9057. break;
  9058. }
  9059. }
  9060. }
  9061. }
  9062. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9063. {
  9064. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9065. {
  9066. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9067. }
  9068. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9069. {
  9070. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9071. 100f,
  9072. maidArray[j - 1].transform.position.z));
  9073. }
  9074. }
  9075. if (isDanceStart8F)
  9076. {
  9077. if (j == 1 || j == 5 || j == 9 || j == 13)
  9078. {
  9079. foreach (string text3 in dance6BArray)
  9080. {
  9081. string[] array = text3.Split(new char[] { ',' });
  9082. float num10 = float.Parse(array[0]);
  9083. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9084. {
  9085. danceFace[j] = num10;
  9086. FaceName[j] = FaceName2[j];
  9087. FaceName2[j] = array[1];
  9088. FaceName3[j] = array[2];
  9089. FaceTime[j] = 0.0166666675f;
  9090. break;
  9091. }
  9092. }
  9093. }
  9094. else if (j == 2 || j == 6 || j == 10)
  9095. {
  9096. foreach (string text3 in dance6CArray)
  9097. {
  9098. string[] array = text3.Split(new char[] { ',' });
  9099. float num10 = float.Parse(array[0]);
  9100. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9101. {
  9102. danceFace[j] = num10;
  9103. FaceName[j] = FaceName2[j];
  9104. FaceName2[j] = array[1];
  9105. FaceName3[j] = array[2];
  9106. FaceTime[j] = 0.0166666675f;
  9107. break;
  9108. }
  9109. }
  9110. }
  9111. else if (j == 3 || j == 9 || j == 11)
  9112. {
  9113. foreach (string text3 in dance6DArray)
  9114. {
  9115. string[] array = text3.Split(new char[] { ',' });
  9116. float num10 = float.Parse(array[0]);
  9117. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9118. {
  9119. danceFace[j] = num10;
  9120. FaceName[j] = FaceName2[j];
  9121. FaceName2[j] = array[1];
  9122. FaceName3[j] = array[2];
  9123. FaceTime[j] = 0.0166666675f;
  9124. break;
  9125. }
  9126. }
  9127. }
  9128. else
  9129. {
  9130. foreach (string text3 in dance6Array)
  9131. {
  9132. string[] array = text3.Split(new char[] { ',' });
  9133. float num10 = float.Parse(array[0]);
  9134. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9135. {
  9136. danceFace[j] = num10;
  9137. FaceName[j] = FaceName2[j];
  9138. FaceName2[j] = array[1];
  9139. FaceName3[j] = array[2];
  9140. FaceTime[j] = 0.0166666675f;
  9141. break;
  9142. }
  9143. }
  9144. }
  9145. }
  9146. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9147. {
  9148. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9149. {
  9150. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9151. }
  9152. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9153. {
  9154. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9155. 100f,
  9156. maidArray[j - 1].transform.position.z));
  9157. }
  9158. }
  9159. if (isDanceStart8V)
  9160. {
  9161. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9162. {
  9163. isDanceStart8P = true;
  9164. for (int num11 = 0; num11 < maidCnt; num11++)
  9165. {
  9166. if (maidArray[num11].Visible)
  9167. {
  9168. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9169. {
  9170. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9171. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9172. gameObject6.transform.position =
  9173. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9174. .position;
  9175. }
  9176. }
  9177. }
  9178. }
  9179. }
  9180. if (isDanceStart9F)
  9181. {
  9182. if (isDanceStart9K)
  9183. {
  9184. foreach (string text3 in dance9KArray)
  9185. {
  9186. string[] array = text3.Split(new char[] { ',' });
  9187. float num10 = float.Parse(array[0]);
  9188. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9189. {
  9190. danceFace[j] = num10;
  9191. FaceName[j] = FaceName2[j];
  9192. FaceName2[j] = array[1];
  9193. FaceName3[j] = array[2];
  9194. FaceTime[j] = 0.0166666675f;
  9195. break;
  9196. }
  9197. }
  9198. }
  9199. else
  9200. {
  9201. foreach (string text3 in dance7Array)
  9202. {
  9203. string[] array = text3.Split(new char[] { ',' });
  9204. float num10 = float.Parse(array[0]);
  9205. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9206. {
  9207. danceFace[j] = num10;
  9208. FaceName[j] = FaceName2[j];
  9209. FaceName2[j] = array[1];
  9210. FaceName3[j] = array[2];
  9211. FaceTime[j] = 0.0166666675f;
  9212. break;
  9213. }
  9214. }
  9215. }
  9216. }
  9217. if (isDanceStart10F)
  9218. {
  9219. foreach (string text3 in danceO1Array)
  9220. {
  9221. string[] array = text3.Split(new char[] { ',' });
  9222. float num10 = float.Parse(array[0]);
  9223. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9224. {
  9225. danceFace[j] = num10;
  9226. FaceName[j] = FaceName2[j];
  9227. FaceName2[j] = array[1];
  9228. FaceName3[j] = array[2];
  9229. FaceTime[j] = 0.0166666675f;
  9230. break;
  9231. }
  9232. }
  9233. }
  9234. if (isDanceStart11F)
  9235. {
  9236. string[] array14 = null;
  9237. string[] array12 = null;
  9238. string[] array15 = null;
  9239. if (isSS1)
  9240. {
  9241. array14 = danceO1Array;
  9242. array12 = danceO1CArray;
  9243. array15 = danceO1BArray;
  9244. }
  9245. if (isSS2)
  9246. {
  9247. array14 = danceO2Array;
  9248. array12 = danceO2BArray;
  9249. array15 = danceO2CArray;
  9250. }
  9251. if (isSS3)
  9252. {
  9253. array14 = danceO3CArray;
  9254. array12 = danceO3Array;
  9255. array15 = danceO3BArray;
  9256. }
  9257. if (isSS4)
  9258. {
  9259. array14 = danceO5BArray;
  9260. array12 = danceO5Array;
  9261. array15 = danceO5CArray;
  9262. }
  9263. if (isSS5)
  9264. {
  9265. array14 = danceO4Array;
  9266. array12 = danceO4BArray;
  9267. array15 = danceO4CArray;
  9268. }
  9269. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9270. {
  9271. foreach (string text3 in array12)
  9272. {
  9273. string[] array = text3.Split(new char[] { ',' });
  9274. float num10 = float.Parse(array[0]) - 0.03f;
  9275. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9276. {
  9277. danceFace[j] = num10;
  9278. FaceName[j] = FaceName2[j];
  9279. FaceName2[j] = array[1];
  9280. FaceName3[j] = array[2];
  9281. FaceTime[j] = 0.0166666675f;
  9282. break;
  9283. }
  9284. }
  9285. }
  9286. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9287. {
  9288. foreach (string text3 in array15)
  9289. {
  9290. string[] array = text3.Split(new char[] { ',' });
  9291. float num10 = float.Parse(array[0]) - 0.03f;
  9292. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9293. {
  9294. danceFace[j] = num10;
  9295. FaceName[j] = FaceName2[j];
  9296. FaceName2[j] = array[1];
  9297. FaceName3[j] = array[2];
  9298. FaceTime[j] = 0.0166666675f;
  9299. break;
  9300. }
  9301. }
  9302. }
  9303. else
  9304. {
  9305. foreach (string text3 in array14)
  9306. {
  9307. string[] array = text3.Split(new char[] { ',' });
  9308. float num10 = float.Parse(array[0]) - 0.03f;
  9309. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9310. {
  9311. danceFace[j] = num10;
  9312. FaceName[j] = FaceName2[j];
  9313. FaceName2[j] = array[1];
  9314. FaceName3[j] = array[2];
  9315. FaceTime[j] = 0.0166666675f;
  9316. break;
  9317. }
  9318. }
  9319. }
  9320. }
  9321. if (isDanceStart12F)
  9322. {
  9323. foreach (string text3 in dance12Array)
  9324. {
  9325. string[] array = text3.Split(new char[] { ',' });
  9326. float num10 = float.Parse(array[0]);
  9327. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9328. {
  9329. danceFace[j] = num10;
  9330. FaceName[j] = FaceName2[j];
  9331. FaceName2[j] = array[1];
  9332. FaceName3[j] = array[2];
  9333. FaceTime[j] = 0.0166666675f;
  9334. break;
  9335. }
  9336. }
  9337. }
  9338. if (isDanceStart13F)
  9339. {
  9340. if (!isDanceStart13K)
  9341. {
  9342. foreach (string text3 in dance13Array)
  9343. {
  9344. string[] array = text3.Split(new char[] { ',' });
  9345. float num10 = float.Parse(array[0]);
  9346. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9347. {
  9348. danceFace[j] = num10;
  9349. FaceName[j] = FaceName2[j];
  9350. FaceName2[j] = array[1];
  9351. FaceName3[j] = array[2];
  9352. FaceTime[j] = 0.0166666675f;
  9353. break;
  9354. }
  9355. }
  9356. }
  9357. }
  9358. if (isDanceStart14F)
  9359. {
  9360. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9361. {
  9362. foreach (string text3 in dance13BArray)
  9363. {
  9364. string[] array = text3.Split(new char[] { ',' });
  9365. float num10 = float.Parse(array[0]);
  9366. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9367. {
  9368. danceFace[j] = num10;
  9369. FaceName[j] = FaceName2[j];
  9370. FaceName2[j] = array[1];
  9371. FaceName3[j] = array[2];
  9372. FaceTime[j] = 0.0166666675f;
  9373. break;
  9374. }
  9375. }
  9376. }
  9377. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9378. {
  9379. foreach (string text3 in dance13CArray)
  9380. {
  9381. string[] array = text3.Split(new char[] { ',' });
  9382. float num10 = float.Parse(array[0]);
  9383. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9384. {
  9385. danceFace[j] = num10;
  9386. FaceName[j] = FaceName2[j];
  9387. FaceName2[j] = array[1];
  9388. FaceName3[j] = array[2];
  9389. FaceTime[j] = 0.0166666675f;
  9390. break;
  9391. }
  9392. }
  9393. }
  9394. else
  9395. {
  9396. foreach (string text3 in dance13Array)
  9397. {
  9398. string[] array = text3.Split(new char[] { ',' });
  9399. float num10 = float.Parse(array[0]);
  9400. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9401. {
  9402. danceFace[j] = num10;
  9403. FaceName[j] = FaceName2[j];
  9404. FaceName2[j] = array[1];
  9405. FaceName3[j] = array[2];
  9406. FaceTime[j] = 0.0166666675f;
  9407. break;
  9408. }
  9409. }
  9410. }
  9411. }
  9412. if (isDanceStart15F)
  9413. {
  9414. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9415. {
  9416. foreach (string text3 in dance15BArray)
  9417. {
  9418. string[] array = text3.Split(new char[] { ',' });
  9419. float num10 = float.Parse(array[0]);
  9420. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9421. {
  9422. danceFace[j] = num10;
  9423. FaceName[j] = FaceName2[j];
  9424. FaceName2[j] = array[1];
  9425. FaceName3[j] = array[2];
  9426. FaceTime[j] = 0.0166666675f;
  9427. break;
  9428. }
  9429. }
  9430. }
  9431. else
  9432. {
  9433. foreach (string text3 in dance15Array)
  9434. {
  9435. string[] array = text3.Split(new char[] { ',' });
  9436. float num10 = float.Parse(array[0]);
  9437. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9438. {
  9439. danceFace[j] = num10;
  9440. FaceName[j] = FaceName2[j];
  9441. FaceName2[j] = array[1];
  9442. FaceName3[j] = array[2];
  9443. FaceTime[j] = 0.0166666675f;
  9444. break;
  9445. }
  9446. }
  9447. }
  9448. }
  9449. if (!isFadeOut)
  9450. {
  9451. Maid maid = maidArray[j];
  9452. if (maid && maid.Visible)
  9453. {
  9454. if (maid.transform.position.y != 100f)
  9455. {
  9456. FaceTime[j] += Time.deltaTime;
  9457. if (FaceTime[j] < 1f)
  9458. {
  9459. TMorph morph = maid.body0.Face.morph;
  9460. maid.boMabataki = false;
  9461. maid.body0.Face.morph.EyeMabataki = 0f;
  9462. if (FaceName[j] != string.Empty)
  9463. {
  9464. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9465. }
  9466. if (FaceName2[j] != "")
  9467. {
  9468. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9469. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9470. }
  9471. if (FaceName3[j] != string.Empty)
  9472. {
  9473. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9474. }
  9475. maid.body0.Face.morph.FixBlendValues_Face();
  9476. }
  9477. else
  9478. {
  9479. FaceName[j] = FaceName2[j];
  9480. }
  9481. if (isHenkou)
  9482. {
  9483. TMorph morph = maid.body0.Face.morph;
  9484. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9485. maid.boMabataki = false;
  9486. if (isNamidaH)
  9487. {
  9488. fieldValue[(int)morph.hash["namida"]] = 1f;
  9489. }
  9490. else
  9491. {
  9492. fieldValue[(int)morph.hash["namida"]] = 0f;
  9493. }
  9494. if (isSekimenH)
  9495. {
  9496. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9497. }
  9498. else
  9499. {
  9500. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9501. }
  9502. if (isHohoH)
  9503. {
  9504. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9505. }
  9506. else
  9507. {
  9508. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9509. }
  9510. maid.body0.Face.morph.FixBlendValues_Face();
  9511. }
  9512. }
  9513. }
  9514. }
  9515. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9516. }
  9517. }
  9518. if (Input.GetKey(KeyCode.H) || isVR)
  9519. {
  9520. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9521. {
  9522. h2Flg = true;
  9523. isNamidaH = !isNamidaH;
  9524. isHenkou = true;
  9525. }
  9526. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9527. {
  9528. h2Flg = true;
  9529. isSekimenH = !isSekimenH;
  9530. isHenkou = true;
  9531. }
  9532. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9533. {
  9534. h2Flg = true;
  9535. isHohoH = !isHohoH;
  9536. isHenkou = true;
  9537. }
  9538. }
  9539. danceCheckIndex++;
  9540. if (danceCheckIndex == 10)
  9541. {
  9542. danceCheckIndex = 0;
  9543. }
  9544. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9545. isDanceChu = false;
  9546. for (int k = 0; k < danceCheck.Length; k++)
  9547. {
  9548. if (danceCheck[k] > 0f)
  9549. {
  9550. isDanceChu = true;
  9551. break;
  9552. }
  9553. }
  9554. if (!isDanceChu)
  9555. {
  9556. danceWait--;
  9557. if (danceWait > 0)
  9558. {
  9559. isDanceChu = true;
  9560. }
  9561. }
  9562. if (!isDanceChu)
  9563. {
  9564. for (int j = 0; j < maidCnt; j++)
  9565. {
  9566. if (maidArray[j] && maidArray[j].Visible)
  9567. {
  9568. maidArray[j].StopKuchipakuPattern();
  9569. if (isDanceStart7V)
  9570. {
  9571. maidArray[j].SetPos(dancePos[j]);
  9572. maidArray[j].body0.transform.localRotation = danceRot[j];
  9573. }
  9574. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9575. {
  9576. maidArray[j].SetPos(dancePos[j]);
  9577. maidArray[j].body0.transform.localRotation = danceRot[j];
  9578. }
  9579. if (isDanceStart11V)
  9580. {
  9581. maidArray[j].SetPos(dancePos[j]);
  9582. maidArray[j].body0.transform.localRotation = danceRot[j];
  9583. }
  9584. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9585. || isDanceStart13K)
  9586. {
  9587. maidArray[j].SetPos(dancePos[j]);
  9588. maidArray[j].body0.transform.localRotation = danceRot[j];
  9589. int i = j;
  9590. if (!isVR)
  9591. {
  9592. delCount[i] = 20;
  9593. if (goSlot[(int)selectList[i]] != null)
  9594. {
  9595. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9596. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9597. {
  9598. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9599. }
  9600. }
  9601. }
  9602. Maid maid = maidArray[j];
  9603. maid.DelProp(MPN.handitem, true);
  9604. maid.DelProp(MPN.accvag, true);
  9605. maid.DelProp(MPN.accanl, true);
  9606. maid.DelProp(MPN.kousoku_upper, true);
  9607. maid.DelProp(MPN.kousoku_lower, true);
  9608. maid.AllProcPropSeqStart();
  9609. isStop[i] = true;
  9610. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9611. isPoseIti[i] = true;
  9612. poseIti[i] = maidArray[i].transform.position;
  9613. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9614. }
  9615. if (isDanceStart14V)
  9616. {
  9617. maidArray[j].SetPos(dancePos[j]);
  9618. maidArray[j].body0.transform.localRotation = danceRot[j];
  9619. }
  9620. if (isDanceStart15V)
  9621. {
  9622. maidArray[j].SetPos(dancePos[j]);
  9623. maidArray[j].body0.transform.localRotation = danceRot[j];
  9624. }
  9625. }
  9626. }
  9627. isDanceStart1F = false;
  9628. isDanceStart1K = false;
  9629. isDanceStart2F = false;
  9630. isDanceStart3F = false;
  9631. isDanceStart3K = false;
  9632. isDanceStart4F = false;
  9633. isDanceStart4K = false;
  9634. isDanceStart5F = false;
  9635. isDanceStart5K = false;
  9636. isDanceStart6F = false;
  9637. isDanceStart6K = false;
  9638. isDanceStart7F = false;
  9639. isDanceStart7V = false;
  9640. isDanceStart8F = false;
  9641. isDanceStart8V = false;
  9642. isDanceStart8P = false;
  9643. isDanceStart9F = false;
  9644. isDanceStart9K = false;
  9645. isDanceStart10F = false;
  9646. isDanceStart11F = false;
  9647. isDanceStart11V = false;
  9648. isDanceStart12F = false;
  9649. isDanceStart13F = false;
  9650. isDanceStart13K = false;
  9651. isDanceStart14F = false;
  9652. isDanceStart14V = false;
  9653. isDanceStart15F = false;
  9654. isDanceStart15V = false;
  9655. for (int j = 0; j < maidCnt; j++)
  9656. {
  9657. danceFace[j] = 0f;
  9658. }
  9659. danceCheckIndex = 0;
  9660. for (int k = 0; k < danceCheck.Length; k++)
  9661. {
  9662. danceCheck[danceCheckIndex] = 1f;
  9663. }
  9664. isDance = false;
  9665. }
  9666. }
  9667. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9668. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9669. {
  9670. if (getModKeyPressing(modKey.Shift))
  9671. {
  9672. isShift = true;
  9673. }
  9674. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9675. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9676. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9677. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9678. if (!isShift)
  9679. {
  9680. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9681. }
  9682. for (int j = 0; j < maidCnt; j++)
  9683. {
  9684. string text5 = "dance_cm3d2_001_f1.anm";
  9685. switch (j)
  9686. {
  9687. case 1:
  9688. case 3:
  9689. case 5:
  9690. case 7:
  9691. case 9:
  9692. case 11:
  9693. case 13:
  9694. text5 = "dance_cm3d2_001_f2.anm";
  9695. break;
  9696. case 2:
  9697. case 4:
  9698. case 6:
  9699. case 8:
  9700. case 10:
  9701. case 12:
  9702. text5 = "dance_cm3d2_001_f3.anm";
  9703. break;
  9704. }
  9705. if (!isShift)
  9706. {
  9707. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9708. {
  9709. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9710. }
  9711. }
  9712. else
  9713. {
  9714. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9715. {
  9716. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9717. GameUty.FileSystem,
  9718. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9719. false,
  9720. false);
  9721. }
  9722. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9723. text4 = textAsset.text;
  9724. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9725. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9726. && !isDanceStart9K && !isDanceStart13K)
  9727. {
  9728. dancePos[j] = maidArray[j].transform.position;
  9729. danceRot[j] = maidArray[j].transform.localRotation;
  9730. }
  9731. }
  9732. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9733. }
  9734. if (!isShift)
  9735. {
  9736. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9737. sw = new Stopwatch();
  9738. sw.Start();
  9739. }
  9740. else if (getModKeyPressing(modKey.Ctrl))
  9741. {
  9742. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9743. }
  9744. else
  9745. {
  9746. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9747. }
  9748. for (int j = 0; j < maidCnt; j++)
  9749. {
  9750. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9751. Vector3 vector = Vector3.zero;
  9752. switch (j)
  9753. {
  9754. case 3:
  9755. vector.x = 1f;
  9756. break;
  9757. case 4:
  9758. vector.x = -1f;
  9759. break;
  9760. case 5:
  9761. vector.x = 2f;
  9762. break;
  9763. case 6:
  9764. vector.x = -2f;
  9765. break;
  9766. case 7:
  9767. vector.x = 3f;
  9768. break;
  9769. case 8:
  9770. vector.x = -3f;
  9771. break;
  9772. case 9:
  9773. vector.x = 4f;
  9774. break;
  9775. case 10:
  9776. vector.x = -4f;
  9777. break;
  9778. case 11:
  9779. vector.x = 5f;
  9780. break;
  9781. case 12:
  9782. vector.x = -5f;
  9783. break;
  9784. case 13:
  9785. vector.x = 6f;
  9786. break;
  9787. }
  9788. if (!isShift)
  9789. {
  9790. maidArray[j].SetPos(vector);
  9791. }
  9792. isStop[j] = false;
  9793. isLock[j] = false;
  9794. pHandL[j] = 0;
  9795. pHandR[j] = 0;
  9796. muneIKL[j] = false;
  9797. muneIKR[j] = false;
  9798. if (!isVR)
  9799. {
  9800. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9801. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9802. }
  9803. }
  9804. ikBui = 5;
  9805. isDanceStart1F = false;
  9806. isDanceStart2F = false;
  9807. isDanceStart3F = false;
  9808. isDanceStart4F = false;
  9809. isDanceStart5F = false;
  9810. isDanceStart6F = false;
  9811. isDanceStart7F = false;
  9812. isDanceStart8F = false;
  9813. isDanceStart9F = false;
  9814. isDanceStart10F = false;
  9815. isDanceStart11F = false;
  9816. isDanceStart12F = false;
  9817. isDanceStart13F = false;
  9818. isDanceStart14F = false;
  9819. isDanceStart15F = false;
  9820. for (int j = 0; j < maidCnt; j++)
  9821. {
  9822. danceFace[j] = 0f;
  9823. }
  9824. if (isDanceStart7V)
  9825. {
  9826. for (int j = 0; j < maidCnt; j++)
  9827. {
  9828. if (maidArray[j] && maidArray[j].Visible)
  9829. {
  9830. if (isDanceStart7V)
  9831. {
  9832. maidArray[j].SetPos(dancePos[j]);
  9833. maidArray[j].body0.transform.localRotation = danceRot[j];
  9834. }
  9835. }
  9836. }
  9837. isDanceStart7V = false;
  9838. }
  9839. if (isDanceStart8V)
  9840. {
  9841. for (int j = 0; j < maidCnt; j++)
  9842. {
  9843. if (maidArray[j] && maidArray[j].Visible)
  9844. {
  9845. if (isDanceStart8V)
  9846. {
  9847. maidArray[j].SetPos(dancePos[j]);
  9848. maidArray[j].body0.transform.localRotation = danceRot[j];
  9849. }
  9850. }
  9851. }
  9852. isDanceStart8V = false;
  9853. isDanceStart8P = false;
  9854. }
  9855. if (isDanceStart11V)
  9856. {
  9857. for (int j = 0; j < maidCnt; j++)
  9858. {
  9859. if (maidArray[j] && maidArray[j].Visible)
  9860. {
  9861. if (isDanceStart11V)
  9862. {
  9863. maidArray[j].SetPos(dancePos[j]);
  9864. maidArray[j].body0.transform.localRotation = danceRot[j];
  9865. }
  9866. }
  9867. }
  9868. isDanceStart11V = false;
  9869. }
  9870. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9871. || isDanceStart13K)
  9872. {
  9873. for (int j = 0; j < maidCnt; j++)
  9874. {
  9875. if (maidArray[j] && maidArray[j].Visible)
  9876. {
  9877. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9878. || isDanceStart13K)
  9879. {
  9880. maidArray[j].SetPos(dancePos[j]);
  9881. maidArray[j].body0.transform.localRotation = danceRot[j];
  9882. int i = j;
  9883. if (!isVR)
  9884. {
  9885. delCount[i] = 20;
  9886. if (goSlot[(int)selectList[i]] != null)
  9887. {
  9888. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9889. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9890. {
  9891. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9892. }
  9893. }
  9894. }
  9895. Maid maid = maidArray[j];
  9896. maid.DelProp(MPN.handitem, true);
  9897. maid.DelProp(MPN.accvag, true);
  9898. maid.DelProp(MPN.accanl, true);
  9899. maid.DelProp(MPN.kousoku_upper, true);
  9900. maid.DelProp(MPN.kousoku_lower, true);
  9901. maid.AllProcPropSeqStart();
  9902. }
  9903. }
  9904. }
  9905. isDanceStart1K = false;
  9906. isDanceStart3K = false;
  9907. isDanceStart4K = false;
  9908. isDanceStart5K = false;
  9909. isDanceStart6K = false;
  9910. isDanceStart9K = false;
  9911. isDanceStart13K = false;
  9912. }
  9913. if (isDanceStart14V)
  9914. {
  9915. for (int j = 0; j < maidCnt; j++)
  9916. {
  9917. if (maidArray[j] && maidArray[j].Visible)
  9918. {
  9919. if (isDanceStart14V)
  9920. {
  9921. maidArray[j].SetPos(dancePos[j]);
  9922. maidArray[j].body0.transform.localRotation = danceRot[j];
  9923. }
  9924. }
  9925. }
  9926. isDanceStart14V = false;
  9927. }
  9928. if (isDanceStart15V)
  9929. {
  9930. for (int j = 0; j < maidCnt; j++)
  9931. {
  9932. if (maidArray[j] && maidArray[j].Visible)
  9933. {
  9934. if (isDanceStart15V)
  9935. {
  9936. maidArray[j].SetPos(dancePos[j]);
  9937. maidArray[j].body0.transform.localRotation = danceRot[j];
  9938. }
  9939. }
  9940. }
  9941. isDanceStart15V = false;
  9942. }
  9943. if (isShift)
  9944. {
  9945. if (maidArray[1] && maidArray[1].Visible)
  9946. {
  9947. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9948. {
  9949. Vector3 vector = Vector3.zero;
  9950. vector.x = 0.6f;
  9951. maidArray[1].SetPos(vector);
  9952. if (maidArray[2] && maidArray[2].Visible)
  9953. {
  9954. vector.x = -0.6f;
  9955. maidArray[2].SetPos(vector);
  9956. }
  9957. if (maidArray[3] && maidArray[3].Visible)
  9958. {
  9959. vector.x = 1.2f;
  9960. maidArray[3].SetPos(vector);
  9961. }
  9962. if (maidArray[4] && maidArray[4].Visible)
  9963. {
  9964. vector.x = -1.2f;
  9965. maidArray[4].SetPos(vector);
  9966. }
  9967. if (maidArray[5] && maidArray[5].Visible)
  9968. {
  9969. vector.x = 1.8f;
  9970. maidArray[5].SetPos(vector);
  9971. }
  9972. if (maidArray[6] && maidArray[6].Visible)
  9973. {
  9974. vector.x = -1.8f;
  9975. maidArray[6].SetPos(vector);
  9976. }
  9977. if (maidArray[7] && maidArray[7].Visible)
  9978. {
  9979. vector.x = 2.4f;
  9980. maidArray[7].SetPos(vector);
  9981. }
  9982. if (maidArray[8] && maidArray[8].Visible)
  9983. {
  9984. vector.x = -2.4f;
  9985. maidArray[8].SetPos(vector);
  9986. }
  9987. if (maidArray[9] && maidArray[9].Visible)
  9988. {
  9989. vector.x = 3f;
  9990. maidArray[9].SetPos(vector);
  9991. }
  9992. if (maidArray[10] && maidArray[10].Visible)
  9993. {
  9994. vector.x = -3f;
  9995. maidArray[10].SetPos(vector);
  9996. }
  9997. if (maidArray[11] && maidArray[11].Visible)
  9998. {
  9999. vector.x = 3.6f;
  10000. maidArray[11].SetPos(vector);
  10001. }
  10002. if (maidArray[12] && maidArray[12].Visible)
  10003. {
  10004. vector.x = -3.6f;
  10005. maidArray[12].SetPos(vector);
  10006. }
  10007. if (maidArray[13] && maidArray[13].Visible)
  10008. {
  10009. vector.x = 4.2f;
  10010. maidArray[13].SetPos(vector);
  10011. }
  10012. }
  10013. }
  10014. isDanceStart1K = true;
  10015. for (int j = 0; j < maidCnt; j++)
  10016. {
  10017. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10018. maidArray[j].body0.transform.localRotation.y + 90f,
  10019. maidArray[j].body0.transform.localRotation.z));
  10020. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10021. maidArray[j].body0.transform.position.y,
  10022. maidArray[j].body0.transform.position.z + 4f));
  10023. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10024. int i = j;
  10025. Maid maid = maidArray[j];
  10026. if (!isVR)
  10027. {
  10028. delCount[i] = 20;
  10029. if (goSlot[(int)selectList[i]] != null)
  10030. {
  10031. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10032. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10033. {
  10034. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10035. }
  10036. }
  10037. }
  10038. string[] array = new string[2];
  10039. array = text2.Split(new char[] { ',' });
  10040. maid.DelProp(MPN.handitem, true);
  10041. maid.DelProp(MPN.accvag, true);
  10042. maid.DelProp(MPN.accanl, true);
  10043. maid.DelProp(MPN.kousoku_upper, true);
  10044. maid.DelProp(MPN.kousoku_lower, true);
  10045. if (array[0] != "")
  10046. {
  10047. maid.SetProp(array[0], array[1], 0, true, false);
  10048. }
  10049. maid.AllProcPropSeqStart();
  10050. }
  10051. }
  10052. isDance = true;
  10053. isDanceStart1 = true;
  10054. }
  10055. if (isF2)
  10056. {
  10057. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10058. string text4 = textAsset.text;
  10059. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10060. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10061. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10062. for (int j = 0; j < maidCnt; j++)
  10063. {
  10064. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10065. {
  10066. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10067. GameUty.FileSystem,
  10068. "dance_cm3d_001_f1.anm",
  10069. false,
  10070. false);
  10071. }
  10072. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10073. }
  10074. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10075. for (int j = 0; j < maidCnt; j++)
  10076. {
  10077. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10078. isStop[j] = false;
  10079. isLock[j] = false;
  10080. pHandL[j] = 0;
  10081. pHandR[j] = 0;
  10082. muneIKL[j] = false;
  10083. muneIKR[j] = false;
  10084. if (!isVR)
  10085. {
  10086. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10087. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10088. }
  10089. }
  10090. ikBui = 5;
  10091. isDanceStart1F = false;
  10092. isDanceStart2F = false;
  10093. isDanceStart3F = false;
  10094. isDanceStart4F = false;
  10095. isDanceStart5F = false;
  10096. isDanceStart6F = false;
  10097. isDanceStart7F = false;
  10098. isDanceStart8F = false;
  10099. isDanceStart9F = false;
  10100. isDanceStart10F = false;
  10101. isDanceStart11F = false;
  10102. isDanceStart12F = false;
  10103. isDanceStart13F = false;
  10104. isDanceStart14F = false;
  10105. isDanceStart15F = false;
  10106. for (int j = 0; j < maidCnt; j++)
  10107. {
  10108. danceFace[j] = 0f;
  10109. }
  10110. if (isDanceStart7V)
  10111. {
  10112. for (int j = 0; j < maidCnt; j++)
  10113. {
  10114. if (maidArray[j] && maidArray[j].Visible)
  10115. {
  10116. if (isDanceStart7V)
  10117. {
  10118. maidArray[j].SetPos(dancePos[j]);
  10119. maidArray[j].body0.transform.localRotation = danceRot[j];
  10120. }
  10121. }
  10122. }
  10123. isDanceStart7V = false;
  10124. }
  10125. if (isDanceStart8V)
  10126. {
  10127. for (int j = 0; j < maidCnt; j++)
  10128. {
  10129. if (maidArray[j] && maidArray[j].Visible)
  10130. {
  10131. if (isDanceStart8V)
  10132. {
  10133. maidArray[j].SetPos(dancePos[j]);
  10134. maidArray[j].body0.transform.localRotation = danceRot[j];
  10135. }
  10136. }
  10137. }
  10138. isDanceStart8V = false;
  10139. isDanceStart8P = false;
  10140. }
  10141. if (isDanceStart11V)
  10142. {
  10143. for (int j = 0; j < maidCnt; j++)
  10144. {
  10145. if (maidArray[j] && maidArray[j].Visible)
  10146. {
  10147. if (isDanceStart11V)
  10148. {
  10149. maidArray[j].SetPos(dancePos[j]);
  10150. maidArray[j].body0.transform.localRotation = danceRot[j];
  10151. }
  10152. }
  10153. }
  10154. isDanceStart11V = false;
  10155. }
  10156. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10157. || isDanceStart13K)
  10158. {
  10159. for (int j = 0; j < maidCnt; j++)
  10160. {
  10161. if (maidArray[j] && maidArray[j].Visible)
  10162. {
  10163. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10164. || isDanceStart13K)
  10165. {
  10166. maidArray[j].SetPos(dancePos[j]);
  10167. maidArray[j].body0.transform.localRotation = danceRot[j];
  10168. int i = j;
  10169. if (!isVR)
  10170. {
  10171. delCount[i] = 20;
  10172. if (goSlot[(int)selectList[i]] != null)
  10173. {
  10174. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10175. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10176. {
  10177. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10178. }
  10179. }
  10180. }
  10181. Maid maid = maidArray[j];
  10182. maid.DelProp(MPN.handitem, true);
  10183. maid.DelProp(MPN.accvag, true);
  10184. maid.DelProp(MPN.accanl, true);
  10185. maid.DelProp(MPN.kousoku_upper, true);
  10186. maid.DelProp(MPN.kousoku_lower, true);
  10187. maid.AllProcPropSeqStart();
  10188. }
  10189. }
  10190. }
  10191. isDanceStart1K = false;
  10192. isDanceStart3K = false;
  10193. isDanceStart4K = false;
  10194. isDanceStart5K = false;
  10195. isDanceStart6K = false;
  10196. isDanceStart9K = false;
  10197. isDanceStart13K = false;
  10198. }
  10199. if (isDanceStart14V)
  10200. {
  10201. for (int j = 0; j < maidCnt; j++)
  10202. {
  10203. if (maidArray[j] && maidArray[j].Visible)
  10204. {
  10205. if (isDanceStart14V)
  10206. {
  10207. maidArray[j].SetPos(dancePos[j]);
  10208. maidArray[j].body0.transform.localRotation = danceRot[j];
  10209. }
  10210. }
  10211. }
  10212. isDanceStart14V = false;
  10213. }
  10214. if (isDanceStart15V)
  10215. {
  10216. for (int j = 0; j < maidCnt; j++)
  10217. {
  10218. if (maidArray[j] && maidArray[j].Visible)
  10219. {
  10220. if (isDanceStart15V)
  10221. {
  10222. maidArray[j].SetPos(dancePos[j]);
  10223. maidArray[j].body0.transform.localRotation = danceRot[j];
  10224. }
  10225. }
  10226. }
  10227. isDanceStart15V = false;
  10228. }
  10229. if (maidArray[1] && maidArray[1].Visible)
  10230. {
  10231. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10232. {
  10233. Vector3 vector = Vector3.zero;
  10234. vector.x = 0.6f;
  10235. maidArray[1].SetPos(vector);
  10236. if (maidArray[2] && maidArray[2].Visible)
  10237. {
  10238. vector.x = -0.6f;
  10239. maidArray[2].SetPos(vector);
  10240. }
  10241. if (maidArray[3] && maidArray[3].Visible)
  10242. {
  10243. vector.x = 1.2f;
  10244. maidArray[3].SetPos(vector);
  10245. }
  10246. if (maidArray[4] && maidArray[4].Visible)
  10247. {
  10248. vector.x = -1.2f;
  10249. maidArray[4].SetPos(vector);
  10250. }
  10251. if (maidArray[5] && maidArray[5].Visible)
  10252. {
  10253. vector.x = 1.8f;
  10254. maidArray[5].SetPos(vector);
  10255. }
  10256. if (maidArray[6] && maidArray[6].Visible)
  10257. {
  10258. vector.x = -1.8f;
  10259. maidArray[6].SetPos(vector);
  10260. }
  10261. if (maidArray[7] && maidArray[7].Visible)
  10262. {
  10263. vector.x = 2.4f;
  10264. maidArray[7].SetPos(vector);
  10265. }
  10266. if (maidArray[8] && maidArray[8].Visible)
  10267. {
  10268. vector.x = -2.4f;
  10269. maidArray[8].SetPos(vector);
  10270. }
  10271. if (maidArray[9] && maidArray[9].Visible)
  10272. {
  10273. vector.x = 3f;
  10274. maidArray[9].SetPos(vector);
  10275. }
  10276. if (maidArray[10] && maidArray[10].Visible)
  10277. {
  10278. vector.x = -3f;
  10279. maidArray[10].SetPos(vector);
  10280. }
  10281. if (maidArray[11] && maidArray[11].Visible)
  10282. {
  10283. vector.x = 3.6f;
  10284. maidArray[11].SetPos(vector);
  10285. }
  10286. if (maidArray[12] && maidArray[12].Visible)
  10287. {
  10288. vector.x = -3.6f;
  10289. maidArray[12].SetPos(vector);
  10290. }
  10291. if (maidArray[13] && maidArray[13].Visible)
  10292. {
  10293. vector.x = 4.2f;
  10294. maidArray[13].SetPos(vector);
  10295. }
  10296. }
  10297. }
  10298. isDance = true;
  10299. isDanceStart2 = true;
  10300. isF2 = false;
  10301. }
  10302. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10303. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10304. {
  10305. GameMain.Instance.SoundMgr.StopBGM(0f);
  10306. isF2 = true;
  10307. }
  10308. if (isF3)
  10309. {
  10310. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10311. string text4 = textAsset.text;
  10312. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10313. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10314. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10315. for (int j = 0; j < maidCnt; j++)
  10316. {
  10317. if (!isShift)
  10318. {
  10319. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10320. {
  10321. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10322. GameUty.FileSystem,
  10323. "dance_cm3d_002_end_f1.anm",
  10324. false,
  10325. false);
  10326. }
  10327. }
  10328. else
  10329. {
  10330. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10331. {
  10332. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10333. GameUty.FileSystem,
  10334. "dance_cm3d2_kara_001_sl_f1.anm",
  10335. false,
  10336. false);
  10337. }
  10338. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10339. text4 = textAsset.text;
  10340. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10341. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10342. && !isDanceStart9K && !isDanceStart13K)
  10343. {
  10344. dancePos[j] = maidArray[j].transform.position;
  10345. danceRot[j] = maidArray[j].transform.localRotation;
  10346. }
  10347. }
  10348. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10349. }
  10350. if (!isShift)
  10351. {
  10352. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10353. }
  10354. else
  10355. {
  10356. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10357. }
  10358. for (int j = 0; j < maidCnt; j++)
  10359. {
  10360. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10361. isStop[j] = false;
  10362. isLock[j] = false;
  10363. pHandL[j] = 0;
  10364. pHandR[j] = 0;
  10365. muneIKL[j] = false;
  10366. muneIKR[j] = false;
  10367. if (!isVR)
  10368. {
  10369. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10370. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10371. }
  10372. }
  10373. ikBui = 5;
  10374. isDanceStart1F = false;
  10375. isDanceStart2F = false;
  10376. isDanceStart3F = false;
  10377. isDanceStart4F = false;
  10378. isDanceStart5F = false;
  10379. isDanceStart6F = false;
  10380. isDanceStart7F = false;
  10381. isDanceStart8F = false;
  10382. isDanceStart9F = false;
  10383. isDanceStart10F = false;
  10384. isDanceStart11F = false;
  10385. isDanceStart12F = false;
  10386. isDanceStart13F = false;
  10387. isDanceStart14F = false;
  10388. isDanceStart15F = false;
  10389. for (int j = 0; j < maidCnt; j++)
  10390. {
  10391. danceFace[j] = 0f;
  10392. }
  10393. if (isDanceStart7V)
  10394. {
  10395. for (int j = 0; j < maidCnt; j++)
  10396. {
  10397. if (maidArray[j] && maidArray[j].Visible)
  10398. {
  10399. if (isDanceStart7V)
  10400. {
  10401. maidArray[j].SetPos(dancePos[j]);
  10402. maidArray[j].body0.transform.localRotation = danceRot[j];
  10403. }
  10404. }
  10405. }
  10406. isDanceStart7V = false;
  10407. }
  10408. if (isDanceStart8V)
  10409. {
  10410. for (int j = 0; j < maidCnt; j++)
  10411. {
  10412. if (maidArray[j] && maidArray[j].Visible)
  10413. {
  10414. if (isDanceStart8V)
  10415. {
  10416. maidArray[j].SetPos(dancePos[j]);
  10417. maidArray[j].body0.transform.localRotation = danceRot[j];
  10418. }
  10419. }
  10420. }
  10421. isDanceStart8V = false;
  10422. isDanceStart8P = false;
  10423. }
  10424. if (isDanceStart11V)
  10425. {
  10426. for (int j = 0; j < maidCnt; j++)
  10427. {
  10428. if (maidArray[j] && maidArray[j].Visible)
  10429. {
  10430. if (isDanceStart11V)
  10431. {
  10432. maidArray[j].SetPos(dancePos[j]);
  10433. maidArray[j].body0.transform.localRotation = danceRot[j];
  10434. }
  10435. }
  10436. }
  10437. isDanceStart11V = false;
  10438. }
  10439. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10440. || isDanceStart13K)
  10441. {
  10442. for (int j = 0; j < maidCnt; j++)
  10443. {
  10444. if (maidArray[j] && maidArray[j].Visible)
  10445. {
  10446. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10447. || isDanceStart13K)
  10448. {
  10449. maidArray[j].SetPos(dancePos[j]);
  10450. maidArray[j].body0.transform.localRotation = danceRot[j];
  10451. int i = j;
  10452. if (!isVR)
  10453. {
  10454. delCount[i] = 20;
  10455. if (goSlot[(int)selectList[i]] != null)
  10456. {
  10457. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10458. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10459. {
  10460. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10461. }
  10462. }
  10463. }
  10464. Maid maid = maidArray[j];
  10465. maid.DelProp(MPN.handitem, true);
  10466. maid.DelProp(MPN.accvag, true);
  10467. maid.DelProp(MPN.accanl, true);
  10468. maid.DelProp(MPN.kousoku_upper, true);
  10469. maid.DelProp(MPN.kousoku_lower, true);
  10470. maid.AllProcPropSeqStart();
  10471. }
  10472. }
  10473. }
  10474. isDanceStart1K = false;
  10475. isDanceStart3K = false;
  10476. isDanceStart4K = false;
  10477. isDanceStart5K = false;
  10478. isDanceStart6K = false;
  10479. isDanceStart9K = false;
  10480. isDanceStart13K = false;
  10481. }
  10482. if (isDanceStart14V)
  10483. {
  10484. for (int j = 0; j < maidCnt; j++)
  10485. {
  10486. if (maidArray[j] && maidArray[j].Visible)
  10487. {
  10488. if (isDanceStart14V)
  10489. {
  10490. maidArray[j].SetPos(dancePos[j]);
  10491. maidArray[j].body0.transform.localRotation = danceRot[j];
  10492. }
  10493. }
  10494. }
  10495. isDanceStart14V = false;
  10496. }
  10497. if (isDanceStart15V)
  10498. {
  10499. for (int j = 0; j < maidCnt; j++)
  10500. {
  10501. if (maidArray[j] && maidArray[j].Visible)
  10502. {
  10503. if (isDanceStart15V)
  10504. {
  10505. maidArray[j].SetPos(dancePos[j]);
  10506. maidArray[j].body0.transform.localRotation = danceRot[j];
  10507. }
  10508. }
  10509. }
  10510. isDanceStart15V = false;
  10511. }
  10512. if (maidArray[1] && maidArray[1].Visible)
  10513. {
  10514. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10515. {
  10516. Vector3 vector = Vector3.zero;
  10517. vector.x = 0.6f;
  10518. maidArray[1].SetPos(vector);
  10519. if (maidArray[2] && maidArray[2].Visible)
  10520. {
  10521. vector.x = -0.6f;
  10522. maidArray[2].SetPos(vector);
  10523. }
  10524. if (maidArray[3] && maidArray[3].Visible)
  10525. {
  10526. vector.x = 1.2f;
  10527. maidArray[3].SetPos(vector);
  10528. }
  10529. if (maidArray[4] && maidArray[4].Visible)
  10530. {
  10531. vector.x = -1.2f;
  10532. maidArray[4].SetPos(vector);
  10533. }
  10534. if (maidArray[5] && maidArray[5].Visible)
  10535. {
  10536. vector.x = 1.8f;
  10537. maidArray[5].SetPos(vector);
  10538. }
  10539. if (maidArray[6] && maidArray[6].Visible)
  10540. {
  10541. vector.x = -1.8f;
  10542. maidArray[6].SetPos(vector);
  10543. }
  10544. if (maidArray[7] && maidArray[7].Visible)
  10545. {
  10546. vector.x = 2.4f;
  10547. maidArray[7].SetPos(vector);
  10548. }
  10549. if (maidArray[8] && maidArray[8].Visible)
  10550. {
  10551. vector.x = -2.4f;
  10552. maidArray[8].SetPos(vector);
  10553. }
  10554. if (maidArray[9] && maidArray[9].Visible)
  10555. {
  10556. vector.x = 3f;
  10557. maidArray[9].SetPos(vector);
  10558. }
  10559. if (maidArray[10] && maidArray[10].Visible)
  10560. {
  10561. vector.x = -3f;
  10562. maidArray[10].SetPos(vector);
  10563. }
  10564. if (maidArray[11] && maidArray[11].Visible)
  10565. {
  10566. vector.x = 3.6f;
  10567. maidArray[11].SetPos(vector);
  10568. }
  10569. if (maidArray[12] && maidArray[12].Visible)
  10570. {
  10571. vector.x = -3.6f;
  10572. maidArray[12].SetPos(vector);
  10573. }
  10574. if (maidArray[13] && maidArray[13].Visible)
  10575. {
  10576. vector.x = 4.2f;
  10577. maidArray[13].SetPos(vector);
  10578. }
  10579. }
  10580. }
  10581. if (isShift)
  10582. {
  10583. isDanceStart3K = true;
  10584. for (int j = 0; j < maidCnt; j++)
  10585. {
  10586. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10587. maidArray[j].body0.transform.localRotation.y + 90f,
  10588. maidArray[j].body0.transform.localRotation.z));
  10589. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10590. maidArray[j].body0.transform.position.y,
  10591. maidArray[j].body0.transform.position.z + 4f));
  10592. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10593. int i = j;
  10594. Maid maid = maidArray[j];
  10595. if (!isVR)
  10596. {
  10597. delCount[i] = 20;
  10598. if (goSlot[(int)selectList[i]] != null)
  10599. {
  10600. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10601. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10602. {
  10603. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10604. }
  10605. }
  10606. }
  10607. string[] array = new string[2];
  10608. array = text2.Split(new char[] { ',' });
  10609. maid.DelProp(MPN.handitem, true);
  10610. maid.DelProp(MPN.accvag, true);
  10611. maid.DelProp(MPN.accanl, true);
  10612. maid.DelProp(MPN.kousoku_upper, true);
  10613. maid.DelProp(MPN.kousoku_lower, true);
  10614. if (array[0] != "")
  10615. {
  10616. maid.SetProp(array[0], array[1], 0, true, false);
  10617. }
  10618. maid.AllProcPropSeqStart();
  10619. }
  10620. }
  10621. isDance = true;
  10622. isDanceStart3 = true;
  10623. isF3 = false;
  10624. }
  10625. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10626. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10627. {
  10628. GameMain.Instance.SoundMgr.StopBGM(0f);
  10629. isF3 = true;
  10630. if (getModKeyPressing(modKey.Shift))
  10631. {
  10632. isShift = true;
  10633. }
  10634. }
  10635. if (isSF1 || isSF2 || isSF3)
  10636. {
  10637. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10638. string text4 = textAsset.text;
  10639. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10640. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10641. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10642. for (int j = 0; j < maidCnt; j++)
  10643. {
  10644. if (!isShift)
  10645. {
  10646. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10647. {
  10648. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10649. GameUty.FileSystem,
  10650. "dance_cm3d2_002_smt_f.anm",
  10651. false,
  10652. false);
  10653. }
  10654. }
  10655. else
  10656. {
  10657. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10658. {
  10659. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10660. GameUty.FileSystem,
  10661. "dance_cm3d2_kara02_001_smt_f1.anm",
  10662. false,
  10663. false);
  10664. }
  10665. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10666. text4 = textAsset.text;
  10667. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10668. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10669. && !isDanceStart9K && !isDanceStart13K)
  10670. {
  10671. dancePos[j] = maidArray[j].transform.position;
  10672. danceRot[j] = maidArray[j].transform.localRotation;
  10673. }
  10674. }
  10675. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10676. }
  10677. if (!isShift)
  10678. {
  10679. if (isSF1)
  10680. {
  10681. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10682. }
  10683. if (isSF2)
  10684. {
  10685. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10686. }
  10687. if (isSF3)
  10688. {
  10689. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10690. }
  10691. }
  10692. else
  10693. {
  10694. if (isSF1)
  10695. {
  10696. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10697. }
  10698. if (isSF2)
  10699. {
  10700. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10701. }
  10702. if (isSF3)
  10703. {
  10704. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10705. }
  10706. }
  10707. for (int j = 0; j < maidCnt; j++)
  10708. {
  10709. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10710. isStop[j] = false;
  10711. isLock[j] = false;
  10712. pHandL[j] = 0;
  10713. pHandR[j] = 0;
  10714. muneIKL[j] = false;
  10715. muneIKR[j] = false;
  10716. if (!isVR)
  10717. {
  10718. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10719. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10720. }
  10721. }
  10722. ikBui = 5;
  10723. isDanceStart1F = false;
  10724. isDanceStart2F = false;
  10725. isDanceStart3F = false;
  10726. isDanceStart4F = false;
  10727. isDanceStart5F = false;
  10728. isDanceStart6F = false;
  10729. isDanceStart7F = false;
  10730. isDanceStart8F = false;
  10731. isDanceStart9F = false;
  10732. isDanceStart10F = false;
  10733. isDanceStart11F = false;
  10734. isDanceStart12F = false;
  10735. isDanceStart13F = false;
  10736. isDanceStart14F = false;
  10737. isDanceStart15F = false;
  10738. for (int j = 0; j < maidCnt; j++)
  10739. {
  10740. danceFace[j] = 0f;
  10741. }
  10742. if (isDanceStart7V)
  10743. {
  10744. for (int j = 0; j < maidCnt; j++)
  10745. {
  10746. if (maidArray[j] && maidArray[j].Visible)
  10747. {
  10748. if (isDanceStart7V)
  10749. {
  10750. maidArray[j].SetPos(dancePos[j]);
  10751. maidArray[j].body0.transform.localRotation = danceRot[j];
  10752. }
  10753. }
  10754. }
  10755. isDanceStart7V = false;
  10756. }
  10757. if (isDanceStart8V)
  10758. {
  10759. for (int j = 0; j < maidCnt; j++)
  10760. {
  10761. if (maidArray[j] && maidArray[j].Visible)
  10762. {
  10763. if (isDanceStart8V)
  10764. {
  10765. maidArray[j].SetPos(dancePos[j]);
  10766. maidArray[j].body0.transform.localRotation = danceRot[j];
  10767. }
  10768. }
  10769. }
  10770. isDanceStart8V = false;
  10771. isDanceStart8P = false;
  10772. }
  10773. if (isDanceStart11V)
  10774. {
  10775. for (int j = 0; j < maidCnt; j++)
  10776. {
  10777. if (maidArray[j] && maidArray[j].Visible)
  10778. {
  10779. if (isDanceStart11V)
  10780. {
  10781. maidArray[j].SetPos(dancePos[j]);
  10782. maidArray[j].body0.transform.localRotation = danceRot[j];
  10783. }
  10784. }
  10785. }
  10786. isDanceStart11V = false;
  10787. }
  10788. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10789. || isDanceStart13K)
  10790. {
  10791. for (int j = 0; j < maidCnt; j++)
  10792. {
  10793. if (maidArray[j] && maidArray[j].Visible)
  10794. {
  10795. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10796. || isDanceStart13K)
  10797. {
  10798. maidArray[j].SetPos(dancePos[j]);
  10799. maidArray[j].body0.transform.localRotation = danceRot[j];
  10800. int i = j;
  10801. if (!isVR)
  10802. {
  10803. delCount[i] = 20;
  10804. if (goSlot[(int)selectList[i]] != null)
  10805. {
  10806. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10807. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10808. {
  10809. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10810. }
  10811. }
  10812. }
  10813. Maid maid = maidArray[j];
  10814. maid.DelProp(MPN.handitem, true);
  10815. maid.DelProp(MPN.accvag, true);
  10816. maid.DelProp(MPN.accanl, true);
  10817. maid.DelProp(MPN.kousoku_upper, true);
  10818. maid.DelProp(MPN.kousoku_lower, true);
  10819. maid.AllProcPropSeqStart();
  10820. }
  10821. }
  10822. }
  10823. isDanceStart1K = false;
  10824. isDanceStart3K = false;
  10825. isDanceStart4K = false;
  10826. isDanceStart5K = false;
  10827. isDanceStart6K = false;
  10828. isDanceStart9K = false;
  10829. isDanceStart13K = false;
  10830. }
  10831. if (isDanceStart14V)
  10832. {
  10833. for (int j = 0; j < maidCnt; j++)
  10834. {
  10835. if (maidArray[j] && maidArray[j].Visible)
  10836. {
  10837. if (isDanceStart14V)
  10838. {
  10839. maidArray[j].SetPos(dancePos[j]);
  10840. maidArray[j].body0.transform.localRotation = danceRot[j];
  10841. }
  10842. }
  10843. }
  10844. isDanceStart14V = false;
  10845. }
  10846. if (isDanceStart15V)
  10847. {
  10848. for (int j = 0; j < maidCnt; j++)
  10849. {
  10850. if (maidArray[j] && maidArray[j].Visible)
  10851. {
  10852. if (isDanceStart15V)
  10853. {
  10854. maidArray[j].SetPos(dancePos[j]);
  10855. maidArray[j].body0.transform.localRotation = danceRot[j];
  10856. }
  10857. }
  10858. }
  10859. isDanceStart15V = false;
  10860. }
  10861. if (maidArray[1] && maidArray[1].Visible)
  10862. {
  10863. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10864. {
  10865. Vector3 vector = Vector3.zero;
  10866. vector.x = 0.6f;
  10867. maidArray[1].SetPos(vector);
  10868. if (maidArray[2] && maidArray[2].Visible)
  10869. {
  10870. vector.x = -0.6f;
  10871. maidArray[2].SetPos(vector);
  10872. }
  10873. if (maidArray[3] && maidArray[3].Visible)
  10874. {
  10875. vector.x = 1.2f;
  10876. maidArray[3].SetPos(vector);
  10877. }
  10878. if (maidArray[4] && maidArray[4].Visible)
  10879. {
  10880. vector.x = -1.2f;
  10881. maidArray[4].SetPos(vector);
  10882. }
  10883. if (maidArray[5] && maidArray[5].Visible)
  10884. {
  10885. vector.x = 1.8f;
  10886. maidArray[5].SetPos(vector);
  10887. }
  10888. if (maidArray[6] && maidArray[6].Visible)
  10889. {
  10890. vector.x = -1.8f;
  10891. maidArray[6].SetPos(vector);
  10892. }
  10893. if (maidArray[7] && maidArray[7].Visible)
  10894. {
  10895. vector.x = 2.4f;
  10896. maidArray[7].SetPos(vector);
  10897. }
  10898. if (maidArray[8] && maidArray[8].Visible)
  10899. {
  10900. vector.x = -2.4f;
  10901. maidArray[8].SetPos(vector);
  10902. }
  10903. if (maidArray[9] && maidArray[9].Visible)
  10904. {
  10905. vector.x = 3f;
  10906. maidArray[9].SetPos(vector);
  10907. }
  10908. if (maidArray[10] && maidArray[10].Visible)
  10909. {
  10910. vector.x = -3f;
  10911. maidArray[10].SetPos(vector);
  10912. }
  10913. if (maidArray[11] && maidArray[11].Visible)
  10914. {
  10915. vector.x = 3.6f;
  10916. maidArray[11].SetPos(vector);
  10917. }
  10918. if (maidArray[12] && maidArray[12].Visible)
  10919. {
  10920. vector.x = -3.6f;
  10921. maidArray[12].SetPos(vector);
  10922. }
  10923. if (maidArray[13] && maidArray[13].Visible)
  10924. {
  10925. vector.x = 4.2f;
  10926. maidArray[13].SetPos(vector);
  10927. }
  10928. }
  10929. }
  10930. if (isShift)
  10931. {
  10932. isDanceStart4K = true;
  10933. for (int j = 0; j < maidCnt; j++)
  10934. {
  10935. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10936. maidArray[j].body0.transform.localRotation.y + 90f,
  10937. maidArray[j].body0.transform.localRotation.z));
  10938. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10939. maidArray[j].body0.transform.position.y,
  10940. maidArray[j].body0.transform.position.z + 4f));
  10941. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10942. int i = j;
  10943. Maid maid = maidArray[j];
  10944. if (!isVR)
  10945. {
  10946. delCount[i] = 20;
  10947. if (goSlot[(int)selectList[i]] != null)
  10948. {
  10949. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10950. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10951. {
  10952. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10953. }
  10954. }
  10955. }
  10956. string[] array = new string[2];
  10957. array = text2.Split(new char[] { ',' });
  10958. maid.DelProp(MPN.handitem, true);
  10959. maid.DelProp(MPN.accvag, true);
  10960. maid.DelProp(MPN.accanl, true);
  10961. maid.DelProp(MPN.kousoku_upper, true);
  10962. maid.DelProp(MPN.kousoku_lower, true);
  10963. if (array[0] != "")
  10964. {
  10965. maid.SetProp(array[0], array[1], 0, true, false);
  10966. }
  10967. maid.AllProcPropSeqStart();
  10968. }
  10969. }
  10970. isDance = true;
  10971. isDanceStart4 = true;
  10972. isSF1 = false;
  10973. isSF2 = false;
  10974. isSF3 = false;
  10975. }
  10976. if (isHS1 || isHS2 || isHS3)
  10977. {
  10978. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10979. string text4 = textAsset.text;
  10980. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10981. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10982. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10983. for (int j = 0; j < maidCnt; j++)
  10984. {
  10985. if (!isShift)
  10986. {
  10987. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10988. {
  10989. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10990. GameUty.FileSystem,
  10991. "dance_cm3d2_003_hs_f1.anm",
  10992. false,
  10993. false);
  10994. }
  10995. }
  10996. else
  10997. {
  10998. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10999. {
  11000. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  11001. GameUty.FileSystem,
  11002. "dance_cm3d2_kara02_003_hs_f1.anm",
  11003. false,
  11004. false);
  11005. }
  11006. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  11007. text4 = textAsset.text;
  11008. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11009. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11010. && !isDanceStart9K && !isDanceStart13K)
  11011. {
  11012. dancePos[j] = maidArray[j].transform.position;
  11013. danceRot[j] = maidArray[j].transform.localRotation;
  11014. }
  11015. }
  11016. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11017. }
  11018. if (!isShift)
  11019. {
  11020. if (isHS1)
  11021. {
  11022. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11023. }
  11024. if (isHS2)
  11025. {
  11026. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11027. }
  11028. if (isHS3)
  11029. {
  11030. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11031. }
  11032. }
  11033. else
  11034. {
  11035. if (isHS1)
  11036. {
  11037. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11038. }
  11039. if (isHS2)
  11040. {
  11041. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11042. }
  11043. if (isHS3)
  11044. {
  11045. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11046. }
  11047. }
  11048. for (int j = 0; j < maidCnt; j++)
  11049. {
  11050. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11051. isStop[j] = false;
  11052. isLock[j] = false;
  11053. pHandL[j] = 0;
  11054. pHandR[j] = 0;
  11055. muneIKL[j] = false;
  11056. muneIKR[j] = false;
  11057. if (!isVR)
  11058. {
  11059. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11060. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11061. }
  11062. }
  11063. ikBui = 5;
  11064. isDanceStart1F = false;
  11065. isDanceStart2F = false;
  11066. isDanceStart3F = false;
  11067. isDanceStart4F = false;
  11068. isDanceStart5F = false;
  11069. isDanceStart6F = false;
  11070. isDanceStart7F = false;
  11071. isDanceStart8F = false;
  11072. isDanceStart9F = false;
  11073. isDanceStart10F = false;
  11074. isDanceStart11F = false;
  11075. isDanceStart12F = false;
  11076. isDanceStart13F = false;
  11077. isDanceStart14F = false;
  11078. isDanceStart15F = false;
  11079. for (int j = 0; j < maidCnt; j++)
  11080. {
  11081. danceFace[j] = 0f;
  11082. }
  11083. if (isDanceStart7V)
  11084. {
  11085. for (int j = 0; j < maidCnt; j++)
  11086. {
  11087. if (maidArray[j] && maidArray[j].Visible)
  11088. {
  11089. if (isDanceStart7V)
  11090. {
  11091. maidArray[j].SetPos(dancePos[j]);
  11092. maidArray[j].body0.transform.localRotation = danceRot[j];
  11093. }
  11094. }
  11095. }
  11096. isDanceStart7V = false;
  11097. }
  11098. if (isDanceStart8V)
  11099. {
  11100. for (int j = 0; j < maidCnt; j++)
  11101. {
  11102. if (maidArray[j] && maidArray[j].Visible)
  11103. {
  11104. if (isDanceStart8V)
  11105. {
  11106. maidArray[j].SetPos(dancePos[j]);
  11107. maidArray[j].body0.transform.localRotation = danceRot[j];
  11108. }
  11109. }
  11110. }
  11111. isDanceStart8V = false;
  11112. isDanceStart8P = false;
  11113. }
  11114. if (isDanceStart11V)
  11115. {
  11116. for (int j = 0; j < maidCnt; j++)
  11117. {
  11118. if (maidArray[j] && maidArray[j].Visible)
  11119. {
  11120. if (isDanceStart11V)
  11121. {
  11122. maidArray[j].SetPos(dancePos[j]);
  11123. maidArray[j].body0.transform.localRotation = danceRot[j];
  11124. }
  11125. }
  11126. }
  11127. isDanceStart11V = false;
  11128. }
  11129. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11130. || isDanceStart13K)
  11131. {
  11132. for (int j = 0; j < maidCnt; j++)
  11133. {
  11134. if (maidArray[j] && maidArray[j].Visible)
  11135. {
  11136. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11137. || isDanceStart13K)
  11138. {
  11139. maidArray[j].SetPos(dancePos[j]);
  11140. maidArray[j].body0.transform.localRotation = danceRot[j];
  11141. int i = j;
  11142. if (!isVR)
  11143. {
  11144. delCount[i] = 20;
  11145. if (goSlot[(int)selectList[i]] != null)
  11146. {
  11147. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11148. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11149. {
  11150. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11151. }
  11152. }
  11153. }
  11154. Maid maid = maidArray[j];
  11155. maid.DelProp(MPN.handitem, true);
  11156. maid.DelProp(MPN.accvag, true);
  11157. maid.DelProp(MPN.accanl, true);
  11158. maid.DelProp(MPN.kousoku_upper, true);
  11159. maid.DelProp(MPN.kousoku_lower, true);
  11160. maid.AllProcPropSeqStart();
  11161. }
  11162. }
  11163. }
  11164. isDanceStart1K = false;
  11165. isDanceStart3K = false;
  11166. isDanceStart4K = false;
  11167. isDanceStart5K = false;
  11168. isDanceStart6K = false;
  11169. isDanceStart9K = false;
  11170. isDanceStart13K = false;
  11171. }
  11172. if (isDanceStart14V)
  11173. {
  11174. for (int j = 0; j < maidCnt; j++)
  11175. {
  11176. if (maidArray[j] && maidArray[j].Visible)
  11177. {
  11178. if (isDanceStart14V)
  11179. {
  11180. maidArray[j].SetPos(dancePos[j]);
  11181. maidArray[j].body0.transform.localRotation = danceRot[j];
  11182. }
  11183. }
  11184. }
  11185. isDanceStart14V = false;
  11186. }
  11187. if (isDanceStart15V)
  11188. {
  11189. for (int j = 0; j < maidCnt; j++)
  11190. {
  11191. if (maidArray[j] && maidArray[j].Visible)
  11192. {
  11193. if (isDanceStart15V)
  11194. {
  11195. maidArray[j].SetPos(dancePos[j]);
  11196. maidArray[j].body0.transform.localRotation = danceRot[j];
  11197. }
  11198. }
  11199. }
  11200. isDanceStart15V = false;
  11201. }
  11202. if (maidArray[1] && maidArray[1].Visible)
  11203. {
  11204. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11205. {
  11206. Vector3 vector = Vector3.zero;
  11207. vector.x = 0.6f;
  11208. maidArray[1].SetPos(vector);
  11209. if (maidArray[2] && maidArray[2].Visible)
  11210. {
  11211. vector.x = -0.6f;
  11212. maidArray[2].SetPos(vector);
  11213. }
  11214. if (maidArray[3] && maidArray[3].Visible)
  11215. {
  11216. vector.x = 1.2f;
  11217. maidArray[3].SetPos(vector);
  11218. }
  11219. if (maidArray[4] && maidArray[4].Visible)
  11220. {
  11221. vector.x = -1.2f;
  11222. maidArray[4].SetPos(vector);
  11223. }
  11224. if (maidArray[5] && maidArray[5].Visible)
  11225. {
  11226. vector.x = 1.8f;
  11227. maidArray[5].SetPos(vector);
  11228. }
  11229. if (maidArray[6] && maidArray[6].Visible)
  11230. {
  11231. vector.x = -1.8f;
  11232. maidArray[6].SetPos(vector);
  11233. }
  11234. if (maidArray[7] && maidArray[7].Visible)
  11235. {
  11236. vector.x = 2.4f;
  11237. maidArray[7].SetPos(vector);
  11238. }
  11239. if (maidArray[8] && maidArray[8].Visible)
  11240. {
  11241. vector.x = -2.4f;
  11242. maidArray[8].SetPos(vector);
  11243. }
  11244. if (maidArray[9] && maidArray[9].Visible)
  11245. {
  11246. vector.x = 3f;
  11247. maidArray[9].SetPos(vector);
  11248. }
  11249. if (maidArray[10] && maidArray[10].Visible)
  11250. {
  11251. vector.x = -3f;
  11252. maidArray[10].SetPos(vector);
  11253. }
  11254. if (maidArray[11] && maidArray[11].Visible)
  11255. {
  11256. vector.x = 3.6f;
  11257. maidArray[11].SetPos(vector);
  11258. }
  11259. if (maidArray[12] && maidArray[12].Visible)
  11260. {
  11261. vector.x = -3.6f;
  11262. maidArray[12].SetPos(vector);
  11263. }
  11264. if (maidArray[13] && maidArray[13].Visible)
  11265. {
  11266. vector.x = 4.2f;
  11267. maidArray[13].SetPos(vector);
  11268. }
  11269. }
  11270. }
  11271. if (isShift)
  11272. {
  11273. isDanceStart6K = true;
  11274. for (int j = 0; j < maidCnt; j++)
  11275. {
  11276. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11277. maidArray[j].body0.transform.localRotation.y + 90f,
  11278. maidArray[j].body0.transform.localRotation.z));
  11279. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11280. maidArray[j].body0.transform.position.y,
  11281. maidArray[j].body0.transform.position.z + 4f));
  11282. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11283. int i = j;
  11284. Maid maid = maidArray[j];
  11285. if (!isVR)
  11286. {
  11287. delCount[i] = 20;
  11288. if (goSlot[(int)selectList[i]] != null)
  11289. {
  11290. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11291. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11292. {
  11293. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11294. }
  11295. }
  11296. }
  11297. string[] array = new string[2];
  11298. array = text2.Split(new char[] { ',' });
  11299. maid.DelProp(MPN.handitem, true);
  11300. maid.DelProp(MPN.accvag, true);
  11301. maid.DelProp(MPN.accanl, true);
  11302. maid.DelProp(MPN.kousoku_upper, true);
  11303. maid.DelProp(MPN.kousoku_lower, true);
  11304. if (array[0] != "")
  11305. {
  11306. maid.SetProp(array[0], array[1], 0, true, false);
  11307. }
  11308. maid.AllProcPropSeqStart();
  11309. }
  11310. }
  11311. isDance = true;
  11312. isDanceStart6 = true;
  11313. isHS1 = false;
  11314. isHS2 = false;
  11315. isHS3 = false;
  11316. }
  11317. if (isHS4 || isHS5 || isHS6)
  11318. {
  11319. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11320. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11321. for (int j = 0; j < maidCnt; j++)
  11322. {
  11323. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11324. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11325. switch (j)
  11326. {
  11327. case 1:
  11328. case 3:
  11329. case 5:
  11330. case 7:
  11331. case 9:
  11332. case 11:
  11333. case 13:
  11334. text5 = "dance_cm3d2_003_hs_f2.anm";
  11335. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11336. break;
  11337. }
  11338. if (maidArray[j] && maidArray[j].Visible)
  11339. {
  11340. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11341. {
  11342. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11343. }
  11344. string text4 = textAsset.text;
  11345. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11346. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11347. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11348. }
  11349. }
  11350. if (isHS4)
  11351. {
  11352. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11353. }
  11354. if (isHS5)
  11355. {
  11356. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11357. }
  11358. if (isHS6)
  11359. {
  11360. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11361. }
  11362. ikBui = 5;
  11363. isDanceStart1F = false;
  11364. isDanceStart2F = false;
  11365. isDanceStart3F = false;
  11366. isDanceStart4F = false;
  11367. isDanceStart5F = false;
  11368. isDanceStart6F = false;
  11369. isDanceStart7F = false;
  11370. isDanceStart8F = false;
  11371. isDanceStart9F = false;
  11372. isDanceStart10F = false;
  11373. isDanceStart11F = false;
  11374. isDanceStart12F = false;
  11375. isDanceStart13F = false;
  11376. isDanceStart14F = false;
  11377. isDanceStart15F = false;
  11378. for (int j = 0; j < maidCnt; j++)
  11379. {
  11380. danceFace[j] = 0f;
  11381. }
  11382. if (isDanceStart7V)
  11383. {
  11384. for (int j = 0; j < maidCnt; j++)
  11385. {
  11386. if (maidArray[j] && maidArray[j].Visible)
  11387. {
  11388. if (isDanceStart7V)
  11389. {
  11390. maidArray[j].SetPos(dancePos[j]);
  11391. maidArray[j].body0.transform.localRotation = danceRot[j];
  11392. }
  11393. }
  11394. }
  11395. isDanceStart7V = false;
  11396. }
  11397. if (isDanceStart8V)
  11398. {
  11399. for (int j = 0; j < maidCnt; j++)
  11400. {
  11401. if (maidArray[j] && maidArray[j].Visible)
  11402. {
  11403. if (isDanceStart8V)
  11404. {
  11405. maidArray[j].SetPos(dancePos[j]);
  11406. maidArray[j].body0.transform.localRotation = danceRot[j];
  11407. }
  11408. }
  11409. }
  11410. isDanceStart8V = false;
  11411. isDanceStart8P = false;
  11412. }
  11413. if (isDanceStart11V)
  11414. {
  11415. for (int j = 0; j < maidCnt; j++)
  11416. {
  11417. if (maidArray[j] && maidArray[j].Visible)
  11418. {
  11419. if (isDanceStart11V)
  11420. {
  11421. maidArray[j].SetPos(dancePos[j]);
  11422. maidArray[j].body0.transform.localRotation = danceRot[j];
  11423. }
  11424. }
  11425. }
  11426. isDanceStart11V = false;
  11427. }
  11428. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11429. || isDanceStart13K)
  11430. {
  11431. for (int j = 0; j < maidCnt; j++)
  11432. {
  11433. if (maidArray[j] && maidArray[j].Visible)
  11434. {
  11435. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11436. || isDanceStart13K)
  11437. {
  11438. maidArray[j].SetPos(dancePos[j]);
  11439. maidArray[j].body0.transform.localRotation = danceRot[j];
  11440. int i = j;
  11441. if (!isVR)
  11442. {
  11443. delCount[i] = 20;
  11444. if (goSlot[(int)selectList[i]] != null)
  11445. {
  11446. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11447. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11448. {
  11449. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11450. }
  11451. }
  11452. }
  11453. Maid maid = maidArray[j];
  11454. maid.DelProp(MPN.handitem, true);
  11455. maid.DelProp(MPN.accvag, true);
  11456. maid.DelProp(MPN.accanl, true);
  11457. maid.DelProp(MPN.kousoku_upper, true);
  11458. maid.DelProp(MPN.kousoku_lower, true);
  11459. maid.AllProcPropSeqStart();
  11460. }
  11461. }
  11462. }
  11463. isDanceStart1K = false;
  11464. isDanceStart3K = false;
  11465. isDanceStart4K = false;
  11466. isDanceStart5K = false;
  11467. isDanceStart6K = false;
  11468. isDanceStart9K = false;
  11469. isDanceStart13K = false;
  11470. }
  11471. if (isDanceStart14V)
  11472. {
  11473. for (int j = 0; j < maidCnt; j++)
  11474. {
  11475. if (maidArray[j] && maidArray[j].Visible)
  11476. {
  11477. if (isDanceStart14V)
  11478. {
  11479. maidArray[j].SetPos(dancePos[j]);
  11480. maidArray[j].body0.transform.localRotation = danceRot[j];
  11481. }
  11482. }
  11483. }
  11484. isDanceStart14V = false;
  11485. }
  11486. if (isDanceStart15V)
  11487. {
  11488. for (int j = 0; j < maidCnt; j++)
  11489. {
  11490. if (maidArray[j] && maidArray[j].Visible)
  11491. {
  11492. if (isDanceStart15V)
  11493. {
  11494. maidArray[j].SetPos(dancePos[j]);
  11495. maidArray[j].body0.transform.localRotation = danceRot[j];
  11496. }
  11497. }
  11498. }
  11499. isDanceStart15V = false;
  11500. }
  11501. for (int j = 0; j < maidCnt; j++)
  11502. {
  11503. isStop[j] = false;
  11504. isLock[j] = false;
  11505. pHandL[j] = 0;
  11506. pHandR[j] = 0;
  11507. muneIKL[j] = false;
  11508. muneIKR[j] = false;
  11509. if (!isVR)
  11510. {
  11511. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11512. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11513. }
  11514. if (maidArray[j].transform.position.y != 100f)
  11515. {
  11516. dancePos[j] = maidArray[j].transform.position;
  11517. }
  11518. else
  11519. {
  11520. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11521. }
  11522. danceRot[j] = maidArray[j].transform.localRotation;
  11523. }
  11524. if (maidArray[1] && maidArray[1].Visible)
  11525. {
  11526. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11527. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11528. }
  11529. if (maidArray[3] && maidArray[3].Visible)
  11530. {
  11531. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11532. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11533. }
  11534. if (maidArray[5] && maidArray[5].Visible)
  11535. {
  11536. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11537. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11538. }
  11539. if (maidArray[7] && maidArray[7].Visible)
  11540. {
  11541. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11542. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11543. }
  11544. if (maidArray[9] && maidArray[9].Visible)
  11545. {
  11546. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11547. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11548. }
  11549. if (maidArray[11] && maidArray[11].Visible)
  11550. {
  11551. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11552. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11553. }
  11554. if (maidArray[13] && maidArray[13].Visible)
  11555. {
  11556. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11557. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11558. }
  11559. if (maidArray[2] && maidArray[2].Visible)
  11560. {
  11561. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11562. {
  11563. Vector3 vector = Vector3.zero;
  11564. vector.x = 0.6f;
  11565. maidArray[1].SetPos(vector);
  11566. if (maidArray[2] && maidArray[2].Visible)
  11567. {
  11568. vector.x = -0.6f;
  11569. maidArray[2].SetPos(vector);
  11570. }
  11571. if (maidArray[3] && maidArray[3].Visible)
  11572. {
  11573. vector.x = 1.2f;
  11574. maidArray[3].SetPos(vector);
  11575. }
  11576. if (maidArray[4] && maidArray[4].Visible)
  11577. {
  11578. vector.x = -1.2f;
  11579. maidArray[4].SetPos(vector);
  11580. }
  11581. if (maidArray[5] && maidArray[5].Visible)
  11582. {
  11583. vector.x = 1.8f;
  11584. maidArray[5].SetPos(vector);
  11585. }
  11586. if (maidArray[6] && maidArray[6].Visible)
  11587. {
  11588. vector.x = -1.8f;
  11589. maidArray[6].SetPos(vector);
  11590. }
  11591. if (maidArray[7] && maidArray[7].Visible)
  11592. {
  11593. vector.x = 2.4f;
  11594. maidArray[7].SetPos(vector);
  11595. }
  11596. if (maidArray[8] && maidArray[8].Visible)
  11597. {
  11598. vector.x = -2.4f;
  11599. maidArray[8].SetPos(vector);
  11600. }
  11601. if (maidArray[9] && maidArray[9].Visible)
  11602. {
  11603. vector.x = 3f;
  11604. maidArray[9].SetPos(vector);
  11605. }
  11606. if (maidArray[10] && maidArray[10].Visible)
  11607. {
  11608. vector.x = -3f;
  11609. maidArray[10].SetPos(vector);
  11610. }
  11611. if (maidArray[11] && maidArray[11].Visible)
  11612. {
  11613. vector.x = 3.6f;
  11614. maidArray[11].SetPos(vector);
  11615. }
  11616. if (maidArray[12] && maidArray[12].Visible)
  11617. {
  11618. vector.x = -3.6f;
  11619. maidArray[12].SetPos(vector);
  11620. }
  11621. if (maidArray[13] && maidArray[13].Visible)
  11622. {
  11623. vector.x = 4.2f;
  11624. maidArray[13].SetPos(vector);
  11625. }
  11626. }
  11627. }
  11628. isDance = true;
  11629. isDanceStart7 = true;
  11630. isHS4 = false;
  11631. isHS5 = false;
  11632. isHS6 = false;
  11633. }
  11634. if (isHS7 || isHS8 || isHS9)
  11635. {
  11636. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11637. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11638. for (int j = 0; j < maidCnt; j++)
  11639. {
  11640. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11641. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11642. switch (j)
  11643. {
  11644. case 1:
  11645. case 5:
  11646. case 9:
  11647. case 13:
  11648. text5 = "dance_cm3d2_003_hs_f2.anm";
  11649. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11650. break;
  11651. case 2:
  11652. case 6:
  11653. case 10:
  11654. text5 = "dance_cm3d2_003_hs_f3.anm";
  11655. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11656. break;
  11657. case 3:
  11658. case 7:
  11659. case 11:
  11660. text5 = "dance_cm3d2_003_hs_f4.anm";
  11661. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11662. break;
  11663. }
  11664. if (maidArray[j] && maidArray[j].Visible)
  11665. {
  11666. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11667. {
  11668. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11669. }
  11670. }
  11671. string text4 = textAsset.text;
  11672. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11673. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11674. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11675. }
  11676. if (isHS7)
  11677. {
  11678. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11679. }
  11680. if (isHS8)
  11681. {
  11682. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11683. }
  11684. if (isHS9)
  11685. {
  11686. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11687. }
  11688. ikBui = 5;
  11689. isDanceStart1F = false;
  11690. isDanceStart2F = false;
  11691. isDanceStart3F = false;
  11692. isDanceStart4F = false;
  11693. isDanceStart5F = false;
  11694. isDanceStart6F = false;
  11695. isDanceStart7F = false;
  11696. isDanceStart8F = false;
  11697. isDanceStart9F = false;
  11698. isDanceStart10F = false;
  11699. isDanceStart11F = false;
  11700. isDanceStart12F = false;
  11701. isDanceStart13F = false;
  11702. isDanceStart14F = false;
  11703. isDanceStart15F = false;
  11704. for (int j = 0; j < maidCnt; j++)
  11705. {
  11706. danceFace[j] = 0f;
  11707. }
  11708. if (isDanceStart8V)
  11709. {
  11710. for (int j = 0; j < maidCnt; j++)
  11711. {
  11712. if (maidArray[j] && maidArray[j].Visible)
  11713. {
  11714. if (isDanceStart8V)
  11715. {
  11716. maidArray[j].SetPos(dancePos[j]);
  11717. maidArray[j].body0.transform.localRotation = danceRot[j];
  11718. }
  11719. }
  11720. }
  11721. isDanceStart8V = false;
  11722. isDanceStart8P = false;
  11723. }
  11724. for (int j = 0; j < maidCnt; j++)
  11725. {
  11726. isStop[j] = false;
  11727. isLock[j] = false;
  11728. pHandL[j] = 0;
  11729. pHandR[j] = 0;
  11730. muneIKL[j] = false;
  11731. muneIKR[j] = false;
  11732. if (!isVR)
  11733. {
  11734. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11735. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11736. }
  11737. if (maidArray[j].transform.position.y != 100f)
  11738. {
  11739. dancePos[j] = maidArray[j].transform.position;
  11740. }
  11741. else
  11742. {
  11743. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11744. }
  11745. danceRot[j] = maidArray[j].transform.localRotation;
  11746. }
  11747. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11748. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11749. {
  11750. maidArray[0].SetPos(Vector3.zero);
  11751. maidArray[0].SetRot(Vector3.zero);
  11752. }
  11753. if (maidArray[1] && maidArray[1].Visible)
  11754. {
  11755. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11756. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11757. }
  11758. if (maidArray[2] && maidArray[2].Visible)
  11759. {
  11760. maidArray[2].SetPos(maidArray[0].transform.position);
  11761. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11762. }
  11763. if (maidArray[3] && maidArray[3].Visible)
  11764. {
  11765. maidArray[3].SetPos(maidArray[0].transform.position);
  11766. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11767. }
  11768. if (maidArray[5] && maidArray[5].Visible)
  11769. {
  11770. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11771. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11772. }
  11773. if (maidArray[6] && maidArray[6].Visible)
  11774. {
  11775. maidArray[6].SetPos(maidArray[4].transform.position);
  11776. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11777. }
  11778. if (maidArray[7] && maidArray[7].Visible)
  11779. {
  11780. maidArray[7].SetPos(maidArray[4].transform.position);
  11781. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11782. }
  11783. if (maidArray[9] && maidArray[9].Visible)
  11784. {
  11785. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11786. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11787. }
  11788. if (maidArray[10] && maidArray[10].Visible)
  11789. {
  11790. maidArray[10].SetPos(maidArray[8].transform.position);
  11791. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11792. }
  11793. if (maidArray[11] && maidArray[11].Visible)
  11794. {
  11795. maidArray[11].SetPos(maidArray[8].transform.position);
  11796. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11797. }
  11798. if (maidArray[13] && maidArray[13].Visible)
  11799. {
  11800. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11801. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11802. }
  11803. if (maidArray[4] && maidArray[4].Visible)
  11804. {
  11805. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11806. {
  11807. Vector3 vector = Vector3.zero;
  11808. vector.x = 0.6f;
  11809. maidArray[1].SetPos(vector);
  11810. if (maidArray[2] && maidArray[2].Visible)
  11811. {
  11812. vector.x = -0.6f;
  11813. maidArray[2].SetPos(vector);
  11814. }
  11815. if (maidArray[3] && maidArray[3].Visible)
  11816. {
  11817. vector.x = 1.2f;
  11818. maidArray[3].SetPos(vector);
  11819. }
  11820. if (maidArray[4] && maidArray[4].Visible)
  11821. {
  11822. vector.x = -1.2f;
  11823. maidArray[4].SetPos(vector);
  11824. }
  11825. if (maidArray[5] && maidArray[5].Visible)
  11826. {
  11827. vector.x = 1.8f;
  11828. maidArray[5].SetPos(vector);
  11829. }
  11830. if (maidArray[6] && maidArray[6].Visible)
  11831. {
  11832. vector.x = -1.8f;
  11833. maidArray[6].SetPos(vector);
  11834. }
  11835. if (maidArray[7] && maidArray[7].Visible)
  11836. {
  11837. vector.x = 2.4f;
  11838. maidArray[7].SetPos(vector);
  11839. }
  11840. if (maidArray[8] && maidArray[8].Visible)
  11841. {
  11842. vector.x = -2.4f;
  11843. maidArray[8].SetPos(vector);
  11844. }
  11845. if (maidArray[9] && maidArray[9].Visible)
  11846. {
  11847. vector.x = 3f;
  11848. maidArray[9].SetPos(vector);
  11849. }
  11850. if (maidArray[10] && maidArray[10].Visible)
  11851. {
  11852. vector.x = -3f;
  11853. maidArray[10].SetPos(vector);
  11854. }
  11855. if (maidArray[11] && maidArray[11].Visible)
  11856. {
  11857. vector.x = 3.6f;
  11858. maidArray[11].SetPos(vector);
  11859. }
  11860. if (maidArray[12] && maidArray[12].Visible)
  11861. {
  11862. vector.x = -3.6f;
  11863. maidArray[12].SetPos(vector);
  11864. }
  11865. if (maidArray[13] && maidArray[13].Visible)
  11866. {
  11867. vector.x = 4.2f;
  11868. maidArray[13].SetPos(vector);
  11869. }
  11870. }
  11871. }
  11872. isDance = true;
  11873. isDanceStart8 = true;
  11874. isHS7 = false;
  11875. isHS8 = false;
  11876. isHS9 = false;
  11877. }
  11878. if (isCF1)
  11879. {
  11880. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11881. string text4 = textAsset.text;
  11882. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11883. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11884. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11885. for (int j = 0; j < maidCnt; j++)
  11886. {
  11887. if (!isShift)
  11888. {
  11889. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11890. {
  11891. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11892. GameUty.FileSystem,
  11893. "dance_cm3d_003_sp2_f1.anm",
  11894. false,
  11895. false);
  11896. }
  11897. }
  11898. else
  11899. {
  11900. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11901. {
  11902. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11903. GameUty.FileSystem,
  11904. "dance_cm3d2_kara02_002_rty_f1.anm",
  11905. false,
  11906. false);
  11907. }
  11908. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11909. text4 = textAsset.text;
  11910. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11911. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11912. && !isDanceStart9K && !isDanceStart13K)
  11913. {
  11914. dancePos[j] = maidArray[j].transform.position;
  11915. danceRot[j] = maidArray[j].transform.localRotation;
  11916. }
  11917. }
  11918. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11919. }
  11920. if (!isShift)
  11921. {
  11922. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11923. }
  11924. else
  11925. {
  11926. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11927. }
  11928. for (int j = 0; j < maidCnt; j++)
  11929. {
  11930. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11931. isStop[j] = false;
  11932. isLock[j] = false;
  11933. pHandL[j] = 0;
  11934. pHandR[j] = 0;
  11935. muneIKL[j] = false;
  11936. muneIKR[j] = false;
  11937. if (!isVR)
  11938. {
  11939. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11940. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11941. }
  11942. }
  11943. ikBui = 5;
  11944. isDanceStart1F = false;
  11945. isDanceStart2F = false;
  11946. isDanceStart3F = false;
  11947. isDanceStart4F = false;
  11948. isDanceStart5F = false;
  11949. isDanceStart6F = false;
  11950. isDanceStart7F = false;
  11951. isDanceStart8F = false;
  11952. isDanceStart9F = false;
  11953. isDanceStart10F = false;
  11954. isDanceStart11F = false;
  11955. isDanceStart12F = false;
  11956. isDanceStart13F = false;
  11957. isDanceStart14F = false;
  11958. isDanceStart15F = false;
  11959. for (int j = 0; j < maidCnt; j++)
  11960. {
  11961. danceFace[j] = 0f;
  11962. }
  11963. if (isDanceStart7V)
  11964. {
  11965. for (int j = 0; j < maidCnt; j++)
  11966. {
  11967. if (maidArray[j] && maidArray[j].Visible)
  11968. {
  11969. if (isDanceStart7V)
  11970. {
  11971. maidArray[j].SetPos(dancePos[j]);
  11972. maidArray[j].body0.transform.localRotation = danceRot[j];
  11973. }
  11974. }
  11975. }
  11976. isDanceStart7V = false;
  11977. }
  11978. if (isDanceStart8V)
  11979. {
  11980. for (int j = 0; j < maidCnt; j++)
  11981. {
  11982. if (maidArray[j] && maidArray[j].Visible)
  11983. {
  11984. if (isDanceStart8V)
  11985. {
  11986. maidArray[j].SetPos(dancePos[j]);
  11987. maidArray[j].body0.transform.localRotation = danceRot[j];
  11988. }
  11989. }
  11990. }
  11991. isDanceStart8V = false;
  11992. isDanceStart8P = false;
  11993. }
  11994. if (isDanceStart11V)
  11995. {
  11996. for (int j = 0; j < maidCnt; j++)
  11997. {
  11998. if (maidArray[j] && maidArray[j].Visible)
  11999. {
  12000. if (isDanceStart11V)
  12001. {
  12002. maidArray[j].SetPos(dancePos[j]);
  12003. maidArray[j].body0.transform.localRotation = danceRot[j];
  12004. }
  12005. }
  12006. }
  12007. isDanceStart11V = false;
  12008. }
  12009. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12010. || isDanceStart13K)
  12011. {
  12012. for (int j = 0; j < maidCnt; j++)
  12013. {
  12014. if (maidArray[j] && maidArray[j].Visible)
  12015. {
  12016. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12017. || isDanceStart13K)
  12018. {
  12019. maidArray[j].SetPos(dancePos[j]);
  12020. maidArray[j].body0.transform.localRotation = danceRot[j];
  12021. int i = j;
  12022. if (!isVR)
  12023. {
  12024. delCount[i] = 20;
  12025. if (goSlot[(int)selectList[i]] != null)
  12026. {
  12027. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12028. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12029. {
  12030. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12031. }
  12032. }
  12033. }
  12034. Maid maid = maidArray[j];
  12035. maid.DelProp(MPN.handitem, true);
  12036. maid.DelProp(MPN.accvag, true);
  12037. maid.DelProp(MPN.accanl, true);
  12038. maid.DelProp(MPN.kousoku_upper, true);
  12039. maid.DelProp(MPN.kousoku_lower, true);
  12040. maid.AllProcPropSeqStart();
  12041. }
  12042. }
  12043. }
  12044. isDanceStart1K = false;
  12045. isDanceStart3K = false;
  12046. isDanceStart4K = false;
  12047. isDanceStart5K = false;
  12048. isDanceStart6K = false;
  12049. isDanceStart9K = false;
  12050. isDanceStart13K = false;
  12051. }
  12052. if (isDanceStart14V)
  12053. {
  12054. for (int j = 0; j < maidCnt; j++)
  12055. {
  12056. if (maidArray[j] && maidArray[j].Visible)
  12057. {
  12058. if (isDanceStart14V)
  12059. {
  12060. maidArray[j].SetPos(dancePos[j]);
  12061. maidArray[j].body0.transform.localRotation = danceRot[j];
  12062. }
  12063. }
  12064. }
  12065. isDanceStart14V = false;
  12066. }
  12067. if (isDanceStart15V)
  12068. {
  12069. for (int j = 0; j < maidCnt; j++)
  12070. {
  12071. if (maidArray[j] && maidArray[j].Visible)
  12072. {
  12073. if (isDanceStart15V)
  12074. {
  12075. maidArray[j].SetPos(dancePos[j]);
  12076. maidArray[j].body0.transform.localRotation = danceRot[j];
  12077. }
  12078. }
  12079. }
  12080. isDanceStart15V = false;
  12081. }
  12082. if (maidArray[1] && maidArray[1].Visible)
  12083. {
  12084. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12085. {
  12086. Vector3 vector = Vector3.zero;
  12087. vector.x = 0.6f;
  12088. maidArray[1].SetPos(vector);
  12089. if (maidArray[2] && maidArray[2].Visible)
  12090. {
  12091. vector.x = -0.6f;
  12092. maidArray[2].SetPos(vector);
  12093. }
  12094. if (maidArray[3] && maidArray[3].Visible)
  12095. {
  12096. vector.x = 1.2f;
  12097. maidArray[3].SetPos(vector);
  12098. }
  12099. if (maidArray[4] && maidArray[4].Visible)
  12100. {
  12101. vector.x = -1.2f;
  12102. maidArray[4].SetPos(vector);
  12103. }
  12104. if (maidArray[5] && maidArray[5].Visible)
  12105. {
  12106. vector.x = 1.8f;
  12107. maidArray[5].SetPos(vector);
  12108. }
  12109. if (maidArray[6] && maidArray[6].Visible)
  12110. {
  12111. vector.x = -1.8f;
  12112. maidArray[6].SetPos(vector);
  12113. }
  12114. if (maidArray[7] && maidArray[7].Visible)
  12115. {
  12116. vector.x = 2.4f;
  12117. maidArray[7].SetPos(vector);
  12118. }
  12119. if (maidArray[8] && maidArray[8].Visible)
  12120. {
  12121. vector.x = -2.4f;
  12122. maidArray[8].SetPos(vector);
  12123. }
  12124. if (maidArray[9] && maidArray[9].Visible)
  12125. {
  12126. vector.x = 3f;
  12127. maidArray[9].SetPos(vector);
  12128. }
  12129. if (maidArray[10] && maidArray[10].Visible)
  12130. {
  12131. vector.x = -3f;
  12132. maidArray[10].SetPos(vector);
  12133. }
  12134. if (maidArray[11] && maidArray[11].Visible)
  12135. {
  12136. vector.x = 3.6f;
  12137. maidArray[11].SetPos(vector);
  12138. }
  12139. if (maidArray[12] && maidArray[12].Visible)
  12140. {
  12141. vector.x = -3.6f;
  12142. maidArray[12].SetPos(vector);
  12143. }
  12144. if (maidArray[13] && maidArray[13].Visible)
  12145. {
  12146. vector.x = 4.2f;
  12147. maidArray[13].SetPos(vector);
  12148. }
  12149. }
  12150. }
  12151. if (isShift)
  12152. {
  12153. isDanceStart5K = true;
  12154. for (int j = 0; j < maidCnt; j++)
  12155. {
  12156. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12157. maidArray[j].body0.transform.localRotation.y + 90f,
  12158. maidArray[j].body0.transform.localRotation.z));
  12159. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12160. maidArray[j].body0.transform.position.y,
  12161. maidArray[j].body0.transform.position.z + 4f));
  12162. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12163. int i = j;
  12164. Maid maid = maidArray[j];
  12165. if (!isVR)
  12166. {
  12167. delCount[i] = 20;
  12168. if (goSlot[(int)selectList[i]] != null)
  12169. {
  12170. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12171. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12172. {
  12173. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12174. }
  12175. }
  12176. }
  12177. string[] array = new string[2];
  12178. array = text2.Split(new char[] { ',' });
  12179. maid.DelProp(MPN.handitem, true);
  12180. maid.DelProp(MPN.accvag, true);
  12181. maid.DelProp(MPN.accanl, true);
  12182. maid.DelProp(MPN.kousoku_upper, true);
  12183. maid.DelProp(MPN.kousoku_lower, true);
  12184. if (array[0] != "")
  12185. {
  12186. maid.SetProp(array[0], array[1], 0, true, false);
  12187. }
  12188. maid.AllProcPropSeqStart();
  12189. }
  12190. }
  12191. isDance = true;
  12192. isDanceStart5 = true;
  12193. isCF1 = false;
  12194. }
  12195. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12196. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12197. {
  12198. GameMain.Instance.SoundMgr.StopBGM(0f);
  12199. isCF1 = true;
  12200. if (getModKeyPressing(modKey.Shift))
  12201. {
  12202. isShift = true;
  12203. }
  12204. }
  12205. if (isKT1)
  12206. {
  12207. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12208. string text4 = textAsset.text;
  12209. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12210. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12211. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12212. for (int j = 0; j < maidCnt; j++)
  12213. {
  12214. if (!isShift)
  12215. {
  12216. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12217. {
  12218. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12219. GameUty.FileSystem,
  12220. "dance_cm3d_004_kano_f1.anm",
  12221. false,
  12222. false);
  12223. }
  12224. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12225. }
  12226. else
  12227. {
  12228. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12229. {
  12230. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12231. GameUty.FileSystem,
  12232. "dance_cm3d2_kara_002_cktc_f1.anm",
  12233. false,
  12234. false);
  12235. }
  12236. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12237. text4 = textAsset.text;
  12238. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12239. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12240. && !isDanceStart9K && !isDanceStart13K)
  12241. {
  12242. dancePos[j] = maidArray[j].transform.position;
  12243. danceRot[j] = maidArray[j].transform.localRotation;
  12244. }
  12245. }
  12246. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12247. }
  12248. if (!isShift)
  12249. {
  12250. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12251. }
  12252. else
  12253. {
  12254. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12255. }
  12256. for (int j = 0; j < maidCnt; j++)
  12257. {
  12258. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12259. isStop[j] = false;
  12260. isLock[j] = false;
  12261. pHandL[j] = 0;
  12262. pHandR[j] = 0;
  12263. muneIKL[j] = false;
  12264. muneIKR[j] = false;
  12265. if (!isVR)
  12266. {
  12267. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12268. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12269. }
  12270. }
  12271. ikBui = 5;
  12272. isDanceStart1F = false;
  12273. isDanceStart2F = false;
  12274. isDanceStart3F = false;
  12275. isDanceStart4F = false;
  12276. isDanceStart5F = false;
  12277. isDanceStart6F = false;
  12278. isDanceStart7F = false;
  12279. isDanceStart8F = false;
  12280. isDanceStart9F = false;
  12281. isDanceStart10F = false;
  12282. isDanceStart11F = false;
  12283. isDanceStart12F = false;
  12284. isDanceStart13F = false;
  12285. isDanceStart14F = false;
  12286. isDanceStart15F = false;
  12287. for (int j = 0; j < maidCnt; j++)
  12288. {
  12289. danceFace[j] = 0f;
  12290. }
  12291. if (isDanceStart7V)
  12292. {
  12293. for (int j = 0; j < maidCnt; j++)
  12294. {
  12295. if (maidArray[j] && maidArray[j].Visible)
  12296. {
  12297. if (isDanceStart7V)
  12298. {
  12299. maidArray[j].SetPos(dancePos[j]);
  12300. maidArray[j].body0.transform.localRotation = danceRot[j];
  12301. }
  12302. }
  12303. }
  12304. isDanceStart7V = false;
  12305. }
  12306. if (isDanceStart8V)
  12307. {
  12308. for (int j = 0; j < maidCnt; j++)
  12309. {
  12310. if (maidArray[j] && maidArray[j].Visible)
  12311. {
  12312. if (isDanceStart8V)
  12313. {
  12314. maidArray[j].SetPos(dancePos[j]);
  12315. maidArray[j].body0.transform.localRotation = danceRot[j];
  12316. }
  12317. }
  12318. }
  12319. isDanceStart8V = false;
  12320. isDanceStart8P = false;
  12321. }
  12322. if (isDanceStart11V)
  12323. {
  12324. for (int j = 0; j < maidCnt; j++)
  12325. {
  12326. if (maidArray[j] && maidArray[j].Visible)
  12327. {
  12328. if (isDanceStart11V)
  12329. {
  12330. maidArray[j].SetPos(dancePos[j]);
  12331. maidArray[j].body0.transform.localRotation = danceRot[j];
  12332. }
  12333. }
  12334. }
  12335. isDanceStart11V = false;
  12336. }
  12337. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12338. || isDanceStart13K)
  12339. {
  12340. for (int j = 0; j < maidCnt; j++)
  12341. {
  12342. if (maidArray[j] && maidArray[j].Visible)
  12343. {
  12344. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12345. || isDanceStart13K)
  12346. {
  12347. maidArray[j].SetPos(dancePos[j]);
  12348. maidArray[j].body0.transform.localRotation = danceRot[j];
  12349. int i = j;
  12350. if (!isVR)
  12351. {
  12352. delCount[i] = 20;
  12353. if (goSlot[(int)selectList[i]] != null)
  12354. {
  12355. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12356. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12357. {
  12358. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12359. }
  12360. }
  12361. }
  12362. Maid maid = maidArray[j];
  12363. maid.DelProp(MPN.handitem, true);
  12364. maid.DelProp(MPN.accvag, true);
  12365. maid.DelProp(MPN.accanl, true);
  12366. maid.DelProp(MPN.kousoku_upper, true);
  12367. maid.DelProp(MPN.kousoku_lower, true);
  12368. maid.AllProcPropSeqStart();
  12369. }
  12370. }
  12371. }
  12372. isDanceStart1K = false;
  12373. isDanceStart3K = false;
  12374. isDanceStart4K = false;
  12375. isDanceStart5K = false;
  12376. isDanceStart6K = false;
  12377. isDanceStart9K = false;
  12378. isDanceStart13K = false;
  12379. }
  12380. if (isDanceStart14V)
  12381. {
  12382. for (int j = 0; j < maidCnt; j++)
  12383. {
  12384. if (maidArray[j] && maidArray[j].Visible)
  12385. {
  12386. if (isDanceStart14V)
  12387. {
  12388. maidArray[j].SetPos(dancePos[j]);
  12389. maidArray[j].body0.transform.localRotation = danceRot[j];
  12390. }
  12391. }
  12392. }
  12393. isDanceStart14V = false;
  12394. }
  12395. if (isDanceStart15V)
  12396. {
  12397. for (int j = 0; j < maidCnt; j++)
  12398. {
  12399. if (maidArray[j] && maidArray[j].Visible)
  12400. {
  12401. if (isDanceStart15V)
  12402. {
  12403. maidArray[j].SetPos(dancePos[j]);
  12404. maidArray[j].body0.transform.localRotation = danceRot[j];
  12405. }
  12406. }
  12407. }
  12408. isDanceStart15V = false;
  12409. }
  12410. if (maidArray[1] && maidArray[1].Visible)
  12411. {
  12412. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12413. {
  12414. Vector3 vector = Vector3.zero;
  12415. vector.x = 0.6f;
  12416. maidArray[1].SetPos(vector);
  12417. if (maidArray[2] && maidArray[2].Visible)
  12418. {
  12419. vector.x = -0.6f;
  12420. maidArray[2].SetPos(vector);
  12421. }
  12422. if (maidArray[3] && maidArray[3].Visible)
  12423. {
  12424. vector.x = 1.2f;
  12425. maidArray[3].SetPos(vector);
  12426. }
  12427. if (maidArray[4] && maidArray[4].Visible)
  12428. {
  12429. vector.x = -1.2f;
  12430. maidArray[4].SetPos(vector);
  12431. }
  12432. if (maidArray[5] && maidArray[5].Visible)
  12433. {
  12434. vector.x = 1.8f;
  12435. maidArray[5].SetPos(vector);
  12436. }
  12437. if (maidArray[6] && maidArray[6].Visible)
  12438. {
  12439. vector.x = -1.8f;
  12440. maidArray[6].SetPos(vector);
  12441. }
  12442. if (maidArray[7] && maidArray[7].Visible)
  12443. {
  12444. vector.x = 2.4f;
  12445. maidArray[7].SetPos(vector);
  12446. }
  12447. if (maidArray[8] && maidArray[8].Visible)
  12448. {
  12449. vector.x = -2.4f;
  12450. maidArray[8].SetPos(vector);
  12451. }
  12452. if (maidArray[9] && maidArray[9].Visible)
  12453. {
  12454. vector.x = 3f;
  12455. maidArray[9].SetPos(vector);
  12456. }
  12457. if (maidArray[10] && maidArray[10].Visible)
  12458. {
  12459. vector.x = -3f;
  12460. maidArray[10].SetPos(vector);
  12461. }
  12462. if (maidArray[11] && maidArray[11].Visible)
  12463. {
  12464. vector.x = 3.6f;
  12465. maidArray[11].SetPos(vector);
  12466. }
  12467. if (maidArray[12] && maidArray[12].Visible)
  12468. {
  12469. vector.x = -3.6f;
  12470. maidArray[12].SetPos(vector);
  12471. }
  12472. if (maidArray[13] && maidArray[13].Visible)
  12473. {
  12474. vector.x = 4.2f;
  12475. maidArray[13].SetPos(vector);
  12476. }
  12477. }
  12478. }
  12479. if (maidArray[2] && maidArray[2].Visible)
  12480. {
  12481. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12482. {
  12483. Vector3 vector = Vector3.zero;
  12484. vector.x = 0.6f;
  12485. maidArray[1].SetPos(vector);
  12486. if (maidArray[2] && maidArray[2].Visible)
  12487. {
  12488. vector.x = -0.6f;
  12489. maidArray[2].SetPos(vector);
  12490. }
  12491. if (maidArray[3] && maidArray[3].Visible)
  12492. {
  12493. vector.x = 1.2f;
  12494. maidArray[3].SetPos(vector);
  12495. }
  12496. if (maidArray[4] && maidArray[4].Visible)
  12497. {
  12498. vector.x = -1.2f;
  12499. maidArray[4].SetPos(vector);
  12500. }
  12501. if (maidArray[5] && maidArray[5].Visible)
  12502. {
  12503. vector.x = 1.8f;
  12504. maidArray[5].SetPos(vector);
  12505. }
  12506. if (maidArray[6] && maidArray[6].Visible)
  12507. {
  12508. vector.x = -1.8f;
  12509. maidArray[6].SetPos(vector);
  12510. }
  12511. if (maidArray[7] && maidArray[7].Visible)
  12512. {
  12513. vector.x = 2.4f;
  12514. maidArray[7].SetPos(vector);
  12515. }
  12516. if (maidArray[8] && maidArray[8].Visible)
  12517. {
  12518. vector.x = -2.4f;
  12519. maidArray[8].SetPos(vector);
  12520. }
  12521. if (maidArray[9] && maidArray[9].Visible)
  12522. {
  12523. vector.x = 3f;
  12524. maidArray[9].SetPos(vector);
  12525. }
  12526. if (maidArray[10] && maidArray[10].Visible)
  12527. {
  12528. vector.x = -3f;
  12529. maidArray[10].SetPos(vector);
  12530. }
  12531. if (maidArray[11] && maidArray[11].Visible)
  12532. {
  12533. vector.x = 3.6f;
  12534. maidArray[11].SetPos(vector);
  12535. }
  12536. if (maidArray[12] && maidArray[12].Visible)
  12537. {
  12538. vector.x = -3.6f;
  12539. maidArray[12].SetPos(vector);
  12540. }
  12541. if (maidArray[13] && maidArray[13].Visible)
  12542. {
  12543. vector.x = 4.2f;
  12544. maidArray[13].SetPos(vector);
  12545. }
  12546. }
  12547. }
  12548. if (isShift)
  12549. {
  12550. isDanceStart9K = true;
  12551. for (int j = 0; j < maidCnt; j++)
  12552. {
  12553. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12554. maidArray[j].body0.transform.localRotation.y + 90f,
  12555. maidArray[j].body0.transform.localRotation.z));
  12556. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12557. maidArray[j].body0.transform.position.y,
  12558. maidArray[j].body0.transform.position.z + 4f));
  12559. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12560. int i = j;
  12561. Maid maid = maidArray[j];
  12562. if (!isVR)
  12563. {
  12564. delCount[i] = 20;
  12565. if (goSlot[(int)selectList[i]] != null)
  12566. {
  12567. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12568. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12569. {
  12570. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12571. }
  12572. }
  12573. }
  12574. string[] array = new string[2];
  12575. array = text2.Split(new char[] { ',' });
  12576. maid.DelProp(MPN.handitem, true);
  12577. maid.DelProp(MPN.accvag, true);
  12578. maid.DelProp(MPN.accanl, true);
  12579. maid.DelProp(MPN.kousoku_upper, true);
  12580. maid.DelProp(MPN.kousoku_lower, true);
  12581. if (array[0] != "")
  12582. {
  12583. maid.SetProp(array[0], array[1], 0, true, false);
  12584. }
  12585. maid.AllProcPropSeqStart();
  12586. }
  12587. }
  12588. isDance = true;
  12589. isDanceStart9 = true;
  12590. isKT1 = false;
  12591. }
  12592. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12593. {
  12594. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12595. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12596. if (isSS1)
  12597. {
  12598. nameK = "dance_BlD_m";
  12599. nameA = "dance_cm3d21_002_bid_f";
  12600. nameS = "bloomingdreaming_short";
  12601. danceNo1 = 1;
  12602. danceNo2 = 3;
  12603. danceNo3 = 2;
  12604. }
  12605. if (isSS2)
  12606. {
  12607. nameK = "dance_KAD_m";
  12608. nameA = "dance_cm3d21_003_kad_f";
  12609. nameS = "kiminiaijodelicious_short";
  12610. danceNo1 = 1;
  12611. danceNo2 = 2;
  12612. danceNo3 = 3;
  12613. }
  12614. if (isSS3)
  12615. {
  12616. nameK = "dance_LUM_m";
  12617. nameA = "dance_cm3d21_004_lm_f";
  12618. nameS = "luminousmoment_short";
  12619. danceNo1 = 3;
  12620. danceNo2 = 1;
  12621. danceNo3 = 2;
  12622. }
  12623. if (isSS4)
  12624. {
  12625. nameK = "dance_NmF_m";
  12626. nameA = "dance_cm3d21_001_nmf_f";
  12627. nameS = "nightmagicfire_short";
  12628. danceNo1 = 2;
  12629. danceNo2 = 1;
  12630. danceNo3 = 3;
  12631. }
  12632. if (isSS5)
  12633. {
  12634. nameK = "dance_MoE_m";
  12635. nameA = "dance_cm3d21_005_moe_f";
  12636. nameS = "melodyofempire_short";
  12637. danceNo1 = 1;
  12638. danceNo2 = 3;
  12639. danceNo3 = 2;
  12640. }
  12641. if (isSS6)
  12642. {
  12643. nameK = "dance_NmF_m";
  12644. nameA = "dance_cm3d21_kara_001_nmf_f";
  12645. nameS = "nightmagicfire_short";
  12646. danceNo1 = 1;
  12647. danceNo2 = 1;
  12648. danceNo3 = 1;
  12649. }
  12650. for (int j = 0; j < maidCnt; j++)
  12651. {
  12652. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12653. string text5 = nameA + danceNo1 + ".anm";
  12654. switch (j)
  12655. {
  12656. case 1:
  12657. case 4:
  12658. case 7:
  12659. case 10:
  12660. case 13:
  12661. text5 = nameA + danceNo2 + ".anm";
  12662. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12663. break;
  12664. case 2:
  12665. case 5:
  12666. case 8:
  12667. case 11:
  12668. text5 = nameA + danceNo3 + ".anm";
  12669. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12670. break;
  12671. }
  12672. if (maidArray[j] && maidArray[j].Visible)
  12673. {
  12674. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12675. {
  12676. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12677. }
  12678. string text4 = textAsset.text;
  12679. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12680. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12681. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12682. }
  12683. }
  12684. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12685. ikBui = 5;
  12686. isDanceStart1F = false;
  12687. isDanceStart2F = false;
  12688. isDanceStart3F = false;
  12689. isDanceStart4F = false;
  12690. isDanceStart5F = false;
  12691. isDanceStart6F = false;
  12692. isDanceStart7F = false;
  12693. isDanceStart8F = false;
  12694. isDanceStart9F = false;
  12695. isDanceStart10F = false;
  12696. isDanceStart11F = false;
  12697. isDanceStart12F = false;
  12698. isDanceStart13F = false;
  12699. isDanceStart14F = false;
  12700. isDanceStart15F = false;
  12701. for (int j = 0; j < maidCnt; j++)
  12702. {
  12703. danceFace[j] = 0f;
  12704. }
  12705. if (isDanceStart7V)
  12706. {
  12707. for (int j = 0; j < maidCnt; j++)
  12708. {
  12709. if (maidArray[j] && maidArray[j].Visible)
  12710. {
  12711. if (isDanceStart7V)
  12712. {
  12713. maidArray[j].SetPos(dancePos[j]);
  12714. maidArray[j].body0.transform.localRotation = danceRot[j];
  12715. }
  12716. }
  12717. }
  12718. isDanceStart7V = false;
  12719. }
  12720. if (isDanceStart8V)
  12721. {
  12722. for (int j = 0; j < maidCnt; j++)
  12723. {
  12724. if (maidArray[j] && maidArray[j].Visible)
  12725. {
  12726. if (isDanceStart8V)
  12727. {
  12728. maidArray[j].SetPos(dancePos[j]);
  12729. maidArray[j].body0.transform.localRotation = danceRot[j];
  12730. }
  12731. }
  12732. }
  12733. isDanceStart8V = false;
  12734. isDanceStart8P = false;
  12735. }
  12736. if (isDanceStart11V)
  12737. {
  12738. for (int j = 0; j < maidCnt; j++)
  12739. {
  12740. if (maidArray[j] && maidArray[j].Visible)
  12741. {
  12742. if (isDanceStart11V)
  12743. {
  12744. maidArray[j].SetPos(dancePos[j]);
  12745. maidArray[j].body0.transform.localRotation = danceRot[j];
  12746. }
  12747. }
  12748. }
  12749. isDanceStart11V = false;
  12750. }
  12751. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12752. || isDanceStart13K)
  12753. {
  12754. for (int j = 0; j < maidCnt; j++)
  12755. {
  12756. if (maidArray[j] && maidArray[j].Visible)
  12757. {
  12758. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12759. || isDanceStart13K)
  12760. {
  12761. maidArray[j].SetPos(dancePos[j]);
  12762. maidArray[j].body0.transform.localRotation = danceRot[j];
  12763. int i = j;
  12764. if (!isVR)
  12765. {
  12766. delCount[i] = 20;
  12767. if (goSlot[(int)selectList[i]] != null)
  12768. {
  12769. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12770. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12771. {
  12772. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12773. }
  12774. }
  12775. }
  12776. Maid maid = maidArray[j];
  12777. maid.DelProp(MPN.handitem, true);
  12778. maid.DelProp(MPN.accvag, true);
  12779. maid.DelProp(MPN.accanl, true);
  12780. maid.DelProp(MPN.kousoku_upper, true);
  12781. maid.DelProp(MPN.kousoku_lower, true);
  12782. maid.AllProcPropSeqStart();
  12783. }
  12784. }
  12785. }
  12786. isDanceStart1K = false;
  12787. isDanceStart3K = false;
  12788. isDanceStart4K = false;
  12789. isDanceStart5K = false;
  12790. isDanceStart6K = false;
  12791. isDanceStart9K = false;
  12792. isDanceStart13K = false;
  12793. }
  12794. if (isDanceStart14V)
  12795. {
  12796. for (int j = 0; j < maidCnt; j++)
  12797. {
  12798. if (maidArray[j] && maidArray[j].Visible)
  12799. {
  12800. if (isDanceStart14V)
  12801. {
  12802. maidArray[j].SetPos(dancePos[j]);
  12803. maidArray[j].body0.transform.localRotation = danceRot[j];
  12804. }
  12805. }
  12806. }
  12807. isDanceStart14V = false;
  12808. }
  12809. if (isDanceStart15V)
  12810. {
  12811. for (int j = 0; j < maidCnt; j++)
  12812. {
  12813. if (maidArray[j] && maidArray[j].Visible)
  12814. {
  12815. if (isDanceStart15V)
  12816. {
  12817. maidArray[j].SetPos(dancePos[j]);
  12818. maidArray[j].body0.transform.localRotation = danceRot[j];
  12819. }
  12820. }
  12821. }
  12822. isDanceStart15V = false;
  12823. }
  12824. for (int j = 0; j < maidCnt; j++)
  12825. {
  12826. isStop[j] = false;
  12827. isLock[j] = false;
  12828. pHandL[j] = 0;
  12829. pHandR[j] = 0;
  12830. muneIKL[j] = false;
  12831. muneIKR[j] = false;
  12832. if (!isVR)
  12833. {
  12834. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12835. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12836. }
  12837. if (maidArray[j].transform.position.y != 100f)
  12838. {
  12839. dancePos[j] = maidArray[j].transform.position;
  12840. }
  12841. else
  12842. {
  12843. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12844. }
  12845. danceRot[j] = maidArray[j].transform.localRotation;
  12846. }
  12847. if (maidArray[1] && maidArray[1].Visible)
  12848. {
  12849. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12850. maidArray[0].transform.position.y,
  12851. maidArray[0].transform.position.z));
  12852. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12853. }
  12854. if (maidArray[2] && maidArray[2].Visible)
  12855. {
  12856. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12857. maidArray[0].transform.position.y,
  12858. maidArray[0].transform.position.z));
  12859. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12860. }
  12861. if (maidArray[4] && maidArray[4].Visible)
  12862. {
  12863. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12864. maidArray[3].transform.position.y,
  12865. maidArray[3].transform.position.z));
  12866. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12867. }
  12868. if (maidArray[5] && maidArray[5].Visible)
  12869. {
  12870. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12871. maidArray[3].transform.position.y,
  12872. maidArray[3].transform.position.z));
  12873. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12874. }
  12875. if (maidArray[7] && maidArray[7].Visible)
  12876. {
  12877. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12878. maidArray[6].transform.position.y,
  12879. maidArray[6].transform.position.z));
  12880. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12881. }
  12882. if (maidArray[8] && maidArray[8].Visible)
  12883. {
  12884. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12885. maidArray[6].transform.position.y,
  12886. maidArray[6].transform.position.z));
  12887. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12888. }
  12889. if (maidArray[10] && maidArray[10].Visible)
  12890. {
  12891. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12892. maidArray[9].transform.position.y,
  12893. maidArray[9].transform.position.z));
  12894. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12895. }
  12896. if (maidArray[11] && maidArray[11].Visible)
  12897. {
  12898. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12899. maidArray[9].transform.position.y,
  12900. maidArray[9].transform.position.z));
  12901. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12902. }
  12903. if (maidArray[13] && maidArray[13].Visible)
  12904. {
  12905. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12906. maidArray[12].transform.position.y,
  12907. maidArray[12].transform.position.z));
  12908. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12909. }
  12910. isSS = false;
  12911. isDance = true;
  12912. isDanceStart11 = true;
  12913. }
  12914. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12915. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12916. {
  12917. GameMain.Instance.SoundMgr.StopBGM(0f);
  12918. isSS1 = true;
  12919. isSS2 = false;
  12920. isSS3 = false;
  12921. isSS4 = false;
  12922. isSS5 = false;
  12923. isSS6 = false;
  12924. isSS = true;
  12925. }
  12926. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12927. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12928. {
  12929. GameMain.Instance.SoundMgr.StopBGM(0f);
  12930. isSS1 = false;
  12931. isSS2 = true;
  12932. isSS3 = false;
  12933. isSS4 = false;
  12934. isSS5 = false;
  12935. isSS6 = false;
  12936. isSS = true;
  12937. }
  12938. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12939. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12940. {
  12941. GameMain.Instance.SoundMgr.StopBGM(0f);
  12942. isSS1 = false;
  12943. isSS2 = false;
  12944. isSS3 = true;
  12945. isSS4 = false;
  12946. isSS5 = false;
  12947. isSS6 = false;
  12948. isSS = true;
  12949. }
  12950. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12951. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12952. {
  12953. GameMain.Instance.SoundMgr.StopBGM(0f);
  12954. isSS1 = false;
  12955. isSS2 = false;
  12956. isSS3 = false;
  12957. isSS4 = true;
  12958. isSS5 = false;
  12959. isSS6 = false;
  12960. isSS = true;
  12961. }
  12962. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12963. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12964. {
  12965. GameMain.Instance.SoundMgr.StopBGM(0f);
  12966. isSS1 = false;
  12967. isSS2 = false;
  12968. isSS3 = false;
  12969. isSS4 = false;
  12970. isSS5 = true;
  12971. isSS6 = false;
  12972. isSS = true;
  12973. }
  12974. if (isKHG1 || isKHG2)
  12975. {
  12976. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12977. string text4 = textAsset.text;
  12978. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12979. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12980. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12981. for (int j = 0; j < maidCnt; j++)
  12982. {
  12983. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12984. {
  12985. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12986. GameUty.FileSystem,
  12987. "dance_cm3d2_005_khg_f.anm",
  12988. false,
  12989. false);
  12990. }
  12991. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12992. }
  12993. if (isKHG1)
  12994. {
  12995. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12996. }
  12997. if (isKHG2)
  12998. {
  12999. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  13000. }
  13001. for (int j = 0; j < maidCnt; j++)
  13002. {
  13003. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13004. isStop[j] = false;
  13005. isLock[j] = false;
  13006. pHandL[j] = 0;
  13007. pHandR[j] = 0;
  13008. muneIKL[j] = false;
  13009. muneIKR[j] = false;
  13010. if (!isVR)
  13011. {
  13012. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13013. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13014. }
  13015. }
  13016. ikBui = 5;
  13017. isDanceStart1F = false;
  13018. isDanceStart2F = false;
  13019. isDanceStart3F = false;
  13020. isDanceStart4F = false;
  13021. isDanceStart5F = false;
  13022. isDanceStart6F = false;
  13023. isDanceStart7F = false;
  13024. isDanceStart8F = false;
  13025. isDanceStart9F = false;
  13026. isDanceStart10F = false;
  13027. isDanceStart11F = false;
  13028. isDanceStart12F = false;
  13029. isDanceStart13F = false;
  13030. isDanceStart14F = false;
  13031. isDanceStart15F = false;
  13032. for (int j = 0; j < maidCnt; j++)
  13033. {
  13034. danceFace[j] = 0f;
  13035. }
  13036. if (isDanceStart7V)
  13037. {
  13038. for (int j = 0; j < maidCnt; j++)
  13039. {
  13040. if (maidArray[j] && maidArray[j].Visible)
  13041. {
  13042. if (isDanceStart7V)
  13043. {
  13044. maidArray[j].SetPos(dancePos[j]);
  13045. maidArray[j].body0.transform.localRotation = danceRot[j];
  13046. }
  13047. }
  13048. }
  13049. isDanceStart7V = false;
  13050. }
  13051. if (isDanceStart8V)
  13052. {
  13053. for (int j = 0; j < maidCnt; j++)
  13054. {
  13055. if (maidArray[j] && maidArray[j].Visible)
  13056. {
  13057. if (isDanceStart8V)
  13058. {
  13059. maidArray[j].SetPos(dancePos[j]);
  13060. maidArray[j].body0.transform.localRotation = danceRot[j];
  13061. }
  13062. }
  13063. }
  13064. isDanceStart8V = false;
  13065. isDanceStart8P = false;
  13066. }
  13067. if (isDanceStart11V)
  13068. {
  13069. for (int j = 0; j < maidCnt; j++)
  13070. {
  13071. if (maidArray[j] && maidArray[j].Visible)
  13072. {
  13073. if (isDanceStart11V)
  13074. {
  13075. maidArray[j].SetPos(dancePos[j]);
  13076. maidArray[j].body0.transform.localRotation = danceRot[j];
  13077. }
  13078. }
  13079. }
  13080. isDanceStart11V = false;
  13081. }
  13082. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13083. || isDanceStart13K)
  13084. {
  13085. for (int j = 0; j < maidCnt; j++)
  13086. {
  13087. if (maidArray[j] && maidArray[j].Visible)
  13088. {
  13089. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13090. || isDanceStart13K)
  13091. {
  13092. maidArray[j].SetPos(dancePos[j]);
  13093. maidArray[j].body0.transform.localRotation = danceRot[j];
  13094. int i = j;
  13095. if (!isVR)
  13096. {
  13097. delCount[i] = 20;
  13098. if (goSlot[(int)selectList[i]] != null)
  13099. {
  13100. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13101. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13102. {
  13103. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13104. }
  13105. }
  13106. }
  13107. Maid maid = maidArray[j];
  13108. maid.DelProp(MPN.handitem, true);
  13109. maid.DelProp(MPN.accvag, true);
  13110. maid.DelProp(MPN.accanl, true);
  13111. maid.DelProp(MPN.kousoku_upper, true);
  13112. maid.DelProp(MPN.kousoku_lower, true);
  13113. maid.AllProcPropSeqStart();
  13114. }
  13115. }
  13116. }
  13117. isDanceStart1K = false;
  13118. isDanceStart3K = false;
  13119. isDanceStart4K = false;
  13120. isDanceStart5K = false;
  13121. isDanceStart6K = false;
  13122. isDanceStart9K = false;
  13123. isDanceStart13K = false;
  13124. }
  13125. if (isDanceStart14V)
  13126. {
  13127. for (int j = 0; j < maidCnt; j++)
  13128. {
  13129. if (maidArray[j] && maidArray[j].Visible)
  13130. {
  13131. if (isDanceStart14V)
  13132. {
  13133. maidArray[j].SetPos(dancePos[j]);
  13134. maidArray[j].body0.transform.localRotation = danceRot[j];
  13135. }
  13136. }
  13137. }
  13138. isDanceStart14V = false;
  13139. }
  13140. if (isDanceStart15V)
  13141. {
  13142. for (int j = 0; j < maidCnt; j++)
  13143. {
  13144. if (maidArray[j] && maidArray[j].Visible)
  13145. {
  13146. if (isDanceStart15V)
  13147. {
  13148. maidArray[j].SetPos(dancePos[j]);
  13149. maidArray[j].body0.transform.localRotation = danceRot[j];
  13150. }
  13151. }
  13152. }
  13153. isDanceStart15V = false;
  13154. }
  13155. if (maidArray[1] && maidArray[1].Visible)
  13156. {
  13157. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13158. {
  13159. Vector3 vector = Vector3.zero;
  13160. vector.x = 0.6f;
  13161. maidArray[1].SetPos(vector);
  13162. if (maidArray[2] && maidArray[2].Visible)
  13163. {
  13164. vector.x = -0.6f;
  13165. maidArray[2].SetPos(vector);
  13166. }
  13167. if (maidArray[3] && maidArray[3].Visible)
  13168. {
  13169. vector.x = 1.2f;
  13170. maidArray[3].SetPos(vector);
  13171. }
  13172. if (maidArray[4] && maidArray[4].Visible)
  13173. {
  13174. vector.x = -1.2f;
  13175. maidArray[4].SetPos(vector);
  13176. }
  13177. if (maidArray[5] && maidArray[5].Visible)
  13178. {
  13179. vector.x = 1.8f;
  13180. maidArray[5].SetPos(vector);
  13181. }
  13182. if (maidArray[6] && maidArray[6].Visible)
  13183. {
  13184. vector.x = -1.8f;
  13185. maidArray[6].SetPos(vector);
  13186. }
  13187. if (maidArray[7] && maidArray[7].Visible)
  13188. {
  13189. vector.x = 2.4f;
  13190. maidArray[7].SetPos(vector);
  13191. }
  13192. if (maidArray[8] && maidArray[8].Visible)
  13193. {
  13194. vector.x = -2.4f;
  13195. maidArray[8].SetPos(vector);
  13196. }
  13197. if (maidArray[9] && maidArray[9].Visible)
  13198. {
  13199. vector.x = 3f;
  13200. maidArray[9].SetPos(vector);
  13201. }
  13202. if (maidArray[10] && maidArray[10].Visible)
  13203. {
  13204. vector.x = -3f;
  13205. maidArray[10].SetPos(vector);
  13206. }
  13207. if (maidArray[11] && maidArray[11].Visible)
  13208. {
  13209. vector.x = 3.6f;
  13210. maidArray[11].SetPos(vector);
  13211. }
  13212. if (maidArray[12] && maidArray[12].Visible)
  13213. {
  13214. vector.x = -3.6f;
  13215. maidArray[12].SetPos(vector);
  13216. }
  13217. if (maidArray[13] && maidArray[13].Visible)
  13218. {
  13219. vector.x = 4.2f;
  13220. maidArray[13].SetPos(vector);
  13221. }
  13222. }
  13223. }
  13224. isDance = true;
  13225. isDanceStart12 = true;
  13226. isKHG1 = false;
  13227. isKHG2 = false;
  13228. }
  13229. if (isDanceStart13Count > 0)
  13230. {
  13231. isDanceStart13Count++;
  13232. }
  13233. if (isDanceStart13Count == 1)
  13234. {
  13235. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13236. isDanceStart13Count = 0;
  13237. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13238. string text4 = textAsset.text;
  13239. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13240. for (int j = 0; j < maidCnt; j++)
  13241. {
  13242. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13243. }
  13244. }
  13245. if ((isSN1 || isSN2 || isSN3) && isShift)
  13246. {
  13247. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13248. string text4 = textAsset.text;
  13249. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13250. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13251. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13252. for (int j = 0; j < maidCnt; j++)
  13253. {
  13254. if (!isShift)
  13255. {
  13256. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13257. {
  13258. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13259. GameUty.FileSystem,
  13260. "dance_cm3d2_006_ssn_f1.anm",
  13261. false,
  13262. false);
  13263. }
  13264. }
  13265. else
  13266. {
  13267. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13268. {
  13269. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13270. GameUty.FileSystem,
  13271. "dance_cm3d21_kara_001_nmf_f1.anm",
  13272. false,
  13273. false);
  13274. }
  13275. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13276. string text5 = nameA + danceNo1 + ".anm";
  13277. switch (j)
  13278. {
  13279. case 1:
  13280. case 4:
  13281. case 7:
  13282. case 10:
  13283. case 13:
  13284. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13285. break;
  13286. case 2:
  13287. case 5:
  13288. case 8:
  13289. case 11:
  13290. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13291. break;
  13292. }
  13293. text4 = textAsset.text;
  13294. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13295. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13296. && !isDanceStart9K && !isDanceStart13K)
  13297. {
  13298. dancePos[j] = maidArray[j].transform.position;
  13299. danceRot[j] = maidArray[j].transform.localRotation;
  13300. }
  13301. }
  13302. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13303. }
  13304. if (!isShift)
  13305. {
  13306. if (isSN1)
  13307. {
  13308. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13309. }
  13310. if (isSN2)
  13311. {
  13312. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13313. }
  13314. if (isSN3)
  13315. {
  13316. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13317. }
  13318. }
  13319. else
  13320. {
  13321. danceWait = 400;
  13322. isDanceStart13Count++;
  13323. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13324. }
  13325. for (int j = 0; j < maidCnt; j++)
  13326. {
  13327. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13328. isStop[j] = false;
  13329. isLock[j] = false;
  13330. pHandL[j] = 0;
  13331. pHandR[j] = 0;
  13332. muneIKL[j] = false;
  13333. muneIKR[j] = false;
  13334. if (!isVR)
  13335. {
  13336. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13337. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13338. }
  13339. }
  13340. ikBui = 5;
  13341. isDanceStart1F = false;
  13342. isDanceStart2F = false;
  13343. isDanceStart3F = false;
  13344. isDanceStart4F = false;
  13345. isDanceStart5F = false;
  13346. isDanceStart6F = false;
  13347. isDanceStart7F = false;
  13348. isDanceStart8F = false;
  13349. isDanceStart9F = false;
  13350. isDanceStart10F = false;
  13351. isDanceStart11F = false;
  13352. isDanceStart12F = false;
  13353. isDanceStart13F = false;
  13354. isDanceStart14F = false;
  13355. isDanceStart15F = false;
  13356. for (int j = 0; j < maidCnt; j++)
  13357. {
  13358. danceFace[j] = 0f;
  13359. }
  13360. if (isDanceStart7V)
  13361. {
  13362. for (int j = 0; j < maidCnt; j++)
  13363. {
  13364. if (maidArray[j] && maidArray[j].Visible)
  13365. {
  13366. if (isDanceStart7V)
  13367. {
  13368. maidArray[j].SetPos(dancePos[j]);
  13369. maidArray[j].body0.transform.localRotation = danceRot[j];
  13370. }
  13371. }
  13372. }
  13373. isDanceStart7V = false;
  13374. }
  13375. if (isDanceStart8V)
  13376. {
  13377. for (int j = 0; j < maidCnt; j++)
  13378. {
  13379. if (maidArray[j] && maidArray[j].Visible)
  13380. {
  13381. if (isDanceStart8V)
  13382. {
  13383. maidArray[j].SetPos(dancePos[j]);
  13384. maidArray[j].body0.transform.localRotation = danceRot[j];
  13385. }
  13386. }
  13387. }
  13388. isDanceStart8V = false;
  13389. isDanceStart8P = false;
  13390. }
  13391. if (isDanceStart11V)
  13392. {
  13393. for (int j = 0; j < maidCnt; j++)
  13394. {
  13395. if (maidArray[j] && maidArray[j].Visible)
  13396. {
  13397. if (isDanceStart11V)
  13398. {
  13399. maidArray[j].SetPos(dancePos[j]);
  13400. maidArray[j].body0.transform.localRotation = danceRot[j];
  13401. }
  13402. }
  13403. }
  13404. isDanceStart11V = false;
  13405. }
  13406. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13407. || isDanceStart13K)
  13408. {
  13409. for (int j = 0; j < maidCnt; j++)
  13410. {
  13411. if (maidArray[j] && maidArray[j].Visible)
  13412. {
  13413. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13414. || isDanceStart13K)
  13415. {
  13416. maidArray[j].SetPos(dancePos[j]);
  13417. maidArray[j].body0.transform.localRotation = danceRot[j];
  13418. int i = j;
  13419. if (!isVR)
  13420. {
  13421. delCount[i] = 20;
  13422. if (goSlot[(int)selectList[i]] != null)
  13423. {
  13424. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13425. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13426. {
  13427. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13428. }
  13429. }
  13430. }
  13431. Maid maid = maidArray[j];
  13432. maid.DelProp(MPN.handitem, true);
  13433. maid.DelProp(MPN.accvag, true);
  13434. maid.DelProp(MPN.accanl, true);
  13435. maid.DelProp(MPN.kousoku_upper, true);
  13436. maid.DelProp(MPN.kousoku_lower, true);
  13437. maid.AllProcPropSeqStart();
  13438. }
  13439. }
  13440. }
  13441. isDanceStart1K = false;
  13442. isDanceStart3K = false;
  13443. isDanceStart4K = false;
  13444. isDanceStart5K = false;
  13445. isDanceStart6K = false;
  13446. isDanceStart9K = false;
  13447. isDanceStart13K = false;
  13448. }
  13449. if (isDanceStart14V)
  13450. {
  13451. for (int j = 0; j < maidCnt; j++)
  13452. {
  13453. if (maidArray[j] && maidArray[j].Visible)
  13454. {
  13455. if (isDanceStart14V)
  13456. {
  13457. maidArray[j].SetPos(dancePos[j]);
  13458. maidArray[j].body0.transform.localRotation = danceRot[j];
  13459. }
  13460. }
  13461. }
  13462. isDanceStart14V = false;
  13463. }
  13464. if (isDanceStart15V)
  13465. {
  13466. for (int j = 0; j < maidCnt; j++)
  13467. {
  13468. if (maidArray[j] && maidArray[j].Visible)
  13469. {
  13470. if (isDanceStart15V)
  13471. {
  13472. maidArray[j].SetPos(dancePos[j]);
  13473. maidArray[j].body0.transform.localRotation = danceRot[j];
  13474. }
  13475. }
  13476. }
  13477. isDanceStart15V = false;
  13478. }
  13479. if (maidArray[1] && maidArray[1].Visible)
  13480. {
  13481. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13482. {
  13483. Vector3 vector = Vector3.zero;
  13484. vector.x = 0.6f;
  13485. maidArray[1].SetPos(vector);
  13486. if (maidArray[2] && maidArray[2].Visible)
  13487. {
  13488. vector.x = -0.6f;
  13489. maidArray[2].SetPos(vector);
  13490. }
  13491. if (maidArray[3] && maidArray[3].Visible)
  13492. {
  13493. vector.x = 1.2f;
  13494. maidArray[3].SetPos(vector);
  13495. }
  13496. if (maidArray[4] && maidArray[4].Visible)
  13497. {
  13498. vector.x = -1.2f;
  13499. maidArray[4].SetPos(vector);
  13500. }
  13501. if (maidArray[5] && maidArray[5].Visible)
  13502. {
  13503. vector.x = 1.8f;
  13504. maidArray[5].SetPos(vector);
  13505. }
  13506. if (maidArray[6] && maidArray[6].Visible)
  13507. {
  13508. vector.x = -1.8f;
  13509. maidArray[6].SetPos(vector);
  13510. }
  13511. if (maidArray[7] && maidArray[7].Visible)
  13512. {
  13513. vector.x = 2.4f;
  13514. maidArray[7].SetPos(vector);
  13515. }
  13516. if (maidArray[8] && maidArray[8].Visible)
  13517. {
  13518. vector.x = -2.4f;
  13519. maidArray[8].SetPos(vector);
  13520. }
  13521. if (maidArray[9] && maidArray[9].Visible)
  13522. {
  13523. vector.x = 3f;
  13524. maidArray[9].SetPos(vector);
  13525. }
  13526. if (maidArray[10] && maidArray[10].Visible)
  13527. {
  13528. vector.x = -3f;
  13529. maidArray[10].SetPos(vector);
  13530. }
  13531. if (maidArray[11] && maidArray[11].Visible)
  13532. {
  13533. vector.x = 3.6f;
  13534. maidArray[11].SetPos(vector);
  13535. }
  13536. if (maidArray[12] && maidArray[12].Visible)
  13537. {
  13538. vector.x = -3.6f;
  13539. maidArray[12].SetPos(vector);
  13540. }
  13541. if (maidArray[13] && maidArray[13].Visible)
  13542. {
  13543. vector.x = 4.2f;
  13544. maidArray[13].SetPos(vector);
  13545. }
  13546. }
  13547. }
  13548. if (isShift)
  13549. {
  13550. isDanceStart13K = true;
  13551. for (int j = 0; j < maidCnt; j++)
  13552. {
  13553. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13554. maidArray[j].body0.transform.localRotation.y + 90f,
  13555. maidArray[j].body0.transform.localRotation.z));
  13556. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13557. maidArray[j].body0.transform.position.y,
  13558. maidArray[j].body0.transform.position.z + 4f));
  13559. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13560. int i = j;
  13561. Maid maid = maidArray[j];
  13562. if (!isVR)
  13563. {
  13564. delCount[i] = 20;
  13565. if (goSlot[(int)selectList[i]] != null)
  13566. {
  13567. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13568. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13569. {
  13570. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13571. }
  13572. }
  13573. }
  13574. string[] array = new string[2];
  13575. array = text2.Split(new char[] { ',' });
  13576. maid.DelProp(MPN.handitem, true);
  13577. maid.DelProp(MPN.accvag, true);
  13578. maid.DelProp(MPN.accanl, true);
  13579. maid.DelProp(MPN.kousoku_upper, true);
  13580. maid.DelProp(MPN.kousoku_lower, true);
  13581. if (array[0] != "")
  13582. {
  13583. maid.SetProp(array[0], array[1], 0, true, false);
  13584. }
  13585. maid.AllProcPropSeqStart();
  13586. }
  13587. }
  13588. isDance = true;
  13589. isDanceStart13 = true;
  13590. isSN1 = false;
  13591. isSN2 = false;
  13592. isSN3 = false;
  13593. }
  13594. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13595. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13596. {
  13597. GameMain.Instance.SoundMgr.StopBGM(0f);
  13598. isSN1 = true;
  13599. hFlg = true;
  13600. if (getModKeyPressing(modKey.Shift))
  13601. {
  13602. isShift = true;
  13603. }
  13604. }
  13605. if (isSN4 || isSN5 || isSN6)
  13606. {
  13607. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13608. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13609. for (int j = 0; j < maidCnt; j++)
  13610. {
  13611. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13612. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13613. switch (j)
  13614. {
  13615. case 1:
  13616. case 4:
  13617. case 7:
  13618. case 10:
  13619. case 13:
  13620. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13621. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13622. break;
  13623. case 2:
  13624. case 5:
  13625. case 8:
  13626. case 11:
  13627. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13628. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13629. break;
  13630. }
  13631. if (maidArray[j] && maidArray[j].Visible)
  13632. {
  13633. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13634. {
  13635. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13636. }
  13637. string text4 = textAsset.text;
  13638. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13639. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13640. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13641. }
  13642. }
  13643. if (isSN4)
  13644. {
  13645. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13646. }
  13647. if (isSN5)
  13648. {
  13649. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13650. }
  13651. if (isSN6)
  13652. {
  13653. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13654. }
  13655. ikBui = 5;
  13656. isDanceStart1F = false;
  13657. isDanceStart2F = false;
  13658. isDanceStart3F = false;
  13659. isDanceStart4F = false;
  13660. isDanceStart5F = false;
  13661. isDanceStart6F = false;
  13662. isDanceStart7F = false;
  13663. isDanceStart8F = false;
  13664. isDanceStart9F = false;
  13665. isDanceStart10F = false;
  13666. isDanceStart11F = false;
  13667. isDanceStart12F = false;
  13668. isDanceStart13F = false;
  13669. isDanceStart14F = false;
  13670. isDanceStart15F = false;
  13671. for (int j = 0; j < maidCnt; j++)
  13672. {
  13673. danceFace[j] = 0f;
  13674. }
  13675. if (isDanceStart7V)
  13676. {
  13677. for (int j = 0; j < maidCnt; j++)
  13678. {
  13679. if (maidArray[j] && maidArray[j].Visible)
  13680. {
  13681. if (isDanceStart7V)
  13682. {
  13683. maidArray[j].SetPos(dancePos[j]);
  13684. maidArray[j].body0.transform.localRotation = danceRot[j];
  13685. }
  13686. }
  13687. }
  13688. isDanceStart7V = false;
  13689. }
  13690. if (isDanceStart8V)
  13691. {
  13692. for (int j = 0; j < maidCnt; j++)
  13693. {
  13694. if (maidArray[j] && maidArray[j].Visible)
  13695. {
  13696. if (isDanceStart8V)
  13697. {
  13698. maidArray[j].SetPos(dancePos[j]);
  13699. maidArray[j].body0.transform.localRotation = danceRot[j];
  13700. }
  13701. }
  13702. }
  13703. isDanceStart8V = false;
  13704. isDanceStart8P = false;
  13705. }
  13706. if (isDanceStart11V)
  13707. {
  13708. for (int j = 0; j < maidCnt; j++)
  13709. {
  13710. if (maidArray[j] && maidArray[j].Visible)
  13711. {
  13712. if (isDanceStart11V)
  13713. {
  13714. maidArray[j].SetPos(dancePos[j]);
  13715. maidArray[j].body0.transform.localRotation = danceRot[j];
  13716. }
  13717. }
  13718. }
  13719. isDanceStart11V = false;
  13720. }
  13721. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13722. || isDanceStart13K)
  13723. {
  13724. for (int j = 0; j < maidCnt; j++)
  13725. {
  13726. if (maidArray[j] && maidArray[j].Visible)
  13727. {
  13728. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13729. || isDanceStart13K)
  13730. {
  13731. maidArray[j].SetPos(dancePos[j]);
  13732. maidArray[j].body0.transform.localRotation = danceRot[j];
  13733. int i = j;
  13734. if (!isVR)
  13735. {
  13736. delCount[i] = 20;
  13737. if (goSlot[(int)selectList[i]] != null)
  13738. {
  13739. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13740. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13741. {
  13742. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13743. }
  13744. }
  13745. }
  13746. Maid maid = maidArray[j];
  13747. maid.DelProp(MPN.handitem, true);
  13748. maid.DelProp(MPN.accvag, true);
  13749. maid.DelProp(MPN.accanl, true);
  13750. maid.DelProp(MPN.kousoku_upper, true);
  13751. maid.DelProp(MPN.kousoku_lower, true);
  13752. maid.AllProcPropSeqStart();
  13753. }
  13754. }
  13755. }
  13756. isDanceStart1K = false;
  13757. isDanceStart3K = false;
  13758. isDanceStart4K = false;
  13759. isDanceStart5K = false;
  13760. isDanceStart6K = false;
  13761. isDanceStart9K = false;
  13762. isDanceStart13K = false;
  13763. }
  13764. if (isDanceStart14V)
  13765. {
  13766. for (int j = 0; j < maidCnt; j++)
  13767. {
  13768. if (maidArray[j] && maidArray[j].Visible)
  13769. {
  13770. if (isDanceStart14V)
  13771. {
  13772. maidArray[j].SetPos(dancePos[j]);
  13773. maidArray[j].body0.transform.localRotation = danceRot[j];
  13774. }
  13775. }
  13776. }
  13777. isDanceStart14V = false;
  13778. }
  13779. if (isDanceStart15V)
  13780. {
  13781. for (int j = 0; j < maidCnt; j++)
  13782. {
  13783. if (maidArray[j] && maidArray[j].Visible)
  13784. {
  13785. if (isDanceStart15V)
  13786. {
  13787. maidArray[j].SetPos(dancePos[j]);
  13788. maidArray[j].body0.transform.localRotation = danceRot[j];
  13789. }
  13790. }
  13791. }
  13792. isDanceStart15V = false;
  13793. }
  13794. for (int j = 0; j < maidCnt; j++)
  13795. {
  13796. isStop[j] = false;
  13797. isLock[j] = false;
  13798. pHandL[j] = 0;
  13799. pHandR[j] = 0;
  13800. muneIKL[j] = false;
  13801. muneIKR[j] = false;
  13802. if (!isVR)
  13803. {
  13804. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13805. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13806. }
  13807. if (maidArray[j].transform.position.y != 100f)
  13808. {
  13809. dancePos[j] = maidArray[j].transform.position;
  13810. }
  13811. else
  13812. {
  13813. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13814. }
  13815. danceRot[j] = maidArray[j].transform.localRotation;
  13816. }
  13817. if (maidArray[1] && maidArray[1].Visible)
  13818. {
  13819. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13820. maidArray[0].transform.position.y,
  13821. maidArray[0].transform.position.z));
  13822. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13823. }
  13824. if (maidArray[2] && maidArray[2].Visible)
  13825. {
  13826. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13827. maidArray[0].transform.position.y,
  13828. maidArray[0].transform.position.z));
  13829. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13830. }
  13831. if (maidArray[4] && maidArray[4].Visible)
  13832. {
  13833. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13834. maidArray[3].transform.position.y,
  13835. maidArray[3].transform.position.z));
  13836. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13837. }
  13838. if (maidArray[5] && maidArray[5].Visible)
  13839. {
  13840. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13841. maidArray[3].transform.position.y,
  13842. maidArray[3].transform.position.z));
  13843. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13844. }
  13845. if (maidArray[7] && maidArray[7].Visible)
  13846. {
  13847. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13848. maidArray[6].transform.position.y,
  13849. maidArray[6].transform.position.z));
  13850. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13851. }
  13852. if (maidArray[8] && maidArray[8].Visible)
  13853. {
  13854. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13855. maidArray[6].transform.position.y,
  13856. maidArray[6].transform.position.z));
  13857. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13858. }
  13859. if (maidArray[10] && maidArray[10].Visible)
  13860. {
  13861. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13862. maidArray[9].transform.position.y,
  13863. maidArray[9].transform.position.z));
  13864. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13865. }
  13866. if (maidArray[11] && maidArray[11].Visible)
  13867. {
  13868. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13869. maidArray[9].transform.position.y,
  13870. maidArray[9].transform.position.z));
  13871. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13872. }
  13873. if (maidArray[13] && maidArray[13].Visible)
  13874. {
  13875. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13876. maidArray[12].transform.position.y,
  13877. maidArray[12].transform.position.z));
  13878. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13879. }
  13880. isDance = true;
  13881. isDanceStart14 = true;
  13882. isSN4 = false;
  13883. isSN5 = false;
  13884. isSN6 = false;
  13885. }
  13886. if (isSD1)
  13887. {
  13888. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13889. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13890. for (int j = 0; j < maidCnt; j++)
  13891. {
  13892. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13893. string text5 = "dance_cmo_002_sd_f1.anm";
  13894. switch (j)
  13895. {
  13896. case 1:
  13897. case 3:
  13898. case 5:
  13899. case 7:
  13900. case 9:
  13901. case 11:
  13902. case 13:
  13903. text5 = "dance_cmo_002_sd_f2.anm";
  13904. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13905. break;
  13906. }
  13907. danceName[j] = text5;
  13908. if (maidArray[j] && maidArray[j].Visible)
  13909. {
  13910. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13911. {
  13912. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13913. }
  13914. string text4 = textAsset.text;
  13915. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13916. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13917. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13918. }
  13919. }
  13920. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13921. ikBui = 5;
  13922. isDanceStart1F = false;
  13923. isDanceStart2F = false;
  13924. isDanceStart3F = false;
  13925. isDanceStart4F = false;
  13926. isDanceStart5F = false;
  13927. isDanceStart6F = false;
  13928. isDanceStart7F = false;
  13929. isDanceStart8F = false;
  13930. isDanceStart9F = false;
  13931. isDanceStart10F = false;
  13932. isDanceStart11F = false;
  13933. isDanceStart12F = false;
  13934. isDanceStart13F = false;
  13935. isDanceStart14F = false;
  13936. isDanceStart15F = false;
  13937. for (int j = 0; j < maidCnt; j++)
  13938. {
  13939. danceFace[j] = 0f;
  13940. }
  13941. if (isDanceStart7V)
  13942. {
  13943. for (int j = 0; j < maidCnt; j++)
  13944. {
  13945. if (maidArray[j] && maidArray[j].Visible)
  13946. {
  13947. if (isDanceStart7V)
  13948. {
  13949. maidArray[j].SetPos(dancePos[j]);
  13950. maidArray[j].body0.transform.localRotation = danceRot[j];
  13951. }
  13952. }
  13953. }
  13954. isDanceStart7V = false;
  13955. }
  13956. if (isDanceStart8V)
  13957. {
  13958. for (int j = 0; j < maidCnt; j++)
  13959. {
  13960. if (maidArray[j] && maidArray[j].Visible)
  13961. {
  13962. if (isDanceStart8V)
  13963. {
  13964. maidArray[j].SetPos(dancePos[j]);
  13965. maidArray[j].body0.transform.localRotation = danceRot[j];
  13966. }
  13967. }
  13968. }
  13969. isDanceStart8V = false;
  13970. isDanceStart8P = false;
  13971. }
  13972. if (isDanceStart11V)
  13973. {
  13974. for (int j = 0; j < maidCnt; j++)
  13975. {
  13976. if (maidArray[j] && maidArray[j].Visible)
  13977. {
  13978. if (isDanceStart11V)
  13979. {
  13980. maidArray[j].SetPos(dancePos[j]);
  13981. maidArray[j].body0.transform.localRotation = danceRot[j];
  13982. }
  13983. }
  13984. }
  13985. isDanceStart11V = false;
  13986. }
  13987. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13988. || isDanceStart13K)
  13989. {
  13990. for (int j = 0; j < maidCnt; j++)
  13991. {
  13992. if (maidArray[j] && maidArray[j].Visible)
  13993. {
  13994. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13995. || isDanceStart13K)
  13996. {
  13997. maidArray[j].SetPos(dancePos[j]);
  13998. maidArray[j].body0.transform.localRotation = danceRot[j];
  13999. int i = j;
  14000. if (!isVR)
  14001. {
  14002. delCount[i] = 20;
  14003. if (goSlot[(int)selectList[i]] != null)
  14004. {
  14005. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  14006. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  14007. {
  14008. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  14009. }
  14010. }
  14011. }
  14012. Maid maid = maidArray[j];
  14013. maid.DelProp(MPN.handitem, true);
  14014. maid.DelProp(MPN.accvag, true);
  14015. maid.DelProp(MPN.accanl, true);
  14016. maid.DelProp(MPN.kousoku_upper, true);
  14017. maid.DelProp(MPN.kousoku_lower, true);
  14018. maid.AllProcPropSeqStart();
  14019. }
  14020. }
  14021. }
  14022. isDanceStart1K = false;
  14023. isDanceStart3K = false;
  14024. isDanceStart4K = false;
  14025. isDanceStart5K = false;
  14026. isDanceStart6K = false;
  14027. isDanceStart9K = false;
  14028. isDanceStart13K = false;
  14029. }
  14030. if (isDanceStart14V)
  14031. {
  14032. for (int j = 0; j < maidCnt; j++)
  14033. {
  14034. if (maidArray[j] && maidArray[j].Visible)
  14035. {
  14036. if (isDanceStart14V)
  14037. {
  14038. maidArray[j].SetPos(dancePos[j]);
  14039. maidArray[j].body0.transform.localRotation = danceRot[j];
  14040. }
  14041. }
  14042. }
  14043. isDanceStart14V = false;
  14044. }
  14045. if (isDanceStart15V)
  14046. {
  14047. for (int j = 0; j < maidCnt; j++)
  14048. {
  14049. if (maidArray[j] && maidArray[j].Visible)
  14050. {
  14051. if (isDanceStart15V)
  14052. {
  14053. maidArray[j].SetPos(dancePos[j]);
  14054. maidArray[j].body0.transform.localRotation = danceRot[j];
  14055. }
  14056. }
  14057. }
  14058. isDanceStart15V = false;
  14059. }
  14060. for (int j = 0; j < maidCnt; j++)
  14061. {
  14062. isStop[j] = false;
  14063. isLock[j] = false;
  14064. pHandL[j] = 0;
  14065. pHandR[j] = 0;
  14066. muneIKL[j] = false;
  14067. muneIKR[j] = false;
  14068. if (!isVR)
  14069. {
  14070. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14071. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14072. }
  14073. if (maidArray[j].transform.position.y != 100f)
  14074. {
  14075. dancePos[j] = maidArray[j].transform.position;
  14076. }
  14077. else
  14078. {
  14079. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14080. }
  14081. danceRot[j] = maidArray[j].transform.localRotation;
  14082. }
  14083. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14084. {
  14085. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14086. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14087. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14088. maidArray[0].body0.transform.localRotation =
  14089. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14090. }
  14091. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14092. {
  14093. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14094. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14095. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14096. maidArray[2].body0.transform.localRotation =
  14097. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14098. }
  14099. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14100. {
  14101. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14102. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14103. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14104. maidArray[4].body0.transform.localRotation =
  14105. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14106. }
  14107. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14108. {
  14109. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14110. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14111. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14112. maidArray[6].body0.transform.localRotation =
  14113. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14114. }
  14115. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14116. {
  14117. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14118. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14119. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14120. maidArray[8].body0.transform.localRotation =
  14121. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14122. }
  14123. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14124. {
  14125. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14126. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14127. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14128. maidArray[10].body0.transform.localRotation =
  14129. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14130. }
  14131. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14132. {
  14133. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14134. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14135. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14136. maidArray[12].body0.transform.localRotation =
  14137. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14138. }
  14139. if (maidArray[1] && maidArray[1].Visible)
  14140. {
  14141. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14142. maidArray[0].transform.position.y,
  14143. maidArray[0].transform.position.z));
  14144. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14145. }
  14146. if (maidArray[3] && maidArray[3].Visible)
  14147. {
  14148. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14149. maidArray[2].transform.position.y,
  14150. maidArray[2].transform.position.z));
  14151. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14152. }
  14153. if (maidArray[5] && maidArray[5].Visible)
  14154. {
  14155. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14156. maidArray[4].transform.position.y,
  14157. maidArray[4].transform.position.z));
  14158. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14159. }
  14160. if (maidArray[7] && maidArray[7].Visible)
  14161. {
  14162. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14163. maidArray[6].transform.position.y,
  14164. maidArray[6].transform.position.z));
  14165. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14166. }
  14167. if (maidArray[9] && maidArray[9].Visible)
  14168. {
  14169. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14170. maidArray[8].transform.position.y,
  14171. maidArray[8].transform.position.z));
  14172. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14173. }
  14174. if (maidArray[11] && maidArray[11].Visible)
  14175. {
  14176. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14177. maidArray[10].transform.position.y,
  14178. maidArray[10].transform.position.z));
  14179. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14180. }
  14181. if (maidArray[13] && maidArray[13].Visible)
  14182. {
  14183. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14184. maidArray[12].transform.position.y,
  14185. maidArray[12].transform.position.z));
  14186. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14187. }
  14188. if (maidArray[2] && maidArray[2].Visible)
  14189. {
  14190. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14191. {
  14192. Vector3 vector = Vector3.zero;
  14193. vector.x = 0.6f;
  14194. maidArray[1].SetPos(vector);
  14195. if (maidArray[2] && maidArray[2].Visible)
  14196. {
  14197. vector.x = -0.6f;
  14198. maidArray[2].SetPos(vector);
  14199. }
  14200. if (maidArray[3] && maidArray[3].Visible)
  14201. {
  14202. vector.x = 1.2f;
  14203. maidArray[3].SetPos(vector);
  14204. }
  14205. if (maidArray[4] && maidArray[4].Visible)
  14206. {
  14207. vector.x = -1.2f;
  14208. maidArray[4].SetPos(vector);
  14209. }
  14210. if (maidArray[5] && maidArray[5].Visible)
  14211. {
  14212. vector.x = 1.8f;
  14213. maidArray[5].SetPos(vector);
  14214. }
  14215. if (maidArray[6] && maidArray[6].Visible)
  14216. {
  14217. vector.x = -1.8f;
  14218. maidArray[6].SetPos(vector);
  14219. }
  14220. if (maidArray[7] && maidArray[7].Visible)
  14221. {
  14222. vector.x = 2.4f;
  14223. maidArray[7].SetPos(vector);
  14224. }
  14225. if (maidArray[8] && maidArray[8].Visible)
  14226. {
  14227. vector.x = -2.4f;
  14228. maidArray[8].SetPos(vector);
  14229. }
  14230. if (maidArray[9] && maidArray[9].Visible)
  14231. {
  14232. vector.x = 3f;
  14233. maidArray[9].SetPos(vector);
  14234. }
  14235. if (maidArray[10] && maidArray[10].Visible)
  14236. {
  14237. vector.x = -3f;
  14238. maidArray[10].SetPos(vector);
  14239. }
  14240. if (maidArray[11] && maidArray[11].Visible)
  14241. {
  14242. vector.x = 3.6f;
  14243. maidArray[11].SetPos(vector);
  14244. }
  14245. if (maidArray[12] && maidArray[12].Visible)
  14246. {
  14247. vector.x = -3.6f;
  14248. maidArray[12].SetPos(vector);
  14249. }
  14250. if (maidArray[13] && maidArray[13].Visible)
  14251. {
  14252. vector.x = 4.2f;
  14253. maidArray[13].SetPos(vector);
  14254. }
  14255. }
  14256. }
  14257. isDance = true;
  14258. isDanceStart15 = true;
  14259. isSD1 = false;
  14260. }
  14261. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14262. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14263. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14264. || Input.GetKeyDown(KeyCode.Keypad0))
  14265. {
  14266. for (int j = 0; j < maidCnt; j++)
  14267. {
  14268. if (maidArray[j] && maidArray[j].Visible)
  14269. {
  14270. if (!isVR)
  14271. {
  14272. if (goSlot[(int)selectList[j]] != null)
  14273. {
  14274. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14275. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14276. {
  14277. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14278. }
  14279. }
  14280. }
  14281. }
  14282. }
  14283. }
  14284. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14285. {
  14286. if (h2Flg)
  14287. {
  14288. h2Flg = false;
  14289. }
  14290. else
  14291. {
  14292. string text4 = "";
  14293. if (wearIndex == 0)
  14294. {
  14295. text4 = "Underwear";
  14296. wearIndex = 1;
  14297. isWear = false;
  14298. isSkirt = false;
  14299. isBra = true;
  14300. isPanz = true;
  14301. isHeadset = false;
  14302. isGlove = false;
  14303. isStkg = true;
  14304. isShoes = false;
  14305. }
  14306. else if (wearIndex == 1)
  14307. {
  14308. text4 = "Nude";
  14309. wearIndex = 2;
  14310. isWear = false;
  14311. isSkirt = false;
  14312. isBra = false;
  14313. isPanz = false;
  14314. isHeadset = false;
  14315. isGlove = false;
  14316. isStkg = false;
  14317. isShoes = false;
  14318. }
  14319. else if (wearIndex == 2)
  14320. {
  14321. text4 = "None";
  14322. wearIndex = 0;
  14323. isWear = true;
  14324. isSkirt = true;
  14325. isBra = true;
  14326. isPanz = true;
  14327. isHeadset = true;
  14328. isGlove = true;
  14329. isStkg = true;
  14330. isShoes = true;
  14331. }
  14332. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14333. for (int j = 0; j < maidCnt; j++)
  14334. {
  14335. if (maidArray[j] && maidArray[j].Visible)
  14336. {
  14337. if (!isVR)
  14338. {
  14339. if (goSlot[(int)selectList[j]] != null)
  14340. {
  14341. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14342. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14343. {
  14344. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14345. }
  14346. }
  14347. }
  14348. maidArray[j].body0.SetMaskMode(maskMode);
  14349. }
  14350. }
  14351. }
  14352. }
  14353. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14354. {
  14355. saveScene = 9999;
  14356. saveScene2 = saveScene;
  14357. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14358. try
  14359. {
  14360. thum_byte_to_base64_ = string.Empty;
  14361. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14362. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14363. }
  14364. catch { }
  14365. }
  14366. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14367. {
  14368. loadScene = 9999;
  14369. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14370. }
  14371. if (isScreen)
  14372. {
  14373. isScreen = false;
  14374. bGui = isGui;
  14375. isGui = false;
  14376. if (!isMessage)
  14377. {
  14378. foreach (UICamera uicamera in ui_cam_hide_list_)
  14379. {
  14380. uicamera.GetComponent<Camera>().enabled = true;
  14381. }
  14382. ui_cam_hide_list_.Clear();
  14383. }
  14384. else
  14385. {
  14386. if (editUI != null)
  14387. {
  14388. editUI.SetActive(true);
  14389. }
  14390. if (GameMain.Instance.CMSystem.ViewFps)
  14391. {
  14392. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14393. childObject.SetActive(true);
  14394. }
  14395. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14396. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14397. childObject2.SetActive(true);
  14398. childObject3.SetActive(true);
  14399. }
  14400. for (int j = 0; j < maidCnt; j++)
  14401. {
  14402. if (maidArray[j] && maidArray[j].Visible)
  14403. {
  14404. isBone[j] = isBoneN[j];
  14405. if (isBone[j])
  14406. {
  14407. gNeck[j].SetActive(true);
  14408. gSpine[j].SetActive(true);
  14409. gSpine0a[j].SetActive(true);
  14410. gSpine1a[j].SetActive(true);
  14411. gSpine1[j].SetActive(true);
  14412. gPelvis[j].SetActive(true);
  14413. gHandL[j].SetActive(true);
  14414. gArmL[j].SetActive(true);
  14415. gFootL[j].SetActive(true);
  14416. gHizaL[j].SetActive(true);
  14417. gHandR[j].SetActive(true);
  14418. gArmR[j].SetActive(true);
  14419. gFootR[j].SetActive(true);
  14420. gHizaR[j].SetActive(true);
  14421. gClavicleL[j].SetActive(true);
  14422. gClavicleR[j].SetActive(true);
  14423. }
  14424. }
  14425. }
  14426. }
  14427. if (isScreen2)
  14428. {
  14429. isScreen = true;
  14430. isScreen2 = false;
  14431. }
  14432. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14433. && !Input.GetKey(KeyCode.Q))
  14434. {
  14435. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14436. {
  14437. isScreen = true;
  14438. for (int j = 0; j < maidCnt; j++)
  14439. {
  14440. if (maidArray[j] && maidArray[j].Visible)
  14441. {
  14442. if (isBone[j])
  14443. {
  14444. gNeck[j].SetActive(false);
  14445. gSpine[j].SetActive(false);
  14446. gSpine0a[j].SetActive(false);
  14447. gSpine1a[j].SetActive(false);
  14448. gSpine1[j].SetActive(false);
  14449. gPelvis[j].SetActive(false);
  14450. gHandL[j].SetActive(false);
  14451. gArmL[j].SetActive(false);
  14452. gFootL[j].SetActive(false);
  14453. gHizaL[j].SetActive(false);
  14454. gHandR[j].SetActive(false);
  14455. gArmR[j].SetActive(false);
  14456. gFootR[j].SetActive(false);
  14457. gHizaR[j].SetActive(false);
  14458. gClavicleL[j].SetActive(false);
  14459. gClavicleR[j].SetActive(false);
  14460. }
  14461. isBoneN[j] = isBone[j];
  14462. isBone[j] = false;
  14463. }
  14464. }
  14465. if (!isMessage)
  14466. {
  14467. ui_cam_hide_list_.Clear();
  14468. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14469. foreach (UICamera uicamera2 in array16)
  14470. {
  14471. if (uicamera2.GetComponent<Camera>().enabled)
  14472. {
  14473. uicamera2.GetComponent<Camera>().enabled = false;
  14474. ui_cam_hide_list_.Add(uicamera2);
  14475. }
  14476. }
  14477. }
  14478. else
  14479. {
  14480. editUI = GameObject.Find("/UI Root/Camera");
  14481. if (editUI != null)
  14482. {
  14483. editUI.SetActive(false);
  14484. }
  14485. if (GameMain.Instance.CMSystem.ViewFps)
  14486. {
  14487. GameObject childObject =
  14488. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14489. childObject.SetActive(false);
  14490. }
  14491. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14492. GameObject childObject3 =
  14493. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14494. childObject2.SetActive(false);
  14495. childObject3.SetActive(false);
  14496. }
  14497. isGui = bGui;
  14498. bGui = false;
  14499. GameMain.Instance.MainCamera.ScreenShot(false);
  14500. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14501. }
  14502. }
  14503. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14504. {
  14505. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14506. keyFlg2 = true;
  14507. }
  14508. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14509. {
  14510. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14511. keyFlg2 = true;
  14512. }
  14513. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14514. {
  14515. mainCameraTransform.eulerAngles =
  14516. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14517. keyFlg2 = true;
  14518. }
  14519. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14520. {
  14521. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14522. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14523. mainCamera.SetDistance(3f, true);
  14524. keyFlg2 = true;
  14525. }
  14526. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14527. {
  14528. cameraIti = mainCamera.GetTargetPos();
  14529. cameraIti2 = mainCamera.GetPos();
  14530. cameraItiAngle = mainCamera.transform.eulerAngles;
  14531. cameraItiDistance = mainCamera.GetDistance();
  14532. keyFlg2 = true;
  14533. }
  14534. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14535. {
  14536. mainCamera.SetTargetPos(cameraIti, true);
  14537. mainCamera.SetPos(cameraIti2);
  14538. mainCamera.transform.eulerAngles = cameraItiAngle;
  14539. mainCamera.SetDistance(cameraItiDistance, true);
  14540. keyFlg2 = true;
  14541. }
  14542. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14543. {
  14544. if (keyFlg2)
  14545. {
  14546. keyFlg2 = false;
  14547. }
  14548. else
  14549. {
  14550. effectIndex++;
  14551. if (effectIndex == 9)
  14552. {
  14553. kami.SetActive(false);
  14554. effectIndex = 0;
  14555. }
  14556. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14557. if (!isBlur)
  14558. {
  14559. component3.mode = Vignetting.AberrationMode.Simple;
  14560. component3.intensity = -3.98f;
  14561. component3.chromaticAberration = -0.75f;
  14562. component3.axialAberration = 1.18f;
  14563. component3.blurSpread = 4.19f;
  14564. component3.luminanceDependency = 0.494f;
  14565. component3.blurDistance = 1.71f;
  14566. component3.enabled = false;
  14567. }
  14568. if (kami) { }
  14569. if (effectIndex == 0)
  14570. {
  14571. component3.enabled = false;
  14572. }
  14573. if (effectIndex == 1)
  14574. {
  14575. component3.mode = Vignetting.AberrationMode.Simple;
  14576. component3.intensity = -1f;
  14577. component3.chromaticAberration = 0f;
  14578. component3.axialAberration = 0f;
  14579. component3.blurSpread = 5f;
  14580. component3.luminanceDependency = 0f;
  14581. component3.blurDistance = 0f;
  14582. component3.enabled = true;
  14583. }
  14584. if (effectIndex == 2)
  14585. {
  14586. component3.enabled = true;
  14587. }
  14588. if (effectIndex == 3)
  14589. {
  14590. component3.mode = Vignetting.AberrationMode.Simple;
  14591. component3.intensity = 9f;
  14592. component3.chromaticAberration = 0f;
  14593. component3.axialAberration = 0f;
  14594. component3.blurSpread = 5f;
  14595. component3.luminanceDependency = 0f;
  14596. component3.blurDistance = 0f;
  14597. component3.enabled = true;
  14598. }
  14599. if (effectIndex == 4)
  14600. {
  14601. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14602. kami = (GameObject)Instantiate(@object);
  14603. Vector3 localPosition = kami.transform.localPosition;
  14604. localPosition.y = 3.5f;
  14605. kami.transform.localPosition = localPosition;
  14606. }
  14607. if (effectIndex == 5)
  14608. {
  14609. component3.enabled = true;
  14610. component3.mode = Vignetting.AberrationMode.Simple;
  14611. component3.intensity = -2.5f;
  14612. component3.chromaticAberration = -0.3f;
  14613. component3.axialAberration = 0.5f;
  14614. component3.blurSpread = 4.5f;
  14615. component3.luminanceDependency = 0.2f;
  14616. component3.blurDistance = 0.8f;
  14617. component3.enabled = true;
  14618. }
  14619. if (effectIndex == 6)
  14620. {
  14621. kami.SetActive(false);
  14622. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14623. kami = (GameObject)Instantiate(@object);
  14624. Vector3 localPosition = kami.transform.localPosition;
  14625. localPosition.y = 3.5f;
  14626. kami.transform.localPosition = localPosition;
  14627. }
  14628. if (effectIndex == 7)
  14629. {
  14630. component3.enabled = true;
  14631. component3.mode = Vignetting.AberrationMode.Simple;
  14632. component3.intensity = -2.5f;
  14633. component3.chromaticAberration = -0.3f;
  14634. component3.axialAberration = 0.5f;
  14635. component3.blurSpread = 4.5f;
  14636. component3.luminanceDependency = 0.2f;
  14637. component3.blurDistance = 0.8f;
  14638. component3.enabled = true;
  14639. }
  14640. if (effectIndex == 8)
  14641. {
  14642. component3.mode = Vignetting.AberrationMode.Simple;
  14643. component3.intensity = 8f;
  14644. component3.chromaticAberration = 0f;
  14645. component3.axialAberration = 0f;
  14646. component3.blurSpread = 5f;
  14647. component3.luminanceDependency = 0f;
  14648. component3.blurDistance = 0f;
  14649. component3.enabled = true;
  14650. }
  14651. }
  14652. }
  14653. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14654. {
  14655. qFlg = false;
  14656. }
  14657. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14658. {
  14659. bool flag5 = false;
  14660. for (int k = 0; k < keyArray.Length; k++)
  14661. {
  14662. if (Input.GetKey(keyArray[k]))
  14663. {
  14664. flag5 = true;
  14665. break;
  14666. }
  14667. }
  14668. if (!getModKeyPressing(modKey.Shift))
  14669. {
  14670. if (!flag5)
  14671. {
  14672. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14673. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14674. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14675. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14676. {
  14677. Vector3 vector = softG;
  14678. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  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.I) && Input.GetKey(KeyCode.L))
  14683. {
  14684. Vector3 vector = softG;
  14685. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14686. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14687. softG = vector;
  14688. }
  14689. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14690. {
  14691. Vector3 vector = softG;
  14692. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14693. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14694. softG = vector;
  14695. }
  14696. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14697. {
  14698. Vector3 vector = softG;
  14699. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14700. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14701. softG = vector;
  14702. }
  14703. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14704. {
  14705. Vector3 vector = softG;
  14706. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14707. softG = vector;
  14708. }
  14709. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14710. {
  14711. Vector3 vector = softG;
  14712. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14713. softG = vector;
  14714. }
  14715. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14716. {
  14717. Vector3 vector = softG;
  14718. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14719. softG = vector;
  14720. }
  14721. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14722. {
  14723. Vector3 vector = softG;
  14724. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14725. softG = vector;
  14726. }
  14727. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14728. {
  14729. Vector3 vector = softG;
  14730. vector.y += 6E-05f * speed;
  14731. softG = vector;
  14732. }
  14733. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14734. {
  14735. Vector3 vector = softG;
  14736. vector.y -= 6E-05f * speed;
  14737. softG = vector;
  14738. }
  14739. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14740. {
  14741. softG = new Vector3(0f, -0.003f, 0f);
  14742. }
  14743. for (int j = 0; j < maidCnt; j++)
  14744. {
  14745. Maid maid = maidArray[j];
  14746. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14747. {
  14748. if (maid.body0.goSlot[l].obj != null)
  14749. {
  14750. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14751. if (component2 != null && component2.enabled)
  14752. {
  14753. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14754. }
  14755. }
  14756. List<THair1> fieldValue3 =
  14757. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14758. for (int k = 0; k < fieldValue3.Count; k++)
  14759. {
  14760. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14761. }
  14762. }
  14763. }
  14764. }
  14765. }
  14766. else if (!flag5)
  14767. {
  14768. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14769. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14770. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14771. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14772. {
  14773. Vector3 vector = softG2;
  14774. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  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.I) && Input.GetKey(KeyCode.L))
  14779. {
  14780. Vector3 vector = softG2;
  14781. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14782. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14783. softG2 = vector;
  14784. }
  14785. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14786. {
  14787. Vector3 vector = softG2;
  14788. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14789. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14790. softG2 = vector;
  14791. }
  14792. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14793. {
  14794. Vector3 vector = softG2;
  14795. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14796. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14797. softG2 = vector;
  14798. }
  14799. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14800. {
  14801. Vector3 vector = softG2;
  14802. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14803. softG2 = vector;
  14804. }
  14805. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14806. {
  14807. Vector3 vector = softG2;
  14808. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14809. softG2 = vector;
  14810. }
  14811. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14812. {
  14813. Vector3 vector = softG2;
  14814. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14815. softG2 = vector;
  14816. }
  14817. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14818. {
  14819. Vector3 vector = softG2;
  14820. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14821. softG2 = vector;
  14822. }
  14823. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14824. {
  14825. Vector3 vector = softG2;
  14826. vector.y += 2E-05f * speed;
  14827. softG2 = vector;
  14828. }
  14829. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14830. {
  14831. Vector3 vector = softG2;
  14832. vector.y -= 2E-05f * speed;
  14833. softG2 = vector;
  14834. }
  14835. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14836. {
  14837. softG2 = new Vector3(0f, -0.005f, 0f);
  14838. }
  14839. for (int j = 0; j < maidCnt; j++)
  14840. {
  14841. Maid maid = maidArray[j];
  14842. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14843. {
  14844. if (maid.body0.goSlot[l].obj != null)
  14845. {
  14846. DynamicSkirtBone fieldValue8 =
  14847. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14848. "m_SkirtBone");
  14849. if (fieldValue8 != null)
  14850. {
  14851. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14852. fieldValue8.UpdateParameters();
  14853. }
  14854. }
  14855. }
  14856. }
  14857. }
  14858. }
  14859. if (!isVR)
  14860. {
  14861. if (doguObject.Count > 0)
  14862. {
  14863. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14864. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14865. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14866. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14867. {
  14868. idoFlg2 = true;
  14869. doguObject[doguSelectIndex].transform.localScale =
  14870. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14871. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14872. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14873. }
  14874. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14875. {
  14876. idoFlg2 = true;
  14877. doguObject[doguSelectIndex].transform.localScale =
  14878. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14879. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14880. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14881. }
  14882. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14883. {
  14884. idoFlg2 = true;
  14885. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14886. }
  14887. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14888. {
  14889. doguObject[doguSelectIndex]
  14890. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14891. idoFlg2 = true;
  14892. }
  14893. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14894. {
  14895. doguObject[doguSelectIndex]
  14896. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14897. idoFlg2 = true;
  14898. }
  14899. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14900. && getModKeyPressing(modKey.Alt))
  14901. {
  14902. for (int k = 0; k < 10; k++)
  14903. {
  14904. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14905. Vector3.right,
  14906. -doguObject[doguSelectIndex]
  14907. .transform.rotation.eulerAngles.x);
  14908. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14909. Vector3.forward,
  14910. -doguObject[doguSelectIndex]
  14911. .transform.rotation.eulerAngles.z);
  14912. }
  14913. idoFlg2 = true;
  14914. Vector3 vector = Vector3.zero;
  14915. Vector3 zero3 = Vector3.zero;
  14916. zero3.x = -90f;
  14917. int num12 = doguIndex[doguSelectIndex];
  14918. switch (num12)
  14919. {
  14920. case 3:
  14921. vector.z = 0.5f;
  14922. zero3.z = 90f;
  14923. break;
  14924. case 4:
  14925. case 5:
  14926. case 7:
  14927. case 10:
  14928. case 11: break;
  14929. case 6:
  14930. vector.z = 0.6f;
  14931. zero3.x = 0f;
  14932. break;
  14933. case 8:
  14934. vector.z = 0.5f;
  14935. zero3.x = 0f;
  14936. break;
  14937. case 9:
  14938. vector.z = 0.32f;
  14939. zero3.z = 180f;
  14940. break;
  14941. case 12:
  14942. vector.z = 0.5f;
  14943. zero3.z = 180f;
  14944. break;
  14945. case 13:
  14946. vector.z = 0.7f;
  14947. zero3.z = 180f;
  14948. break;
  14949. default:
  14950. if (num12 != 16)
  14951. {
  14952. switch (num12)
  14953. {
  14954. case 23:
  14955. vector.z = 2.7f;
  14956. vector.x = 0.77f;
  14957. zero3.z = 90f;
  14958. break;
  14959. case 25:
  14960. vector.z = 0.5f;
  14961. vector.y = 0.9f;
  14962. zero3.z = 180f;
  14963. break;
  14964. case 26:
  14965. vector.z = 0.5f;
  14966. vector.y = 0.9f;
  14967. zero3.z = 180f;
  14968. break;
  14969. case 30:
  14970. vector.z = 0f;
  14971. zero3.z = 0f;
  14972. break;
  14973. case 31:
  14974. vector.z = -0.6f;
  14975. vector.y = 0.96f;
  14976. zero3.z = 180f;
  14977. break;
  14978. case 32:
  14979. vector.z = -0.6f;
  14980. vector.y = 0.96f;
  14981. zero3.z = 180f;
  14982. break;
  14983. case 33:
  14984. vector.z = -0.6f;
  14985. vector.y = 0.85f;
  14986. zero3.z = 180f;
  14987. break;
  14988. }
  14989. }
  14990. else
  14991. {
  14992. vector.z = -0.4f;
  14993. zero3.z = 180f;
  14994. }
  14995. break;
  14996. }
  14997. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14998. }
  14999. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  15000. && Input.GetKey(KeyCode.J))
  15001. {
  15002. doguObject[doguSelectIndex]
  15003. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15004. new Vector3(vector3.x, 0f, vector3.z),
  15005. 0.3f);
  15006. doguObject[doguSelectIndex]
  15007. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15008. new Vector3(vector2.x, 0f, vector2.z),
  15009. 0.3f);
  15010. idoFlg2 = true;
  15011. }
  15012. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  15013. && Input.GetKey(KeyCode.L))
  15014. {
  15015. doguObject[doguSelectIndex]
  15016. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15017. new Vector3(vector3.x, 0f, vector3.z),
  15018. 0.3f);
  15019. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15020. new Vector3(vector2.x, 0f, vector2.z),
  15021. -0.3f);
  15022. idoFlg2 = true;
  15023. }
  15024. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15025. && Input.GetKey(KeyCode.J))
  15026. {
  15027. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15028. new Vector3(vector3.x, 0f, vector3.z),
  15029. -0.3f);
  15030. doguObject[doguSelectIndex]
  15031. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15032. new Vector3(vector2.x, 0f, vector2.z),
  15033. 0.3f);
  15034. idoFlg2 = true;
  15035. }
  15036. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15037. && Input.GetKey(KeyCode.L))
  15038. {
  15039. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15040. new Vector3(vector3.x, 0f, vector3.z),
  15041. -0.3f);
  15042. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15043. new Vector3(vector2.x, 0f, vector2.z),
  15044. -0.3f);
  15045. idoFlg2 = true;
  15046. }
  15047. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15048. {
  15049. doguObject[doguSelectIndex]
  15050. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15051. new Vector3(vector3.x, 0f, vector3.z),
  15052. 0.4f);
  15053. idoFlg2 = true;
  15054. }
  15055. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15056. {
  15057. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15058. new Vector3(vector3.x, 0f, vector3.z),
  15059. -0.4f);
  15060. idoFlg2 = true;
  15061. }
  15062. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15063. {
  15064. doguObject[doguSelectIndex]
  15065. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15066. new Vector3(vector2.x, 0f, vector2.z),
  15067. 0.4f);
  15068. idoFlg2 = true;
  15069. }
  15070. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15071. {
  15072. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15073. new Vector3(vector2.x, 0f, vector2.z),
  15074. -0.4f);
  15075. idoFlg2 = true;
  15076. }
  15077. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15078. {
  15079. doguObject[doguSelectIndex].transform.localRotation =
  15080. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15081. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15082. idoFlg2 = true;
  15083. }
  15084. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15085. {
  15086. doguObject[doguSelectIndex].transform.localRotation =
  15087. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15088. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15089. idoFlg2 = true;
  15090. }
  15091. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15092. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15093. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15094. {
  15095. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15096. new Vector3(vector3.x, 0f, vector3.z),
  15097. -0.7f);
  15098. idoFlg2 = true;
  15099. }
  15100. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15101. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15102. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15103. {
  15104. doguObject[doguSelectIndex]
  15105. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15106. new Vector3(vector3.x, 0f, vector3.z),
  15107. 0.7f);
  15108. idoFlg2 = true;
  15109. }
  15110. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15111. && (Input.GetKey(KeyCode.Minus)
  15112. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15113. {
  15114. doguObject[doguSelectIndex]
  15115. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15116. new Vector3(vector2.x, 0f, vector2.z),
  15117. 0.7f);
  15118. idoFlg2 = true;
  15119. }
  15120. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15121. && (Input.GetKey(KeyCode.Quote)
  15122. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15123. {
  15124. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15125. new Vector3(vector2.x, 0f, vector2.z),
  15126. -0.7f);
  15127. idoFlg2 = true;
  15128. }
  15129. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15130. && Input.GetKey(KeyCode.J))
  15131. {
  15132. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15133. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15134. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15135. doguObject[doguSelectIndex].transform.localPosition = vector;
  15136. idoFlg2 = true;
  15137. }
  15138. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15139. && Input.GetKey(KeyCode.L))
  15140. {
  15141. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15142. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15143. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15144. doguObject[doguSelectIndex].transform.localPosition = vector;
  15145. idoFlg2 = true;
  15146. }
  15147. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15148. && Input.GetKey(KeyCode.J))
  15149. {
  15150. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15151. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15152. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15153. doguObject[doguSelectIndex].transform.localPosition = vector;
  15154. idoFlg2 = true;
  15155. }
  15156. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15157. && Input.GetKey(KeyCode.L))
  15158. {
  15159. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15160. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15161. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15162. doguObject[doguSelectIndex].transform.localPosition = vector;
  15163. idoFlg2 = true;
  15164. }
  15165. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15166. {
  15167. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15168. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15169. doguObject[doguSelectIndex].transform.localPosition = vector;
  15170. idoFlg2 = true;
  15171. }
  15172. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15173. {
  15174. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15175. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15176. doguObject[doguSelectIndex].transform.localPosition = vector;
  15177. idoFlg2 = true;
  15178. }
  15179. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15180. {
  15181. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15182. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15183. doguObject[doguSelectIndex].transform.localPosition = vector;
  15184. idoFlg2 = true;
  15185. }
  15186. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15187. {
  15188. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15189. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15190. doguObject[doguSelectIndex].transform.localPosition = vector;
  15191. idoFlg2 = true;
  15192. }
  15193. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15194. {
  15195. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15196. vector.y += 0.0075f * speed;
  15197. doguObject[doguSelectIndex].transform.localPosition = vector;
  15198. idoFlg2 = true;
  15199. }
  15200. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15201. {
  15202. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15203. vector.y -= 0.0075f * speed;
  15204. doguObject[doguSelectIndex].transform.localPosition = vector;
  15205. idoFlg2 = true;
  15206. }
  15207. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15208. {
  15209. idoFlg2 = true;
  15210. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15211. {
  15212. Destroy(doguObject[doguSelectIndex]);
  15213. doguObject.RemoveAt(doguSelectIndex);
  15214. }
  15215. doguIndex.RemoveAt(doguSelectIndex);
  15216. doguSelectIndex = 0;
  15217. }
  15218. }
  15219. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15220. {
  15221. idoFlg2 = true;
  15222. if (doguSelectIndex == doguObject.Count)
  15223. {
  15224. doguIndex.Add(0);
  15225. }
  15226. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15227. {
  15228. Destroy(doguObject[doguSelectIndex]);
  15229. doguObject.RemoveAt(doguSelectIndex);
  15230. }
  15231. else
  15232. {
  15233. doguIndex.Add(0);
  15234. doguSelectIndex = doguIndex.Count - 1;
  15235. }
  15236. List<int> list2;
  15237. int index;
  15238. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15239. if (doguIndex[doguSelectIndex] <= -1)
  15240. {
  15241. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15242. }
  15243. if (doguIndex[doguSelectIndex] > 0)
  15244. {
  15245. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15246. {
  15247. Object @object = null;
  15248. for (int j = 0; j < 5; j++)
  15249. {
  15250. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15251. if (@object != null)
  15252. {
  15253. break;
  15254. }
  15255. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15256. }
  15257. doguObject.Add(Instantiate(@object) as GameObject);
  15258. }
  15259. else
  15260. {
  15261. Material material = new Material(Shader.Find("Mirror"));
  15262. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15263. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15264. gameObject7.GetComponent<Renderer>().material = material;
  15265. gameObject7.AddComponent<MirrorReflection2>();
  15266. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15267. component5.m_TextureSize = 2048;
  15268. component5.m_ClipPlaneOffset = 0f;
  15269. gameObject7.GetComponent<Renderer>().enabled = true;
  15270. doguObject.Add(gameObject7);
  15271. }
  15272. Vector3 vector = Vector3.zero;
  15273. Vector3 zero3 = Vector3.zero;
  15274. zero3.x = -90f;
  15275. switch (doguIndex[doguSelectIndex])
  15276. {
  15277. case 1:
  15278. vector.z = -0.5f;
  15279. goto IL_344DC;
  15280. case 2:
  15281. vector.z = -0.5f;
  15282. goto IL_344DC;
  15283. case 3:
  15284. vector.z = 0.5f;
  15285. zero3.z = 90f;
  15286. goto IL_344DC;
  15287. case 4:
  15288. vector.z = 0.9f;
  15289. goto IL_344DC;
  15290. case 5:
  15291. vector.z = 0.9f;
  15292. goto IL_344DC;
  15293. case 6:
  15294. vector.z = 0.6f;
  15295. zero3.x = 0f;
  15296. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15297. goto IL_344DC;
  15298. case 7:
  15299. vector.z = 0.6f;
  15300. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15301. goto IL_344DC;
  15302. case 8:
  15303. vector.z = 0.5f;
  15304. zero3.x = 0f;
  15305. goto IL_344DC;
  15306. case 9:
  15307. vector.z = 0.32f;
  15308. zero3.z = 180f;
  15309. goto IL_344DC;
  15310. case 10:
  15311. vector.z = 0.6f;
  15312. goto IL_344DC;
  15313. case 11:
  15314. vector.z = 0.6f;
  15315. goto IL_344DC;
  15316. case 12:
  15317. vector.z = 0.5f;
  15318. zero3.z = 180f;
  15319. goto IL_344DC;
  15320. case 13:
  15321. vector.z = 0.7f;
  15322. zero3.z = 180f;
  15323. goto IL_344DC;
  15324. case 14:
  15325. vector.z = -0.4f;
  15326. goto IL_344DC;
  15327. case 15:
  15328. vector.z = -0.4f;
  15329. goto IL_344DC;
  15330. case 16:
  15331. vector.z = -0.4f;
  15332. zero3.z = 180f;
  15333. goto IL_344DC;
  15334. case 17:
  15335. vector.z = -0.4f;
  15336. goto IL_344DC;
  15337. case 18:
  15338. vector.z = -0.2f;
  15339. goto IL_344DC;
  15340. case 19:
  15341. vector.z = 0f;
  15342. goto IL_344DC;
  15343. case 20:
  15344. vector.z = 3.4f;
  15345. vector.x = -1f;
  15346. goto IL_344DC;
  15347. case 21:
  15348. vector.z = 3.4f;
  15349. vector.x = -1f;
  15350. goto IL_344DC;
  15351. case 22:
  15352. vector.z = 3.4f;
  15353. vector.y = 0.3f;
  15354. vector.x = -1f;
  15355. goto IL_344DC;
  15356. case 23:
  15357. vector.z = 2.7f;
  15358. vector.x = 0.77f;
  15359. zero3.z = 90f;
  15360. goto IL_344DC;
  15361. case 25:
  15362. vector.z = 0.5f;
  15363. vector.y = 0.9f;
  15364. zero3.z = 180f;
  15365. goto IL_344DC;
  15366. case 26:
  15367. vector.z = 0.5f;
  15368. vector.y = 0.9f;
  15369. zero3.z = 180f;
  15370. goto IL_344DC;
  15371. case 29:
  15372. vector.z = 0.5f;
  15373. vector.x = -1.05f;
  15374. goto IL_344DC;
  15375. case 30:
  15376. vector.z = -2.8f;
  15377. zero3.z = 0f;
  15378. zero3.x = 0f;
  15379. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15380. goto IL_344DC;
  15381. case 31:
  15382. vector.z = -0.6f;
  15383. vector.y = 0.96f;
  15384. zero3.z = 180f;
  15385. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15386. goto IL_344DC;
  15387. case 32:
  15388. vector.z = -0.6f;
  15389. vector.y = 0.96f;
  15390. zero3.z = 180f;
  15391. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15392. goto IL_344DC;
  15393. case 33:
  15394. vector.z = -0.6f;
  15395. vector.y = 0.85f;
  15396. zero3.z = 180f;
  15397. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15398. goto IL_344DC;
  15399. }
  15400. vector.z = 0.5f;
  15401. IL_344DC:
  15402. doguObject[doguSelectIndex].transform.localPosition = vector;
  15403. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15404. }
  15405. if (doguIndex[doguSelectIndex] == 0)
  15406. {
  15407. doguIndex.RemoveAt(doguSelectIndex);
  15408. }
  15409. }
  15410. else if (Input.GetKeyDown(KeyCode.W))
  15411. {
  15412. for (int k = 0; k < keyArray.Length; k++)
  15413. {
  15414. if (Input.GetKey(keyArray[k]))
  15415. {
  15416. wFlg = true;
  15417. break;
  15418. }
  15419. }
  15420. }
  15421. else if (Input.GetKeyUp(KeyCode.W))
  15422. {
  15423. if (wFlg)
  15424. {
  15425. wFlg = false;
  15426. }
  15427. else if (idoFlg2)
  15428. {
  15429. idoFlg2 = false;
  15430. }
  15431. else
  15432. {
  15433. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15434. {
  15435. Destroy(doguObject[doguSelectIndex]);
  15436. doguObject.RemoveAt(doguSelectIndex);
  15437. }
  15438. else
  15439. {
  15440. doguIndex.Add(0);
  15441. doguSelectIndex = doguIndex.Count - 1;
  15442. }
  15443. List<int> list2;
  15444. int index;
  15445. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15446. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15447. {
  15448. doguIndex[doguSelectIndex] = 0;
  15449. }
  15450. if (doguIndex[doguSelectIndex] > 0)
  15451. {
  15452. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15453. {
  15454. Object @object = null;
  15455. for (int j = 0; j < 5; j++)
  15456. {
  15457. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15458. if (@object != null)
  15459. {
  15460. break;
  15461. }
  15462. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15463. }
  15464. doguObject.Add(Instantiate(@object) as GameObject);
  15465. }
  15466. else
  15467. {
  15468. Material material = new Material(Shader.Find("Mirror"));
  15469. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15470. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15471. gameObject7.GetComponent<Renderer>().material = material;
  15472. gameObject7.AddComponent<MirrorReflection2>();
  15473. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15474. component5.m_TextureSize = 2048;
  15475. component5.m_ClipPlaneOffset = 0f;
  15476. gameObject7.GetComponent<Renderer>().enabled = true;
  15477. doguObject.Add(gameObject7);
  15478. }
  15479. Vector3 vector = Vector3.zero;
  15480. Vector3 zero3 = Vector3.zero;
  15481. zero3.x = -90f;
  15482. switch (doguIndex[doguSelectIndex])
  15483. {
  15484. case 1:
  15485. vector.z = -0.5f;
  15486. goto IL_34D66;
  15487. case 2:
  15488. vector.z = -0.5f;
  15489. goto IL_34D66;
  15490. case 3:
  15491. vector.z = 0.5f;
  15492. zero3.z = 90f;
  15493. goto IL_34D66;
  15494. case 4:
  15495. vector.z = 0.9f;
  15496. goto IL_34D66;
  15497. case 5:
  15498. vector.z = 0.9f;
  15499. goto IL_34D66;
  15500. case 6:
  15501. vector.z = 0.6f;
  15502. zero3.x = 0f;
  15503. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15504. goto IL_34D66;
  15505. case 7:
  15506. vector.z = 0.6f;
  15507. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15508. goto IL_34D66;
  15509. case 8:
  15510. vector.z = 0.5f;
  15511. zero3.x = 0f;
  15512. goto IL_34D66;
  15513. case 9:
  15514. vector.z = 0.32f;
  15515. zero3.z = 180f;
  15516. goto IL_34D66;
  15517. case 10:
  15518. vector.z = 0.6f;
  15519. goto IL_34D66;
  15520. case 11:
  15521. vector.z = 0.6f;
  15522. goto IL_34D66;
  15523. case 12:
  15524. vector.z = 0.5f;
  15525. zero3.z = 180f;
  15526. goto IL_34D66;
  15527. case 13:
  15528. vector.z = 0.7f;
  15529. zero3.z = 180f;
  15530. goto IL_34D66;
  15531. case 14:
  15532. vector.z = -0.4f;
  15533. goto IL_34D66;
  15534. case 15:
  15535. vector.z = -0.4f;
  15536. goto IL_34D66;
  15537. case 16:
  15538. vector.z = -0.4f;
  15539. zero3.z = 180f;
  15540. goto IL_34D66;
  15541. case 17:
  15542. vector.z = -0.4f;
  15543. goto IL_34D66;
  15544. case 18:
  15545. vector.z = -0.2f;
  15546. goto IL_34D66;
  15547. case 19:
  15548. vector.z = 0f;
  15549. goto IL_34D66;
  15550. case 20:
  15551. vector.z = 3.4f;
  15552. vector.x = -1f;
  15553. goto IL_34D66;
  15554. case 21:
  15555. vector.z = 3.4f;
  15556. vector.x = -1f;
  15557. goto IL_34D66;
  15558. case 22:
  15559. vector.z = 3.4f;
  15560. vector.y = 0.3f;
  15561. vector.x = -1f;
  15562. goto IL_34D66;
  15563. case 23:
  15564. vector.z = 2.7f;
  15565. vector.x = 0.77f;
  15566. zero3.z = 90f;
  15567. goto IL_34D66;
  15568. case 25:
  15569. vector.z = 0.5f;
  15570. vector.y = 0.9f;
  15571. zero3.z = 180f;
  15572. goto IL_34D66;
  15573. case 26:
  15574. vector.z = 0.5f;
  15575. vector.y = 0.9f;
  15576. zero3.z = 180f;
  15577. goto IL_34D66;
  15578. case 29:
  15579. vector.z = 0.5f;
  15580. vector.x = -1.05f;
  15581. goto IL_34D66;
  15582. case 30:
  15583. vector.z = -2.8f;
  15584. zero3.z = 0f;
  15585. zero3.x = 0f;
  15586. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15587. goto IL_34D66;
  15588. case 31:
  15589. vector.z = -0.6f;
  15590. vector.y = 0.96f;
  15591. zero3.z = 180f;
  15592. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15593. goto IL_34D66;
  15594. case 32:
  15595. vector.z = -0.6f;
  15596. vector.y = 0.96f;
  15597. zero3.z = 180f;
  15598. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15599. goto IL_34D66;
  15600. case 33:
  15601. vector.z = -0.6f;
  15602. vector.y = 0.85f;
  15603. zero3.z = 180f;
  15604. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15605. goto IL_34D66;
  15606. }
  15607. vector.z = 0.5f;
  15608. IL_34D66:;
  15609. }
  15610. if (doguIndex[doguSelectIndex] == 0)
  15611. {
  15612. doguIndex.RemoveAt(doguSelectIndex);
  15613. }
  15614. }
  15615. }
  15616. }
  15617. if (!isVR)
  15618. {
  15619. int i;
  15620. for (i = 0; i < 999; i++)
  15621. {
  15622. if (gDogu[i] != null)
  15623. {
  15624. gDogu[i].GetComponent<Renderer>().enabled = false;
  15625. gDogu[i].SetActive(false);
  15626. if (mDogu[i].del)
  15627. {
  15628. mDogu[i].del = false;
  15629. Destroy(doguBObject[i]);
  15630. doguBObject.RemoveAt(i);
  15631. }
  15632. else if (mDogu[i].count > 0)
  15633. {
  15634. mDogu[i].count--;
  15635. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15636. {
  15637. if (mDogu[i].count == 1)
  15638. {
  15639. doguBObject[i].SetActive(false);
  15640. }
  15641. if (mDogu[i].count == 0)
  15642. {
  15643. doguBObject[i].SetActive(true);
  15644. string name = doguBObject[i].name;
  15645. if (name != null)
  15646. {
  15647. if (!(name == "Particle/pLineY"))
  15648. {
  15649. if (!(name == "Particle/pLineP02"))
  15650. {
  15651. if (!(name == "Particle/pLine_act2"))
  15652. {
  15653. if (name == "Particle/pHeart01")
  15654. {
  15655. mDogu[i].count = 77;
  15656. }
  15657. }
  15658. else
  15659. {
  15660. mDogu[i].count = 90;
  15661. }
  15662. }
  15663. else
  15664. {
  15665. mDogu[i].count = 115;
  15666. }
  15667. }
  15668. else
  15669. {
  15670. mDogu[i].count = 180;
  15671. }
  15672. }
  15673. }
  15674. }
  15675. }
  15676. }
  15677. }
  15678. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15679. {
  15680. ikMode2 = 11;
  15681. }
  15682. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15683. {
  15684. ikMode2 = 12;
  15685. }
  15686. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15687. {
  15688. ikMode2 = 14;
  15689. }
  15690. else if (Input.GetKey(KeyCode.X))
  15691. {
  15692. ikMode2 = 9;
  15693. }
  15694. else if (Input.GetKey(KeyCode.Z))
  15695. {
  15696. ikMode2 = 10;
  15697. }
  15698. else if (Input.GetKey(KeyCode.C))
  15699. {
  15700. ikMode2 = 13;
  15701. }
  15702. else if (Input.GetKey(KeyCode.D))
  15703. {
  15704. ikMode2 = 15;
  15705. }
  15706. else
  15707. {
  15708. ikMode2 = 0;
  15709. }
  15710. if (gBg != null)
  15711. {
  15712. if (!isCube3)
  15713. {
  15714. gBg.GetComponent<Renderer>().enabled = false;
  15715. gBg.SetActive(false);
  15716. }
  15717. else
  15718. {
  15719. if (ikMode2 > 0 && ikMode2 != 15)
  15720. {
  15721. gBg.GetComponent<Renderer>().enabled = true;
  15722. gBg.SetActive(true);
  15723. }
  15724. else
  15725. {
  15726. gBg.GetComponent<Renderer>().enabled = false;
  15727. gBg.SetActive(false);
  15728. }
  15729. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15730. {
  15731. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15732. }
  15733. if (ikMode2 == 9 || ikMode2 == 14)
  15734. {
  15735. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15736. mBg.Update();
  15737. }
  15738. if (ikMode2 == 13)
  15739. {
  15740. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15741. mBg.Update();
  15742. }
  15743. if (ikMode2 == 13)
  15744. {
  15745. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15746. {
  15747. mBg.ido = 5;
  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 = 5;
  15756. }
  15757. }
  15758. else if (ikMode2 == 11)
  15759. {
  15760. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15761. {
  15762. mBg.ido = 3;
  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 = 3;
  15771. }
  15772. }
  15773. else if (ikMode2 == 12)
  15774. {
  15775. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15776. {
  15777. mBg.ido = 2;
  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 = 2;
  15786. }
  15787. }
  15788. else if (ikMode2 == 10)
  15789. {
  15790. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15791. {
  15792. mBg.ido = 1;
  15793. mBg.reset = true;
  15794. }
  15795. else
  15796. {
  15797. gBg.transform.position = bg.position;
  15798. gBg.transform.eulerAngles = bg.eulerAngles;
  15799. mBg.maid = bgObject;
  15800. mBg.ido = 1;
  15801. }
  15802. }
  15803. else if (ikMode2 == 9)
  15804. {
  15805. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15806. {
  15807. mBg.ido = 4;
  15808. mBg.reset = true;
  15809. }
  15810. else
  15811. {
  15812. gBg.transform.position = bg.position;
  15813. gBg.transform.eulerAngles = bg.eulerAngles;
  15814. mBg.maid = bgObject;
  15815. mBg.ido = 4;
  15816. }
  15817. }
  15818. else if (ikMode2 == 14)
  15819. {
  15820. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15821. {
  15822. mBg.ido = 6;
  15823. mBg.reset = true;
  15824. }
  15825. else
  15826. {
  15827. gBg.transform.position = bg.position;
  15828. gBg.transform.eulerAngles = bg.eulerAngles;
  15829. mBg.maid = bgObject;
  15830. mBg.ido = 6;
  15831. }
  15832. }
  15833. }
  15834. }
  15835. for (i = 0; i < lightIndex.Count; i++)
  15836. {
  15837. if (gLight[0] == null)
  15838. {
  15839. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15840. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15841. {
  15842. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15843. };
  15844. gLight[0].GetComponent<Renderer>().material = material2;
  15845. gLight[0].layer = 8;
  15846. gLight[0].GetComponent<Renderer>().enabled = false;
  15847. gLight[0].SetActive(false);
  15848. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15849. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15850. mLight[0].obj = gLight[0];
  15851. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15852. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15853. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15854. mLight[0].ido = 1;
  15855. mLight[0].isScale = false;
  15856. }
  15857. if (gLight[i] != null)
  15858. {
  15859. if (!isCube4)
  15860. {
  15861. gLight[i].GetComponent<Renderer>().enabled = false;
  15862. gLight[i].SetActive(false);
  15863. }
  15864. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15865. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15866. {
  15867. if (ikMode2 > 0 && ikMode2 != 15)
  15868. {
  15869. gLight[i].GetComponent<Renderer>().enabled = true;
  15870. gLight[i].SetActive(true);
  15871. }
  15872. else
  15873. {
  15874. gLight[i].GetComponent<Renderer>().enabled = false;
  15875. gLight[i].SetActive(false);
  15876. mLight[i].isAlt = false;
  15877. }
  15878. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15879. {
  15880. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15881. if (mLight[i].isAlt)
  15882. {
  15883. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15884. }
  15885. }
  15886. if (ikMode2 == 9 || ikMode2 == 14)
  15887. {
  15888. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15889. mLight[i].Update();
  15890. }
  15891. if (ikMode2 == 13)
  15892. {
  15893. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15894. mLight[i].Update();
  15895. }
  15896. if (ikMode2 == 13)
  15897. {
  15898. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15899. {
  15900. mLight[i].ido = 15;
  15901. mLight[i].reset = true;
  15902. }
  15903. else
  15904. {
  15905. if (lightList[i].transform.localScale.x == 1f)
  15906. {
  15907. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15908. }
  15909. lightRange[i] = lightList[i].transform.localScale.x;
  15910. gLight[i].transform.position = lightList[i].transform.position;
  15911. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15912. mLight[i].maid = lightList[i];
  15913. mLight[i].ido = 15;
  15914. }
  15915. }
  15916. else if (ikMode2 == 11)
  15917. {
  15918. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15919. {
  15920. mLight[i].ido = 3;
  15921. mLight[i].reset = true;
  15922. }
  15923. else
  15924. {
  15925. gLight[i].transform.position = lightList[i].transform.position;
  15926. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15927. lightX[i] = gLight[i].transform.eulerAngles.x;
  15928. lightY[i] = gLight[i].transform.eulerAngles.y;
  15929. mLight[i].maid = lightList[i];
  15930. mLight[i].ido = 3;
  15931. }
  15932. }
  15933. else if (ikMode2 == 12)
  15934. {
  15935. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15936. {
  15937. mLight[i].ido = 2;
  15938. mLight[i].reset = true;
  15939. }
  15940. else
  15941. {
  15942. gLight[i].transform.position = lightList[i].transform.position;
  15943. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15944. mLight[i].maid = lightList[i];
  15945. mLight[i].ido = 2;
  15946. }
  15947. }
  15948. else if (ikMode2 == 10)
  15949. {
  15950. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15951. {
  15952. mLight[i].ido = 1;
  15953. mLight[i].reset = true;
  15954. }
  15955. else
  15956. {
  15957. gLight[i].transform.position = lightList[i].transform.position;
  15958. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15959. mLight[i].maid = lightList[i];
  15960. mLight[i].maidArray = lightList.ToArray();
  15961. mLight[i].mArray = mLight.ToArray();
  15962. mLight[i].ido = 1;
  15963. }
  15964. }
  15965. else if (ikMode2 == 9)
  15966. {
  15967. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15968. {
  15969. mLight[i].ido = 4;
  15970. mLight[i].reset = true;
  15971. }
  15972. else
  15973. {
  15974. gLight[i].transform.position = lightList[i].transform.position;
  15975. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15976. lightX[i] = gLight[i].transform.eulerAngles.x;
  15977. lightY[i] = gLight[i].transform.eulerAngles.y;
  15978. mLight[i].maid = lightList[i];
  15979. mLight[i].ido = 4;
  15980. }
  15981. }
  15982. else if (ikMode2 == 14)
  15983. {
  15984. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15985. {
  15986. mLight[i].ido = 6;
  15987. mLight[i].reset = true;
  15988. }
  15989. else
  15990. {
  15991. gLight[i].transform.position = lightList[i].transform.position;
  15992. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15993. lightX[i] = gLight[i].transform.eulerAngles.x;
  15994. lightY[i] = gLight[i].transform.eulerAngles.y;
  15995. mLight[i].maid = lightList[i];
  15996. mLight[i].ido = 6;
  15997. }
  15998. }
  15999. }
  16000. }
  16001. }
  16002. for (i = 0; i < doguBObject.Count; i++)
  16003. {
  16004. if (!isCube2)
  16005. {
  16006. gDogu[i].GetComponent<Renderer>().enabled = false;
  16007. gDogu[i].SetActive(false);
  16008. }
  16009. else
  16010. {
  16011. if (ikMode2 > 0)
  16012. {
  16013. gDogu[i].GetComponent<Renderer>().enabled = true;
  16014. gDogu[i].SetActive(true);
  16015. }
  16016. else
  16017. {
  16018. gDogu[i].GetComponent<Renderer>().enabled = false;
  16019. gDogu[i].SetActive(false);
  16020. mDogu[i].isAlt = false;
  16021. }
  16022. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  16023. {
  16024. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  16025. if (mDogu[i].isAlt)
  16026. {
  16027. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16028. }
  16029. }
  16030. if (ikMode2 == 9 || ikMode2 == 14)
  16031. {
  16032. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16033. mDogu[i].Update();
  16034. }
  16035. if (ikMode2 == 15)
  16036. {
  16037. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16038. }
  16039. if (ikMode2 == 13)
  16040. {
  16041. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16042. mDogu[i].Update();
  16043. }
  16044. if (ikMode2 == 13)
  16045. {
  16046. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16047. {
  16048. mDogu[i].ido = 5;
  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].ido = 5;
  16057. }
  16058. }
  16059. else if (ikMode2 == 11)
  16060. {
  16061. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16062. {
  16063. mDogu[i].ido = 3;
  16064. mDogu[i].reset = true;
  16065. }
  16066. else
  16067. {
  16068. gDogu[i].transform.position = doguBObject[i].transform.position;
  16069. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16070. mDogu[i].maid = doguBObject[i];
  16071. mDogu[i].ido = 3;
  16072. }
  16073. }
  16074. else if (ikMode2 == 12)
  16075. {
  16076. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16077. {
  16078. mDogu[i].ido = 2;
  16079. mDogu[i].reset = true;
  16080. }
  16081. else
  16082. {
  16083. gDogu[i].transform.position = doguBObject[i].transform.position;
  16084. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16085. mDogu[i].maid = doguBObject[i];
  16086. mDogu[i].ido = 2;
  16087. }
  16088. }
  16089. else if (ikMode2 == 10)
  16090. {
  16091. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16092. {
  16093. mDogu[i].ido = 1;
  16094. mDogu[i].reset = true;
  16095. }
  16096. else
  16097. {
  16098. gDogu[i].transform.position = doguBObject[i].transform.position;
  16099. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16100. mDogu[i].maid = doguBObject[i];
  16101. mDogu[i].maidArray = doguBObject.ToArray();
  16102. mDogu[i].mArray = mDogu.ToArray();
  16103. mDogu[i].ido = 1;
  16104. }
  16105. }
  16106. else if (ikMode2 == 9)
  16107. {
  16108. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16109. {
  16110. mDogu[i].ido = 4;
  16111. mDogu[i].reset = true;
  16112. }
  16113. else
  16114. {
  16115. gDogu[i].transform.position = doguBObject[i].transform.position;
  16116. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16117. mDogu[i].maid = doguBObject[i];
  16118. mDogu[i].ido = 4;
  16119. }
  16120. }
  16121. else if (ikMode2 == 14)
  16122. {
  16123. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16124. {
  16125. mDogu[i].ido = 6;
  16126. mDogu[i].reset = true;
  16127. }
  16128. else
  16129. {
  16130. gDogu[i].transform.position = doguBObject[i].transform.position;
  16131. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16132. mDogu[i].maid = doguBObject[i];
  16133. mDogu[i].ido = 6;
  16134. }
  16135. }
  16136. else if (ikMode2 == 15)
  16137. {
  16138. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16139. {
  16140. mDogu[i].ido = 7;
  16141. mDogu[i].reset = true;
  16142. }
  16143. else
  16144. {
  16145. gDogu[i].transform.position = doguBObject[i].transform.position;
  16146. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16147. mDogu[i].maid = doguBObject[i];
  16148. mDogu[i].ido = 7;
  16149. }
  16150. }
  16151. }
  16152. }
  16153. ikModeOld2 = ikMode2;
  16154. }
  16155. if (isVR)
  16156. {
  16157. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16158. {
  16159. if (!isVR2)
  16160. {
  16161. isVR2 = true;
  16162. Preferences["config"]["shift_f8"].Value = "true";
  16163. SaveConfig();
  16164. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16165. }
  16166. else
  16167. {
  16168. isVR2 = false;
  16169. Preferences["config"]["shift_f8"].Value = "false";
  16170. SaveConfig();
  16171. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16172. }
  16173. }
  16174. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16175. {
  16176. loadScene = 1;
  16177. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16178. }
  16179. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16180. {
  16181. loadScene = 2;
  16182. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16183. }
  16184. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16185. {
  16186. loadScene = 3;
  16187. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16188. }
  16189. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16190. {
  16191. loadScene = 4;
  16192. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16193. }
  16194. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16195. {
  16196. loadScene = 5;
  16197. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16198. }
  16199. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16200. {
  16201. loadScene = 6;
  16202. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16203. }
  16204. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16205. {
  16206. loadScene = 7;
  16207. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16208. }
  16209. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16210. {
  16211. loadScene = 8;
  16212. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16213. }
  16214. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16215. {
  16216. loadScene = 9;
  16217. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16218. }
  16219. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16220. {
  16221. loadScene = 10;
  16222. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16223. }
  16224. for (int j = 0; j < 7; j++)
  16225. {
  16226. if (!maidArray[j])
  16227. {
  16228. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16229. }
  16230. }
  16231. }
  16232. }
  16233. }
  16234. }
  16235. }