MultipleMaids.MaidUpdate.cs 921 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. float num2 = 2f;
  661. if (Application.unityVersion.StartsWith("4"))
  662. {
  663. num2 = 1f;
  664. }
  665. GameObject gameObject3 = new GameObject("Light");
  666. gameObject3.AddComponent<Light>();
  667. lightList.Add(gameObject3);
  668. lightColorR.Add(1f);
  669. lightColorG.Add(1f);
  670. lightColorB.Add(1f);
  671. lightIndex.Add(0);
  672. lightX.Add(40f);
  673. lightY.Add(180f);
  674. lightAkarusa.Add(num2);
  675. lightKage.Add(0.098f);
  676. lightRange.Add(50f);
  677. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  678. gameObject3.GetComponent<Light>().intensity = num2;
  679. gameObject3.GetComponent<Light>().spotAngle = 50f;
  680. gameObject3.GetComponent<Light>().range = 10f;
  681. gameObject3.GetComponent<Light>().type = LightType.Directional;
  682. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  683. gameObject3.GetComponent<Light>().cullingMask = 256;
  684. }
  685. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  686. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  687. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  688. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  689. {
  690. float axis = Input.GetAxis("Mouse ScrollWheel");
  691. if (axis > 0f)
  692. {
  693. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  694. if (mainCamera.GetDistance() < 0.1f)
  695. {
  696. mainCamera.SetDistance(0.1f, true);
  697. }
  698. }
  699. else if (axis < 0f)
  700. {
  701. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  702. if (mainCamera.GetDistance() > 25f)
  703. {
  704. mainCamera.SetDistance(25f, true);
  705. }
  706. }
  707. }
  708. for (int j = 0; j < maxMaidCnt; j++)
  709. {
  710. if (maidArray[j] && maidArray[j].Visible)
  711. {
  712. maidCnt++;
  713. }
  714. }
  715. if (maidArray[0] != null && maidArray[0].Visible)
  716. {
  717. if (getModKeyPressing(modKey.Shift))
  718. {
  719. speed = 5f * Time.deltaTime * 60f;
  720. }
  721. else
  722. {
  723. speed = 1f * Time.deltaTime * 60f;
  724. }
  725. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  726. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  727. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  728. if (!isVR || isVR2)
  729. {
  730. if (!isVR)
  731. {
  732. if (isBloom)
  733. {
  734. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  735. fieldValue2.enabled = true;
  736. fieldValue2.bloomIntensity = bloom1;
  737. fieldValue2.bloomBlurIterations = (int)bloom2;
  738. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  739. if (isBloomA)
  740. {
  741. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  742. }
  743. else
  744. {
  745. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  746. }
  747. isBloom2 = true;
  748. }
  749. else if (isBloom2)
  750. {
  751. isBloom2 = false;
  752. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  753. fieldValue2.enabled = true;
  754. fieldValue2.bloomIntensity = 2.85f;
  755. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  756. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  757. fieldValue2.bloomBlurIterations = 3;
  758. }
  759. if (isDepth)
  760. {
  761. depth_field_.enabled = true;
  762. depth_field_.focalLength = depth1;
  763. depth_field_.focalSize = depth2;
  764. depth_field_.aperture = depth3;
  765. depth_field_.maxBlurSize = depth4;
  766. if (isDepthA)
  767. {
  768. depth_field_.visualizeFocus = true;
  769. }
  770. else
  771. {
  772. depth_field_.visualizeFocus = false;
  773. }
  774. }
  775. else
  776. {
  777. if (depth_field_ == null)
  778. {
  779. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  780. if (depth_field_.dofHdrShader == null)
  781. {
  782. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  783. }
  784. if (depth_field_.dx11BokehShader == null)
  785. {
  786. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  787. }
  788. if (depth_field_.dx11BokehTexture == null)
  789. {
  790. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  791. }
  792. }
  793. depth_field_.enabled = false;
  794. }
  795. if (isFog)
  796. {
  797. if (fog_.fogShader == null)
  798. {
  799. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  800. }
  801. fog_.enabled = true;
  802. fog_.startDistance = fog1;
  803. fog_.globalDensity = fog2;
  804. fog_.heightScale = fog3;
  805. fog_.height = fog4;
  806. fog_.globalFogColor.r = fog5;
  807. fog_.globalFogColor.g = fog6;
  808. fog_.globalFogColor.b = fog7;
  809. }
  810. else
  811. {
  812. if (fog_ == null)
  813. {
  814. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  815. }
  816. fog_.enabled = false;
  817. }
  818. if (isSepia != isSepian)
  819. {
  820. isSepia = isSepian;
  821. if (isSepia)
  822. {
  823. if (sepia_tone_.shader == null)
  824. {
  825. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  826. }
  827. sepia_tone_.enabled = true;
  828. }
  829. else
  830. {
  831. if (sepia_tone_ == null)
  832. {
  833. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  834. }
  835. sepia_tone_.enabled = false;
  836. }
  837. }
  838. if (bokashi > 0f)
  839. {
  840. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  841. component.enabled = true;
  842. component.blurSize = bokashi / 10f;
  843. component.blurIterations = 0;
  844. component.downsample = 0;
  845. if (bokashi > 3f)
  846. {
  847. component.blurSize -= 0.3f;
  848. component.blurIterations = 1;
  849. component.downsample = 1;
  850. }
  851. }
  852. else
  853. {
  854. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  855. component.enabled = false;
  856. }
  857. if (kamiyure > 0f)
  858. {
  859. for (int j = 0; j < maidCnt; j++)
  860. {
  861. Maid maid = maidArray[j];
  862. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  863. {
  864. if (maid.body0.goSlot[l].obj != null)
  865. {
  866. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  867. if (component2 != null && component2.enabled)
  868. {
  869. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  870. }
  871. }
  872. List<THair1> fieldValue3 =
  873. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  874. for (int k = 0; k < fieldValue3.Count; k++)
  875. {
  876. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  877. }
  878. }
  879. }
  880. }
  881. if (isBlur)
  882. {
  883. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  884. component3.mode = Vignetting.AberrationMode.Simple;
  885. component3.intensity = blur1;
  886. component3.chromaticAberration = blur4;
  887. component3.blur = blur2;
  888. component3.blurSpread = blur3;
  889. component3.enabled = true;
  890. isBlur2 = true;
  891. }
  892. else if (isBlur2)
  893. {
  894. isBlur2 = false;
  895. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  896. component3.mode = Vignetting.AberrationMode.Simple;
  897. component3.intensity = -3.98f;
  898. component3.chromaticAberration = -0.75f;
  899. component3.axialAberration = 1.18f;
  900. component3.blurSpread = 4.19f;
  901. component3.luminanceDependency = 0.494f;
  902. component3.blurDistance = 1.71f;
  903. component3.enabled = false;
  904. }
  905. }
  906. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  907. {
  908. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  909. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  910. }
  911. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  912. {
  913. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. }
  919. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  920. {
  921. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  922. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  923. }
  924. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  925. {
  926. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  927. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  928. }
  929. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  930. {
  931. GameMain.Instance.MainLight.Reset();
  932. GameMain.Instance.MainLight.SetIntensity(0.95f);
  933. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  934. lightIndex[0] = 0;
  935. lightColorR[0] = 1f;
  936. lightColorG[0] = 1f;
  937. lightColorB[0] = 1f;
  938. lightX[0] = 40f;
  939. lightY[0] = 180f;
  940. lightAkarusa[0] = 0.95f;
  941. lightKage[0] = 0.098f;
  942. lightRange[0] = 50f;
  943. bgObject.SetActive(true);
  944. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  945. isIdx1 = false;
  946. isIdx2 = false;
  947. isIdx3 = false;
  948. isIdx4 = false;
  949. }
  950. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  951. {
  952. List<float> list;
  953. (list = lightColorR)[0] = list[0] + 0.01f;
  954. if (lightColorR[0] > 1f)
  955. {
  956. lightColorR[0] = 1f;
  957. }
  958. if (lightIndex[0] != 3)
  959. {
  960. GameMain.Instance.MainLight.GetComponent<Light>().color =
  961. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  962. }
  963. else
  964. {
  965. mainCamera.GetComponent<Camera>().backgroundColor =
  966. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  967. }
  968. }
  969. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  970. {
  971. List<float> list;
  972. (list = lightColorG)[0] = list[0] + 0.01f;
  973. if (lightColorG[0] > 1f)
  974. {
  975. lightColorG[0] = 1f;
  976. }
  977. if (lightIndex[0] != 3)
  978. {
  979. GameMain.Instance.MainLight.GetComponent<Light>().color =
  980. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  981. }
  982. else
  983. {
  984. mainCamera.GetComponent<Camera>().backgroundColor =
  985. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  986. }
  987. }
  988. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  989. {
  990. List<float> list;
  991. (list = lightColorB)[0] = list[0] + 0.01f;
  992. if (lightColorB[0] > 1f)
  993. {
  994. lightColorB[0] = 1f;
  995. }
  996. if (lightIndex[0] != 3)
  997. {
  998. GameMain.Instance.MainLight.GetComponent<Light>().color =
  999. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1000. }
  1001. else
  1002. {
  1003. mainCamera.GetComponent<Camera>().backgroundColor =
  1004. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1005. }
  1006. }
  1007. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1008. {
  1009. List<float> list;
  1010. (list = lightColorR)[0] = list[0] - 0.01f;
  1011. if (lightColorR[0] < 0f)
  1012. {
  1013. lightColorR[0] = 0f;
  1014. }
  1015. if (lightIndex[0] != 3)
  1016. {
  1017. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1018. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1019. }
  1020. else
  1021. {
  1022. mainCamera.GetComponent<Camera>().backgroundColor =
  1023. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1024. }
  1025. }
  1026. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1027. {
  1028. List<float> list;
  1029. (list = lightColorG)[0] = list[0] - 0.01f;
  1030. if (lightColorG[0] < 0f)
  1031. {
  1032. lightColorG[0] = 0f;
  1033. }
  1034. if (lightIndex[0] != 3)
  1035. {
  1036. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1037. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1038. }
  1039. else
  1040. {
  1041. mainCamera.GetComponent<Camera>().backgroundColor =
  1042. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1043. }
  1044. }
  1045. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1046. {
  1047. List<float> list;
  1048. (list = lightColorB)[0] = list[0] - 0.01f;
  1049. if (lightColorB[0] < 0f)
  1050. {
  1051. lightColorB[0] = 0f;
  1052. }
  1053. if (lightIndex[0] != 3)
  1054. {
  1055. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1056. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1057. }
  1058. else
  1059. {
  1060. mainCamera.GetComponent<Camera>().backgroundColor =
  1061. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1062. }
  1063. }
  1064. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1065. {
  1066. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1067. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1068. }
  1069. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1070. {
  1071. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1072. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1073. }
  1074. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1075. {
  1076. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1077. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1078. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1079. }
  1080. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1081. {
  1082. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1083. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1084. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1085. }
  1086. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1087. {
  1088. List<int> list2;
  1089. (list2 = lightIndex)[0] = list2[0] + 1;
  1090. if (lightIndex[0] == 4)
  1091. {
  1092. lightIndex[0] = 0;
  1093. }
  1094. lightColorR[0] = 1f;
  1095. lightColorG[0] = 1f;
  1096. lightColorB[0] = 1f;
  1097. lightX[0] = 40f;
  1098. lightY[0] = 180f;
  1099. lightAkarusa[0] = 0.95f;
  1100. lightKage[0] = 0.098f;
  1101. lightRange[0] = 50f;
  1102. GameMain.Instance.MainLight.Reset();
  1103. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1104. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1105. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1106. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1107. if (lightIndex[0] == 0)
  1108. {
  1109. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1110. bgObject.SetActive(true);
  1111. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1112. }
  1113. else if (lightIndex[0] == 1)
  1114. {
  1115. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1116. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1117. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1118. }
  1119. else if (lightIndex[0] == 2)
  1120. {
  1121. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1122. }
  1123. else if (lightIndex[0] == 3)
  1124. {
  1125. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1126. mainCamera.GetComponent<Camera>().backgroundColor =
  1127. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1128. bgObject.SetActive(false);
  1129. }
  1130. isIdx1 = false;
  1131. isIdx2 = false;
  1132. isIdx3 = false;
  1133. isIdx4 = false;
  1134. }
  1135. }
  1136. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1137. {
  1138. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1139. }
  1140. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1141. {
  1142. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1143. {
  1144. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1145. }
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1148. {
  1149. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1150. }
  1151. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1152. {
  1153. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1154. }
  1155. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1156. {
  1157. GameMain.Instance.MainLight.Reset();
  1158. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1159. }
  1160. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1161. {
  1162. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1163. }
  1164. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1165. {
  1166. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1167. }
  1168. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1169. {
  1170. if (lightIndex[0] == 1)
  1171. {
  1172. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1173. }
  1174. else
  1175. {
  1176. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1177. }
  1178. }
  1179. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1180. {
  1181. if (lightIndex[0] == 1)
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1184. }
  1185. else
  1186. {
  1187. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1188. }
  1189. }
  1190. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1191. {
  1192. List<int> list2;
  1193. (list2 = lightIndex)[0] = list2[0] + 1;
  1194. if (lightIndex[0] == 3)
  1195. {
  1196. lightIndex[0] = 0;
  1197. }
  1198. GameMain.Instance.MainLight.Reset();
  1199. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1200. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1201. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1202. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1203. if (lightIndex[0] == 0)
  1204. {
  1205. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1206. }
  1207. else if (lightIndex[0] == 1)
  1208. {
  1209. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1210. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1211. }
  1212. else if (lightIndex[0] == 2)
  1213. {
  1214. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1215. }
  1216. }
  1217. int i;
  1218. for (i = 0; i < lightList.Count; i++)
  1219. {
  1220. if (i > 0)
  1221. {
  1222. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1223. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1224. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1225. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1226. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1227. {
  1228. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1229. }
  1230. }
  1231. else
  1232. {
  1233. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1234. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1235. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1236. {
  1237. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1238. }
  1239. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1240. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1241. if (lightIndex[i] != 3)
  1242. {
  1243. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1244. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1245. }
  1246. else
  1247. {
  1248. mainCamera.GetComponent<Camera>().backgroundColor =
  1249. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1250. }
  1251. }
  1252. }
  1253. bool flag3 = false;
  1254. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1255. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1256. {
  1257. for (i = 0; i < maidCnt; i++)
  1258. {
  1259. if (goSlot[(int)selectList[i]] != null)
  1260. {
  1261. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1262. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1263. {
  1264. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1265. }
  1266. }
  1267. }
  1268. }
  1269. for (int j = 0; j < maidCnt; j++)
  1270. {
  1271. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1272. {
  1273. bool flag4 = shodaiFlg[(int)selectList[j]];
  1274. shodaiFlg[(int)selectList[j]] = false;
  1275. try
  1276. {
  1277. TMorph morph = maidArray[j].body0.Face.morph;
  1278. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1279. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1280. }
  1281. catch
  1282. {
  1283. shodaiFlg[(int)selectList[j]] = true;
  1284. }
  1285. if (shodaiFlg[(int)selectList[j]] != flag4)
  1286. {
  1287. if (!isVR)
  1288. {
  1289. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1290. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1291. }
  1292. }
  1293. }
  1294. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1295. {
  1296. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1297. }
  1298. if (sceneLevel == 5)
  1299. {
  1300. if (editSelectMaid == maidArray[j])
  1301. {
  1302. flag3 = true;
  1303. }
  1304. }
  1305. Maid maid = maidArray[j];
  1306. }
  1307. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1308. {
  1309. isEditNo = 0;
  1310. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1311. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1312. }
  1313. i = 0;
  1314. while (i < maidCnt)
  1315. {
  1316. Transform transform = maidArray[i].transform;
  1317. Maid maid = maidArray[i];
  1318. if (cafeFlg[i])
  1319. {
  1320. cafeCount[i]++;
  1321. if (cafeCount[i] > 1)
  1322. {
  1323. maid.DelProp(MPN.handitem, true);
  1324. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1325. maid.AllProcPropSeqStart();
  1326. cafeFlg[i] = false;
  1327. cafeCount[i] = 0;
  1328. }
  1329. }
  1330. KeyCode key;
  1331. if (i >= 14)
  1332. {
  1333. bool flag5 = false;
  1334. bool flag6 = false;
  1335. for (int k = 0; k < keyArray.Length; k++)
  1336. {
  1337. if (Input.GetKey(keyArray[k]))
  1338. {
  1339. flag5 = true;
  1340. break;
  1341. }
  1342. if (Input.GetKeyUp(keyArray[k]))
  1343. {
  1344. flag6 = true;
  1345. break;
  1346. }
  1347. }
  1348. key = keyArray[6];
  1349. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1350. {
  1351. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1352. {
  1353. goto IL_49FE;
  1354. }
  1355. idoFlg[i - 7] = false;
  1356. }
  1357. }
  1358. else if (i >= 7)
  1359. {
  1360. bool flag5 = false;
  1361. bool flag6 = false;
  1362. for (int k = 0; k < keyArray.Length; k++)
  1363. {
  1364. if (Input.GetKey(keyArray[k]))
  1365. {
  1366. flag5 = true;
  1367. break;
  1368. }
  1369. if (Input.GetKeyUp(keyArray[k]))
  1370. {
  1371. flag6 = true;
  1372. break;
  1373. }
  1374. }
  1375. key = keyArray[i - 7];
  1376. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1377. {
  1378. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1379. {
  1380. goto IL_49FE;
  1381. }
  1382. idoFlg[i - 7] = false;
  1383. }
  1384. }
  1385. else
  1386. {
  1387. bool flag5 = false;
  1388. for (int k = 0; k < keyArray.Length; k++)
  1389. {
  1390. if (Input.GetKey(keyArray[k]))
  1391. {
  1392. flag5 = true;
  1393. break;
  1394. }
  1395. }
  1396. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1397. {
  1398. key = keyArray[i];
  1399. goto IL_49FE;
  1400. }
  1401. }
  1402. IL_1688E:
  1403. i++;
  1404. continue;
  1405. IL_49FE:
  1406. if (xFlg[i])
  1407. {
  1408. if (!maid.AudioMan.audiosource.isPlaying)
  1409. {
  1410. if (maid.status.personal.uniqueName == "Pride")
  1411. {
  1412. string text = "s0_";
  1413. Random random = new Random();
  1414. int num4 = random.Next(10000);
  1415. bool flag7 = false;
  1416. for (int k = 0; k < tunArray.Length; k++)
  1417. {
  1418. if (tunArray[k] == num4)
  1419. {
  1420. flag7 = true;
  1421. break;
  1422. }
  1423. }
  1424. if (!flag7)
  1425. {
  1426. text = text + "0" + num4.ToString() + ".ogg";
  1427. if (GameUty.FileSystem.IsExistentFile(text))
  1428. {
  1429. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1430. }
  1431. }
  1432. }
  1433. if (maid.status.personal.uniqueName == "Cool")
  1434. {
  1435. string text = "s1_";
  1436. Random random = new Random();
  1437. int num4 = random.Next(10000);
  1438. bool flag7 = false;
  1439. for (int k = 0; k < coolArray.Length; k++)
  1440. {
  1441. if (coolArray[k] == num4)
  1442. {
  1443. flag7 = true;
  1444. break;
  1445. }
  1446. }
  1447. if (!flag7)
  1448. {
  1449. text = text + "0" + num4.ToString() + ".ogg";
  1450. if (GameUty.FileSystem.IsExistentFile(text))
  1451. {
  1452. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1453. }
  1454. }
  1455. }
  1456. if (maid.status.personal.uniqueName == "Pure")
  1457. {
  1458. string text = "s2_";
  1459. Random random = new Random();
  1460. int num4 = random.Next(10000);
  1461. bool flag7 = false;
  1462. for (int k = 0; k < pureArray.Length; k++)
  1463. {
  1464. if (pureArray[k] == num4)
  1465. {
  1466. flag7 = true;
  1467. break;
  1468. }
  1469. }
  1470. if (!flag7)
  1471. {
  1472. text = text + "0" + num4.ToString() + ".ogg";
  1473. if (GameUty.FileSystem.IsExistentFile(text))
  1474. {
  1475. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1476. }
  1477. }
  1478. }
  1479. if (maid.status.personal.uniqueName == "Yandere")
  1480. {
  1481. string text = "s3_";
  1482. Random random = new Random();
  1483. int num4 = random.Next(10000);
  1484. bool flag7 = false;
  1485. for (int k = 0; k < yanArray.Length; k++)
  1486. {
  1487. if (yanArray[k] == num4)
  1488. {
  1489. flag7 = true;
  1490. break;
  1491. }
  1492. }
  1493. if (!flag7)
  1494. {
  1495. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1496. if (GameUty.FileSystem.IsExistentFile(text))
  1497. {
  1498. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1499. }
  1500. }
  1501. }
  1502. if (maid.status.personal.uniqueName == "Muku")
  1503. {
  1504. string text = "h0_";
  1505. Random random = new Random();
  1506. int num4 = random.Next(10000);
  1507. bool flag7 = false;
  1508. for (int k = 0; k < h0Array.Length; k++)
  1509. {
  1510. if (h0Array[k] == num4)
  1511. {
  1512. flag7 = true;
  1513. break;
  1514. }
  1515. }
  1516. if (flag7)
  1517. {
  1518. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1519. if (GameUty.FileSystem.IsExistentFile(text))
  1520. {
  1521. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1522. }
  1523. }
  1524. }
  1525. if (maid.status.personal.uniqueName == "Majime")
  1526. {
  1527. string text = "h1_";
  1528. Random random = new Random();
  1529. int num4 = random.Next(10000);
  1530. bool flag7 = false;
  1531. for (int k = 0; k < h1Array.Length; k++)
  1532. {
  1533. if (h1Array[k] == num4)
  1534. {
  1535. flag7 = true;
  1536. break;
  1537. }
  1538. }
  1539. if (flag7)
  1540. {
  1541. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1542. if (GameUty.FileSystem.IsExistentFile(text))
  1543. {
  1544. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1545. }
  1546. }
  1547. }
  1548. if (maid.status.personal.uniqueName == "Rindere")
  1549. {
  1550. string text = "h2_";
  1551. Random random = new Random();
  1552. int num4 = random.Next(10000);
  1553. bool flag7 = false;
  1554. for (int k = 0; k < h2Array.Length; k++)
  1555. {
  1556. if (h2Array[k] == num4)
  1557. {
  1558. flag7 = true;
  1559. break;
  1560. }
  1561. }
  1562. if (flag7)
  1563. {
  1564. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1565. if (GameUty.FileSystem.IsExistentFile(text))
  1566. {
  1567. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1568. }
  1569. }
  1570. }
  1571. }
  1572. }
  1573. if (zFlg[i])
  1574. {
  1575. if (!maid.AudioMan.audiosource.isPlaying)
  1576. {
  1577. string text = "";
  1578. if (maid.status.personal.uniqueName == "Pride")
  1579. {
  1580. text = "s0_";
  1581. Random random = new Random();
  1582. int num4 = random.Next(tunArray.Length);
  1583. object obj = text;
  1584. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1585. }
  1586. if (maid.status.personal.uniqueName == "Cool")
  1587. {
  1588. text = "s1_";
  1589. Random random = new Random();
  1590. int num4 = random.Next(coolArray.Length);
  1591. object obj = text;
  1592. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1593. }
  1594. if (maid.status.personal.uniqueName == "Pure")
  1595. {
  1596. text = "s2_";
  1597. Random random = new Random();
  1598. int num4 = random.Next(pureArray.Length);
  1599. object obj = text;
  1600. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1601. }
  1602. if (maid.status.personal.uniqueName == "Yandere")
  1603. {
  1604. text = "s3_";
  1605. Random random = new Random();
  1606. int num4 = random.Next(yanArray.Length);
  1607. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1608. }
  1609. if (maid.status.personal.uniqueName == "Muku")
  1610. {
  1611. text = "h0_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(h0tArray.Length);
  1614. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Majime")
  1617. {
  1618. text = "h1_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h1tArray.Length);
  1621. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Rindere")
  1624. {
  1625. text = "h2_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h2tArray.Length);
  1628. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1629. }
  1630. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1631. }
  1632. }
  1633. if (!isVR || isVR2)
  1634. {
  1635. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1636. {
  1637. ikMaid = i;
  1638. isIK[i] = true;
  1639. ikBui = 1;
  1640. ikMode[i] = 0;
  1641. SetIK(maid, i);
  1642. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1643. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1644. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1645. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1646. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1647. idoFlg[i] = true;
  1648. if (i >= 7)
  1649. {
  1650. idoFlg[i - 7] = true;
  1651. }
  1652. qFlg = true;
  1653. }
  1654. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1655. {
  1656. ikMaid = i;
  1657. isIK[i] = true;
  1658. ikBui = 2;
  1659. ikMode[i] = 0;
  1660. SetIK(maid, i);
  1661. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1662. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1663. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1664. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1665. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1666. idoFlg[i] = true;
  1667. if (i >= 7)
  1668. {
  1669. idoFlg[i - 7] = true;
  1670. }
  1671. }
  1672. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1673. {
  1674. ikMaid = i;
  1675. isIK[i] = true;
  1676. ikBui = 3;
  1677. ikMode[i] = 0;
  1678. SetIK(maid, i);
  1679. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1680. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1681. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1682. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1683. idoFlg[i] = true;
  1684. if (i >= 7)
  1685. {
  1686. idoFlg[i - 7] = true;
  1687. }
  1688. }
  1689. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1690. {
  1691. ikMaid = i;
  1692. isIK[i] = true;
  1693. ikBui = 4;
  1694. ikMode[i] = 0;
  1695. SetIK(maid, i);
  1696. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1697. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1698. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1699. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1700. idoFlg[i] = true;
  1701. if (i >= 7)
  1702. {
  1703. idoFlg[i - 7] = true;
  1704. }
  1705. sFlg = true;
  1706. }
  1707. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1708. {
  1709. maid.body0.transform.localRotation =
  1710. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1711. if (i >= 7)
  1712. {
  1713. idoFlg[i - 7] = true;
  1714. }
  1715. idoFlg[i] = true;
  1716. }
  1717. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1718. {
  1719. maid.body0.transform.localRotation =
  1720. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1721. if (i >= 7)
  1722. {
  1723. idoFlg[i - 7] = true;
  1724. }
  1725. idoFlg[i] = true;
  1726. }
  1727. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1728. {
  1729. bGui = true;
  1730. isPoseInit = true;
  1731. isGuiInit = true;
  1732. poseFlg = true;
  1733. faceFlg = false;
  1734. // sceneFlg = false;
  1735. kankyoFlg = false;
  1736. kankyo2Flg = false;
  1737. fFlg = true;
  1738. for (int k = 0; k < maidCnt; k++)
  1739. {
  1740. if (maid == maidArray[k])
  1741. {
  1742. selectMaidIndex = k;
  1743. }
  1744. }
  1745. copyIndex = 0;
  1746. if (i >= 7)
  1747. {
  1748. idoFlg[i - 7] = true;
  1749. }
  1750. idoFlg[i] = true;
  1751. }
  1752. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1753. {
  1754. bGui = true;
  1755. isFaceInit = true;
  1756. isGuiInit = true;
  1757. faceFlg = true;
  1758. poseFlg = false;
  1759. // sceneFlg = false;
  1760. kankyoFlg = false;
  1761. kankyo2Flg = false;
  1762. maid.boMabataki = false;
  1763. for (int k = 0; k < maidCnt; k++)
  1764. {
  1765. if (maid == maidArray[k])
  1766. {
  1767. selectMaidIndex = k;
  1768. }
  1769. }
  1770. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1771. if (i >= 7)
  1772. {
  1773. idoFlg[i - 7] = true;
  1774. }
  1775. idoFlg[i] = true;
  1776. }
  1777. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1778. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1779. {
  1780. if (!xFlg[i])
  1781. {
  1782. xFlg[i] = true;
  1783. zFlg[i] = false;
  1784. if (maid.status.personal.uniqueName == "Pride")
  1785. {
  1786. string text = "s0_";
  1787. Random random = new Random();
  1788. int num4 = random.Next(10000);
  1789. bool flag7 = false;
  1790. for (int k = 0; k < tunArray.Length; k++)
  1791. {
  1792. if (tunArray[k] == num4)
  1793. {
  1794. flag7 = true;
  1795. break;
  1796. }
  1797. }
  1798. if (!flag7)
  1799. {
  1800. text = text + "0" + num4.ToString() + ".ogg";
  1801. if (GameUty.FileSystem.IsExistentFile(text))
  1802. {
  1803. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1804. }
  1805. }
  1806. }
  1807. if (maid.status.personal.uniqueName == "Cool")
  1808. {
  1809. string text = "s1_";
  1810. Random random = new Random();
  1811. int num4 = random.Next(10000);
  1812. bool flag7 = false;
  1813. for (int k = 0; k < coolArray.Length; k++)
  1814. {
  1815. if (coolArray[k] == num4)
  1816. {
  1817. flag7 = true;
  1818. break;
  1819. }
  1820. }
  1821. if (!flag7)
  1822. {
  1823. text = text + "0" + num4.ToString() + ".ogg";
  1824. if (GameUty.FileSystem.IsExistentFile(text))
  1825. {
  1826. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1827. }
  1828. }
  1829. }
  1830. if (maid.status.personal.uniqueName == "Pure")
  1831. {
  1832. string text = "s2_";
  1833. Random random = new Random();
  1834. int num4 = random.Next(10000);
  1835. bool flag7 = false;
  1836. for (int k = 0; k < pureArray.Length; k++)
  1837. {
  1838. if (pureArray[k] == num4)
  1839. {
  1840. flag7 = true;
  1841. break;
  1842. }
  1843. }
  1844. if (!flag7)
  1845. {
  1846. text = text + "0" + num4.ToString() + ".ogg";
  1847. if (GameUty.FileSystem.IsExistentFile(text))
  1848. {
  1849. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1850. }
  1851. }
  1852. }
  1853. if (maid.status.personal.uniqueName == "Yandere")
  1854. {
  1855. string text = "s3_";
  1856. Random random = new Random();
  1857. int num4 = random.Next(10000);
  1858. bool flag7 = false;
  1859. for (int k = 0; k < yanArray.Length; k++)
  1860. {
  1861. if (yanArray[k] == num4)
  1862. {
  1863. flag7 = true;
  1864. break;
  1865. }
  1866. }
  1867. if (!flag7)
  1868. {
  1869. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1870. if (GameUty.FileSystem.IsExistentFile(text))
  1871. {
  1872. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1873. }
  1874. }
  1875. }
  1876. if (maid.status.personal.uniqueName == "Muku")
  1877. {
  1878. string text = "h0_";
  1879. Random random = new Random();
  1880. int num4 = random.Next(10000);
  1881. bool flag7 = false;
  1882. for (int k = 0; k < h0Array.Length; k++)
  1883. {
  1884. if (h0Array[k] == num4)
  1885. {
  1886. flag7 = true;
  1887. break;
  1888. }
  1889. }
  1890. if (flag7)
  1891. {
  1892. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1893. if (GameUty.FileSystem.IsExistentFile(text))
  1894. {
  1895. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1896. }
  1897. }
  1898. }
  1899. if (maid.status.personal.uniqueName == "Majime")
  1900. {
  1901. string text = "h1_";
  1902. Random random = new Random();
  1903. int num4 = random.Next(10000);
  1904. bool flag7 = false;
  1905. for (int k = 0; k < h1Array.Length; k++)
  1906. {
  1907. if (h1Array[k] == num4)
  1908. {
  1909. flag7 = true;
  1910. break;
  1911. }
  1912. }
  1913. if (flag7)
  1914. {
  1915. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1916. if (GameUty.FileSystem.IsExistentFile(text))
  1917. {
  1918. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1919. }
  1920. }
  1921. }
  1922. if (maid.status.personal.uniqueName == "Rindere")
  1923. {
  1924. string text = "h2_";
  1925. Random random = new Random();
  1926. int num4 = random.Next(10000);
  1927. bool flag7 = false;
  1928. for (int k = 0; k < h2Array.Length; k++)
  1929. {
  1930. if (h2Array[k] == num4)
  1931. {
  1932. flag7 = true;
  1933. break;
  1934. }
  1935. }
  1936. if (flag7)
  1937. {
  1938. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1939. if (GameUty.FileSystem.IsExistentFile(text))
  1940. {
  1941. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1942. }
  1943. }
  1944. }
  1945. }
  1946. else
  1947. {
  1948. xFlg[i] = false;
  1949. maid.AudioMan.Clear();
  1950. }
  1951. idoFlg[i] = true;
  1952. if (i >= 7)
  1953. {
  1954. idoFlg[i - 7] = true;
  1955. }
  1956. }
  1957. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1958. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1959. {
  1960. if (!zFlg[i])
  1961. {
  1962. zFlg[i] = true;
  1963. xFlg[i] = false;
  1964. string text = "";
  1965. if (maid.status.personal.uniqueName == "Pride")
  1966. {
  1967. text = "s0_";
  1968. Random random = new Random();
  1969. int num4 = random.Next(tunArray.Length);
  1970. object obj = text;
  1971. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1972. }
  1973. if (maid.status.personal.uniqueName == "Cool")
  1974. {
  1975. text = "s1_";
  1976. Random random = new Random();
  1977. int num4 = random.Next(coolArray.Length);
  1978. object obj = text;
  1979. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1980. }
  1981. if (maid.status.personal.uniqueName == "Pure")
  1982. {
  1983. text = "s2_";
  1984. Random random = new Random();
  1985. int num4 = random.Next(pureArray.Length);
  1986. object obj = text;
  1987. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1988. }
  1989. if (maid.status.personal.uniqueName == "Yandere")
  1990. {
  1991. text = "s3_";
  1992. Random random = new Random();
  1993. int num4 = random.Next(yanArray.Length);
  1994. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1995. }
  1996. if (maid.status.personal.uniqueName == "Muku")
  1997. {
  1998. text = "h0_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(h0tArray.Length);
  2001. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Majime")
  2004. {
  2005. text = "h1_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h1tArray.Length);
  2008. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Rindere")
  2011. {
  2012. text = "h2_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h2tArray.Length);
  2015. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2016. }
  2017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2018. }
  2019. else
  2020. {
  2021. zFlg[i] = false;
  2022. maid.AudioMan.Clear();
  2023. }
  2024. idoFlg[i] = true;
  2025. if (i >= 7)
  2026. {
  2027. idoFlg[i - 7] = true;
  2028. }
  2029. }
  2030. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2031. {
  2032. string text = "";
  2033. if (maid.status.personal.uniqueName == "Pride")
  2034. {
  2035. text = "s0_";
  2036. Random random = new Random();
  2037. int num4 = random.Next(tunArray.Length);
  2038. object obj = text;
  2039. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2040. }
  2041. if (maid.status.personal.uniqueName == "Cool")
  2042. {
  2043. text = "s1_";
  2044. Random random = new Random();
  2045. int num4 = random.Next(coolArray.Length);
  2046. object obj = text;
  2047. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2048. }
  2049. if (maid.status.personal.uniqueName == "Pure")
  2050. {
  2051. text = "s2_";
  2052. Random random = new Random();
  2053. int num4 = random.Next(pureArray.Length);
  2054. object obj = text;
  2055. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2056. }
  2057. if (maid.status.personal.uniqueName == "Yandere")
  2058. {
  2059. text = "s3_";
  2060. Random random = new Random();
  2061. int num4 = random.Next(yanArray.Length);
  2062. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2063. }
  2064. if (maid.status.personal.uniqueName == "Muku")
  2065. {
  2066. text = "h0_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(h0tArray.Length);
  2069. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Majime")
  2072. {
  2073. text = "h1_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h1tArray.Length);
  2076. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Rindere")
  2079. {
  2080. text = "h2_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h2tArray.Length);
  2083. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2084. }
  2085. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2086. idoFlg[i] = true;
  2087. if (i >= 7)
  2088. {
  2089. idoFlg[i - 7] = true;
  2090. }
  2091. }
  2092. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2093. {
  2094. if (maid.status.personal.uniqueName == "Pride")
  2095. {
  2096. string text = "s0_";
  2097. Random random = new Random();
  2098. int num4 = random.Next(10000);
  2099. bool flag7 = false;
  2100. for (int k = 0; k < tunArray.Length; k++)
  2101. {
  2102. if (tunArray[k] == num4)
  2103. {
  2104. flag7 = true;
  2105. break;
  2106. }
  2107. }
  2108. if (!flag7)
  2109. {
  2110. text = text + "0" + num4.ToString() + ".ogg";
  2111. if (GameUty.FileSystem.IsExistentFile(text))
  2112. {
  2113. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2114. }
  2115. }
  2116. }
  2117. if (maid.status.personal.uniqueName == "Cool")
  2118. {
  2119. string text = "s1_";
  2120. Random random = new Random();
  2121. int num4 = random.Next(10000);
  2122. bool flag7 = false;
  2123. for (int k = 0; k < coolArray.Length; k++)
  2124. {
  2125. if (coolArray[k] == num4)
  2126. {
  2127. flag7 = true;
  2128. break;
  2129. }
  2130. }
  2131. if (!flag7)
  2132. {
  2133. text = text + "0" + num4.ToString() + ".ogg";
  2134. if (GameUty.FileSystem.IsExistentFile(text))
  2135. {
  2136. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2137. }
  2138. }
  2139. }
  2140. if (maid.status.personal.uniqueName == "Pure")
  2141. {
  2142. string text = "s2_";
  2143. Random random = new Random();
  2144. int num4 = random.Next(10000);
  2145. bool flag7 = false;
  2146. for (int k = 0; k < pureArray.Length; k++)
  2147. {
  2148. if (pureArray[k] == num4)
  2149. {
  2150. flag7 = true;
  2151. break;
  2152. }
  2153. }
  2154. if (!flag7)
  2155. {
  2156. text = text + "0" + num4.ToString() + ".ogg";
  2157. if (GameUty.FileSystem.IsExistentFile(text))
  2158. {
  2159. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2160. }
  2161. }
  2162. }
  2163. if (maid.status.personal.uniqueName == "Yandere")
  2164. {
  2165. string text = "s3_";
  2166. Random random = new Random();
  2167. int num4 = random.Next(10000);
  2168. bool flag7 = false;
  2169. for (int k = 0; k < yanArray.Length; k++)
  2170. {
  2171. if (yanArray[k] == num4)
  2172. {
  2173. flag7 = true;
  2174. break;
  2175. }
  2176. }
  2177. if (!flag7)
  2178. {
  2179. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2180. if (GameUty.FileSystem.IsExistentFile(text))
  2181. {
  2182. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2183. }
  2184. }
  2185. }
  2186. if (maid.status.personal.uniqueName == "Muku")
  2187. {
  2188. string text = "h0_";
  2189. Random random = new Random();
  2190. int num4 = random.Next(10000);
  2191. bool flag7 = false;
  2192. for (int k = 0; k < h0Array.Length; k++)
  2193. {
  2194. if (h0Array[k] == num4)
  2195. {
  2196. flag7 = true;
  2197. break;
  2198. }
  2199. }
  2200. if (flag7)
  2201. {
  2202. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2203. if (GameUty.FileSystem.IsExistentFile(text))
  2204. {
  2205. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2206. }
  2207. }
  2208. }
  2209. if (maid.status.personal.uniqueName == "Majime")
  2210. {
  2211. string text = "h1_";
  2212. Random random = new Random();
  2213. int num4 = random.Next(10000);
  2214. bool flag7 = false;
  2215. for (int k = 0; k < h1Array.Length; k++)
  2216. {
  2217. if (h1Array[k] == num4)
  2218. {
  2219. flag7 = true;
  2220. break;
  2221. }
  2222. }
  2223. if (flag7)
  2224. {
  2225. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2226. if (GameUty.FileSystem.IsExistentFile(text))
  2227. {
  2228. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2229. }
  2230. }
  2231. }
  2232. if (maid.status.personal.uniqueName == "Rindere")
  2233. {
  2234. string text = "h2_";
  2235. Random random = new Random();
  2236. int num4 = random.Next(10000);
  2237. bool flag7 = false;
  2238. for (int k = 0; k < h2Array.Length; k++)
  2239. {
  2240. if (h2Array[k] == num4)
  2241. {
  2242. flag7 = true;
  2243. break;
  2244. }
  2245. }
  2246. if (flag7)
  2247. {
  2248. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2249. if (GameUty.FileSystem.IsExistentFile(text))
  2250. {
  2251. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2252. }
  2253. }
  2254. }
  2255. idoFlg[i] = true;
  2256. if (i >= 7)
  2257. {
  2258. idoFlg[i - 7] = true;
  2259. }
  2260. }
  2261. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2262. {
  2263. delCount[i] = 20;
  2264. if (goSlot[(int)selectList[i]] != null)
  2265. {
  2266. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2267. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2268. {
  2269. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2270. }
  2271. }
  2272. itemIndex[i]++;
  2273. if (itemIndex[i] == itemArray.Length - 1)
  2274. {
  2275. itemIndex[i] = 0;
  2276. }
  2277. string[] array = new string[2];
  2278. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2279. if (itemIndex[i] > 13)
  2280. {
  2281. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2282. }
  2283. maid.DelProp(MPN.handitem, true);
  2284. maid.DelProp(MPN.accvag, true);
  2285. maid.DelProp(MPN.accanl, true);
  2286. bool flag8 = false;
  2287. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2288. {
  2289. flag8 = true;
  2290. }
  2291. if (!flag8)
  2292. {
  2293. maid.DelProp(MPN.kousoku_upper, true);
  2294. maid.DelProp(MPN.kousoku_lower, true);
  2295. }
  2296. if (array[0] != "")
  2297. {
  2298. maid.SetProp(array[0], array[1], 0, true, false);
  2299. }
  2300. if (itemIndex[i] == 13)
  2301. {
  2302. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2303. maid.SetProp(array[0], array[1], 0, true, false);
  2304. }
  2305. if (itemIndex[i] == 23)
  2306. {
  2307. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2308. maid.SetProp(array[0], array[1], 0, true, false);
  2309. cafeFlg[i] = true;
  2310. }
  2311. maid.AllProcPropSeqStart();
  2312. idoFlg[i] = true;
  2313. if (i >= 7)
  2314. {
  2315. idoFlg[i - 7] = true;
  2316. }
  2317. mFlg = true;
  2318. }
  2319. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2320. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2321. {
  2322. for (int k = 0; k < 10; k++)
  2323. {
  2324. maid.transform.RotateAround(maid.transform.position,
  2325. Vector3.right,
  2326. -maid.transform.rotation.eulerAngles.x);
  2327. maid.transform.RotateAround(maid.transform.position,
  2328. Vector3.forward,
  2329. -maid.transform.rotation.eulerAngles.z);
  2330. }
  2331. idoFlg[i] = true;
  2332. atFlg = true;
  2333. if (i >= 7)
  2334. {
  2335. idoFlg[i - 7] = true;
  2336. }
  2337. }
  2338. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2339. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2340. {
  2341. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2342. idoFlg[i] = true;
  2343. if (i >= 7)
  2344. {
  2345. idoFlg[i - 7] = true;
  2346. }
  2347. }
  2348. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2349. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2350. {
  2351. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2352. idoFlg[i] = true;
  2353. if (i >= 7)
  2354. {
  2355. idoFlg[i - 7] = true;
  2356. }
  2357. }
  2358. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2359. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2360. {
  2361. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2362. idoFlg[i] = true;
  2363. if (i >= 7)
  2364. {
  2365. idoFlg[i - 7] = true;
  2366. }
  2367. }
  2368. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2369. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2370. {
  2371. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2372. idoFlg[i] = true;
  2373. if (i >= 7)
  2374. {
  2375. idoFlg[i - 7] = true;
  2376. }
  2377. }
  2378. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2379. {
  2380. Vector3 vector = maid.transform.position;
  2381. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2382. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2383. maid.SetPos(vector);
  2384. idoFlg[i] = true;
  2385. if (i >= 7)
  2386. {
  2387. idoFlg[i - 7] = true;
  2388. }
  2389. }
  2390. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2391. {
  2392. Vector3 vector = maid.transform.position;
  2393. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2394. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2395. maid.SetPos(vector);
  2396. idoFlg[i] = true;
  2397. if (i >= 7)
  2398. {
  2399. idoFlg[i - 7] = true;
  2400. }
  2401. }
  2402. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2403. {
  2404. Vector3 vector = maid.transform.position;
  2405. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2406. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2407. maid.SetPos(vector);
  2408. idoFlg[i] = true;
  2409. if (i >= 7)
  2410. {
  2411. idoFlg[i - 7] = true;
  2412. }
  2413. }
  2414. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2415. {
  2416. Vector3 vector = maid.transform.position;
  2417. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2418. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2419. maid.SetPos(vector);
  2420. idoFlg[i] = true;
  2421. if (i >= 7)
  2422. {
  2423. idoFlg[i - 7] = true;
  2424. }
  2425. }
  2426. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2427. {
  2428. Vector3 vector = maid.transform.position;
  2429. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2430. maid.SetPos(vector);
  2431. idoFlg[i] = true;
  2432. if (i >= 7)
  2433. {
  2434. idoFlg[i - 7] = true;
  2435. }
  2436. }
  2437. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2438. {
  2439. Vector3 vector = maid.transform.position;
  2440. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2441. maid.SetPos(vector);
  2442. idoFlg[i] = true;
  2443. if (i >= 7)
  2444. {
  2445. idoFlg[i - 7] = true;
  2446. }
  2447. }
  2448. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2449. {
  2450. Vector3 vector = maid.transform.position;
  2451. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2452. maid.SetPos(vector);
  2453. idoFlg[i] = true;
  2454. if (i >= 7)
  2455. {
  2456. idoFlg[i - 7] = true;
  2457. }
  2458. }
  2459. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2460. {
  2461. Vector3 vector = maid.transform.position;
  2462. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2463. maid.SetPos(vector);
  2464. idoFlg[i] = true;
  2465. if (i >= 7)
  2466. {
  2467. idoFlg[i - 7] = true;
  2468. }
  2469. }
  2470. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2471. {
  2472. Vector3 vector = maid.transform.position;
  2473. vector.y += 0.0075f * speed;
  2474. maid.SetPos(vector);
  2475. idoFlg[i] = true;
  2476. if (i >= 7)
  2477. {
  2478. idoFlg[i - 7] = true;
  2479. }
  2480. }
  2481. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2482. {
  2483. Vector3 vector = maid.transform.position;
  2484. vector.y -= 0.0075f * speed;
  2485. maid.SetPos(vector);
  2486. idoFlg[i] = true;
  2487. if (i >= 7)
  2488. {
  2489. idoFlg[i - 7] = true;
  2490. }
  2491. }
  2492. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2493. && getModKeyPressing(modKey.Shift))
  2494. {
  2495. faceIndex[i]--;
  2496. if (faceIndex[i] <= -1)
  2497. {
  2498. faceIndex[i] = faceArray.Length - 1;
  2499. }
  2500. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2501. idoFlg[i] = true;
  2502. if (i >= 7)
  2503. {
  2504. idoFlg[i - 7] = true;
  2505. }
  2506. }
  2507. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2508. {
  2509. faceIndex[i]++;
  2510. if (faceIndex[i] == faceArray.Length)
  2511. {
  2512. faceIndex[i] = 0;
  2513. }
  2514. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2515. idoFlg[i] = true;
  2516. if (i >= 7)
  2517. {
  2518. idoFlg[i - 7] = true;
  2519. }
  2520. }
  2521. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2522. {
  2523. faceBlendIndex[i]++;
  2524. if (faceBlendIndex[i] == faceBlendArray.Length)
  2525. {
  2526. faceBlendIndex[i] = 0;
  2527. }
  2528. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2529. idoFlg[i] = true;
  2530. if (i >= 7)
  2531. {
  2532. idoFlg[i - 7] = true;
  2533. }
  2534. }
  2535. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2536. {
  2537. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2538. isStop[i] = false;
  2539. poseCount[i] = 20;
  2540. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2541. {
  2542. maid.body0.MuneYureL(0f);
  2543. maid.body0.MuneYureR(0f);
  2544. }
  2545. else
  2546. {
  2547. maid.body0.MuneYureL(1f);
  2548. maid.body0.MuneYureR(1f);
  2549. maid.body0.jbMuneL.enabled = true;
  2550. maid.body0.jbMuneR.enabled = true;
  2551. }
  2552. if (array[0].Contains("MultipleMaidsPose"))
  2553. {
  2554. string path = array[0].Split(new char[] { '/' })[1];
  2555. byte[] array2 = new byte[0];
  2556. try
  2557. {
  2558. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2559. {
  2560. array2 = new byte[fileStream.Length];
  2561. fileStream.Read(array2, 0, array2.Length);
  2562. }
  2563. }
  2564. catch { }
  2565. if (0 < array2.Length)
  2566. {
  2567. string text = Path.GetFileName(path);
  2568. long num5 = text.GetHashCode();
  2569. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2570. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2571. {
  2572. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2573. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2574. };
  2575. for (int m = 0; m < array3.Length; m++)
  2576. {
  2577. maid.SetAutoTwist(array3[m], true);
  2578. }
  2579. }
  2580. }
  2581. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2582. {
  2583. loadPose[i] = array[0];
  2584. }
  2585. else if (!array[0].StartsWith("dance_"))
  2586. {
  2587. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2588. }
  2589. else
  2590. {
  2591. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2592. {
  2593. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2594. GameUty.FileSystem,
  2595. array[0] + ".anm",
  2596. false,
  2597. false);
  2598. }
  2599. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2600. }
  2601. if (array.Length > 1)
  2602. {
  2603. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2604. isStop[i] = true;
  2605. if (array.Length > 2)
  2606. {
  2607. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2608. isPoseIti[i] = true;
  2609. poseIti[i] = maidArray[i].transform.position;
  2610. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2611. }
  2612. }
  2613. isLock[i] = false;
  2614. idoFlg[i] = true;
  2615. mHandL[i].initFlg = false;
  2616. mHandR[i].initFlg = false;
  2617. mFootL[i].initFlg = false;
  2618. mFootR[i].initFlg = false;
  2619. pHandL[i] = 0;
  2620. pHandR[i] = 0;
  2621. muneIKL[i] = false;
  2622. muneIKR[i] = false;
  2623. if (!isVR)
  2624. {
  2625. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2626. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2627. }
  2628. if (i >= 7)
  2629. {
  2630. idoFlg[i - 7] = true;
  2631. }
  2632. }
  2633. else if (maid.body0.isLoadedBody)
  2634. {
  2635. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2636. {
  2637. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2638. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2639. }
  2640. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2641. {
  2642. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2643. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2644. }
  2645. if (!HandL1[i])
  2646. {
  2647. SetIKInit(i);
  2648. SetIK(maid, i);
  2649. ikBui = 5;
  2650. }
  2651. else
  2652. {
  2653. bool flag5 = false;
  2654. for (int k = 0; k < keyArray.Length; k++)
  2655. {
  2656. if (Input.GetKey(keyArray[k]))
  2657. {
  2658. flag5 = true;
  2659. break;
  2660. }
  2661. }
  2662. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2663. || Input.GetKey(KeyCode.Y))
  2664. {
  2665. flag5 = true;
  2666. }
  2667. if (!flag5)
  2668. {
  2669. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2670. && getModKeyPressing(modKey.Shift))
  2671. {
  2672. ikMode[i] = 15;
  2673. }
  2674. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2675. {
  2676. ikMode[i] = 5;
  2677. }
  2678. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2679. {
  2680. ikMode[i] = 6;
  2681. }
  2682. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2683. {
  2684. ikMode[i] = 7;
  2685. }
  2686. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2687. {
  2688. ikMode[i] = 11;
  2689. }
  2690. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2691. {
  2692. ikMode[i] = 12;
  2693. }
  2694. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2695. {
  2696. ikMode[i] = 14;
  2697. }
  2698. else if (getModKeyPressing(modKey.Shift))
  2699. {
  2700. ikMode[i] = 1;
  2701. }
  2702. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2703. {
  2704. ikMode[i] = 8;
  2705. }
  2706. else if (getModKeyPressing(modKey.Ctrl))
  2707. {
  2708. ikMode[i] = 2;
  2709. }
  2710. else if (getModKeyPressing(modKey.Alt))
  2711. {
  2712. ikMode[i] = 3;
  2713. }
  2714. else if (Input.GetKey(KeyCode.Space))
  2715. {
  2716. ikMode[i] = 4;
  2717. }
  2718. else if (Input.GetKey(KeyCode.X))
  2719. {
  2720. ikMode[i] = 9;
  2721. }
  2722. else if (Input.GetKey(KeyCode.Z))
  2723. {
  2724. ikMode[i] = 10;
  2725. }
  2726. else if (Input.GetKey(KeyCode.C))
  2727. {
  2728. ikMode[i] = 13;
  2729. }
  2730. else if (Input.GetKey(KeyCode.A))
  2731. {
  2732. ikMode[i] = 16;
  2733. }
  2734. else
  2735. {
  2736. ikMode[i] = 0;
  2737. }
  2738. if (!isIK[i])
  2739. {
  2740. if (ikMode[i] < 9)
  2741. {
  2742. ikMode[i] = 0;
  2743. }
  2744. }
  2745. bool flag9 = false;
  2746. bool flag10 = false;
  2747. bool flag11 = false;
  2748. bool flag12 = false;
  2749. if (gFinger[i, 0])
  2750. {
  2751. for (int j = 0; j < 15; j++)
  2752. {
  2753. if (mFinger[i, j].isStop)
  2754. {
  2755. flag9 = true;
  2756. }
  2757. }
  2758. for (int j = 15; j < 30; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag10 = true;
  2763. }
  2764. }
  2765. for (int j = 0; j < 6; j++)
  2766. {
  2767. if (mFinger2[i, j].isStop)
  2768. {
  2769. flag11 = true;
  2770. }
  2771. }
  2772. for (int j = 6; j < 12; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag12 = true;
  2777. }
  2778. }
  2779. }
  2780. if (gMaid[i] != null)
  2781. {
  2782. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2783. {
  2784. gMaid[i].SetActive(true);
  2785. if (isCube)
  2786. {
  2787. gMaidC[i].SetActive(true);
  2788. }
  2789. }
  2790. else
  2791. {
  2792. gMaid[i].SetActive(false);
  2793. gMaidC[i].SetActive(false);
  2794. }
  2795. }
  2796. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2797. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2798. {
  2799. ikBui = 1;
  2800. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2801. {
  2802. ikMaid = i;
  2803. }
  2804. if (ikMaid == i)
  2805. {
  2806. SetIK(maid, i);
  2807. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2808. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2809. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2810. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2811. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2812. }
  2813. if (Input.GetKeyDown(KeyCode.Q))
  2814. {
  2815. qFlg = true;
  2816. }
  2817. }
  2818. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2819. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2820. {
  2821. ikBui = 2;
  2822. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2823. {
  2824. ikMaid = i;
  2825. }
  2826. if (ikMaid == i)
  2827. {
  2828. SetIK(maid, i);
  2829. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2830. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2831. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2832. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2833. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2834. }
  2835. if (Input.GetKeyDown(KeyCode.W))
  2836. {
  2837. wFlg = true;
  2838. }
  2839. }
  2840. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2841. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2842. {
  2843. ikBui = 3;
  2844. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2845. {
  2846. ikMaid = i;
  2847. }
  2848. if (ikMaid == i)
  2849. {
  2850. SetIK(maid, i);
  2851. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2852. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2853. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2854. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2855. }
  2856. }
  2857. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2858. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2859. {
  2860. ikBui = 4;
  2861. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2862. {
  2863. ikMaid = i;
  2864. }
  2865. if (ikMaid == i)
  2866. {
  2867. SetIK(maid, i);
  2868. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2869. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2870. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2871. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2872. }
  2873. if (Input.GetKeyDown(KeyCode.S))
  2874. {
  2875. sFlg = true;
  2876. }
  2877. }
  2878. mHandR[i].isSelect = false;
  2879. mArmR[i].isSelect = false;
  2880. mHandL[i].isSelect = false;
  2881. mArmL[i].isSelect = false;
  2882. mFootR[i].isSelect = false;
  2883. mHizaR[i].isSelect = false;
  2884. mFootL[i].isSelect = false;
  2885. mHizaL[i].isSelect = false;
  2886. mClavicleL[i].isSelect = false;
  2887. mClavicleR[i].isSelect = false;
  2888. if (ikMode[i] == 16)
  2889. {
  2890. if (!gHead2[i])
  2891. {
  2892. SetIKInit6(i);
  2893. }
  2894. if (mHead2[i].isClick)
  2895. {
  2896. mHead2[i].isClick = false;
  2897. bGui = true;
  2898. isFaceInit = true;
  2899. // isGuiInit = true;
  2900. faceFlg = true;
  2901. poseFlg = false;
  2902. // sceneFlg = false;
  2903. kankyoFlg = false;
  2904. kankyo2Flg = false;
  2905. maid.boMabataki = false;
  2906. selectMaidIndex = mHead2[i].no;
  2907. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2908. }
  2909. if (mMaid2[i].isClick)
  2910. {
  2911. mMaid2[i].isClick = false;
  2912. bGui = true;
  2913. isPoseInit = true;
  2914. // isGuiInit = true;
  2915. poseFlg = true;
  2916. faceFlg = false;
  2917. // sceneFlg = false;
  2918. kankyoFlg = false;
  2919. kankyo2Flg = false;
  2920. selectMaidIndex = mMaid2[i].no;
  2921. copyIndex = 0;
  2922. }
  2923. gHead2[i].transform.position =
  2924. new Vector3(Head2[i].position.x,
  2925. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2926. Head2[i].position.z);
  2927. gHead2[i].transform.eulerAngles =
  2928. new Vector3(Head2[i].transform.eulerAngles.x,
  2929. Head2[i].transform.eulerAngles.y,
  2930. Head2[i].transform.eulerAngles.z + 90f);
  2931. mHead2[i].no = i;
  2932. mHead2[i].maid = maid;
  2933. mHead2[i].ido = 1;
  2934. gMaid2[i].transform.position =
  2935. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2936. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2937. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2938. gMaid2[i].transform.eulerAngles =
  2939. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2940. Spine0a2[i].transform.eulerAngles.y,
  2941. Spine0a2[i].transform.eulerAngles.z + 90f);
  2942. mMaid2[i].no = i;
  2943. mMaid2[i].maid = maid;
  2944. mMaid2[i].ido = 2;
  2945. gArmL[i].SetActive(false);
  2946. gFootL[i].SetActive(false);
  2947. gHizaL[i].SetActive(false);
  2948. gHandR[i].SetActive(false);
  2949. gArmR[i].SetActive(false);
  2950. gFootR[i].SetActive(false);
  2951. gHizaR[i].SetActive(false);
  2952. gClavicleL[i].SetActive(false);
  2953. gClavicleR[i].SetActive(false);
  2954. gNeck[i].SetActive(false);
  2955. gSpine[i].SetActive(false);
  2956. gSpine0a[i].SetActive(false);
  2957. gSpine1a[i].SetActive(false);
  2958. gSpine1[i].SetActive(false);
  2959. gPelvis[i].SetActive(false);
  2960. }
  2961. else if (ikMode[i] == 8)
  2962. {
  2963. if (ikModeOld[i] == 15 && gIKHandL[i])
  2964. {
  2965. mIKHandL[i].ido = 1;
  2966. mIKHandL[i].reset = true;
  2967. mIKHandR[i].ido = 1;
  2968. mIKHandR[i].reset = true;
  2969. }
  2970. else if (ikModeOld[i] == 3 && gHead[i])
  2971. {
  2972. mHead[i].ido = 7;
  2973. mHead[i].reset = true;
  2974. }
  2975. else
  2976. {
  2977. if (!gIKHandL[i])
  2978. {
  2979. SetIKInit5(i);
  2980. }
  2981. gIKHandL[i].transform.position = IKHandL[i].position;
  2982. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2983. mIKHandL[i].maid = maid;
  2984. mIKHandL[i].HandL = IKHandL[i];
  2985. mIKHandL[i].ido = 1;
  2986. gIKHandR[i].transform.position = IKHandR[i].position;
  2987. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2988. mIKHandR[i].maid = maid;
  2989. mIKHandR[i].HandL = IKHandR[i];
  2990. mIKHandR[i].ido = 1;
  2991. if (!gIKMuneL[i])
  2992. {
  2993. SetIKInit7(i);
  2994. }
  2995. if (!gHead[i])
  2996. {
  2997. SetIKInit4(i);
  2998. }
  2999. mIKMuneL[i].maid = maid;
  3000. mIKMuneL[i].HandL = IKMuneLSub[i];
  3001. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3002. mIKMuneL[i].ForearmL = IKMuneL[i];
  3003. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3004. mIKMuneR[i].maid = maid;
  3005. mIKMuneR[i].HandL = IKMuneRSub[i];
  3006. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3007. mIKMuneR[i].ForearmL = IKMuneR[i];
  3008. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3009. gHead[i].transform.position =
  3010. new Vector3(Head2[i].position.x,
  3011. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3012. Head2[i].position.z);
  3013. gHead[i].transform.eulerAngles =
  3014. new Vector3(Head2[i].transform.eulerAngles.x,
  3015. Head2[i].transform.eulerAngles.y,
  3016. Head2[i].transform.eulerAngles.z + 90f);
  3017. mHead[i].head = Head1[i];
  3018. mHead[i].maid = maid;
  3019. mHead[i].ido = 7;
  3020. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3021. gHead[i].SetActive(true);
  3022. if (mHead[i].isClick)
  3023. {
  3024. mHead[i].isClick = false;
  3025. mHead[i].isClick2 = false;
  3026. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3027. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3028. }
  3029. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3030. {
  3031. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3032. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3033. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3034. IKMuneLSub[i].localEulerAngles.y,
  3035. IKMuneLSub[i].localEulerAngles.z);
  3036. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3037. IKMuneL[i].localEulerAngles.y,
  3038. IKMuneL[i].localEulerAngles.z);
  3039. muneIKL[i] = true;
  3040. isStop[i] = true;
  3041. isLock[i] = true;
  3042. mIKMuneL[i].isMouseDrag = false;
  3043. }
  3044. if (mIKMuneL[i].isMouseDown)
  3045. {
  3046. maid.body0.MuneYureL(0f);
  3047. maid.body0.MuneYureR(0f);
  3048. maid.body0.jbMuneL.enabled = false;
  3049. maid.body0.jbMuneR.enabled = false;
  3050. muneIKL[i] = false;
  3051. mIKMuneL[i].isMouseUp = false;
  3052. }
  3053. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3054. {
  3055. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3056. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3057. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3058. IKMuneRSub[i].localEulerAngles.y,
  3059. IKMuneRSub[i].localEulerAngles.z);
  3060. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3061. IKMuneR[i].localEulerAngles.y,
  3062. IKMuneR[i].localEulerAngles.z);
  3063. muneIKR[i] = true;
  3064. isStop[i] = true;
  3065. isLock[i] = true;
  3066. mIKMuneR[i].isMouseDrag = false;
  3067. }
  3068. if (mIKMuneR[i].isMouseDown)
  3069. {
  3070. maid.body0.MuneYureL(0f);
  3071. maid.body0.MuneYureR(0f);
  3072. maid.body0.jbMuneL.enabled = false;
  3073. maid.body0.jbMuneR.enabled = false;
  3074. muneIKR[i] = false;
  3075. mIKMuneL[i].isMouseUp = false;
  3076. }
  3077. if (mHead[i].isStop)
  3078. {
  3079. isStop[i] = true;
  3080. isLock[i] = true;
  3081. mHead[i].isStop = false;
  3082. }
  3083. gJotai[i].SetActive(false);
  3084. gKahuku[i].SetActive(false);
  3085. gHandL[i].SetActive(false);
  3086. gArmL[i].SetActive(false);
  3087. gFootL[i].SetActive(false);
  3088. gHizaL[i].SetActive(false);
  3089. gHandR[i].SetActive(false);
  3090. gArmR[i].SetActive(false);
  3091. gFootR[i].SetActive(false);
  3092. gHizaR[i].SetActive(false);
  3093. gClavicleL[i].SetActive(false);
  3094. gClavicleR[i].SetActive(false);
  3095. gNeck[i].SetActive(false);
  3096. gSpine[i].SetActive(false);
  3097. gSpine0a[i].SetActive(false);
  3098. gSpine1a[i].SetActive(false);
  3099. gSpine1[i].SetActive(false);
  3100. gPelvis[i].SetActive(false);
  3101. }
  3102. }
  3103. else if (ikMode[i] == 15)
  3104. {
  3105. if (ikModeOld[i] == 8 && gIKHandL[i])
  3106. {
  3107. mIKHandL[i].ido = 2;
  3108. mIKHandL[i].reset = true;
  3109. mIKHandR[i].ido = 2;
  3110. mIKHandR[i].reset = true;
  3111. }
  3112. else
  3113. {
  3114. if (!gIKHandL[i])
  3115. {
  3116. SetIKInit5(i);
  3117. }
  3118. gIKHandL[i].transform.position = IKHandL[i].position;
  3119. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3120. mIKHandL[i].maid = maid;
  3121. mIKHandL[i].HandL = IKHandL[i];
  3122. mIKHandL[i].ido = 2;
  3123. gIKHandR[i].transform.position = IKHandR[i].position;
  3124. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3125. mIKHandR[i].maid = maid;
  3126. mIKHandR[i].HandL = IKHandR[i];
  3127. mIKHandR[i].ido = 2;
  3128. Destroy(gHead[i]);
  3129. Destroy(gJotai[i]);
  3130. Destroy(gKahuku[i]);
  3131. gHandL[i].SetActive(false);
  3132. gArmL[i].SetActive(false);
  3133. gFootL[i].SetActive(false);
  3134. gHizaL[i].SetActive(false);
  3135. gHandR[i].SetActive(false);
  3136. gArmR[i].SetActive(false);
  3137. gFootR[i].SetActive(false);
  3138. gHizaR[i].SetActive(false);
  3139. gClavicleL[i].SetActive(false);
  3140. gClavicleR[i].SetActive(false);
  3141. gNeck[i].SetActive(false);
  3142. gSpine[i].SetActive(false);
  3143. gSpine0a[i].SetActive(false);
  3144. gSpine1a[i].SetActive(false);
  3145. gSpine1[i].SetActive(false);
  3146. gPelvis[i].SetActive(false);
  3147. }
  3148. }
  3149. else if (ikMode[i] == 1)
  3150. {
  3151. mHandL[i].ido = 10;
  3152. mHandR[i].ido = 10;
  3153. mFootL[i].ido = 10;
  3154. mFootR[i].ido = 10;
  3155. if (ikModeOld[i] == 0 && gNeck[i])
  3156. {
  3157. if (isBone[i])
  3158. {
  3159. mNeck[i].ido = 4;
  3160. mNeck[i].reset = true;
  3161. mSpine[i].ido = 4;
  3162. mSpine[i].reset = true;
  3163. mSpine0a[i].ido = 4;
  3164. mSpine0a[i].reset = true;
  3165. mSpine1a[i].ido = 4;
  3166. mSpine1a[i].reset = true;
  3167. mSpine1[i].ido = 4;
  3168. mSpine1[i].reset = true;
  3169. mPelvis[i].ido = 4;
  3170. mPelvis[i].reset = true;
  3171. mHizaL[i].ido = 5;
  3172. mHizaL[i].reset = true;
  3173. mHizaR[i].ido = 5;
  3174. mHizaR[i].reset = true;
  3175. }
  3176. }
  3177. else
  3178. {
  3179. gArmL[i].SetActive(false);
  3180. gArmR[i].SetActive(false);
  3181. if (!isBone[i])
  3182. {
  3183. gHizaL[i].SetActive(false);
  3184. gHizaR[i].SetActive(false);
  3185. }
  3186. gClavicleL[i].SetActive(false);
  3187. gClavicleR[i].SetActive(false);
  3188. if (isBone[i])
  3189. {
  3190. mNeck[i].maid = maid;
  3191. mNeck[i].head = Neck[i];
  3192. mNeck[i].no = i;
  3193. mNeck[i].ido = 4;
  3194. gNeck[i].transform.position = Neck[i].position;
  3195. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3196. if (mNeck[i].isHead)
  3197. {
  3198. mNeck[i].isHead = false;
  3199. isLookn[i] = isLook[i];
  3200. isLook[i] = !isLook[i];
  3201. }
  3202. mSpine[i].maid = maid;
  3203. mSpine[i].head = Spine2[i];
  3204. mSpine[i].no = i;
  3205. mSpine[i].ido = 4;
  3206. gSpine[i].transform.position = Spine2[i].position;
  3207. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3208. mSpine0a[i].maid = maid;
  3209. mSpine0a[i].head = Spine0a2[i];
  3210. mSpine0a[i].no = i;
  3211. mSpine0a[i].ido = 4;
  3212. gSpine0a[i].transform.position = Spine0a2[i].position;
  3213. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3214. mSpine1a[i].maid = maid;
  3215. mSpine1a[i].head = Spine1a2[i];
  3216. mSpine1a[i].no = i;
  3217. mSpine1a[i].ido = 4;
  3218. gSpine1a[i].transform.position = Spine1a2[i].position;
  3219. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3220. mSpine1[i].maid = maid;
  3221. mSpine1[i].head = Spine12[i];
  3222. mSpine1[i].no = i;
  3223. mSpine1[i].ido = 4;
  3224. gSpine1[i].transform.position = Spine12[i].position;
  3225. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3226. mPelvis[i].maid = maid;
  3227. mPelvis[i].head = Pelvis2[i];
  3228. mPelvis[i].no = i;
  3229. mPelvis[i].ido = 8;
  3230. gPelvis[i].transform.position = Pelvis2[i].position;
  3231. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3232. mHizaL[i].ido = 5;
  3233. mHizaR[i].ido = 5;
  3234. }
  3235. }
  3236. }
  3237. else if (ikMode[i] == 2)
  3238. {
  3239. if (ikModeOld[i] == 0 && gPelvis[i])
  3240. {
  3241. mPelvis[i].ido = 9;
  3242. mPelvis[i].reset = true;
  3243. }
  3244. else
  3245. {
  3246. gArmL[i].SetActive(false);
  3247. gHizaL[i].SetActive(false);
  3248. gArmR[i].SetActive(false);
  3249. gHizaR[i].SetActive(false);
  3250. gClavicleL[i].SetActive(false);
  3251. gClavicleR[i].SetActive(false);
  3252. gNeck[i].SetActive(false);
  3253. gSpine[i].SetActive(false);
  3254. gSpine0a[i].SetActive(false);
  3255. gSpine1a[i].SetActive(false);
  3256. gSpine1[i].SetActive(false);
  3257. mPelvis[i].maid = maid;
  3258. mPelvis[i].head = Pelvis2[i];
  3259. mPelvis[i].no = i;
  3260. mPelvis[i].ido = 9;
  3261. gPelvis[i].transform.position = Pelvis2[i].position;
  3262. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3263. }
  3264. }
  3265. else if (ikMode[i] == 3)
  3266. {
  3267. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3268. {
  3269. mHead[i].ido = 1;
  3270. mHead[i].reset = true;
  3271. mJotai[i].ido = 2;
  3272. mJotai[i].reset = true;
  3273. mKahuku[i].ido = 3;
  3274. mKahuku[i].reset = true;
  3275. mHandL[i].ido = 1;
  3276. mHandR[i].ido = 1;
  3277. mFootL[i].ido = 3;
  3278. mFootR[i].ido = 3;
  3279. mHizaL[i].ido = 5;
  3280. mHizaR[i].ido = 5;
  3281. mHandL[i].reset = true;
  3282. mHandR[i].reset = true;
  3283. mFootL[i].reset = true;
  3284. mFootR[i].reset = true;
  3285. mHizaL[i].reset = true;
  3286. mHizaR[i].reset = true;
  3287. }
  3288. else if (ikModeOld[i] == 0)
  3289. {
  3290. mHandL[i].ido = 1;
  3291. mHandR[i].ido = 1;
  3292. mFootL[i].ido = 3;
  3293. mFootR[i].ido = 3;
  3294. mHizaL[i].ido = 5;
  3295. mHizaR[i].ido = 5;
  3296. mHandL[i].reset = true;
  3297. mHandR[i].reset = true;
  3298. mFootL[i].reset = true;
  3299. mFootR[i].reset = true;
  3300. mHizaL[i].reset = true;
  3301. mHizaR[i].reset = true;
  3302. }
  3303. else
  3304. {
  3305. if (!gHead[i])
  3306. {
  3307. SetIKInit4(i);
  3308. }
  3309. if (mHead[i].isHead)
  3310. {
  3311. mHead[i].isHead = false;
  3312. isLookn[i] = isLook[i];
  3313. isLook[i] = !isLook[i];
  3314. }
  3315. gHead[i].transform.position =
  3316. new Vector3(Head2[i].position.x,
  3317. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3318. Head2[i].position.z);
  3319. gHead[i].transform.eulerAngles =
  3320. new Vector3(Head2[i].transform.eulerAngles.x,
  3321. Head2[i].transform.eulerAngles.y,
  3322. Head2[i].transform.eulerAngles.z + 90f);
  3323. mHead[i].head = Head1[i];
  3324. mHead[i].maid = maid;
  3325. mHead[i].no = i;
  3326. mHead[i].ido = 1;
  3327. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3328. Transform transform3 =
  3329. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3330. Transform transform4 =
  3331. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3332. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3333. Transform transform6 =
  3334. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3335. gJotai[i].transform.position =
  3336. new Vector3(transform3.position.x,
  3337. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3338. transform3.position.z);
  3339. gJotai[i].transform.eulerAngles =
  3340. new Vector3(transform3.transform.eulerAngles.x,
  3341. transform3.transform.eulerAngles.y,
  3342. transform3.transform.eulerAngles.z + 90f);
  3343. mJotai[i].Spine0a = spine0a;
  3344. mJotai[i].Spine1 = transform3;
  3345. mJotai[i].Spine1a = transform4;
  3346. mJotai[i].Spine = transform5;
  3347. mJotai[i].maid = maid;
  3348. mJotai[i].ido = 2;
  3349. gKahuku[i].transform.position =
  3350. new Vector3(transform6.position.x,
  3351. (transform6.position.y + transform5.position.y) / 2f,
  3352. transform6.position.z);
  3353. gKahuku[i].transform.eulerAngles =
  3354. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3355. transform6.transform.eulerAngles.y + 90f,
  3356. transform6.transform.eulerAngles.z);
  3357. mKahuku[i].Pelvis = transform6;
  3358. mKahuku[i].maid = maid;
  3359. mKahuku[i].ido = 3;
  3360. mHandL[i].ido = 1;
  3361. mHandR[i].ido = 1;
  3362. mFootL[i].ido = 3;
  3363. mFootR[i].ido = 3;
  3364. mHizaL[i].ido = 5;
  3365. mHizaR[i].ido = 5;
  3366. gJotai[i].SetActive(true);
  3367. gKahuku[i].SetActive(true);
  3368. gHandL[i].SetActive(true);
  3369. gArmL[i].SetActive(false);
  3370. gFootL[i].SetActive(true);
  3371. gHizaL[i].SetActive(true);
  3372. gHandR[i].SetActive(true);
  3373. gArmR[i].SetActive(false);
  3374. gFootR[i].SetActive(true);
  3375. gHizaR[i].SetActive(true);
  3376. Destroy(gIKHandL[i]);
  3377. Destroy(gIKHandR[i]);
  3378. Destroy(gIKMuneL[i]);
  3379. Destroy(gIKMuneR[i]);
  3380. if (isBone[i])
  3381. {
  3382. gHizaL[i].SetActive(false);
  3383. gHizaR[i].SetActive(false);
  3384. gHead[i].SetActive(false);
  3385. gJotai[i].SetActive(false);
  3386. gKahuku[i].SetActive(false);
  3387. }
  3388. else
  3389. {
  3390. gHizaL[i].SetActive(true);
  3391. gHizaR[i].SetActive(true);
  3392. gHead[i].SetActive(true);
  3393. gJotai[i].SetActive(true);
  3394. gKahuku[i].SetActive(true);
  3395. }
  3396. gClavicleL[i].SetActive(false);
  3397. gClavicleR[i].SetActive(false);
  3398. gNeck[i].SetActive(false);
  3399. gSpine[i].SetActive(false);
  3400. gSpine0a[i].SetActive(false);
  3401. gSpine1a[i].SetActive(false);
  3402. gSpine1[i].SetActive(false);
  3403. gPelvis[i].SetActive(false);
  3404. if (mHead[i].isStop)
  3405. {
  3406. isStop[i] = true;
  3407. isLock[i] = true;
  3408. mHead[i].isStop = false;
  3409. }
  3410. if (mJotai[i].isStop)
  3411. {
  3412. isStop[i] = true;
  3413. isLock[i] = true;
  3414. mJotai[i].isStop = false;
  3415. }
  3416. if (mKahuku[i].isStop)
  3417. {
  3418. isStop[i] = true;
  3419. isLock[i] = true;
  3420. mKahuku[i].isStop = false;
  3421. }
  3422. if (mKahuku[i].isSelect)
  3423. {
  3424. mKahuku[i].isSelect = false;
  3425. if (ikMaid != i)
  3426. {
  3427. ikMaid = i;
  3428. ikBui = 5;
  3429. SetIK(maid, i);
  3430. }
  3431. }
  3432. if (mJotai[i].isSelect)
  3433. {
  3434. mJotai[i].isSelect = false;
  3435. if (ikMaid != i)
  3436. {
  3437. ikMaid = i;
  3438. ikBui = 5;
  3439. SetIK(maid, i);
  3440. }
  3441. }
  3442. if (mKahuku[i].isSelect)
  3443. {
  3444. mKahuku[i].isSelect = false;
  3445. if (ikMaid != i)
  3446. {
  3447. ikMaid = i;
  3448. ikBui = 5;
  3449. SetIK(maid, i);
  3450. }
  3451. }
  3452. }
  3453. }
  3454. else if (ikMode[i] == 5)
  3455. {
  3456. if (ikModeOld[i] == 3 && gHead[i])
  3457. {
  3458. mHead[i].ido = 4;
  3459. mHead[i].reset = true;
  3460. mJotai[i].ido = 5;
  3461. mJotai[i].reset = true;
  3462. mKahuku[i].ido = 6;
  3463. mKahuku[i].reset = true;
  3464. mHandL[i].ido = 2;
  3465. mHandR[i].ido = 2;
  3466. mFootL[i].ido = 4;
  3467. mFootR[i].ido = 4;
  3468. mHizaL[i].ido = 5;
  3469. mHizaR[i].ido = 5;
  3470. mHandL[i].reset = true;
  3471. mHandR[i].reset = true;
  3472. mFootL[i].reset = true;
  3473. mFootR[i].reset = true;
  3474. mHizaL[i].reset = true;
  3475. mHizaR[i].reset = true;
  3476. }
  3477. else if (ikModeOld[i] == 0)
  3478. {
  3479. mHandL[i].ido = 2;
  3480. mHandR[i].ido = 2;
  3481. mFootL[i].ido = 4;
  3482. mFootR[i].ido = 4;
  3483. mHizaL[i].ido = 5;
  3484. mHizaR[i].ido = 5;
  3485. mHandL[i].reset = true;
  3486. mHandR[i].reset = true;
  3487. mFootL[i].reset = true;
  3488. mFootR[i].reset = true;
  3489. mHizaL[i].reset = true;
  3490. mHizaR[i].reset = true;
  3491. }
  3492. else
  3493. {
  3494. if (!gHead[i])
  3495. {
  3496. SetIKInit4(i);
  3497. }
  3498. if (mHead[i].isHead)
  3499. {
  3500. mHead[i].isHead = false;
  3501. isLookn[i] = isLook[i];
  3502. isLook[i] = !isLook[i];
  3503. }
  3504. gHead[i].transform.position =
  3505. new Vector3(Head2[i].position.x,
  3506. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3507. Head2[i].position.z);
  3508. gHead[i].transform.eulerAngles =
  3509. new Vector3(Head2[i].transform.eulerAngles.x,
  3510. Head2[i].transform.eulerAngles.y,
  3511. Head2[i].transform.eulerAngles.z + 90f);
  3512. mHead[i].head = Head1[i];
  3513. mHead[i].maid = maid;
  3514. mHead[i].ido = 4;
  3515. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3516. Transform transform3 =
  3517. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3518. Transform transform4 =
  3519. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3520. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3521. Transform transform6 =
  3522. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3523. gJotai[i].transform.position =
  3524. new Vector3(transform3.position.x,
  3525. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3526. transform3.position.z);
  3527. gJotai[i].transform.eulerAngles =
  3528. new Vector3(transform3.transform.eulerAngles.x,
  3529. transform3.transform.eulerAngles.y,
  3530. transform3.transform.eulerAngles.z + 90f);
  3531. mJotai[i].Spine0a = spine0a;
  3532. mJotai[i].Spine1 = transform3;
  3533. mJotai[i].Spine1a = transform4;
  3534. mJotai[i].Spine = transform5;
  3535. mJotai[i].maid = maid;
  3536. mJotai[i].ido = 5;
  3537. gKahuku[i].transform.position =
  3538. new Vector3(transform6.position.x,
  3539. (transform6.position.y + transform5.position.y) / 2f,
  3540. transform6.position.z);
  3541. gKahuku[i].transform.eulerAngles =
  3542. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3543. transform6.transform.eulerAngles.y + 90f,
  3544. transform6.transform.eulerAngles.z);
  3545. mKahuku[i].Pelvis = transform6;
  3546. mKahuku[i].maid = maid;
  3547. mKahuku[i].ido = 6;
  3548. mHandL[i].ido = 2;
  3549. mHandR[i].ido = 2;
  3550. mFootL[i].ido = 4;
  3551. mFootR[i].ido = 4;
  3552. mHizaL[i].ido = 5;
  3553. mHizaR[i].ido = 5;
  3554. gArmL[i].SetActive(false);
  3555. gArmR[i].SetActive(false);
  3556. gClavicleL[i].SetActive(false);
  3557. gClavicleR[i].SetActive(false);
  3558. gNeck[i].SetActive(false);
  3559. gSpine[i].SetActive(false);
  3560. gSpine0a[i].SetActive(false);
  3561. gSpine1a[i].SetActive(false);
  3562. gSpine1[i].SetActive(false);
  3563. gPelvis[i].SetActive(false);
  3564. if (isBone[i])
  3565. {
  3566. gHizaL[i].SetActive(false);
  3567. gHizaR[i].SetActive(false);
  3568. gHead[i].SetActive(false);
  3569. gJotai[i].SetActive(false);
  3570. gKahuku[i].SetActive(false);
  3571. }
  3572. else
  3573. {
  3574. gHizaL[i].SetActive(true);
  3575. gHizaR[i].SetActive(true);
  3576. gHead[i].SetActive(true);
  3577. gJotai[i].SetActive(true);
  3578. gKahuku[i].SetActive(true);
  3579. }
  3580. if (mHead[i].isStop)
  3581. {
  3582. isStop[i] = true;
  3583. isLock[i] = true;
  3584. mHead[i].isStop = false;
  3585. }
  3586. if (mJotai[i].isStop)
  3587. {
  3588. isStop[i] = true;
  3589. isLock[i] = true;
  3590. mJotai[i].isStop = false;
  3591. }
  3592. if (mKahuku[i].isStop)
  3593. {
  3594. isStop[i] = true;
  3595. isLock[i] = true;
  3596. mKahuku[i].isStop = false;
  3597. }
  3598. if (mHead[i].isSelect)
  3599. {
  3600. mHead[i].isSelect = false;
  3601. if (ikMaid != i)
  3602. {
  3603. ikMaid = i;
  3604. ikBui = 5;
  3605. SetIK(maid, i);
  3606. }
  3607. }
  3608. if (mJotai[i].isSelect)
  3609. {
  3610. mJotai[i].isSelect = false;
  3611. if (ikMaid != i)
  3612. {
  3613. ikMaid = i;
  3614. ikBui = 5;
  3615. SetIK(maid, i);
  3616. }
  3617. }
  3618. if (mKahuku[i].isSelect)
  3619. {
  3620. mKahuku[i].isSelect = false;
  3621. if (ikMaid != i)
  3622. {
  3623. ikMaid = i;
  3624. ikBui = 5;
  3625. SetIK(maid, i);
  3626. }
  3627. }
  3628. }
  3629. }
  3630. else if (ikMode[i] == 13)
  3631. {
  3632. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3633. {
  3634. mMaid[i].ido = 5;
  3635. mMaid[i].reset = true;
  3636. mMaidC[i].ido = 5;
  3637. mMaidC[i].reset = true;
  3638. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3639. }
  3640. else
  3641. {
  3642. if (!gMaid[i])
  3643. {
  3644. SetIKInit3(i);
  3645. }
  3646. gMaid[i].transform.position =
  3647. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3648. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3649. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3650. gMaid[i].transform.eulerAngles =
  3651. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3652. Spine0a2[i].transform.eulerAngles.y,
  3653. Spine0a2[i].transform.eulerAngles.z + 90f);
  3654. mMaid[i].maid = maid;
  3655. mMaid[i].ido = 5;
  3656. gMaidC[i].transform.position = maid.transform.position;
  3657. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3658. mMaidC[i].maid = maid;
  3659. mMaidC[i].ido = 5;
  3660. if (isCube)
  3661. {
  3662. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3663. gMaidC[i].SetActive(true);
  3664. }
  3665. else
  3666. {
  3667. gMaidC[i].SetActive(false);
  3668. }
  3669. gHandL[i].SetActive(false);
  3670. gArmL[i].SetActive(false);
  3671. gFootL[i].SetActive(false);
  3672. gHizaL[i].SetActive(false);
  3673. gHandR[i].SetActive(false);
  3674. gArmR[i].SetActive(false);
  3675. gFootR[i].SetActive(false);
  3676. gHizaR[i].SetActive(false);
  3677. gClavicleL[i].SetActive(false);
  3678. gClavicleR[i].SetActive(false);
  3679. gNeck[i].SetActive(false);
  3680. gSpine[i].SetActive(false);
  3681. gSpine0a[i].SetActive(false);
  3682. gSpine1a[i].SetActive(false);
  3683. gSpine1[i].SetActive(false);
  3684. gPelvis[i].SetActive(false);
  3685. }
  3686. if (mMaid[i].isSelect)
  3687. {
  3688. mMaid[i].isSelect = false;
  3689. if (ikMaid != i)
  3690. {
  3691. ikMaid = i;
  3692. ikBui = 5;
  3693. SetIK(maid, i);
  3694. }
  3695. }
  3696. }
  3697. else if (ikMode[i] == 11)
  3698. {
  3699. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3700. {
  3701. mMaid[i].ido = 3;
  3702. mMaid[i].reset = true;
  3703. mMaidC[i].ido = 3;
  3704. mMaidC[i].reset = true;
  3705. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3706. }
  3707. else
  3708. {
  3709. if (!gMaid[i])
  3710. {
  3711. SetIKInit3(i);
  3712. }
  3713. gMaid[i].transform.position =
  3714. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3715. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3716. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3717. gMaid[i].transform.eulerAngles =
  3718. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3719. Spine0a2[i].transform.eulerAngles.y,
  3720. Spine0a2[i].transform.eulerAngles.z + 90f);
  3721. mMaid[i].maid = maid;
  3722. mMaid[i].ido = 3;
  3723. gMaidC[i].transform.position = maid.transform.position;
  3724. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3725. mMaidC[i].maid = maid;
  3726. mMaidC[i].ido = 3;
  3727. if (isCube)
  3728. {
  3729. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3730. gMaidC[i].SetActive(true);
  3731. }
  3732. else
  3733. {
  3734. gMaidC[i].SetActive(false);
  3735. }
  3736. gHandL[i].SetActive(false);
  3737. gArmL[i].SetActive(false);
  3738. gFootL[i].SetActive(false);
  3739. gHizaL[i].SetActive(false);
  3740. gHandR[i].SetActive(false);
  3741. gArmR[i].SetActive(false);
  3742. gFootR[i].SetActive(false);
  3743. gHizaR[i].SetActive(false);
  3744. gClavicleL[i].SetActive(false);
  3745. gClavicleR[i].SetActive(false);
  3746. gNeck[i].SetActive(false);
  3747. gSpine[i].SetActive(false);
  3748. gSpine0a[i].SetActive(false);
  3749. gSpine1a[i].SetActive(false);
  3750. gSpine1[i].SetActive(false);
  3751. gPelvis[i].SetActive(false);
  3752. }
  3753. if (mMaid[i].isSelect)
  3754. {
  3755. mMaid[i].isSelect = false;
  3756. if (ikMaid != i)
  3757. {
  3758. ikMaid = i;
  3759. ikBui = 5;
  3760. SetIK(maid, i);
  3761. }
  3762. }
  3763. }
  3764. else if (ikMode[i] == 12)
  3765. {
  3766. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3767. {
  3768. mMaid[i].ido = 2;
  3769. mMaid[i].reset = true;
  3770. mMaidC[i].ido = 2;
  3771. mMaidC[i].reset = true;
  3772. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3773. }
  3774. else
  3775. {
  3776. if (!gMaid[i])
  3777. {
  3778. SetIKInit3(i);
  3779. }
  3780. gMaid[i].transform.position =
  3781. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3782. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3783. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3784. gMaid[i].transform.eulerAngles =
  3785. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3786. Spine0a2[i].transform.eulerAngles.y,
  3787. Spine0a2[i].transform.eulerAngles.z + 90f);
  3788. mMaid[i].maid = maid;
  3789. mMaid[i].ido = 2;
  3790. gMaidC[i].transform.position = maid.transform.position;
  3791. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3792. mMaidC[i].maid = maid;
  3793. mMaidC[i].ido = 2;
  3794. if (isCube)
  3795. {
  3796. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3797. gMaidC[i].SetActive(true);
  3798. }
  3799. else
  3800. {
  3801. gMaidC[i].SetActive(false);
  3802. }
  3803. gHandL[i].SetActive(false);
  3804. gArmL[i].SetActive(false);
  3805. gFootL[i].SetActive(false);
  3806. gHizaL[i].SetActive(false);
  3807. gHandR[i].SetActive(false);
  3808. gArmR[i].SetActive(false);
  3809. gFootR[i].SetActive(false);
  3810. gHizaR[i].SetActive(false);
  3811. gClavicleL[i].SetActive(false);
  3812. gClavicleR[i].SetActive(false);
  3813. gNeck[i].SetActive(false);
  3814. gSpine[i].SetActive(false);
  3815. gSpine0a[i].SetActive(false);
  3816. gSpine1a[i].SetActive(false);
  3817. gSpine1[i].SetActive(false);
  3818. gPelvis[i].SetActive(false);
  3819. }
  3820. if (mMaid[i].isSelect)
  3821. {
  3822. mMaid[i].isSelect = false;
  3823. if (ikMaid != i)
  3824. {
  3825. ikMaid = i;
  3826. ikBui = 5;
  3827. SetIK(maid, i);
  3828. }
  3829. }
  3830. }
  3831. else if (ikMode[i] == 10)
  3832. {
  3833. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3834. {
  3835. mMaid[i].ido = 1;
  3836. mMaid[i].reset = true;
  3837. mMaidC[i].ido = 1;
  3838. mMaidC[i].reset = true;
  3839. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3840. }
  3841. else
  3842. {
  3843. if (!gMaid[i])
  3844. {
  3845. SetIKInit3(i);
  3846. }
  3847. gMaid[i].transform.position =
  3848. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3849. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3850. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3851. gMaid[i].transform.eulerAngles =
  3852. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3853. Spine0a2[i].transform.eulerAngles.y,
  3854. Spine0a2[i].transform.eulerAngles.z + 90f);
  3855. mMaid[i].maid = maid;
  3856. mMaid[i].ido = 1;
  3857. gMaidC[i].transform.position = maid.transform.position;
  3858. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3859. mMaidC[i].maid = maid;
  3860. mMaidC[i].ido = 1;
  3861. if (isCube)
  3862. {
  3863. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3864. gMaidC[i].SetActive(true);
  3865. }
  3866. else
  3867. {
  3868. gMaidC[i].SetActive(false);
  3869. }
  3870. gHandL[i].SetActive(false);
  3871. gArmL[i].SetActive(false);
  3872. gFootL[i].SetActive(false);
  3873. gHizaL[i].SetActive(false);
  3874. gHandR[i].SetActive(false);
  3875. gArmR[i].SetActive(false);
  3876. gFootR[i].SetActive(false);
  3877. gHizaR[i].SetActive(false);
  3878. gClavicleL[i].SetActive(false);
  3879. gClavicleR[i].SetActive(false);
  3880. gNeck[i].SetActive(false);
  3881. gSpine[i].SetActive(false);
  3882. gSpine0a[i].SetActive(false);
  3883. gSpine1a[i].SetActive(false);
  3884. gSpine1[i].SetActive(false);
  3885. gPelvis[i].SetActive(false);
  3886. }
  3887. if (mMaid[i].isSelect)
  3888. {
  3889. mMaid[i].isSelect = false;
  3890. if (ikMaid != i)
  3891. {
  3892. ikMaid = i;
  3893. ikBui = 5;
  3894. SetIK(maid, i);
  3895. }
  3896. }
  3897. }
  3898. else if (ikMode[i] == 9)
  3899. {
  3900. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3901. {
  3902. mMaid[i].ido = 4;
  3903. mMaid[i].reset = true;
  3904. mMaidC[i].ido = 4;
  3905. mMaidC[i].reset = true;
  3906. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3907. }
  3908. else
  3909. {
  3910. if (!gMaid[i])
  3911. {
  3912. SetIKInit3(i);
  3913. }
  3914. gMaid[i].transform.position =
  3915. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3916. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3917. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3918. gMaid[i].transform.eulerAngles =
  3919. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3920. Spine0a2[i].transform.eulerAngles.y,
  3921. Spine0a2[i].transform.eulerAngles.z + 90f);
  3922. mMaid[i].maid = maid;
  3923. mMaid[i].ido = 4;
  3924. gMaidC[i].transform.position = maid.transform.position;
  3925. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3926. mMaidC[i].maid = maid;
  3927. mMaidC[i].ido = 4;
  3928. if (isCube)
  3929. {
  3930. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3931. gMaidC[i].SetActive(true);
  3932. }
  3933. else
  3934. {
  3935. gMaidC[i].SetActive(false);
  3936. }
  3937. gHandL[i].SetActive(false);
  3938. gArmL[i].SetActive(false);
  3939. gFootL[i].SetActive(false);
  3940. gHizaL[i].SetActive(false);
  3941. gHandR[i].SetActive(false);
  3942. gArmR[i].SetActive(false);
  3943. gFootR[i].SetActive(false);
  3944. gHizaR[i].SetActive(false);
  3945. gClavicleL[i].SetActive(false);
  3946. gClavicleR[i].SetActive(false);
  3947. gNeck[i].SetActive(false);
  3948. gSpine[i].SetActive(false);
  3949. gSpine0a[i].SetActive(false);
  3950. gSpine1a[i].SetActive(false);
  3951. gSpine1[i].SetActive(false);
  3952. gPelvis[i].SetActive(false);
  3953. }
  3954. if (mMaid[i].isSelect)
  3955. {
  3956. mMaid[i].isSelect = false;
  3957. if (ikMaid != i)
  3958. {
  3959. ikMaid = i;
  3960. ikBui = 5;
  3961. SetIK(maid, i);
  3962. }
  3963. }
  3964. }
  3965. else if (ikMode[i] == 14)
  3966. {
  3967. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3968. {
  3969. mMaid[i].ido = 6;
  3970. mMaid[i].reset = true;
  3971. mMaidC[i].ido = 6;
  3972. mMaidC[i].reset = true;
  3973. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3974. }
  3975. else
  3976. {
  3977. if (!gMaid[i])
  3978. {
  3979. SetIKInit3(i);
  3980. }
  3981. gMaid[i].transform.position =
  3982. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3983. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3984. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3985. gMaid[i].transform.eulerAngles =
  3986. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3987. Spine0a2[i].transform.eulerAngles.y,
  3988. Spine0a2[i].transform.eulerAngles.z + 90f);
  3989. mMaid[i].maid = maid;
  3990. mMaid[i].ido = 6;
  3991. gMaidC[i].transform.position = maid.transform.position;
  3992. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3993. mMaidC[i].maid = maid;
  3994. mMaidC[i].ido = 6;
  3995. if (isCube)
  3996. {
  3997. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3998. gMaidC[i].SetActive(true);
  3999. }
  4000. else
  4001. {
  4002. gMaidC[i].SetActive(false);
  4003. }
  4004. gHandL[i].SetActive(false);
  4005. gArmL[i].SetActive(false);
  4006. gFootL[i].SetActive(false);
  4007. gHizaL[i].SetActive(false);
  4008. gHandR[i].SetActive(false);
  4009. gArmR[i].SetActive(false);
  4010. gFootR[i].SetActive(false);
  4011. gHizaR[i].SetActive(false);
  4012. gClavicleL[i].SetActive(false);
  4013. gClavicleR[i].SetActive(false);
  4014. gNeck[i].SetActive(false);
  4015. gSpine[i].SetActive(false);
  4016. gSpine0a[i].SetActive(false);
  4017. gSpine1a[i].SetActive(false);
  4018. gSpine1[i].SetActive(false);
  4019. gPelvis[i].SetActive(false);
  4020. }
  4021. if (mMaid[i].isSelect)
  4022. {
  4023. mMaid[i].isSelect = false;
  4024. if (ikMaid != i)
  4025. {
  4026. ikMaid = i;
  4027. ikBui = 5;
  4028. SetIK(maid, i);
  4029. }
  4030. }
  4031. }
  4032. else if (ikMode[i] == 6)
  4033. {
  4034. if (!gFinger[i, 0])
  4035. {
  4036. SetIKInit2(i);
  4037. }
  4038. Destroy(gMaid[i]);
  4039. Destroy(gMaidC[i]);
  4040. Destroy(gHead[i]);
  4041. Destroy(gJotai[i]);
  4042. Destroy(gKahuku[i]);
  4043. gHandL[i].SetActive(false);
  4044. gArmL[i].SetActive(false);
  4045. gFootL[i].SetActive(false);
  4046. gHizaL[i].SetActive(false);
  4047. gHandR[i].SetActive(false);
  4048. gArmR[i].SetActive(false);
  4049. gFootR[i].SetActive(false);
  4050. gHizaR[i].SetActive(false);
  4051. gClavicleL[i].SetActive(false);
  4052. gClavicleR[i].SetActive(false);
  4053. gNeck[i].SetActive(false);
  4054. gSpine[i].SetActive(false);
  4055. gSpine0a[i].SetActive(false);
  4056. gSpine1a[i].SetActive(false);
  4057. gSpine1[i].SetActive(false);
  4058. gPelvis[i].SetActive(false);
  4059. for (int j = 0; j < 10; j++)
  4060. {
  4061. mFinger[i, j * 3 + 2].maid = maid;
  4062. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4063. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4064. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4065. mFinger[i, j * 3 + 2].ido = 12;
  4066. if (j == 0 || j == 5)
  4067. {
  4068. mFinger[i, j * 3 + 2].ido = 15;
  4069. }
  4070. mFinger[i, j * 3 + 1].maid = maid;
  4071. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4073. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4074. mFinger[i, j * 3 + 1].ido = 11;
  4075. if (j == 0 || j == 5)
  4076. {
  4077. mFinger[i, j * 3 + 1].ido = 14;
  4078. }
  4079. mFinger[i, j * 3].maid = maid;
  4080. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4082. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4083. mFinger[i, j * 3].ido = 13;
  4084. if (j == 0 || j == 5)
  4085. {
  4086. mFinger[i, j * 3].ido = 0;
  4087. }
  4088. gFinger[i, j * 3 + 2].SetActive(false);
  4089. gFinger[i, j * 3 + 1].SetActive(false);
  4090. gFinger[i, j * 3].SetActive(true);
  4091. gFinger[i, j * 3].SetActive(true);
  4092. mFinger[i, j * 3].ido = 16;
  4093. if (ikModeOld[i] != 6)
  4094. {
  4095. mFinger[i, j * 3].reset = true;
  4096. }
  4097. gFinger[i, j * 3 + 2].transform.position =
  4098. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4099. + Finger[i, j * 4 + 2].position) / 3f;
  4100. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4101. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4102. if (mFinger[i, j * 3 + 2].isStop)
  4103. {
  4104. isStop[i] = true;
  4105. isLock[i] = true;
  4106. mFinger[i, j * 3 + 2].isStop = false;
  4107. }
  4108. if (mFinger[i, j * 3 + 1].isStop)
  4109. {
  4110. isStop[i] = true;
  4111. isLock[i] = true;
  4112. mFinger[i, j * 3 + 1].isStop = false;
  4113. }
  4114. if (mFinger[i, j * 3].isStop)
  4115. {
  4116. isStop[i] = true;
  4117. isLock[i] = true;
  4118. mFinger[i, j * 3].isStop = false;
  4119. }
  4120. }
  4121. for (int j = 0; j < 6; j++)
  4122. {
  4123. mFinger2[i, j * 2 + 1].maid = maid;
  4124. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4125. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4126. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4127. mFinger2[i, j * 2 + 1].ido = 0;
  4128. mFinger2[i, j * 2].maid = maid;
  4129. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4130. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4131. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4132. mFinger2[i, j * 2].ido = 0;
  4133. gFinger2[i, j * 2 + 1].SetActive(false);
  4134. gFinger2[i, j * 2].SetActive(false);
  4135. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4136. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4137. if (mFinger2[i, j * 2 + 1].isStop)
  4138. {
  4139. isStop[i] = true;
  4140. isLock[i] = true;
  4141. mFinger2[i, j * 2 + 1].isStop = false;
  4142. }
  4143. if (mFinger2[i, j * 2].isStop)
  4144. {
  4145. isStop[i] = true;
  4146. isLock[i] = true;
  4147. mFinger2[i, j * 2].isStop = false;
  4148. }
  4149. }
  4150. }
  4151. else if (ikMode[i] == 4)
  4152. {
  4153. if (!gFinger[i, 0])
  4154. {
  4155. SetIKInit2(i);
  4156. }
  4157. Destroy(gMaid[i]);
  4158. Destroy(gMaidC[i]);
  4159. Destroy(gHead[i]);
  4160. Destroy(gJotai[i]);
  4161. Destroy(gKahuku[i]);
  4162. gHandL[i].SetActive(false);
  4163. gArmL[i].SetActive(false);
  4164. gFootL[i].SetActive(false);
  4165. gHizaL[i].SetActive(false);
  4166. gHandR[i].SetActive(false);
  4167. gArmR[i].SetActive(false);
  4168. gFootR[i].SetActive(false);
  4169. gHizaR[i].SetActive(false);
  4170. gClavicleL[i].SetActive(false);
  4171. gClavicleR[i].SetActive(false);
  4172. gNeck[i].SetActive(false);
  4173. gSpine[i].SetActive(false);
  4174. gSpine0a[i].SetActive(false);
  4175. gSpine1a[i].SetActive(false);
  4176. gSpine1[i].SetActive(false);
  4177. gPelvis[i].SetActive(false);
  4178. for (int j = 0; j < 10; j++)
  4179. {
  4180. mFinger[i, j * 3 + 2].maid = maid;
  4181. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4182. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4183. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4184. mFinger[i, j * 3 + 2].ido = 12;
  4185. mFinger[i, j * 3 + 2].onFlg = true;
  4186. if (j == 0 || j == 5)
  4187. {
  4188. mFinger[i, j * 3 + 2].ido = 15;
  4189. }
  4190. mFinger[i, j * 3 + 1].maid = maid;
  4191. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4192. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4193. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4194. mFinger[i, j * 3 + 1].ido = 11;
  4195. mFinger[i, j * 3 + 1].onFlg = true;
  4196. if (j == 0 || j == 5)
  4197. {
  4198. mFinger[i, j * 3 + 1].ido = 14;
  4199. }
  4200. mFinger[i, j * 3].maid = maid;
  4201. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4202. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4203. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4204. mFinger[i, j * 3].ido = 13;
  4205. mFinger[i, j * 3].onFlg = true;
  4206. if (j == 0 || j == 5)
  4207. {
  4208. mFinger[i, j * 3].ido = 0;
  4209. }
  4210. if (ikModeOld[i] != 4)
  4211. {
  4212. mFinger[i, j * 3].reset = true;
  4213. }
  4214. gFinger[i, j * 3 + 2].SetActive(true);
  4215. gFinger[i, j * 3 + 1].SetActive(true);
  4216. gFinger[i, j * 3].SetActive(true);
  4217. gFinger[i, j * 3 + 2].transform.position =
  4218. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4219. + Finger[i, j * 4 + 2].position) / 3f;
  4220. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4221. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4222. if (mFinger[i, j * 3 + 2].isStop)
  4223. {
  4224. isStop[i] = true;
  4225. isLock[i] = true;
  4226. mFinger[i, j * 3 + 2].isStop = false;
  4227. }
  4228. if (mFinger[i, j * 3 + 1].isStop)
  4229. {
  4230. isStop[i] = true;
  4231. isLock[i] = true;
  4232. mFinger[i, j * 3 + 1].isStop = false;
  4233. }
  4234. if (mFinger[i, j * 3].isStop)
  4235. {
  4236. isStop[i] = true;
  4237. isLock[i] = true;
  4238. mFinger[i, j * 3].isStop = false;
  4239. }
  4240. }
  4241. for (int j = 0; j < 6; j++)
  4242. {
  4243. mFinger2[i, j * 2 + 1].maid = maid;
  4244. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4245. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4246. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4247. mFinger2[i, j * 2 + 1].ido = 17;
  4248. mFinger2[i, j * 2].maid = maid;
  4249. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4250. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4251. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4252. mFinger2[i, j * 2].ido = 0;
  4253. gFinger2[i, j * 2 + 1].SetActive(true);
  4254. gFinger2[i, j * 2].SetActive(true);
  4255. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4256. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4257. if (mFinger2[i, j * 2 + 1].isStop)
  4258. {
  4259. isStop[i] = true;
  4260. isLock[i] = true;
  4261. mFinger2[i, j * 2 + 1].isStop = false;
  4262. }
  4263. if (mFinger2[i, j * 2].isStop)
  4264. {
  4265. isStop[i] = true;
  4266. isLock[i] = true;
  4267. mFinger2[i, j * 2].isStop = false;
  4268. }
  4269. }
  4270. }
  4271. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4272. {
  4273. mHandL[i].ido = 0;
  4274. mHandR[i].ido = 0;
  4275. mFootL[i].ido = 0;
  4276. mFootR[i].ido = 0;
  4277. mHizaL[i].ido = 0;
  4278. mHizaR[i].ido = 0;
  4279. mHandL[i].reset = true;
  4280. mHandR[i].reset = true;
  4281. mFootL[i].reset = true;
  4282. mFootR[i].reset = true;
  4283. mHizaL[i].reset = true;
  4284. mHizaR[i].reset = true;
  4285. }
  4286. else
  4287. {
  4288. if (gFinger[i, 0])
  4289. {
  4290. for (int j = 0; j < 30; j++)
  4291. {
  4292. gFinger[i, j].SetActive(false);
  4293. }
  4294. for (int j = 0; j < 12; j++)
  4295. {
  4296. gFinger2[i, j].SetActive(false);
  4297. }
  4298. }
  4299. Destroy(gHead[i]);
  4300. Destroy(gJotai[i]);
  4301. Destroy(gKahuku[i]);
  4302. Destroy(gIKHandL[i]);
  4303. Destroy(gIKHandR[i]);
  4304. Destroy(gIKMuneL[i]);
  4305. Destroy(gIKMuneR[i]);
  4306. Destroy(gHead2[i]);
  4307. Destroy(gMaid2[i]);
  4308. gHandL[i].SetActive(true);
  4309. gArmL[i].SetActive(true);
  4310. gFootL[i].SetActive(true);
  4311. gHizaL[i].SetActive(true);
  4312. gHandR[i].SetActive(true);
  4313. gArmR[i].SetActive(true);
  4314. gFootR[i].SetActive(true);
  4315. gHizaR[i].SetActive(true);
  4316. mHandL[i].ido = 0;
  4317. mHandR[i].ido = 0;
  4318. mFootL[i].ido = 0;
  4319. mFootR[i].ido = 0;
  4320. gClavicleL[i].SetActive(true);
  4321. gClavicleR[i].SetActive(true);
  4322. }
  4323. if (!isIK[i])
  4324. {
  4325. gHandL[i].SetActive(false);
  4326. gArmL[i].SetActive(false);
  4327. gFootL[i].SetActive(false);
  4328. gHizaL[i].SetActive(false);
  4329. gHandR[i].SetActive(false);
  4330. gArmR[i].SetActive(false);
  4331. gFootR[i].SetActive(false);
  4332. gHizaR[i].SetActive(false);
  4333. gClavicleL[i].SetActive(false);
  4334. gClavicleR[i].SetActive(false);
  4335. gNeck[i].SetActive(false);
  4336. gSpine[i].SetActive(false);
  4337. gSpine0a[i].SetActive(false);
  4338. gSpine1a[i].SetActive(false);
  4339. gSpine1[i].SetActive(false);
  4340. gPelvis[i].SetActive(false);
  4341. }
  4342. if (isIK[i])
  4343. {
  4344. mHandL[i].maid = maid;
  4345. mHandL[i].HandL = HandL1[i];
  4346. if (ikMode[i] == 2)
  4347. {
  4348. mHandL[i].UpperArmL = ForearmL1[i];
  4349. }
  4350. else
  4351. {
  4352. mHandL[i].UpperArmL = UpperArmL1[i];
  4353. if (ikModeOld[i] == 2 && isLock[i])
  4354. {
  4355. mHandL[i].OnMouseDown();
  4356. mHandL[i].isSelect = false;
  4357. }
  4358. }
  4359. mHandL[i].ForearmL = ForearmL1[i];
  4360. mArmL[i].maid = maid;
  4361. mArmL[i].HandL = ForearmL1[i];
  4362. mArmL[i].UpperArmL = UpperArmL1[i];
  4363. mArmL[i].ForearmL = UpperArmL1[i];
  4364. mArmL[i].onFlg = true;
  4365. if (mArmL[i].onFlg2)
  4366. {
  4367. mArmL[i].onFlg2 = false;
  4368. mHandL[i].initFlg = false;
  4369. }
  4370. if (ikMode[i] == 2)
  4371. {
  4372. mHandL[i].initFlg = false;
  4373. mHandR[i].initFlg = false;
  4374. mFootL[i].initFlg = false;
  4375. mFootR[i].initFlg = false;
  4376. mHandL[i].onFlg = true;
  4377. mHandR[i].onFlg = true;
  4378. mFootL[i].onFlg = true;
  4379. mFootR[i].onFlg = true;
  4380. }
  4381. else
  4382. {
  4383. mHandL[i].onFlg = false;
  4384. mHandR[i].onFlg = false;
  4385. mFootL[i].onFlg = false;
  4386. mFootR[i].onFlg = false;
  4387. }
  4388. gHandL[i].transform.position = HandL1[i].position;
  4389. gArmL[i].transform.position = ForearmL1[i].position;
  4390. mClavicleL[i].maid = maid;
  4391. mClavicleL[i].HandL = UpperArmL1[i];
  4392. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4393. mClavicleL[i].ForearmL = ClavicleL1[i];
  4394. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4395. if (mHandL[i].isStop)
  4396. {
  4397. isStop[i] = true;
  4398. isLock[i] = true;
  4399. mHandL[i].isStop = false;
  4400. }
  4401. if (mArmL[i].isStop)
  4402. {
  4403. isStop[i] = true;
  4404. isLock[i] = true;
  4405. mArmL[i].isStop = false;
  4406. }
  4407. if (mClavicleL[i].isStop)
  4408. {
  4409. isStop[i] = true;
  4410. isLock[i] = true;
  4411. mClavicleL[i].isStop = false;
  4412. }
  4413. mHandR[i].maid = maid;
  4414. mHandR[i].HandL = HandR1[i];
  4415. if (ikMode[i] == 2)
  4416. {
  4417. mHandR[i].UpperArmL = ForearmR1[i];
  4418. }
  4419. else
  4420. {
  4421. mHandR[i].UpperArmL = UpperArmR1[i];
  4422. if (ikModeOld[i] == 2 && isLock[i])
  4423. {
  4424. mHandR[i].OnMouseDown();
  4425. mHandR[i].isSelect = false;
  4426. }
  4427. }
  4428. mHandR[i].ForearmL = ForearmR1[i];
  4429. mArmR[i].maid = maid;
  4430. mArmR[i].HandL = ForearmR1[i];
  4431. mArmR[i].UpperArmL = UpperArmR1[i];
  4432. mArmR[i].ForearmL = UpperArmR1[i];
  4433. mArmR[i].onFlg = true;
  4434. if (mArmR[i].onFlg2)
  4435. {
  4436. mArmR[i].onFlg2 = false;
  4437. mHandR[i].initFlg = false;
  4438. }
  4439. gHandR[i].transform.position = HandR1[i].position;
  4440. gArmR[i].transform.position = ForearmR1[i].position;
  4441. mClavicleR[i].maid = maid;
  4442. mClavicleR[i].HandL = UpperArmR1[i];
  4443. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4444. mClavicleR[i].ForearmL = ClavicleR1[i];
  4445. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4446. if (mHandR[i].isStop)
  4447. {
  4448. isStop[i] = true;
  4449. isLock[i] = true;
  4450. mHandR[i].isStop = false;
  4451. }
  4452. if (mArmR[i].isStop)
  4453. {
  4454. isStop[i] = true;
  4455. isLock[i] = true;
  4456. mArmR[i].isStop = false;
  4457. }
  4458. if (mClavicleL[i].isStop)
  4459. {
  4460. isStop[i] = true;
  4461. isLock[i] = true;
  4462. mClavicleL[i].isStop = false;
  4463. }
  4464. mFootL[i].maid = maid;
  4465. mFootL[i].HandL = HandL2[i];
  4466. if (ikMode[i] == 2)
  4467. {
  4468. mFootL[i].UpperArmL = ForearmL2[i];
  4469. }
  4470. else
  4471. {
  4472. mFootL[i].UpperArmL = UpperArmL2[i];
  4473. if (ikModeOld[i] == 2 && isLock[i])
  4474. {
  4475. mFootL[i].OnMouseDown();
  4476. mFootL[i].isSelect = false;
  4477. }
  4478. }
  4479. mFootL[i].ForearmL = ForearmL2[i];
  4480. mHizaL[i].maid = maid;
  4481. mHizaL[i].HandL = ForearmL2[i];
  4482. mHizaL[i].UpperArmL = UpperArmL2[i];
  4483. mHizaL[i].ForearmL = UpperArmL2[i];
  4484. mHizaL[i].onFlg = true;
  4485. if (mHizaL[i].onFlg2)
  4486. {
  4487. mHizaL[i].onFlg2 = false;
  4488. mFootL[i].initFlg = false;
  4489. }
  4490. gFootL[i].transform.position = HandL2[i].position;
  4491. gHizaL[i].transform.position = ForearmL2[i].position;
  4492. if (mFootL[i].isStop)
  4493. {
  4494. isStop[i] = true;
  4495. isLock[i] = true;
  4496. mFootL[i].isStop = false;
  4497. }
  4498. if (mHizaL[i].isStop)
  4499. {
  4500. isStop[i] = true;
  4501. isLock[i] = true;
  4502. mHizaL[i].isStop = false;
  4503. }
  4504. mFootR[i].maid = maid;
  4505. mFootR[i].HandL = HandR2[i];
  4506. if (ikMode[i] == 2)
  4507. {
  4508. mFootR[i].UpperArmL = ForearmR2[i];
  4509. }
  4510. else
  4511. {
  4512. mFootR[i].UpperArmL = UpperArmR2[i];
  4513. if (ikModeOld[i] == 2 && isLock[i])
  4514. {
  4515. mFootR[i].OnMouseDown();
  4516. mFootR[i].isSelect = false;
  4517. }
  4518. }
  4519. mFootR[i].ForearmL = ForearmR2[i];
  4520. mHizaR[i].maid = maid;
  4521. mHizaR[i].HandL = ForearmR2[i];
  4522. mHizaR[i].UpperArmL = UpperArmR2[i];
  4523. mHizaR[i].ForearmL = UpperArmR2[i];
  4524. mHizaR[i].onFlg = true;
  4525. if (mHizaR[i].onFlg2)
  4526. {
  4527. mHizaR[i].onFlg2 = false;
  4528. mFootR[i].initFlg = false;
  4529. }
  4530. gFootR[i].transform.position = HandR2[i].position;
  4531. gHizaR[i].transform.position = ForearmR2[i].position;
  4532. if (mFootR[i].isStop)
  4533. {
  4534. isStop[i] = true;
  4535. isLock[i] = true;
  4536. mFootR[i].isStop = false;
  4537. }
  4538. if (mHizaR[i].isStop)
  4539. {
  4540. isStop[i] = true;
  4541. isLock[i] = true;
  4542. mHizaR[i].isStop = false;
  4543. }
  4544. bool flag13 = false;
  4545. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4546. || ikModeOld[i] == 14)
  4547. {
  4548. flag13 = true;
  4549. }
  4550. if (isBone[i])
  4551. {
  4552. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4553. || isChange[i])
  4554. {
  4555. float gizmoSizeSpine = 0.2f;
  4556. gizmoNeck[i].Visible = false;
  4557. gizmoFootL[i].Visible = false;
  4558. gizmoHandR[i].Visible = false;
  4559. gizmoHandL[i].Visible = false;
  4560. gizmoFootR[i].Visible = false;
  4561. gizmoPelvis[i].Visible = false;
  4562. if (ikMode[i] == 2 || ikMode[i] == 1)
  4563. {
  4564. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4565. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4566. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4567. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4568. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4569. if (ikMode[i] == 2)
  4570. {
  4571. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4572. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4573. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4574. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4575. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4576. if (isDragging)
  4577. {
  4578. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4579. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4580. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4581. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4582. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4583. }
  4584. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4585. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4586. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4587. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4588. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4589. gizmoNeck[i].Visible = true;
  4590. gizmoHandL[i].Visible = true;
  4591. gizmoHandR[i].Visible = true;
  4592. gizmoFootL[i].Visible = true;
  4593. gizmoFootR[i].Visible = true;
  4594. gNeck[i].SetActive(false);
  4595. gSpine[i].SetActive(false);
  4596. gSpine0a[i].SetActive(false);
  4597. gSpine1[i].SetActive(false);
  4598. gSpine1a[i].SetActive(false);
  4599. }
  4600. else
  4601. {
  4602. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4603. if (isDragging)
  4604. {
  4605. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4606. }
  4607. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4608. gizmoPelvis[i].Visible = true;
  4609. gPelvis[i].SetActive(false);
  4610. }
  4611. if (!isLock[i])
  4612. {
  4613. if (isDragging)
  4614. {
  4615. isStop[i] = true;
  4616. isLock[i] = true;
  4617. }
  4618. }
  4619. }
  4620. }
  4621. else
  4622. {
  4623. float gizmoSizeLimb = 0.25f;
  4624. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4625. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4626. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4627. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4628. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4629. if (ikMode[i] == 3)
  4630. {
  4631. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4632. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4633. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4634. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4635. if (isDragging)
  4636. {
  4637. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4638. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4639. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4640. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4641. }
  4642. else
  4643. {
  4644. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4645. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4646. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4647. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4648. }
  4649. }
  4650. else if (ikMode[i] == 5)
  4651. {
  4652. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4653. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4654. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4655. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4656. if (isDragging)
  4657. {
  4658. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4659. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4660. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4661. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4662. flag13 = true;
  4663. }
  4664. else
  4665. {
  4666. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4667. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4668. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4669. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4670. }
  4671. }
  4672. else if (ikMode[i] == 8)
  4673. {
  4674. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4675. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4676. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4677. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4678. if (isDragging)
  4679. {
  4680. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4681. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4682. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4683. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4684. flag13 = true;
  4685. }
  4686. else
  4687. {
  4688. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4689. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4690. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4691. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4692. }
  4693. }
  4694. gizmoHandL[i].Visible = true;
  4695. gizmoHandR[i].Visible = true;
  4696. gizmoFootL[i].Visible = true;
  4697. gizmoFootR[i].Visible = true;
  4698. gHandL[i].SetActive(false);
  4699. gFootL[i].SetActive(false);
  4700. gHandR[i].SetActive(false);
  4701. gFootR[i].SetActive(false);
  4702. if (!isLock[i])
  4703. {
  4704. if (isDragging)
  4705. {
  4706. isStop[i] = true;
  4707. isLock[i] = true;
  4708. }
  4709. }
  4710. }
  4711. if (isChange[i])
  4712. {
  4713. isChange[i] = false;
  4714. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4715. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4716. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4717. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4718. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4719. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4720. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4721. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gHandL[i].GetComponent<Renderer>().enabled = true;
  4725. gHandR[i].GetComponent<Renderer>().enabled = true;
  4726. gArmL[i].GetComponent<Renderer>().enabled = true;
  4727. gArmR[i].GetComponent<Renderer>().enabled = true;
  4728. gFootL[i].GetComponent<Renderer>().enabled = true;
  4729. gFootR[i].GetComponent<Renderer>().enabled = true;
  4730. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4731. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4732. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4733. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4734. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4735. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4736. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4737. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4738. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4739. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4740. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4741. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4742. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4743. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4744. }
  4745. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4746. {
  4747. mNeck[i].ido = 1;
  4748. mNeck[i].reset = true;
  4749. mSpine[i].ido = 1;
  4750. mSpine[i].reset = true;
  4751. mSpine0a[i].ido = 1;
  4752. mSpine0a[i].reset = true;
  4753. mSpine1a[i].ido = 1;
  4754. mSpine1a[i].reset = true;
  4755. mSpine1[i].ido = 1;
  4756. mSpine1[i].reset = true;
  4757. mPelvis[i].ido = 1;
  4758. mPelvis[i].reset = true;
  4759. }
  4760. else if (ikMode[i] == 0)
  4761. {
  4762. gNeck[i].SetActive(true);
  4763. gSpine[i].SetActive(true);
  4764. gSpine0a[i].SetActive(true);
  4765. gSpine1a[i].SetActive(true);
  4766. gSpine1[i].SetActive(true);
  4767. gPelvis[i].SetActive(true);
  4768. if (mNeck[i].isHead)
  4769. {
  4770. mNeck[i].isHead = false;
  4771. isLookn[i] = isLook[i];
  4772. isLook[i] = !isLook[i];
  4773. }
  4774. mNeck[i].maid = maid;
  4775. mNeck[i].head = Neck[i];
  4776. mNeck[i].no = i;
  4777. mNeck[i].ido = 1;
  4778. gNeck[i].transform.position = Neck[i].position;
  4779. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4780. mSpine[i].maid = maid;
  4781. mSpine[i].head = Spine2[i];
  4782. mSpine[i].no = i;
  4783. mSpine[i].ido = 1;
  4784. gSpine[i].transform.position = Spine2[i].position;
  4785. gSpine[i].transform.eulerAngles =
  4786. new Vector3(Spine2[i].localEulerAngles.z,
  4787. Spine2[i].localEulerAngles.y,
  4788. Spine2[i].localEulerAngles.x);
  4789. mSpine0a[i].maid = maid;
  4790. mSpine0a[i].head = Spine0a2[i];
  4791. mSpine0a[i].no = i;
  4792. mSpine0a[i].ido = 1;
  4793. gSpine0a[i].transform.position = Spine0a2[i].position;
  4794. gSpine0a[i].transform.eulerAngles =
  4795. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4796. Spine0a2[i].localEulerAngles.x,
  4797. Spine0a2[i].localEulerAngles.y);
  4798. mSpine1a[i].maid = maid;
  4799. mSpine1a[i].head = Spine1a2[i];
  4800. mSpine1a[i].no = i;
  4801. mSpine1a[i].ido = 1;
  4802. gSpine1a[i].transform.position = Spine1a2[i].position;
  4803. gSpine1a[i].transform.localEulerAngles =
  4804. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4805. Spine1a2[i].localEulerAngles.x,
  4806. Spine1a2[i].localEulerAngles.y);
  4807. mSpine1[i].maid = maid;
  4808. mSpine1[i].head = Spine12[i];
  4809. mSpine1[i].no = i;
  4810. mSpine1[i].ido = 1;
  4811. gSpine1[i].transform.position = Spine12[i].position;
  4812. gSpine1[i].transform.localEulerAngles =
  4813. new Vector3(-Spine12[i].localEulerAngles.z,
  4814. Spine12[i].localEulerAngles.x,
  4815. Spine12[i].localEulerAngles.y);
  4816. mPelvis[i].maid = maid;
  4817. mPelvis[i].head = Pelvis2[i];
  4818. mPelvis[i].no = i;
  4819. mPelvis[i].ido = 1;
  4820. gPelvis[i].transform.position = Pelvis2[i].position;
  4821. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4822. if (mNeck[i].isIdo)
  4823. {
  4824. mNeck[i].isIdo = false;
  4825. isLock[i] = true;
  4826. }
  4827. if (mSpine[i].isIdo)
  4828. {
  4829. mSpine[i].isIdo = false;
  4830. flag13 = true;
  4831. isLock[i] = true;
  4832. }
  4833. if (mSpine0a[i].isIdo)
  4834. {
  4835. mSpine0a[i].isIdo = false;
  4836. flag13 = true;
  4837. isLock[i] = true;
  4838. }
  4839. if (mSpine1a[i].isIdo)
  4840. {
  4841. mSpine1a[i].isIdo = false;
  4842. flag13 = true;
  4843. isLock[i] = true;
  4844. }
  4845. if (mSpine1[i].isIdo)
  4846. {
  4847. mSpine1[i].isIdo = false;
  4848. flag13 = true;
  4849. isLock[i] = true;
  4850. }
  4851. if (mPelvis[i].isIdo)
  4852. {
  4853. mPelvis[i].isIdo = false;
  4854. flag13 = true;
  4855. isLock[i] = true;
  4856. }
  4857. if (mClavicleL[i].isIdo)
  4858. {
  4859. mClavicleL[i].isIdo = false;
  4860. flag13 = true;
  4861. isLock[i] = true;
  4862. }
  4863. if (mClavicleR[i].isIdo)
  4864. {
  4865. mClavicleR[i].isIdo = false;
  4866. flag13 = true;
  4867. isLock[i] = true;
  4868. }
  4869. }
  4870. }
  4871. else if (isChange[i])
  4872. {
  4873. isChange[i] = false;
  4874. gHandL[i].GetComponent<Renderer>().enabled = false;
  4875. gArmL[i].GetComponent<Renderer>().enabled = false;
  4876. gFootL[i].GetComponent<Renderer>().enabled = false;
  4877. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4878. gHandR[i].GetComponent<Renderer>().enabled = false;
  4879. gArmR[i].GetComponent<Renderer>().enabled = false;
  4880. gFootR[i].GetComponent<Renderer>().enabled = false;
  4881. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4882. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4883. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4884. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4885. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4886. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4887. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4888. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4889. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4890. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4891. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4892. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4893. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4894. gNeck[i].SetActive(false);
  4895. gSpine[i].SetActive(false);
  4896. gSpine0a[i].SetActive(false);
  4897. gSpine1a[i].SetActive(false);
  4898. gSpine1[i].SetActive(false);
  4899. gPelvis[i].SetActive(false);
  4900. gizmoHandL[i].Visible = false;
  4901. gizmoHandR[i].Visible = false;
  4902. gizmoFootL[i].Visible = false;
  4903. gizmoFootR[i].Visible = false;
  4904. }
  4905. if (flag13)
  4906. {
  4907. mHandL[i].initFlg = false;
  4908. mHandR[i].initFlg = false;
  4909. mFootL[i].initFlg = false;
  4910. mFootR[i].initFlg = false;
  4911. }
  4912. }
  4913. ikModeOld[i] = ikMode[i];
  4914. bool flag14 = false;
  4915. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4916. {
  4917. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4918. {
  4919. for (int k = 0; k < 10; k++)
  4920. {
  4921. maid.transform.RotateAround(maid.transform.position,
  4922. Vector3.right,
  4923. -maid.transform.rotation.eulerAngles.x);
  4924. maid.transform.RotateAround(maid.transform.position,
  4925. Vector3.forward,
  4926. -maid.transform.rotation.eulerAngles.z);
  4927. }
  4928. flag14 = true;
  4929. }
  4930. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4931. {
  4932. maid.transform.RotateAround(maid.transform.position,
  4933. new Vector3(vector3.x, 0f, vector3.z),
  4934. 0.3f);
  4935. maid.transform.RotateAround(maid.transform.position,
  4936. new Vector3(vector2.x, 0f, vector2.z),
  4937. 0.3f);
  4938. flag14 = true;
  4939. }
  4940. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4941. {
  4942. maid.transform.RotateAround(maid.transform.position,
  4943. new Vector3(vector3.x, 0f, vector3.z),
  4944. 0.3f);
  4945. maid.transform.RotateAround(maid.transform.position,
  4946. new Vector3(vector2.x, 0f, vector2.z),
  4947. -0.3f);
  4948. flag14 = true;
  4949. }
  4950. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4951. {
  4952. maid.transform.RotateAround(maid.transform.position,
  4953. new Vector3(vector3.x, 0f, vector3.z),
  4954. -0.3f);
  4955. maid.transform.RotateAround(maid.transform.position,
  4956. new Vector3(vector2.x, 0f, vector2.z),
  4957. 0.3f);
  4958. flag14 = true;
  4959. }
  4960. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4961. {
  4962. maid.transform.RotateAround(maid.transform.position,
  4963. new Vector3(vector3.x, 0f, vector3.z),
  4964. -0.3f);
  4965. maid.transform.RotateAround(maid.transform.position,
  4966. new Vector3(vector2.x, 0f, vector2.z),
  4967. -0.3f);
  4968. flag14 = true;
  4969. }
  4970. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4971. {
  4972. maid.transform.RotateAround(maid.transform.position,
  4973. new Vector3(vector3.x, 0f, vector3.z),
  4974. 0.4f);
  4975. flag14 = true;
  4976. }
  4977. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4978. {
  4979. maid.transform.RotateAround(maid.transform.position,
  4980. new Vector3(vector3.x, 0f, vector3.z),
  4981. -0.4f);
  4982. flag14 = true;
  4983. }
  4984. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4985. {
  4986. maid.transform.RotateAround(maid.transform.position,
  4987. new Vector3(vector2.x, 0f, vector2.z),
  4988. 0.4f);
  4989. flag14 = true;
  4990. }
  4991. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4992. {
  4993. maid.transform.RotateAround(maid.transform.position,
  4994. new Vector3(vector2.x, 0f, vector2.z),
  4995. -0.4f);
  4996. flag14 = true;
  4997. }
  4998. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4999. {
  5000. maid.body0.transform.localRotation =
  5001. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5002. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5003. flag14 = true;
  5004. }
  5005. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5006. {
  5007. maid.body0.transform.localRotation =
  5008. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5009. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5010. flag14 = true;
  5011. }
  5012. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5013. {
  5014. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5015. flag14 = true;
  5016. }
  5017. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5018. {
  5019. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5020. flag14 = true;
  5021. }
  5022. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5023. {
  5024. Vector3 vector = maid.transform.position;
  5025. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5026. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5027. maid.SetPos(vector);
  5028. flag14 = true;
  5029. }
  5030. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5031. {
  5032. Vector3 vector = maid.transform.position;
  5033. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5034. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5035. maid.SetPos(vector);
  5036. flag14 = true;
  5037. }
  5038. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5039. {
  5040. Vector3 vector = maid.transform.position;
  5041. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5042. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5043. maid.SetPos(vector);
  5044. flag14 = true;
  5045. }
  5046. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5047. {
  5048. Vector3 vector = maid.transform.position;
  5049. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5050. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5051. maid.SetPos(vector);
  5052. flag14 = true;
  5053. }
  5054. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5055. {
  5056. Vector3 vector = maid.transform.position;
  5057. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5058. maid.SetPos(vector);
  5059. flag14 = true;
  5060. }
  5061. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5062. {
  5063. Vector3 vector = maid.transform.position;
  5064. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5065. maid.SetPos(vector);
  5066. flag14 = true;
  5067. }
  5068. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5069. {
  5070. Vector3 vector = maid.transform.position;
  5071. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5072. maid.SetPos(vector);
  5073. flag14 = true;
  5074. }
  5075. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5076. {
  5077. Vector3 vector = maid.transform.position;
  5078. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5079. maid.SetPos(vector);
  5080. flag14 = true;
  5081. }
  5082. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5083. {
  5084. Vector3 vector = maid.transform.position;
  5085. vector.y += 0.0075f * speed;
  5086. maid.SetPos(vector);
  5087. flag14 = true;
  5088. }
  5089. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5090. {
  5091. Vector3 vector = maid.transform.position;
  5092. vector.y -= 0.0075f * speed;
  5093. maid.SetPos(vector);
  5094. flag14 = true;
  5095. }
  5096. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5097. {
  5098. maid.transform.localScale =
  5099. new Vector3(maid.transform.localScale.x * 1.005f,
  5100. maid.transform.localScale.y * 1.005f,
  5101. maid.transform.localScale.z * 1.005f);
  5102. flag14 = true;
  5103. }
  5104. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5105. {
  5106. maid.transform.localScale =
  5107. new Vector3(maid.transform.localScale.x * 0.995f,
  5108. maid.transform.localScale.y * 0.995f,
  5109. maid.transform.localScale.z * 0.995f);
  5110. flag14 = true;
  5111. }
  5112. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5113. {
  5114. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5115. flag14 = true;
  5116. }
  5117. }
  5118. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5119. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5120. && i == ikMaid)
  5121. {
  5122. if (Input.GetKey(KeyCode.I))
  5123. {
  5124. if (ikMode[i] == 0)
  5125. {
  5126. Vector3 vector5 = HandL.position;
  5127. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5128. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5129. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5130. }
  5131. else if (ikMode[i] == 2)
  5132. {
  5133. Vector3 vector5 = HandL.position;
  5134. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5135. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5136. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5137. }
  5138. else if (ikMode[i] == 3)
  5139. {
  5140. if (ikBui == 1 || ikBui == 2)
  5141. {
  5142. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5143. }
  5144. else
  5145. {
  5146. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5147. }
  5148. }
  5149. else if (ikMode[i] == 4)
  5150. {
  5151. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5152. }
  5153. else if (ikMode[i] == 8)
  5154. {
  5155. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5156. }
  5157. else if (ikMode[i] == 6)
  5158. {
  5159. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5160. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5161. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5162. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5163. }
  5164. else if (ikMode[i] == 7)
  5165. {
  5166. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5167. }
  5168. else if (ikMode[i] == 5)
  5169. {
  5170. Vector3 vector5 = ForearmL.position;
  5171. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5172. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5173. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5174. }
  5175. else
  5176. {
  5177. Vector3 vector5 = ForearmL.position;
  5178. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5179. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5180. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5181. }
  5182. isStop[i] = true;
  5183. isLock[i] = true;
  5184. }
  5185. else if (Input.GetKey(KeyCode.K))
  5186. {
  5187. if (ikMode[i] == 0)
  5188. {
  5189. Vector3 vector5 = HandL.position;
  5190. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5191. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5192. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5193. }
  5194. else if (ikMode[i] == 2)
  5195. {
  5196. Vector3 vector5 = HandL.position;
  5197. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5198. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5199. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5200. }
  5201. else if (ikMode[i] == 3)
  5202. {
  5203. if (ikBui == 1 || ikBui == 2)
  5204. {
  5205. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5206. }
  5207. else
  5208. {
  5209. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5210. }
  5211. }
  5212. else if (ikMode[i] == 4)
  5213. {
  5214. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5215. }
  5216. else if (ikMode[i] == 8)
  5217. {
  5218. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5219. }
  5220. else if (ikMode[i] == 6)
  5221. {
  5222. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5223. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5224. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5225. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5226. }
  5227. else if (ikMode[i] == 7)
  5228. {
  5229. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5230. }
  5231. else if (ikMode[i] == 5)
  5232. {
  5233. Vector3 vector5 = ForearmL.position;
  5234. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5235. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5236. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5237. }
  5238. else
  5239. {
  5240. Vector3 vector5 = ForearmL.position;
  5241. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5242. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5243. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5244. }
  5245. isStop[i] = true;
  5246. isLock[i] = true;
  5247. }
  5248. else if (Input.GetKey(KeyCode.J))
  5249. {
  5250. if (ikMode[i] == 0)
  5251. {
  5252. Vector3 vector5 = HandL.position;
  5253. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5254. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5255. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5256. }
  5257. else if (ikMode[i] == 2)
  5258. {
  5259. Vector3 vector5 = HandL.position;
  5260. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5261. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5262. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5263. }
  5264. else if (ikMode[i] == 3)
  5265. {
  5266. if (ikBui == 1 || ikBui == 2)
  5267. {
  5268. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5269. }
  5270. else
  5271. {
  5272. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5273. }
  5274. }
  5275. else if (ikMode[i] == 4)
  5276. {
  5277. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5278. }
  5279. else if (ikMode[i] == 8)
  5280. {
  5281. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5282. }
  5283. else if (ikMode[i] == 6)
  5284. {
  5285. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5286. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5287. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5288. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5289. }
  5290. else if (ikMode[i] == 7)
  5291. {
  5292. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5293. }
  5294. else if (ikMode[i] == 5)
  5295. {
  5296. Vector3 vector5 = ForearmL.position;
  5297. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5298. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5299. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5300. }
  5301. else
  5302. {
  5303. Vector3 vector5 = ForearmL.position;
  5304. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5305. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5306. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5307. }
  5308. isStop[i] = true;
  5309. isLock[i] = true;
  5310. }
  5311. else if (Input.GetKey(KeyCode.L))
  5312. {
  5313. if (ikMode[i] == 0)
  5314. {
  5315. Vector3 vector5 = HandL.position;
  5316. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5317. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5318. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5319. }
  5320. else if (ikMode[i] == 2)
  5321. {
  5322. Vector3 vector5 = HandL.position;
  5323. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5324. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5325. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5326. }
  5327. else if (ikMode[i] == 3)
  5328. {
  5329. if (ikBui == 1 || ikBui == 2)
  5330. {
  5331. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5332. }
  5333. else
  5334. {
  5335. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5336. }
  5337. }
  5338. else if (ikMode[i] == 4)
  5339. {
  5340. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5341. }
  5342. else if (ikMode[i] == 8)
  5343. {
  5344. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5345. }
  5346. else if (ikMode[i] == 6)
  5347. {
  5348. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5349. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5350. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5351. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5352. }
  5353. else if (ikMode[i] == 7)
  5354. {
  5355. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5356. }
  5357. else if (ikMode[i] == 5)
  5358. {
  5359. Vector3 vector5 = ForearmL.position;
  5360. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5361. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5362. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5363. }
  5364. else
  5365. {
  5366. Vector3 vector5 = ForearmL.position;
  5367. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5368. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5369. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5370. }
  5371. isStop[i] = true;
  5372. isLock[i] = true;
  5373. }
  5374. else if (Input.GetKey(KeyCode.U))
  5375. {
  5376. if (ikMode[i] == 3)
  5377. {
  5378. HandL.localRotation =
  5379. Quaternion.Euler(HandL.localEulerAngles)
  5380. * Quaternion.AngleAxis(1f, Vector3.right);
  5381. isStop[i] = true;
  5382. isLock[i] = true;
  5383. }
  5384. else if (ikMode[i] == 4)
  5385. {
  5386. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5387. isStop[i] = true;
  5388. isLock[i] = true;
  5389. }
  5390. else if (ikMode[i] == 8)
  5391. {
  5392. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5393. isStop[i] = true;
  5394. isLock[i] = true;
  5395. }
  5396. else if (ikMode[i] == 6)
  5397. {
  5398. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5399. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5400. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5401. isStop[i] = true;
  5402. isLock[i] = true;
  5403. }
  5404. else if (ikMode[i] == 7)
  5405. {
  5406. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5407. isStop[i] = true;
  5408. isLock[i] = true;
  5409. }
  5410. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5411. {
  5412. UpperArmL.localRotation =
  5413. Quaternion.Euler(UpperArmL.localEulerAngles)
  5414. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5415. isStop[i] = true;
  5416. isLock[i] = true;
  5417. }
  5418. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5419. {
  5420. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5421. isStop[i] = true;
  5422. isLock[i] = true;
  5423. }
  5424. }
  5425. else if (Input.GetKey(KeyCode.O))
  5426. {
  5427. if (ikMode[i] == 3)
  5428. {
  5429. HandL.localRotation =
  5430. Quaternion.Euler(HandL.localEulerAngles)
  5431. * Quaternion.AngleAxis(-1f, Vector3.right);
  5432. isStop[i] = true;
  5433. isLock[i] = true;
  5434. }
  5435. else if (ikMode[i] == 4)
  5436. {
  5437. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5438. isStop[i] = true;
  5439. isLock[i] = true;
  5440. }
  5441. else if (ikMode[i] == 8)
  5442. {
  5443. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5444. isStop[i] = true;
  5445. isLock[i] = true;
  5446. }
  5447. else if (ikMode[i] == 6)
  5448. {
  5449. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5450. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5451. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5452. isStop[i] = true;
  5453. isLock[i] = true;
  5454. }
  5455. else if (ikMode[i] == 7)
  5456. {
  5457. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5458. isStop[i] = true;
  5459. isLock[i] = true;
  5460. }
  5461. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5462. {
  5463. UpperArmL.localRotation =
  5464. Quaternion.Euler(UpperArmL.localEulerAngles)
  5465. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5466. isStop[i] = true;
  5467. isLock[i] = true;
  5468. }
  5469. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5470. {
  5471. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5472. isStop[i] = true;
  5473. isLock[i] = true;
  5474. }
  5475. }
  5476. else if (Input.GetKey(KeyCode.Alpha0))
  5477. {
  5478. if (ikMode[i] == 0)
  5479. {
  5480. Vector3 vector5 = HandL.position;
  5481. vector5.y += 0.005f;
  5482. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5483. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5484. }
  5485. else if (ikMode[i] == 2)
  5486. {
  5487. Vector3 vector5 = HandL.position;
  5488. vector5.y += 0.005f;
  5489. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5490. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5491. }
  5492. else if (ikMode[i] == 5)
  5493. {
  5494. Vector3 vector5 = ForearmL.position;
  5495. vector5.y += 0.0035f;
  5496. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5497. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5498. }
  5499. else
  5500. {
  5501. Vector3 vector5 = ForearmL.position;
  5502. vector5.y += 0.0035f;
  5503. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5504. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5505. }
  5506. isStop[i] = true;
  5507. isLock[i] = true;
  5508. }
  5509. else if (Input.GetKey(KeyCode.P))
  5510. {
  5511. if (ikMode[i] == 0)
  5512. {
  5513. Vector3 vector5 = HandL.position;
  5514. vector5.y -= 0.005f;
  5515. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5516. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5517. }
  5518. else if (ikMode[i] == 2)
  5519. {
  5520. Vector3 vector5 = HandL.position;
  5521. vector5.y -= 0.005f;
  5522. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5523. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5524. }
  5525. else if (ikMode[i] == 5)
  5526. {
  5527. Vector3 vector5 = ForearmL.position;
  5528. vector5.y -= 0.0035f;
  5529. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5530. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5531. }
  5532. else
  5533. {
  5534. Vector3 vector5 = ForearmL.position;
  5535. vector5.y -= 0.0035f;
  5536. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5537. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5538. }
  5539. isStop[i] = true;
  5540. isLock[i] = true;
  5541. }
  5542. }
  5543. }
  5544. }
  5545. }
  5546. }
  5547. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5548. {
  5549. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5550. idoFlg[i] = true;
  5551. }
  5552. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5553. {
  5554. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5555. idoFlg[i] = true;
  5556. }
  5557. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5558. {
  5559. if (!xFlg[i])
  5560. {
  5561. xFlg[i] = true;
  5562. zFlg[i] = false;
  5563. if (maid.status.personal.uniqueName == "Pride")
  5564. {
  5565. string text = "s0_";
  5566. Random random = new Random();
  5567. int num4 = random.Next(10000);
  5568. bool flag7 = false;
  5569. for (int k = 0; k < tunArray.Length; k++)
  5570. {
  5571. if (tunArray[k] == num4)
  5572. {
  5573. flag7 = true;
  5574. break;
  5575. }
  5576. }
  5577. if (!flag7)
  5578. {
  5579. text = text + "0" + num4.ToString() + ".ogg";
  5580. if (GameUty.FileSystem.IsExistentFile(text))
  5581. {
  5582. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5583. }
  5584. }
  5585. }
  5586. if (maid.status.personal.uniqueName == "Cool")
  5587. {
  5588. string text = "s1_";
  5589. Random random = new Random();
  5590. int num4 = random.Next(10000);
  5591. bool flag7 = false;
  5592. for (int k = 0; k < coolArray.Length; k++)
  5593. {
  5594. if (coolArray[k] == num4)
  5595. {
  5596. flag7 = true;
  5597. break;
  5598. }
  5599. }
  5600. if (!flag7)
  5601. {
  5602. text = text + "0" + num4.ToString() + ".ogg";
  5603. if (GameUty.FileSystem.IsExistentFile(text))
  5604. {
  5605. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5606. }
  5607. }
  5608. }
  5609. if (maid.status.personal.uniqueName == "Pure")
  5610. {
  5611. string text = "s2_";
  5612. Random random = new Random();
  5613. int num4 = random.Next(10000);
  5614. bool flag7 = false;
  5615. for (int k = 0; k < pureArray.Length; k++)
  5616. {
  5617. if (pureArray[k] == num4)
  5618. {
  5619. flag7 = true;
  5620. break;
  5621. }
  5622. }
  5623. if (!flag7)
  5624. {
  5625. text = text + "0" + num4.ToString() + ".ogg";
  5626. if (GameUty.FileSystem.IsExistentFile(text))
  5627. {
  5628. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5629. }
  5630. }
  5631. }
  5632. if (maid.status.personal.uniqueName == "Yandere")
  5633. {
  5634. string text = "s3_";
  5635. Random random = new Random();
  5636. int num4 = random.Next(10000);
  5637. bool flag7 = false;
  5638. for (int k = 0; k < yanArray.Length; k++)
  5639. {
  5640. if (yanArray[k] == num4)
  5641. {
  5642. flag7 = true;
  5643. break;
  5644. }
  5645. }
  5646. if (!flag7)
  5647. {
  5648. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5649. if (GameUty.FileSystem.IsExistentFile(text))
  5650. {
  5651. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5652. }
  5653. }
  5654. }
  5655. if (maid.status.personal.uniqueName == "Muku")
  5656. {
  5657. string text = "h0_";
  5658. Random random = new Random();
  5659. int num4 = random.Next(10000);
  5660. bool flag7 = false;
  5661. for (int k = 0; k < h0Array.Length; k++)
  5662. {
  5663. if (h0Array[k] == num4)
  5664. {
  5665. flag7 = true;
  5666. break;
  5667. }
  5668. }
  5669. if (flag7)
  5670. {
  5671. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5672. if (GameUty.FileSystem.IsExistentFile(text))
  5673. {
  5674. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5675. }
  5676. }
  5677. }
  5678. if (maid.status.personal.uniqueName == "Majime")
  5679. {
  5680. string text = "h1_";
  5681. Random random = new Random();
  5682. int num4 = random.Next(10000);
  5683. bool flag7 = false;
  5684. for (int k = 0; k < h1Array.Length; k++)
  5685. {
  5686. if (h1Array[k] == num4)
  5687. {
  5688. flag7 = true;
  5689. break;
  5690. }
  5691. }
  5692. if (flag7)
  5693. {
  5694. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5695. if (GameUty.FileSystem.IsExistentFile(text))
  5696. {
  5697. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5698. }
  5699. }
  5700. }
  5701. if (maid.status.personal.uniqueName == "Rindere")
  5702. {
  5703. string text = "h2_";
  5704. Random random = new Random();
  5705. int num4 = random.Next(10000);
  5706. bool flag7 = false;
  5707. for (int k = 0; k < h2Array.Length; k++)
  5708. {
  5709. if (h2Array[k] == num4)
  5710. {
  5711. flag7 = true;
  5712. break;
  5713. }
  5714. }
  5715. if (flag7)
  5716. {
  5717. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5718. if (GameUty.FileSystem.IsExistentFile(text))
  5719. {
  5720. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5721. }
  5722. }
  5723. }
  5724. }
  5725. else
  5726. {
  5727. xFlg[i] = false;
  5728. maid.AudioMan.Clear();
  5729. }
  5730. idoFlg[i] = true;
  5731. }
  5732. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5733. {
  5734. if (!zFlg[i])
  5735. {
  5736. zFlg[i] = true;
  5737. xFlg[i] = false;
  5738. string text = "";
  5739. if (maid.status.personal.uniqueName == "Pride")
  5740. {
  5741. text = "s0_";
  5742. Random random = new Random();
  5743. int num4 = random.Next(tunArray.Length);
  5744. object obj = text;
  5745. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5746. }
  5747. if (maid.status.personal.uniqueName == "Cool")
  5748. {
  5749. text = "s1_";
  5750. Random random = new Random();
  5751. int num4 = random.Next(coolArray.Length);
  5752. object obj = text;
  5753. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5754. }
  5755. if (maid.status.personal.uniqueName == "Pure")
  5756. {
  5757. text = "s2_";
  5758. Random random = new Random();
  5759. int num4 = random.Next(pureArray.Length);
  5760. object obj = text;
  5761. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5762. }
  5763. if (maid.status.personal.uniqueName == "Yandere")
  5764. {
  5765. text = "s3_";
  5766. Random random = new Random();
  5767. int num4 = random.Next(yanArray.Length);
  5768. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5769. }
  5770. if (maid.status.personal.uniqueName == "Muku")
  5771. {
  5772. text = "h0_";
  5773. Random random = new Random();
  5774. int num4 = random.Next(h0tArray.Length);
  5775. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5776. }
  5777. if (maid.status.personal.uniqueName == "Majime")
  5778. {
  5779. text = "h1_";
  5780. Random random = new Random();
  5781. int num4 = random.Next(h1tArray.Length);
  5782. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5783. }
  5784. if (maid.status.personal.uniqueName == "Rindere")
  5785. {
  5786. text = "h2_";
  5787. Random random = new Random();
  5788. int num4 = random.Next(h2tArray.Length);
  5789. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5790. }
  5791. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5792. }
  5793. else
  5794. {
  5795. zFlg[i] = false;
  5796. maid.AudioMan.Clear();
  5797. }
  5798. idoFlg[i] = true;
  5799. }
  5800. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5801. {
  5802. string text = "";
  5803. if (maid.status.personal.uniqueName == "Pride")
  5804. {
  5805. text = "s0_";
  5806. Random random = new Random();
  5807. int num4 = random.Next(tunArray.Length);
  5808. object obj = text;
  5809. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5810. }
  5811. if (maid.status.personal.uniqueName == "Cool")
  5812. {
  5813. text = "s1_";
  5814. Random random = new Random();
  5815. int num4 = random.Next(coolArray.Length);
  5816. object obj = text;
  5817. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5818. }
  5819. if (maid.status.personal.uniqueName == "Pure")
  5820. {
  5821. text = "s2_";
  5822. Random random = new Random();
  5823. int num4 = random.Next(pureArray.Length);
  5824. object obj = text;
  5825. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5826. }
  5827. if (maid.status.personal.uniqueName == "Yandere")
  5828. {
  5829. text = "s3_";
  5830. Random random = new Random();
  5831. int num4 = random.Next(yanArray.Length);
  5832. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5833. }
  5834. if (maid.status.personal.uniqueName == "Muku")
  5835. {
  5836. text = "h0_";
  5837. Random random = new Random();
  5838. int num4 = random.Next(h0tArray.Length);
  5839. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5840. }
  5841. if (maid.status.personal.uniqueName == "Majime")
  5842. {
  5843. text = "h1_";
  5844. Random random = new Random();
  5845. int num4 = random.Next(h1tArray.Length);
  5846. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5847. }
  5848. if (maid.status.personal.uniqueName == "Rindere")
  5849. {
  5850. text = "h2_";
  5851. Random random = new Random();
  5852. int num4 = random.Next(h2tArray.Length);
  5853. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5854. }
  5855. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5856. idoFlg[i] = true;
  5857. }
  5858. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5859. {
  5860. if (maid.status.personal.uniqueName == "Pride")
  5861. {
  5862. string text = "s0_";
  5863. Random random = new Random();
  5864. int num4 = random.Next(10000);
  5865. bool flag7 = false;
  5866. for (int k = 0; k < tunArray.Length; k++)
  5867. {
  5868. if (tunArray[k] == num4)
  5869. {
  5870. flag7 = true;
  5871. break;
  5872. }
  5873. }
  5874. if (!flag7)
  5875. {
  5876. text = text + "0" + num4.ToString() + ".ogg";
  5877. if (GameUty.FileSystem.IsExistentFile(text))
  5878. {
  5879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5880. }
  5881. }
  5882. }
  5883. if (maid.status.personal.uniqueName == "Cool")
  5884. {
  5885. string text = "s1_";
  5886. Random random = new Random();
  5887. int num4 = random.Next(10000);
  5888. bool flag7 = false;
  5889. for (int k = 0; k < coolArray.Length; k++)
  5890. {
  5891. if (coolArray[k] == num4)
  5892. {
  5893. flag7 = true;
  5894. break;
  5895. }
  5896. }
  5897. if (!flag7)
  5898. {
  5899. text = text + "0" + num4.ToString() + ".ogg";
  5900. if (GameUty.FileSystem.IsExistentFile(text))
  5901. {
  5902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5903. }
  5904. }
  5905. }
  5906. if (maid.status.personal.uniqueName == "Pure")
  5907. {
  5908. string text = "s2_";
  5909. Random random = new Random();
  5910. int num4 = random.Next(10000);
  5911. bool flag7 = false;
  5912. for (int k = 0; k < pureArray.Length; k++)
  5913. {
  5914. if (pureArray[k] == num4)
  5915. {
  5916. flag7 = true;
  5917. break;
  5918. }
  5919. }
  5920. if (!flag7)
  5921. {
  5922. text = text + "0" + num4.ToString() + ".ogg";
  5923. if (GameUty.FileSystem.IsExistentFile(text))
  5924. {
  5925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5926. }
  5927. }
  5928. }
  5929. if (maid.status.personal.uniqueName == "Yandere")
  5930. {
  5931. string text = "s3_";
  5932. Random random = new Random();
  5933. int num4 = random.Next(10000);
  5934. bool flag7 = false;
  5935. for (int k = 0; k < yanArray.Length; k++)
  5936. {
  5937. if (yanArray[k] == num4)
  5938. {
  5939. flag7 = true;
  5940. break;
  5941. }
  5942. }
  5943. if (!flag7)
  5944. {
  5945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5946. if (GameUty.FileSystem.IsExistentFile(text))
  5947. {
  5948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5949. }
  5950. }
  5951. }
  5952. if (maid.status.personal.uniqueName == "Muku")
  5953. {
  5954. string text = "h0_";
  5955. Random random = new Random();
  5956. int num4 = random.Next(10000);
  5957. bool flag7 = false;
  5958. for (int k = 0; k < h0Array.Length; k++)
  5959. {
  5960. if (h0Array[k] == num4)
  5961. {
  5962. flag7 = true;
  5963. break;
  5964. }
  5965. }
  5966. if (flag7)
  5967. {
  5968. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5969. if (GameUty.FileSystem.IsExistentFile(text))
  5970. {
  5971. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5972. }
  5973. }
  5974. }
  5975. if (maid.status.personal.uniqueName == "Majime")
  5976. {
  5977. string text = "h1_";
  5978. Random random = new Random();
  5979. int num4 = random.Next(10000);
  5980. bool flag7 = false;
  5981. for (int k = 0; k < h1Array.Length; k++)
  5982. {
  5983. if (h1Array[k] == num4)
  5984. {
  5985. flag7 = true;
  5986. break;
  5987. }
  5988. }
  5989. if (flag7)
  5990. {
  5991. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5992. if (GameUty.FileSystem.IsExistentFile(text))
  5993. {
  5994. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5995. }
  5996. }
  5997. }
  5998. if (maid.status.personal.uniqueName == "Rindere")
  5999. {
  6000. string text = "h2_";
  6001. Random random = new Random();
  6002. int num4 = random.Next(10000);
  6003. bool flag7 = false;
  6004. for (int k = 0; k < h2Array.Length; k++)
  6005. {
  6006. if (h2Array[k] == num4)
  6007. {
  6008. flag7 = true;
  6009. break;
  6010. }
  6011. }
  6012. if (flag7)
  6013. {
  6014. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6015. if (GameUty.FileSystem.IsExistentFile(text))
  6016. {
  6017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6018. }
  6019. }
  6020. }
  6021. idoFlg[i] = true;
  6022. }
  6023. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6024. {
  6025. Vector3 vector = maid.transform.position;
  6026. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6027. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6028. maid.SetPos(vector);
  6029. idoFlg[i] = true;
  6030. }
  6031. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6032. {
  6033. Vector3 vector = maid.transform.position;
  6034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6035. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6036. maid.SetPos(vector);
  6037. idoFlg[i] = true;
  6038. }
  6039. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6040. {
  6041. Vector3 vector = maid.transform.position;
  6042. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6043. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6044. maid.SetPos(vector);
  6045. idoFlg[i] = true;
  6046. }
  6047. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6048. {
  6049. Vector3 vector = maid.transform.position;
  6050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6051. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6052. maid.SetPos(vector);
  6053. idoFlg[i] = true;
  6054. }
  6055. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6056. {
  6057. Vector3 vector = maid.transform.position;
  6058. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6059. maid.SetPos(vector);
  6060. idoFlg[i] = true;
  6061. }
  6062. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6063. {
  6064. Vector3 vector = maid.transform.position;
  6065. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6066. maid.SetPos(vector);
  6067. idoFlg[i] = true;
  6068. }
  6069. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6070. {
  6071. Vector3 vector = maid.transform.position;
  6072. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6073. maid.SetPos(vector);
  6074. idoFlg[i] = true;
  6075. }
  6076. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6077. {
  6078. Vector3 vector = maid.transform.position;
  6079. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6080. maid.SetPos(vector);
  6081. idoFlg[i] = true;
  6082. }
  6083. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6084. {
  6085. Vector3 vector = maid.transform.position;
  6086. vector.y += 0.0075f * speed;
  6087. maid.SetPos(vector);
  6088. idoFlg[i] = true;
  6089. }
  6090. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6091. {
  6092. Vector3 vector = maid.transform.position;
  6093. vector.y -= 0.0075f * speed;
  6094. maid.SetPos(vector);
  6095. idoFlg[i] = true;
  6096. }
  6097. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6098. {
  6099. faceIndex[i]--;
  6100. if (faceIndex[i] <= -1)
  6101. {
  6102. faceIndex[i] = faceArray.Length - 1;
  6103. }
  6104. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6105. idoFlg[i] = true;
  6106. }
  6107. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6108. {
  6109. faceIndex[i]++;
  6110. if (faceIndex[i] == faceArray.Length)
  6111. {
  6112. faceIndex[i] = 0;
  6113. }
  6114. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6115. idoFlg[i] = true;
  6116. }
  6117. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6118. {
  6119. faceBlendIndex[i]++;
  6120. if (faceBlendIndex[i] == faceBlendArray.Length)
  6121. {
  6122. faceBlendIndex[i] = 0;
  6123. }
  6124. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6125. idoFlg[i] = true;
  6126. }
  6127. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6128. {
  6129. idoFlg[i] = true;
  6130. if (i >= 7)
  6131. {
  6132. idoFlg[i - 7] = true;
  6133. }
  6134. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6135. maid.transform.localScale.y * 1.005f,
  6136. maid.transform.localScale.z * 1.005f);
  6137. }
  6138. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6139. {
  6140. idoFlg[i] = true;
  6141. if (i >= 7)
  6142. {
  6143. idoFlg[i - 7] = true;
  6144. }
  6145. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6146. maid.transform.localScale.y * 0.995f,
  6147. maid.transform.localScale.z * 0.995f);
  6148. }
  6149. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6150. {
  6151. idoFlg[i] = true;
  6152. if (i >= 7)
  6153. {
  6154. idoFlg[i - 7] = true;
  6155. }
  6156. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6159. {
  6160. if (!isVR)
  6161. {
  6162. if (goSlot[(int)selectList[i]] != null)
  6163. {
  6164. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6165. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6166. {
  6167. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6168. }
  6169. }
  6170. }
  6171. maid.body0.SetMask(TBody.SlotID.wear, true);
  6172. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6173. maid.body0.SetMask(TBody.SlotID.bra, true);
  6174. maid.body0.SetMask(TBody.SlotID.panz, true);
  6175. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6176. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6177. isWear = true;
  6178. isSkirt = true;
  6179. isBra = true;
  6180. isPanz = true;
  6181. Random random = new Random();
  6182. int num4 = random.Next(2);
  6183. if (num4 == 1)
  6184. {
  6185. maid.body0.SetMask(TBody.SlotID.wear, false);
  6186. }
  6187. if (num4 == 1)
  6188. {
  6189. isWear = false;
  6190. }
  6191. num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isSkirt = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.bra, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isBra = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.panz, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isPanz = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6222. }
  6223. num4 = random.Next(2);
  6224. if (num4 == 1)
  6225. {
  6226. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6227. }
  6228. hFlg = true;
  6229. idoFlg[i] = true;
  6230. if (i >= 7)
  6231. {
  6232. idoFlg[i - 7] = true;
  6233. }
  6234. }
  6235. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6236. {
  6237. poseIndex[i]--;
  6238. if (poseIndex[i] <= -1)
  6239. {
  6240. poseIndex[i] = poseArray.Length - 1;
  6241. }
  6242. if (maid && maid.Visible)
  6243. {
  6244. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6245. isStop[i] = false;
  6246. poseCount[i] = 20;
  6247. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6248. {
  6249. maid.body0.MuneYureL(0f);
  6250. maid.body0.MuneYureR(0f);
  6251. }
  6252. else
  6253. {
  6254. maid.body0.MuneYureL(1f);
  6255. maid.body0.MuneYureR(1f);
  6256. }
  6257. if (array[0].Contains("MultipleMaidsPose"))
  6258. {
  6259. string path = array[0].Split(new char[] { '/' })[1];
  6260. byte[] array2 = new byte[0];
  6261. try
  6262. {
  6263. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6264. {
  6265. array2 = new byte[fileStream.Length];
  6266. fileStream.Read(array2, 0, array2.Length);
  6267. }
  6268. }
  6269. catch { }
  6270. if (0 < array2.Length)
  6271. {
  6272. string text = Path.GetFileName(path);
  6273. long num5 = text.GetHashCode();
  6274. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6275. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6276. {
  6277. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6278. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6279. };
  6280. for (int m = 0; m < array3.Length; m++)
  6281. {
  6282. maid.SetAutoTwist(array3[m], true);
  6283. }
  6284. }
  6285. }
  6286. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6287. {
  6288. loadPose[i] = array[0];
  6289. }
  6290. else if (!array[0].StartsWith("dance_"))
  6291. {
  6292. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6293. }
  6294. else
  6295. {
  6296. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6297. {
  6298. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6299. }
  6300. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6301. }
  6302. if (array.Length > 1)
  6303. {
  6304. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6305. isStop[i] = true;
  6306. if (array.Length > 2)
  6307. {
  6308. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6309. isPoseIti[i] = true;
  6310. poseIti[i] = maidArray[i].transform.position;
  6311. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6312. }
  6313. }
  6314. }
  6315. idoFlg[i] = true;
  6316. if (i >= 7)
  6317. {
  6318. idoFlg[i - 7] = true;
  6319. }
  6320. }
  6321. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6322. {
  6323. int num7 = poseIndex[i];
  6324. for (int k = 0; k < groupList.Count; k++)
  6325. {
  6326. if (poseIndex[i] < (int)groupList[k])
  6327. {
  6328. poseIndex[i] = (int)groupList[k];
  6329. break;
  6330. }
  6331. }
  6332. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6333. {
  6334. poseIndex[i] = 0;
  6335. }
  6336. if (maid && maid.Visible)
  6337. {
  6338. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6339. isStop[i] = false;
  6340. poseCount[i] = 20;
  6341. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6342. {
  6343. maid.body0.MuneYureL(0f);
  6344. maid.body0.MuneYureR(0f);
  6345. }
  6346. else
  6347. {
  6348. maid.body0.MuneYureL(1f);
  6349. maid.body0.MuneYureR(1f);
  6350. }
  6351. if (array[0].Contains("MultipleMaidsPose"))
  6352. {
  6353. string path = array[0].Split(new char[] { '/' })[1];
  6354. byte[] array2 = new byte[0];
  6355. try
  6356. {
  6357. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6358. {
  6359. array2 = new byte[fileStream.Length];
  6360. fileStream.Read(array2, 0, array2.Length);
  6361. }
  6362. }
  6363. catch { }
  6364. if (0 < array2.Length)
  6365. {
  6366. string text = Path.GetFileName(path);
  6367. long num5 = text.GetHashCode();
  6368. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6369. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6370. {
  6371. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6372. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6373. };
  6374. for (int m = 0; m < array3.Length; m++)
  6375. {
  6376. maid.SetAutoTwist(array3[m], true);
  6377. }
  6378. }
  6379. }
  6380. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6381. {
  6382. loadPose[i] = array[0];
  6383. }
  6384. else if (!array[0].StartsWith("dance_"))
  6385. {
  6386. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6387. }
  6388. else
  6389. {
  6390. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6391. {
  6392. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6393. }
  6394. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6395. }
  6396. if (array.Length > 1)
  6397. {
  6398. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6399. isStop[i] = true;
  6400. if (array.Length > 2)
  6401. {
  6402. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6403. isPoseIti[i] = true;
  6404. poseIti[i] = maidArray[i].transform.position;
  6405. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6406. }
  6407. }
  6408. }
  6409. idoFlg[i] = true;
  6410. if (i >= 7)
  6411. {
  6412. idoFlg[i - 7] = true;
  6413. }
  6414. }
  6415. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6416. {
  6417. for (int k = 0; k < groupList.Count; k++)
  6418. {
  6419. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6420. {
  6421. if (poseIndex[i] == 0)
  6422. {
  6423. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6424. }
  6425. else
  6426. {
  6427. poseIndex[i] = 0;
  6428. }
  6429. break;
  6430. }
  6431. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6432. {
  6433. poseIndex[i] = (int)groupList[k - 1];
  6434. break;
  6435. }
  6436. }
  6437. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6438. {
  6439. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6440. }
  6441. if (maid && maid.Visible)
  6442. {
  6443. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6444. isStop[i] = false;
  6445. poseCount[i] = 20;
  6446. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6447. {
  6448. maid.body0.MuneYureL(0f);
  6449. maid.body0.MuneYureR(0f);
  6450. }
  6451. else
  6452. {
  6453. maid.body0.MuneYureL(1f);
  6454. maid.body0.MuneYureR(1f);
  6455. }
  6456. if (array[0].Contains("MultipleMaidsPose"))
  6457. {
  6458. string path = array[0].Split(new char[] { '/' })[1];
  6459. byte[] array2 = new byte[0];
  6460. try
  6461. {
  6462. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6463. {
  6464. array2 = new byte[fileStream.Length];
  6465. fileStream.Read(array2, 0, array2.Length);
  6466. }
  6467. }
  6468. catch { }
  6469. if (0 < array2.Length)
  6470. {
  6471. string text = Path.GetFileName(path);
  6472. long num5 = text.GetHashCode();
  6473. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6474. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6475. {
  6476. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6477. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6478. };
  6479. for (int m = 0; m < array3.Length; m++)
  6480. {
  6481. maid.SetAutoTwist(array3[m], true);
  6482. }
  6483. }
  6484. }
  6485. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6486. {
  6487. loadPose[i] = array[0];
  6488. }
  6489. else if (!array[0].StartsWith("dance_"))
  6490. {
  6491. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6492. }
  6493. else
  6494. {
  6495. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6496. {
  6497. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6498. }
  6499. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6500. }
  6501. if (array.Length > 1)
  6502. {
  6503. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6504. isStop[i] = true;
  6505. if (array.Length > 2)
  6506. {
  6507. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6508. isPoseIti[i] = true;
  6509. poseIti[i] = maidArray[i].transform.position;
  6510. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6511. }
  6512. }
  6513. }
  6514. idoFlg[i] = true;
  6515. if (i >= 7)
  6516. {
  6517. idoFlg[i - 7] = true;
  6518. }
  6519. }
  6520. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6521. {
  6522. headEyeIndex[i]++;
  6523. if (headEyeIndex[i] == headEyeArray.Length)
  6524. {
  6525. headEyeIndex[i] = 0;
  6526. }
  6527. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6528. maid.body0.boHeadToCam = true;
  6529. maid.body0.boEyeToCam = true;
  6530. if (headEyeIndex[i] == 0)
  6531. {
  6532. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6533. maid.body0.boHeadToCam = true;
  6534. maid.body0.boEyeToCam = true;
  6535. }
  6536. else
  6537. {
  6538. maid.body0.trsLookTarget = null;
  6539. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6540. if (headEyeIndex[i] == 1)
  6541. {
  6542. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6543. }
  6544. if (headEyeIndex[i] == 2)
  6545. {
  6546. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6547. }
  6548. if (headEyeIndex[i] == 3)
  6549. {
  6550. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6551. }
  6552. if (headEyeIndex[i] == 4)
  6553. {
  6554. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6555. }
  6556. if (headEyeIndex[i] == 5)
  6557. {
  6558. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6559. }
  6560. if (headEyeIndex[i] == 6)
  6561. {
  6562. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6563. }
  6564. if (headEyeIndex[i] == 7)
  6565. {
  6566. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6567. }
  6568. if (headEyeIndex[i] == 8)
  6569. {
  6570. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6571. }
  6572. if (headEyeIndex[i] == 9)
  6573. {
  6574. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6575. }
  6576. }
  6577. idoFlg[i] = true;
  6578. if (i >= 7)
  6579. {
  6580. idoFlg[i - 7] = true;
  6581. }
  6582. }
  6583. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6584. {
  6585. idoFlg[i] = true;
  6586. if (i >= 7)
  6587. {
  6588. idoFlg[i - 7] = true;
  6589. }
  6590. }
  6591. else if (Input.GetKeyUp(key))
  6592. {
  6593. if (idoFlg[i])
  6594. {
  6595. idoFlg[i] = false;
  6596. }
  6597. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6598. {
  6599. if (!isLock[i])
  6600. {
  6601. poseIndex[i]++;
  6602. if (poseIndex[i] == poseArray.Length)
  6603. {
  6604. poseIndex[i] = 0;
  6605. }
  6606. if (maid && maid.Visible)
  6607. {
  6608. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6609. isStop[i] = false;
  6610. poseCount[i] = 20;
  6611. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6612. {
  6613. maid.body0.MuneYureL(0f);
  6614. maid.body0.MuneYureR(0f);
  6615. }
  6616. else
  6617. {
  6618. maid.body0.MuneYureL(1f);
  6619. maid.body0.MuneYureR(1f);
  6620. }
  6621. if (array[0].Contains("MultipleMaidsPose"))
  6622. {
  6623. string path = array[0].Split(new char[] { '/' })[1];
  6624. byte[] array2 = new byte[0];
  6625. try
  6626. {
  6627. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6628. {
  6629. array2 = new byte[fileStream.Length];
  6630. fileStream.Read(array2, 0, array2.Length);
  6631. }
  6632. }
  6633. catch { }
  6634. if (0 < array2.Length)
  6635. {
  6636. string text = Path.GetFileName(path);
  6637. long num5 = text.GetHashCode();
  6638. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6639. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6640. {
  6641. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6642. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6643. };
  6644. for (int m = 0; m < array3.Length; m++)
  6645. {
  6646. maid.SetAutoTwist(array3[m], true);
  6647. }
  6648. }
  6649. }
  6650. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6651. {
  6652. loadPose[i] = array[0];
  6653. }
  6654. else if (!array[0].StartsWith("dance_"))
  6655. {
  6656. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6657. }
  6658. else
  6659. {
  6660. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6661. {
  6662. maid.body0.LoadAnime(array[0] + ".anm",
  6663. GameUty.FileSystem,
  6664. array[0] + ".anm",
  6665. false,
  6666. false);
  6667. }
  6668. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6669. }
  6670. if (array.Length > 1)
  6671. {
  6672. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6673. isStop[i] = true;
  6674. if (array.Length > 2)
  6675. {
  6676. Transform transform2 =
  6677. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6678. isPoseIti[i] = true;
  6679. poseIti[i] = maidArray[i].transform.position;
  6680. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6681. }
  6682. }
  6683. }
  6684. }
  6685. }
  6686. }
  6687. goto IL_1688E;
  6688. }
  6689. }
  6690. if (Input.GetKeyDown(KeyCode.E)) { }
  6691. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6692. {
  6693. bGui = false;
  6694. }
  6695. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6696. {
  6697. sceneFlg = true;
  6698. // faceFlg = false;
  6699. // poseFlg = false;
  6700. // kankyoFlg = false;
  6701. // kankyo2Flg = false;
  6702. bGui = true;
  6703. if (!sceneManagerInitialize) InitializeSceneManager();
  6704. for (int i = 0; i < 10; i++)
  6705. {
  6706. date[i] = "未保存";
  6707. ninzu[i] = "";
  6708. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6709. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6710. {
  6711. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6712. if (array4.Length >= 2)
  6713. {
  6714. string[] array5 = array4[0].Split(new char[] { ',' });
  6715. date[i] = array5[0];
  6716. ninzu[i] = array5[1] + "人";
  6717. }
  6718. }
  6719. }
  6720. }
  6721. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6722. {
  6723. bgmIndex--;
  6724. if (bgmIndex <= -1)
  6725. {
  6726. bgmIndex = bgmArray.Length - 1;
  6727. }
  6728. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6729. bgmCombo.selectedItemIndex = bgmIndex;
  6730. }
  6731. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6732. {
  6733. bgmIndex++;
  6734. if (bgmIndex == bgmArray.Length)
  6735. {
  6736. bgmIndex = 0;
  6737. }
  6738. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6739. bgmCombo.selectedItemIndex = bgmIndex;
  6740. }
  6741. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6742. {
  6743. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6744. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6745. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6746. if (isMessage)
  6747. {
  6748. isMessage = false;
  6749. messageWindowMgr.CloseMessageWindowPanel();
  6750. }
  6751. else if (!bGuiMessage)
  6752. {
  6753. bGuiMessage = true;
  6754. }
  6755. else
  6756. {
  6757. bGuiMessage = false;
  6758. isMessage = false;
  6759. messageWindowMgr.CloseMessageWindowPanel();
  6760. }
  6761. }
  6762. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6763. {
  6764. escFlg = true;
  6765. for (int j = 0; j < maidCnt; j++)
  6766. {
  6767. if (maidArray[j] && maidArray[j].Visible)
  6768. {
  6769. maidArray[j].StopKuchipakuPattern();
  6770. if (isDanceStart7V)
  6771. {
  6772. maidArray[j].SetPos(dancePos[j]);
  6773. maidArray[j].body0.transform.localRotation = danceRot[j];
  6774. }
  6775. if (isDanceStart8V)
  6776. {
  6777. maidArray[j].SetPos(dancePos[j]);
  6778. maidArray[j].body0.transform.localRotation = danceRot[j];
  6779. }
  6780. if (isDanceStart11V)
  6781. {
  6782. maidArray[j].SetPos(dancePos[j]);
  6783. maidArray[j].body0.transform.localRotation = danceRot[j];
  6784. }
  6785. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6786. || isDanceStart13K)
  6787. {
  6788. maidArray[j].SetPos(dancePos[j]);
  6789. maidArray[j].body0.transform.localRotation = danceRot[j];
  6790. int i = j;
  6791. if (!isVR)
  6792. {
  6793. delCount[i] = 20;
  6794. if (goSlot[(int)selectList[i]] != null)
  6795. {
  6796. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6797. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6798. {
  6799. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6800. }
  6801. }
  6802. }
  6803. Maid maid = maidArray[j];
  6804. maid.DelProp(MPN.handitem, true);
  6805. maid.DelProp(MPN.accvag, true);
  6806. maid.DelProp(MPN.accanl, true);
  6807. maid.DelProp(MPN.kousoku_upper, true);
  6808. maid.DelProp(MPN.kousoku_lower, true);
  6809. maid.AllProcPropSeqStart();
  6810. }
  6811. if (isDanceStart14V)
  6812. {
  6813. maidArray[j].SetPos(dancePos[j]);
  6814. maidArray[j].body0.transform.localRotation = danceRot[j];
  6815. }
  6816. if (isDanceStart15V)
  6817. {
  6818. maidArray[j].SetPos(dancePos[j]);
  6819. maidArray[j].body0.transform.localRotation = danceRot[j];
  6820. }
  6821. }
  6822. }
  6823. isDanceStart1F = false;
  6824. isDanceStart1K = false;
  6825. isDanceStart2F = false;
  6826. isDanceStart3F = false;
  6827. isDanceStart3K = false;
  6828. isDanceStart4F = false;
  6829. isDanceStart4K = false;
  6830. isDanceStart5F = false;
  6831. isDanceStart5K = false;
  6832. isDanceStart6F = false;
  6833. isDanceStart6K = false;
  6834. isDanceStart7F = false;
  6835. isDanceStart7V = false;
  6836. isDanceStart8F = false;
  6837. isDanceStart8V = false;
  6838. isDanceStart8P = false;
  6839. isDanceStart9F = false;
  6840. isDanceStart9K = false;
  6841. isDanceStart10F = false;
  6842. isDanceStart11F = false;
  6843. isDanceStart11V = false;
  6844. isDanceStart12F = false;
  6845. isDanceStart13F = false;
  6846. isDanceStart13K = false;
  6847. isDanceStart14F = false;
  6848. isDanceStart14V = false;
  6849. isDanceStart15F = false;
  6850. isDanceStart15V = false;
  6851. for (int j = 0; j < maidCnt; j++)
  6852. {
  6853. danceFace[j] = 0f;
  6854. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6855. maidArray[j].SetAutoTwistAll(true);
  6856. }
  6857. danceCheckIndex = 0;
  6858. for (int k = 0; k < danceCheck.Length; k++)
  6859. {
  6860. danceCheck[danceCheckIndex] = 1f;
  6861. }
  6862. isDance = false;
  6863. isDanceChu = false;
  6864. if (maidArray[1] && maidArray[1].Visible)
  6865. {
  6866. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6867. {
  6868. Vector3 vector = Vector3.zero;
  6869. vector.x = 0.6f;
  6870. maidArray[1].SetPos(vector);
  6871. if (maidArray[2] && maidArray[2].Visible)
  6872. {
  6873. vector.x = -0.6f;
  6874. maidArray[2].SetPos(vector);
  6875. }
  6876. if (maidArray[3] && maidArray[3].Visible)
  6877. {
  6878. vector.x = 1.2f;
  6879. maidArray[3].SetPos(vector);
  6880. }
  6881. if (maidArray[4] && maidArray[4].Visible)
  6882. {
  6883. vector.x = -1.2f;
  6884. maidArray[4].SetPos(vector);
  6885. }
  6886. if (maidArray[5] && maidArray[5].Visible)
  6887. {
  6888. vector.x = 1.8f;
  6889. maidArray[5].SetPos(vector);
  6890. }
  6891. if (maidArray[6] && maidArray[6].Visible)
  6892. {
  6893. vector.x = -1.8f;
  6894. maidArray[6].SetPos(vector);
  6895. }
  6896. if (maidArray[7] && maidArray[7].Visible)
  6897. {
  6898. vector.x = 2.4f;
  6899. maidArray[7].SetPos(vector);
  6900. }
  6901. if (maidArray[8] && maidArray[8].Visible)
  6902. {
  6903. vector.x = -2.4f;
  6904. maidArray[8].SetPos(vector);
  6905. }
  6906. if (maidArray[9] && maidArray[9].Visible)
  6907. {
  6908. vector.x = 3f;
  6909. maidArray[9].SetPos(vector);
  6910. }
  6911. if (maidArray[10] && maidArray[10].Visible)
  6912. {
  6913. vector.x = -3f;
  6914. maidArray[10].SetPos(vector);
  6915. }
  6916. if (maidArray[11] && maidArray[11].Visible)
  6917. {
  6918. vector.x = 3.6f;
  6919. maidArray[11].SetPos(vector);
  6920. }
  6921. if (maidArray[12] && maidArray[12].Visible)
  6922. {
  6923. vector.x = -3.6f;
  6924. maidArray[12].SetPos(vector);
  6925. }
  6926. if (maidArray[13] && maidArray[13].Visible)
  6927. {
  6928. vector.x = 4.2f;
  6929. maidArray[13].SetPos(vector);
  6930. }
  6931. }
  6932. }
  6933. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6934. }
  6935. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6936. {
  6937. if (isScript)
  6938. {
  6939. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6940. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6941. if (isPanel)
  6942. {
  6943. isPanel = false;
  6944. }
  6945. else
  6946. {
  6947. isPanel = true;
  6948. }
  6949. gameObject5.SetActive(isPanel);
  6950. }
  6951. else
  6952. {
  6953. bGui = !bGui;
  6954. }
  6955. }
  6956. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6957. {
  6958. keyFlg = true;
  6959. bgIndex--;
  6960. if (bgIndex <= -1)
  6961. {
  6962. bgIndex = bgArray.Length - 1;
  6963. }
  6964. if (!moveBg)
  6965. {
  6966. bg.localScale = new Vector3(1f, 1f, 1f);
  6967. if (bgArray[bgIndex].Length == 36)
  6968. {
  6969. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6970. }
  6971. else
  6972. {
  6973. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6974. }
  6975. bgCombo.selectedItemIndex = bgIndex;
  6976. if (bgArray[bgIndex] == "karaokeroom")
  6977. {
  6978. bg.transform.position = bgObject.transform.position;
  6979. Vector3 vector = Vector3.zero;
  6980. Vector3 zero3 = Vector3.zero;
  6981. zero3.y = 90f;
  6982. vector.z = 4f;
  6983. vector.x = 1f;
  6984. bg.transform.localPosition = vector;
  6985. bg.transform.localRotation = Quaternion.Euler(zero3);
  6986. }
  6987. }
  6988. }
  6989. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6990. {
  6991. keyFlg = true;
  6992. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6993. }
  6994. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6995. {
  6996. keyFlg = true;
  6997. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6998. }
  6999. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  7000. {
  7001. keyFlg = true;
  7002. bg.localScale = new Vector3(1f, 1f, 1f);
  7003. }
  7004. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7005. {
  7006. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7007. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7008. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7009. Vector3 vector = bg.position;
  7010. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7011. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7012. bg.localPosition = vector;
  7013. if (Input.GetKey(KeyCode.Y))
  7014. {
  7015. keyFlg = true;
  7016. }
  7017. }
  7018. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7019. {
  7020. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7021. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7022. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7023. Vector3 vector = bg.position;
  7024. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7025. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7026. bg.localPosition = vector;
  7027. if (Input.GetKey(KeyCode.Y))
  7028. {
  7029. keyFlg = true;
  7030. }
  7031. }
  7032. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7033. {
  7034. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7035. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7036. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7037. Vector3 vector = bg.position;
  7038. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7039. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7040. bg.localPosition = vector;
  7041. if (Input.GetKey(KeyCode.Y))
  7042. {
  7043. keyFlg = true;
  7044. }
  7045. }
  7046. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7047. {
  7048. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7049. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7050. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7051. Vector3 vector = bg.position;
  7052. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7053. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7054. bg.localPosition = vector;
  7055. if (Input.GetKey(KeyCode.Y))
  7056. {
  7057. keyFlg = true;
  7058. }
  7059. }
  7060. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7061. {
  7062. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7063. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7064. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7065. Vector3 vector = bg.position;
  7066. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7067. bg.localPosition = vector;
  7068. if (Input.GetKey(KeyCode.Y))
  7069. {
  7070. keyFlg = true;
  7071. }
  7072. }
  7073. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7074. {
  7075. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7076. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7077. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7078. Vector3 vector = bg.position;
  7079. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7080. bg.localPosition = vector;
  7081. if (Input.GetKey(KeyCode.Y))
  7082. {
  7083. keyFlg = true;
  7084. }
  7085. }
  7086. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7087. {
  7088. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7089. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7090. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7091. Vector3 vector = bg.position;
  7092. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7093. bg.localPosition = vector;
  7094. if (Input.GetKey(KeyCode.Y))
  7095. {
  7096. keyFlg = true;
  7097. }
  7098. }
  7099. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7100. {
  7101. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7102. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7103. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7104. Vector3 vector = bg.position;
  7105. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7106. bg.localPosition = vector;
  7107. if (Input.GetKey(KeyCode.Y))
  7108. {
  7109. keyFlg = true;
  7110. }
  7111. }
  7112. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7113. {
  7114. Vector3 vector = bg.position;
  7115. vector.y -= 0.015f * speed;
  7116. bg.localPosition = vector;
  7117. if (Input.GetKey(KeyCode.Y))
  7118. {
  7119. keyFlg = true;
  7120. }
  7121. }
  7122. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7123. {
  7124. Vector3 vector = bg.position;
  7125. vector.y += 0.015f * speed;
  7126. bg.localPosition = vector;
  7127. if (Input.GetKey(KeyCode.Y))
  7128. {
  7129. keyFlg = true;
  7130. }
  7131. }
  7132. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7133. {
  7134. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7135. if (Input.GetKey(KeyCode.Y))
  7136. {
  7137. keyFlg = true;
  7138. }
  7139. }
  7140. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7141. {
  7142. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7143. if (Input.GetKey(KeyCode.Y))
  7144. {
  7145. keyFlg = true;
  7146. }
  7147. }
  7148. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7149. {
  7150. if (Input.GetKey(KeyCode.Y))
  7151. {
  7152. keyFlg = true;
  7153. }
  7154. }
  7155. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7156. {
  7157. if (keyFlg)
  7158. {
  7159. keyFlg = false;
  7160. }
  7161. else
  7162. {
  7163. bgIndex++;
  7164. if (bgIndex == bgArray.Length)
  7165. {
  7166. bgIndex = 0;
  7167. }
  7168. if (!moveBg)
  7169. {
  7170. bg.localScale = new Vector3(1f, 1f, 1f);
  7171. if (bgArray[bgIndex].Length == 36)
  7172. {
  7173. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7174. }
  7175. else
  7176. {
  7177. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7178. }
  7179. bgCombo.selectedItemIndex = bgIndex;
  7180. if (bgArray[bgIndex] == "karaokeroom")
  7181. {
  7182. bg.transform.position = bgObject.transform.position;
  7183. Vector3 vector = Vector3.zero;
  7184. Vector3 zero3 = Vector3.zero;
  7185. zero3.y = 90f;
  7186. vector.z = 4f;
  7187. vector.x = 1f;
  7188. bg.transform.localPosition = vector;
  7189. bg.transform.localRotation = Quaternion.Euler(zero3);
  7190. }
  7191. }
  7192. }
  7193. }
  7194. if (maidArray[0] != null && maidArray[0].Visible)
  7195. {
  7196. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7197. {
  7198. int[] array6 = new int[1];
  7199. int[] array7 = array6;
  7200. if (maidCnt == 2)
  7201. {
  7202. array7 = new int[] { 0, 1 };
  7203. }
  7204. if (maidCnt == 3)
  7205. {
  7206. array7 = new int[] { 0, 1, 2 };
  7207. }
  7208. if (maidCnt == 4)
  7209. {
  7210. array7 = new int[] { 0, 1, 2, 3 };
  7211. }
  7212. if (maidCnt == 5)
  7213. {
  7214. array7 = new int[] { 0, 1, 2, 3, 4 };
  7215. }
  7216. if (maidCnt == 6)
  7217. {
  7218. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7219. }
  7220. if (maidCnt == 7)
  7221. {
  7222. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7223. }
  7224. if (maidCnt == 8)
  7225. {
  7226. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7227. }
  7228. if (maidCnt == 9)
  7229. {
  7230. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7231. }
  7232. if (maidCnt == 10)
  7233. {
  7234. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7235. }
  7236. if (maidCnt == 11)
  7237. {
  7238. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7239. }
  7240. if (maidCnt == 12)
  7241. {
  7242. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7243. }
  7244. Random random = new Random();
  7245. int n = array7.Length;
  7246. while (n > 1)
  7247. {
  7248. n--;
  7249. int j = random.Next(n + 1);
  7250. int num8 = array7[j];
  7251. array7[j] = array7[n];
  7252. array7[n] = num8;
  7253. }
  7254. int[] array8 = new int[maidCnt];
  7255. Vector3[] array9 = new Vector3[maidCnt];
  7256. Vector3[] array10 = new Vector3[maidCnt];
  7257. int[] array11 = new int[maidCnt];
  7258. for (int i = 0; i < maidCnt; i++)
  7259. {
  7260. array8[array7[i]] = poseIndex[array7[i]];
  7261. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7262. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7263. array11[array7[i]] = headEyeIndex[array7[i]];
  7264. }
  7265. for (int i = 0; i < maidCnt; i++)
  7266. {
  7267. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7268. {
  7269. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7270. isStop[i] = false;
  7271. poseCount[i] = 20;
  7272. Maid maid = maidArray[i];
  7273. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7274. {
  7275. maid.body0.MuneYureL(0f);
  7276. maid.body0.MuneYureR(0f);
  7277. }
  7278. else
  7279. {
  7280. maid.body0.MuneYureL(1f);
  7281. maid.body0.MuneYureR(1f);
  7282. }
  7283. if (array12[0].Contains("MultipleMaidsPose"))
  7284. {
  7285. string path = array12[0].Split(new char[] { '/' })[1];
  7286. byte[] array2 = new byte[0];
  7287. try
  7288. {
  7289. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7290. {
  7291. array2 = new byte[fileStream.Length];
  7292. fileStream.Read(array2, 0, array2.Length);
  7293. }
  7294. }
  7295. catch { }
  7296. if (0 < array2.Length)
  7297. {
  7298. string text = Path.GetFileName(path);
  7299. long num5 = text.GetHashCode();
  7300. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7301. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7302. {
  7303. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7304. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7305. };
  7306. for (int m = 0; m < array3.Length; m++)
  7307. {
  7308. maid.SetAutoTwist(array3[m], true);
  7309. }
  7310. }
  7311. }
  7312. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7313. {
  7314. loadPose[i] = array12[0];
  7315. }
  7316. else if (!array12[0].StartsWith("dance_"))
  7317. {
  7318. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7319. }
  7320. else
  7321. {
  7322. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7323. {
  7324. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7325. GameUty.FileSystem,
  7326. array12[0] + ".anm",
  7327. false,
  7328. false);
  7329. }
  7330. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7331. }
  7332. if (array12.Length > 1)
  7333. {
  7334. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7335. float.Parse(array12[1]);
  7336. isStop[i] = true;
  7337. if (array12.Length > 2)
  7338. {
  7339. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7340. isPoseIti[i] = true;
  7341. poseIti[i] = maidArray[i].transform.position;
  7342. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7343. }
  7344. }
  7345. }
  7346. poseIndex[i] = array8[array7[i]];
  7347. maidArray[i].SetRot(array9[array7[i]]);
  7348. maidArray[i].SetPos(array10[array7[i]]);
  7349. headEyeIndex[i] = array11[array7[i]];
  7350. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7351. maidArray[i].body0.boHeadToCam = true;
  7352. maidArray[i].body0.boEyeToCam = true;
  7353. if (headEyeIndex[i] == 0)
  7354. {
  7355. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7356. maidArray[i].body0.boHeadToCam = true;
  7357. maidArray[i].body0.boEyeToCam = true;
  7358. }
  7359. else
  7360. {
  7361. maidArray[i].body0.trsLookTarget = null;
  7362. if (headEyeIndex[i] == 1)
  7363. {
  7364. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7365. }
  7366. if (headEyeIndex[i] == 2)
  7367. {
  7368. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7369. }
  7370. if (headEyeIndex[i] == 3)
  7371. {
  7372. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7373. }
  7374. if (headEyeIndex[i] == 4)
  7375. {
  7376. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7377. }
  7378. if (headEyeIndex[i] == 5)
  7379. {
  7380. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7381. }
  7382. if (headEyeIndex[i] == 6)
  7383. {
  7384. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7385. }
  7386. if (headEyeIndex[i] == 7)
  7387. {
  7388. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7389. }
  7390. if (headEyeIndex[i] == 8)
  7391. {
  7392. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7393. }
  7394. if (headEyeIndex[i] == 9)
  7395. {
  7396. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7397. }
  7398. }
  7399. }
  7400. }
  7401. else if (Input.GetKeyDown(KeyCode.Comma))
  7402. {
  7403. int[] array8 = new int[maidCnt];
  7404. Vector3[] array9 = new Vector3[maidCnt];
  7405. Vector3[] array10 = new Vector3[maidCnt];
  7406. int[] array11 = new int[maidCnt];
  7407. for (int i = 0; i < maidCnt; i++)
  7408. {
  7409. array8[i] = poseIndex[i];
  7410. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7411. array10[i] = maidArray[i].transform.position;
  7412. array11[i] = headEyeIndex[i];
  7413. }
  7414. for (int i = 0; i < maidCnt; i++)
  7415. {
  7416. if (i == 0)
  7417. {
  7418. if (!isLock[i])
  7419. {
  7420. if (maidArray[i] && maidArray[i].Visible)
  7421. {
  7422. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7423. isStop[i] = false;
  7424. poseCount[i] = 20;
  7425. Maid maid = maidArray[i];
  7426. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7427. {
  7428. maid.body0.MuneYureL(0f);
  7429. maid.body0.MuneYureR(0f);
  7430. }
  7431. else
  7432. {
  7433. maid.body0.MuneYureL(1f);
  7434. maid.body0.MuneYureR(1f);
  7435. }
  7436. if (array12[0].Contains("MultipleMaidsPose"))
  7437. {
  7438. string path = array12[0].Split(new char[] { '/' })[1];
  7439. byte[] array2 = new byte[0];
  7440. try
  7441. {
  7442. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7443. {
  7444. array2 = new byte[fileStream.Length];
  7445. fileStream.Read(array2, 0, array2.Length);
  7446. }
  7447. }
  7448. catch { }
  7449. if (0 < array2.Length)
  7450. {
  7451. string text = Path.GetFileName(path);
  7452. long num5 = text.GetHashCode();
  7453. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7454. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7455. {
  7456. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7457. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7458. };
  7459. for (int m = 0; m < array3.Length; m++)
  7460. {
  7461. maid.SetAutoTwist(array3[m], true);
  7462. }
  7463. }
  7464. }
  7465. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7466. {
  7467. loadPose[i] = array12[0];
  7468. }
  7469. else if (!array12[0].StartsWith("dance_"))
  7470. {
  7471. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7472. }
  7473. else
  7474. {
  7475. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7476. {
  7477. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7478. GameUty.FileSystem,
  7479. array12[0] + ".anm",
  7480. false,
  7481. false);
  7482. }
  7483. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7484. }
  7485. if (array12.Length > 1)
  7486. {
  7487. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7488. float.Parse(array12[1]);
  7489. isStop[i] = true;
  7490. if (array12.Length > 2)
  7491. {
  7492. Transform transform2 =
  7493. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7494. isPoseIti[i] = true;
  7495. poseIti[i] = maidArray[i].transform.position;
  7496. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7497. }
  7498. }
  7499. }
  7500. }
  7501. poseIndex[i] = array8[maidCnt - i - 1];
  7502. headEyeIndex[i] = array11[maidCnt - i - 1];
  7503. }
  7504. else
  7505. {
  7506. if (!isLock[i])
  7507. {
  7508. if (maidArray[i] && maidArray[i].Visible)
  7509. {
  7510. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7511. isStop[i] = false;
  7512. poseCount[i] = 20;
  7513. Maid maid = maidArray[i];
  7514. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7515. {
  7516. maid.body0.MuneYureL(0f);
  7517. maid.body0.MuneYureR(0f);
  7518. }
  7519. else
  7520. {
  7521. maid.body0.MuneYureL(1f);
  7522. maid.body0.MuneYureR(1f);
  7523. }
  7524. if (array12[0].Contains("MultipleMaidsPose"))
  7525. {
  7526. string path = array12[0].Split(new char[] { '/' })[1];
  7527. byte[] array2 = new byte[0];
  7528. try
  7529. {
  7530. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7531. {
  7532. array2 = new byte[fileStream.Length];
  7533. fileStream.Read(array2, 0, array2.Length);
  7534. }
  7535. }
  7536. catch { }
  7537. if (0 < array2.Length)
  7538. {
  7539. string text = Path.GetFileName(path);
  7540. long num5 = text.GetHashCode();
  7541. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7542. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7543. {
  7544. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7545. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7546. };
  7547. for (int m = 0; m < array3.Length; m++)
  7548. {
  7549. maid.SetAutoTwist(array3[m], true);
  7550. }
  7551. }
  7552. }
  7553. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7554. {
  7555. loadPose[i] = array12[0];
  7556. }
  7557. else if (!array12[0].StartsWith("dance_"))
  7558. {
  7559. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7560. }
  7561. else
  7562. {
  7563. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7564. {
  7565. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7566. GameUty.FileSystem,
  7567. array12[0] + ".anm",
  7568. false,
  7569. false);
  7570. }
  7571. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7572. }
  7573. if (array12.Length > 1)
  7574. {
  7575. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7576. float.Parse(array12[1]);
  7577. isStop[i] = true;
  7578. if (array12.Length > 2)
  7579. {
  7580. Transform transform2 =
  7581. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7582. isPoseIti[i] = true;
  7583. poseIti[i] = maidArray[i].transform.position;
  7584. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7585. }
  7586. }
  7587. }
  7588. }
  7589. poseIndex[i] = array8[i - 1];
  7590. headEyeIndex[i] = array11[i - 1];
  7591. }
  7592. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7593. maidArray[i].body0.boHeadToCam = true;
  7594. maidArray[i].body0.boEyeToCam = true;
  7595. if (headEyeIndex[i] == 0)
  7596. {
  7597. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7598. maidArray[i].body0.boHeadToCam = true;
  7599. maidArray[i].body0.boEyeToCam = true;
  7600. }
  7601. else
  7602. {
  7603. maidArray[i].body0.trsLookTarget = null;
  7604. if (headEyeIndex[i] == 1)
  7605. {
  7606. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7607. }
  7608. if (headEyeIndex[i] == 2)
  7609. {
  7610. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7611. }
  7612. if (headEyeIndex[i] == 3)
  7613. {
  7614. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7615. }
  7616. if (headEyeIndex[i] == 4)
  7617. {
  7618. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7619. }
  7620. if (headEyeIndex[i] == 5)
  7621. {
  7622. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7623. }
  7624. if (headEyeIndex[i] == 6)
  7625. {
  7626. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7627. }
  7628. if (headEyeIndex[i] == 7)
  7629. {
  7630. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7631. }
  7632. if (headEyeIndex[i] == 8)
  7633. {
  7634. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7635. }
  7636. if (headEyeIndex[i] == 9)
  7637. {
  7638. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7639. }
  7640. }
  7641. if (i == 0)
  7642. {
  7643. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7644. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7645. }
  7646. else
  7647. {
  7648. maidArray[i].SetRot(array9[i - 1]);
  7649. maidArray[i].SetPos(array10[i - 1]);
  7650. }
  7651. }
  7652. }
  7653. for (int i = 0; i < maidCnt; i++)
  7654. {
  7655. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7656. {
  7657. if (maidArray[i] && maidArray[i].Visible)
  7658. {
  7659. maidArray[i].body0.transform.localRotation =
  7660. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7661. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7662. }
  7663. }
  7664. else if (Input.GetKey(KeyCode.B))
  7665. {
  7666. if (maidArray[i] && maidArray[i].Visible)
  7667. {
  7668. maidArray[i].body0.transform.localRotation =
  7669. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7670. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7671. }
  7672. }
  7673. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7674. {
  7675. if (maidArray[1] && maidArray[1].Visible)
  7676. {
  7677. if (maidArray[0].transform.position == maidArray[1].transform.position
  7678. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7679. {
  7680. Vector3 vector = Vector3.zero;
  7681. vector.x = 0.6f;
  7682. maidArray[1].SetPos(vector);
  7683. if (maidArray[2] && maidArray[2].Visible)
  7684. {
  7685. vector.x = -0.6f;
  7686. maidArray[2].SetPos(vector);
  7687. }
  7688. if (maidArray[3] && maidArray[3].Visible)
  7689. {
  7690. vector.x = 1.2f;
  7691. maidArray[3].SetPos(vector);
  7692. }
  7693. if (maidArray[4] && maidArray[4].Visible)
  7694. {
  7695. vector.x = -1.2f;
  7696. maidArray[4].SetPos(vector);
  7697. }
  7698. if (maidArray[5] && maidArray[5].Visible)
  7699. {
  7700. vector.x = 1.8f;
  7701. maidArray[5].SetPos(vector);
  7702. }
  7703. if (maidArray[6] && maidArray[6].Visible)
  7704. {
  7705. vector.x = -1.8f;
  7706. maidArray[6].SetPos(vector);
  7707. }
  7708. if (maidArray[7] && maidArray[7].Visible)
  7709. {
  7710. vector.x = 2.4f;
  7711. maidArray[7].SetPos(vector);
  7712. }
  7713. if (maidArray[8] && maidArray[8].Visible)
  7714. {
  7715. vector.x = -2.4f;
  7716. maidArray[8].SetPos(vector);
  7717. }
  7718. if (maidArray[9] && maidArray[9].Visible)
  7719. {
  7720. vector.x = 3f;
  7721. maidArray[9].SetPos(vector);
  7722. }
  7723. if (maidArray[10] && maidArray[10].Visible)
  7724. {
  7725. vector.x = -3f;
  7726. maidArray[10].SetPos(vector);
  7727. }
  7728. if (maidArray[11] && maidArray[11].Visible)
  7729. {
  7730. vector.x = 3.6f;
  7731. maidArray[11].SetPos(vector);
  7732. }
  7733. if (maidArray[12] && maidArray[12].Visible)
  7734. {
  7735. vector.x = -3.6f;
  7736. maidArray[12].SetPos(vector);
  7737. }
  7738. if (maidArray[13] && maidArray[13].Visible)
  7739. {
  7740. vector.x = 4.2f;
  7741. maidArray[13].SetPos(vector);
  7742. }
  7743. }
  7744. }
  7745. for (int k = 0; k < groupList.Count; k++)
  7746. {
  7747. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7748. {
  7749. if (poseIndex[i] == 0)
  7750. {
  7751. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7752. }
  7753. else
  7754. {
  7755. poseIndex[i] = 0;
  7756. }
  7757. break;
  7758. }
  7759. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7760. {
  7761. poseIndex[i] = (int)groupList[k - 1];
  7762. break;
  7763. }
  7764. }
  7765. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7766. {
  7767. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7768. }
  7769. if (maidArray[i] && maidArray[i].Visible)
  7770. {
  7771. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7772. isStop[i] = false;
  7773. poseCount[i] = 20;
  7774. Maid maid = maidArray[i];
  7775. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7776. {
  7777. maid.body0.MuneYureL(0f);
  7778. maid.body0.MuneYureR(0f);
  7779. }
  7780. else
  7781. {
  7782. maid.body0.MuneYureL(1f);
  7783. maid.body0.MuneYureR(1f);
  7784. }
  7785. if (array[0].Contains("MultipleMaidsPose"))
  7786. {
  7787. string path = array[0].Split(new char[] { '/' })[1];
  7788. byte[] array2 = new byte[0];
  7789. try
  7790. {
  7791. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7792. {
  7793. array2 = new byte[fileStream.Length];
  7794. fileStream.Read(array2, 0, array2.Length);
  7795. }
  7796. }
  7797. catch { }
  7798. if (0 < array2.Length)
  7799. {
  7800. string text = Path.GetFileName(path);
  7801. long num5 = text.GetHashCode();
  7802. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7803. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7804. {
  7805. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7806. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7807. };
  7808. for (int m = 0; m < array3.Length; m++)
  7809. {
  7810. maid.SetAutoTwist(array3[m], true);
  7811. }
  7812. }
  7813. }
  7814. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7815. {
  7816. loadPose[i] = array[0];
  7817. }
  7818. else if (!array[0].StartsWith("dance_"))
  7819. {
  7820. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7821. }
  7822. else
  7823. {
  7824. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7825. {
  7826. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7827. GameUty.FileSystem,
  7828. array[0] + ".anm",
  7829. false,
  7830. false);
  7831. }
  7832. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7833. }
  7834. if (array.Length > 1)
  7835. {
  7836. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7837. isStop[i] = true;
  7838. if (array.Length > 2)
  7839. {
  7840. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7841. isPoseIti[i] = true;
  7842. poseIti[i] = maidArray[i].transform.position;
  7843. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7844. }
  7845. }
  7846. }
  7847. }
  7848. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7849. {
  7850. if (maidArray[1] && maidArray[1].Visible)
  7851. {
  7852. if (maidArray[0].transform.position == maidArray[1].transform.position
  7853. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7854. {
  7855. Vector3 vector = Vector3.zero;
  7856. vector.x = 0.6f;
  7857. maidArray[1].SetPos(vector);
  7858. if (maidArray[2] && maidArray[2].Visible)
  7859. {
  7860. vector.x = -0.6f;
  7861. maidArray[2].SetPos(vector);
  7862. }
  7863. if (maidArray[3] && maidArray[3].Visible)
  7864. {
  7865. vector.x = 1.2f;
  7866. maidArray[3].SetPos(vector);
  7867. }
  7868. if (maidArray[4] && maidArray[4].Visible)
  7869. {
  7870. vector.x = -1.2f;
  7871. maidArray[4].SetPos(vector);
  7872. }
  7873. if (maidArray[5] && maidArray[5].Visible)
  7874. {
  7875. vector.x = 1.8f;
  7876. maidArray[5].SetPos(vector);
  7877. }
  7878. if (maidArray[6] && maidArray[6].Visible)
  7879. {
  7880. vector.x = -1.8f;
  7881. maidArray[6].SetPos(vector);
  7882. }
  7883. if (maidArray[7] && maidArray[7].Visible)
  7884. {
  7885. vector.x = 2.4f;
  7886. maidArray[7].SetPos(vector);
  7887. }
  7888. if (maidArray[8] && maidArray[8].Visible)
  7889. {
  7890. vector.x = -2.4f;
  7891. maidArray[8].SetPos(vector);
  7892. }
  7893. if (maidArray[9] && maidArray[9].Visible)
  7894. {
  7895. vector.x = 3f;
  7896. maidArray[9].SetPos(vector);
  7897. }
  7898. if (maidArray[10] && maidArray[10].Visible)
  7899. {
  7900. vector.x = -3f;
  7901. maidArray[10].SetPos(vector);
  7902. }
  7903. if (maidArray[11] && maidArray[11].Visible)
  7904. {
  7905. vector.x = 3.6f;
  7906. maidArray[11].SetPos(vector);
  7907. }
  7908. if (maidArray[12] && maidArray[12].Visible)
  7909. {
  7910. vector.x = -3.6f;
  7911. maidArray[12].SetPos(vector);
  7912. }
  7913. if (maidArray[13] && maidArray[13].Visible)
  7914. {
  7915. vector.x = 4.2f;
  7916. maidArray[13].SetPos(vector);
  7917. }
  7918. }
  7919. }
  7920. int num7 = poseIndex[i];
  7921. for (int k = 0; k < groupList.Count; k++)
  7922. {
  7923. if (poseIndex[i] < (int)groupList[k])
  7924. {
  7925. poseIndex[i] = (int)groupList[k];
  7926. break;
  7927. }
  7928. }
  7929. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7930. {
  7931. poseIndex[i] = 0;
  7932. }
  7933. if (maidArray[i] && maidArray[i].Visible)
  7934. {
  7935. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7936. isStop[i] = false;
  7937. poseCount[i] = 20;
  7938. Maid maid = maidArray[i];
  7939. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7940. {
  7941. maid.body0.MuneYureL(0f);
  7942. maid.body0.MuneYureR(0f);
  7943. }
  7944. else
  7945. {
  7946. maid.body0.MuneYureL(1f);
  7947. maid.body0.MuneYureR(1f);
  7948. }
  7949. if (array[0].Contains("MultipleMaidsPose"))
  7950. {
  7951. string path = array[0].Split(new char[] { '/' })[1];
  7952. byte[] array2 = new byte[0];
  7953. try
  7954. {
  7955. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7956. {
  7957. array2 = new byte[fileStream.Length];
  7958. fileStream.Read(array2, 0, array2.Length);
  7959. }
  7960. }
  7961. catch { }
  7962. if (0 < array2.Length)
  7963. {
  7964. string text = Path.GetFileName(path);
  7965. long num5 = text.GetHashCode();
  7966. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7967. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7968. {
  7969. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7970. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7971. };
  7972. for (int m = 0; m < array3.Length; m++)
  7973. {
  7974. maid.SetAutoTwist(array3[m], true);
  7975. }
  7976. }
  7977. }
  7978. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7979. {
  7980. loadPose[i] = array[0];
  7981. }
  7982. else if (!array[0].StartsWith("dance_"))
  7983. {
  7984. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7985. }
  7986. else
  7987. {
  7988. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7989. {
  7990. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7991. GameUty.FileSystem,
  7992. array[0] + ".anm",
  7993. false,
  7994. false);
  7995. }
  7996. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7997. }
  7998. if (array.Length > 1)
  7999. {
  8000. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8001. isStop[i] = true;
  8002. if (array.Length > 2)
  8003. {
  8004. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8005. isPoseIti[i] = true;
  8006. poseIti[i] = maidArray[i].transform.position;
  8007. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8008. }
  8009. }
  8010. }
  8011. }
  8012. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8013. {
  8014. if (maidArray[1] && maidArray[1].Visible)
  8015. {
  8016. if (maidArray[0].transform.position == maidArray[1].transform.position
  8017. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8018. {
  8019. Vector3 vector = Vector3.zero;
  8020. vector.x = 0.6f;
  8021. maidArray[1].SetPos(vector);
  8022. if (maidArray[2] && maidArray[2].Visible)
  8023. {
  8024. vector.x = -0.6f;
  8025. maidArray[2].SetPos(vector);
  8026. }
  8027. if (maidArray[3] && maidArray[3].Visible)
  8028. {
  8029. vector.x = 1.2f;
  8030. maidArray[3].SetPos(vector);
  8031. }
  8032. if (maidArray[4] && maidArray[4].Visible)
  8033. {
  8034. vector.x = -1.2f;
  8035. maidArray[4].SetPos(vector);
  8036. }
  8037. if (maidArray[5] && maidArray[5].Visible)
  8038. {
  8039. vector.x = 1.8f;
  8040. maidArray[5].SetPos(vector);
  8041. }
  8042. if (maidArray[6] && maidArray[6].Visible)
  8043. {
  8044. vector.x = -1.8f;
  8045. maidArray[6].SetPos(vector);
  8046. }
  8047. if (maidArray[7] && maidArray[7].Visible)
  8048. {
  8049. vector.x = 2.4f;
  8050. maidArray[7].SetPos(vector);
  8051. }
  8052. if (maidArray[8] && maidArray[8].Visible)
  8053. {
  8054. vector.x = -2.4f;
  8055. maidArray[8].SetPos(vector);
  8056. }
  8057. if (maidArray[9] && maidArray[9].Visible)
  8058. {
  8059. vector.x = 3f;
  8060. maidArray[9].SetPos(vector);
  8061. }
  8062. if (maidArray[10] && maidArray[10].Visible)
  8063. {
  8064. vector.x = -3f;
  8065. maidArray[10].SetPos(vector);
  8066. }
  8067. if (maidArray[11] && maidArray[11].Visible)
  8068. {
  8069. vector.x = 3.6f;
  8070. maidArray[11].SetPos(vector);
  8071. }
  8072. if (maidArray[12] && maidArray[12].Visible)
  8073. {
  8074. vector.x = -3.6f;
  8075. maidArray[12].SetPos(vector);
  8076. }
  8077. if (maidArray[13] && maidArray[13].Visible)
  8078. {
  8079. vector.x = 4.2f;
  8080. maidArray[13].SetPos(vector);
  8081. }
  8082. }
  8083. }
  8084. poseIndex[i]--;
  8085. if (poseIndex[i] <= -1)
  8086. {
  8087. poseIndex[i] = poseArray.Length - 1;
  8088. }
  8089. if (maidArray[i] && maidArray[i].Visible)
  8090. {
  8091. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8092. isStop[i] = false;
  8093. poseCount[i] = 20;
  8094. Maid maid = maidArray[i];
  8095. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8096. {
  8097. maid.body0.MuneYureL(0f);
  8098. maid.body0.MuneYureR(0f);
  8099. }
  8100. else
  8101. {
  8102. maid.body0.MuneYureL(1f);
  8103. maid.body0.MuneYureR(1f);
  8104. }
  8105. if (array[0].Contains("MultipleMaidsPose"))
  8106. {
  8107. string path = array[0].Split(new char[] { '/' })[1];
  8108. byte[] array2 = new byte[0];
  8109. try
  8110. {
  8111. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8112. {
  8113. array2 = new byte[fileStream.Length];
  8114. fileStream.Read(array2, 0, array2.Length);
  8115. }
  8116. }
  8117. catch { }
  8118. if (0 < array2.Length)
  8119. {
  8120. string text = Path.GetFileName(path);
  8121. long num5 = text.GetHashCode();
  8122. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8123. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8124. {
  8125. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8126. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8127. };
  8128. for (int m = 0; m < array3.Length; m++)
  8129. {
  8130. maid.SetAutoTwist(array3[m], true);
  8131. }
  8132. }
  8133. }
  8134. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8135. {
  8136. loadPose[i] = array[0];
  8137. }
  8138. else if (!array[0].StartsWith("dance_"))
  8139. {
  8140. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8141. }
  8142. else
  8143. {
  8144. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8145. {
  8146. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8147. GameUty.FileSystem,
  8148. array[0] + ".anm",
  8149. false,
  8150. false);
  8151. }
  8152. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8153. }
  8154. if (array.Length > 1)
  8155. {
  8156. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8157. isStop[i] = true;
  8158. if (array.Length > 2)
  8159. {
  8160. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8161. isPoseIti[i] = true;
  8162. poseIti[i] = maidArray[i].transform.position;
  8163. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8164. }
  8165. }
  8166. }
  8167. }
  8168. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8169. {
  8170. if (maidArray[1] && maidArray[1].Visible)
  8171. {
  8172. if (maidArray[0].transform.position == maidArray[1].transform.position
  8173. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8174. {
  8175. Vector3 vector = Vector3.zero;
  8176. vector.x = 0.6f;
  8177. maidArray[1].SetPos(vector);
  8178. if (maidArray[2] && maidArray[2].Visible)
  8179. {
  8180. vector.x = -0.6f;
  8181. maidArray[2].SetPos(vector);
  8182. }
  8183. if (maidArray[3] && maidArray[3].Visible)
  8184. {
  8185. vector.x = 1.2f;
  8186. maidArray[3].SetPos(vector);
  8187. }
  8188. if (maidArray[4] && maidArray[4].Visible)
  8189. {
  8190. vector.x = -1.2f;
  8191. maidArray[4].SetPos(vector);
  8192. }
  8193. if (maidArray[5] && maidArray[5].Visible)
  8194. {
  8195. vector.x = 1.8f;
  8196. maidArray[5].SetPos(vector);
  8197. }
  8198. if (maidArray[6] && maidArray[6].Visible)
  8199. {
  8200. vector.x = -1.8f;
  8201. maidArray[6].SetPos(vector);
  8202. }
  8203. if (maidArray[7] && maidArray[7].Visible)
  8204. {
  8205. vector.x = 2.4f;
  8206. maidArray[7].SetPos(vector);
  8207. }
  8208. if (maidArray[8] && maidArray[8].Visible)
  8209. {
  8210. vector.x = -2.4f;
  8211. maidArray[8].SetPos(vector);
  8212. }
  8213. if (maidArray[9] && maidArray[9].Visible)
  8214. {
  8215. vector.x = 3f;
  8216. maidArray[9].SetPos(vector);
  8217. }
  8218. if (maidArray[10] && maidArray[10].Visible)
  8219. {
  8220. vector.x = -3f;
  8221. maidArray[10].SetPos(vector);
  8222. }
  8223. if (maidArray[11] && maidArray[11].Visible)
  8224. {
  8225. vector.x = 3.6f;
  8226. maidArray[11].SetPos(vector);
  8227. }
  8228. if (maidArray[12] && maidArray[12].Visible)
  8229. {
  8230. vector.x = -3.6f;
  8231. maidArray[12].SetPos(vector);
  8232. }
  8233. if (maidArray[13] && maidArray[13].Visible)
  8234. {
  8235. vector.x = 4.2f;
  8236. maidArray[13].SetPos(vector);
  8237. }
  8238. }
  8239. }
  8240. poseIndex[i]++;
  8241. if (poseIndex[i] == poseArray.Length)
  8242. {
  8243. poseIndex[i] = 0;
  8244. }
  8245. if (maidArray[i] && maidArray[i].Visible)
  8246. {
  8247. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8248. isStop[i] = false;
  8249. poseCount[i] = 20;
  8250. Maid maid = maidArray[i];
  8251. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8252. {
  8253. maid.body0.MuneYureL(0f);
  8254. maid.body0.MuneYureR(0f);
  8255. }
  8256. else
  8257. {
  8258. maid.body0.MuneYureL(1f);
  8259. maid.body0.MuneYureR(1f);
  8260. }
  8261. if (array[0].Contains("MultipleMaidsPose"))
  8262. {
  8263. string path = array[0].Split(new char[] { '/' })[1];
  8264. byte[] array2 = new byte[0];
  8265. try
  8266. {
  8267. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8268. {
  8269. array2 = new byte[fileStream.Length];
  8270. fileStream.Read(array2, 0, array2.Length);
  8271. }
  8272. }
  8273. catch { }
  8274. if (0 < array2.Length)
  8275. {
  8276. string text = Path.GetFileName(path);
  8277. long num5 = text.GetHashCode();
  8278. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8279. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8280. {
  8281. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8282. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8283. };
  8284. for (int m = 0; m < array3.Length; m++)
  8285. {
  8286. maid.SetAutoTwist(array3[m], true);
  8287. }
  8288. }
  8289. }
  8290. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8291. {
  8292. loadPose[i] = array[0];
  8293. }
  8294. else if (!array[0].StartsWith("dance_"))
  8295. {
  8296. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8297. }
  8298. else
  8299. {
  8300. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8301. {
  8302. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8303. GameUty.FileSystem,
  8304. array[0] + ".anm",
  8305. false,
  8306. false);
  8307. }
  8308. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8309. }
  8310. if (array.Length > 1)
  8311. {
  8312. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8313. isStop[i] = true;
  8314. if (array.Length > 2)
  8315. {
  8316. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8317. isPoseIti[i] = true;
  8318. poseIti[i] = maidArray[i].transform.position;
  8319. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8320. }
  8321. }
  8322. }
  8323. }
  8324. }
  8325. }
  8326. if (isDanceChu)
  8327. {
  8328. for (int j = 0; j < maidCnt; j++)
  8329. {
  8330. if (maidArray[j] && maidArray[j].Visible)
  8331. {
  8332. string text2 = danceName[j];
  8333. float num = 0f;
  8334. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8335. || text2 == "dance_cm3d_004_kano_f1.anm")
  8336. {
  8337. num = 0.166666f;
  8338. }
  8339. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8340. {
  8341. num = -0.35f;
  8342. }
  8343. if (text2 != null)
  8344. {
  8345. if (danceCount > 0)
  8346. {
  8347. danceCount--;
  8348. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8349. }
  8350. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8351. {
  8352. danceCount = 20;
  8353. }
  8354. }
  8355. }
  8356. }
  8357. }
  8358. if (isDanceStart1)
  8359. {
  8360. for (int j = 0; j < maidCnt; j++)
  8361. {
  8362. if (maidArray[j] && maidArray[j].Visible)
  8363. {
  8364. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8365. if (!isShift)
  8366. {
  8367. if (j == 0)
  8368. {
  8369. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8370. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8371. danceName[j] = "dance_cm3d2_001_f1.anm";
  8372. }
  8373. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8374. {
  8375. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8376. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8377. danceName[j] = "dance_cm3d2_001_f2.anm";
  8378. }
  8379. else
  8380. {
  8381. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8382. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8383. danceName[j] = "dance_cm3d2_001_f3.anm";
  8384. }
  8385. }
  8386. else
  8387. {
  8388. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8389. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8390. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8391. }
  8392. }
  8393. }
  8394. isDanceStart1 = false;
  8395. isDanceStart1F = true;
  8396. isShift = false;
  8397. }
  8398. if (isDanceStart2)
  8399. {
  8400. for (int j = 0; j < maidCnt; j++)
  8401. {
  8402. if (maidArray[j] && maidArray[j].Visible)
  8403. {
  8404. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8406. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8407. danceName[j] = "dance_cm3d_001_f1.anm";
  8408. }
  8409. }
  8410. isDanceStart2 = false;
  8411. isDanceStart2F = true;
  8412. }
  8413. if (isDanceStart3)
  8414. {
  8415. for (int j = 0; j < maidCnt; j++)
  8416. {
  8417. if (maidArray[j] && maidArray[j].Visible)
  8418. {
  8419. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8420. if (!isShift)
  8421. {
  8422. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8423. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8424. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8425. }
  8426. else
  8427. {
  8428. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8429. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8430. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8431. }
  8432. }
  8433. }
  8434. isDanceStart3 = false;
  8435. isDanceStart3F = true;
  8436. isShift = false;
  8437. }
  8438. if (isDanceStart4)
  8439. {
  8440. for (int j = 0; j < maidCnt; j++)
  8441. {
  8442. if (maidArray[j] && maidArray[j].Visible)
  8443. {
  8444. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8445. if (!isShift)
  8446. {
  8447. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8448. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8449. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8450. }
  8451. else
  8452. {
  8453. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8454. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8455. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8456. }
  8457. }
  8458. }
  8459. isDanceStart4 = false;
  8460. isDanceStart4F = true;
  8461. isShift = false;
  8462. }
  8463. if (isDanceStart5)
  8464. {
  8465. for (int j = 0; j < maidCnt; j++)
  8466. {
  8467. if (maidArray[j] && maidArray[j].Visible)
  8468. {
  8469. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8470. if (!isShift)
  8471. {
  8472. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8473. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8474. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8475. }
  8476. else
  8477. {
  8478. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8479. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8480. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8481. }
  8482. }
  8483. }
  8484. isDanceStart5 = false;
  8485. isDanceStart5F = true;
  8486. isShift = false;
  8487. }
  8488. if (isDanceStart6)
  8489. {
  8490. for (int j = 0; j < maidCnt; j++)
  8491. {
  8492. if (maidArray[j] && maidArray[j].Visible)
  8493. {
  8494. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8495. if (!isShift)
  8496. {
  8497. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8498. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8499. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8500. }
  8501. else
  8502. {
  8503. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8504. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8505. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8506. }
  8507. }
  8508. }
  8509. isDanceStart6 = false;
  8510. isDanceStart6F = true;
  8511. isShift = false;
  8512. }
  8513. if (isDanceStart7)
  8514. {
  8515. for (int j = 0; j < maidCnt; j++)
  8516. {
  8517. if (maidArray[j] && maidArray[j].Visible)
  8518. {
  8519. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8520. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8521. {
  8522. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8523. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8524. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8525. }
  8526. else
  8527. {
  8528. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8529. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8530. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8531. }
  8532. }
  8533. }
  8534. isDanceStart7 = false;
  8535. isDanceStart7V = true;
  8536. isDanceStart7F = true;
  8537. }
  8538. if (isDanceStart8)
  8539. {
  8540. for (int j = 0; j < maidCnt; j++)
  8541. {
  8542. if (maidArray[j] && maidArray[j].Visible)
  8543. {
  8544. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8545. if (j == 0 || j == 4 || j == 8 || j == 12)
  8546. {
  8547. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8548. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8549. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8550. }
  8551. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8552. {
  8553. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8554. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8555. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8556. }
  8557. else if (j == 2 || j == 6 || j == 10)
  8558. {
  8559. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8560. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8561. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8562. }
  8563. else
  8564. {
  8565. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8566. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8567. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8568. }
  8569. }
  8570. }
  8571. isDanceStart8 = false;
  8572. isDanceStart8V = true;
  8573. isDanceStart8F = true;
  8574. }
  8575. if (isDanceStart9)
  8576. {
  8577. isDanceStart9Count++;
  8578. if (isShift)
  8579. {
  8580. for (int j = 0; j < maidCnt; j++)
  8581. {
  8582. if (maidArray[j] && maidArray[j].Visible)
  8583. {
  8584. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8585. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8586. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8587. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8588. }
  8589. }
  8590. isDanceStart9 = false;
  8591. isDanceStart9F = true;
  8592. isDanceStart9Count = 0;
  8593. isShift = false;
  8594. }
  8595. if (isDanceStart9Count == 10)
  8596. {
  8597. for (int j = 0; j < maidCnt; j++)
  8598. {
  8599. if (maidArray[j] && maidArray[j].Visible)
  8600. {
  8601. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8602. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8603. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8604. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8605. }
  8606. }
  8607. isDanceStart9 = false;
  8608. isDanceStart9F = true;
  8609. isDanceStart9Count = 0;
  8610. }
  8611. }
  8612. if (isDanceStart10)
  8613. {
  8614. for (int j = 0; j < maidCnt; j++)
  8615. {
  8616. if (maidArray[j] && maidArray[j].Visible)
  8617. {
  8618. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8619. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8620. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8621. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8622. }
  8623. }
  8624. isDanceStart10 = false;
  8625. isDanceStart10F = true;
  8626. }
  8627. if (isDanceStart11)
  8628. {
  8629. for (int j = 0; j < maidCnt; j++)
  8630. {
  8631. if (maidArray[j] && maidArray[j].Visible)
  8632. {
  8633. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8634. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8635. {
  8636. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8637. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8638. danceName[j] = nameA + danceNo2 + ".anm";
  8639. }
  8640. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8641. {
  8642. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8643. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8644. danceName[j] = nameA + danceNo3 + ".anm";
  8645. }
  8646. else
  8647. {
  8648. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8649. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8650. danceName[j] = nameA + danceNo1 + ".anm";
  8651. }
  8652. }
  8653. }
  8654. isDanceStart11 = false;
  8655. isDanceStart11V = true;
  8656. isDanceStart11F = true;
  8657. }
  8658. if (isDanceStart12)
  8659. {
  8660. for (int j = 0; j < maidCnt; j++)
  8661. {
  8662. if (maidArray[j] && maidArray[j].Visible)
  8663. {
  8664. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8666. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8667. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8668. }
  8669. }
  8670. isDanceStart12 = false;
  8671. isDanceStart12F = true;
  8672. }
  8673. if (isDanceStart13)
  8674. {
  8675. for (int j = 0; j < maidCnt; j++)
  8676. {
  8677. if (maidArray[j] && maidArray[j].Visible)
  8678. {
  8679. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8680. if (!isShift)
  8681. {
  8682. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8683. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8684. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8685. }
  8686. else
  8687. {
  8688. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8689. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8690. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8691. }
  8692. }
  8693. }
  8694. isDanceStart13 = false;
  8695. isDanceStart13F = true;
  8696. isShift = false;
  8697. }
  8698. if (isDanceStart14)
  8699. {
  8700. for (int j = 0; j < maidCnt; j++)
  8701. {
  8702. if (maidArray[j] && maidArray[j].Visible)
  8703. {
  8704. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8705. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8706. {
  8707. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8708. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8709. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8710. }
  8711. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8712. {
  8713. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8714. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8715. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8716. }
  8717. else
  8718. {
  8719. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8720. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8721. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8722. }
  8723. }
  8724. }
  8725. isDanceStart14 = false;
  8726. isDanceStart14V = true;
  8727. isDanceStart14F = true;
  8728. }
  8729. if (isDanceStart15)
  8730. {
  8731. isDanceStart15Count++;
  8732. }
  8733. if (isDanceStart15Count == 10)
  8734. {
  8735. for (int j = 0; j < maidCnt; j++)
  8736. {
  8737. if (maidArray[j] && maidArray[j].Visible)
  8738. {
  8739. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8740. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8741. {
  8742. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8743. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8744. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8745. }
  8746. else
  8747. {
  8748. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8749. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8750. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8751. }
  8752. }
  8753. }
  8754. isDanceStart15 = false;
  8755. isDanceStart15V = true;
  8756. isDanceStart15F = true;
  8757. isDanceStart15Count = 0;
  8758. }
  8759. if (isDance)
  8760. {
  8761. for (int j = 0; j < maidCnt; j++)
  8762. {
  8763. if (maidArray[j].Visible)
  8764. {
  8765. if (isDanceStart1F)
  8766. {
  8767. if (isDanceStart1K)
  8768. {
  8769. foreach (string text3 in dance1KArray)
  8770. {
  8771. string[] array = text3.Split(new char[] { ',' });
  8772. float num10 = float.Parse(array[0]);
  8773. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8774. {
  8775. danceFace[j] = num10;
  8776. FaceName[j] = FaceName2[j];
  8777. FaceName2[j] = array[1];
  8778. FaceName3[j] = array[2];
  8779. FaceTime[j] = 0.0166666675f;
  8780. break;
  8781. }
  8782. }
  8783. }
  8784. else if (j == 0)
  8785. {
  8786. foreach (string text3 in dance1Array)
  8787. {
  8788. string[] array = text3.Split(new char[] { ',' });
  8789. float num10 = float.Parse(array[0]);
  8790. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8791. {
  8792. danceFace[j] = num10;
  8793. FaceName[j] = FaceName2[j];
  8794. FaceName2[j] = array[1];
  8795. FaceName3[j] = array[2];
  8796. FaceTime[j] = 0.0166666675f;
  8797. break;
  8798. }
  8799. }
  8800. }
  8801. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8802. {
  8803. foreach (string text3 in dance1BArray)
  8804. {
  8805. string[] array = text3.Split(new char[] { ',' });
  8806. float num10 = float.Parse(array[0]);
  8807. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8808. {
  8809. danceFace[j] = num10;
  8810. FaceName[j] = FaceName2[j];
  8811. FaceName2[j] = array[1];
  8812. FaceName3[j] = array[2];
  8813. FaceTime[j] = 0.0166666675f;
  8814. break;
  8815. }
  8816. }
  8817. }
  8818. else
  8819. {
  8820. foreach (string text3 in dance1CArray)
  8821. {
  8822. string[] array = text3.Split(new char[] { ',' });
  8823. float num10 = float.Parse(array[0]);
  8824. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8825. {
  8826. danceFace[j] = num10;
  8827. FaceName[j] = FaceName2[j];
  8828. FaceName2[j] = array[1];
  8829. FaceName3[j] = array[2];
  8830. FaceTime[j] = 0.0166666675f;
  8831. break;
  8832. }
  8833. }
  8834. }
  8835. }
  8836. if (isDanceStart2F)
  8837. {
  8838. foreach (string text3 in dance2Array)
  8839. {
  8840. string[] array = text3.Split(new char[] { ',' });
  8841. float num10 = float.Parse(array[0]);
  8842. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8843. {
  8844. danceFace[j] = num10;
  8845. FaceName[j] = FaceName2[j];
  8846. FaceName2[j] = array[1];
  8847. FaceName3[j] = array[2];
  8848. FaceTime[j] = 0.0166666675f;
  8849. break;
  8850. }
  8851. }
  8852. }
  8853. if (isDanceStart3F)
  8854. {
  8855. if (isDanceStart3K)
  8856. {
  8857. foreach (string text3 in dance3KArray)
  8858. {
  8859. string[] array = text3.Split(new char[] { ',' });
  8860. float num10 = float.Parse(array[0]);
  8861. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8862. {
  8863. danceFace[j] = num10;
  8864. FaceName[j] = FaceName2[j];
  8865. FaceName2[j] = array[1];
  8866. FaceName3[j] = array[2];
  8867. FaceTime[j] = 0.0166666675f;
  8868. break;
  8869. }
  8870. }
  8871. }
  8872. else
  8873. {
  8874. foreach (string text3 in dance3Array)
  8875. {
  8876. string[] array = text3.Split(new char[] { ',' });
  8877. float num10 = float.Parse(array[0]);
  8878. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8879. {
  8880. danceFace[j] = num10;
  8881. FaceName[j] = FaceName2[j];
  8882. FaceName2[j] = array[1];
  8883. FaceName3[j] = array[2];
  8884. FaceTime[j] = 0.0166666675f;
  8885. break;
  8886. }
  8887. }
  8888. }
  8889. }
  8890. if (isDanceStart4F)
  8891. {
  8892. if (isDanceStart4K)
  8893. {
  8894. foreach (string text3 in dance4KArray)
  8895. {
  8896. string[] array = text3.Split(new char[] { ',' });
  8897. float num10 = float.Parse(array[0]);
  8898. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8899. {
  8900. danceFace[j] = num10;
  8901. FaceName[j] = FaceName2[j];
  8902. FaceName2[j] = array[1];
  8903. FaceName3[j] = array[2];
  8904. FaceTime[j] = 0.0166666675f;
  8905. break;
  8906. }
  8907. }
  8908. }
  8909. else
  8910. {
  8911. foreach (string text3 in dance4Array)
  8912. {
  8913. string[] array = text3.Split(new char[] { ',' });
  8914. float num10 = float.Parse(array[0]);
  8915. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8916. {
  8917. danceFace[j] = num10;
  8918. FaceName[j] = FaceName2[j];
  8919. FaceName2[j] = array[1];
  8920. FaceName3[j] = array[2];
  8921. FaceTime[j] = 0.0166666675f;
  8922. break;
  8923. }
  8924. }
  8925. }
  8926. }
  8927. if (isDanceStart5F)
  8928. {
  8929. if (isDanceStart5K)
  8930. {
  8931. foreach (string text3 in dance5KArray)
  8932. {
  8933. string[] array = text3.Split(new char[] { ',' });
  8934. float num10 = float.Parse(array[0]);
  8935. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8936. {
  8937. danceFace[j] = num10;
  8938. FaceName[j] = FaceName2[j];
  8939. FaceName2[j] = array[1];
  8940. FaceName3[j] = array[2];
  8941. FaceTime[j] = 0.0166666675f;
  8942. break;
  8943. }
  8944. }
  8945. }
  8946. else
  8947. {
  8948. foreach (string text3 in dance5Array)
  8949. {
  8950. string[] array = text3.Split(new char[] { ',' });
  8951. float num10 = float.Parse(array[0]);
  8952. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8953. {
  8954. danceFace[j] = num10;
  8955. FaceName[j] = FaceName2[j];
  8956. FaceName2[j] = array[1];
  8957. FaceName3[j] = array[2];
  8958. FaceTime[j] = 0.0166666675f;
  8959. break;
  8960. }
  8961. }
  8962. }
  8963. }
  8964. if (isDanceStart6F)
  8965. {
  8966. if (isDanceStart6K)
  8967. {
  8968. foreach (string text3 in dance6KArray)
  8969. {
  8970. string[] array = text3.Split(new char[] { ',' });
  8971. float num10 = float.Parse(array[0]);
  8972. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8973. {
  8974. danceFace[j] = num10;
  8975. FaceName[j] = FaceName2[j];
  8976. FaceName2[j] = array[1];
  8977. FaceName3[j] = array[2];
  8978. FaceTime[j] = 0.0166666675f;
  8979. break;
  8980. }
  8981. }
  8982. }
  8983. else
  8984. {
  8985. foreach (string text3 in dance6Array)
  8986. {
  8987. string[] array = text3.Split(new char[] { ',' });
  8988. float num10 = float.Parse(array[0]);
  8989. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8990. {
  8991. danceFace[j] = num10;
  8992. FaceName[j] = FaceName2[j];
  8993. FaceName2[j] = array[1];
  8994. FaceName3[j] = array[2];
  8995. FaceTime[j] = 0.0166666675f;
  8996. break;
  8997. }
  8998. }
  8999. }
  9000. }
  9001. if (isDanceStart7F)
  9002. {
  9003. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9004. {
  9005. foreach (string text3 in dance6BArray)
  9006. {
  9007. string[] array = text3.Split(new char[] { ',' });
  9008. float num10 = float.Parse(array[0]);
  9009. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9010. {
  9011. danceFace[j] = num10;
  9012. FaceName[j] = FaceName2[j];
  9013. FaceName2[j] = array[1];
  9014. FaceName3[j] = array[2];
  9015. FaceTime[j] = 0.0166666675f;
  9016. break;
  9017. }
  9018. }
  9019. }
  9020. else
  9021. {
  9022. foreach (string text3 in dance6Array)
  9023. {
  9024. string[] array = text3.Split(new char[] { ',' });
  9025. float num10 = float.Parse(array[0]);
  9026. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9027. {
  9028. danceFace[j] = num10;
  9029. FaceName[j] = FaceName2[j];
  9030. FaceName2[j] = array[1];
  9031. FaceName3[j] = array[2];
  9032. FaceTime[j] = 0.0166666675f;
  9033. break;
  9034. }
  9035. }
  9036. }
  9037. }
  9038. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9039. {
  9040. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9041. {
  9042. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9043. }
  9044. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9045. {
  9046. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9047. 100f,
  9048. maidArray[j - 1].transform.position.z));
  9049. }
  9050. }
  9051. if (isDanceStart8F)
  9052. {
  9053. if (j == 1 || j == 5 || j == 9 || j == 13)
  9054. {
  9055. foreach (string text3 in dance6BArray)
  9056. {
  9057. string[] array = text3.Split(new char[] { ',' });
  9058. float num10 = float.Parse(array[0]);
  9059. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9060. {
  9061. danceFace[j] = num10;
  9062. FaceName[j] = FaceName2[j];
  9063. FaceName2[j] = array[1];
  9064. FaceName3[j] = array[2];
  9065. FaceTime[j] = 0.0166666675f;
  9066. break;
  9067. }
  9068. }
  9069. }
  9070. else if (j == 2 || j == 6 || j == 10)
  9071. {
  9072. foreach (string text3 in dance6CArray)
  9073. {
  9074. string[] array = text3.Split(new char[] { ',' });
  9075. float num10 = float.Parse(array[0]);
  9076. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9077. {
  9078. danceFace[j] = num10;
  9079. FaceName[j] = FaceName2[j];
  9080. FaceName2[j] = array[1];
  9081. FaceName3[j] = array[2];
  9082. FaceTime[j] = 0.0166666675f;
  9083. break;
  9084. }
  9085. }
  9086. }
  9087. else if (j == 3 || j == 9 || j == 11)
  9088. {
  9089. foreach (string text3 in dance6DArray)
  9090. {
  9091. string[] array = text3.Split(new char[] { ',' });
  9092. float num10 = float.Parse(array[0]);
  9093. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9094. {
  9095. danceFace[j] = num10;
  9096. FaceName[j] = FaceName2[j];
  9097. FaceName2[j] = array[1];
  9098. FaceName3[j] = array[2];
  9099. FaceTime[j] = 0.0166666675f;
  9100. break;
  9101. }
  9102. }
  9103. }
  9104. else
  9105. {
  9106. foreach (string text3 in dance6Array)
  9107. {
  9108. string[] array = text3.Split(new char[] { ',' });
  9109. float num10 = float.Parse(array[0]);
  9110. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9111. {
  9112. danceFace[j] = num10;
  9113. FaceName[j] = FaceName2[j];
  9114. FaceName2[j] = array[1];
  9115. FaceName3[j] = array[2];
  9116. FaceTime[j] = 0.0166666675f;
  9117. break;
  9118. }
  9119. }
  9120. }
  9121. }
  9122. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9123. {
  9124. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9125. {
  9126. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9127. }
  9128. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9129. {
  9130. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9131. 100f,
  9132. maidArray[j - 1].transform.position.z));
  9133. }
  9134. }
  9135. if (isDanceStart8V)
  9136. {
  9137. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9138. {
  9139. isDanceStart8P = true;
  9140. for (int num11 = 0; num11 < maidCnt; num11++)
  9141. {
  9142. if (maidArray[num11].Visible)
  9143. {
  9144. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9145. {
  9146. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9147. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9148. gameObject6.transform.position =
  9149. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9150. .position;
  9151. }
  9152. }
  9153. }
  9154. }
  9155. }
  9156. if (isDanceStart9F)
  9157. {
  9158. if (isDanceStart9K)
  9159. {
  9160. foreach (string text3 in dance9KArray)
  9161. {
  9162. string[] array = text3.Split(new char[] { ',' });
  9163. float num10 = float.Parse(array[0]);
  9164. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9165. {
  9166. danceFace[j] = num10;
  9167. FaceName[j] = FaceName2[j];
  9168. FaceName2[j] = array[1];
  9169. FaceName3[j] = array[2];
  9170. FaceTime[j] = 0.0166666675f;
  9171. break;
  9172. }
  9173. }
  9174. }
  9175. else
  9176. {
  9177. foreach (string text3 in dance7Array)
  9178. {
  9179. string[] array = text3.Split(new char[] { ',' });
  9180. float num10 = float.Parse(array[0]);
  9181. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9182. {
  9183. danceFace[j] = num10;
  9184. FaceName[j] = FaceName2[j];
  9185. FaceName2[j] = array[1];
  9186. FaceName3[j] = array[2];
  9187. FaceTime[j] = 0.0166666675f;
  9188. break;
  9189. }
  9190. }
  9191. }
  9192. }
  9193. if (isDanceStart10F)
  9194. {
  9195. foreach (string text3 in danceO1Array)
  9196. {
  9197. string[] array = text3.Split(new char[] { ',' });
  9198. float num10 = float.Parse(array[0]);
  9199. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9200. {
  9201. danceFace[j] = num10;
  9202. FaceName[j] = FaceName2[j];
  9203. FaceName2[j] = array[1];
  9204. FaceName3[j] = array[2];
  9205. FaceTime[j] = 0.0166666675f;
  9206. break;
  9207. }
  9208. }
  9209. }
  9210. if (isDanceStart11F)
  9211. {
  9212. string[] array14 = null;
  9213. string[] array12 = null;
  9214. string[] array15 = null;
  9215. if (isSS1)
  9216. {
  9217. array14 = danceO1Array;
  9218. array12 = danceO1CArray;
  9219. array15 = danceO1BArray;
  9220. }
  9221. if (isSS2)
  9222. {
  9223. array14 = danceO2Array;
  9224. array12 = danceO2BArray;
  9225. array15 = danceO2CArray;
  9226. }
  9227. if (isSS3)
  9228. {
  9229. array14 = danceO3CArray;
  9230. array12 = danceO3Array;
  9231. array15 = danceO3BArray;
  9232. }
  9233. if (isSS4)
  9234. {
  9235. array14 = danceO5BArray;
  9236. array12 = danceO5Array;
  9237. array15 = danceO5CArray;
  9238. }
  9239. if (isSS5)
  9240. {
  9241. array14 = danceO4Array;
  9242. array12 = danceO4BArray;
  9243. array15 = danceO4CArray;
  9244. }
  9245. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9246. {
  9247. foreach (string text3 in array12)
  9248. {
  9249. string[] array = text3.Split(new char[] { ',' });
  9250. float num10 = float.Parse(array[0]) - 0.03f;
  9251. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9252. {
  9253. danceFace[j] = num10;
  9254. FaceName[j] = FaceName2[j];
  9255. FaceName2[j] = array[1];
  9256. FaceName3[j] = array[2];
  9257. FaceTime[j] = 0.0166666675f;
  9258. break;
  9259. }
  9260. }
  9261. }
  9262. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9263. {
  9264. foreach (string text3 in array15)
  9265. {
  9266. string[] array = text3.Split(new char[] { ',' });
  9267. float num10 = float.Parse(array[0]) - 0.03f;
  9268. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9269. {
  9270. danceFace[j] = num10;
  9271. FaceName[j] = FaceName2[j];
  9272. FaceName2[j] = array[1];
  9273. FaceName3[j] = array[2];
  9274. FaceTime[j] = 0.0166666675f;
  9275. break;
  9276. }
  9277. }
  9278. }
  9279. else
  9280. {
  9281. foreach (string text3 in array14)
  9282. {
  9283. string[] array = text3.Split(new char[] { ',' });
  9284. float num10 = float.Parse(array[0]) - 0.03f;
  9285. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9286. {
  9287. danceFace[j] = num10;
  9288. FaceName[j] = FaceName2[j];
  9289. FaceName2[j] = array[1];
  9290. FaceName3[j] = array[2];
  9291. FaceTime[j] = 0.0166666675f;
  9292. break;
  9293. }
  9294. }
  9295. }
  9296. }
  9297. if (isDanceStart12F)
  9298. {
  9299. foreach (string text3 in dance12Array)
  9300. {
  9301. string[] array = text3.Split(new char[] { ',' });
  9302. float num10 = float.Parse(array[0]);
  9303. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9304. {
  9305. danceFace[j] = num10;
  9306. FaceName[j] = FaceName2[j];
  9307. FaceName2[j] = array[1];
  9308. FaceName3[j] = array[2];
  9309. FaceTime[j] = 0.0166666675f;
  9310. break;
  9311. }
  9312. }
  9313. }
  9314. if (isDanceStart13F)
  9315. {
  9316. if (!isDanceStart13K)
  9317. {
  9318. foreach (string text3 in dance13Array)
  9319. {
  9320. string[] array = text3.Split(new char[] { ',' });
  9321. float num10 = float.Parse(array[0]);
  9322. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9323. {
  9324. danceFace[j] = num10;
  9325. FaceName[j] = FaceName2[j];
  9326. FaceName2[j] = array[1];
  9327. FaceName3[j] = array[2];
  9328. FaceTime[j] = 0.0166666675f;
  9329. break;
  9330. }
  9331. }
  9332. }
  9333. }
  9334. if (isDanceStart14F)
  9335. {
  9336. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9337. {
  9338. foreach (string text3 in dance13BArray)
  9339. {
  9340. string[] array = text3.Split(new char[] { ',' });
  9341. float num10 = float.Parse(array[0]);
  9342. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9343. {
  9344. danceFace[j] = num10;
  9345. FaceName[j] = FaceName2[j];
  9346. FaceName2[j] = array[1];
  9347. FaceName3[j] = array[2];
  9348. FaceTime[j] = 0.0166666675f;
  9349. break;
  9350. }
  9351. }
  9352. }
  9353. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9354. {
  9355. foreach (string text3 in dance13CArray)
  9356. {
  9357. string[] array = text3.Split(new char[] { ',' });
  9358. float num10 = float.Parse(array[0]);
  9359. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9360. {
  9361. danceFace[j] = num10;
  9362. FaceName[j] = FaceName2[j];
  9363. FaceName2[j] = array[1];
  9364. FaceName3[j] = array[2];
  9365. FaceTime[j] = 0.0166666675f;
  9366. break;
  9367. }
  9368. }
  9369. }
  9370. else
  9371. {
  9372. foreach (string text3 in dance13Array)
  9373. {
  9374. string[] array = text3.Split(new char[] { ',' });
  9375. float num10 = float.Parse(array[0]);
  9376. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9377. {
  9378. danceFace[j] = num10;
  9379. FaceName[j] = FaceName2[j];
  9380. FaceName2[j] = array[1];
  9381. FaceName3[j] = array[2];
  9382. FaceTime[j] = 0.0166666675f;
  9383. break;
  9384. }
  9385. }
  9386. }
  9387. }
  9388. if (isDanceStart15F)
  9389. {
  9390. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9391. {
  9392. foreach (string text3 in dance15BArray)
  9393. {
  9394. string[] array = text3.Split(new char[] { ',' });
  9395. float num10 = float.Parse(array[0]);
  9396. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9397. {
  9398. danceFace[j] = num10;
  9399. FaceName[j] = FaceName2[j];
  9400. FaceName2[j] = array[1];
  9401. FaceName3[j] = array[2];
  9402. FaceTime[j] = 0.0166666675f;
  9403. break;
  9404. }
  9405. }
  9406. }
  9407. else
  9408. {
  9409. foreach (string text3 in dance15Array)
  9410. {
  9411. string[] array = text3.Split(new char[] { ',' });
  9412. float num10 = float.Parse(array[0]);
  9413. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9414. {
  9415. danceFace[j] = num10;
  9416. FaceName[j] = FaceName2[j];
  9417. FaceName2[j] = array[1];
  9418. FaceName3[j] = array[2];
  9419. FaceTime[j] = 0.0166666675f;
  9420. break;
  9421. }
  9422. }
  9423. }
  9424. }
  9425. if (!isFadeOut)
  9426. {
  9427. Maid maid = maidArray[j];
  9428. if (maid && maid.Visible)
  9429. {
  9430. if (maid.transform.position.y != 100f)
  9431. {
  9432. FaceTime[j] += Time.deltaTime;
  9433. if (FaceTime[j] < 1f)
  9434. {
  9435. TMorph morph = maid.body0.Face.morph;
  9436. maid.boMabataki = false;
  9437. maid.body0.Face.morph.EyeMabataki = 0f;
  9438. if (FaceName[j] != string.Empty)
  9439. {
  9440. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9441. }
  9442. if (FaceName2[j] != "")
  9443. {
  9444. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9445. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9446. }
  9447. if (FaceName3[j] != string.Empty)
  9448. {
  9449. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9450. }
  9451. maid.body0.Face.morph.FixBlendValues_Face();
  9452. }
  9453. else
  9454. {
  9455. FaceName[j] = FaceName2[j];
  9456. }
  9457. if (isHenkou)
  9458. {
  9459. TMorph morph = maid.body0.Face.morph;
  9460. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9461. maid.boMabataki = false;
  9462. if (isNamidaH)
  9463. {
  9464. fieldValue[(int)morph.hash["namida"]] = 1f;
  9465. }
  9466. else
  9467. {
  9468. fieldValue[(int)morph.hash["namida"]] = 0f;
  9469. }
  9470. if (isSekimenH)
  9471. {
  9472. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9473. }
  9474. else
  9475. {
  9476. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9477. }
  9478. if (isHohoH)
  9479. {
  9480. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9481. }
  9482. else
  9483. {
  9484. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9485. }
  9486. maid.body0.Face.morph.FixBlendValues_Face();
  9487. }
  9488. }
  9489. }
  9490. }
  9491. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9492. }
  9493. }
  9494. if (Input.GetKey(KeyCode.H) || isVR)
  9495. {
  9496. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9497. {
  9498. h2Flg = true;
  9499. isNamidaH = !isNamidaH;
  9500. isHenkou = true;
  9501. }
  9502. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9503. {
  9504. h2Flg = true;
  9505. isSekimenH = !isSekimenH;
  9506. isHenkou = true;
  9507. }
  9508. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9509. {
  9510. h2Flg = true;
  9511. isHohoH = !isHohoH;
  9512. isHenkou = true;
  9513. }
  9514. }
  9515. danceCheckIndex++;
  9516. if (danceCheckIndex == 10)
  9517. {
  9518. danceCheckIndex = 0;
  9519. }
  9520. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9521. isDanceChu = false;
  9522. for (int k = 0; k < danceCheck.Length; k++)
  9523. {
  9524. if (danceCheck[k] > 0f)
  9525. {
  9526. isDanceChu = true;
  9527. break;
  9528. }
  9529. }
  9530. if (!isDanceChu)
  9531. {
  9532. danceWait--;
  9533. if (danceWait > 0)
  9534. {
  9535. isDanceChu = true;
  9536. }
  9537. }
  9538. if (!isDanceChu)
  9539. {
  9540. for (int j = 0; j < maidCnt; j++)
  9541. {
  9542. if (maidArray[j] && maidArray[j].Visible)
  9543. {
  9544. maidArray[j].StopKuchipakuPattern();
  9545. if (isDanceStart7V)
  9546. {
  9547. maidArray[j].SetPos(dancePos[j]);
  9548. maidArray[j].body0.transform.localRotation = danceRot[j];
  9549. }
  9550. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9551. {
  9552. maidArray[j].SetPos(dancePos[j]);
  9553. maidArray[j].body0.transform.localRotation = danceRot[j];
  9554. }
  9555. if (isDanceStart11V)
  9556. {
  9557. maidArray[j].SetPos(dancePos[j]);
  9558. maidArray[j].body0.transform.localRotation = danceRot[j];
  9559. }
  9560. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9561. || isDanceStart13K)
  9562. {
  9563. maidArray[j].SetPos(dancePos[j]);
  9564. maidArray[j].body0.transform.localRotation = danceRot[j];
  9565. int i = j;
  9566. if (!isVR)
  9567. {
  9568. delCount[i] = 20;
  9569. if (goSlot[(int)selectList[i]] != null)
  9570. {
  9571. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9572. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9573. {
  9574. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9575. }
  9576. }
  9577. }
  9578. Maid maid = maidArray[j];
  9579. maid.DelProp(MPN.handitem, true);
  9580. maid.DelProp(MPN.accvag, true);
  9581. maid.DelProp(MPN.accanl, true);
  9582. maid.DelProp(MPN.kousoku_upper, true);
  9583. maid.DelProp(MPN.kousoku_lower, true);
  9584. maid.AllProcPropSeqStart();
  9585. isStop[i] = true;
  9586. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9587. isPoseIti[i] = true;
  9588. poseIti[i] = maidArray[i].transform.position;
  9589. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9590. }
  9591. if (isDanceStart14V)
  9592. {
  9593. maidArray[j].SetPos(dancePos[j]);
  9594. maidArray[j].body0.transform.localRotation = danceRot[j];
  9595. }
  9596. if (isDanceStart15V)
  9597. {
  9598. maidArray[j].SetPos(dancePos[j]);
  9599. maidArray[j].body0.transform.localRotation = danceRot[j];
  9600. }
  9601. }
  9602. }
  9603. isDanceStart1F = false;
  9604. isDanceStart1K = false;
  9605. isDanceStart2F = false;
  9606. isDanceStart3F = false;
  9607. isDanceStart3K = false;
  9608. isDanceStart4F = false;
  9609. isDanceStart4K = false;
  9610. isDanceStart5F = false;
  9611. isDanceStart5K = false;
  9612. isDanceStart6F = false;
  9613. isDanceStart6K = false;
  9614. isDanceStart7F = false;
  9615. isDanceStart7V = false;
  9616. isDanceStart8F = false;
  9617. isDanceStart8V = false;
  9618. isDanceStart8P = false;
  9619. isDanceStart9F = false;
  9620. isDanceStart9K = false;
  9621. isDanceStart10F = false;
  9622. isDanceStart11F = false;
  9623. isDanceStart11V = false;
  9624. isDanceStart12F = false;
  9625. isDanceStart13F = false;
  9626. isDanceStart13K = false;
  9627. isDanceStart14F = false;
  9628. isDanceStart14V = false;
  9629. isDanceStart15F = false;
  9630. isDanceStart15V = false;
  9631. for (int j = 0; j < maidCnt; j++)
  9632. {
  9633. danceFace[j] = 0f;
  9634. }
  9635. danceCheckIndex = 0;
  9636. for (int k = 0; k < danceCheck.Length; k++)
  9637. {
  9638. danceCheck[danceCheckIndex] = 1f;
  9639. }
  9640. isDance = false;
  9641. }
  9642. }
  9643. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9644. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9645. {
  9646. if (getModKeyPressing(modKey.Shift))
  9647. {
  9648. isShift = true;
  9649. }
  9650. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9651. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9652. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9653. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9654. if (!isShift)
  9655. {
  9656. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9657. }
  9658. for (int j = 0; j < maidCnt; j++)
  9659. {
  9660. string text5 = "dance_cm3d2_001_f1.anm";
  9661. switch (j)
  9662. {
  9663. case 1:
  9664. case 3:
  9665. case 5:
  9666. case 7:
  9667. case 9:
  9668. case 11:
  9669. case 13:
  9670. text5 = "dance_cm3d2_001_f2.anm";
  9671. break;
  9672. case 2:
  9673. case 4:
  9674. case 6:
  9675. case 8:
  9676. case 10:
  9677. case 12:
  9678. text5 = "dance_cm3d2_001_f3.anm";
  9679. break;
  9680. }
  9681. if (!isShift)
  9682. {
  9683. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9684. {
  9685. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9686. }
  9687. }
  9688. else
  9689. {
  9690. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9691. {
  9692. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9693. GameUty.FileSystem,
  9694. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9695. false,
  9696. false);
  9697. }
  9698. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9699. text4 = textAsset.text;
  9700. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9701. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9702. && !isDanceStart9K && !isDanceStart13K)
  9703. {
  9704. dancePos[j] = maidArray[j].transform.position;
  9705. danceRot[j] = maidArray[j].transform.localRotation;
  9706. }
  9707. }
  9708. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9709. }
  9710. if (!isShift)
  9711. {
  9712. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9713. sw = new Stopwatch();
  9714. sw.Start();
  9715. }
  9716. else if (getModKeyPressing(modKey.Ctrl))
  9717. {
  9718. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9719. }
  9720. else
  9721. {
  9722. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9723. }
  9724. for (int j = 0; j < maidCnt; j++)
  9725. {
  9726. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9727. Vector3 vector = Vector3.zero;
  9728. switch (j)
  9729. {
  9730. case 3:
  9731. vector.x = 1f;
  9732. break;
  9733. case 4:
  9734. vector.x = -1f;
  9735. break;
  9736. case 5:
  9737. vector.x = 2f;
  9738. break;
  9739. case 6:
  9740. vector.x = -2f;
  9741. break;
  9742. case 7:
  9743. vector.x = 3f;
  9744. break;
  9745. case 8:
  9746. vector.x = -3f;
  9747. break;
  9748. case 9:
  9749. vector.x = 4f;
  9750. break;
  9751. case 10:
  9752. vector.x = -4f;
  9753. break;
  9754. case 11:
  9755. vector.x = 5f;
  9756. break;
  9757. case 12:
  9758. vector.x = -5f;
  9759. break;
  9760. case 13:
  9761. vector.x = 6f;
  9762. break;
  9763. }
  9764. if (!isShift)
  9765. {
  9766. maidArray[j].SetPos(vector);
  9767. }
  9768. isStop[j] = false;
  9769. isLock[j] = false;
  9770. pHandL[j] = 0;
  9771. pHandR[j] = 0;
  9772. muneIKL[j] = false;
  9773. muneIKR[j] = false;
  9774. if (!isVR)
  9775. {
  9776. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9777. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9778. }
  9779. }
  9780. ikBui = 5;
  9781. isDanceStart1F = false;
  9782. isDanceStart2F = false;
  9783. isDanceStart3F = false;
  9784. isDanceStart4F = false;
  9785. isDanceStart5F = false;
  9786. isDanceStart6F = false;
  9787. isDanceStart7F = false;
  9788. isDanceStart8F = false;
  9789. isDanceStart9F = false;
  9790. isDanceStart10F = false;
  9791. isDanceStart11F = false;
  9792. isDanceStart12F = false;
  9793. isDanceStart13F = false;
  9794. isDanceStart14F = false;
  9795. isDanceStart15F = false;
  9796. for (int j = 0; j < maidCnt; j++)
  9797. {
  9798. danceFace[j] = 0f;
  9799. }
  9800. if (isDanceStart7V)
  9801. {
  9802. for (int j = 0; j < maidCnt; j++)
  9803. {
  9804. if (maidArray[j] && maidArray[j].Visible)
  9805. {
  9806. if (isDanceStart7V)
  9807. {
  9808. maidArray[j].SetPos(dancePos[j]);
  9809. maidArray[j].body0.transform.localRotation = danceRot[j];
  9810. }
  9811. }
  9812. }
  9813. isDanceStart7V = false;
  9814. }
  9815. if (isDanceStart8V)
  9816. {
  9817. for (int j = 0; j < maidCnt; j++)
  9818. {
  9819. if (maidArray[j] && maidArray[j].Visible)
  9820. {
  9821. if (isDanceStart8V)
  9822. {
  9823. maidArray[j].SetPos(dancePos[j]);
  9824. maidArray[j].body0.transform.localRotation = danceRot[j];
  9825. }
  9826. }
  9827. }
  9828. isDanceStart8V = false;
  9829. isDanceStart8P = false;
  9830. }
  9831. if (isDanceStart11V)
  9832. {
  9833. for (int j = 0; j < maidCnt; j++)
  9834. {
  9835. if (maidArray[j] && maidArray[j].Visible)
  9836. {
  9837. if (isDanceStart11V)
  9838. {
  9839. maidArray[j].SetPos(dancePos[j]);
  9840. maidArray[j].body0.transform.localRotation = danceRot[j];
  9841. }
  9842. }
  9843. }
  9844. isDanceStart11V = false;
  9845. }
  9846. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9847. || isDanceStart13K)
  9848. {
  9849. for (int j = 0; j < maidCnt; j++)
  9850. {
  9851. if (maidArray[j] && maidArray[j].Visible)
  9852. {
  9853. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9854. || isDanceStart13K)
  9855. {
  9856. maidArray[j].SetPos(dancePos[j]);
  9857. maidArray[j].body0.transform.localRotation = danceRot[j];
  9858. int i = j;
  9859. if (!isVR)
  9860. {
  9861. delCount[i] = 20;
  9862. if (goSlot[(int)selectList[i]] != null)
  9863. {
  9864. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9865. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9866. {
  9867. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9868. }
  9869. }
  9870. }
  9871. Maid maid = maidArray[j];
  9872. maid.DelProp(MPN.handitem, true);
  9873. maid.DelProp(MPN.accvag, true);
  9874. maid.DelProp(MPN.accanl, true);
  9875. maid.DelProp(MPN.kousoku_upper, true);
  9876. maid.DelProp(MPN.kousoku_lower, true);
  9877. maid.AllProcPropSeqStart();
  9878. }
  9879. }
  9880. }
  9881. isDanceStart1K = false;
  9882. isDanceStart3K = false;
  9883. isDanceStart4K = false;
  9884. isDanceStart5K = false;
  9885. isDanceStart6K = false;
  9886. isDanceStart9K = false;
  9887. isDanceStart13K = false;
  9888. }
  9889. if (isDanceStart14V)
  9890. {
  9891. for (int j = 0; j < maidCnt; j++)
  9892. {
  9893. if (maidArray[j] && maidArray[j].Visible)
  9894. {
  9895. if (isDanceStart14V)
  9896. {
  9897. maidArray[j].SetPos(dancePos[j]);
  9898. maidArray[j].body0.transform.localRotation = danceRot[j];
  9899. }
  9900. }
  9901. }
  9902. isDanceStart14V = false;
  9903. }
  9904. if (isDanceStart15V)
  9905. {
  9906. for (int j = 0; j < maidCnt; j++)
  9907. {
  9908. if (maidArray[j] && maidArray[j].Visible)
  9909. {
  9910. if (isDanceStart15V)
  9911. {
  9912. maidArray[j].SetPos(dancePos[j]);
  9913. maidArray[j].body0.transform.localRotation = danceRot[j];
  9914. }
  9915. }
  9916. }
  9917. isDanceStart15V = false;
  9918. }
  9919. if (isShift)
  9920. {
  9921. if (maidArray[1] && maidArray[1].Visible)
  9922. {
  9923. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9924. {
  9925. Vector3 vector = Vector3.zero;
  9926. vector.x = 0.6f;
  9927. maidArray[1].SetPos(vector);
  9928. if (maidArray[2] && maidArray[2].Visible)
  9929. {
  9930. vector.x = -0.6f;
  9931. maidArray[2].SetPos(vector);
  9932. }
  9933. if (maidArray[3] && maidArray[3].Visible)
  9934. {
  9935. vector.x = 1.2f;
  9936. maidArray[3].SetPos(vector);
  9937. }
  9938. if (maidArray[4] && maidArray[4].Visible)
  9939. {
  9940. vector.x = -1.2f;
  9941. maidArray[4].SetPos(vector);
  9942. }
  9943. if (maidArray[5] && maidArray[5].Visible)
  9944. {
  9945. vector.x = 1.8f;
  9946. maidArray[5].SetPos(vector);
  9947. }
  9948. if (maidArray[6] && maidArray[6].Visible)
  9949. {
  9950. vector.x = -1.8f;
  9951. maidArray[6].SetPos(vector);
  9952. }
  9953. if (maidArray[7] && maidArray[7].Visible)
  9954. {
  9955. vector.x = 2.4f;
  9956. maidArray[7].SetPos(vector);
  9957. }
  9958. if (maidArray[8] && maidArray[8].Visible)
  9959. {
  9960. vector.x = -2.4f;
  9961. maidArray[8].SetPos(vector);
  9962. }
  9963. if (maidArray[9] && maidArray[9].Visible)
  9964. {
  9965. vector.x = 3f;
  9966. maidArray[9].SetPos(vector);
  9967. }
  9968. if (maidArray[10] && maidArray[10].Visible)
  9969. {
  9970. vector.x = -3f;
  9971. maidArray[10].SetPos(vector);
  9972. }
  9973. if (maidArray[11] && maidArray[11].Visible)
  9974. {
  9975. vector.x = 3.6f;
  9976. maidArray[11].SetPos(vector);
  9977. }
  9978. if (maidArray[12] && maidArray[12].Visible)
  9979. {
  9980. vector.x = -3.6f;
  9981. maidArray[12].SetPos(vector);
  9982. }
  9983. if (maidArray[13] && maidArray[13].Visible)
  9984. {
  9985. vector.x = 4.2f;
  9986. maidArray[13].SetPos(vector);
  9987. }
  9988. }
  9989. }
  9990. isDanceStart1K = true;
  9991. for (int j = 0; j < maidCnt; j++)
  9992. {
  9993. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9994. maidArray[j].body0.transform.localRotation.y + 90f,
  9995. maidArray[j].body0.transform.localRotation.z));
  9996. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9997. maidArray[j].body0.transform.position.y,
  9998. maidArray[j].body0.transform.position.z + 4f));
  9999. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10000. int i = j;
  10001. Maid maid = maidArray[j];
  10002. if (!isVR)
  10003. {
  10004. delCount[i] = 20;
  10005. if (goSlot[(int)selectList[i]] != null)
  10006. {
  10007. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10008. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10009. {
  10010. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10011. }
  10012. }
  10013. }
  10014. string[] array = new string[2];
  10015. array = text2.Split(new char[] { ',' });
  10016. maid.DelProp(MPN.handitem, true);
  10017. maid.DelProp(MPN.accvag, true);
  10018. maid.DelProp(MPN.accanl, true);
  10019. maid.DelProp(MPN.kousoku_upper, true);
  10020. maid.DelProp(MPN.kousoku_lower, true);
  10021. if (array[0] != "")
  10022. {
  10023. maid.SetProp(array[0], array[1], 0, true, false);
  10024. }
  10025. maid.AllProcPropSeqStart();
  10026. }
  10027. }
  10028. isDance = true;
  10029. isDanceStart1 = true;
  10030. }
  10031. if (isF2)
  10032. {
  10033. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10034. string text4 = textAsset.text;
  10035. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10036. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10037. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10038. for (int j = 0; j < maidCnt; j++)
  10039. {
  10040. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10041. {
  10042. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10043. GameUty.FileSystem,
  10044. "dance_cm3d_001_f1.anm",
  10045. false,
  10046. false);
  10047. }
  10048. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10049. }
  10050. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10051. for (int j = 0; j < maidCnt; j++)
  10052. {
  10053. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10054. isStop[j] = false;
  10055. isLock[j] = false;
  10056. pHandL[j] = 0;
  10057. pHandR[j] = 0;
  10058. muneIKL[j] = false;
  10059. muneIKR[j] = false;
  10060. if (!isVR)
  10061. {
  10062. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10063. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10064. }
  10065. }
  10066. ikBui = 5;
  10067. isDanceStart1F = false;
  10068. isDanceStart2F = false;
  10069. isDanceStart3F = false;
  10070. isDanceStart4F = false;
  10071. isDanceStart5F = false;
  10072. isDanceStart6F = false;
  10073. isDanceStart7F = false;
  10074. isDanceStart8F = false;
  10075. isDanceStart9F = false;
  10076. isDanceStart10F = false;
  10077. isDanceStart11F = false;
  10078. isDanceStart12F = false;
  10079. isDanceStart13F = false;
  10080. isDanceStart14F = false;
  10081. isDanceStart15F = false;
  10082. for (int j = 0; j < maidCnt; j++)
  10083. {
  10084. danceFace[j] = 0f;
  10085. }
  10086. if (isDanceStart7V)
  10087. {
  10088. for (int j = 0; j < maidCnt; j++)
  10089. {
  10090. if (maidArray[j] && maidArray[j].Visible)
  10091. {
  10092. if (isDanceStart7V)
  10093. {
  10094. maidArray[j].SetPos(dancePos[j]);
  10095. maidArray[j].body0.transform.localRotation = danceRot[j];
  10096. }
  10097. }
  10098. }
  10099. isDanceStart7V = false;
  10100. }
  10101. if (isDanceStart8V)
  10102. {
  10103. for (int j = 0; j < maidCnt; j++)
  10104. {
  10105. if (maidArray[j] && maidArray[j].Visible)
  10106. {
  10107. if (isDanceStart8V)
  10108. {
  10109. maidArray[j].SetPos(dancePos[j]);
  10110. maidArray[j].body0.transform.localRotation = danceRot[j];
  10111. }
  10112. }
  10113. }
  10114. isDanceStart8V = false;
  10115. isDanceStart8P = false;
  10116. }
  10117. if (isDanceStart11V)
  10118. {
  10119. for (int j = 0; j < maidCnt; j++)
  10120. {
  10121. if (maidArray[j] && maidArray[j].Visible)
  10122. {
  10123. if (isDanceStart11V)
  10124. {
  10125. maidArray[j].SetPos(dancePos[j]);
  10126. maidArray[j].body0.transform.localRotation = danceRot[j];
  10127. }
  10128. }
  10129. }
  10130. isDanceStart11V = false;
  10131. }
  10132. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10133. || isDanceStart13K)
  10134. {
  10135. for (int j = 0; j < maidCnt; j++)
  10136. {
  10137. if (maidArray[j] && maidArray[j].Visible)
  10138. {
  10139. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10140. || isDanceStart13K)
  10141. {
  10142. maidArray[j].SetPos(dancePos[j]);
  10143. maidArray[j].body0.transform.localRotation = danceRot[j];
  10144. int i = j;
  10145. if (!isVR)
  10146. {
  10147. delCount[i] = 20;
  10148. if (goSlot[(int)selectList[i]] != null)
  10149. {
  10150. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10151. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10152. {
  10153. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10154. }
  10155. }
  10156. }
  10157. Maid maid = maidArray[j];
  10158. maid.DelProp(MPN.handitem, true);
  10159. maid.DelProp(MPN.accvag, true);
  10160. maid.DelProp(MPN.accanl, true);
  10161. maid.DelProp(MPN.kousoku_upper, true);
  10162. maid.DelProp(MPN.kousoku_lower, true);
  10163. maid.AllProcPropSeqStart();
  10164. }
  10165. }
  10166. }
  10167. isDanceStart1K = false;
  10168. isDanceStart3K = false;
  10169. isDanceStart4K = false;
  10170. isDanceStart5K = false;
  10171. isDanceStart6K = false;
  10172. isDanceStart9K = false;
  10173. isDanceStart13K = false;
  10174. }
  10175. if (isDanceStart14V)
  10176. {
  10177. for (int j = 0; j < maidCnt; j++)
  10178. {
  10179. if (maidArray[j] && maidArray[j].Visible)
  10180. {
  10181. if (isDanceStart14V)
  10182. {
  10183. maidArray[j].SetPos(dancePos[j]);
  10184. maidArray[j].body0.transform.localRotation = danceRot[j];
  10185. }
  10186. }
  10187. }
  10188. isDanceStart14V = false;
  10189. }
  10190. if (isDanceStart15V)
  10191. {
  10192. for (int j = 0; j < maidCnt; j++)
  10193. {
  10194. if (maidArray[j] && maidArray[j].Visible)
  10195. {
  10196. if (isDanceStart15V)
  10197. {
  10198. maidArray[j].SetPos(dancePos[j]);
  10199. maidArray[j].body0.transform.localRotation = danceRot[j];
  10200. }
  10201. }
  10202. }
  10203. isDanceStart15V = false;
  10204. }
  10205. if (maidArray[1] && maidArray[1].Visible)
  10206. {
  10207. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10208. {
  10209. Vector3 vector = Vector3.zero;
  10210. vector.x = 0.6f;
  10211. maidArray[1].SetPos(vector);
  10212. if (maidArray[2] && maidArray[2].Visible)
  10213. {
  10214. vector.x = -0.6f;
  10215. maidArray[2].SetPos(vector);
  10216. }
  10217. if (maidArray[3] && maidArray[3].Visible)
  10218. {
  10219. vector.x = 1.2f;
  10220. maidArray[3].SetPos(vector);
  10221. }
  10222. if (maidArray[4] && maidArray[4].Visible)
  10223. {
  10224. vector.x = -1.2f;
  10225. maidArray[4].SetPos(vector);
  10226. }
  10227. if (maidArray[5] && maidArray[5].Visible)
  10228. {
  10229. vector.x = 1.8f;
  10230. maidArray[5].SetPos(vector);
  10231. }
  10232. if (maidArray[6] && maidArray[6].Visible)
  10233. {
  10234. vector.x = -1.8f;
  10235. maidArray[6].SetPos(vector);
  10236. }
  10237. if (maidArray[7] && maidArray[7].Visible)
  10238. {
  10239. vector.x = 2.4f;
  10240. maidArray[7].SetPos(vector);
  10241. }
  10242. if (maidArray[8] && maidArray[8].Visible)
  10243. {
  10244. vector.x = -2.4f;
  10245. maidArray[8].SetPos(vector);
  10246. }
  10247. if (maidArray[9] && maidArray[9].Visible)
  10248. {
  10249. vector.x = 3f;
  10250. maidArray[9].SetPos(vector);
  10251. }
  10252. if (maidArray[10] && maidArray[10].Visible)
  10253. {
  10254. vector.x = -3f;
  10255. maidArray[10].SetPos(vector);
  10256. }
  10257. if (maidArray[11] && maidArray[11].Visible)
  10258. {
  10259. vector.x = 3.6f;
  10260. maidArray[11].SetPos(vector);
  10261. }
  10262. if (maidArray[12] && maidArray[12].Visible)
  10263. {
  10264. vector.x = -3.6f;
  10265. maidArray[12].SetPos(vector);
  10266. }
  10267. if (maidArray[13] && maidArray[13].Visible)
  10268. {
  10269. vector.x = 4.2f;
  10270. maidArray[13].SetPos(vector);
  10271. }
  10272. }
  10273. }
  10274. isDance = true;
  10275. isDanceStart2 = true;
  10276. isF2 = false;
  10277. }
  10278. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10279. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10280. {
  10281. GameMain.Instance.SoundMgr.StopBGM(0f);
  10282. isF2 = true;
  10283. }
  10284. if (isF3)
  10285. {
  10286. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10287. string text4 = textAsset.text;
  10288. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10289. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10290. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10291. for (int j = 0; j < maidCnt; j++)
  10292. {
  10293. if (!isShift)
  10294. {
  10295. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10296. {
  10297. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10298. GameUty.FileSystem,
  10299. "dance_cm3d_002_end_f1.anm",
  10300. false,
  10301. false);
  10302. }
  10303. }
  10304. else
  10305. {
  10306. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10307. {
  10308. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10309. GameUty.FileSystem,
  10310. "dance_cm3d2_kara_001_sl_f1.anm",
  10311. false,
  10312. false);
  10313. }
  10314. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10315. text4 = textAsset.text;
  10316. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10317. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10318. && !isDanceStart9K && !isDanceStart13K)
  10319. {
  10320. dancePos[j] = maidArray[j].transform.position;
  10321. danceRot[j] = maidArray[j].transform.localRotation;
  10322. }
  10323. }
  10324. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10325. }
  10326. if (!isShift)
  10327. {
  10328. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10329. }
  10330. else
  10331. {
  10332. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10333. }
  10334. for (int j = 0; j < maidCnt; j++)
  10335. {
  10336. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10337. isStop[j] = false;
  10338. isLock[j] = false;
  10339. pHandL[j] = 0;
  10340. pHandR[j] = 0;
  10341. muneIKL[j] = false;
  10342. muneIKR[j] = false;
  10343. if (!isVR)
  10344. {
  10345. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10346. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10347. }
  10348. }
  10349. ikBui = 5;
  10350. isDanceStart1F = false;
  10351. isDanceStart2F = false;
  10352. isDanceStart3F = false;
  10353. isDanceStart4F = false;
  10354. isDanceStart5F = false;
  10355. isDanceStart6F = false;
  10356. isDanceStart7F = false;
  10357. isDanceStart8F = false;
  10358. isDanceStart9F = false;
  10359. isDanceStart10F = false;
  10360. isDanceStart11F = false;
  10361. isDanceStart12F = false;
  10362. isDanceStart13F = false;
  10363. isDanceStart14F = false;
  10364. isDanceStart15F = false;
  10365. for (int j = 0; j < maidCnt; j++)
  10366. {
  10367. danceFace[j] = 0f;
  10368. }
  10369. if (isDanceStart7V)
  10370. {
  10371. for (int j = 0; j < maidCnt; j++)
  10372. {
  10373. if (maidArray[j] && maidArray[j].Visible)
  10374. {
  10375. if (isDanceStart7V)
  10376. {
  10377. maidArray[j].SetPos(dancePos[j]);
  10378. maidArray[j].body0.transform.localRotation = danceRot[j];
  10379. }
  10380. }
  10381. }
  10382. isDanceStart7V = false;
  10383. }
  10384. if (isDanceStart8V)
  10385. {
  10386. for (int j = 0; j < maidCnt; j++)
  10387. {
  10388. if (maidArray[j] && maidArray[j].Visible)
  10389. {
  10390. if (isDanceStart8V)
  10391. {
  10392. maidArray[j].SetPos(dancePos[j]);
  10393. maidArray[j].body0.transform.localRotation = danceRot[j];
  10394. }
  10395. }
  10396. }
  10397. isDanceStart8V = false;
  10398. isDanceStart8P = false;
  10399. }
  10400. if (isDanceStart11V)
  10401. {
  10402. for (int j = 0; j < maidCnt; j++)
  10403. {
  10404. if (maidArray[j] && maidArray[j].Visible)
  10405. {
  10406. if (isDanceStart11V)
  10407. {
  10408. maidArray[j].SetPos(dancePos[j]);
  10409. maidArray[j].body0.transform.localRotation = danceRot[j];
  10410. }
  10411. }
  10412. }
  10413. isDanceStart11V = false;
  10414. }
  10415. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10416. || isDanceStart13K)
  10417. {
  10418. for (int j = 0; j < maidCnt; j++)
  10419. {
  10420. if (maidArray[j] && maidArray[j].Visible)
  10421. {
  10422. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10423. || isDanceStart13K)
  10424. {
  10425. maidArray[j].SetPos(dancePos[j]);
  10426. maidArray[j].body0.transform.localRotation = danceRot[j];
  10427. int i = j;
  10428. if (!isVR)
  10429. {
  10430. delCount[i] = 20;
  10431. if (goSlot[(int)selectList[i]] != null)
  10432. {
  10433. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10434. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10435. {
  10436. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10437. }
  10438. }
  10439. }
  10440. Maid maid = maidArray[j];
  10441. maid.DelProp(MPN.handitem, true);
  10442. maid.DelProp(MPN.accvag, true);
  10443. maid.DelProp(MPN.accanl, true);
  10444. maid.DelProp(MPN.kousoku_upper, true);
  10445. maid.DelProp(MPN.kousoku_lower, true);
  10446. maid.AllProcPropSeqStart();
  10447. }
  10448. }
  10449. }
  10450. isDanceStart1K = false;
  10451. isDanceStart3K = false;
  10452. isDanceStart4K = false;
  10453. isDanceStart5K = false;
  10454. isDanceStart6K = false;
  10455. isDanceStart9K = false;
  10456. isDanceStart13K = false;
  10457. }
  10458. if (isDanceStart14V)
  10459. {
  10460. for (int j = 0; j < maidCnt; j++)
  10461. {
  10462. if (maidArray[j] && maidArray[j].Visible)
  10463. {
  10464. if (isDanceStart14V)
  10465. {
  10466. maidArray[j].SetPos(dancePos[j]);
  10467. maidArray[j].body0.transform.localRotation = danceRot[j];
  10468. }
  10469. }
  10470. }
  10471. isDanceStart14V = false;
  10472. }
  10473. if (isDanceStart15V)
  10474. {
  10475. for (int j = 0; j < maidCnt; j++)
  10476. {
  10477. if (maidArray[j] && maidArray[j].Visible)
  10478. {
  10479. if (isDanceStart15V)
  10480. {
  10481. maidArray[j].SetPos(dancePos[j]);
  10482. maidArray[j].body0.transform.localRotation = danceRot[j];
  10483. }
  10484. }
  10485. }
  10486. isDanceStart15V = false;
  10487. }
  10488. if (maidArray[1] && maidArray[1].Visible)
  10489. {
  10490. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10491. {
  10492. Vector3 vector = Vector3.zero;
  10493. vector.x = 0.6f;
  10494. maidArray[1].SetPos(vector);
  10495. if (maidArray[2] && maidArray[2].Visible)
  10496. {
  10497. vector.x = -0.6f;
  10498. maidArray[2].SetPos(vector);
  10499. }
  10500. if (maidArray[3] && maidArray[3].Visible)
  10501. {
  10502. vector.x = 1.2f;
  10503. maidArray[3].SetPos(vector);
  10504. }
  10505. if (maidArray[4] && maidArray[4].Visible)
  10506. {
  10507. vector.x = -1.2f;
  10508. maidArray[4].SetPos(vector);
  10509. }
  10510. if (maidArray[5] && maidArray[5].Visible)
  10511. {
  10512. vector.x = 1.8f;
  10513. maidArray[5].SetPos(vector);
  10514. }
  10515. if (maidArray[6] && maidArray[6].Visible)
  10516. {
  10517. vector.x = -1.8f;
  10518. maidArray[6].SetPos(vector);
  10519. }
  10520. if (maidArray[7] && maidArray[7].Visible)
  10521. {
  10522. vector.x = 2.4f;
  10523. maidArray[7].SetPos(vector);
  10524. }
  10525. if (maidArray[8] && maidArray[8].Visible)
  10526. {
  10527. vector.x = -2.4f;
  10528. maidArray[8].SetPos(vector);
  10529. }
  10530. if (maidArray[9] && maidArray[9].Visible)
  10531. {
  10532. vector.x = 3f;
  10533. maidArray[9].SetPos(vector);
  10534. }
  10535. if (maidArray[10] && maidArray[10].Visible)
  10536. {
  10537. vector.x = -3f;
  10538. maidArray[10].SetPos(vector);
  10539. }
  10540. if (maidArray[11] && maidArray[11].Visible)
  10541. {
  10542. vector.x = 3.6f;
  10543. maidArray[11].SetPos(vector);
  10544. }
  10545. if (maidArray[12] && maidArray[12].Visible)
  10546. {
  10547. vector.x = -3.6f;
  10548. maidArray[12].SetPos(vector);
  10549. }
  10550. if (maidArray[13] && maidArray[13].Visible)
  10551. {
  10552. vector.x = 4.2f;
  10553. maidArray[13].SetPos(vector);
  10554. }
  10555. }
  10556. }
  10557. if (isShift)
  10558. {
  10559. isDanceStart3K = true;
  10560. for (int j = 0; j < maidCnt; j++)
  10561. {
  10562. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10563. maidArray[j].body0.transform.localRotation.y + 90f,
  10564. maidArray[j].body0.transform.localRotation.z));
  10565. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10566. maidArray[j].body0.transform.position.y,
  10567. maidArray[j].body0.transform.position.z + 4f));
  10568. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10569. int i = j;
  10570. Maid maid = maidArray[j];
  10571. if (!isVR)
  10572. {
  10573. delCount[i] = 20;
  10574. if (goSlot[(int)selectList[i]] != null)
  10575. {
  10576. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10577. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10578. {
  10579. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10580. }
  10581. }
  10582. }
  10583. string[] array = new string[2];
  10584. array = text2.Split(new char[] { ',' });
  10585. maid.DelProp(MPN.handitem, true);
  10586. maid.DelProp(MPN.accvag, true);
  10587. maid.DelProp(MPN.accanl, true);
  10588. maid.DelProp(MPN.kousoku_upper, true);
  10589. maid.DelProp(MPN.kousoku_lower, true);
  10590. if (array[0] != "")
  10591. {
  10592. maid.SetProp(array[0], array[1], 0, true, false);
  10593. }
  10594. maid.AllProcPropSeqStart();
  10595. }
  10596. }
  10597. isDance = true;
  10598. isDanceStart3 = true;
  10599. isF3 = false;
  10600. }
  10601. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10602. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10603. {
  10604. GameMain.Instance.SoundMgr.StopBGM(0f);
  10605. isF3 = true;
  10606. if (getModKeyPressing(modKey.Shift))
  10607. {
  10608. isShift = true;
  10609. }
  10610. }
  10611. if (isSF1 || isSF2 || isSF3)
  10612. {
  10613. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10614. string text4 = textAsset.text;
  10615. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10616. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10617. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10618. for (int j = 0; j < maidCnt; j++)
  10619. {
  10620. if (!isShift)
  10621. {
  10622. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10623. {
  10624. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10625. GameUty.FileSystem,
  10626. "dance_cm3d2_002_smt_f.anm",
  10627. false,
  10628. false);
  10629. }
  10630. }
  10631. else
  10632. {
  10633. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10634. {
  10635. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10636. GameUty.FileSystem,
  10637. "dance_cm3d2_kara02_001_smt_f1.anm",
  10638. false,
  10639. false);
  10640. }
  10641. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10642. text4 = textAsset.text;
  10643. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10644. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10645. && !isDanceStart9K && !isDanceStart13K)
  10646. {
  10647. dancePos[j] = maidArray[j].transform.position;
  10648. danceRot[j] = maidArray[j].transform.localRotation;
  10649. }
  10650. }
  10651. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10652. }
  10653. if (!isShift)
  10654. {
  10655. if (isSF1)
  10656. {
  10657. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10658. }
  10659. if (isSF2)
  10660. {
  10661. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10662. }
  10663. if (isSF3)
  10664. {
  10665. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10666. }
  10667. }
  10668. else
  10669. {
  10670. if (isSF1)
  10671. {
  10672. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10673. }
  10674. if (isSF2)
  10675. {
  10676. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10677. }
  10678. if (isSF3)
  10679. {
  10680. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10681. }
  10682. }
  10683. for (int j = 0; j < maidCnt; j++)
  10684. {
  10685. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10686. isStop[j] = false;
  10687. isLock[j] = false;
  10688. pHandL[j] = 0;
  10689. pHandR[j] = 0;
  10690. muneIKL[j] = false;
  10691. muneIKR[j] = false;
  10692. if (!isVR)
  10693. {
  10694. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10695. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10696. }
  10697. }
  10698. ikBui = 5;
  10699. isDanceStart1F = false;
  10700. isDanceStart2F = false;
  10701. isDanceStart3F = false;
  10702. isDanceStart4F = false;
  10703. isDanceStart5F = false;
  10704. isDanceStart6F = false;
  10705. isDanceStart7F = false;
  10706. isDanceStart8F = false;
  10707. isDanceStart9F = false;
  10708. isDanceStart10F = false;
  10709. isDanceStart11F = false;
  10710. isDanceStart12F = false;
  10711. isDanceStart13F = false;
  10712. isDanceStart14F = false;
  10713. isDanceStart15F = false;
  10714. for (int j = 0; j < maidCnt; j++)
  10715. {
  10716. danceFace[j] = 0f;
  10717. }
  10718. if (isDanceStart7V)
  10719. {
  10720. for (int j = 0; j < maidCnt; j++)
  10721. {
  10722. if (maidArray[j] && maidArray[j].Visible)
  10723. {
  10724. if (isDanceStart7V)
  10725. {
  10726. maidArray[j].SetPos(dancePos[j]);
  10727. maidArray[j].body0.transform.localRotation = danceRot[j];
  10728. }
  10729. }
  10730. }
  10731. isDanceStart7V = false;
  10732. }
  10733. if (isDanceStart8V)
  10734. {
  10735. for (int j = 0; j < maidCnt; j++)
  10736. {
  10737. if (maidArray[j] && maidArray[j].Visible)
  10738. {
  10739. if (isDanceStart8V)
  10740. {
  10741. maidArray[j].SetPos(dancePos[j]);
  10742. maidArray[j].body0.transform.localRotation = danceRot[j];
  10743. }
  10744. }
  10745. }
  10746. isDanceStart8V = false;
  10747. isDanceStart8P = false;
  10748. }
  10749. if (isDanceStart11V)
  10750. {
  10751. for (int j = 0; j < maidCnt; j++)
  10752. {
  10753. if (maidArray[j] && maidArray[j].Visible)
  10754. {
  10755. if (isDanceStart11V)
  10756. {
  10757. maidArray[j].SetPos(dancePos[j]);
  10758. maidArray[j].body0.transform.localRotation = danceRot[j];
  10759. }
  10760. }
  10761. }
  10762. isDanceStart11V = false;
  10763. }
  10764. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10765. || isDanceStart13K)
  10766. {
  10767. for (int j = 0; j < maidCnt; j++)
  10768. {
  10769. if (maidArray[j] && maidArray[j].Visible)
  10770. {
  10771. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10772. || isDanceStart13K)
  10773. {
  10774. maidArray[j].SetPos(dancePos[j]);
  10775. maidArray[j].body0.transform.localRotation = danceRot[j];
  10776. int i = j;
  10777. if (!isVR)
  10778. {
  10779. delCount[i] = 20;
  10780. if (goSlot[(int)selectList[i]] != null)
  10781. {
  10782. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10783. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10784. {
  10785. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10786. }
  10787. }
  10788. }
  10789. Maid maid = maidArray[j];
  10790. maid.DelProp(MPN.handitem, true);
  10791. maid.DelProp(MPN.accvag, true);
  10792. maid.DelProp(MPN.accanl, true);
  10793. maid.DelProp(MPN.kousoku_upper, true);
  10794. maid.DelProp(MPN.kousoku_lower, true);
  10795. maid.AllProcPropSeqStart();
  10796. }
  10797. }
  10798. }
  10799. isDanceStart1K = false;
  10800. isDanceStart3K = false;
  10801. isDanceStart4K = false;
  10802. isDanceStart5K = false;
  10803. isDanceStart6K = false;
  10804. isDanceStart9K = false;
  10805. isDanceStart13K = false;
  10806. }
  10807. if (isDanceStart14V)
  10808. {
  10809. for (int j = 0; j < maidCnt; j++)
  10810. {
  10811. if (maidArray[j] && maidArray[j].Visible)
  10812. {
  10813. if (isDanceStart14V)
  10814. {
  10815. maidArray[j].SetPos(dancePos[j]);
  10816. maidArray[j].body0.transform.localRotation = danceRot[j];
  10817. }
  10818. }
  10819. }
  10820. isDanceStart14V = false;
  10821. }
  10822. if (isDanceStart15V)
  10823. {
  10824. for (int j = 0; j < maidCnt; j++)
  10825. {
  10826. if (maidArray[j] && maidArray[j].Visible)
  10827. {
  10828. if (isDanceStart15V)
  10829. {
  10830. maidArray[j].SetPos(dancePos[j]);
  10831. maidArray[j].body0.transform.localRotation = danceRot[j];
  10832. }
  10833. }
  10834. }
  10835. isDanceStart15V = false;
  10836. }
  10837. if (maidArray[1] && maidArray[1].Visible)
  10838. {
  10839. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10840. {
  10841. Vector3 vector = Vector3.zero;
  10842. vector.x = 0.6f;
  10843. maidArray[1].SetPos(vector);
  10844. if (maidArray[2] && maidArray[2].Visible)
  10845. {
  10846. vector.x = -0.6f;
  10847. maidArray[2].SetPos(vector);
  10848. }
  10849. if (maidArray[3] && maidArray[3].Visible)
  10850. {
  10851. vector.x = 1.2f;
  10852. maidArray[3].SetPos(vector);
  10853. }
  10854. if (maidArray[4] && maidArray[4].Visible)
  10855. {
  10856. vector.x = -1.2f;
  10857. maidArray[4].SetPos(vector);
  10858. }
  10859. if (maidArray[5] && maidArray[5].Visible)
  10860. {
  10861. vector.x = 1.8f;
  10862. maidArray[5].SetPos(vector);
  10863. }
  10864. if (maidArray[6] && maidArray[6].Visible)
  10865. {
  10866. vector.x = -1.8f;
  10867. maidArray[6].SetPos(vector);
  10868. }
  10869. if (maidArray[7] && maidArray[7].Visible)
  10870. {
  10871. vector.x = 2.4f;
  10872. maidArray[7].SetPos(vector);
  10873. }
  10874. if (maidArray[8] && maidArray[8].Visible)
  10875. {
  10876. vector.x = -2.4f;
  10877. maidArray[8].SetPos(vector);
  10878. }
  10879. if (maidArray[9] && maidArray[9].Visible)
  10880. {
  10881. vector.x = 3f;
  10882. maidArray[9].SetPos(vector);
  10883. }
  10884. if (maidArray[10] && maidArray[10].Visible)
  10885. {
  10886. vector.x = -3f;
  10887. maidArray[10].SetPos(vector);
  10888. }
  10889. if (maidArray[11] && maidArray[11].Visible)
  10890. {
  10891. vector.x = 3.6f;
  10892. maidArray[11].SetPos(vector);
  10893. }
  10894. if (maidArray[12] && maidArray[12].Visible)
  10895. {
  10896. vector.x = -3.6f;
  10897. maidArray[12].SetPos(vector);
  10898. }
  10899. if (maidArray[13] && maidArray[13].Visible)
  10900. {
  10901. vector.x = 4.2f;
  10902. maidArray[13].SetPos(vector);
  10903. }
  10904. }
  10905. }
  10906. if (isShift)
  10907. {
  10908. isDanceStart4K = true;
  10909. for (int j = 0; j < maidCnt; j++)
  10910. {
  10911. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10912. maidArray[j].body0.transform.localRotation.y + 90f,
  10913. maidArray[j].body0.transform.localRotation.z));
  10914. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10915. maidArray[j].body0.transform.position.y,
  10916. maidArray[j].body0.transform.position.z + 4f));
  10917. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10918. int i = j;
  10919. Maid maid = maidArray[j];
  10920. if (!isVR)
  10921. {
  10922. delCount[i] = 20;
  10923. if (goSlot[(int)selectList[i]] != null)
  10924. {
  10925. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10926. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10927. {
  10928. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10929. }
  10930. }
  10931. }
  10932. string[] array = new string[2];
  10933. array = text2.Split(new char[] { ',' });
  10934. maid.DelProp(MPN.handitem, true);
  10935. maid.DelProp(MPN.accvag, true);
  10936. maid.DelProp(MPN.accanl, true);
  10937. maid.DelProp(MPN.kousoku_upper, true);
  10938. maid.DelProp(MPN.kousoku_lower, true);
  10939. if (array[0] != "")
  10940. {
  10941. maid.SetProp(array[0], array[1], 0, true, false);
  10942. }
  10943. maid.AllProcPropSeqStart();
  10944. }
  10945. }
  10946. isDance = true;
  10947. isDanceStart4 = true;
  10948. isSF1 = false;
  10949. isSF2 = false;
  10950. isSF3 = false;
  10951. }
  10952. if (isHS1 || isHS2 || isHS3)
  10953. {
  10954. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10955. string text4 = textAsset.text;
  10956. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10957. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10958. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10959. for (int j = 0; j < maidCnt; j++)
  10960. {
  10961. if (!isShift)
  10962. {
  10963. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10964. {
  10965. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10966. GameUty.FileSystem,
  10967. "dance_cm3d2_003_hs_f1.anm",
  10968. false,
  10969. false);
  10970. }
  10971. }
  10972. else
  10973. {
  10974. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10975. {
  10976. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10977. GameUty.FileSystem,
  10978. "dance_cm3d2_kara02_003_hs_f1.anm",
  10979. false,
  10980. false);
  10981. }
  10982. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10983. text4 = textAsset.text;
  10984. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10985. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10986. && !isDanceStart9K && !isDanceStart13K)
  10987. {
  10988. dancePos[j] = maidArray[j].transform.position;
  10989. danceRot[j] = maidArray[j].transform.localRotation;
  10990. }
  10991. }
  10992. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10993. }
  10994. if (!isShift)
  10995. {
  10996. if (isHS1)
  10997. {
  10998. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10999. }
  11000. if (isHS2)
  11001. {
  11002. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11003. }
  11004. if (isHS3)
  11005. {
  11006. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11007. }
  11008. }
  11009. else
  11010. {
  11011. if (isHS1)
  11012. {
  11013. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11014. }
  11015. if (isHS2)
  11016. {
  11017. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11018. }
  11019. if (isHS3)
  11020. {
  11021. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11022. }
  11023. }
  11024. for (int j = 0; j < maidCnt; j++)
  11025. {
  11026. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11027. isStop[j] = false;
  11028. isLock[j] = false;
  11029. pHandL[j] = 0;
  11030. pHandR[j] = 0;
  11031. muneIKL[j] = false;
  11032. muneIKR[j] = false;
  11033. if (!isVR)
  11034. {
  11035. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11036. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11037. }
  11038. }
  11039. ikBui = 5;
  11040. isDanceStart1F = false;
  11041. isDanceStart2F = false;
  11042. isDanceStart3F = false;
  11043. isDanceStart4F = false;
  11044. isDanceStart5F = false;
  11045. isDanceStart6F = false;
  11046. isDanceStart7F = false;
  11047. isDanceStart8F = false;
  11048. isDanceStart9F = false;
  11049. isDanceStart10F = false;
  11050. isDanceStart11F = false;
  11051. isDanceStart12F = false;
  11052. isDanceStart13F = false;
  11053. isDanceStart14F = false;
  11054. isDanceStart15F = false;
  11055. for (int j = 0; j < maidCnt; j++)
  11056. {
  11057. danceFace[j] = 0f;
  11058. }
  11059. if (isDanceStart7V)
  11060. {
  11061. for (int j = 0; j < maidCnt; j++)
  11062. {
  11063. if (maidArray[j] && maidArray[j].Visible)
  11064. {
  11065. if (isDanceStart7V)
  11066. {
  11067. maidArray[j].SetPos(dancePos[j]);
  11068. maidArray[j].body0.transform.localRotation = danceRot[j];
  11069. }
  11070. }
  11071. }
  11072. isDanceStart7V = false;
  11073. }
  11074. if (isDanceStart8V)
  11075. {
  11076. for (int j = 0; j < maidCnt; j++)
  11077. {
  11078. if (maidArray[j] && maidArray[j].Visible)
  11079. {
  11080. if (isDanceStart8V)
  11081. {
  11082. maidArray[j].SetPos(dancePos[j]);
  11083. maidArray[j].body0.transform.localRotation = danceRot[j];
  11084. }
  11085. }
  11086. }
  11087. isDanceStart8V = false;
  11088. isDanceStart8P = false;
  11089. }
  11090. if (isDanceStart11V)
  11091. {
  11092. for (int j = 0; j < maidCnt; j++)
  11093. {
  11094. if (maidArray[j] && maidArray[j].Visible)
  11095. {
  11096. if (isDanceStart11V)
  11097. {
  11098. maidArray[j].SetPos(dancePos[j]);
  11099. maidArray[j].body0.transform.localRotation = danceRot[j];
  11100. }
  11101. }
  11102. }
  11103. isDanceStart11V = false;
  11104. }
  11105. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11106. || isDanceStart13K)
  11107. {
  11108. for (int j = 0; j < maidCnt; j++)
  11109. {
  11110. if (maidArray[j] && maidArray[j].Visible)
  11111. {
  11112. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11113. || isDanceStart13K)
  11114. {
  11115. maidArray[j].SetPos(dancePos[j]);
  11116. maidArray[j].body0.transform.localRotation = danceRot[j];
  11117. int i = j;
  11118. if (!isVR)
  11119. {
  11120. delCount[i] = 20;
  11121. if (goSlot[(int)selectList[i]] != null)
  11122. {
  11123. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11124. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11125. {
  11126. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11127. }
  11128. }
  11129. }
  11130. Maid maid = maidArray[j];
  11131. maid.DelProp(MPN.handitem, true);
  11132. maid.DelProp(MPN.accvag, true);
  11133. maid.DelProp(MPN.accanl, true);
  11134. maid.DelProp(MPN.kousoku_upper, true);
  11135. maid.DelProp(MPN.kousoku_lower, true);
  11136. maid.AllProcPropSeqStart();
  11137. }
  11138. }
  11139. }
  11140. isDanceStart1K = false;
  11141. isDanceStart3K = false;
  11142. isDanceStart4K = false;
  11143. isDanceStart5K = false;
  11144. isDanceStart6K = false;
  11145. isDanceStart9K = false;
  11146. isDanceStart13K = false;
  11147. }
  11148. if (isDanceStart14V)
  11149. {
  11150. for (int j = 0; j < maidCnt; j++)
  11151. {
  11152. if (maidArray[j] && maidArray[j].Visible)
  11153. {
  11154. if (isDanceStart14V)
  11155. {
  11156. maidArray[j].SetPos(dancePos[j]);
  11157. maidArray[j].body0.transform.localRotation = danceRot[j];
  11158. }
  11159. }
  11160. }
  11161. isDanceStart14V = false;
  11162. }
  11163. if (isDanceStart15V)
  11164. {
  11165. for (int j = 0; j < maidCnt; j++)
  11166. {
  11167. if (maidArray[j] && maidArray[j].Visible)
  11168. {
  11169. if (isDanceStart15V)
  11170. {
  11171. maidArray[j].SetPos(dancePos[j]);
  11172. maidArray[j].body0.transform.localRotation = danceRot[j];
  11173. }
  11174. }
  11175. }
  11176. isDanceStart15V = false;
  11177. }
  11178. if (maidArray[1] && maidArray[1].Visible)
  11179. {
  11180. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11181. {
  11182. Vector3 vector = Vector3.zero;
  11183. vector.x = 0.6f;
  11184. maidArray[1].SetPos(vector);
  11185. if (maidArray[2] && maidArray[2].Visible)
  11186. {
  11187. vector.x = -0.6f;
  11188. maidArray[2].SetPos(vector);
  11189. }
  11190. if (maidArray[3] && maidArray[3].Visible)
  11191. {
  11192. vector.x = 1.2f;
  11193. maidArray[3].SetPos(vector);
  11194. }
  11195. if (maidArray[4] && maidArray[4].Visible)
  11196. {
  11197. vector.x = -1.2f;
  11198. maidArray[4].SetPos(vector);
  11199. }
  11200. if (maidArray[5] && maidArray[5].Visible)
  11201. {
  11202. vector.x = 1.8f;
  11203. maidArray[5].SetPos(vector);
  11204. }
  11205. if (maidArray[6] && maidArray[6].Visible)
  11206. {
  11207. vector.x = -1.8f;
  11208. maidArray[6].SetPos(vector);
  11209. }
  11210. if (maidArray[7] && maidArray[7].Visible)
  11211. {
  11212. vector.x = 2.4f;
  11213. maidArray[7].SetPos(vector);
  11214. }
  11215. if (maidArray[8] && maidArray[8].Visible)
  11216. {
  11217. vector.x = -2.4f;
  11218. maidArray[8].SetPos(vector);
  11219. }
  11220. if (maidArray[9] && maidArray[9].Visible)
  11221. {
  11222. vector.x = 3f;
  11223. maidArray[9].SetPos(vector);
  11224. }
  11225. if (maidArray[10] && maidArray[10].Visible)
  11226. {
  11227. vector.x = -3f;
  11228. maidArray[10].SetPos(vector);
  11229. }
  11230. if (maidArray[11] && maidArray[11].Visible)
  11231. {
  11232. vector.x = 3.6f;
  11233. maidArray[11].SetPos(vector);
  11234. }
  11235. if (maidArray[12] && maidArray[12].Visible)
  11236. {
  11237. vector.x = -3.6f;
  11238. maidArray[12].SetPos(vector);
  11239. }
  11240. if (maidArray[13] && maidArray[13].Visible)
  11241. {
  11242. vector.x = 4.2f;
  11243. maidArray[13].SetPos(vector);
  11244. }
  11245. }
  11246. }
  11247. if (isShift)
  11248. {
  11249. isDanceStart6K = true;
  11250. for (int j = 0; j < maidCnt; j++)
  11251. {
  11252. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11253. maidArray[j].body0.transform.localRotation.y + 90f,
  11254. maidArray[j].body0.transform.localRotation.z));
  11255. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11256. maidArray[j].body0.transform.position.y,
  11257. maidArray[j].body0.transform.position.z + 4f));
  11258. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11259. int i = j;
  11260. Maid maid = maidArray[j];
  11261. if (!isVR)
  11262. {
  11263. delCount[i] = 20;
  11264. if (goSlot[(int)selectList[i]] != null)
  11265. {
  11266. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11267. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11268. {
  11269. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11270. }
  11271. }
  11272. }
  11273. string[] array = new string[2];
  11274. array = text2.Split(new char[] { ',' });
  11275. maid.DelProp(MPN.handitem, true);
  11276. maid.DelProp(MPN.accvag, true);
  11277. maid.DelProp(MPN.accanl, true);
  11278. maid.DelProp(MPN.kousoku_upper, true);
  11279. maid.DelProp(MPN.kousoku_lower, true);
  11280. if (array[0] != "")
  11281. {
  11282. maid.SetProp(array[0], array[1], 0, true, false);
  11283. }
  11284. maid.AllProcPropSeqStart();
  11285. }
  11286. }
  11287. isDance = true;
  11288. isDanceStart6 = true;
  11289. isHS1 = false;
  11290. isHS2 = false;
  11291. isHS3 = false;
  11292. }
  11293. if (isHS4 || isHS5 || isHS6)
  11294. {
  11295. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11296. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11297. for (int j = 0; j < maidCnt; j++)
  11298. {
  11299. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11300. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11301. switch (j)
  11302. {
  11303. case 1:
  11304. case 3:
  11305. case 5:
  11306. case 7:
  11307. case 9:
  11308. case 11:
  11309. case 13:
  11310. text5 = "dance_cm3d2_003_hs_f2.anm";
  11311. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11312. break;
  11313. }
  11314. if (maidArray[j] && maidArray[j].Visible)
  11315. {
  11316. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11317. {
  11318. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11319. }
  11320. string text4 = textAsset.text;
  11321. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11322. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11323. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11324. }
  11325. }
  11326. if (isHS4)
  11327. {
  11328. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11329. }
  11330. if (isHS5)
  11331. {
  11332. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11333. }
  11334. if (isHS6)
  11335. {
  11336. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11337. }
  11338. ikBui = 5;
  11339. isDanceStart1F = false;
  11340. isDanceStart2F = false;
  11341. isDanceStart3F = false;
  11342. isDanceStart4F = false;
  11343. isDanceStart5F = false;
  11344. isDanceStart6F = false;
  11345. isDanceStart7F = false;
  11346. isDanceStart8F = false;
  11347. isDanceStart9F = false;
  11348. isDanceStart10F = false;
  11349. isDanceStart11F = false;
  11350. isDanceStart12F = false;
  11351. isDanceStart13F = false;
  11352. isDanceStart14F = false;
  11353. isDanceStart15F = false;
  11354. for (int j = 0; j < maidCnt; j++)
  11355. {
  11356. danceFace[j] = 0f;
  11357. }
  11358. if (isDanceStart7V)
  11359. {
  11360. for (int j = 0; j < maidCnt; j++)
  11361. {
  11362. if (maidArray[j] && maidArray[j].Visible)
  11363. {
  11364. if (isDanceStart7V)
  11365. {
  11366. maidArray[j].SetPos(dancePos[j]);
  11367. maidArray[j].body0.transform.localRotation = danceRot[j];
  11368. }
  11369. }
  11370. }
  11371. isDanceStart7V = false;
  11372. }
  11373. if (isDanceStart8V)
  11374. {
  11375. for (int j = 0; j < maidCnt; j++)
  11376. {
  11377. if (maidArray[j] && maidArray[j].Visible)
  11378. {
  11379. if (isDanceStart8V)
  11380. {
  11381. maidArray[j].SetPos(dancePos[j]);
  11382. maidArray[j].body0.transform.localRotation = danceRot[j];
  11383. }
  11384. }
  11385. }
  11386. isDanceStart8V = false;
  11387. isDanceStart8P = false;
  11388. }
  11389. if (isDanceStart11V)
  11390. {
  11391. for (int j = 0; j < maidCnt; j++)
  11392. {
  11393. if (maidArray[j] && maidArray[j].Visible)
  11394. {
  11395. if (isDanceStart11V)
  11396. {
  11397. maidArray[j].SetPos(dancePos[j]);
  11398. maidArray[j].body0.transform.localRotation = danceRot[j];
  11399. }
  11400. }
  11401. }
  11402. isDanceStart11V = false;
  11403. }
  11404. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11405. || isDanceStart13K)
  11406. {
  11407. for (int j = 0; j < maidCnt; j++)
  11408. {
  11409. if (maidArray[j] && maidArray[j].Visible)
  11410. {
  11411. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11412. || isDanceStart13K)
  11413. {
  11414. maidArray[j].SetPos(dancePos[j]);
  11415. maidArray[j].body0.transform.localRotation = danceRot[j];
  11416. int i = j;
  11417. if (!isVR)
  11418. {
  11419. delCount[i] = 20;
  11420. if (goSlot[(int)selectList[i]] != null)
  11421. {
  11422. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11423. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11424. {
  11425. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11426. }
  11427. }
  11428. }
  11429. Maid maid = maidArray[j];
  11430. maid.DelProp(MPN.handitem, true);
  11431. maid.DelProp(MPN.accvag, true);
  11432. maid.DelProp(MPN.accanl, true);
  11433. maid.DelProp(MPN.kousoku_upper, true);
  11434. maid.DelProp(MPN.kousoku_lower, true);
  11435. maid.AllProcPropSeqStart();
  11436. }
  11437. }
  11438. }
  11439. isDanceStart1K = false;
  11440. isDanceStart3K = false;
  11441. isDanceStart4K = false;
  11442. isDanceStart5K = false;
  11443. isDanceStart6K = false;
  11444. isDanceStart9K = false;
  11445. isDanceStart13K = false;
  11446. }
  11447. if (isDanceStart14V)
  11448. {
  11449. for (int j = 0; j < maidCnt; j++)
  11450. {
  11451. if (maidArray[j] && maidArray[j].Visible)
  11452. {
  11453. if (isDanceStart14V)
  11454. {
  11455. maidArray[j].SetPos(dancePos[j]);
  11456. maidArray[j].body0.transform.localRotation = danceRot[j];
  11457. }
  11458. }
  11459. }
  11460. isDanceStart14V = false;
  11461. }
  11462. if (isDanceStart15V)
  11463. {
  11464. for (int j = 0; j < maidCnt; j++)
  11465. {
  11466. if (maidArray[j] && maidArray[j].Visible)
  11467. {
  11468. if (isDanceStart15V)
  11469. {
  11470. maidArray[j].SetPos(dancePos[j]);
  11471. maidArray[j].body0.transform.localRotation = danceRot[j];
  11472. }
  11473. }
  11474. }
  11475. isDanceStart15V = false;
  11476. }
  11477. for (int j = 0; j < maidCnt; j++)
  11478. {
  11479. isStop[j] = false;
  11480. isLock[j] = false;
  11481. pHandL[j] = 0;
  11482. pHandR[j] = 0;
  11483. muneIKL[j] = false;
  11484. muneIKR[j] = false;
  11485. if (!isVR)
  11486. {
  11487. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11488. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11489. }
  11490. if (maidArray[j].transform.position.y != 100f)
  11491. {
  11492. dancePos[j] = maidArray[j].transform.position;
  11493. }
  11494. else
  11495. {
  11496. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11497. }
  11498. danceRot[j] = maidArray[j].transform.localRotation;
  11499. }
  11500. if (maidArray[1] && maidArray[1].Visible)
  11501. {
  11502. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11503. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11504. }
  11505. if (maidArray[3] && maidArray[3].Visible)
  11506. {
  11507. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11508. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11509. }
  11510. if (maidArray[5] && maidArray[5].Visible)
  11511. {
  11512. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11513. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11514. }
  11515. if (maidArray[7] && maidArray[7].Visible)
  11516. {
  11517. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11518. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11519. }
  11520. if (maidArray[9] && maidArray[9].Visible)
  11521. {
  11522. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11523. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11524. }
  11525. if (maidArray[11] && maidArray[11].Visible)
  11526. {
  11527. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11528. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11529. }
  11530. if (maidArray[13] && maidArray[13].Visible)
  11531. {
  11532. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11533. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11534. }
  11535. if (maidArray[2] && maidArray[2].Visible)
  11536. {
  11537. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11538. {
  11539. Vector3 vector = Vector3.zero;
  11540. vector.x = 0.6f;
  11541. maidArray[1].SetPos(vector);
  11542. if (maidArray[2] && maidArray[2].Visible)
  11543. {
  11544. vector.x = -0.6f;
  11545. maidArray[2].SetPos(vector);
  11546. }
  11547. if (maidArray[3] && maidArray[3].Visible)
  11548. {
  11549. vector.x = 1.2f;
  11550. maidArray[3].SetPos(vector);
  11551. }
  11552. if (maidArray[4] && maidArray[4].Visible)
  11553. {
  11554. vector.x = -1.2f;
  11555. maidArray[4].SetPos(vector);
  11556. }
  11557. if (maidArray[5] && maidArray[5].Visible)
  11558. {
  11559. vector.x = 1.8f;
  11560. maidArray[5].SetPos(vector);
  11561. }
  11562. if (maidArray[6] && maidArray[6].Visible)
  11563. {
  11564. vector.x = -1.8f;
  11565. maidArray[6].SetPos(vector);
  11566. }
  11567. if (maidArray[7] && maidArray[7].Visible)
  11568. {
  11569. vector.x = 2.4f;
  11570. maidArray[7].SetPos(vector);
  11571. }
  11572. if (maidArray[8] && maidArray[8].Visible)
  11573. {
  11574. vector.x = -2.4f;
  11575. maidArray[8].SetPos(vector);
  11576. }
  11577. if (maidArray[9] && maidArray[9].Visible)
  11578. {
  11579. vector.x = 3f;
  11580. maidArray[9].SetPos(vector);
  11581. }
  11582. if (maidArray[10] && maidArray[10].Visible)
  11583. {
  11584. vector.x = -3f;
  11585. maidArray[10].SetPos(vector);
  11586. }
  11587. if (maidArray[11] && maidArray[11].Visible)
  11588. {
  11589. vector.x = 3.6f;
  11590. maidArray[11].SetPos(vector);
  11591. }
  11592. if (maidArray[12] && maidArray[12].Visible)
  11593. {
  11594. vector.x = -3.6f;
  11595. maidArray[12].SetPos(vector);
  11596. }
  11597. if (maidArray[13] && maidArray[13].Visible)
  11598. {
  11599. vector.x = 4.2f;
  11600. maidArray[13].SetPos(vector);
  11601. }
  11602. }
  11603. }
  11604. isDance = true;
  11605. isDanceStart7 = true;
  11606. isHS4 = false;
  11607. isHS5 = false;
  11608. isHS6 = false;
  11609. }
  11610. if (isHS7 || isHS8 || isHS9)
  11611. {
  11612. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11613. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11614. for (int j = 0; j < maidCnt; j++)
  11615. {
  11616. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11617. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11618. switch (j)
  11619. {
  11620. case 1:
  11621. case 5:
  11622. case 9:
  11623. case 13:
  11624. text5 = "dance_cm3d2_003_hs_f2.anm";
  11625. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11626. break;
  11627. case 2:
  11628. case 6:
  11629. case 10:
  11630. text5 = "dance_cm3d2_003_hs_f3.anm";
  11631. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11632. break;
  11633. case 3:
  11634. case 7:
  11635. case 11:
  11636. text5 = "dance_cm3d2_003_hs_f4.anm";
  11637. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11638. break;
  11639. }
  11640. if (maidArray[j] && maidArray[j].Visible)
  11641. {
  11642. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11643. {
  11644. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11645. }
  11646. }
  11647. string text4 = textAsset.text;
  11648. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11649. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11650. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11651. }
  11652. if (isHS7)
  11653. {
  11654. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11655. }
  11656. if (isHS8)
  11657. {
  11658. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11659. }
  11660. if (isHS9)
  11661. {
  11662. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11663. }
  11664. ikBui = 5;
  11665. isDanceStart1F = false;
  11666. isDanceStart2F = false;
  11667. isDanceStart3F = false;
  11668. isDanceStart4F = false;
  11669. isDanceStart5F = false;
  11670. isDanceStart6F = false;
  11671. isDanceStart7F = false;
  11672. isDanceStart8F = false;
  11673. isDanceStart9F = false;
  11674. isDanceStart10F = false;
  11675. isDanceStart11F = false;
  11676. isDanceStart12F = false;
  11677. isDanceStart13F = false;
  11678. isDanceStart14F = false;
  11679. isDanceStart15F = false;
  11680. for (int j = 0; j < maidCnt; j++)
  11681. {
  11682. danceFace[j] = 0f;
  11683. }
  11684. if (isDanceStart8V)
  11685. {
  11686. for (int j = 0; j < maidCnt; j++)
  11687. {
  11688. if (maidArray[j] && maidArray[j].Visible)
  11689. {
  11690. if (isDanceStart8V)
  11691. {
  11692. maidArray[j].SetPos(dancePos[j]);
  11693. maidArray[j].body0.transform.localRotation = danceRot[j];
  11694. }
  11695. }
  11696. }
  11697. isDanceStart8V = false;
  11698. isDanceStart8P = false;
  11699. }
  11700. for (int j = 0; j < maidCnt; j++)
  11701. {
  11702. isStop[j] = false;
  11703. isLock[j] = false;
  11704. pHandL[j] = 0;
  11705. pHandR[j] = 0;
  11706. muneIKL[j] = false;
  11707. muneIKR[j] = false;
  11708. if (!isVR)
  11709. {
  11710. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11711. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11712. }
  11713. if (maidArray[j].transform.position.y != 100f)
  11714. {
  11715. dancePos[j] = maidArray[j].transform.position;
  11716. }
  11717. else
  11718. {
  11719. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11720. }
  11721. danceRot[j] = maidArray[j].transform.localRotation;
  11722. }
  11723. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11724. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11725. {
  11726. maidArray[0].SetPos(Vector3.zero);
  11727. maidArray[0].SetRot(Vector3.zero);
  11728. }
  11729. if (maidArray[1] && maidArray[1].Visible)
  11730. {
  11731. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11732. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11733. }
  11734. if (maidArray[2] && maidArray[2].Visible)
  11735. {
  11736. maidArray[2].SetPos(maidArray[0].transform.position);
  11737. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11738. }
  11739. if (maidArray[3] && maidArray[3].Visible)
  11740. {
  11741. maidArray[3].SetPos(maidArray[0].transform.position);
  11742. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11743. }
  11744. if (maidArray[5] && maidArray[5].Visible)
  11745. {
  11746. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11747. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11748. }
  11749. if (maidArray[6] && maidArray[6].Visible)
  11750. {
  11751. maidArray[6].SetPos(maidArray[4].transform.position);
  11752. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11753. }
  11754. if (maidArray[7] && maidArray[7].Visible)
  11755. {
  11756. maidArray[7].SetPos(maidArray[4].transform.position);
  11757. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11758. }
  11759. if (maidArray[9] && maidArray[9].Visible)
  11760. {
  11761. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11762. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11763. }
  11764. if (maidArray[10] && maidArray[10].Visible)
  11765. {
  11766. maidArray[10].SetPos(maidArray[8].transform.position);
  11767. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11768. }
  11769. if (maidArray[11] && maidArray[11].Visible)
  11770. {
  11771. maidArray[11].SetPos(maidArray[8].transform.position);
  11772. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11773. }
  11774. if (maidArray[13] && maidArray[13].Visible)
  11775. {
  11776. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11777. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11778. }
  11779. if (maidArray[4] && maidArray[4].Visible)
  11780. {
  11781. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11782. {
  11783. Vector3 vector = Vector3.zero;
  11784. vector.x = 0.6f;
  11785. maidArray[1].SetPos(vector);
  11786. if (maidArray[2] && maidArray[2].Visible)
  11787. {
  11788. vector.x = -0.6f;
  11789. maidArray[2].SetPos(vector);
  11790. }
  11791. if (maidArray[3] && maidArray[3].Visible)
  11792. {
  11793. vector.x = 1.2f;
  11794. maidArray[3].SetPos(vector);
  11795. }
  11796. if (maidArray[4] && maidArray[4].Visible)
  11797. {
  11798. vector.x = -1.2f;
  11799. maidArray[4].SetPos(vector);
  11800. }
  11801. if (maidArray[5] && maidArray[5].Visible)
  11802. {
  11803. vector.x = 1.8f;
  11804. maidArray[5].SetPos(vector);
  11805. }
  11806. if (maidArray[6] && maidArray[6].Visible)
  11807. {
  11808. vector.x = -1.8f;
  11809. maidArray[6].SetPos(vector);
  11810. }
  11811. if (maidArray[7] && maidArray[7].Visible)
  11812. {
  11813. vector.x = 2.4f;
  11814. maidArray[7].SetPos(vector);
  11815. }
  11816. if (maidArray[8] && maidArray[8].Visible)
  11817. {
  11818. vector.x = -2.4f;
  11819. maidArray[8].SetPos(vector);
  11820. }
  11821. if (maidArray[9] && maidArray[9].Visible)
  11822. {
  11823. vector.x = 3f;
  11824. maidArray[9].SetPos(vector);
  11825. }
  11826. if (maidArray[10] && maidArray[10].Visible)
  11827. {
  11828. vector.x = -3f;
  11829. maidArray[10].SetPos(vector);
  11830. }
  11831. if (maidArray[11] && maidArray[11].Visible)
  11832. {
  11833. vector.x = 3.6f;
  11834. maidArray[11].SetPos(vector);
  11835. }
  11836. if (maidArray[12] && maidArray[12].Visible)
  11837. {
  11838. vector.x = -3.6f;
  11839. maidArray[12].SetPos(vector);
  11840. }
  11841. if (maidArray[13] && maidArray[13].Visible)
  11842. {
  11843. vector.x = 4.2f;
  11844. maidArray[13].SetPos(vector);
  11845. }
  11846. }
  11847. }
  11848. isDance = true;
  11849. isDanceStart8 = true;
  11850. isHS7 = false;
  11851. isHS8 = false;
  11852. isHS9 = false;
  11853. }
  11854. if (isCF1)
  11855. {
  11856. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11857. string text4 = textAsset.text;
  11858. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11859. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11860. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11861. for (int j = 0; j < maidCnt; j++)
  11862. {
  11863. if (!isShift)
  11864. {
  11865. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11866. {
  11867. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11868. GameUty.FileSystem,
  11869. "dance_cm3d_003_sp2_f1.anm",
  11870. false,
  11871. false);
  11872. }
  11873. }
  11874. else
  11875. {
  11876. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11877. {
  11878. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11879. GameUty.FileSystem,
  11880. "dance_cm3d2_kara02_002_rty_f1.anm",
  11881. false,
  11882. false);
  11883. }
  11884. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11885. text4 = textAsset.text;
  11886. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11887. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11888. && !isDanceStart9K && !isDanceStart13K)
  11889. {
  11890. dancePos[j] = maidArray[j].transform.position;
  11891. danceRot[j] = maidArray[j].transform.localRotation;
  11892. }
  11893. }
  11894. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11895. }
  11896. if (!isShift)
  11897. {
  11898. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11899. }
  11900. else
  11901. {
  11902. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11903. }
  11904. for (int j = 0; j < maidCnt; j++)
  11905. {
  11906. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11907. isStop[j] = false;
  11908. isLock[j] = false;
  11909. pHandL[j] = 0;
  11910. pHandR[j] = 0;
  11911. muneIKL[j] = false;
  11912. muneIKR[j] = false;
  11913. if (!isVR)
  11914. {
  11915. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11916. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11917. }
  11918. }
  11919. ikBui = 5;
  11920. isDanceStart1F = false;
  11921. isDanceStart2F = false;
  11922. isDanceStart3F = false;
  11923. isDanceStart4F = false;
  11924. isDanceStart5F = false;
  11925. isDanceStart6F = false;
  11926. isDanceStart7F = false;
  11927. isDanceStart8F = false;
  11928. isDanceStart9F = false;
  11929. isDanceStart10F = false;
  11930. isDanceStart11F = false;
  11931. isDanceStart12F = false;
  11932. isDanceStart13F = false;
  11933. isDanceStart14F = false;
  11934. isDanceStart15F = false;
  11935. for (int j = 0; j < maidCnt; j++)
  11936. {
  11937. danceFace[j] = 0f;
  11938. }
  11939. if (isDanceStart7V)
  11940. {
  11941. for (int j = 0; j < maidCnt; j++)
  11942. {
  11943. if (maidArray[j] && maidArray[j].Visible)
  11944. {
  11945. if (isDanceStart7V)
  11946. {
  11947. maidArray[j].SetPos(dancePos[j]);
  11948. maidArray[j].body0.transform.localRotation = danceRot[j];
  11949. }
  11950. }
  11951. }
  11952. isDanceStart7V = false;
  11953. }
  11954. if (isDanceStart8V)
  11955. {
  11956. for (int j = 0; j < maidCnt; j++)
  11957. {
  11958. if (maidArray[j] && maidArray[j].Visible)
  11959. {
  11960. if (isDanceStart8V)
  11961. {
  11962. maidArray[j].SetPos(dancePos[j]);
  11963. maidArray[j].body0.transform.localRotation = danceRot[j];
  11964. }
  11965. }
  11966. }
  11967. isDanceStart8V = false;
  11968. isDanceStart8P = false;
  11969. }
  11970. if (isDanceStart11V)
  11971. {
  11972. for (int j = 0; j < maidCnt; j++)
  11973. {
  11974. if (maidArray[j] && maidArray[j].Visible)
  11975. {
  11976. if (isDanceStart11V)
  11977. {
  11978. maidArray[j].SetPos(dancePos[j]);
  11979. maidArray[j].body0.transform.localRotation = danceRot[j];
  11980. }
  11981. }
  11982. }
  11983. isDanceStart11V = false;
  11984. }
  11985. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11986. || isDanceStart13K)
  11987. {
  11988. for (int j = 0; j < maidCnt; j++)
  11989. {
  11990. if (maidArray[j] && maidArray[j].Visible)
  11991. {
  11992. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11993. || isDanceStart13K)
  11994. {
  11995. maidArray[j].SetPos(dancePos[j]);
  11996. maidArray[j].body0.transform.localRotation = danceRot[j];
  11997. int i = j;
  11998. if (!isVR)
  11999. {
  12000. delCount[i] = 20;
  12001. if (goSlot[(int)selectList[i]] != null)
  12002. {
  12003. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12004. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12005. {
  12006. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12007. }
  12008. }
  12009. }
  12010. Maid maid = maidArray[j];
  12011. maid.DelProp(MPN.handitem, true);
  12012. maid.DelProp(MPN.accvag, true);
  12013. maid.DelProp(MPN.accanl, true);
  12014. maid.DelProp(MPN.kousoku_upper, true);
  12015. maid.DelProp(MPN.kousoku_lower, true);
  12016. maid.AllProcPropSeqStart();
  12017. }
  12018. }
  12019. }
  12020. isDanceStart1K = false;
  12021. isDanceStart3K = false;
  12022. isDanceStart4K = false;
  12023. isDanceStart5K = false;
  12024. isDanceStart6K = false;
  12025. isDanceStart9K = false;
  12026. isDanceStart13K = false;
  12027. }
  12028. if (isDanceStart14V)
  12029. {
  12030. for (int j = 0; j < maidCnt; j++)
  12031. {
  12032. if (maidArray[j] && maidArray[j].Visible)
  12033. {
  12034. if (isDanceStart14V)
  12035. {
  12036. maidArray[j].SetPos(dancePos[j]);
  12037. maidArray[j].body0.transform.localRotation = danceRot[j];
  12038. }
  12039. }
  12040. }
  12041. isDanceStart14V = false;
  12042. }
  12043. if (isDanceStart15V)
  12044. {
  12045. for (int j = 0; j < maidCnt; j++)
  12046. {
  12047. if (maidArray[j] && maidArray[j].Visible)
  12048. {
  12049. if (isDanceStart15V)
  12050. {
  12051. maidArray[j].SetPos(dancePos[j]);
  12052. maidArray[j].body0.transform.localRotation = danceRot[j];
  12053. }
  12054. }
  12055. }
  12056. isDanceStart15V = false;
  12057. }
  12058. if (maidArray[1] && maidArray[1].Visible)
  12059. {
  12060. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12061. {
  12062. Vector3 vector = Vector3.zero;
  12063. vector.x = 0.6f;
  12064. maidArray[1].SetPos(vector);
  12065. if (maidArray[2] && maidArray[2].Visible)
  12066. {
  12067. vector.x = -0.6f;
  12068. maidArray[2].SetPos(vector);
  12069. }
  12070. if (maidArray[3] && maidArray[3].Visible)
  12071. {
  12072. vector.x = 1.2f;
  12073. maidArray[3].SetPos(vector);
  12074. }
  12075. if (maidArray[4] && maidArray[4].Visible)
  12076. {
  12077. vector.x = -1.2f;
  12078. maidArray[4].SetPos(vector);
  12079. }
  12080. if (maidArray[5] && maidArray[5].Visible)
  12081. {
  12082. vector.x = 1.8f;
  12083. maidArray[5].SetPos(vector);
  12084. }
  12085. if (maidArray[6] && maidArray[6].Visible)
  12086. {
  12087. vector.x = -1.8f;
  12088. maidArray[6].SetPos(vector);
  12089. }
  12090. if (maidArray[7] && maidArray[7].Visible)
  12091. {
  12092. vector.x = 2.4f;
  12093. maidArray[7].SetPos(vector);
  12094. }
  12095. if (maidArray[8] && maidArray[8].Visible)
  12096. {
  12097. vector.x = -2.4f;
  12098. maidArray[8].SetPos(vector);
  12099. }
  12100. if (maidArray[9] && maidArray[9].Visible)
  12101. {
  12102. vector.x = 3f;
  12103. maidArray[9].SetPos(vector);
  12104. }
  12105. if (maidArray[10] && maidArray[10].Visible)
  12106. {
  12107. vector.x = -3f;
  12108. maidArray[10].SetPos(vector);
  12109. }
  12110. if (maidArray[11] && maidArray[11].Visible)
  12111. {
  12112. vector.x = 3.6f;
  12113. maidArray[11].SetPos(vector);
  12114. }
  12115. if (maidArray[12] && maidArray[12].Visible)
  12116. {
  12117. vector.x = -3.6f;
  12118. maidArray[12].SetPos(vector);
  12119. }
  12120. if (maidArray[13] && maidArray[13].Visible)
  12121. {
  12122. vector.x = 4.2f;
  12123. maidArray[13].SetPos(vector);
  12124. }
  12125. }
  12126. }
  12127. if (isShift)
  12128. {
  12129. isDanceStart5K = true;
  12130. for (int j = 0; j < maidCnt; j++)
  12131. {
  12132. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12133. maidArray[j].body0.transform.localRotation.y + 90f,
  12134. maidArray[j].body0.transform.localRotation.z));
  12135. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12136. maidArray[j].body0.transform.position.y,
  12137. maidArray[j].body0.transform.position.z + 4f));
  12138. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12139. int i = j;
  12140. Maid maid = maidArray[j];
  12141. if (!isVR)
  12142. {
  12143. delCount[i] = 20;
  12144. if (goSlot[(int)selectList[i]] != null)
  12145. {
  12146. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12147. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12148. {
  12149. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12150. }
  12151. }
  12152. }
  12153. string[] array = new string[2];
  12154. array = text2.Split(new char[] { ',' });
  12155. maid.DelProp(MPN.handitem, true);
  12156. maid.DelProp(MPN.accvag, true);
  12157. maid.DelProp(MPN.accanl, true);
  12158. maid.DelProp(MPN.kousoku_upper, true);
  12159. maid.DelProp(MPN.kousoku_lower, true);
  12160. if (array[0] != "")
  12161. {
  12162. maid.SetProp(array[0], array[1], 0, true, false);
  12163. }
  12164. maid.AllProcPropSeqStart();
  12165. }
  12166. }
  12167. isDance = true;
  12168. isDanceStart5 = true;
  12169. isCF1 = false;
  12170. }
  12171. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12172. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12173. {
  12174. GameMain.Instance.SoundMgr.StopBGM(0f);
  12175. isCF1 = true;
  12176. if (getModKeyPressing(modKey.Shift))
  12177. {
  12178. isShift = true;
  12179. }
  12180. }
  12181. if (isKT1)
  12182. {
  12183. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12184. string text4 = textAsset.text;
  12185. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12186. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12187. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12188. for (int j = 0; j < maidCnt; j++)
  12189. {
  12190. if (!isShift)
  12191. {
  12192. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12193. {
  12194. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12195. GameUty.FileSystem,
  12196. "dance_cm3d_004_kano_f1.anm",
  12197. false,
  12198. false);
  12199. }
  12200. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12201. }
  12202. else
  12203. {
  12204. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12205. {
  12206. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12207. GameUty.FileSystem,
  12208. "dance_cm3d2_kara_002_cktc_f1.anm",
  12209. false,
  12210. false);
  12211. }
  12212. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12213. text4 = textAsset.text;
  12214. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12215. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12216. && !isDanceStart9K && !isDanceStart13K)
  12217. {
  12218. dancePos[j] = maidArray[j].transform.position;
  12219. danceRot[j] = maidArray[j].transform.localRotation;
  12220. }
  12221. }
  12222. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12223. }
  12224. if (!isShift)
  12225. {
  12226. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12227. }
  12228. else
  12229. {
  12230. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12231. }
  12232. for (int j = 0; j < maidCnt; j++)
  12233. {
  12234. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12235. isStop[j] = false;
  12236. isLock[j] = false;
  12237. pHandL[j] = 0;
  12238. pHandR[j] = 0;
  12239. muneIKL[j] = false;
  12240. muneIKR[j] = false;
  12241. if (!isVR)
  12242. {
  12243. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12244. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12245. }
  12246. }
  12247. ikBui = 5;
  12248. isDanceStart1F = false;
  12249. isDanceStart2F = false;
  12250. isDanceStart3F = false;
  12251. isDanceStart4F = false;
  12252. isDanceStart5F = false;
  12253. isDanceStart6F = false;
  12254. isDanceStart7F = false;
  12255. isDanceStart8F = false;
  12256. isDanceStart9F = false;
  12257. isDanceStart10F = false;
  12258. isDanceStart11F = false;
  12259. isDanceStart12F = false;
  12260. isDanceStart13F = false;
  12261. isDanceStart14F = false;
  12262. isDanceStart15F = false;
  12263. for (int j = 0; j < maidCnt; j++)
  12264. {
  12265. danceFace[j] = 0f;
  12266. }
  12267. if (isDanceStart7V)
  12268. {
  12269. for (int j = 0; j < maidCnt; j++)
  12270. {
  12271. if (maidArray[j] && maidArray[j].Visible)
  12272. {
  12273. if (isDanceStart7V)
  12274. {
  12275. maidArray[j].SetPos(dancePos[j]);
  12276. maidArray[j].body0.transform.localRotation = danceRot[j];
  12277. }
  12278. }
  12279. }
  12280. isDanceStart7V = false;
  12281. }
  12282. if (isDanceStart8V)
  12283. {
  12284. for (int j = 0; j < maidCnt; j++)
  12285. {
  12286. if (maidArray[j] && maidArray[j].Visible)
  12287. {
  12288. if (isDanceStart8V)
  12289. {
  12290. maidArray[j].SetPos(dancePos[j]);
  12291. maidArray[j].body0.transform.localRotation = danceRot[j];
  12292. }
  12293. }
  12294. }
  12295. isDanceStart8V = false;
  12296. isDanceStart8P = false;
  12297. }
  12298. if (isDanceStart11V)
  12299. {
  12300. for (int j = 0; j < maidCnt; j++)
  12301. {
  12302. if (maidArray[j] && maidArray[j].Visible)
  12303. {
  12304. if (isDanceStart11V)
  12305. {
  12306. maidArray[j].SetPos(dancePos[j]);
  12307. maidArray[j].body0.transform.localRotation = danceRot[j];
  12308. }
  12309. }
  12310. }
  12311. isDanceStart11V = false;
  12312. }
  12313. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12314. || isDanceStart13K)
  12315. {
  12316. for (int j = 0; j < maidCnt; j++)
  12317. {
  12318. if (maidArray[j] && maidArray[j].Visible)
  12319. {
  12320. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12321. || isDanceStart13K)
  12322. {
  12323. maidArray[j].SetPos(dancePos[j]);
  12324. maidArray[j].body0.transform.localRotation = danceRot[j];
  12325. int i = j;
  12326. if (!isVR)
  12327. {
  12328. delCount[i] = 20;
  12329. if (goSlot[(int)selectList[i]] != null)
  12330. {
  12331. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12332. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12333. {
  12334. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12335. }
  12336. }
  12337. }
  12338. Maid maid = maidArray[j];
  12339. maid.DelProp(MPN.handitem, true);
  12340. maid.DelProp(MPN.accvag, true);
  12341. maid.DelProp(MPN.accanl, true);
  12342. maid.DelProp(MPN.kousoku_upper, true);
  12343. maid.DelProp(MPN.kousoku_lower, true);
  12344. maid.AllProcPropSeqStart();
  12345. }
  12346. }
  12347. }
  12348. isDanceStart1K = false;
  12349. isDanceStart3K = false;
  12350. isDanceStart4K = false;
  12351. isDanceStart5K = false;
  12352. isDanceStart6K = false;
  12353. isDanceStart9K = false;
  12354. isDanceStart13K = false;
  12355. }
  12356. if (isDanceStart14V)
  12357. {
  12358. for (int j = 0; j < maidCnt; j++)
  12359. {
  12360. if (maidArray[j] && maidArray[j].Visible)
  12361. {
  12362. if (isDanceStart14V)
  12363. {
  12364. maidArray[j].SetPos(dancePos[j]);
  12365. maidArray[j].body0.transform.localRotation = danceRot[j];
  12366. }
  12367. }
  12368. }
  12369. isDanceStart14V = false;
  12370. }
  12371. if (isDanceStart15V)
  12372. {
  12373. for (int j = 0; j < maidCnt; j++)
  12374. {
  12375. if (maidArray[j] && maidArray[j].Visible)
  12376. {
  12377. if (isDanceStart15V)
  12378. {
  12379. maidArray[j].SetPos(dancePos[j]);
  12380. maidArray[j].body0.transform.localRotation = danceRot[j];
  12381. }
  12382. }
  12383. }
  12384. isDanceStart15V = false;
  12385. }
  12386. if (maidArray[1] && maidArray[1].Visible)
  12387. {
  12388. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12389. {
  12390. Vector3 vector = Vector3.zero;
  12391. vector.x = 0.6f;
  12392. maidArray[1].SetPos(vector);
  12393. if (maidArray[2] && maidArray[2].Visible)
  12394. {
  12395. vector.x = -0.6f;
  12396. maidArray[2].SetPos(vector);
  12397. }
  12398. if (maidArray[3] && maidArray[3].Visible)
  12399. {
  12400. vector.x = 1.2f;
  12401. maidArray[3].SetPos(vector);
  12402. }
  12403. if (maidArray[4] && maidArray[4].Visible)
  12404. {
  12405. vector.x = -1.2f;
  12406. maidArray[4].SetPos(vector);
  12407. }
  12408. if (maidArray[5] && maidArray[5].Visible)
  12409. {
  12410. vector.x = 1.8f;
  12411. maidArray[5].SetPos(vector);
  12412. }
  12413. if (maidArray[6] && maidArray[6].Visible)
  12414. {
  12415. vector.x = -1.8f;
  12416. maidArray[6].SetPos(vector);
  12417. }
  12418. if (maidArray[7] && maidArray[7].Visible)
  12419. {
  12420. vector.x = 2.4f;
  12421. maidArray[7].SetPos(vector);
  12422. }
  12423. if (maidArray[8] && maidArray[8].Visible)
  12424. {
  12425. vector.x = -2.4f;
  12426. maidArray[8].SetPos(vector);
  12427. }
  12428. if (maidArray[9] && maidArray[9].Visible)
  12429. {
  12430. vector.x = 3f;
  12431. maidArray[9].SetPos(vector);
  12432. }
  12433. if (maidArray[10] && maidArray[10].Visible)
  12434. {
  12435. vector.x = -3f;
  12436. maidArray[10].SetPos(vector);
  12437. }
  12438. if (maidArray[11] && maidArray[11].Visible)
  12439. {
  12440. vector.x = 3.6f;
  12441. maidArray[11].SetPos(vector);
  12442. }
  12443. if (maidArray[12] && maidArray[12].Visible)
  12444. {
  12445. vector.x = -3.6f;
  12446. maidArray[12].SetPos(vector);
  12447. }
  12448. if (maidArray[13] && maidArray[13].Visible)
  12449. {
  12450. vector.x = 4.2f;
  12451. maidArray[13].SetPos(vector);
  12452. }
  12453. }
  12454. }
  12455. if (maidArray[2] && maidArray[2].Visible)
  12456. {
  12457. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12458. {
  12459. Vector3 vector = Vector3.zero;
  12460. vector.x = 0.6f;
  12461. maidArray[1].SetPos(vector);
  12462. if (maidArray[2] && maidArray[2].Visible)
  12463. {
  12464. vector.x = -0.6f;
  12465. maidArray[2].SetPos(vector);
  12466. }
  12467. if (maidArray[3] && maidArray[3].Visible)
  12468. {
  12469. vector.x = 1.2f;
  12470. maidArray[3].SetPos(vector);
  12471. }
  12472. if (maidArray[4] && maidArray[4].Visible)
  12473. {
  12474. vector.x = -1.2f;
  12475. maidArray[4].SetPos(vector);
  12476. }
  12477. if (maidArray[5] && maidArray[5].Visible)
  12478. {
  12479. vector.x = 1.8f;
  12480. maidArray[5].SetPos(vector);
  12481. }
  12482. if (maidArray[6] && maidArray[6].Visible)
  12483. {
  12484. vector.x = -1.8f;
  12485. maidArray[6].SetPos(vector);
  12486. }
  12487. if (maidArray[7] && maidArray[7].Visible)
  12488. {
  12489. vector.x = 2.4f;
  12490. maidArray[7].SetPos(vector);
  12491. }
  12492. if (maidArray[8] && maidArray[8].Visible)
  12493. {
  12494. vector.x = -2.4f;
  12495. maidArray[8].SetPos(vector);
  12496. }
  12497. if (maidArray[9] && maidArray[9].Visible)
  12498. {
  12499. vector.x = 3f;
  12500. maidArray[9].SetPos(vector);
  12501. }
  12502. if (maidArray[10] && maidArray[10].Visible)
  12503. {
  12504. vector.x = -3f;
  12505. maidArray[10].SetPos(vector);
  12506. }
  12507. if (maidArray[11] && maidArray[11].Visible)
  12508. {
  12509. vector.x = 3.6f;
  12510. maidArray[11].SetPos(vector);
  12511. }
  12512. if (maidArray[12] && maidArray[12].Visible)
  12513. {
  12514. vector.x = -3.6f;
  12515. maidArray[12].SetPos(vector);
  12516. }
  12517. if (maidArray[13] && maidArray[13].Visible)
  12518. {
  12519. vector.x = 4.2f;
  12520. maidArray[13].SetPos(vector);
  12521. }
  12522. }
  12523. }
  12524. if (isShift)
  12525. {
  12526. isDanceStart9K = true;
  12527. for (int j = 0; j < maidCnt; j++)
  12528. {
  12529. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12530. maidArray[j].body0.transform.localRotation.y + 90f,
  12531. maidArray[j].body0.transform.localRotation.z));
  12532. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12533. maidArray[j].body0.transform.position.y,
  12534. maidArray[j].body0.transform.position.z + 4f));
  12535. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12536. int i = j;
  12537. Maid maid = maidArray[j];
  12538. if (!isVR)
  12539. {
  12540. delCount[i] = 20;
  12541. if (goSlot[(int)selectList[i]] != null)
  12542. {
  12543. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12544. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12545. {
  12546. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12547. }
  12548. }
  12549. }
  12550. string[] array = new string[2];
  12551. array = text2.Split(new char[] { ',' });
  12552. maid.DelProp(MPN.handitem, true);
  12553. maid.DelProp(MPN.accvag, true);
  12554. maid.DelProp(MPN.accanl, true);
  12555. maid.DelProp(MPN.kousoku_upper, true);
  12556. maid.DelProp(MPN.kousoku_lower, true);
  12557. if (array[0] != "")
  12558. {
  12559. maid.SetProp(array[0], array[1], 0, true, false);
  12560. }
  12561. maid.AllProcPropSeqStart();
  12562. }
  12563. }
  12564. isDance = true;
  12565. isDanceStart9 = true;
  12566. isKT1 = false;
  12567. }
  12568. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12569. {
  12570. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12571. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12572. if (isSS1)
  12573. {
  12574. nameK = "dance_BlD_m";
  12575. nameA = "dance_cm3d21_002_bid_f";
  12576. nameS = "bloomingdreaming_short";
  12577. danceNo1 = 1;
  12578. danceNo2 = 3;
  12579. danceNo3 = 2;
  12580. }
  12581. if (isSS2)
  12582. {
  12583. nameK = "dance_KAD_m";
  12584. nameA = "dance_cm3d21_003_kad_f";
  12585. nameS = "kiminiaijodelicious_short";
  12586. danceNo1 = 1;
  12587. danceNo2 = 2;
  12588. danceNo3 = 3;
  12589. }
  12590. if (isSS3)
  12591. {
  12592. nameK = "dance_LUM_m";
  12593. nameA = "dance_cm3d21_004_lm_f";
  12594. nameS = "luminousmoment_short";
  12595. danceNo1 = 3;
  12596. danceNo2 = 1;
  12597. danceNo3 = 2;
  12598. }
  12599. if (isSS4)
  12600. {
  12601. nameK = "dance_NmF_m";
  12602. nameA = "dance_cm3d21_001_nmf_f";
  12603. nameS = "nightmagicfire_short";
  12604. danceNo1 = 2;
  12605. danceNo2 = 1;
  12606. danceNo3 = 3;
  12607. }
  12608. if (isSS5)
  12609. {
  12610. nameK = "dance_MoE_m";
  12611. nameA = "dance_cm3d21_005_moe_f";
  12612. nameS = "melodyofempire_short";
  12613. danceNo1 = 1;
  12614. danceNo2 = 3;
  12615. danceNo3 = 2;
  12616. }
  12617. if (isSS6)
  12618. {
  12619. nameK = "dance_NmF_m";
  12620. nameA = "dance_cm3d21_kara_001_nmf_f";
  12621. nameS = "nightmagicfire_short";
  12622. danceNo1 = 1;
  12623. danceNo2 = 1;
  12624. danceNo3 = 1;
  12625. }
  12626. for (int j = 0; j < maidCnt; j++)
  12627. {
  12628. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12629. string text5 = nameA + danceNo1 + ".anm";
  12630. switch (j)
  12631. {
  12632. case 1:
  12633. case 4:
  12634. case 7:
  12635. case 10:
  12636. case 13:
  12637. text5 = nameA + danceNo2 + ".anm";
  12638. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12639. break;
  12640. case 2:
  12641. case 5:
  12642. case 8:
  12643. case 11:
  12644. text5 = nameA + danceNo3 + ".anm";
  12645. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12646. break;
  12647. }
  12648. if (maidArray[j] && maidArray[j].Visible)
  12649. {
  12650. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12651. {
  12652. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12653. }
  12654. string text4 = textAsset.text;
  12655. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12656. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12657. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12658. }
  12659. }
  12660. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12661. ikBui = 5;
  12662. isDanceStart1F = false;
  12663. isDanceStart2F = false;
  12664. isDanceStart3F = false;
  12665. isDanceStart4F = false;
  12666. isDanceStart5F = false;
  12667. isDanceStart6F = false;
  12668. isDanceStart7F = false;
  12669. isDanceStart8F = false;
  12670. isDanceStart9F = false;
  12671. isDanceStart10F = false;
  12672. isDanceStart11F = false;
  12673. isDanceStart12F = false;
  12674. isDanceStart13F = false;
  12675. isDanceStart14F = false;
  12676. isDanceStart15F = false;
  12677. for (int j = 0; j < maidCnt; j++)
  12678. {
  12679. danceFace[j] = 0f;
  12680. }
  12681. if (isDanceStart7V)
  12682. {
  12683. for (int j = 0; j < maidCnt; j++)
  12684. {
  12685. if (maidArray[j] && maidArray[j].Visible)
  12686. {
  12687. if (isDanceStart7V)
  12688. {
  12689. maidArray[j].SetPos(dancePos[j]);
  12690. maidArray[j].body0.transform.localRotation = danceRot[j];
  12691. }
  12692. }
  12693. }
  12694. isDanceStart7V = false;
  12695. }
  12696. if (isDanceStart8V)
  12697. {
  12698. for (int j = 0; j < maidCnt; j++)
  12699. {
  12700. if (maidArray[j] && maidArray[j].Visible)
  12701. {
  12702. if (isDanceStart8V)
  12703. {
  12704. maidArray[j].SetPos(dancePos[j]);
  12705. maidArray[j].body0.transform.localRotation = danceRot[j];
  12706. }
  12707. }
  12708. }
  12709. isDanceStart8V = false;
  12710. isDanceStart8P = false;
  12711. }
  12712. if (isDanceStart11V)
  12713. {
  12714. for (int j = 0; j < maidCnt; j++)
  12715. {
  12716. if (maidArray[j] && maidArray[j].Visible)
  12717. {
  12718. if (isDanceStart11V)
  12719. {
  12720. maidArray[j].SetPos(dancePos[j]);
  12721. maidArray[j].body0.transform.localRotation = danceRot[j];
  12722. }
  12723. }
  12724. }
  12725. isDanceStart11V = false;
  12726. }
  12727. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12728. || isDanceStart13K)
  12729. {
  12730. for (int j = 0; j < maidCnt; j++)
  12731. {
  12732. if (maidArray[j] && maidArray[j].Visible)
  12733. {
  12734. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12735. || isDanceStart13K)
  12736. {
  12737. maidArray[j].SetPos(dancePos[j]);
  12738. maidArray[j].body0.transform.localRotation = danceRot[j];
  12739. int i = j;
  12740. if (!isVR)
  12741. {
  12742. delCount[i] = 20;
  12743. if (goSlot[(int)selectList[i]] != null)
  12744. {
  12745. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12746. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12747. {
  12748. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12749. }
  12750. }
  12751. }
  12752. Maid maid = maidArray[j];
  12753. maid.DelProp(MPN.handitem, true);
  12754. maid.DelProp(MPN.accvag, true);
  12755. maid.DelProp(MPN.accanl, true);
  12756. maid.DelProp(MPN.kousoku_upper, true);
  12757. maid.DelProp(MPN.kousoku_lower, true);
  12758. maid.AllProcPropSeqStart();
  12759. }
  12760. }
  12761. }
  12762. isDanceStart1K = false;
  12763. isDanceStart3K = false;
  12764. isDanceStart4K = false;
  12765. isDanceStart5K = false;
  12766. isDanceStart6K = false;
  12767. isDanceStart9K = false;
  12768. isDanceStart13K = false;
  12769. }
  12770. if (isDanceStart14V)
  12771. {
  12772. for (int j = 0; j < maidCnt; j++)
  12773. {
  12774. if (maidArray[j] && maidArray[j].Visible)
  12775. {
  12776. if (isDanceStart14V)
  12777. {
  12778. maidArray[j].SetPos(dancePos[j]);
  12779. maidArray[j].body0.transform.localRotation = danceRot[j];
  12780. }
  12781. }
  12782. }
  12783. isDanceStart14V = false;
  12784. }
  12785. if (isDanceStart15V)
  12786. {
  12787. for (int j = 0; j < maidCnt; j++)
  12788. {
  12789. if (maidArray[j] && maidArray[j].Visible)
  12790. {
  12791. if (isDanceStart15V)
  12792. {
  12793. maidArray[j].SetPos(dancePos[j]);
  12794. maidArray[j].body0.transform.localRotation = danceRot[j];
  12795. }
  12796. }
  12797. }
  12798. isDanceStart15V = false;
  12799. }
  12800. for (int j = 0; j < maidCnt; j++)
  12801. {
  12802. isStop[j] = false;
  12803. isLock[j] = false;
  12804. pHandL[j] = 0;
  12805. pHandR[j] = 0;
  12806. muneIKL[j] = false;
  12807. muneIKR[j] = false;
  12808. if (!isVR)
  12809. {
  12810. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12811. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12812. }
  12813. if (maidArray[j].transform.position.y != 100f)
  12814. {
  12815. dancePos[j] = maidArray[j].transform.position;
  12816. }
  12817. else
  12818. {
  12819. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12820. }
  12821. danceRot[j] = maidArray[j].transform.localRotation;
  12822. }
  12823. if (maidArray[1] && maidArray[1].Visible)
  12824. {
  12825. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12826. maidArray[0].transform.position.y,
  12827. maidArray[0].transform.position.z));
  12828. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12829. }
  12830. if (maidArray[2] && maidArray[2].Visible)
  12831. {
  12832. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12833. maidArray[0].transform.position.y,
  12834. maidArray[0].transform.position.z));
  12835. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12836. }
  12837. if (maidArray[4] && maidArray[4].Visible)
  12838. {
  12839. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12840. maidArray[3].transform.position.y,
  12841. maidArray[3].transform.position.z));
  12842. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12843. }
  12844. if (maidArray[5] && maidArray[5].Visible)
  12845. {
  12846. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12847. maidArray[3].transform.position.y,
  12848. maidArray[3].transform.position.z));
  12849. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12850. }
  12851. if (maidArray[7] && maidArray[7].Visible)
  12852. {
  12853. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12854. maidArray[6].transform.position.y,
  12855. maidArray[6].transform.position.z));
  12856. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12857. }
  12858. if (maidArray[8] && maidArray[8].Visible)
  12859. {
  12860. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12861. maidArray[6].transform.position.y,
  12862. maidArray[6].transform.position.z));
  12863. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12864. }
  12865. if (maidArray[10] && maidArray[10].Visible)
  12866. {
  12867. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12868. maidArray[9].transform.position.y,
  12869. maidArray[9].transform.position.z));
  12870. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12871. }
  12872. if (maidArray[11] && maidArray[11].Visible)
  12873. {
  12874. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12875. maidArray[9].transform.position.y,
  12876. maidArray[9].transform.position.z));
  12877. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12878. }
  12879. if (maidArray[13] && maidArray[13].Visible)
  12880. {
  12881. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12882. maidArray[12].transform.position.y,
  12883. maidArray[12].transform.position.z));
  12884. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12885. }
  12886. isSS = false;
  12887. isDance = true;
  12888. isDanceStart11 = true;
  12889. }
  12890. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12891. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12892. {
  12893. GameMain.Instance.SoundMgr.StopBGM(0f);
  12894. isSS1 = true;
  12895. isSS2 = false;
  12896. isSS3 = false;
  12897. isSS4 = false;
  12898. isSS5 = false;
  12899. isSS6 = false;
  12900. isSS = true;
  12901. }
  12902. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12903. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12904. {
  12905. GameMain.Instance.SoundMgr.StopBGM(0f);
  12906. isSS1 = false;
  12907. isSS2 = true;
  12908. isSS3 = false;
  12909. isSS4 = false;
  12910. isSS5 = false;
  12911. isSS6 = false;
  12912. isSS = true;
  12913. }
  12914. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12915. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12916. {
  12917. GameMain.Instance.SoundMgr.StopBGM(0f);
  12918. isSS1 = false;
  12919. isSS2 = false;
  12920. isSS3 = true;
  12921. isSS4 = false;
  12922. isSS5 = false;
  12923. isSS6 = false;
  12924. isSS = true;
  12925. }
  12926. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12927. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12928. {
  12929. GameMain.Instance.SoundMgr.StopBGM(0f);
  12930. isSS1 = false;
  12931. isSS2 = false;
  12932. isSS3 = false;
  12933. isSS4 = true;
  12934. isSS5 = false;
  12935. isSS6 = false;
  12936. isSS = true;
  12937. }
  12938. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12939. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12940. {
  12941. GameMain.Instance.SoundMgr.StopBGM(0f);
  12942. isSS1 = false;
  12943. isSS2 = false;
  12944. isSS3 = false;
  12945. isSS4 = false;
  12946. isSS5 = true;
  12947. isSS6 = false;
  12948. isSS = true;
  12949. }
  12950. if (isKHG1 || isKHG2)
  12951. {
  12952. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12953. string text4 = textAsset.text;
  12954. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12955. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12956. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12957. for (int j = 0; j < maidCnt; j++)
  12958. {
  12959. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12960. {
  12961. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12962. GameUty.FileSystem,
  12963. "dance_cm3d2_005_khg_f.anm",
  12964. false,
  12965. false);
  12966. }
  12967. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12968. }
  12969. if (isKHG1)
  12970. {
  12971. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12972. }
  12973. if (isKHG2)
  12974. {
  12975. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12976. }
  12977. for (int j = 0; j < maidCnt; j++)
  12978. {
  12979. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12980. isStop[j] = false;
  12981. isLock[j] = false;
  12982. pHandL[j] = 0;
  12983. pHandR[j] = 0;
  12984. muneIKL[j] = false;
  12985. muneIKR[j] = false;
  12986. if (!isVR)
  12987. {
  12988. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12989. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12990. }
  12991. }
  12992. ikBui = 5;
  12993. isDanceStart1F = false;
  12994. isDanceStart2F = false;
  12995. isDanceStart3F = false;
  12996. isDanceStart4F = false;
  12997. isDanceStart5F = false;
  12998. isDanceStart6F = false;
  12999. isDanceStart7F = false;
  13000. isDanceStart8F = false;
  13001. isDanceStart9F = false;
  13002. isDanceStart10F = false;
  13003. isDanceStart11F = false;
  13004. isDanceStart12F = false;
  13005. isDanceStart13F = false;
  13006. isDanceStart14F = false;
  13007. isDanceStart15F = false;
  13008. for (int j = 0; j < maidCnt; j++)
  13009. {
  13010. danceFace[j] = 0f;
  13011. }
  13012. if (isDanceStart7V)
  13013. {
  13014. for (int j = 0; j < maidCnt; j++)
  13015. {
  13016. if (maidArray[j] && maidArray[j].Visible)
  13017. {
  13018. if (isDanceStart7V)
  13019. {
  13020. maidArray[j].SetPos(dancePos[j]);
  13021. maidArray[j].body0.transform.localRotation = danceRot[j];
  13022. }
  13023. }
  13024. }
  13025. isDanceStart7V = false;
  13026. }
  13027. if (isDanceStart8V)
  13028. {
  13029. for (int j = 0; j < maidCnt; j++)
  13030. {
  13031. if (maidArray[j] && maidArray[j].Visible)
  13032. {
  13033. if (isDanceStart8V)
  13034. {
  13035. maidArray[j].SetPos(dancePos[j]);
  13036. maidArray[j].body0.transform.localRotation = danceRot[j];
  13037. }
  13038. }
  13039. }
  13040. isDanceStart8V = false;
  13041. isDanceStart8P = false;
  13042. }
  13043. if (isDanceStart11V)
  13044. {
  13045. for (int j = 0; j < maidCnt; j++)
  13046. {
  13047. if (maidArray[j] && maidArray[j].Visible)
  13048. {
  13049. if (isDanceStart11V)
  13050. {
  13051. maidArray[j].SetPos(dancePos[j]);
  13052. maidArray[j].body0.transform.localRotation = danceRot[j];
  13053. }
  13054. }
  13055. }
  13056. isDanceStart11V = false;
  13057. }
  13058. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13059. || isDanceStart13K)
  13060. {
  13061. for (int j = 0; j < maidCnt; j++)
  13062. {
  13063. if (maidArray[j] && maidArray[j].Visible)
  13064. {
  13065. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13066. || isDanceStart13K)
  13067. {
  13068. maidArray[j].SetPos(dancePos[j]);
  13069. maidArray[j].body0.transform.localRotation = danceRot[j];
  13070. int i = j;
  13071. if (!isVR)
  13072. {
  13073. delCount[i] = 20;
  13074. if (goSlot[(int)selectList[i]] != null)
  13075. {
  13076. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13077. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13078. {
  13079. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13080. }
  13081. }
  13082. }
  13083. Maid maid = maidArray[j];
  13084. maid.DelProp(MPN.handitem, true);
  13085. maid.DelProp(MPN.accvag, true);
  13086. maid.DelProp(MPN.accanl, true);
  13087. maid.DelProp(MPN.kousoku_upper, true);
  13088. maid.DelProp(MPN.kousoku_lower, true);
  13089. maid.AllProcPropSeqStart();
  13090. }
  13091. }
  13092. }
  13093. isDanceStart1K = false;
  13094. isDanceStart3K = false;
  13095. isDanceStart4K = false;
  13096. isDanceStart5K = false;
  13097. isDanceStart6K = false;
  13098. isDanceStart9K = false;
  13099. isDanceStart13K = false;
  13100. }
  13101. if (isDanceStart14V)
  13102. {
  13103. for (int j = 0; j < maidCnt; j++)
  13104. {
  13105. if (maidArray[j] && maidArray[j].Visible)
  13106. {
  13107. if (isDanceStart14V)
  13108. {
  13109. maidArray[j].SetPos(dancePos[j]);
  13110. maidArray[j].body0.transform.localRotation = danceRot[j];
  13111. }
  13112. }
  13113. }
  13114. isDanceStart14V = false;
  13115. }
  13116. if (isDanceStart15V)
  13117. {
  13118. for (int j = 0; j < maidCnt; j++)
  13119. {
  13120. if (maidArray[j] && maidArray[j].Visible)
  13121. {
  13122. if (isDanceStart15V)
  13123. {
  13124. maidArray[j].SetPos(dancePos[j]);
  13125. maidArray[j].body0.transform.localRotation = danceRot[j];
  13126. }
  13127. }
  13128. }
  13129. isDanceStart15V = false;
  13130. }
  13131. if (maidArray[1] && maidArray[1].Visible)
  13132. {
  13133. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13134. {
  13135. Vector3 vector = Vector3.zero;
  13136. vector.x = 0.6f;
  13137. maidArray[1].SetPos(vector);
  13138. if (maidArray[2] && maidArray[2].Visible)
  13139. {
  13140. vector.x = -0.6f;
  13141. maidArray[2].SetPos(vector);
  13142. }
  13143. if (maidArray[3] && maidArray[3].Visible)
  13144. {
  13145. vector.x = 1.2f;
  13146. maidArray[3].SetPos(vector);
  13147. }
  13148. if (maidArray[4] && maidArray[4].Visible)
  13149. {
  13150. vector.x = -1.2f;
  13151. maidArray[4].SetPos(vector);
  13152. }
  13153. if (maidArray[5] && maidArray[5].Visible)
  13154. {
  13155. vector.x = 1.8f;
  13156. maidArray[5].SetPos(vector);
  13157. }
  13158. if (maidArray[6] && maidArray[6].Visible)
  13159. {
  13160. vector.x = -1.8f;
  13161. maidArray[6].SetPos(vector);
  13162. }
  13163. if (maidArray[7] && maidArray[7].Visible)
  13164. {
  13165. vector.x = 2.4f;
  13166. maidArray[7].SetPos(vector);
  13167. }
  13168. if (maidArray[8] && maidArray[8].Visible)
  13169. {
  13170. vector.x = -2.4f;
  13171. maidArray[8].SetPos(vector);
  13172. }
  13173. if (maidArray[9] && maidArray[9].Visible)
  13174. {
  13175. vector.x = 3f;
  13176. maidArray[9].SetPos(vector);
  13177. }
  13178. if (maidArray[10] && maidArray[10].Visible)
  13179. {
  13180. vector.x = -3f;
  13181. maidArray[10].SetPos(vector);
  13182. }
  13183. if (maidArray[11] && maidArray[11].Visible)
  13184. {
  13185. vector.x = 3.6f;
  13186. maidArray[11].SetPos(vector);
  13187. }
  13188. if (maidArray[12] && maidArray[12].Visible)
  13189. {
  13190. vector.x = -3.6f;
  13191. maidArray[12].SetPos(vector);
  13192. }
  13193. if (maidArray[13] && maidArray[13].Visible)
  13194. {
  13195. vector.x = 4.2f;
  13196. maidArray[13].SetPos(vector);
  13197. }
  13198. }
  13199. }
  13200. isDance = true;
  13201. isDanceStart12 = true;
  13202. isKHG1 = false;
  13203. isKHG2 = false;
  13204. }
  13205. if (isDanceStart13Count > 0)
  13206. {
  13207. isDanceStart13Count++;
  13208. }
  13209. if (isDanceStart13Count == 1)
  13210. {
  13211. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13212. isDanceStart13Count = 0;
  13213. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13214. string text4 = textAsset.text;
  13215. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13216. for (int j = 0; j < maidCnt; j++)
  13217. {
  13218. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13219. }
  13220. }
  13221. if ((isSN1 || isSN2 || isSN3) && isShift)
  13222. {
  13223. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13224. string text4 = textAsset.text;
  13225. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13226. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13227. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13228. for (int j = 0; j < maidCnt; j++)
  13229. {
  13230. if (!isShift)
  13231. {
  13232. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13233. {
  13234. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13235. GameUty.FileSystem,
  13236. "dance_cm3d2_006_ssn_f1.anm",
  13237. false,
  13238. false);
  13239. }
  13240. }
  13241. else
  13242. {
  13243. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13244. {
  13245. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13246. GameUty.FileSystem,
  13247. "dance_cm3d21_kara_001_nmf_f1.anm",
  13248. false,
  13249. false);
  13250. }
  13251. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13252. string text5 = nameA + danceNo1 + ".anm";
  13253. switch (j)
  13254. {
  13255. case 1:
  13256. case 4:
  13257. case 7:
  13258. case 10:
  13259. case 13:
  13260. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13261. break;
  13262. case 2:
  13263. case 5:
  13264. case 8:
  13265. case 11:
  13266. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13267. break;
  13268. }
  13269. text4 = textAsset.text;
  13270. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13271. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13272. && !isDanceStart9K && !isDanceStart13K)
  13273. {
  13274. dancePos[j] = maidArray[j].transform.position;
  13275. danceRot[j] = maidArray[j].transform.localRotation;
  13276. }
  13277. }
  13278. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13279. }
  13280. if (!isShift)
  13281. {
  13282. if (isSN1)
  13283. {
  13284. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13285. }
  13286. if (isSN2)
  13287. {
  13288. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13289. }
  13290. if (isSN3)
  13291. {
  13292. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13293. }
  13294. }
  13295. else
  13296. {
  13297. danceWait = 400;
  13298. isDanceStart13Count++;
  13299. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13300. }
  13301. for (int j = 0; j < maidCnt; j++)
  13302. {
  13303. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13304. isStop[j] = false;
  13305. isLock[j] = false;
  13306. pHandL[j] = 0;
  13307. pHandR[j] = 0;
  13308. muneIKL[j] = false;
  13309. muneIKR[j] = false;
  13310. if (!isVR)
  13311. {
  13312. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13313. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13314. }
  13315. }
  13316. ikBui = 5;
  13317. isDanceStart1F = false;
  13318. isDanceStart2F = false;
  13319. isDanceStart3F = false;
  13320. isDanceStart4F = false;
  13321. isDanceStart5F = false;
  13322. isDanceStart6F = false;
  13323. isDanceStart7F = false;
  13324. isDanceStart8F = false;
  13325. isDanceStart9F = false;
  13326. isDanceStart10F = false;
  13327. isDanceStart11F = false;
  13328. isDanceStart12F = false;
  13329. isDanceStart13F = false;
  13330. isDanceStart14F = false;
  13331. isDanceStart15F = false;
  13332. for (int j = 0; j < maidCnt; j++)
  13333. {
  13334. danceFace[j] = 0f;
  13335. }
  13336. if (isDanceStart7V)
  13337. {
  13338. for (int j = 0; j < maidCnt; j++)
  13339. {
  13340. if (maidArray[j] && maidArray[j].Visible)
  13341. {
  13342. if (isDanceStart7V)
  13343. {
  13344. maidArray[j].SetPos(dancePos[j]);
  13345. maidArray[j].body0.transform.localRotation = danceRot[j];
  13346. }
  13347. }
  13348. }
  13349. isDanceStart7V = false;
  13350. }
  13351. if (isDanceStart8V)
  13352. {
  13353. for (int j = 0; j < maidCnt; j++)
  13354. {
  13355. if (maidArray[j] && maidArray[j].Visible)
  13356. {
  13357. if (isDanceStart8V)
  13358. {
  13359. maidArray[j].SetPos(dancePos[j]);
  13360. maidArray[j].body0.transform.localRotation = danceRot[j];
  13361. }
  13362. }
  13363. }
  13364. isDanceStart8V = false;
  13365. isDanceStart8P = false;
  13366. }
  13367. if (isDanceStart11V)
  13368. {
  13369. for (int j = 0; j < maidCnt; j++)
  13370. {
  13371. if (maidArray[j] && maidArray[j].Visible)
  13372. {
  13373. if (isDanceStart11V)
  13374. {
  13375. maidArray[j].SetPos(dancePos[j]);
  13376. maidArray[j].body0.transform.localRotation = danceRot[j];
  13377. }
  13378. }
  13379. }
  13380. isDanceStart11V = false;
  13381. }
  13382. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13383. || isDanceStart13K)
  13384. {
  13385. for (int j = 0; j < maidCnt; j++)
  13386. {
  13387. if (maidArray[j] && maidArray[j].Visible)
  13388. {
  13389. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13390. || isDanceStart13K)
  13391. {
  13392. maidArray[j].SetPos(dancePos[j]);
  13393. maidArray[j].body0.transform.localRotation = danceRot[j];
  13394. int i = j;
  13395. if (!isVR)
  13396. {
  13397. delCount[i] = 20;
  13398. if (goSlot[(int)selectList[i]] != null)
  13399. {
  13400. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13401. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13402. {
  13403. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13404. }
  13405. }
  13406. }
  13407. Maid maid = maidArray[j];
  13408. maid.DelProp(MPN.handitem, true);
  13409. maid.DelProp(MPN.accvag, true);
  13410. maid.DelProp(MPN.accanl, true);
  13411. maid.DelProp(MPN.kousoku_upper, true);
  13412. maid.DelProp(MPN.kousoku_lower, true);
  13413. maid.AllProcPropSeqStart();
  13414. }
  13415. }
  13416. }
  13417. isDanceStart1K = false;
  13418. isDanceStart3K = false;
  13419. isDanceStart4K = false;
  13420. isDanceStart5K = false;
  13421. isDanceStart6K = false;
  13422. isDanceStart9K = false;
  13423. isDanceStart13K = false;
  13424. }
  13425. if (isDanceStart14V)
  13426. {
  13427. for (int j = 0; j < maidCnt; j++)
  13428. {
  13429. if (maidArray[j] && maidArray[j].Visible)
  13430. {
  13431. if (isDanceStart14V)
  13432. {
  13433. maidArray[j].SetPos(dancePos[j]);
  13434. maidArray[j].body0.transform.localRotation = danceRot[j];
  13435. }
  13436. }
  13437. }
  13438. isDanceStart14V = false;
  13439. }
  13440. if (isDanceStart15V)
  13441. {
  13442. for (int j = 0; j < maidCnt; j++)
  13443. {
  13444. if (maidArray[j] && maidArray[j].Visible)
  13445. {
  13446. if (isDanceStart15V)
  13447. {
  13448. maidArray[j].SetPos(dancePos[j]);
  13449. maidArray[j].body0.transform.localRotation = danceRot[j];
  13450. }
  13451. }
  13452. }
  13453. isDanceStart15V = false;
  13454. }
  13455. if (maidArray[1] && maidArray[1].Visible)
  13456. {
  13457. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13458. {
  13459. Vector3 vector = Vector3.zero;
  13460. vector.x = 0.6f;
  13461. maidArray[1].SetPos(vector);
  13462. if (maidArray[2] && maidArray[2].Visible)
  13463. {
  13464. vector.x = -0.6f;
  13465. maidArray[2].SetPos(vector);
  13466. }
  13467. if (maidArray[3] && maidArray[3].Visible)
  13468. {
  13469. vector.x = 1.2f;
  13470. maidArray[3].SetPos(vector);
  13471. }
  13472. if (maidArray[4] && maidArray[4].Visible)
  13473. {
  13474. vector.x = -1.2f;
  13475. maidArray[4].SetPos(vector);
  13476. }
  13477. if (maidArray[5] && maidArray[5].Visible)
  13478. {
  13479. vector.x = 1.8f;
  13480. maidArray[5].SetPos(vector);
  13481. }
  13482. if (maidArray[6] && maidArray[6].Visible)
  13483. {
  13484. vector.x = -1.8f;
  13485. maidArray[6].SetPos(vector);
  13486. }
  13487. if (maidArray[7] && maidArray[7].Visible)
  13488. {
  13489. vector.x = 2.4f;
  13490. maidArray[7].SetPos(vector);
  13491. }
  13492. if (maidArray[8] && maidArray[8].Visible)
  13493. {
  13494. vector.x = -2.4f;
  13495. maidArray[8].SetPos(vector);
  13496. }
  13497. if (maidArray[9] && maidArray[9].Visible)
  13498. {
  13499. vector.x = 3f;
  13500. maidArray[9].SetPos(vector);
  13501. }
  13502. if (maidArray[10] && maidArray[10].Visible)
  13503. {
  13504. vector.x = -3f;
  13505. maidArray[10].SetPos(vector);
  13506. }
  13507. if (maidArray[11] && maidArray[11].Visible)
  13508. {
  13509. vector.x = 3.6f;
  13510. maidArray[11].SetPos(vector);
  13511. }
  13512. if (maidArray[12] && maidArray[12].Visible)
  13513. {
  13514. vector.x = -3.6f;
  13515. maidArray[12].SetPos(vector);
  13516. }
  13517. if (maidArray[13] && maidArray[13].Visible)
  13518. {
  13519. vector.x = 4.2f;
  13520. maidArray[13].SetPos(vector);
  13521. }
  13522. }
  13523. }
  13524. if (isShift)
  13525. {
  13526. isDanceStart13K = true;
  13527. for (int j = 0; j < maidCnt; j++)
  13528. {
  13529. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13530. maidArray[j].body0.transform.localRotation.y + 90f,
  13531. maidArray[j].body0.transform.localRotation.z));
  13532. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13533. maidArray[j].body0.transform.position.y,
  13534. maidArray[j].body0.transform.position.z + 4f));
  13535. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13536. int i = j;
  13537. Maid maid = maidArray[j];
  13538. if (!isVR)
  13539. {
  13540. delCount[i] = 20;
  13541. if (goSlot[(int)selectList[i]] != null)
  13542. {
  13543. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13544. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13545. {
  13546. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13547. }
  13548. }
  13549. }
  13550. string[] array = new string[2];
  13551. array = text2.Split(new char[] { ',' });
  13552. maid.DelProp(MPN.handitem, true);
  13553. maid.DelProp(MPN.accvag, true);
  13554. maid.DelProp(MPN.accanl, true);
  13555. maid.DelProp(MPN.kousoku_upper, true);
  13556. maid.DelProp(MPN.kousoku_lower, true);
  13557. if (array[0] != "")
  13558. {
  13559. maid.SetProp(array[0], array[1], 0, true, false);
  13560. }
  13561. maid.AllProcPropSeqStart();
  13562. }
  13563. }
  13564. isDance = true;
  13565. isDanceStart13 = true;
  13566. isSN1 = false;
  13567. isSN2 = false;
  13568. isSN3 = false;
  13569. }
  13570. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13571. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13572. {
  13573. GameMain.Instance.SoundMgr.StopBGM(0f);
  13574. isSN1 = true;
  13575. hFlg = true;
  13576. if (getModKeyPressing(modKey.Shift))
  13577. {
  13578. isShift = true;
  13579. }
  13580. }
  13581. if (isSN4 || isSN5 || isSN6)
  13582. {
  13583. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13584. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13585. for (int j = 0; j < maidCnt; j++)
  13586. {
  13587. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13588. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13589. switch (j)
  13590. {
  13591. case 1:
  13592. case 4:
  13593. case 7:
  13594. case 10:
  13595. case 13:
  13596. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13597. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13598. break;
  13599. case 2:
  13600. case 5:
  13601. case 8:
  13602. case 11:
  13603. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13604. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13605. break;
  13606. }
  13607. if (maidArray[j] && maidArray[j].Visible)
  13608. {
  13609. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13610. {
  13611. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13612. }
  13613. string text4 = textAsset.text;
  13614. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13615. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13616. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13617. }
  13618. }
  13619. if (isSN4)
  13620. {
  13621. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13622. }
  13623. if (isSN5)
  13624. {
  13625. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13626. }
  13627. if (isSN6)
  13628. {
  13629. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13630. }
  13631. ikBui = 5;
  13632. isDanceStart1F = false;
  13633. isDanceStart2F = false;
  13634. isDanceStart3F = false;
  13635. isDanceStart4F = false;
  13636. isDanceStart5F = false;
  13637. isDanceStart6F = false;
  13638. isDanceStart7F = false;
  13639. isDanceStart8F = false;
  13640. isDanceStart9F = false;
  13641. isDanceStart10F = false;
  13642. isDanceStart11F = false;
  13643. isDanceStart12F = false;
  13644. isDanceStart13F = false;
  13645. isDanceStart14F = false;
  13646. isDanceStart15F = false;
  13647. for (int j = 0; j < maidCnt; j++)
  13648. {
  13649. danceFace[j] = 0f;
  13650. }
  13651. if (isDanceStart7V)
  13652. {
  13653. for (int j = 0; j < maidCnt; j++)
  13654. {
  13655. if (maidArray[j] && maidArray[j].Visible)
  13656. {
  13657. if (isDanceStart7V)
  13658. {
  13659. maidArray[j].SetPos(dancePos[j]);
  13660. maidArray[j].body0.transform.localRotation = danceRot[j];
  13661. }
  13662. }
  13663. }
  13664. isDanceStart7V = false;
  13665. }
  13666. if (isDanceStart8V)
  13667. {
  13668. for (int j = 0; j < maidCnt; j++)
  13669. {
  13670. if (maidArray[j] && maidArray[j].Visible)
  13671. {
  13672. if (isDanceStart8V)
  13673. {
  13674. maidArray[j].SetPos(dancePos[j]);
  13675. maidArray[j].body0.transform.localRotation = danceRot[j];
  13676. }
  13677. }
  13678. }
  13679. isDanceStart8V = false;
  13680. isDanceStart8P = false;
  13681. }
  13682. if (isDanceStart11V)
  13683. {
  13684. for (int j = 0; j < maidCnt; j++)
  13685. {
  13686. if (maidArray[j] && maidArray[j].Visible)
  13687. {
  13688. if (isDanceStart11V)
  13689. {
  13690. maidArray[j].SetPos(dancePos[j]);
  13691. maidArray[j].body0.transform.localRotation = danceRot[j];
  13692. }
  13693. }
  13694. }
  13695. isDanceStart11V = false;
  13696. }
  13697. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13698. || isDanceStart13K)
  13699. {
  13700. for (int j = 0; j < maidCnt; j++)
  13701. {
  13702. if (maidArray[j] && maidArray[j].Visible)
  13703. {
  13704. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13705. || isDanceStart13K)
  13706. {
  13707. maidArray[j].SetPos(dancePos[j]);
  13708. maidArray[j].body0.transform.localRotation = danceRot[j];
  13709. int i = j;
  13710. if (!isVR)
  13711. {
  13712. delCount[i] = 20;
  13713. if (goSlot[(int)selectList[i]] != null)
  13714. {
  13715. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13716. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13717. {
  13718. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13719. }
  13720. }
  13721. }
  13722. Maid maid = maidArray[j];
  13723. maid.DelProp(MPN.handitem, true);
  13724. maid.DelProp(MPN.accvag, true);
  13725. maid.DelProp(MPN.accanl, true);
  13726. maid.DelProp(MPN.kousoku_upper, true);
  13727. maid.DelProp(MPN.kousoku_lower, true);
  13728. maid.AllProcPropSeqStart();
  13729. }
  13730. }
  13731. }
  13732. isDanceStart1K = false;
  13733. isDanceStart3K = false;
  13734. isDanceStart4K = false;
  13735. isDanceStart5K = false;
  13736. isDanceStart6K = false;
  13737. isDanceStart9K = false;
  13738. isDanceStart13K = false;
  13739. }
  13740. if (isDanceStart14V)
  13741. {
  13742. for (int j = 0; j < maidCnt; j++)
  13743. {
  13744. if (maidArray[j] && maidArray[j].Visible)
  13745. {
  13746. if (isDanceStart14V)
  13747. {
  13748. maidArray[j].SetPos(dancePos[j]);
  13749. maidArray[j].body0.transform.localRotation = danceRot[j];
  13750. }
  13751. }
  13752. }
  13753. isDanceStart14V = false;
  13754. }
  13755. if (isDanceStart15V)
  13756. {
  13757. for (int j = 0; j < maidCnt; j++)
  13758. {
  13759. if (maidArray[j] && maidArray[j].Visible)
  13760. {
  13761. if (isDanceStart15V)
  13762. {
  13763. maidArray[j].SetPos(dancePos[j]);
  13764. maidArray[j].body0.transform.localRotation = danceRot[j];
  13765. }
  13766. }
  13767. }
  13768. isDanceStart15V = false;
  13769. }
  13770. for (int j = 0; j < maidCnt; j++)
  13771. {
  13772. isStop[j] = false;
  13773. isLock[j] = false;
  13774. pHandL[j] = 0;
  13775. pHandR[j] = 0;
  13776. muneIKL[j] = false;
  13777. muneIKR[j] = false;
  13778. if (!isVR)
  13779. {
  13780. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13781. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13782. }
  13783. if (maidArray[j].transform.position.y != 100f)
  13784. {
  13785. dancePos[j] = maidArray[j].transform.position;
  13786. }
  13787. else
  13788. {
  13789. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13790. }
  13791. danceRot[j] = maidArray[j].transform.localRotation;
  13792. }
  13793. if (maidArray[1] && maidArray[1].Visible)
  13794. {
  13795. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13796. maidArray[0].transform.position.y,
  13797. maidArray[0].transform.position.z));
  13798. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13799. }
  13800. if (maidArray[2] && maidArray[2].Visible)
  13801. {
  13802. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13803. maidArray[0].transform.position.y,
  13804. maidArray[0].transform.position.z));
  13805. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13806. }
  13807. if (maidArray[4] && maidArray[4].Visible)
  13808. {
  13809. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13810. maidArray[3].transform.position.y,
  13811. maidArray[3].transform.position.z));
  13812. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13813. }
  13814. if (maidArray[5] && maidArray[5].Visible)
  13815. {
  13816. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13817. maidArray[3].transform.position.y,
  13818. maidArray[3].transform.position.z));
  13819. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13820. }
  13821. if (maidArray[7] && maidArray[7].Visible)
  13822. {
  13823. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13824. maidArray[6].transform.position.y,
  13825. maidArray[6].transform.position.z));
  13826. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13827. }
  13828. if (maidArray[8] && maidArray[8].Visible)
  13829. {
  13830. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13831. maidArray[6].transform.position.y,
  13832. maidArray[6].transform.position.z));
  13833. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13834. }
  13835. if (maidArray[10] && maidArray[10].Visible)
  13836. {
  13837. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13838. maidArray[9].transform.position.y,
  13839. maidArray[9].transform.position.z));
  13840. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13841. }
  13842. if (maidArray[11] && maidArray[11].Visible)
  13843. {
  13844. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13845. maidArray[9].transform.position.y,
  13846. maidArray[9].transform.position.z));
  13847. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13848. }
  13849. if (maidArray[13] && maidArray[13].Visible)
  13850. {
  13851. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13852. maidArray[12].transform.position.y,
  13853. maidArray[12].transform.position.z));
  13854. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13855. }
  13856. isDance = true;
  13857. isDanceStart14 = true;
  13858. isSN4 = false;
  13859. isSN5 = false;
  13860. isSN6 = false;
  13861. }
  13862. if (isSD1)
  13863. {
  13864. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13865. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13866. for (int j = 0; j < maidCnt; j++)
  13867. {
  13868. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13869. string text5 = "dance_cmo_002_sd_f1.anm";
  13870. switch (j)
  13871. {
  13872. case 1:
  13873. case 3:
  13874. case 5:
  13875. case 7:
  13876. case 9:
  13877. case 11:
  13878. case 13:
  13879. text5 = "dance_cmo_002_sd_f2.anm";
  13880. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13881. break;
  13882. }
  13883. danceName[j] = text5;
  13884. if (maidArray[j] && maidArray[j].Visible)
  13885. {
  13886. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13887. {
  13888. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13889. }
  13890. string text4 = textAsset.text;
  13891. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13892. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13893. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13894. }
  13895. }
  13896. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13897. ikBui = 5;
  13898. isDanceStart1F = false;
  13899. isDanceStart2F = false;
  13900. isDanceStart3F = false;
  13901. isDanceStart4F = false;
  13902. isDanceStart5F = false;
  13903. isDanceStart6F = false;
  13904. isDanceStart7F = false;
  13905. isDanceStart8F = false;
  13906. isDanceStart9F = false;
  13907. isDanceStart10F = false;
  13908. isDanceStart11F = false;
  13909. isDanceStart12F = false;
  13910. isDanceStart13F = false;
  13911. isDanceStart14F = false;
  13912. isDanceStart15F = false;
  13913. for (int j = 0; j < maidCnt; j++)
  13914. {
  13915. danceFace[j] = 0f;
  13916. }
  13917. if (isDanceStart7V)
  13918. {
  13919. for (int j = 0; j < maidCnt; j++)
  13920. {
  13921. if (maidArray[j] && maidArray[j].Visible)
  13922. {
  13923. if (isDanceStart7V)
  13924. {
  13925. maidArray[j].SetPos(dancePos[j]);
  13926. maidArray[j].body0.transform.localRotation = danceRot[j];
  13927. }
  13928. }
  13929. }
  13930. isDanceStart7V = false;
  13931. }
  13932. if (isDanceStart8V)
  13933. {
  13934. for (int j = 0; j < maidCnt; j++)
  13935. {
  13936. if (maidArray[j] && maidArray[j].Visible)
  13937. {
  13938. if (isDanceStart8V)
  13939. {
  13940. maidArray[j].SetPos(dancePos[j]);
  13941. maidArray[j].body0.transform.localRotation = danceRot[j];
  13942. }
  13943. }
  13944. }
  13945. isDanceStart8V = false;
  13946. isDanceStart8P = false;
  13947. }
  13948. if (isDanceStart11V)
  13949. {
  13950. for (int j = 0; j < maidCnt; j++)
  13951. {
  13952. if (maidArray[j] && maidArray[j].Visible)
  13953. {
  13954. if (isDanceStart11V)
  13955. {
  13956. maidArray[j].SetPos(dancePos[j]);
  13957. maidArray[j].body0.transform.localRotation = danceRot[j];
  13958. }
  13959. }
  13960. }
  13961. isDanceStart11V = false;
  13962. }
  13963. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13964. || isDanceStart13K)
  13965. {
  13966. for (int j = 0; j < maidCnt; j++)
  13967. {
  13968. if (maidArray[j] && maidArray[j].Visible)
  13969. {
  13970. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13971. || isDanceStart13K)
  13972. {
  13973. maidArray[j].SetPos(dancePos[j]);
  13974. maidArray[j].body0.transform.localRotation = danceRot[j];
  13975. int i = j;
  13976. if (!isVR)
  13977. {
  13978. delCount[i] = 20;
  13979. if (goSlot[(int)selectList[i]] != null)
  13980. {
  13981. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13982. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13983. {
  13984. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13985. }
  13986. }
  13987. }
  13988. Maid maid = maidArray[j];
  13989. maid.DelProp(MPN.handitem, true);
  13990. maid.DelProp(MPN.accvag, true);
  13991. maid.DelProp(MPN.accanl, true);
  13992. maid.DelProp(MPN.kousoku_upper, true);
  13993. maid.DelProp(MPN.kousoku_lower, true);
  13994. maid.AllProcPropSeqStart();
  13995. }
  13996. }
  13997. }
  13998. isDanceStart1K = false;
  13999. isDanceStart3K = false;
  14000. isDanceStart4K = false;
  14001. isDanceStart5K = false;
  14002. isDanceStart6K = false;
  14003. isDanceStart9K = false;
  14004. isDanceStart13K = false;
  14005. }
  14006. if (isDanceStart14V)
  14007. {
  14008. for (int j = 0; j < maidCnt; j++)
  14009. {
  14010. if (maidArray[j] && maidArray[j].Visible)
  14011. {
  14012. if (isDanceStart14V)
  14013. {
  14014. maidArray[j].SetPos(dancePos[j]);
  14015. maidArray[j].body0.transform.localRotation = danceRot[j];
  14016. }
  14017. }
  14018. }
  14019. isDanceStart14V = false;
  14020. }
  14021. if (isDanceStart15V)
  14022. {
  14023. for (int j = 0; j < maidCnt; j++)
  14024. {
  14025. if (maidArray[j] && maidArray[j].Visible)
  14026. {
  14027. if (isDanceStart15V)
  14028. {
  14029. maidArray[j].SetPos(dancePos[j]);
  14030. maidArray[j].body0.transform.localRotation = danceRot[j];
  14031. }
  14032. }
  14033. }
  14034. isDanceStart15V = false;
  14035. }
  14036. for (int j = 0; j < maidCnt; j++)
  14037. {
  14038. isStop[j] = false;
  14039. isLock[j] = false;
  14040. pHandL[j] = 0;
  14041. pHandR[j] = 0;
  14042. muneIKL[j] = false;
  14043. muneIKR[j] = false;
  14044. if (!isVR)
  14045. {
  14046. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14047. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14048. }
  14049. if (maidArray[j].transform.position.y != 100f)
  14050. {
  14051. dancePos[j] = maidArray[j].transform.position;
  14052. }
  14053. else
  14054. {
  14055. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14056. }
  14057. danceRot[j] = maidArray[j].transform.localRotation;
  14058. }
  14059. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14060. {
  14061. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14062. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14063. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14064. maidArray[0].body0.transform.localRotation =
  14065. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14066. }
  14067. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14068. {
  14069. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14070. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14071. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14072. maidArray[2].body0.transform.localRotation =
  14073. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14074. }
  14075. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14076. {
  14077. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14078. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14079. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14080. maidArray[4].body0.transform.localRotation =
  14081. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14082. }
  14083. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14084. {
  14085. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14086. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14087. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14088. maidArray[6].body0.transform.localRotation =
  14089. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14090. }
  14091. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14092. {
  14093. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14094. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14095. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14096. maidArray[8].body0.transform.localRotation =
  14097. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14098. }
  14099. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14100. {
  14101. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14102. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14103. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14104. maidArray[10].body0.transform.localRotation =
  14105. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14106. }
  14107. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14108. {
  14109. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14110. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14111. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14112. maidArray[12].body0.transform.localRotation =
  14113. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14114. }
  14115. if (maidArray[1] && maidArray[1].Visible)
  14116. {
  14117. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14118. maidArray[0].transform.position.y,
  14119. maidArray[0].transform.position.z));
  14120. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14121. }
  14122. if (maidArray[3] && maidArray[3].Visible)
  14123. {
  14124. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14125. maidArray[2].transform.position.y,
  14126. maidArray[2].transform.position.z));
  14127. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14128. }
  14129. if (maidArray[5] && maidArray[5].Visible)
  14130. {
  14131. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14132. maidArray[4].transform.position.y,
  14133. maidArray[4].transform.position.z));
  14134. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14135. }
  14136. if (maidArray[7] && maidArray[7].Visible)
  14137. {
  14138. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14139. maidArray[6].transform.position.y,
  14140. maidArray[6].transform.position.z));
  14141. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14142. }
  14143. if (maidArray[9] && maidArray[9].Visible)
  14144. {
  14145. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14146. maidArray[8].transform.position.y,
  14147. maidArray[8].transform.position.z));
  14148. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14149. }
  14150. if (maidArray[11] && maidArray[11].Visible)
  14151. {
  14152. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14153. maidArray[10].transform.position.y,
  14154. maidArray[10].transform.position.z));
  14155. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14156. }
  14157. if (maidArray[13] && maidArray[13].Visible)
  14158. {
  14159. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14160. maidArray[12].transform.position.y,
  14161. maidArray[12].transform.position.z));
  14162. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14163. }
  14164. if (maidArray[2] && maidArray[2].Visible)
  14165. {
  14166. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14167. {
  14168. Vector3 vector = Vector3.zero;
  14169. vector.x = 0.6f;
  14170. maidArray[1].SetPos(vector);
  14171. if (maidArray[2] && maidArray[2].Visible)
  14172. {
  14173. vector.x = -0.6f;
  14174. maidArray[2].SetPos(vector);
  14175. }
  14176. if (maidArray[3] && maidArray[3].Visible)
  14177. {
  14178. vector.x = 1.2f;
  14179. maidArray[3].SetPos(vector);
  14180. }
  14181. if (maidArray[4] && maidArray[4].Visible)
  14182. {
  14183. vector.x = -1.2f;
  14184. maidArray[4].SetPos(vector);
  14185. }
  14186. if (maidArray[5] && maidArray[5].Visible)
  14187. {
  14188. vector.x = 1.8f;
  14189. maidArray[5].SetPos(vector);
  14190. }
  14191. if (maidArray[6] && maidArray[6].Visible)
  14192. {
  14193. vector.x = -1.8f;
  14194. maidArray[6].SetPos(vector);
  14195. }
  14196. if (maidArray[7] && maidArray[7].Visible)
  14197. {
  14198. vector.x = 2.4f;
  14199. maidArray[7].SetPos(vector);
  14200. }
  14201. if (maidArray[8] && maidArray[8].Visible)
  14202. {
  14203. vector.x = -2.4f;
  14204. maidArray[8].SetPos(vector);
  14205. }
  14206. if (maidArray[9] && maidArray[9].Visible)
  14207. {
  14208. vector.x = 3f;
  14209. maidArray[9].SetPos(vector);
  14210. }
  14211. if (maidArray[10] && maidArray[10].Visible)
  14212. {
  14213. vector.x = -3f;
  14214. maidArray[10].SetPos(vector);
  14215. }
  14216. if (maidArray[11] && maidArray[11].Visible)
  14217. {
  14218. vector.x = 3.6f;
  14219. maidArray[11].SetPos(vector);
  14220. }
  14221. if (maidArray[12] && maidArray[12].Visible)
  14222. {
  14223. vector.x = -3.6f;
  14224. maidArray[12].SetPos(vector);
  14225. }
  14226. if (maidArray[13] && maidArray[13].Visible)
  14227. {
  14228. vector.x = 4.2f;
  14229. maidArray[13].SetPos(vector);
  14230. }
  14231. }
  14232. }
  14233. isDance = true;
  14234. isDanceStart15 = true;
  14235. isSD1 = false;
  14236. }
  14237. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14238. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14239. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14240. || Input.GetKeyDown(KeyCode.Keypad0))
  14241. {
  14242. for (int j = 0; j < maidCnt; j++)
  14243. {
  14244. if (maidArray[j] && maidArray[j].Visible)
  14245. {
  14246. if (!isVR)
  14247. {
  14248. if (goSlot[(int)selectList[j]] != null)
  14249. {
  14250. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14251. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14252. {
  14253. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14254. }
  14255. }
  14256. }
  14257. }
  14258. }
  14259. }
  14260. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14261. {
  14262. if (h2Flg)
  14263. {
  14264. h2Flg = false;
  14265. }
  14266. else
  14267. {
  14268. string text4 = "";
  14269. if (wearIndex == 0)
  14270. {
  14271. text4 = "Underwear";
  14272. wearIndex = 1;
  14273. isWear = false;
  14274. isSkirt = false;
  14275. isBra = true;
  14276. isPanz = true;
  14277. isHeadset = false;
  14278. isGlove = false;
  14279. isStkg = true;
  14280. isShoes = false;
  14281. }
  14282. else if (wearIndex == 1)
  14283. {
  14284. text4 = "Nude";
  14285. wearIndex = 2;
  14286. isWear = false;
  14287. isSkirt = false;
  14288. isBra = false;
  14289. isPanz = false;
  14290. isHeadset = false;
  14291. isGlove = false;
  14292. isStkg = false;
  14293. isShoes = false;
  14294. }
  14295. else if (wearIndex == 2)
  14296. {
  14297. text4 = "None";
  14298. wearIndex = 0;
  14299. isWear = true;
  14300. isSkirt = true;
  14301. isBra = true;
  14302. isPanz = true;
  14303. isHeadset = true;
  14304. isGlove = true;
  14305. isStkg = true;
  14306. isShoes = true;
  14307. }
  14308. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14309. for (int j = 0; j < maidCnt; j++)
  14310. {
  14311. if (maidArray[j] && maidArray[j].Visible)
  14312. {
  14313. if (!isVR)
  14314. {
  14315. if (goSlot[(int)selectList[j]] != null)
  14316. {
  14317. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14318. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14319. {
  14320. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14321. }
  14322. }
  14323. }
  14324. maidArray[j].body0.SetMaskMode(maskMode);
  14325. }
  14326. }
  14327. }
  14328. }
  14329. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14330. {
  14331. saveScene = 9999;
  14332. saveScene2 = saveScene;
  14333. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14334. try
  14335. {
  14336. thum_byte_to_base64_ = string.Empty;
  14337. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14338. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14339. }
  14340. catch { }
  14341. }
  14342. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14343. {
  14344. loadScene = 9999;
  14345. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14346. }
  14347. if (isScreen)
  14348. {
  14349. isScreen = false;
  14350. bGui = isGui;
  14351. isGui = false;
  14352. if (!isMessage)
  14353. {
  14354. foreach (UICamera uicamera in ui_cam_hide_list_)
  14355. {
  14356. uicamera.GetComponent<Camera>().enabled = true;
  14357. }
  14358. ui_cam_hide_list_.Clear();
  14359. }
  14360. else
  14361. {
  14362. if (editUI != null)
  14363. {
  14364. editUI.SetActive(true);
  14365. }
  14366. if (GameMain.Instance.CMSystem.ViewFps)
  14367. {
  14368. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14369. childObject.SetActive(true);
  14370. }
  14371. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14372. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14373. childObject2.SetActive(true);
  14374. childObject3.SetActive(true);
  14375. }
  14376. for (int j = 0; j < maidCnt; j++)
  14377. {
  14378. if (maidArray[j] && maidArray[j].Visible)
  14379. {
  14380. isBone[j] = isBoneN[j];
  14381. if (isBone[j])
  14382. {
  14383. gNeck[j].SetActive(true);
  14384. gSpine[j].SetActive(true);
  14385. gSpine0a[j].SetActive(true);
  14386. gSpine1a[j].SetActive(true);
  14387. gSpine1[j].SetActive(true);
  14388. gPelvis[j].SetActive(true);
  14389. gHandL[j].SetActive(true);
  14390. gArmL[j].SetActive(true);
  14391. gFootL[j].SetActive(true);
  14392. gHizaL[j].SetActive(true);
  14393. gHandR[j].SetActive(true);
  14394. gArmR[j].SetActive(true);
  14395. gFootR[j].SetActive(true);
  14396. gHizaR[j].SetActive(true);
  14397. gClavicleL[j].SetActive(true);
  14398. gClavicleR[j].SetActive(true);
  14399. }
  14400. }
  14401. }
  14402. }
  14403. if (isScreen2)
  14404. {
  14405. isScreen = true;
  14406. isScreen2 = false;
  14407. }
  14408. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14409. && !Input.GetKey(KeyCode.Q))
  14410. {
  14411. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14412. {
  14413. isScreen = true;
  14414. for (int j = 0; j < maidCnt; j++)
  14415. {
  14416. if (maidArray[j] && maidArray[j].Visible)
  14417. {
  14418. if (isBone[j])
  14419. {
  14420. gNeck[j].SetActive(false);
  14421. gSpine[j].SetActive(false);
  14422. gSpine0a[j].SetActive(false);
  14423. gSpine1a[j].SetActive(false);
  14424. gSpine1[j].SetActive(false);
  14425. gPelvis[j].SetActive(false);
  14426. gHandL[j].SetActive(false);
  14427. gArmL[j].SetActive(false);
  14428. gFootL[j].SetActive(false);
  14429. gHizaL[j].SetActive(false);
  14430. gHandR[j].SetActive(false);
  14431. gArmR[j].SetActive(false);
  14432. gFootR[j].SetActive(false);
  14433. gHizaR[j].SetActive(false);
  14434. gClavicleL[j].SetActive(false);
  14435. gClavicleR[j].SetActive(false);
  14436. }
  14437. isBoneN[j] = isBone[j];
  14438. isBone[j] = false;
  14439. }
  14440. }
  14441. if (!isMessage)
  14442. {
  14443. ui_cam_hide_list_.Clear();
  14444. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14445. foreach (UICamera uicamera2 in array16)
  14446. {
  14447. if (uicamera2.GetComponent<Camera>().enabled)
  14448. {
  14449. uicamera2.GetComponent<Camera>().enabled = false;
  14450. ui_cam_hide_list_.Add(uicamera2);
  14451. }
  14452. }
  14453. }
  14454. else
  14455. {
  14456. editUI = GameObject.Find("/UI Root/Camera");
  14457. if (editUI != null)
  14458. {
  14459. editUI.SetActive(false);
  14460. }
  14461. if (GameMain.Instance.CMSystem.ViewFps)
  14462. {
  14463. GameObject childObject =
  14464. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14465. childObject.SetActive(false);
  14466. }
  14467. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14468. GameObject childObject3 =
  14469. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14470. childObject2.SetActive(false);
  14471. childObject3.SetActive(false);
  14472. }
  14473. isGui = bGui;
  14474. bGui = false;
  14475. GameMain.Instance.MainCamera.ScreenShot(false);
  14476. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14477. }
  14478. }
  14479. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14480. {
  14481. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14482. keyFlg2 = true;
  14483. }
  14484. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14485. {
  14486. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14487. keyFlg2 = true;
  14488. }
  14489. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14490. {
  14491. mainCameraTransform.eulerAngles =
  14492. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14493. keyFlg2 = true;
  14494. }
  14495. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14496. {
  14497. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14498. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14499. mainCamera.SetDistance(3f, true);
  14500. keyFlg2 = true;
  14501. }
  14502. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14503. {
  14504. cameraIti = mainCamera.GetTargetPos();
  14505. cameraIti2 = mainCamera.GetPos();
  14506. cameraItiAngle = mainCamera.GetAroundAngle();
  14507. cameraItiDistance = mainCamera.GetDistance();
  14508. keyFlg2 = true;
  14509. }
  14510. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14511. {
  14512. mainCamera.SetTargetPos(cameraIti, true);
  14513. mainCamera.SetPos(cameraIti2);
  14514. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14515. mainCamera.SetDistance(cameraItiDistance, true);
  14516. keyFlg2 = true;
  14517. }
  14518. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14519. {
  14520. if (keyFlg2)
  14521. {
  14522. keyFlg2 = false;
  14523. }
  14524. else
  14525. {
  14526. effectIndex++;
  14527. if (effectIndex == 9)
  14528. {
  14529. kami.SetActive(false);
  14530. effectIndex = 0;
  14531. }
  14532. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14533. if (!isBlur)
  14534. {
  14535. component3.mode = Vignetting.AberrationMode.Simple;
  14536. component3.intensity = -3.98f;
  14537. component3.chromaticAberration = -0.75f;
  14538. component3.axialAberration = 1.18f;
  14539. component3.blurSpread = 4.19f;
  14540. component3.luminanceDependency = 0.494f;
  14541. component3.blurDistance = 1.71f;
  14542. component3.enabled = false;
  14543. }
  14544. if (kami) { }
  14545. if (effectIndex == 0)
  14546. {
  14547. component3.enabled = false;
  14548. }
  14549. if (effectIndex == 1)
  14550. {
  14551. component3.mode = Vignetting.AberrationMode.Simple;
  14552. component3.intensity = -1f;
  14553. component3.chromaticAberration = 0f;
  14554. component3.axialAberration = 0f;
  14555. component3.blurSpread = 5f;
  14556. component3.luminanceDependency = 0f;
  14557. component3.blurDistance = 0f;
  14558. component3.enabled = true;
  14559. }
  14560. if (effectIndex == 2)
  14561. {
  14562. component3.enabled = true;
  14563. }
  14564. if (effectIndex == 3)
  14565. {
  14566. component3.mode = Vignetting.AberrationMode.Simple;
  14567. component3.intensity = 9f;
  14568. component3.chromaticAberration = 0f;
  14569. component3.axialAberration = 0f;
  14570. component3.blurSpread = 5f;
  14571. component3.luminanceDependency = 0f;
  14572. component3.blurDistance = 0f;
  14573. component3.enabled = true;
  14574. }
  14575. if (effectIndex == 4)
  14576. {
  14577. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14578. kami = (GameObject)Instantiate(@object);
  14579. Vector3 localPosition = kami.transform.localPosition;
  14580. localPosition.y = 3.5f;
  14581. kami.transform.localPosition = localPosition;
  14582. }
  14583. if (effectIndex == 5)
  14584. {
  14585. component3.enabled = true;
  14586. component3.mode = Vignetting.AberrationMode.Simple;
  14587. component3.intensity = -2.5f;
  14588. component3.chromaticAberration = -0.3f;
  14589. component3.axialAberration = 0.5f;
  14590. component3.blurSpread = 4.5f;
  14591. component3.luminanceDependency = 0.2f;
  14592. component3.blurDistance = 0.8f;
  14593. component3.enabled = true;
  14594. }
  14595. if (effectIndex == 6)
  14596. {
  14597. kami.SetActive(false);
  14598. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14599. kami = (GameObject)Instantiate(@object);
  14600. Vector3 localPosition = kami.transform.localPosition;
  14601. localPosition.y = 3.5f;
  14602. kami.transform.localPosition = localPosition;
  14603. }
  14604. if (effectIndex == 7)
  14605. {
  14606. component3.enabled = true;
  14607. component3.mode = Vignetting.AberrationMode.Simple;
  14608. component3.intensity = -2.5f;
  14609. component3.chromaticAberration = -0.3f;
  14610. component3.axialAberration = 0.5f;
  14611. component3.blurSpread = 4.5f;
  14612. component3.luminanceDependency = 0.2f;
  14613. component3.blurDistance = 0.8f;
  14614. component3.enabled = true;
  14615. }
  14616. if (effectIndex == 8)
  14617. {
  14618. component3.mode = Vignetting.AberrationMode.Simple;
  14619. component3.intensity = 8f;
  14620. component3.chromaticAberration = 0f;
  14621. component3.axialAberration = 0f;
  14622. component3.blurSpread = 5f;
  14623. component3.luminanceDependency = 0f;
  14624. component3.blurDistance = 0f;
  14625. component3.enabled = true;
  14626. }
  14627. }
  14628. }
  14629. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14630. {
  14631. qFlg = false;
  14632. }
  14633. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14634. {
  14635. bool flag5 = false;
  14636. for (int k = 0; k < keyArray.Length; k++)
  14637. {
  14638. if (Input.GetKey(keyArray[k]))
  14639. {
  14640. flag5 = true;
  14641. break;
  14642. }
  14643. }
  14644. if (!getModKeyPressing(modKey.Shift))
  14645. {
  14646. if (!flag5)
  14647. {
  14648. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14649. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14650. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14651. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14652. {
  14653. Vector3 vector = softG;
  14654. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14655. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14656. softG = vector;
  14657. }
  14658. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14659. {
  14660. Vector3 vector = softG;
  14661. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14662. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14663. softG = vector;
  14664. }
  14665. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14666. {
  14667. Vector3 vector = softG;
  14668. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14669. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14670. softG = vector;
  14671. }
  14672. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14673. {
  14674. Vector3 vector = softG;
  14675. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14676. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14677. softG = vector;
  14678. }
  14679. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14680. {
  14681. Vector3 vector = softG;
  14682. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14683. softG = vector;
  14684. }
  14685. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14686. {
  14687. Vector3 vector = softG;
  14688. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14689. softG = vector;
  14690. }
  14691. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14692. {
  14693. Vector3 vector = softG;
  14694. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14695. softG = vector;
  14696. }
  14697. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14698. {
  14699. Vector3 vector = softG;
  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.Alpha0))
  14704. {
  14705. Vector3 vector = softG;
  14706. vector.y += 6E-05f * speed;
  14707. softG = vector;
  14708. }
  14709. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14710. {
  14711. Vector3 vector = softG;
  14712. vector.y -= 6E-05f * speed;
  14713. softG = vector;
  14714. }
  14715. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14716. {
  14717. softG = new Vector3(0f, -0.003f, 0f);
  14718. }
  14719. for (int j = 0; j < maidCnt; j++)
  14720. {
  14721. Maid maid = maidArray[j];
  14722. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14723. {
  14724. if (maid.body0.goSlot[l].obj != null)
  14725. {
  14726. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14727. if (component2 != null && component2.enabled)
  14728. {
  14729. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14730. }
  14731. }
  14732. List<THair1> fieldValue3 =
  14733. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14734. for (int k = 0; k < fieldValue3.Count; k++)
  14735. {
  14736. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14737. }
  14738. }
  14739. }
  14740. }
  14741. }
  14742. else if (!flag5)
  14743. {
  14744. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14745. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14746. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14747. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14748. {
  14749. Vector3 vector = softG2;
  14750. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14751. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14752. softG2 = vector;
  14753. }
  14754. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14755. {
  14756. Vector3 vector = softG2;
  14757. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14758. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14759. softG2 = vector;
  14760. }
  14761. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14762. {
  14763. Vector3 vector = softG2;
  14764. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14765. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14766. softG2 = vector;
  14767. }
  14768. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14769. {
  14770. Vector3 vector = softG2;
  14771. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14772. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14773. softG2 = vector;
  14774. }
  14775. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14776. {
  14777. Vector3 vector = softG2;
  14778. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14779. softG2 = vector;
  14780. }
  14781. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14782. {
  14783. Vector3 vector = softG2;
  14784. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14785. softG2 = vector;
  14786. }
  14787. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14788. {
  14789. Vector3 vector = softG2;
  14790. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14791. softG2 = vector;
  14792. }
  14793. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14794. {
  14795. Vector3 vector = softG2;
  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.Alpha0))
  14800. {
  14801. Vector3 vector = softG2;
  14802. vector.y += 2E-05f * speed;
  14803. softG2 = vector;
  14804. }
  14805. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14806. {
  14807. Vector3 vector = softG2;
  14808. vector.y -= 2E-05f * speed;
  14809. softG2 = vector;
  14810. }
  14811. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14812. {
  14813. softG2 = new Vector3(0f, -0.005f, 0f);
  14814. }
  14815. for (int j = 0; j < maidCnt; j++)
  14816. {
  14817. Maid maid = maidArray[j];
  14818. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14819. {
  14820. if (maid.body0.goSlot[l].obj != null)
  14821. {
  14822. DynamicSkirtBone fieldValue8 =
  14823. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14824. "m_SkirtBone");
  14825. if (fieldValue8 != null)
  14826. {
  14827. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14828. fieldValue8.UpdateParameters();
  14829. }
  14830. }
  14831. }
  14832. }
  14833. }
  14834. }
  14835. if (!isVR)
  14836. {
  14837. if (doguObject.Count > 0)
  14838. {
  14839. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14840. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14841. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14842. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14843. {
  14844. idoFlg2 = true;
  14845. doguObject[doguSelectIndex].transform.localScale =
  14846. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14847. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14848. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14849. }
  14850. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14851. {
  14852. idoFlg2 = true;
  14853. doguObject[doguSelectIndex].transform.localScale =
  14854. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14855. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14856. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14857. }
  14858. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14859. {
  14860. idoFlg2 = true;
  14861. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14862. }
  14863. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14864. {
  14865. doguObject[doguSelectIndex]
  14866. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14867. idoFlg2 = true;
  14868. }
  14869. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14870. {
  14871. doguObject[doguSelectIndex]
  14872. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14873. idoFlg2 = true;
  14874. }
  14875. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14876. && getModKeyPressing(modKey.Alt))
  14877. {
  14878. for (int k = 0; k < 10; k++)
  14879. {
  14880. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14881. Vector3.right,
  14882. -doguObject[doguSelectIndex]
  14883. .transform.rotation.eulerAngles.x);
  14884. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14885. Vector3.forward,
  14886. -doguObject[doguSelectIndex]
  14887. .transform.rotation.eulerAngles.z);
  14888. }
  14889. idoFlg2 = true;
  14890. Vector3 vector = Vector3.zero;
  14891. Vector3 zero3 = Vector3.zero;
  14892. zero3.x = -90f;
  14893. int num12 = doguIndex[doguSelectIndex];
  14894. switch (num12)
  14895. {
  14896. case 3:
  14897. vector.z = 0.5f;
  14898. zero3.z = 90f;
  14899. break;
  14900. case 4:
  14901. case 5:
  14902. case 7:
  14903. case 10:
  14904. case 11: break;
  14905. case 6:
  14906. vector.z = 0.6f;
  14907. zero3.x = 0f;
  14908. break;
  14909. case 8:
  14910. vector.z = 0.5f;
  14911. zero3.x = 0f;
  14912. break;
  14913. case 9:
  14914. vector.z = 0.32f;
  14915. zero3.z = 180f;
  14916. break;
  14917. case 12:
  14918. vector.z = 0.5f;
  14919. zero3.z = 180f;
  14920. break;
  14921. case 13:
  14922. vector.z = 0.7f;
  14923. zero3.z = 180f;
  14924. break;
  14925. default:
  14926. if (num12 != 16)
  14927. {
  14928. switch (num12)
  14929. {
  14930. case 23:
  14931. vector.z = 2.7f;
  14932. vector.x = 0.77f;
  14933. zero3.z = 90f;
  14934. break;
  14935. case 25:
  14936. vector.z = 0.5f;
  14937. vector.y = 0.9f;
  14938. zero3.z = 180f;
  14939. break;
  14940. case 26:
  14941. vector.z = 0.5f;
  14942. vector.y = 0.9f;
  14943. zero3.z = 180f;
  14944. break;
  14945. case 30:
  14946. vector.z = 0f;
  14947. zero3.z = 0f;
  14948. break;
  14949. case 31:
  14950. vector.z = -0.6f;
  14951. vector.y = 0.96f;
  14952. zero3.z = 180f;
  14953. break;
  14954. case 32:
  14955. vector.z = -0.6f;
  14956. vector.y = 0.96f;
  14957. zero3.z = 180f;
  14958. break;
  14959. case 33:
  14960. vector.z = -0.6f;
  14961. vector.y = 0.85f;
  14962. zero3.z = 180f;
  14963. break;
  14964. }
  14965. }
  14966. else
  14967. {
  14968. vector.z = -0.4f;
  14969. zero3.z = 180f;
  14970. }
  14971. break;
  14972. }
  14973. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14974. }
  14975. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14976. && Input.GetKey(KeyCode.J))
  14977. {
  14978. doguObject[doguSelectIndex]
  14979. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14980. new Vector3(vector3.x, 0f, vector3.z),
  14981. 0.3f);
  14982. doguObject[doguSelectIndex]
  14983. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14984. new Vector3(vector2.x, 0f, vector2.z),
  14985. 0.3f);
  14986. idoFlg2 = true;
  14987. }
  14988. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14989. && Input.GetKey(KeyCode.L))
  14990. {
  14991. doguObject[doguSelectIndex]
  14992. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14993. new Vector3(vector3.x, 0f, vector3.z),
  14994. 0.3f);
  14995. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14996. new Vector3(vector2.x, 0f, vector2.z),
  14997. -0.3f);
  14998. idoFlg2 = true;
  14999. }
  15000. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15001. && Input.GetKey(KeyCode.J))
  15002. {
  15003. doguObject[doguSelectIndex].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.K)
  15013. && Input.GetKey(KeyCode.L))
  15014. {
  15015. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15016. new Vector3(vector3.x, 0f, vector3.z),
  15017. -0.3f);
  15018. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15019. new Vector3(vector2.x, 0f, vector2.z),
  15020. -0.3f);
  15021. idoFlg2 = true;
  15022. }
  15023. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15024. {
  15025. doguObject[doguSelectIndex]
  15026. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15027. new Vector3(vector3.x, 0f, vector3.z),
  15028. 0.4f);
  15029. idoFlg2 = true;
  15030. }
  15031. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15032. {
  15033. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15034. new Vector3(vector3.x, 0f, vector3.z),
  15035. -0.4f);
  15036. idoFlg2 = true;
  15037. }
  15038. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15039. {
  15040. doguObject[doguSelectIndex]
  15041. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15042. new Vector3(vector2.x, 0f, vector2.z),
  15043. 0.4f);
  15044. idoFlg2 = true;
  15045. }
  15046. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15047. {
  15048. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15049. new Vector3(vector2.x, 0f, vector2.z),
  15050. -0.4f);
  15051. idoFlg2 = true;
  15052. }
  15053. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15054. {
  15055. doguObject[doguSelectIndex].transform.localRotation =
  15056. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15057. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15058. idoFlg2 = true;
  15059. }
  15060. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15061. {
  15062. doguObject[doguSelectIndex].transform.localRotation =
  15063. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15064. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15065. idoFlg2 = true;
  15066. }
  15067. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15068. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15069. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15070. {
  15071. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15072. new Vector3(vector3.x, 0f, vector3.z),
  15073. -0.7f);
  15074. idoFlg2 = true;
  15075. }
  15076. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15077. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15078. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15079. {
  15080. doguObject[doguSelectIndex]
  15081. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15082. new Vector3(vector3.x, 0f, vector3.z),
  15083. 0.7f);
  15084. idoFlg2 = true;
  15085. }
  15086. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15087. && (Input.GetKey(KeyCode.Minus)
  15088. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15089. {
  15090. doguObject[doguSelectIndex]
  15091. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15092. new Vector3(vector2.x, 0f, vector2.z),
  15093. 0.7f);
  15094. idoFlg2 = true;
  15095. }
  15096. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15097. && (Input.GetKey(KeyCode.Quote)
  15098. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15099. {
  15100. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15101. new Vector3(vector2.x, 0f, vector2.z),
  15102. -0.7f);
  15103. idoFlg2 = true;
  15104. }
  15105. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15106. && Input.GetKey(KeyCode.J))
  15107. {
  15108. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15109. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15110. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15111. doguObject[doguSelectIndex].transform.localPosition = vector;
  15112. idoFlg2 = true;
  15113. }
  15114. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15115. && Input.GetKey(KeyCode.L))
  15116. {
  15117. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15118. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15119. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15120. doguObject[doguSelectIndex].transform.localPosition = vector;
  15121. idoFlg2 = true;
  15122. }
  15123. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15124. && Input.GetKey(KeyCode.J))
  15125. {
  15126. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15127. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15128. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15129. doguObject[doguSelectIndex].transform.localPosition = vector;
  15130. idoFlg2 = true;
  15131. }
  15132. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15133. && Input.GetKey(KeyCode.L))
  15134. {
  15135. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15136. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15137. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15138. doguObject[doguSelectIndex].transform.localPosition = vector;
  15139. idoFlg2 = true;
  15140. }
  15141. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15142. {
  15143. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15144. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15145. doguObject[doguSelectIndex].transform.localPosition = vector;
  15146. idoFlg2 = true;
  15147. }
  15148. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15149. {
  15150. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15151. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15152. doguObject[doguSelectIndex].transform.localPosition = vector;
  15153. idoFlg2 = true;
  15154. }
  15155. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15156. {
  15157. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15158. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15159. doguObject[doguSelectIndex].transform.localPosition = vector;
  15160. idoFlg2 = true;
  15161. }
  15162. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15163. {
  15164. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15165. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15166. doguObject[doguSelectIndex].transform.localPosition = vector;
  15167. idoFlg2 = true;
  15168. }
  15169. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15170. {
  15171. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15172. vector.y += 0.0075f * speed;
  15173. doguObject[doguSelectIndex].transform.localPosition = vector;
  15174. idoFlg2 = true;
  15175. }
  15176. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15177. {
  15178. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15179. vector.y -= 0.0075f * speed;
  15180. doguObject[doguSelectIndex].transform.localPosition = vector;
  15181. idoFlg2 = true;
  15182. }
  15183. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15184. {
  15185. idoFlg2 = true;
  15186. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15187. {
  15188. Destroy(doguObject[doguSelectIndex]);
  15189. doguObject.RemoveAt(doguSelectIndex);
  15190. }
  15191. doguIndex.RemoveAt(doguSelectIndex);
  15192. doguSelectIndex = 0;
  15193. }
  15194. }
  15195. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15196. {
  15197. idoFlg2 = true;
  15198. if (doguSelectIndex == doguObject.Count)
  15199. {
  15200. doguIndex.Add(0);
  15201. }
  15202. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15203. {
  15204. Destroy(doguObject[doguSelectIndex]);
  15205. doguObject.RemoveAt(doguSelectIndex);
  15206. }
  15207. else
  15208. {
  15209. doguIndex.Add(0);
  15210. doguSelectIndex = doguIndex.Count - 1;
  15211. }
  15212. List<int> list2;
  15213. int index;
  15214. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15215. if (doguIndex[doguSelectIndex] <= -1)
  15216. {
  15217. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15218. }
  15219. if (doguIndex[doguSelectIndex] > 0)
  15220. {
  15221. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15222. {
  15223. Object @object = null;
  15224. for (int j = 0; j < 5; j++)
  15225. {
  15226. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15227. if (@object != null)
  15228. {
  15229. break;
  15230. }
  15231. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15232. }
  15233. doguObject.Add(Instantiate(@object) as GameObject);
  15234. }
  15235. else
  15236. {
  15237. Material material = new Material(Shader.Find("Mirror"));
  15238. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15239. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15240. gameObject7.GetComponent<Renderer>().material = material;
  15241. gameObject7.AddComponent<MirrorReflection2>();
  15242. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15243. component5.m_TextureSize = 2048;
  15244. component5.m_ClipPlaneOffset = 0f;
  15245. gameObject7.GetComponent<Renderer>().enabled = true;
  15246. doguObject.Add(gameObject7);
  15247. }
  15248. Vector3 vector = Vector3.zero;
  15249. Vector3 zero3 = Vector3.zero;
  15250. zero3.x = -90f;
  15251. switch (doguIndex[doguSelectIndex])
  15252. {
  15253. case 1:
  15254. vector.z = -0.5f;
  15255. goto IL_344DC;
  15256. case 2:
  15257. vector.z = -0.5f;
  15258. goto IL_344DC;
  15259. case 3:
  15260. vector.z = 0.5f;
  15261. zero3.z = 90f;
  15262. goto IL_344DC;
  15263. case 4:
  15264. vector.z = 0.9f;
  15265. goto IL_344DC;
  15266. case 5:
  15267. vector.z = 0.9f;
  15268. goto IL_344DC;
  15269. case 6:
  15270. vector.z = 0.6f;
  15271. zero3.x = 0f;
  15272. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15273. goto IL_344DC;
  15274. case 7:
  15275. vector.z = 0.6f;
  15276. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15277. goto IL_344DC;
  15278. case 8:
  15279. vector.z = 0.5f;
  15280. zero3.x = 0f;
  15281. goto IL_344DC;
  15282. case 9:
  15283. vector.z = 0.32f;
  15284. zero3.z = 180f;
  15285. goto IL_344DC;
  15286. case 10:
  15287. vector.z = 0.6f;
  15288. goto IL_344DC;
  15289. case 11:
  15290. vector.z = 0.6f;
  15291. goto IL_344DC;
  15292. case 12:
  15293. vector.z = 0.5f;
  15294. zero3.z = 180f;
  15295. goto IL_344DC;
  15296. case 13:
  15297. vector.z = 0.7f;
  15298. zero3.z = 180f;
  15299. goto IL_344DC;
  15300. case 14:
  15301. vector.z = -0.4f;
  15302. goto IL_344DC;
  15303. case 15:
  15304. vector.z = -0.4f;
  15305. goto IL_344DC;
  15306. case 16:
  15307. vector.z = -0.4f;
  15308. zero3.z = 180f;
  15309. goto IL_344DC;
  15310. case 17:
  15311. vector.z = -0.4f;
  15312. goto IL_344DC;
  15313. case 18:
  15314. vector.z = -0.2f;
  15315. goto IL_344DC;
  15316. case 19:
  15317. vector.z = 0f;
  15318. goto IL_344DC;
  15319. case 20:
  15320. vector.z = 3.4f;
  15321. vector.x = -1f;
  15322. goto IL_344DC;
  15323. case 21:
  15324. vector.z = 3.4f;
  15325. vector.x = -1f;
  15326. goto IL_344DC;
  15327. case 22:
  15328. vector.z = 3.4f;
  15329. vector.y = 0.3f;
  15330. vector.x = -1f;
  15331. goto IL_344DC;
  15332. case 23:
  15333. vector.z = 2.7f;
  15334. vector.x = 0.77f;
  15335. zero3.z = 90f;
  15336. goto IL_344DC;
  15337. case 25:
  15338. vector.z = 0.5f;
  15339. vector.y = 0.9f;
  15340. zero3.z = 180f;
  15341. goto IL_344DC;
  15342. case 26:
  15343. vector.z = 0.5f;
  15344. vector.y = 0.9f;
  15345. zero3.z = 180f;
  15346. goto IL_344DC;
  15347. case 29:
  15348. vector.z = 0.5f;
  15349. vector.x = -1.05f;
  15350. goto IL_344DC;
  15351. case 30:
  15352. vector.z = -2.8f;
  15353. zero3.z = 0f;
  15354. zero3.x = 0f;
  15355. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15356. goto IL_344DC;
  15357. case 31:
  15358. vector.z = -0.6f;
  15359. vector.y = 0.96f;
  15360. zero3.z = 180f;
  15361. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15362. goto IL_344DC;
  15363. case 32:
  15364. vector.z = -0.6f;
  15365. vector.y = 0.96f;
  15366. zero3.z = 180f;
  15367. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15368. goto IL_344DC;
  15369. case 33:
  15370. vector.z = -0.6f;
  15371. vector.y = 0.85f;
  15372. zero3.z = 180f;
  15373. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15374. goto IL_344DC;
  15375. }
  15376. vector.z = 0.5f;
  15377. IL_344DC:
  15378. doguObject[doguSelectIndex].transform.localPosition = vector;
  15379. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15380. }
  15381. if (doguIndex[doguSelectIndex] == 0)
  15382. {
  15383. doguIndex.RemoveAt(doguSelectIndex);
  15384. }
  15385. }
  15386. else if (Input.GetKeyDown(KeyCode.W))
  15387. {
  15388. for (int k = 0; k < keyArray.Length; k++)
  15389. {
  15390. if (Input.GetKey(keyArray[k]))
  15391. {
  15392. wFlg = true;
  15393. break;
  15394. }
  15395. }
  15396. }
  15397. else if (Input.GetKeyUp(KeyCode.W))
  15398. {
  15399. if (wFlg)
  15400. {
  15401. wFlg = false;
  15402. }
  15403. else if (idoFlg2)
  15404. {
  15405. idoFlg2 = false;
  15406. }
  15407. else
  15408. {
  15409. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15410. {
  15411. Destroy(doguObject[doguSelectIndex]);
  15412. doguObject.RemoveAt(doguSelectIndex);
  15413. }
  15414. else
  15415. {
  15416. doguIndex.Add(0);
  15417. doguSelectIndex = doguIndex.Count - 1;
  15418. }
  15419. List<int> list2;
  15420. int index;
  15421. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15422. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15423. {
  15424. doguIndex[doguSelectIndex] = 0;
  15425. }
  15426. if (doguIndex[doguSelectIndex] > 0)
  15427. {
  15428. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15429. {
  15430. Object @object = null;
  15431. for (int j = 0; j < 5; j++)
  15432. {
  15433. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15434. if (@object != null)
  15435. {
  15436. break;
  15437. }
  15438. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15439. }
  15440. doguObject.Add(Instantiate(@object) as GameObject);
  15441. }
  15442. else
  15443. {
  15444. Material material = new Material(Shader.Find("Mirror"));
  15445. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15446. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15447. gameObject7.GetComponent<Renderer>().material = material;
  15448. gameObject7.AddComponent<MirrorReflection2>();
  15449. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15450. component5.m_TextureSize = 2048;
  15451. component5.m_ClipPlaneOffset = 0f;
  15452. gameObject7.GetComponent<Renderer>().enabled = true;
  15453. doguObject.Add(gameObject7);
  15454. }
  15455. Vector3 vector = Vector3.zero;
  15456. Vector3 zero3 = Vector3.zero;
  15457. zero3.x = -90f;
  15458. switch (doguIndex[doguSelectIndex])
  15459. {
  15460. case 1:
  15461. vector.z = -0.5f;
  15462. goto IL_34D66;
  15463. case 2:
  15464. vector.z = -0.5f;
  15465. goto IL_34D66;
  15466. case 3:
  15467. vector.z = 0.5f;
  15468. zero3.z = 90f;
  15469. goto IL_34D66;
  15470. case 4:
  15471. vector.z = 0.9f;
  15472. goto IL_34D66;
  15473. case 5:
  15474. vector.z = 0.9f;
  15475. goto IL_34D66;
  15476. case 6:
  15477. vector.z = 0.6f;
  15478. zero3.x = 0f;
  15479. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15480. goto IL_34D66;
  15481. case 7:
  15482. vector.z = 0.6f;
  15483. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15484. goto IL_34D66;
  15485. case 8:
  15486. vector.z = 0.5f;
  15487. zero3.x = 0f;
  15488. goto IL_34D66;
  15489. case 9:
  15490. vector.z = 0.32f;
  15491. zero3.z = 180f;
  15492. goto IL_34D66;
  15493. case 10:
  15494. vector.z = 0.6f;
  15495. goto IL_34D66;
  15496. case 11:
  15497. vector.z = 0.6f;
  15498. goto IL_34D66;
  15499. case 12:
  15500. vector.z = 0.5f;
  15501. zero3.z = 180f;
  15502. goto IL_34D66;
  15503. case 13:
  15504. vector.z = 0.7f;
  15505. zero3.z = 180f;
  15506. goto IL_34D66;
  15507. case 14:
  15508. vector.z = -0.4f;
  15509. goto IL_34D66;
  15510. case 15:
  15511. vector.z = -0.4f;
  15512. goto IL_34D66;
  15513. case 16:
  15514. vector.z = -0.4f;
  15515. zero3.z = 180f;
  15516. goto IL_34D66;
  15517. case 17:
  15518. vector.z = -0.4f;
  15519. goto IL_34D66;
  15520. case 18:
  15521. vector.z = -0.2f;
  15522. goto IL_34D66;
  15523. case 19:
  15524. vector.z = 0f;
  15525. goto IL_34D66;
  15526. case 20:
  15527. vector.z = 3.4f;
  15528. vector.x = -1f;
  15529. goto IL_34D66;
  15530. case 21:
  15531. vector.z = 3.4f;
  15532. vector.x = -1f;
  15533. goto IL_34D66;
  15534. case 22:
  15535. vector.z = 3.4f;
  15536. vector.y = 0.3f;
  15537. vector.x = -1f;
  15538. goto IL_34D66;
  15539. case 23:
  15540. vector.z = 2.7f;
  15541. vector.x = 0.77f;
  15542. zero3.z = 90f;
  15543. goto IL_34D66;
  15544. case 25:
  15545. vector.z = 0.5f;
  15546. vector.y = 0.9f;
  15547. zero3.z = 180f;
  15548. goto IL_34D66;
  15549. case 26:
  15550. vector.z = 0.5f;
  15551. vector.y = 0.9f;
  15552. zero3.z = 180f;
  15553. goto IL_34D66;
  15554. case 29:
  15555. vector.z = 0.5f;
  15556. vector.x = -1.05f;
  15557. goto IL_34D66;
  15558. case 30:
  15559. vector.z = -2.8f;
  15560. zero3.z = 0f;
  15561. zero3.x = 0f;
  15562. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15563. goto IL_34D66;
  15564. case 31:
  15565. vector.z = -0.6f;
  15566. vector.y = 0.96f;
  15567. zero3.z = 180f;
  15568. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15569. goto IL_34D66;
  15570. case 32:
  15571. vector.z = -0.6f;
  15572. vector.y = 0.96f;
  15573. zero3.z = 180f;
  15574. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15575. goto IL_34D66;
  15576. case 33:
  15577. vector.z = -0.6f;
  15578. vector.y = 0.85f;
  15579. zero3.z = 180f;
  15580. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15581. goto IL_34D66;
  15582. }
  15583. vector.z = 0.5f;
  15584. IL_34D66:;
  15585. }
  15586. if (doguIndex[doguSelectIndex] == 0)
  15587. {
  15588. doguIndex.RemoveAt(doguSelectIndex);
  15589. }
  15590. }
  15591. }
  15592. }
  15593. if (!isVR)
  15594. {
  15595. int i;
  15596. for (i = 0; i < 999; i++)
  15597. {
  15598. if (gDogu[i] != null)
  15599. {
  15600. gDogu[i].GetComponent<Renderer>().enabled = false;
  15601. gDogu[i].SetActive(false);
  15602. if (mDogu[i].del)
  15603. {
  15604. mDogu[i].del = false;
  15605. Destroy(doguBObject[i]);
  15606. doguBObject.RemoveAt(i);
  15607. }
  15608. else if (mDogu[i].count > 0)
  15609. {
  15610. mDogu[i].count--;
  15611. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15612. {
  15613. if (mDogu[i].count == 1)
  15614. {
  15615. doguBObject[i].SetActive(false);
  15616. }
  15617. if (mDogu[i].count == 0)
  15618. {
  15619. doguBObject[i].SetActive(true);
  15620. string name = doguBObject[i].name;
  15621. if (name != null)
  15622. {
  15623. if (!(name == "Particle/pLineY"))
  15624. {
  15625. if (!(name == "Particle/pLineP02"))
  15626. {
  15627. if (!(name == "Particle/pLine_act2"))
  15628. {
  15629. if (name == "Particle/pHeart01")
  15630. {
  15631. mDogu[i].count = 77;
  15632. }
  15633. }
  15634. else
  15635. {
  15636. mDogu[i].count = 90;
  15637. }
  15638. }
  15639. else
  15640. {
  15641. mDogu[i].count = 115;
  15642. }
  15643. }
  15644. else
  15645. {
  15646. mDogu[i].count = 180;
  15647. }
  15648. }
  15649. }
  15650. }
  15651. }
  15652. }
  15653. }
  15654. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15655. {
  15656. ikMode2 = 11;
  15657. }
  15658. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15659. {
  15660. ikMode2 = 12;
  15661. }
  15662. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15663. {
  15664. ikMode2 = 14;
  15665. }
  15666. else if (Input.GetKey(KeyCode.X))
  15667. {
  15668. ikMode2 = 9;
  15669. }
  15670. else if (Input.GetKey(KeyCode.Z))
  15671. {
  15672. ikMode2 = 10;
  15673. }
  15674. else if (Input.GetKey(KeyCode.C))
  15675. {
  15676. ikMode2 = 13;
  15677. }
  15678. else if (Input.GetKey(KeyCode.D))
  15679. {
  15680. ikMode2 = 15;
  15681. }
  15682. else
  15683. {
  15684. ikMode2 = 0;
  15685. }
  15686. if (gBg != null)
  15687. {
  15688. if (!isCube3)
  15689. {
  15690. gBg.GetComponent<Renderer>().enabled = false;
  15691. gBg.SetActive(false);
  15692. }
  15693. else
  15694. {
  15695. if (ikMode2 > 0 && ikMode2 != 15)
  15696. {
  15697. gBg.GetComponent<Renderer>().enabled = true;
  15698. gBg.SetActive(true);
  15699. }
  15700. else
  15701. {
  15702. gBg.GetComponent<Renderer>().enabled = false;
  15703. gBg.SetActive(false);
  15704. }
  15705. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15706. {
  15707. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15708. }
  15709. if (ikMode2 == 9 || ikMode2 == 14)
  15710. {
  15711. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15712. mBg.Update();
  15713. }
  15714. if (ikMode2 == 13)
  15715. {
  15716. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15717. mBg.Update();
  15718. }
  15719. if (ikMode2 == 13)
  15720. {
  15721. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15722. {
  15723. mBg.ido = 5;
  15724. mBg.reset = true;
  15725. }
  15726. else
  15727. {
  15728. gBg.transform.position = bg.position;
  15729. gBg.transform.eulerAngles = bg.eulerAngles;
  15730. mBg.maid = bgObject;
  15731. mBg.ido = 5;
  15732. }
  15733. }
  15734. else if (ikMode2 == 11)
  15735. {
  15736. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15737. {
  15738. mBg.ido = 3;
  15739. mBg.reset = true;
  15740. }
  15741. else
  15742. {
  15743. gBg.transform.position = bg.position;
  15744. gBg.transform.eulerAngles = bg.eulerAngles;
  15745. mBg.maid = bgObject;
  15746. mBg.ido = 3;
  15747. }
  15748. }
  15749. else if (ikMode2 == 12)
  15750. {
  15751. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15752. {
  15753. mBg.ido = 2;
  15754. mBg.reset = true;
  15755. }
  15756. else
  15757. {
  15758. gBg.transform.position = bg.position;
  15759. gBg.transform.eulerAngles = bg.eulerAngles;
  15760. mBg.maid = bgObject;
  15761. mBg.ido = 2;
  15762. }
  15763. }
  15764. else if (ikMode2 == 10)
  15765. {
  15766. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15767. {
  15768. mBg.ido = 1;
  15769. mBg.reset = true;
  15770. }
  15771. else
  15772. {
  15773. gBg.transform.position = bg.position;
  15774. gBg.transform.eulerAngles = bg.eulerAngles;
  15775. mBg.maid = bgObject;
  15776. mBg.ido = 1;
  15777. }
  15778. }
  15779. else if (ikMode2 == 9)
  15780. {
  15781. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15782. {
  15783. mBg.ido = 4;
  15784. mBg.reset = true;
  15785. }
  15786. else
  15787. {
  15788. gBg.transform.position = bg.position;
  15789. gBg.transform.eulerAngles = bg.eulerAngles;
  15790. mBg.maid = bgObject;
  15791. mBg.ido = 4;
  15792. }
  15793. }
  15794. else if (ikMode2 == 14)
  15795. {
  15796. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15797. {
  15798. mBg.ido = 6;
  15799. mBg.reset = true;
  15800. }
  15801. else
  15802. {
  15803. gBg.transform.position = bg.position;
  15804. gBg.transform.eulerAngles = bg.eulerAngles;
  15805. mBg.maid = bgObject;
  15806. mBg.ido = 6;
  15807. }
  15808. }
  15809. }
  15810. }
  15811. for (i = 0; i < lightIndex.Count; i++)
  15812. {
  15813. if (gLight[0] == null)
  15814. {
  15815. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15816. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15817. {
  15818. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15819. };
  15820. gLight[0].GetComponent<Renderer>().material = material2;
  15821. gLight[0].layer = 8;
  15822. gLight[0].GetComponent<Renderer>().enabled = false;
  15823. gLight[0].SetActive(false);
  15824. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15825. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15826. mLight[0].obj = gLight[0];
  15827. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15828. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15829. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15830. mLight[0].ido = 1;
  15831. mLight[0].isScale = false;
  15832. }
  15833. if (gLight[i] != null)
  15834. {
  15835. if (!isCube4)
  15836. {
  15837. gLight[i].GetComponent<Renderer>().enabled = false;
  15838. gLight[i].SetActive(false);
  15839. }
  15840. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15841. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15842. {
  15843. if (ikMode2 > 0 && ikMode2 != 15)
  15844. {
  15845. gLight[i].GetComponent<Renderer>().enabled = true;
  15846. gLight[i].SetActive(true);
  15847. }
  15848. else
  15849. {
  15850. gLight[i].GetComponent<Renderer>().enabled = false;
  15851. gLight[i].SetActive(false);
  15852. mLight[i].isAlt = false;
  15853. }
  15854. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15855. {
  15856. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15857. if (mLight[i].isAlt)
  15858. {
  15859. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15860. }
  15861. }
  15862. if (ikMode2 == 9 || ikMode2 == 14)
  15863. {
  15864. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15865. mLight[i].Update();
  15866. }
  15867. if (ikMode2 == 13)
  15868. {
  15869. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15870. mLight[i].Update();
  15871. }
  15872. if (ikMode2 == 13)
  15873. {
  15874. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15875. {
  15876. mLight[i].ido = 15;
  15877. mLight[i].reset = true;
  15878. }
  15879. else
  15880. {
  15881. if (lightList[i].transform.localScale.x == 1f)
  15882. {
  15883. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15884. }
  15885. lightRange[i] = lightList[i].transform.localScale.x;
  15886. gLight[i].transform.position = lightList[i].transform.position;
  15887. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15888. mLight[i].maid = lightList[i];
  15889. mLight[i].ido = 15;
  15890. }
  15891. }
  15892. else if (ikMode2 == 11)
  15893. {
  15894. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15895. {
  15896. mLight[i].ido = 3;
  15897. mLight[i].reset = true;
  15898. }
  15899. else
  15900. {
  15901. gLight[i].transform.position = lightList[i].transform.position;
  15902. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15903. lightX[i] = gLight[i].transform.eulerAngles.x;
  15904. lightY[i] = gLight[i].transform.eulerAngles.y;
  15905. mLight[i].maid = lightList[i];
  15906. mLight[i].ido = 3;
  15907. }
  15908. }
  15909. else if (ikMode2 == 12)
  15910. {
  15911. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15912. {
  15913. mLight[i].ido = 2;
  15914. mLight[i].reset = true;
  15915. }
  15916. else
  15917. {
  15918. gLight[i].transform.position = lightList[i].transform.position;
  15919. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15920. mLight[i].maid = lightList[i];
  15921. mLight[i].ido = 2;
  15922. }
  15923. }
  15924. else if (ikMode2 == 10)
  15925. {
  15926. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15927. {
  15928. mLight[i].ido = 1;
  15929. mLight[i].reset = true;
  15930. }
  15931. else
  15932. {
  15933. gLight[i].transform.position = lightList[i].transform.position;
  15934. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15935. mLight[i].maid = lightList[i];
  15936. mLight[i].maidArray = lightList.ToArray();
  15937. mLight[i].mArray = mLight.ToArray();
  15938. mLight[i].ido = 1;
  15939. }
  15940. }
  15941. else if (ikMode2 == 9)
  15942. {
  15943. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15944. {
  15945. mLight[i].ido = 4;
  15946. mLight[i].reset = true;
  15947. }
  15948. else
  15949. {
  15950. gLight[i].transform.position = lightList[i].transform.position;
  15951. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15952. lightX[i] = gLight[i].transform.eulerAngles.x;
  15953. lightY[i] = gLight[i].transform.eulerAngles.y;
  15954. mLight[i].maid = lightList[i];
  15955. mLight[i].ido = 4;
  15956. }
  15957. }
  15958. else if (ikMode2 == 14)
  15959. {
  15960. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15961. {
  15962. mLight[i].ido = 6;
  15963. mLight[i].reset = true;
  15964. }
  15965. else
  15966. {
  15967. gLight[i].transform.position = lightList[i].transform.position;
  15968. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15969. lightX[i] = gLight[i].transform.eulerAngles.x;
  15970. lightY[i] = gLight[i].transform.eulerAngles.y;
  15971. mLight[i].maid = lightList[i];
  15972. mLight[i].ido = 6;
  15973. }
  15974. }
  15975. }
  15976. }
  15977. }
  15978. for (i = 0; i < doguBObject.Count; i++)
  15979. {
  15980. if (!isCube2)
  15981. {
  15982. gDogu[i].GetComponent<Renderer>().enabled = false;
  15983. gDogu[i].SetActive(false);
  15984. }
  15985. else
  15986. {
  15987. if (ikMode2 > 0)
  15988. {
  15989. gDogu[i].GetComponent<Renderer>().enabled = true;
  15990. gDogu[i].SetActive(true);
  15991. }
  15992. else
  15993. {
  15994. gDogu[i].GetComponent<Renderer>().enabled = false;
  15995. gDogu[i].SetActive(false);
  15996. mDogu[i].isAlt = false;
  15997. }
  15998. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15999. {
  16000. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  16001. if (mDogu[i].isAlt)
  16002. {
  16003. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16004. }
  16005. }
  16006. if (ikMode2 == 9 || ikMode2 == 14)
  16007. {
  16008. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16009. mDogu[i].Update();
  16010. }
  16011. if (ikMode2 == 15)
  16012. {
  16013. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16014. }
  16015. if (ikMode2 == 13)
  16016. {
  16017. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16018. mDogu[i].Update();
  16019. }
  16020. if (ikMode2 == 13)
  16021. {
  16022. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16023. {
  16024. mDogu[i].ido = 5;
  16025. mDogu[i].reset = true;
  16026. }
  16027. else
  16028. {
  16029. gDogu[i].transform.position = doguBObject[i].transform.position;
  16030. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16031. mDogu[i].maid = doguBObject[i];
  16032. mDogu[i].ido = 5;
  16033. }
  16034. }
  16035. else if (ikMode2 == 11)
  16036. {
  16037. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16038. {
  16039. mDogu[i].ido = 3;
  16040. mDogu[i].reset = true;
  16041. }
  16042. else
  16043. {
  16044. gDogu[i].transform.position = doguBObject[i].transform.position;
  16045. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16046. mDogu[i].maid = doguBObject[i];
  16047. mDogu[i].ido = 3;
  16048. }
  16049. }
  16050. else if (ikMode2 == 12)
  16051. {
  16052. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16053. {
  16054. mDogu[i].ido = 2;
  16055. mDogu[i].reset = true;
  16056. }
  16057. else
  16058. {
  16059. gDogu[i].transform.position = doguBObject[i].transform.position;
  16060. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16061. mDogu[i].maid = doguBObject[i];
  16062. mDogu[i].ido = 2;
  16063. }
  16064. }
  16065. else if (ikMode2 == 10)
  16066. {
  16067. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16068. {
  16069. mDogu[i].ido = 1;
  16070. mDogu[i].reset = true;
  16071. }
  16072. else
  16073. {
  16074. gDogu[i].transform.position = doguBObject[i].transform.position;
  16075. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16076. mDogu[i].maid = doguBObject[i];
  16077. mDogu[i].maidArray = doguBObject.ToArray();
  16078. mDogu[i].mArray = mDogu.ToArray();
  16079. mDogu[i].ido = 1;
  16080. }
  16081. }
  16082. else if (ikMode2 == 9)
  16083. {
  16084. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16085. {
  16086. mDogu[i].ido = 4;
  16087. mDogu[i].reset = true;
  16088. }
  16089. else
  16090. {
  16091. gDogu[i].transform.position = doguBObject[i].transform.position;
  16092. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16093. mDogu[i].maid = doguBObject[i];
  16094. mDogu[i].ido = 4;
  16095. }
  16096. }
  16097. else if (ikMode2 == 14)
  16098. {
  16099. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16100. {
  16101. mDogu[i].ido = 6;
  16102. mDogu[i].reset = true;
  16103. }
  16104. else
  16105. {
  16106. gDogu[i].transform.position = doguBObject[i].transform.position;
  16107. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16108. mDogu[i].maid = doguBObject[i];
  16109. mDogu[i].ido = 6;
  16110. }
  16111. }
  16112. else if (ikMode2 == 15)
  16113. {
  16114. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16115. {
  16116. mDogu[i].ido = 7;
  16117. mDogu[i].reset = true;
  16118. }
  16119. else
  16120. {
  16121. gDogu[i].transform.position = doguBObject[i].transform.position;
  16122. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16123. mDogu[i].maid = doguBObject[i];
  16124. mDogu[i].ido = 7;
  16125. }
  16126. }
  16127. }
  16128. }
  16129. ikModeOld2 = ikMode2;
  16130. }
  16131. if (isVR)
  16132. {
  16133. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16134. {
  16135. if (!isVR2)
  16136. {
  16137. isVR2 = true;
  16138. Preferences["config"]["shift_f8"].Value = "true";
  16139. SaveConfig();
  16140. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16141. }
  16142. else
  16143. {
  16144. isVR2 = false;
  16145. Preferences["config"]["shift_f8"].Value = "false";
  16146. SaveConfig();
  16147. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16148. }
  16149. }
  16150. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16151. {
  16152. loadScene = 1;
  16153. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16154. }
  16155. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16156. {
  16157. loadScene = 2;
  16158. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16159. }
  16160. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16161. {
  16162. loadScene = 3;
  16163. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16164. }
  16165. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16166. {
  16167. loadScene = 4;
  16168. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16169. }
  16170. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16171. {
  16172. loadScene = 5;
  16173. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16174. }
  16175. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16176. {
  16177. loadScene = 6;
  16178. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16179. }
  16180. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16181. {
  16182. loadScene = 7;
  16183. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16184. }
  16185. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16186. {
  16187. loadScene = 8;
  16188. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16189. }
  16190. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16191. {
  16192. loadScene = 9;
  16193. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16194. }
  16195. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16196. {
  16197. loadScene = 10;
  16198. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16199. }
  16200. for (int j = 0; j < 7; j++)
  16201. {
  16202. if (!maidArray[j])
  16203. {
  16204. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16205. }
  16206. }
  16207. }
  16208. }
  16209. }
  16210. }
  16211. }