MultipleMaids.MaidUpdate.cs 921 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. if (lightList.Count == 0)
  661. {
  662. float num2 = 2f;
  663. if (Application.unityVersion.StartsWith("4"))
  664. {
  665. num2 = 1f;
  666. }
  667. GameObject gameObject3 = new GameObject("Light");
  668. gameObject3.AddComponent<Light>();
  669. lightList.Add(gameObject3);
  670. lightColorR.Add(1f);
  671. lightColorG.Add(1f);
  672. lightColorB.Add(1f);
  673. lightIndex.Add(0);
  674. lightX.Add(40f);
  675. lightY.Add(180f);
  676. lightAkarusa.Add(num2);
  677. lightKage.Add(0.098f);
  678. lightRange.Add(50f);
  679. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  680. gameObject3.GetComponent<Light>().intensity = num2;
  681. gameObject3.GetComponent<Light>().spotAngle = 50f;
  682. gameObject3.GetComponent<Light>().range = 10f;
  683. gameObject3.GetComponent<Light>().type = LightType.Directional;
  684. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  685. gameObject3.GetComponent<Light>().cullingMask = 256;
  686. // lightComboList = new GUIContent[lightList.Count];
  687. // lightComboList[0] = new GUIContent("メイン");
  688. // lightCombo.selectedItemIndex = 0;
  689. // selectLightIndex = 0;
  690. }
  691. }
  692. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  693. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  694. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  695. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  696. {
  697. float axis = Input.GetAxis("Mouse ScrollWheel");
  698. if (axis > 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  701. if (mainCamera.GetDistance() < 0.1f)
  702. {
  703. mainCamera.SetDistance(0.1f, true);
  704. }
  705. }
  706. else if (axis < 0f)
  707. {
  708. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  709. if (mainCamera.GetDistance() > 25f)
  710. {
  711. mainCamera.SetDistance(25f, true);
  712. }
  713. }
  714. }
  715. for (int j = 0; j < maxMaidCnt; j++)
  716. {
  717. if (maidArray[j] && maidArray[j].Visible)
  718. {
  719. maidCnt++;
  720. }
  721. }
  722. if (maidArray[0] != null && maidArray[0].Visible)
  723. {
  724. if (getModKeyPressing(modKey.Shift))
  725. {
  726. speed = 5f * Time.deltaTime * 60f;
  727. }
  728. else
  729. {
  730. speed = 1f * Time.deltaTime * 60f;
  731. }
  732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  735. if (!isVR || isVR2)
  736. {
  737. if (!isVR)
  738. {
  739. if (isBloom)
  740. {
  741. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  742. fieldValue2.enabled = true;
  743. fieldValue2.bloomIntensity = bloom1;
  744. fieldValue2.bloomBlurIterations = (int)bloom2;
  745. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  746. if (isBloomA)
  747. {
  748. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  749. }
  750. else
  751. {
  752. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  753. }
  754. isBloom2 = true;
  755. }
  756. else if (isBloom2)
  757. {
  758. isBloom2 = false;
  759. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  760. fieldValue2.enabled = true;
  761. fieldValue2.bloomIntensity = 2.85f;
  762. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  763. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  764. fieldValue2.bloomBlurIterations = 3;
  765. }
  766. if (isDepth)
  767. {
  768. depth_field_.enabled = true;
  769. depth_field_.focalLength = depth1;
  770. depth_field_.focalSize = depth2;
  771. depth_field_.aperture = depth3;
  772. depth_field_.maxBlurSize = depth4;
  773. if (isDepthA)
  774. {
  775. depth_field_.visualizeFocus = true;
  776. }
  777. else
  778. {
  779. depth_field_.visualizeFocus = false;
  780. }
  781. }
  782. else
  783. {
  784. if (depth_field_ == null)
  785. {
  786. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  787. if (depth_field_.dofHdrShader == null)
  788. {
  789. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  790. }
  791. if (depth_field_.dx11BokehShader == null)
  792. {
  793. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  794. }
  795. if (depth_field_.dx11BokehTexture == null)
  796. {
  797. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  798. }
  799. }
  800. depth_field_.enabled = false;
  801. }
  802. if (isFog)
  803. {
  804. if (fog_.fogShader == null)
  805. {
  806. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  807. }
  808. fog_.enabled = true;
  809. fog_.startDistance = fog1;
  810. fog_.globalDensity = fog2;
  811. fog_.heightScale = fog3;
  812. fog_.height = fog4;
  813. fog_.globalFogColor.r = fog5;
  814. fog_.globalFogColor.g = fog6;
  815. fog_.globalFogColor.b = fog7;
  816. }
  817. else
  818. {
  819. if (fog_ == null)
  820. {
  821. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  822. }
  823. fog_.enabled = false;
  824. }
  825. if (isSepia != isSepian)
  826. {
  827. isSepia = isSepian;
  828. if (isSepia)
  829. {
  830. if (sepia_tone_.shader == null)
  831. {
  832. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  833. }
  834. sepia_tone_.enabled = true;
  835. }
  836. else
  837. {
  838. if (sepia_tone_ == null)
  839. {
  840. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  841. }
  842. sepia_tone_.enabled = false;
  843. }
  844. }
  845. if (bokashi > 0f)
  846. {
  847. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  848. component.enabled = true;
  849. component.blurSize = bokashi / 10f;
  850. component.blurIterations = 0;
  851. component.downsample = 0;
  852. if (bokashi > 3f)
  853. {
  854. component.blurSize -= 0.3f;
  855. component.blurIterations = 1;
  856. component.downsample = 1;
  857. }
  858. }
  859. else
  860. {
  861. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  862. component.enabled = false;
  863. }
  864. if (kamiyure > 0f)
  865. {
  866. for (int j = 0; j < maidCnt; j++)
  867. {
  868. Maid maid = maidArray[j];
  869. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  870. {
  871. if (maid.body0.goSlot[l].obj != null)
  872. {
  873. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  874. if (component2 != null && component2.enabled)
  875. {
  876. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  877. }
  878. }
  879. List<THair1> fieldValue3 =
  880. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  881. for (int k = 0; k < fieldValue3.Count; k++)
  882. {
  883. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  884. }
  885. }
  886. }
  887. }
  888. if (isBlur)
  889. {
  890. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  891. component3.mode = Vignetting.AberrationMode.Simple;
  892. component3.intensity = blur1;
  893. component3.chromaticAberration = blur4;
  894. component3.blur = blur2;
  895. component3.blurSpread = blur3;
  896. component3.enabled = true;
  897. isBlur2 = true;
  898. }
  899. else if (isBlur2)
  900. {
  901. isBlur2 = false;
  902. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  903. component3.mode = Vignetting.AberrationMode.Simple;
  904. component3.intensity = -3.98f;
  905. component3.chromaticAberration = -0.75f;
  906. component3.axialAberration = 1.18f;
  907. component3.blurSpread = 4.19f;
  908. component3.luminanceDependency = 0.494f;
  909. component3.blurDistance = 1.71f;
  910. component3.enabled = false;
  911. }
  912. }
  913. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  919. {
  920. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  921. {
  922. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  923. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  924. }
  925. }
  926. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  927. {
  928. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  929. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  930. }
  931. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  932. {
  933. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  934. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  937. {
  938. GameMain.Instance.MainLight.Reset();
  939. GameMain.Instance.MainLight.SetIntensity(0.95f);
  940. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  941. lightIndex[0] = 0;
  942. lightColorR[0] = 1f;
  943. lightColorG[0] = 1f;
  944. lightColorB[0] = 1f;
  945. lightX[0] = 40f;
  946. lightY[0] = 180f;
  947. lightAkarusa[0] = 0.95f;
  948. lightKage[0] = 0.098f;
  949. lightRange[0] = 50f;
  950. bgObject.SetActive(true);
  951. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  952. isIdx1 = false;
  953. isIdx2 = false;
  954. isIdx3 = false;
  955. isIdx4 = false;
  956. }
  957. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  958. {
  959. List<float> list;
  960. (list = lightColorR)[0] = list[0] + 0.01f;
  961. if (lightColorR[0] > 1f)
  962. {
  963. lightColorR[0] = 1f;
  964. }
  965. if (lightIndex[0] != 3)
  966. {
  967. GameMain.Instance.MainLight.GetComponent<Light>().color =
  968. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  969. }
  970. else
  971. {
  972. mainCamera.GetComponent<Camera>().backgroundColor =
  973. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  974. }
  975. }
  976. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  977. {
  978. List<float> list;
  979. (list = lightColorG)[0] = list[0] + 0.01f;
  980. if (lightColorG[0] > 1f)
  981. {
  982. lightColorG[0] = 1f;
  983. }
  984. if (lightIndex[0] != 3)
  985. {
  986. GameMain.Instance.MainLight.GetComponent<Light>().color =
  987. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  988. }
  989. else
  990. {
  991. mainCamera.GetComponent<Camera>().backgroundColor =
  992. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  993. }
  994. }
  995. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  996. {
  997. List<float> list;
  998. (list = lightColorB)[0] = list[0] + 0.01f;
  999. if (lightColorB[0] > 1f)
  1000. {
  1001. lightColorB[0] = 1f;
  1002. }
  1003. if (lightIndex[0] != 3)
  1004. {
  1005. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1006. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1007. }
  1008. else
  1009. {
  1010. mainCamera.GetComponent<Camera>().backgroundColor =
  1011. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1012. }
  1013. }
  1014. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1015. {
  1016. List<float> list;
  1017. (list = lightColorR)[0] = list[0] - 0.01f;
  1018. if (lightColorR[0] < 0f)
  1019. {
  1020. lightColorR[0] = 0f;
  1021. }
  1022. if (lightIndex[0] != 3)
  1023. {
  1024. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1025. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1026. }
  1027. else
  1028. {
  1029. mainCamera.GetComponent<Camera>().backgroundColor =
  1030. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1031. }
  1032. }
  1033. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1034. {
  1035. List<float> list;
  1036. (list = lightColorG)[0] = list[0] - 0.01f;
  1037. if (lightColorG[0] < 0f)
  1038. {
  1039. lightColorG[0] = 0f;
  1040. }
  1041. if (lightIndex[0] != 3)
  1042. {
  1043. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1044. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1045. }
  1046. else
  1047. {
  1048. mainCamera.GetComponent<Camera>().backgroundColor =
  1049. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1050. }
  1051. }
  1052. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1053. {
  1054. List<float> list;
  1055. (list = lightColorB)[0] = list[0] - 0.01f;
  1056. if (lightColorB[0] < 0f)
  1057. {
  1058. lightColorB[0] = 0f;
  1059. }
  1060. if (lightIndex[0] != 3)
  1061. {
  1062. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1063. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1064. }
  1065. else
  1066. {
  1067. mainCamera.GetComponent<Camera>().backgroundColor =
  1068. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1069. }
  1070. }
  1071. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1072. {
  1073. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1074. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1075. }
  1076. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1077. {
  1078. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1079. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1080. }
  1081. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1084. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1085. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1086. }
  1087. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1088. {
  1089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1090. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1091. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1092. }
  1093. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1094. {
  1095. List<int> list2;
  1096. (list2 = lightIndex)[0] = list2[0] + 1;
  1097. if (lightIndex[0] == 4)
  1098. {
  1099. lightIndex[0] = 0;
  1100. }
  1101. lightColorR[0] = 1f;
  1102. lightColorG[0] = 1f;
  1103. lightColorB[0] = 1f;
  1104. lightX[0] = 40f;
  1105. lightY[0] = 180f;
  1106. lightAkarusa[0] = 0.95f;
  1107. lightKage[0] = 0.098f;
  1108. lightRange[0] = 50f;
  1109. GameMain.Instance.MainLight.Reset();
  1110. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1111. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1112. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1113. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1114. if (lightIndex[0] == 0)
  1115. {
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1117. bgObject.SetActive(true);
  1118. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1119. }
  1120. else if (lightIndex[0] == 1)
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1123. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1125. }
  1126. else if (lightIndex[0] == 2)
  1127. {
  1128. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1129. }
  1130. else if (lightIndex[0] == 3)
  1131. {
  1132. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1133. mainCamera.GetComponent<Camera>().backgroundColor =
  1134. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1135. bgObject.SetActive(false);
  1136. }
  1137. isIdx1 = false;
  1138. isIdx2 = false;
  1139. isIdx3 = false;
  1140. isIdx4 = false;
  1141. }
  1142. }
  1143. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1144. {
  1145. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1148. {
  1149. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1150. {
  1151. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1152. }
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1155. {
  1156. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1159. {
  1160. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1163. {
  1164. GameMain.Instance.MainLight.Reset();
  1165. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1168. {
  1169. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1170. }
  1171. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1172. {
  1173. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1174. }
  1175. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1176. {
  1177. if (lightIndex[0] == 1)
  1178. {
  1179. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1180. }
  1181. else
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1184. }
  1185. }
  1186. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1187. {
  1188. if (lightIndex[0] == 1)
  1189. {
  1190. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1191. }
  1192. else
  1193. {
  1194. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1195. }
  1196. }
  1197. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1198. {
  1199. List<int> list2;
  1200. (list2 = lightIndex)[0] = list2[0] + 1;
  1201. if (lightIndex[0] == 3)
  1202. {
  1203. lightIndex[0] = 0;
  1204. }
  1205. GameMain.Instance.MainLight.Reset();
  1206. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1208. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1209. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1210. if (lightIndex[0] == 0)
  1211. {
  1212. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1213. }
  1214. else if (lightIndex[0] == 1)
  1215. {
  1216. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1217. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1218. }
  1219. else if (lightIndex[0] == 2)
  1220. {
  1221. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1222. }
  1223. }
  1224. int i;
  1225. for (i = 0; i < lightList.Count; i++)
  1226. {
  1227. if (i > 0)
  1228. {
  1229. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1230. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1231. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1232. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1233. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1234. {
  1235. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1236. }
  1237. }
  1238. else
  1239. {
  1240. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1241. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1242. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1243. {
  1244. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1245. }
  1246. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1247. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1248. if (lightIndex[i] != 3)
  1249. {
  1250. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1251. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1252. }
  1253. else
  1254. {
  1255. mainCamera.GetComponent<Camera>().backgroundColor =
  1256. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1257. }
  1258. }
  1259. }
  1260. bool flag3 = false;
  1261. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1262. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1263. {
  1264. for (i = 0; i < maidCnt; i++)
  1265. {
  1266. if (goSlot[(int)selectList[i]] != null)
  1267. {
  1268. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1269. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1270. {
  1271. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1272. }
  1273. }
  1274. }
  1275. }
  1276. for (int j = 0; j < maidCnt; j++)
  1277. {
  1278. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1279. {
  1280. bool flag4 = shodaiFlg[(int)selectList[j]];
  1281. shodaiFlg[(int)selectList[j]] = false;
  1282. try
  1283. {
  1284. TMorph morph = maidArray[j].body0.Face.morph;
  1285. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1286. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1287. }
  1288. catch
  1289. {
  1290. shodaiFlg[(int)selectList[j]] = true;
  1291. }
  1292. if (shodaiFlg[(int)selectList[j]] != flag4)
  1293. {
  1294. if (!isVR)
  1295. {
  1296. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1297. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1298. }
  1299. }
  1300. }
  1301. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1302. {
  1303. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1304. }
  1305. if (sceneLevel == 5)
  1306. {
  1307. if (editSelectMaid == maidArray[j])
  1308. {
  1309. flag3 = true;
  1310. }
  1311. }
  1312. Maid maid = maidArray[j];
  1313. }
  1314. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1315. {
  1316. isEditNo = 0;
  1317. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1318. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1319. }
  1320. i = 0;
  1321. while (i < maidCnt)
  1322. {
  1323. Transform transform = maidArray[i].transform;
  1324. Maid maid = maidArray[i];
  1325. if (cafeFlg[i])
  1326. {
  1327. cafeCount[i]++;
  1328. if (cafeCount[i] > 1)
  1329. {
  1330. maid.DelProp(MPN.handitem, true);
  1331. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1332. maid.AllProcPropSeqStart();
  1333. cafeFlg[i] = false;
  1334. cafeCount[i] = 0;
  1335. }
  1336. }
  1337. KeyCode key;
  1338. if (i >= 14)
  1339. {
  1340. bool flag5 = false;
  1341. bool flag6 = false;
  1342. for (int k = 0; k < keyArray.Length; k++)
  1343. {
  1344. if (Input.GetKey(keyArray[k]))
  1345. {
  1346. flag5 = true;
  1347. break;
  1348. }
  1349. if (Input.GetKeyUp(keyArray[k]))
  1350. {
  1351. flag6 = true;
  1352. break;
  1353. }
  1354. }
  1355. key = keyArray[6];
  1356. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1357. {
  1358. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1359. {
  1360. goto IL_49FE;
  1361. }
  1362. idoFlg[i - 7] = false;
  1363. }
  1364. }
  1365. else if (i >= 7)
  1366. {
  1367. bool flag5 = false;
  1368. bool flag6 = false;
  1369. for (int k = 0; k < keyArray.Length; k++)
  1370. {
  1371. if (Input.GetKey(keyArray[k]))
  1372. {
  1373. flag5 = true;
  1374. break;
  1375. }
  1376. if (Input.GetKeyUp(keyArray[k]))
  1377. {
  1378. flag6 = true;
  1379. break;
  1380. }
  1381. }
  1382. key = keyArray[i - 7];
  1383. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1384. {
  1385. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1386. {
  1387. goto IL_49FE;
  1388. }
  1389. idoFlg[i - 7] = false;
  1390. }
  1391. }
  1392. else
  1393. {
  1394. bool flag5 = false;
  1395. for (int k = 0; k < keyArray.Length; k++)
  1396. {
  1397. if (Input.GetKey(keyArray[k]))
  1398. {
  1399. flag5 = true;
  1400. break;
  1401. }
  1402. }
  1403. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1404. {
  1405. key = keyArray[i];
  1406. goto IL_49FE;
  1407. }
  1408. }
  1409. IL_1688E:
  1410. i++;
  1411. continue;
  1412. IL_49FE:
  1413. if (xFlg[i])
  1414. {
  1415. if (!maid.AudioMan.audiosource.isPlaying)
  1416. {
  1417. if (maid.status.personal.uniqueName == "Pride")
  1418. {
  1419. string text = "s0_";
  1420. Random random = new Random();
  1421. int num4 = random.Next(10000);
  1422. bool flag7 = false;
  1423. for (int k = 0; k < tunArray.Length; k++)
  1424. {
  1425. if (tunArray[k] == num4)
  1426. {
  1427. flag7 = true;
  1428. break;
  1429. }
  1430. }
  1431. if (!flag7)
  1432. {
  1433. text = text + "0" + num4.ToString() + ".ogg";
  1434. if (GameUty.FileSystem.IsExistentFile(text))
  1435. {
  1436. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1437. }
  1438. }
  1439. }
  1440. if (maid.status.personal.uniqueName == "Cool")
  1441. {
  1442. string text = "s1_";
  1443. Random random = new Random();
  1444. int num4 = random.Next(10000);
  1445. bool flag7 = false;
  1446. for (int k = 0; k < coolArray.Length; k++)
  1447. {
  1448. if (coolArray[k] == num4)
  1449. {
  1450. flag7 = true;
  1451. break;
  1452. }
  1453. }
  1454. if (!flag7)
  1455. {
  1456. text = text + "0" + num4.ToString() + ".ogg";
  1457. if (GameUty.FileSystem.IsExistentFile(text))
  1458. {
  1459. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1460. }
  1461. }
  1462. }
  1463. if (maid.status.personal.uniqueName == "Pure")
  1464. {
  1465. string text = "s2_";
  1466. Random random = new Random();
  1467. int num4 = random.Next(10000);
  1468. bool flag7 = false;
  1469. for (int k = 0; k < pureArray.Length; k++)
  1470. {
  1471. if (pureArray[k] == num4)
  1472. {
  1473. flag7 = true;
  1474. break;
  1475. }
  1476. }
  1477. if (!flag7)
  1478. {
  1479. text = text + "0" + num4.ToString() + ".ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(text))
  1481. {
  1482. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1483. }
  1484. }
  1485. }
  1486. if (maid.status.personal.uniqueName == "Yandere")
  1487. {
  1488. string text = "s3_";
  1489. Random random = new Random();
  1490. int num4 = random.Next(10000);
  1491. bool flag7 = false;
  1492. for (int k = 0; k < yanArray.Length; k++)
  1493. {
  1494. if (yanArray[k] == num4)
  1495. {
  1496. flag7 = true;
  1497. break;
  1498. }
  1499. }
  1500. if (!flag7)
  1501. {
  1502. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1503. if (GameUty.FileSystem.IsExistentFile(text))
  1504. {
  1505. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1506. }
  1507. }
  1508. }
  1509. if (maid.status.personal.uniqueName == "Muku")
  1510. {
  1511. string text = "h0_";
  1512. Random random = new Random();
  1513. int num4 = random.Next(10000);
  1514. bool flag7 = false;
  1515. for (int k = 0; k < h0Array.Length; k++)
  1516. {
  1517. if (h0Array[k] == num4)
  1518. {
  1519. flag7 = true;
  1520. break;
  1521. }
  1522. }
  1523. if (flag7)
  1524. {
  1525. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1526. if (GameUty.FileSystem.IsExistentFile(text))
  1527. {
  1528. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1529. }
  1530. }
  1531. }
  1532. if (maid.status.personal.uniqueName == "Majime")
  1533. {
  1534. string text = "h1_";
  1535. Random random = new Random();
  1536. int num4 = random.Next(10000);
  1537. bool flag7 = false;
  1538. for (int k = 0; k < h1Array.Length; k++)
  1539. {
  1540. if (h1Array[k] == num4)
  1541. {
  1542. flag7 = true;
  1543. break;
  1544. }
  1545. }
  1546. if (flag7)
  1547. {
  1548. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1549. if (GameUty.FileSystem.IsExistentFile(text))
  1550. {
  1551. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1552. }
  1553. }
  1554. }
  1555. if (maid.status.personal.uniqueName == "Rindere")
  1556. {
  1557. string text = "h2_";
  1558. Random random = new Random();
  1559. int num4 = random.Next(10000);
  1560. bool flag7 = false;
  1561. for (int k = 0; k < h2Array.Length; k++)
  1562. {
  1563. if (h2Array[k] == num4)
  1564. {
  1565. flag7 = true;
  1566. break;
  1567. }
  1568. }
  1569. if (flag7)
  1570. {
  1571. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1572. if (GameUty.FileSystem.IsExistentFile(text))
  1573. {
  1574. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. if (zFlg[i])
  1581. {
  1582. if (!maid.AudioMan.audiosource.isPlaying)
  1583. {
  1584. string text = "";
  1585. if (maid.status.personal.uniqueName == "Pride")
  1586. {
  1587. text = "s0_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(tunArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Cool")
  1594. {
  1595. text = "s1_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(coolArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Pure")
  1602. {
  1603. text = "s2_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(pureArray.Length);
  1606. object obj = text;
  1607. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1608. }
  1609. if (maid.status.personal.uniqueName == "Yandere")
  1610. {
  1611. text = "s3_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(yanArray.Length);
  1614. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Muku")
  1617. {
  1618. text = "h0_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h0tArray.Length);
  1621. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Majime")
  1624. {
  1625. text = "h1_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h1tArray.Length);
  1628. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1629. }
  1630. if (maid.status.personal.uniqueName == "Rindere")
  1631. {
  1632. text = "h2_";
  1633. Random random = new Random();
  1634. int num4 = random.Next(h2tArray.Length);
  1635. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1636. }
  1637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1638. }
  1639. }
  1640. if (!isVR || isVR2)
  1641. {
  1642. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 1;
  1647. ikMode[i] = 0;
  1648. SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. qFlg = true;
  1660. }
  1661. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1662. {
  1663. ikMaid = i;
  1664. isIK[i] = true;
  1665. ikBui = 2;
  1666. ikMode[i] = 0;
  1667. SetIK(maid, i);
  1668. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1669. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1670. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1671. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1672. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1673. idoFlg[i] = true;
  1674. if (i >= 7)
  1675. {
  1676. idoFlg[i - 7] = true;
  1677. }
  1678. }
  1679. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1680. {
  1681. ikMaid = i;
  1682. isIK[i] = true;
  1683. ikBui = 3;
  1684. ikMode[i] = 0;
  1685. SetIK(maid, i);
  1686. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1687. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1688. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1689. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1690. idoFlg[i] = true;
  1691. if (i >= 7)
  1692. {
  1693. idoFlg[i - 7] = true;
  1694. }
  1695. }
  1696. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1697. {
  1698. ikMaid = i;
  1699. isIK[i] = true;
  1700. ikBui = 4;
  1701. ikMode[i] = 0;
  1702. SetIK(maid, i);
  1703. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1704. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1705. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1706. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1707. idoFlg[i] = true;
  1708. if (i >= 7)
  1709. {
  1710. idoFlg[i - 7] = true;
  1711. }
  1712. sFlg = true;
  1713. }
  1714. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1715. {
  1716. maid.body0.transform.localRotation =
  1717. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1718. if (i >= 7)
  1719. {
  1720. idoFlg[i - 7] = true;
  1721. }
  1722. idoFlg[i] = true;
  1723. }
  1724. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1725. {
  1726. maid.body0.transform.localRotation =
  1727. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1728. if (i >= 7)
  1729. {
  1730. idoFlg[i - 7] = true;
  1731. }
  1732. idoFlg[i] = true;
  1733. }
  1734. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1735. {
  1736. bGui = true;
  1737. isPoseInit = true;
  1738. isGuiInit = true;
  1739. poseFlg = true;
  1740. faceFlg = false;
  1741. // sceneFlg = false;
  1742. kankyoFlg = false;
  1743. kankyo2Flg = false;
  1744. fFlg = true;
  1745. for (int k = 0; k < maidCnt; k++)
  1746. {
  1747. if (maid == maidArray[k])
  1748. {
  1749. selectMaidIndex = k;
  1750. }
  1751. }
  1752. copyIndex = 0;
  1753. if (i >= 7)
  1754. {
  1755. idoFlg[i - 7] = true;
  1756. }
  1757. idoFlg[i] = true;
  1758. }
  1759. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1760. {
  1761. bGui = true;
  1762. isFaceInit = true;
  1763. isGuiInit = true;
  1764. faceFlg = true;
  1765. poseFlg = false;
  1766. // sceneFlg = false;
  1767. kankyoFlg = false;
  1768. kankyo2Flg = false;
  1769. maid.boMabataki = false;
  1770. for (int k = 0; k < maidCnt; k++)
  1771. {
  1772. if (maid == maidArray[k])
  1773. {
  1774. selectMaidIndex = k;
  1775. }
  1776. }
  1777. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1778. if (i >= 7)
  1779. {
  1780. idoFlg[i - 7] = true;
  1781. }
  1782. idoFlg[i] = true;
  1783. }
  1784. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1785. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1786. {
  1787. if (!xFlg[i])
  1788. {
  1789. xFlg[i] = true;
  1790. zFlg[i] = false;
  1791. if (maid.status.personal.uniqueName == "Pride")
  1792. {
  1793. string text = "s0_";
  1794. Random random = new Random();
  1795. int num4 = random.Next(10000);
  1796. bool flag7 = false;
  1797. for (int k = 0; k < tunArray.Length; k++)
  1798. {
  1799. if (tunArray[k] == num4)
  1800. {
  1801. flag7 = true;
  1802. break;
  1803. }
  1804. }
  1805. if (!flag7)
  1806. {
  1807. text = text + "0" + num4.ToString() + ".ogg";
  1808. if (GameUty.FileSystem.IsExistentFile(text))
  1809. {
  1810. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1811. }
  1812. }
  1813. }
  1814. if (maid.status.personal.uniqueName == "Cool")
  1815. {
  1816. string text = "s1_";
  1817. Random random = new Random();
  1818. int num4 = random.Next(10000);
  1819. bool flag7 = false;
  1820. for (int k = 0; k < coolArray.Length; k++)
  1821. {
  1822. if (coolArray[k] == num4)
  1823. {
  1824. flag7 = true;
  1825. break;
  1826. }
  1827. }
  1828. if (!flag7)
  1829. {
  1830. text = text + "0" + num4.ToString() + ".ogg";
  1831. if (GameUty.FileSystem.IsExistentFile(text))
  1832. {
  1833. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1834. }
  1835. }
  1836. }
  1837. if (maid.status.personal.uniqueName == "Pure")
  1838. {
  1839. string text = "s2_";
  1840. Random random = new Random();
  1841. int num4 = random.Next(10000);
  1842. bool flag7 = false;
  1843. for (int k = 0; k < pureArray.Length; k++)
  1844. {
  1845. if (pureArray[k] == num4)
  1846. {
  1847. flag7 = true;
  1848. break;
  1849. }
  1850. }
  1851. if (!flag7)
  1852. {
  1853. text = text + "0" + num4.ToString() + ".ogg";
  1854. if (GameUty.FileSystem.IsExistentFile(text))
  1855. {
  1856. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1857. }
  1858. }
  1859. }
  1860. if (maid.status.personal.uniqueName == "Yandere")
  1861. {
  1862. string text = "s3_";
  1863. Random random = new Random();
  1864. int num4 = random.Next(10000);
  1865. bool flag7 = false;
  1866. for (int k = 0; k < yanArray.Length; k++)
  1867. {
  1868. if (yanArray[k] == num4)
  1869. {
  1870. flag7 = true;
  1871. break;
  1872. }
  1873. }
  1874. if (!flag7)
  1875. {
  1876. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1877. if (GameUty.FileSystem.IsExistentFile(text))
  1878. {
  1879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1880. }
  1881. }
  1882. }
  1883. if (maid.status.personal.uniqueName == "Muku")
  1884. {
  1885. string text = "h0_";
  1886. Random random = new Random();
  1887. int num4 = random.Next(10000);
  1888. bool flag7 = false;
  1889. for (int k = 0; k < h0Array.Length; k++)
  1890. {
  1891. if (h0Array[k] == num4)
  1892. {
  1893. flag7 = true;
  1894. break;
  1895. }
  1896. }
  1897. if (flag7)
  1898. {
  1899. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1900. if (GameUty.FileSystem.IsExistentFile(text))
  1901. {
  1902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1903. }
  1904. }
  1905. }
  1906. if (maid.status.personal.uniqueName == "Majime")
  1907. {
  1908. string text = "h1_";
  1909. Random random = new Random();
  1910. int num4 = random.Next(10000);
  1911. bool flag7 = false;
  1912. for (int k = 0; k < h1Array.Length; k++)
  1913. {
  1914. if (h1Array[k] == num4)
  1915. {
  1916. flag7 = true;
  1917. break;
  1918. }
  1919. }
  1920. if (flag7)
  1921. {
  1922. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1923. if (GameUty.FileSystem.IsExistentFile(text))
  1924. {
  1925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1926. }
  1927. }
  1928. }
  1929. if (maid.status.personal.uniqueName == "Rindere")
  1930. {
  1931. string text = "h2_";
  1932. Random random = new Random();
  1933. int num4 = random.Next(10000);
  1934. bool flag7 = false;
  1935. for (int k = 0; k < h2Array.Length; k++)
  1936. {
  1937. if (h2Array[k] == num4)
  1938. {
  1939. flag7 = true;
  1940. break;
  1941. }
  1942. }
  1943. if (flag7)
  1944. {
  1945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1946. if (GameUty.FileSystem.IsExistentFile(text))
  1947. {
  1948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. else
  1954. {
  1955. xFlg[i] = false;
  1956. maid.AudioMan.Clear();
  1957. }
  1958. idoFlg[i] = true;
  1959. if (i >= 7)
  1960. {
  1961. idoFlg[i - 7] = true;
  1962. }
  1963. }
  1964. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1965. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1966. {
  1967. if (!zFlg[i])
  1968. {
  1969. zFlg[i] = true;
  1970. xFlg[i] = false;
  1971. string text = "";
  1972. if (maid.status.personal.uniqueName == "Pride")
  1973. {
  1974. text = "s0_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(tunArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Cool")
  1981. {
  1982. text = "s1_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(coolArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Pure")
  1989. {
  1990. text = "s2_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(pureArray.Length);
  1993. object obj = text;
  1994. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1995. }
  1996. if (maid.status.personal.uniqueName == "Yandere")
  1997. {
  1998. text = "s3_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(yanArray.Length);
  2001. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Muku")
  2004. {
  2005. text = "h0_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h0tArray.Length);
  2008. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Majime")
  2011. {
  2012. text = "h1_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h1tArray.Length);
  2015. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2016. }
  2017. if (maid.status.personal.uniqueName == "Rindere")
  2018. {
  2019. text = "h2_";
  2020. Random random = new Random();
  2021. int num4 = random.Next(h2tArray.Length);
  2022. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2023. }
  2024. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2025. }
  2026. else
  2027. {
  2028. zFlg[i] = false;
  2029. maid.AudioMan.Clear();
  2030. }
  2031. idoFlg[i] = true;
  2032. if (i >= 7)
  2033. {
  2034. idoFlg[i - 7] = true;
  2035. }
  2036. }
  2037. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2038. {
  2039. string text = "";
  2040. if (maid.status.personal.uniqueName == "Pride")
  2041. {
  2042. text = "s0_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(tunArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Cool")
  2049. {
  2050. text = "s1_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(coolArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Pure")
  2057. {
  2058. text = "s2_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(pureArray.Length);
  2061. object obj = text;
  2062. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2063. }
  2064. if (maid.status.personal.uniqueName == "Yandere")
  2065. {
  2066. text = "s3_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(yanArray.Length);
  2069. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Muku")
  2072. {
  2073. text = "h0_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h0tArray.Length);
  2076. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Majime")
  2079. {
  2080. text = "h1_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h1tArray.Length);
  2083. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2084. }
  2085. if (maid.status.personal.uniqueName == "Rindere")
  2086. {
  2087. text = "h2_";
  2088. Random random = new Random();
  2089. int num4 = random.Next(h2tArray.Length);
  2090. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2091. }
  2092. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2093. idoFlg[i] = true;
  2094. if (i >= 7)
  2095. {
  2096. idoFlg[i - 7] = true;
  2097. }
  2098. }
  2099. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2100. {
  2101. if (maid.status.personal.uniqueName == "Pride")
  2102. {
  2103. string text = "s0_";
  2104. Random random = new Random();
  2105. int num4 = random.Next(10000);
  2106. bool flag7 = false;
  2107. for (int k = 0; k < tunArray.Length; k++)
  2108. {
  2109. if (tunArray[k] == num4)
  2110. {
  2111. flag7 = true;
  2112. break;
  2113. }
  2114. }
  2115. if (!flag7)
  2116. {
  2117. text = text + "0" + num4.ToString() + ".ogg";
  2118. if (GameUty.FileSystem.IsExistentFile(text))
  2119. {
  2120. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2121. }
  2122. }
  2123. }
  2124. if (maid.status.personal.uniqueName == "Cool")
  2125. {
  2126. string text = "s1_";
  2127. Random random = new Random();
  2128. int num4 = random.Next(10000);
  2129. bool flag7 = false;
  2130. for (int k = 0; k < coolArray.Length; k++)
  2131. {
  2132. if (coolArray[k] == num4)
  2133. {
  2134. flag7 = true;
  2135. break;
  2136. }
  2137. }
  2138. if (!flag7)
  2139. {
  2140. text = text + "0" + num4.ToString() + ".ogg";
  2141. if (GameUty.FileSystem.IsExistentFile(text))
  2142. {
  2143. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2144. }
  2145. }
  2146. }
  2147. if (maid.status.personal.uniqueName == "Pure")
  2148. {
  2149. string text = "s2_";
  2150. Random random = new Random();
  2151. int num4 = random.Next(10000);
  2152. bool flag7 = false;
  2153. for (int k = 0; k < pureArray.Length; k++)
  2154. {
  2155. if (pureArray[k] == num4)
  2156. {
  2157. flag7 = true;
  2158. break;
  2159. }
  2160. }
  2161. if (!flag7)
  2162. {
  2163. text = text + "0" + num4.ToString() + ".ogg";
  2164. if (GameUty.FileSystem.IsExistentFile(text))
  2165. {
  2166. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2167. }
  2168. }
  2169. }
  2170. if (maid.status.personal.uniqueName == "Yandere")
  2171. {
  2172. string text = "s3_";
  2173. Random random = new Random();
  2174. int num4 = random.Next(10000);
  2175. bool flag7 = false;
  2176. for (int k = 0; k < yanArray.Length; k++)
  2177. {
  2178. if (yanArray[k] == num4)
  2179. {
  2180. flag7 = true;
  2181. break;
  2182. }
  2183. }
  2184. if (!flag7)
  2185. {
  2186. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2187. if (GameUty.FileSystem.IsExistentFile(text))
  2188. {
  2189. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2190. }
  2191. }
  2192. }
  2193. if (maid.status.personal.uniqueName == "Muku")
  2194. {
  2195. string text = "h0_";
  2196. Random random = new Random();
  2197. int num4 = random.Next(10000);
  2198. bool flag7 = false;
  2199. for (int k = 0; k < h0Array.Length; k++)
  2200. {
  2201. if (h0Array[k] == num4)
  2202. {
  2203. flag7 = true;
  2204. break;
  2205. }
  2206. }
  2207. if (flag7)
  2208. {
  2209. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2210. if (GameUty.FileSystem.IsExistentFile(text))
  2211. {
  2212. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2213. }
  2214. }
  2215. }
  2216. if (maid.status.personal.uniqueName == "Majime")
  2217. {
  2218. string text = "h1_";
  2219. Random random = new Random();
  2220. int num4 = random.Next(10000);
  2221. bool flag7 = false;
  2222. for (int k = 0; k < h1Array.Length; k++)
  2223. {
  2224. if (h1Array[k] == num4)
  2225. {
  2226. flag7 = true;
  2227. break;
  2228. }
  2229. }
  2230. if (flag7)
  2231. {
  2232. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2233. if (GameUty.FileSystem.IsExistentFile(text))
  2234. {
  2235. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2236. }
  2237. }
  2238. }
  2239. if (maid.status.personal.uniqueName == "Rindere")
  2240. {
  2241. string text = "h2_";
  2242. Random random = new Random();
  2243. int num4 = random.Next(10000);
  2244. bool flag7 = false;
  2245. for (int k = 0; k < h2Array.Length; k++)
  2246. {
  2247. if (h2Array[k] == num4)
  2248. {
  2249. flag7 = true;
  2250. break;
  2251. }
  2252. }
  2253. if (flag7)
  2254. {
  2255. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2256. if (GameUty.FileSystem.IsExistentFile(text))
  2257. {
  2258. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2259. }
  2260. }
  2261. }
  2262. idoFlg[i] = true;
  2263. if (i >= 7)
  2264. {
  2265. idoFlg[i - 7] = true;
  2266. }
  2267. }
  2268. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2269. {
  2270. delCount[i] = 20;
  2271. if (goSlot[(int)selectList[i]] != null)
  2272. {
  2273. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2274. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2275. {
  2276. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2277. }
  2278. }
  2279. itemIndex[i]++;
  2280. if (itemIndex[i] == itemArray.Length - 1)
  2281. {
  2282. itemIndex[i] = 0;
  2283. }
  2284. string[] array = new string[2];
  2285. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2286. if (itemIndex[i] > 13)
  2287. {
  2288. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2289. }
  2290. maid.DelProp(MPN.handitem, true);
  2291. maid.DelProp(MPN.accvag, true);
  2292. maid.DelProp(MPN.accanl, true);
  2293. bool flag8 = false;
  2294. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2295. {
  2296. flag8 = true;
  2297. }
  2298. if (!flag8)
  2299. {
  2300. maid.DelProp(MPN.kousoku_upper, true);
  2301. maid.DelProp(MPN.kousoku_lower, true);
  2302. }
  2303. if (array[0] != "")
  2304. {
  2305. maid.SetProp(array[0], array[1], 0, true, false);
  2306. }
  2307. if (itemIndex[i] == 13)
  2308. {
  2309. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2310. maid.SetProp(array[0], array[1], 0, true, false);
  2311. }
  2312. if (itemIndex[i] == 23)
  2313. {
  2314. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2315. maid.SetProp(array[0], array[1], 0, true, false);
  2316. cafeFlg[i] = true;
  2317. }
  2318. maid.AllProcPropSeqStart();
  2319. idoFlg[i] = true;
  2320. if (i >= 7)
  2321. {
  2322. idoFlg[i - 7] = true;
  2323. }
  2324. mFlg = true;
  2325. }
  2326. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2327. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2328. {
  2329. for (int k = 0; k < 10; k++)
  2330. {
  2331. maid.transform.RotateAround(maid.transform.position,
  2332. Vector3.right,
  2333. -maid.transform.rotation.eulerAngles.x);
  2334. maid.transform.RotateAround(maid.transform.position,
  2335. Vector3.forward,
  2336. -maid.transform.rotation.eulerAngles.z);
  2337. }
  2338. idoFlg[i] = true;
  2339. atFlg = true;
  2340. if (i >= 7)
  2341. {
  2342. idoFlg[i - 7] = true;
  2343. }
  2344. }
  2345. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2346. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2347. {
  2348. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2349. idoFlg[i] = true;
  2350. if (i >= 7)
  2351. {
  2352. idoFlg[i - 7] = true;
  2353. }
  2354. }
  2355. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2356. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2357. {
  2358. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2359. idoFlg[i] = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2366. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2367. {
  2368. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2369. idoFlg[i] = true;
  2370. if (i >= 7)
  2371. {
  2372. idoFlg[i - 7] = true;
  2373. }
  2374. }
  2375. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2376. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2377. {
  2378. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2379. idoFlg[i] = true;
  2380. if (i >= 7)
  2381. {
  2382. idoFlg[i - 7] = true;
  2383. }
  2384. }
  2385. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2386. {
  2387. Vector3 vector = maid.transform.position;
  2388. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2389. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2390. maid.SetPos(vector);
  2391. idoFlg[i] = true;
  2392. if (i >= 7)
  2393. {
  2394. idoFlg[i - 7] = true;
  2395. }
  2396. }
  2397. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2398. {
  2399. Vector3 vector = maid.transform.position;
  2400. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2401. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2402. maid.SetPos(vector);
  2403. idoFlg[i] = true;
  2404. if (i >= 7)
  2405. {
  2406. idoFlg[i - 7] = true;
  2407. }
  2408. }
  2409. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2410. {
  2411. Vector3 vector = maid.transform.position;
  2412. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2413. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2414. maid.SetPos(vector);
  2415. idoFlg[i] = true;
  2416. if (i >= 7)
  2417. {
  2418. idoFlg[i - 7] = true;
  2419. }
  2420. }
  2421. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2422. {
  2423. Vector3 vector = maid.transform.position;
  2424. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2425. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2426. maid.SetPos(vector);
  2427. idoFlg[i] = true;
  2428. if (i >= 7)
  2429. {
  2430. idoFlg[i - 7] = true;
  2431. }
  2432. }
  2433. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2434. {
  2435. Vector3 vector = maid.transform.position;
  2436. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2437. maid.SetPos(vector);
  2438. idoFlg[i] = true;
  2439. if (i >= 7)
  2440. {
  2441. idoFlg[i - 7] = true;
  2442. }
  2443. }
  2444. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2445. {
  2446. Vector3 vector = maid.transform.position;
  2447. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2448. maid.SetPos(vector);
  2449. idoFlg[i] = true;
  2450. if (i >= 7)
  2451. {
  2452. idoFlg[i - 7] = true;
  2453. }
  2454. }
  2455. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2456. {
  2457. Vector3 vector = maid.transform.position;
  2458. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2459. maid.SetPos(vector);
  2460. idoFlg[i] = true;
  2461. if (i >= 7)
  2462. {
  2463. idoFlg[i - 7] = true;
  2464. }
  2465. }
  2466. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2467. {
  2468. Vector3 vector = maid.transform.position;
  2469. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2470. maid.SetPos(vector);
  2471. idoFlg[i] = true;
  2472. if (i >= 7)
  2473. {
  2474. idoFlg[i - 7] = true;
  2475. }
  2476. }
  2477. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2478. {
  2479. Vector3 vector = maid.transform.position;
  2480. vector.y += 0.0075f * speed;
  2481. maid.SetPos(vector);
  2482. idoFlg[i] = true;
  2483. if (i >= 7)
  2484. {
  2485. idoFlg[i - 7] = true;
  2486. }
  2487. }
  2488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2489. {
  2490. Vector3 vector = maid.transform.position;
  2491. vector.y -= 0.0075f * speed;
  2492. maid.SetPos(vector);
  2493. idoFlg[i] = true;
  2494. if (i >= 7)
  2495. {
  2496. idoFlg[i - 7] = true;
  2497. }
  2498. }
  2499. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2500. && getModKeyPressing(modKey.Shift))
  2501. {
  2502. faceIndex[i]--;
  2503. if (faceIndex[i] <= -1)
  2504. {
  2505. faceIndex[i] = faceArray.Length - 1;
  2506. }
  2507. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2508. idoFlg[i] = true;
  2509. if (i >= 7)
  2510. {
  2511. idoFlg[i - 7] = true;
  2512. }
  2513. }
  2514. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2515. {
  2516. faceIndex[i]++;
  2517. if (faceIndex[i] == faceArray.Length)
  2518. {
  2519. faceIndex[i] = 0;
  2520. }
  2521. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2522. idoFlg[i] = true;
  2523. if (i >= 7)
  2524. {
  2525. idoFlg[i - 7] = true;
  2526. }
  2527. }
  2528. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2529. {
  2530. faceBlendIndex[i]++;
  2531. if (faceBlendIndex[i] == faceBlendArray.Length)
  2532. {
  2533. faceBlendIndex[i] = 0;
  2534. }
  2535. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2536. idoFlg[i] = true;
  2537. if (i >= 7)
  2538. {
  2539. idoFlg[i - 7] = true;
  2540. }
  2541. }
  2542. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2543. {
  2544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2545. isStop[i] = false;
  2546. poseCount[i] = 20;
  2547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2548. {
  2549. maid.body0.MuneYureL(0f);
  2550. maid.body0.MuneYureR(0f);
  2551. }
  2552. else
  2553. {
  2554. maid.body0.MuneYureL(1f);
  2555. maid.body0.MuneYureR(1f);
  2556. maid.body0.jbMuneL.enabled = true;
  2557. maid.body0.jbMuneR.enabled = true;
  2558. }
  2559. if (array[0].Contains("MultipleMaidsPose"))
  2560. {
  2561. string path = array[0].Split(new char[] { '/' })[1];
  2562. byte[] array2 = new byte[0];
  2563. try
  2564. {
  2565. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2566. {
  2567. array2 = new byte[fileStream.Length];
  2568. fileStream.Read(array2, 0, array2.Length);
  2569. }
  2570. }
  2571. catch { }
  2572. if (0 < array2.Length)
  2573. {
  2574. string text = Path.GetFileName(path);
  2575. long num5 = text.GetHashCode();
  2576. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2577. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2578. {
  2579. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2580. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2581. };
  2582. for (int m = 0; m < array3.Length; m++)
  2583. {
  2584. maid.SetAutoTwist(array3[m], true);
  2585. }
  2586. }
  2587. }
  2588. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2589. {
  2590. loadPose[i] = array[0];
  2591. }
  2592. else if (!array[0].StartsWith("dance_"))
  2593. {
  2594. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2595. }
  2596. else
  2597. {
  2598. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2599. {
  2600. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2601. GameUty.FileSystem,
  2602. array[0] + ".anm",
  2603. false,
  2604. false);
  2605. }
  2606. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2607. }
  2608. if (array.Length > 1)
  2609. {
  2610. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2611. isStop[i] = true;
  2612. if (array.Length > 2)
  2613. {
  2614. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2615. isPoseIti[i] = true;
  2616. poseIti[i] = maidArray[i].transform.position;
  2617. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2618. }
  2619. }
  2620. isLock[i] = false;
  2621. idoFlg[i] = true;
  2622. mHandL[i].initFlg = false;
  2623. mHandR[i].initFlg = false;
  2624. mFootL[i].initFlg = false;
  2625. mFootR[i].initFlg = false;
  2626. pHandL[i] = 0;
  2627. pHandR[i] = 0;
  2628. muneIKL[i] = false;
  2629. muneIKR[i] = false;
  2630. if (!isVR)
  2631. {
  2632. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2633. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2634. }
  2635. if (i >= 7)
  2636. {
  2637. idoFlg[i - 7] = true;
  2638. }
  2639. }
  2640. else if (maid.body0.isLoadedBody)
  2641. {
  2642. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2643. {
  2644. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2645. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2646. }
  2647. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2648. {
  2649. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2650. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2651. }
  2652. if (!HandL1[i])
  2653. {
  2654. SetIKInit(i);
  2655. SetIK(maid, i);
  2656. ikBui = 5;
  2657. }
  2658. else
  2659. {
  2660. bool flag5 = false;
  2661. for (int k = 0; k < keyArray.Length; k++)
  2662. {
  2663. if (Input.GetKey(keyArray[k]))
  2664. {
  2665. flag5 = true;
  2666. break;
  2667. }
  2668. }
  2669. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2670. || Input.GetKey(KeyCode.Y))
  2671. {
  2672. flag5 = true;
  2673. }
  2674. if (!flag5)
  2675. {
  2676. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2677. && getModKeyPressing(modKey.Shift))
  2678. {
  2679. ikMode[i] = 15;
  2680. }
  2681. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2682. {
  2683. ikMode[i] = 5;
  2684. }
  2685. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2686. {
  2687. ikMode[i] = 6;
  2688. }
  2689. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2690. {
  2691. ikMode[i] = 7;
  2692. }
  2693. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 11;
  2696. }
  2697. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2698. {
  2699. ikMode[i] = 12;
  2700. }
  2701. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2702. {
  2703. ikMode[i] = 14;
  2704. }
  2705. else if (getModKeyPressing(modKey.Shift))
  2706. {
  2707. ikMode[i] = 1;
  2708. }
  2709. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 8;
  2712. }
  2713. else if (getModKeyPressing(modKey.Ctrl))
  2714. {
  2715. ikMode[i] = 2;
  2716. }
  2717. else if (getModKeyPressing(modKey.Alt))
  2718. {
  2719. ikMode[i] = 3;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Space))
  2722. {
  2723. ikMode[i] = 4;
  2724. }
  2725. else if (Input.GetKey(KeyCode.X))
  2726. {
  2727. ikMode[i] = 9;
  2728. }
  2729. else if (Input.GetKey(KeyCode.Z))
  2730. {
  2731. ikMode[i] = 10;
  2732. }
  2733. else if (Input.GetKey(KeyCode.C))
  2734. {
  2735. ikMode[i] = 13;
  2736. }
  2737. else if (Input.GetKey(KeyCode.A))
  2738. {
  2739. ikMode[i] = 16;
  2740. }
  2741. else
  2742. {
  2743. ikMode[i] = 0;
  2744. }
  2745. if (!isIK[i])
  2746. {
  2747. if (ikMode[i] < 9)
  2748. {
  2749. ikMode[i] = 0;
  2750. }
  2751. }
  2752. bool flag9 = false;
  2753. bool flag10 = false;
  2754. bool flag11 = false;
  2755. bool flag12 = false;
  2756. if (gFinger[i, 0])
  2757. {
  2758. for (int j = 0; j < 15; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag9 = true;
  2763. }
  2764. }
  2765. for (int j = 15; j < 30; j++)
  2766. {
  2767. if (mFinger[i, j].isStop)
  2768. {
  2769. flag10 = true;
  2770. }
  2771. }
  2772. for (int j = 0; j < 6; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag11 = true;
  2777. }
  2778. }
  2779. for (int j = 6; j < 12; j++)
  2780. {
  2781. if (mFinger2[i, j].isStop)
  2782. {
  2783. flag12 = true;
  2784. }
  2785. }
  2786. }
  2787. if (gMaid[i] != null)
  2788. {
  2789. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2790. {
  2791. gMaid[i].SetActive(true);
  2792. if (isCube)
  2793. {
  2794. gMaidC[i].SetActive(true);
  2795. }
  2796. }
  2797. else
  2798. {
  2799. gMaid[i].SetActive(false);
  2800. gMaidC[i].SetActive(false);
  2801. }
  2802. }
  2803. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2804. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2805. {
  2806. ikBui = 1;
  2807. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2808. {
  2809. ikMaid = i;
  2810. }
  2811. if (ikMaid == i)
  2812. {
  2813. SetIK(maid, i);
  2814. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2815. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2816. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2817. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2818. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2819. }
  2820. if (Input.GetKeyDown(KeyCode.Q))
  2821. {
  2822. qFlg = true;
  2823. }
  2824. }
  2825. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2826. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2827. {
  2828. ikBui = 2;
  2829. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2830. {
  2831. ikMaid = i;
  2832. }
  2833. if (ikMaid == i)
  2834. {
  2835. SetIK(maid, i);
  2836. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2837. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2838. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2839. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2840. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2841. }
  2842. if (Input.GetKeyDown(KeyCode.W))
  2843. {
  2844. wFlg = true;
  2845. }
  2846. }
  2847. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2848. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2849. {
  2850. ikBui = 3;
  2851. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2852. {
  2853. ikMaid = i;
  2854. }
  2855. if (ikMaid == i)
  2856. {
  2857. SetIK(maid, i);
  2858. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2859. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2860. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2861. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2862. }
  2863. }
  2864. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2865. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2866. {
  2867. ikBui = 4;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. if (Input.GetKeyDown(KeyCode.S))
  2881. {
  2882. sFlg = true;
  2883. }
  2884. }
  2885. mHandR[i].isSelect = false;
  2886. mArmR[i].isSelect = false;
  2887. mHandL[i].isSelect = false;
  2888. mArmL[i].isSelect = false;
  2889. mFootR[i].isSelect = false;
  2890. mHizaR[i].isSelect = false;
  2891. mFootL[i].isSelect = false;
  2892. mHizaL[i].isSelect = false;
  2893. mClavicleL[i].isSelect = false;
  2894. mClavicleR[i].isSelect = false;
  2895. if (ikMode[i] == 16)
  2896. {
  2897. if (!gHead2[i])
  2898. {
  2899. SetIKInit6(i);
  2900. }
  2901. if (mHead2[i].isClick)
  2902. {
  2903. mHead2[i].isClick = false;
  2904. bGui = true;
  2905. isFaceInit = true;
  2906. // isGuiInit = true;
  2907. faceFlg = true;
  2908. poseFlg = false;
  2909. // sceneFlg = false;
  2910. kankyoFlg = false;
  2911. kankyo2Flg = false;
  2912. maid.boMabataki = false;
  2913. selectMaidIndex = mHead2[i].no;
  2914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2915. }
  2916. if (mMaid2[i].isClick)
  2917. {
  2918. mMaid2[i].isClick = false;
  2919. bGui = true;
  2920. isPoseInit = true;
  2921. // isGuiInit = true;
  2922. poseFlg = true;
  2923. faceFlg = false;
  2924. // sceneFlg = false;
  2925. kankyoFlg = false;
  2926. kankyo2Flg = false;
  2927. selectMaidIndex = mMaid2[i].no;
  2928. copyIndex = 0;
  2929. }
  2930. gHead2[i].transform.position =
  2931. new Vector3(Head2[i].position.x,
  2932. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2933. Head2[i].position.z);
  2934. gHead2[i].transform.eulerAngles =
  2935. new Vector3(Head2[i].transform.eulerAngles.x,
  2936. Head2[i].transform.eulerAngles.y,
  2937. Head2[i].transform.eulerAngles.z + 90f);
  2938. mHead2[i].no = i;
  2939. mHead2[i].maid = maid;
  2940. mHead2[i].ido = 1;
  2941. gMaid2[i].transform.position =
  2942. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2943. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2944. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2945. gMaid2[i].transform.eulerAngles =
  2946. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2947. Spine0a2[i].transform.eulerAngles.y,
  2948. Spine0a2[i].transform.eulerAngles.z + 90f);
  2949. mMaid2[i].no = i;
  2950. mMaid2[i].maid = maid;
  2951. mMaid2[i].ido = 2;
  2952. gArmL[i].SetActive(false);
  2953. gFootL[i].SetActive(false);
  2954. gHizaL[i].SetActive(false);
  2955. gHandR[i].SetActive(false);
  2956. gArmR[i].SetActive(false);
  2957. gFootR[i].SetActive(false);
  2958. gHizaR[i].SetActive(false);
  2959. gClavicleL[i].SetActive(false);
  2960. gClavicleR[i].SetActive(false);
  2961. gNeck[i].SetActive(false);
  2962. gSpine[i].SetActive(false);
  2963. gSpine0a[i].SetActive(false);
  2964. gSpine1a[i].SetActive(false);
  2965. gSpine1[i].SetActive(false);
  2966. gPelvis[i].SetActive(false);
  2967. }
  2968. else if (ikMode[i] == 8)
  2969. {
  2970. if (ikModeOld[i] == 15 && gIKHandL[i])
  2971. {
  2972. mIKHandL[i].ido = 1;
  2973. mIKHandL[i].reset = true;
  2974. mIKHandR[i].ido = 1;
  2975. mIKHandR[i].reset = true;
  2976. }
  2977. else if (ikModeOld[i] == 3 && gHead[i])
  2978. {
  2979. mHead[i].ido = 7;
  2980. mHead[i].reset = true;
  2981. }
  2982. else
  2983. {
  2984. if (!gIKHandL[i])
  2985. {
  2986. SetIKInit5(i);
  2987. }
  2988. gIKHandL[i].transform.position = IKHandL[i].position;
  2989. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2990. mIKHandL[i].maid = maid;
  2991. mIKHandL[i].HandL = IKHandL[i];
  2992. mIKHandL[i].ido = 1;
  2993. gIKHandR[i].transform.position = IKHandR[i].position;
  2994. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2995. mIKHandR[i].maid = maid;
  2996. mIKHandR[i].HandL = IKHandR[i];
  2997. mIKHandR[i].ido = 1;
  2998. if (!gIKMuneL[i])
  2999. {
  3000. SetIKInit7(i);
  3001. }
  3002. if (!gHead[i])
  3003. {
  3004. SetIKInit4(i);
  3005. }
  3006. mIKMuneL[i].maid = maid;
  3007. mIKMuneL[i].HandL = IKMuneLSub[i];
  3008. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3009. mIKMuneL[i].ForearmL = IKMuneL[i];
  3010. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3011. mIKMuneR[i].maid = maid;
  3012. mIKMuneR[i].HandL = IKMuneRSub[i];
  3013. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3014. mIKMuneR[i].ForearmL = IKMuneR[i];
  3015. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3016. gHead[i].transform.position =
  3017. new Vector3(Head2[i].position.x,
  3018. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3019. Head2[i].position.z);
  3020. gHead[i].transform.eulerAngles =
  3021. new Vector3(Head2[i].transform.eulerAngles.x,
  3022. Head2[i].transform.eulerAngles.y,
  3023. Head2[i].transform.eulerAngles.z + 90f);
  3024. mHead[i].head = Head1[i];
  3025. mHead[i].maid = maid;
  3026. mHead[i].ido = 7;
  3027. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3028. gHead[i].SetActive(true);
  3029. if (mHead[i].isClick)
  3030. {
  3031. mHead[i].isClick = false;
  3032. mHead[i].isClick2 = false;
  3033. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3034. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3035. }
  3036. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3037. {
  3038. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3039. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3040. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3041. IKMuneLSub[i].localEulerAngles.y,
  3042. IKMuneLSub[i].localEulerAngles.z);
  3043. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3044. IKMuneL[i].localEulerAngles.y,
  3045. IKMuneL[i].localEulerAngles.z);
  3046. muneIKL[i] = true;
  3047. isStop[i] = true;
  3048. isLock[i] = true;
  3049. mIKMuneL[i].isMouseDrag = false;
  3050. }
  3051. if (mIKMuneL[i].isMouseDown)
  3052. {
  3053. maid.body0.MuneYureL(0f);
  3054. maid.body0.MuneYureR(0f);
  3055. maid.body0.jbMuneL.enabled = false;
  3056. maid.body0.jbMuneR.enabled = false;
  3057. muneIKL[i] = false;
  3058. mIKMuneL[i].isMouseUp = false;
  3059. }
  3060. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3061. {
  3062. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3063. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3064. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3065. IKMuneRSub[i].localEulerAngles.y,
  3066. IKMuneRSub[i].localEulerAngles.z);
  3067. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3068. IKMuneR[i].localEulerAngles.y,
  3069. IKMuneR[i].localEulerAngles.z);
  3070. muneIKR[i] = true;
  3071. isStop[i] = true;
  3072. isLock[i] = true;
  3073. mIKMuneR[i].isMouseDrag = false;
  3074. }
  3075. if (mIKMuneR[i].isMouseDown)
  3076. {
  3077. maid.body0.MuneYureL(0f);
  3078. maid.body0.MuneYureR(0f);
  3079. maid.body0.jbMuneL.enabled = false;
  3080. maid.body0.jbMuneR.enabled = false;
  3081. muneIKR[i] = false;
  3082. mIKMuneL[i].isMouseUp = false;
  3083. }
  3084. if (mHead[i].isStop)
  3085. {
  3086. isStop[i] = true;
  3087. isLock[i] = true;
  3088. mHead[i].isStop = false;
  3089. }
  3090. gJotai[i].SetActive(false);
  3091. gKahuku[i].SetActive(false);
  3092. gHandL[i].SetActive(false);
  3093. gArmL[i].SetActive(false);
  3094. gFootL[i].SetActive(false);
  3095. gHizaL[i].SetActive(false);
  3096. gHandR[i].SetActive(false);
  3097. gArmR[i].SetActive(false);
  3098. gFootR[i].SetActive(false);
  3099. gHizaR[i].SetActive(false);
  3100. gClavicleL[i].SetActive(false);
  3101. gClavicleR[i].SetActive(false);
  3102. gNeck[i].SetActive(false);
  3103. gSpine[i].SetActive(false);
  3104. gSpine0a[i].SetActive(false);
  3105. gSpine1a[i].SetActive(false);
  3106. gSpine1[i].SetActive(false);
  3107. gPelvis[i].SetActive(false);
  3108. }
  3109. }
  3110. else if (ikMode[i] == 15)
  3111. {
  3112. if (ikModeOld[i] == 8 && gIKHandL[i])
  3113. {
  3114. mIKHandL[i].ido = 2;
  3115. mIKHandL[i].reset = true;
  3116. mIKHandR[i].ido = 2;
  3117. mIKHandR[i].reset = true;
  3118. }
  3119. else
  3120. {
  3121. if (!gIKHandL[i])
  3122. {
  3123. SetIKInit5(i);
  3124. }
  3125. gIKHandL[i].transform.position = IKHandL[i].position;
  3126. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3127. mIKHandL[i].maid = maid;
  3128. mIKHandL[i].HandL = IKHandL[i];
  3129. mIKHandL[i].ido = 2;
  3130. gIKHandR[i].transform.position = IKHandR[i].position;
  3131. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3132. mIKHandR[i].maid = maid;
  3133. mIKHandR[i].HandL = IKHandR[i];
  3134. mIKHandR[i].ido = 2;
  3135. Destroy(gHead[i]);
  3136. Destroy(gJotai[i]);
  3137. Destroy(gKahuku[i]);
  3138. gHandL[i].SetActive(false);
  3139. gArmL[i].SetActive(false);
  3140. gFootL[i].SetActive(false);
  3141. gHizaL[i].SetActive(false);
  3142. gHandR[i].SetActive(false);
  3143. gArmR[i].SetActive(false);
  3144. gFootR[i].SetActive(false);
  3145. gHizaR[i].SetActive(false);
  3146. gClavicleL[i].SetActive(false);
  3147. gClavicleR[i].SetActive(false);
  3148. gNeck[i].SetActive(false);
  3149. gSpine[i].SetActive(false);
  3150. gSpine0a[i].SetActive(false);
  3151. gSpine1a[i].SetActive(false);
  3152. gSpine1[i].SetActive(false);
  3153. gPelvis[i].SetActive(false);
  3154. }
  3155. }
  3156. else if (ikMode[i] == 1)
  3157. {
  3158. mHandL[i].ido = 10;
  3159. mHandR[i].ido = 10;
  3160. mFootL[i].ido = 10;
  3161. mFootR[i].ido = 10;
  3162. if (ikModeOld[i] == 0 && gNeck[i])
  3163. {
  3164. if (isBone[i])
  3165. {
  3166. mNeck[i].ido = 4;
  3167. mNeck[i].reset = true;
  3168. mSpine[i].ido = 4;
  3169. mSpine[i].reset = true;
  3170. mSpine0a[i].ido = 4;
  3171. mSpine0a[i].reset = true;
  3172. mSpine1a[i].ido = 4;
  3173. mSpine1a[i].reset = true;
  3174. mSpine1[i].ido = 4;
  3175. mSpine1[i].reset = true;
  3176. mPelvis[i].ido = 4;
  3177. mPelvis[i].reset = true;
  3178. mHizaL[i].ido = 5;
  3179. mHizaL[i].reset = true;
  3180. mHizaR[i].ido = 5;
  3181. mHizaR[i].reset = true;
  3182. }
  3183. }
  3184. else
  3185. {
  3186. gArmL[i].SetActive(false);
  3187. gArmR[i].SetActive(false);
  3188. if (!isBone[i])
  3189. {
  3190. gHizaL[i].SetActive(false);
  3191. gHizaR[i].SetActive(false);
  3192. }
  3193. gClavicleL[i].SetActive(false);
  3194. gClavicleR[i].SetActive(false);
  3195. if (isBone[i])
  3196. {
  3197. mNeck[i].maid = maid;
  3198. mNeck[i].head = Neck[i];
  3199. mNeck[i].no = i;
  3200. mNeck[i].ido = 4;
  3201. gNeck[i].transform.position = Neck[i].position;
  3202. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3203. if (mNeck[i].isHead)
  3204. {
  3205. mNeck[i].isHead = false;
  3206. isLookn[i] = isLook[i];
  3207. isLook[i] = !isLook[i];
  3208. }
  3209. mSpine[i].maid = maid;
  3210. mSpine[i].head = Spine2[i];
  3211. mSpine[i].no = i;
  3212. mSpine[i].ido = 4;
  3213. gSpine[i].transform.position = Spine2[i].position;
  3214. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3215. mSpine0a[i].maid = maid;
  3216. mSpine0a[i].head = Spine0a2[i];
  3217. mSpine0a[i].no = i;
  3218. mSpine0a[i].ido = 4;
  3219. gSpine0a[i].transform.position = Spine0a2[i].position;
  3220. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3221. mSpine1a[i].maid = maid;
  3222. mSpine1a[i].head = Spine1a2[i];
  3223. mSpine1a[i].no = i;
  3224. mSpine1a[i].ido = 4;
  3225. gSpine1a[i].transform.position = Spine1a2[i].position;
  3226. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3227. mSpine1[i].maid = maid;
  3228. mSpine1[i].head = Spine12[i];
  3229. mSpine1[i].no = i;
  3230. mSpine1[i].ido = 4;
  3231. gSpine1[i].transform.position = Spine12[i].position;
  3232. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3233. mPelvis[i].maid = maid;
  3234. mPelvis[i].head = Pelvis2[i];
  3235. mPelvis[i].no = i;
  3236. mPelvis[i].ido = 8;
  3237. gPelvis[i].transform.position = Pelvis2[i].position;
  3238. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3239. mHizaL[i].ido = 5;
  3240. mHizaR[i].ido = 5;
  3241. }
  3242. }
  3243. }
  3244. else if (ikMode[i] == 2)
  3245. {
  3246. if (ikModeOld[i] == 0 && gPelvis[i])
  3247. {
  3248. mPelvis[i].ido = 9;
  3249. mPelvis[i].reset = true;
  3250. }
  3251. else
  3252. {
  3253. gArmL[i].SetActive(false);
  3254. gHizaL[i].SetActive(false);
  3255. gArmR[i].SetActive(false);
  3256. gHizaR[i].SetActive(false);
  3257. gClavicleL[i].SetActive(false);
  3258. gClavicleR[i].SetActive(false);
  3259. gNeck[i].SetActive(false);
  3260. gSpine[i].SetActive(false);
  3261. gSpine0a[i].SetActive(false);
  3262. gSpine1a[i].SetActive(false);
  3263. gSpine1[i].SetActive(false);
  3264. mPelvis[i].maid = maid;
  3265. mPelvis[i].head = Pelvis2[i];
  3266. mPelvis[i].no = i;
  3267. mPelvis[i].ido = 9;
  3268. gPelvis[i].transform.position = Pelvis2[i].position;
  3269. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3270. }
  3271. }
  3272. else if (ikMode[i] == 3)
  3273. {
  3274. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3275. {
  3276. mHead[i].ido = 1;
  3277. mHead[i].reset = true;
  3278. mJotai[i].ido = 2;
  3279. mJotai[i].reset = true;
  3280. mKahuku[i].ido = 3;
  3281. mKahuku[i].reset = true;
  3282. mHandL[i].ido = 1;
  3283. mHandR[i].ido = 1;
  3284. mFootL[i].ido = 3;
  3285. mFootR[i].ido = 3;
  3286. mHizaL[i].ido = 5;
  3287. mHizaR[i].ido = 5;
  3288. mHandL[i].reset = true;
  3289. mHandR[i].reset = true;
  3290. mFootL[i].reset = true;
  3291. mFootR[i].reset = true;
  3292. mHizaL[i].reset = true;
  3293. mHizaR[i].reset = true;
  3294. }
  3295. else if (ikModeOld[i] == 0)
  3296. {
  3297. mHandL[i].ido = 1;
  3298. mHandR[i].ido = 1;
  3299. mFootL[i].ido = 3;
  3300. mFootR[i].ido = 3;
  3301. mHizaL[i].ido = 5;
  3302. mHizaR[i].ido = 5;
  3303. mHandL[i].reset = true;
  3304. mHandR[i].reset = true;
  3305. mFootL[i].reset = true;
  3306. mFootR[i].reset = true;
  3307. mHizaL[i].reset = true;
  3308. mHizaR[i].reset = true;
  3309. }
  3310. else
  3311. {
  3312. if (!gHead[i])
  3313. {
  3314. SetIKInit4(i);
  3315. }
  3316. if (mHead[i].isHead)
  3317. {
  3318. mHead[i].isHead = false;
  3319. isLookn[i] = isLook[i];
  3320. isLook[i] = !isLook[i];
  3321. }
  3322. gHead[i].transform.position =
  3323. new Vector3(Head2[i].position.x,
  3324. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3325. Head2[i].position.z);
  3326. gHead[i].transform.eulerAngles =
  3327. new Vector3(Head2[i].transform.eulerAngles.x,
  3328. Head2[i].transform.eulerAngles.y,
  3329. Head2[i].transform.eulerAngles.z + 90f);
  3330. mHead[i].head = Head1[i];
  3331. mHead[i].maid = maid;
  3332. mHead[i].no = i;
  3333. mHead[i].ido = 1;
  3334. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3335. Transform transform3 =
  3336. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3337. Transform transform4 =
  3338. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3339. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3340. Transform transform6 =
  3341. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3342. gJotai[i].transform.position =
  3343. new Vector3(transform3.position.x,
  3344. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3345. transform3.position.z);
  3346. gJotai[i].transform.eulerAngles =
  3347. new Vector3(transform3.transform.eulerAngles.x,
  3348. transform3.transform.eulerAngles.y,
  3349. transform3.transform.eulerAngles.z + 90f);
  3350. mJotai[i].Spine0a = spine0a;
  3351. mJotai[i].Spine1 = transform3;
  3352. mJotai[i].Spine1a = transform4;
  3353. mJotai[i].Spine = transform5;
  3354. mJotai[i].maid = maid;
  3355. mJotai[i].ido = 2;
  3356. gKahuku[i].transform.position =
  3357. new Vector3(transform6.position.x,
  3358. (transform6.position.y + transform5.position.y) / 2f,
  3359. transform6.position.z);
  3360. gKahuku[i].transform.eulerAngles =
  3361. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3362. transform6.transform.eulerAngles.y + 90f,
  3363. transform6.transform.eulerAngles.z);
  3364. mKahuku[i].Pelvis = transform6;
  3365. mKahuku[i].maid = maid;
  3366. mKahuku[i].ido = 3;
  3367. mHandL[i].ido = 1;
  3368. mHandR[i].ido = 1;
  3369. mFootL[i].ido = 3;
  3370. mFootR[i].ido = 3;
  3371. mHizaL[i].ido = 5;
  3372. mHizaR[i].ido = 5;
  3373. gJotai[i].SetActive(true);
  3374. gKahuku[i].SetActive(true);
  3375. gHandL[i].SetActive(true);
  3376. gArmL[i].SetActive(false);
  3377. gFootL[i].SetActive(true);
  3378. gHizaL[i].SetActive(true);
  3379. gHandR[i].SetActive(true);
  3380. gArmR[i].SetActive(false);
  3381. gFootR[i].SetActive(true);
  3382. gHizaR[i].SetActive(true);
  3383. Destroy(gIKHandL[i]);
  3384. Destroy(gIKHandR[i]);
  3385. Destroy(gIKMuneL[i]);
  3386. Destroy(gIKMuneR[i]);
  3387. if (isBone[i])
  3388. {
  3389. gHizaL[i].SetActive(false);
  3390. gHizaR[i].SetActive(false);
  3391. gHead[i].SetActive(false);
  3392. gJotai[i].SetActive(false);
  3393. gKahuku[i].SetActive(false);
  3394. }
  3395. else
  3396. {
  3397. gHizaL[i].SetActive(true);
  3398. gHizaR[i].SetActive(true);
  3399. gHead[i].SetActive(true);
  3400. gJotai[i].SetActive(true);
  3401. gKahuku[i].SetActive(true);
  3402. }
  3403. gClavicleL[i].SetActive(false);
  3404. gClavicleR[i].SetActive(false);
  3405. gNeck[i].SetActive(false);
  3406. gSpine[i].SetActive(false);
  3407. gSpine0a[i].SetActive(false);
  3408. gSpine1a[i].SetActive(false);
  3409. gSpine1[i].SetActive(false);
  3410. gPelvis[i].SetActive(false);
  3411. if (mHead[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mHead[i].isStop = false;
  3416. }
  3417. if (mJotai[i].isStop)
  3418. {
  3419. isStop[i] = true;
  3420. isLock[i] = true;
  3421. mJotai[i].isStop = false;
  3422. }
  3423. if (mKahuku[i].isStop)
  3424. {
  3425. isStop[i] = true;
  3426. isLock[i] = true;
  3427. mKahuku[i].isStop = false;
  3428. }
  3429. if (mKahuku[i].isSelect)
  3430. {
  3431. mKahuku[i].isSelect = false;
  3432. if (ikMaid != i)
  3433. {
  3434. ikMaid = i;
  3435. ikBui = 5;
  3436. SetIK(maid, i);
  3437. }
  3438. }
  3439. if (mJotai[i].isSelect)
  3440. {
  3441. mJotai[i].isSelect = false;
  3442. if (ikMaid != i)
  3443. {
  3444. ikMaid = i;
  3445. ikBui = 5;
  3446. SetIK(maid, i);
  3447. }
  3448. }
  3449. if (mKahuku[i].isSelect)
  3450. {
  3451. mKahuku[i].isSelect = false;
  3452. if (ikMaid != i)
  3453. {
  3454. ikMaid = i;
  3455. ikBui = 5;
  3456. SetIK(maid, i);
  3457. }
  3458. }
  3459. }
  3460. }
  3461. else if (ikMode[i] == 5)
  3462. {
  3463. if (ikModeOld[i] == 3 && gHead[i])
  3464. {
  3465. mHead[i].ido = 4;
  3466. mHead[i].reset = true;
  3467. mJotai[i].ido = 5;
  3468. mJotai[i].reset = true;
  3469. mKahuku[i].ido = 6;
  3470. mKahuku[i].reset = true;
  3471. mHandL[i].ido = 2;
  3472. mHandR[i].ido = 2;
  3473. mFootL[i].ido = 4;
  3474. mFootR[i].ido = 4;
  3475. mHizaL[i].ido = 5;
  3476. mHizaR[i].ido = 5;
  3477. mHandL[i].reset = true;
  3478. mHandR[i].reset = true;
  3479. mFootL[i].reset = true;
  3480. mFootR[i].reset = true;
  3481. mHizaL[i].reset = true;
  3482. mHizaR[i].reset = true;
  3483. }
  3484. else if (ikModeOld[i] == 0)
  3485. {
  3486. mHandL[i].ido = 2;
  3487. mHandR[i].ido = 2;
  3488. mFootL[i].ido = 4;
  3489. mFootR[i].ido = 4;
  3490. mHizaL[i].ido = 5;
  3491. mHizaR[i].ido = 5;
  3492. mHandL[i].reset = true;
  3493. mHandR[i].reset = true;
  3494. mFootL[i].reset = true;
  3495. mFootR[i].reset = true;
  3496. mHizaL[i].reset = true;
  3497. mHizaR[i].reset = true;
  3498. }
  3499. else
  3500. {
  3501. if (!gHead[i])
  3502. {
  3503. SetIKInit4(i);
  3504. }
  3505. if (mHead[i].isHead)
  3506. {
  3507. mHead[i].isHead = false;
  3508. isLookn[i] = isLook[i];
  3509. isLook[i] = !isLook[i];
  3510. }
  3511. gHead[i].transform.position =
  3512. new Vector3(Head2[i].position.x,
  3513. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3514. Head2[i].position.z);
  3515. gHead[i].transform.eulerAngles =
  3516. new Vector3(Head2[i].transform.eulerAngles.x,
  3517. Head2[i].transform.eulerAngles.y,
  3518. Head2[i].transform.eulerAngles.z + 90f);
  3519. mHead[i].head = Head1[i];
  3520. mHead[i].maid = maid;
  3521. mHead[i].ido = 4;
  3522. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3523. Transform transform3 =
  3524. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3525. Transform transform4 =
  3526. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3527. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3528. Transform transform6 =
  3529. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3530. gJotai[i].transform.position =
  3531. new Vector3(transform3.position.x,
  3532. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3533. transform3.position.z);
  3534. gJotai[i].transform.eulerAngles =
  3535. new Vector3(transform3.transform.eulerAngles.x,
  3536. transform3.transform.eulerAngles.y,
  3537. transform3.transform.eulerAngles.z + 90f);
  3538. mJotai[i].Spine0a = spine0a;
  3539. mJotai[i].Spine1 = transform3;
  3540. mJotai[i].Spine1a = transform4;
  3541. mJotai[i].Spine = transform5;
  3542. mJotai[i].maid = maid;
  3543. mJotai[i].ido = 5;
  3544. gKahuku[i].transform.position =
  3545. new Vector3(transform6.position.x,
  3546. (transform6.position.y + transform5.position.y) / 2f,
  3547. transform6.position.z);
  3548. gKahuku[i].transform.eulerAngles =
  3549. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3550. transform6.transform.eulerAngles.y + 90f,
  3551. transform6.transform.eulerAngles.z);
  3552. mKahuku[i].Pelvis = transform6;
  3553. mKahuku[i].maid = maid;
  3554. mKahuku[i].ido = 6;
  3555. mHandL[i].ido = 2;
  3556. mHandR[i].ido = 2;
  3557. mFootL[i].ido = 4;
  3558. mFootR[i].ido = 4;
  3559. mHizaL[i].ido = 5;
  3560. mHizaR[i].ido = 5;
  3561. gArmL[i].SetActive(false);
  3562. gArmR[i].SetActive(false);
  3563. gClavicleL[i].SetActive(false);
  3564. gClavicleR[i].SetActive(false);
  3565. gNeck[i].SetActive(false);
  3566. gSpine[i].SetActive(false);
  3567. gSpine0a[i].SetActive(false);
  3568. gSpine1a[i].SetActive(false);
  3569. gSpine1[i].SetActive(false);
  3570. gPelvis[i].SetActive(false);
  3571. if (isBone[i])
  3572. {
  3573. gHizaL[i].SetActive(false);
  3574. gHizaR[i].SetActive(false);
  3575. gHead[i].SetActive(false);
  3576. gJotai[i].SetActive(false);
  3577. gKahuku[i].SetActive(false);
  3578. }
  3579. else
  3580. {
  3581. gHizaL[i].SetActive(true);
  3582. gHizaR[i].SetActive(true);
  3583. gHead[i].SetActive(true);
  3584. gJotai[i].SetActive(true);
  3585. gKahuku[i].SetActive(true);
  3586. }
  3587. if (mHead[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mHead[i].isStop = false;
  3592. }
  3593. if (mJotai[i].isStop)
  3594. {
  3595. isStop[i] = true;
  3596. isLock[i] = true;
  3597. mJotai[i].isStop = false;
  3598. }
  3599. if (mKahuku[i].isStop)
  3600. {
  3601. isStop[i] = true;
  3602. isLock[i] = true;
  3603. mKahuku[i].isStop = false;
  3604. }
  3605. if (mHead[i].isSelect)
  3606. {
  3607. mHead[i].isSelect = false;
  3608. if (ikMaid != i)
  3609. {
  3610. ikMaid = i;
  3611. ikBui = 5;
  3612. SetIK(maid, i);
  3613. }
  3614. }
  3615. if (mJotai[i].isSelect)
  3616. {
  3617. mJotai[i].isSelect = false;
  3618. if (ikMaid != i)
  3619. {
  3620. ikMaid = i;
  3621. ikBui = 5;
  3622. SetIK(maid, i);
  3623. }
  3624. }
  3625. if (mKahuku[i].isSelect)
  3626. {
  3627. mKahuku[i].isSelect = false;
  3628. if (ikMaid != i)
  3629. {
  3630. ikMaid = i;
  3631. ikBui = 5;
  3632. SetIK(maid, i);
  3633. }
  3634. }
  3635. }
  3636. }
  3637. else if (ikMode[i] == 13)
  3638. {
  3639. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3640. {
  3641. mMaid[i].ido = 5;
  3642. mMaid[i].reset = true;
  3643. mMaidC[i].ido = 5;
  3644. mMaidC[i].reset = true;
  3645. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3646. }
  3647. else
  3648. {
  3649. if (!gMaid[i])
  3650. {
  3651. SetIKInit3(i);
  3652. }
  3653. gMaid[i].transform.position =
  3654. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3655. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3656. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3657. gMaid[i].transform.eulerAngles =
  3658. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3659. Spine0a2[i].transform.eulerAngles.y,
  3660. Spine0a2[i].transform.eulerAngles.z + 90f);
  3661. mMaid[i].maid = maid;
  3662. mMaid[i].ido = 5;
  3663. gMaidC[i].transform.position = maid.transform.position;
  3664. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3665. mMaidC[i].maid = maid;
  3666. mMaidC[i].ido = 5;
  3667. if (isCube)
  3668. {
  3669. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3670. gMaidC[i].SetActive(true);
  3671. }
  3672. else
  3673. {
  3674. gMaidC[i].SetActive(false);
  3675. }
  3676. gHandL[i].SetActive(false);
  3677. gArmL[i].SetActive(false);
  3678. gFootL[i].SetActive(false);
  3679. gHizaL[i].SetActive(false);
  3680. gHandR[i].SetActive(false);
  3681. gArmR[i].SetActive(false);
  3682. gFootR[i].SetActive(false);
  3683. gHizaR[i].SetActive(false);
  3684. gClavicleL[i].SetActive(false);
  3685. gClavicleR[i].SetActive(false);
  3686. gNeck[i].SetActive(false);
  3687. gSpine[i].SetActive(false);
  3688. gSpine0a[i].SetActive(false);
  3689. gSpine1a[i].SetActive(false);
  3690. gSpine1[i].SetActive(false);
  3691. gPelvis[i].SetActive(false);
  3692. }
  3693. if (mMaid[i].isSelect)
  3694. {
  3695. mMaid[i].isSelect = false;
  3696. if (ikMaid != i)
  3697. {
  3698. ikMaid = i;
  3699. ikBui = 5;
  3700. SetIK(maid, i);
  3701. }
  3702. }
  3703. }
  3704. else if (ikMode[i] == 11)
  3705. {
  3706. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3707. {
  3708. mMaid[i].ido = 3;
  3709. mMaid[i].reset = true;
  3710. mMaidC[i].ido = 3;
  3711. mMaidC[i].reset = true;
  3712. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3713. }
  3714. else
  3715. {
  3716. if (!gMaid[i])
  3717. {
  3718. SetIKInit3(i);
  3719. }
  3720. gMaid[i].transform.position =
  3721. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3722. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3723. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3724. gMaid[i].transform.eulerAngles =
  3725. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3726. Spine0a2[i].transform.eulerAngles.y,
  3727. Spine0a2[i].transform.eulerAngles.z + 90f);
  3728. mMaid[i].maid = maid;
  3729. mMaid[i].ido = 3;
  3730. gMaidC[i].transform.position = maid.transform.position;
  3731. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3732. mMaidC[i].maid = maid;
  3733. mMaidC[i].ido = 3;
  3734. if (isCube)
  3735. {
  3736. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3737. gMaidC[i].SetActive(true);
  3738. }
  3739. else
  3740. {
  3741. gMaidC[i].SetActive(false);
  3742. }
  3743. gHandL[i].SetActive(false);
  3744. gArmL[i].SetActive(false);
  3745. gFootL[i].SetActive(false);
  3746. gHizaL[i].SetActive(false);
  3747. gHandR[i].SetActive(false);
  3748. gArmR[i].SetActive(false);
  3749. gFootR[i].SetActive(false);
  3750. gHizaR[i].SetActive(false);
  3751. gClavicleL[i].SetActive(false);
  3752. gClavicleR[i].SetActive(false);
  3753. gNeck[i].SetActive(false);
  3754. gSpine[i].SetActive(false);
  3755. gSpine0a[i].SetActive(false);
  3756. gSpine1a[i].SetActive(false);
  3757. gSpine1[i].SetActive(false);
  3758. gPelvis[i].SetActive(false);
  3759. }
  3760. if (mMaid[i].isSelect)
  3761. {
  3762. mMaid[i].isSelect = false;
  3763. if (ikMaid != i)
  3764. {
  3765. ikMaid = i;
  3766. ikBui = 5;
  3767. SetIK(maid, i);
  3768. }
  3769. }
  3770. }
  3771. else if (ikMode[i] == 12)
  3772. {
  3773. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3774. {
  3775. mMaid[i].ido = 2;
  3776. mMaid[i].reset = true;
  3777. mMaidC[i].ido = 2;
  3778. mMaidC[i].reset = true;
  3779. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3780. }
  3781. else
  3782. {
  3783. if (!gMaid[i])
  3784. {
  3785. SetIKInit3(i);
  3786. }
  3787. gMaid[i].transform.position =
  3788. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3789. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3790. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3791. gMaid[i].transform.eulerAngles =
  3792. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3793. Spine0a2[i].transform.eulerAngles.y,
  3794. Spine0a2[i].transform.eulerAngles.z + 90f);
  3795. mMaid[i].maid = maid;
  3796. mMaid[i].ido = 2;
  3797. gMaidC[i].transform.position = maid.transform.position;
  3798. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3799. mMaidC[i].maid = maid;
  3800. mMaidC[i].ido = 2;
  3801. if (isCube)
  3802. {
  3803. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3804. gMaidC[i].SetActive(true);
  3805. }
  3806. else
  3807. {
  3808. gMaidC[i].SetActive(false);
  3809. }
  3810. gHandL[i].SetActive(false);
  3811. gArmL[i].SetActive(false);
  3812. gFootL[i].SetActive(false);
  3813. gHizaL[i].SetActive(false);
  3814. gHandR[i].SetActive(false);
  3815. gArmR[i].SetActive(false);
  3816. gFootR[i].SetActive(false);
  3817. gHizaR[i].SetActive(false);
  3818. gClavicleL[i].SetActive(false);
  3819. gClavicleR[i].SetActive(false);
  3820. gNeck[i].SetActive(false);
  3821. gSpine[i].SetActive(false);
  3822. gSpine0a[i].SetActive(false);
  3823. gSpine1a[i].SetActive(false);
  3824. gSpine1[i].SetActive(false);
  3825. gPelvis[i].SetActive(false);
  3826. }
  3827. if (mMaid[i].isSelect)
  3828. {
  3829. mMaid[i].isSelect = false;
  3830. if (ikMaid != i)
  3831. {
  3832. ikMaid = i;
  3833. ikBui = 5;
  3834. SetIK(maid, i);
  3835. }
  3836. }
  3837. }
  3838. else if (ikMode[i] == 10)
  3839. {
  3840. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3841. {
  3842. mMaid[i].ido = 1;
  3843. mMaid[i].reset = true;
  3844. mMaidC[i].ido = 1;
  3845. mMaidC[i].reset = true;
  3846. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3847. }
  3848. else
  3849. {
  3850. if (!gMaid[i])
  3851. {
  3852. SetIKInit3(i);
  3853. }
  3854. gMaid[i].transform.position =
  3855. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3856. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3857. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3858. gMaid[i].transform.eulerAngles =
  3859. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3860. Spine0a2[i].transform.eulerAngles.y,
  3861. Spine0a2[i].transform.eulerAngles.z + 90f);
  3862. mMaid[i].maid = maid;
  3863. mMaid[i].ido = 1;
  3864. gMaidC[i].transform.position = maid.transform.position;
  3865. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3866. mMaidC[i].maid = maid;
  3867. mMaidC[i].ido = 1;
  3868. if (isCube)
  3869. {
  3870. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3871. gMaidC[i].SetActive(true);
  3872. }
  3873. else
  3874. {
  3875. gMaidC[i].SetActive(false);
  3876. }
  3877. gHandL[i].SetActive(false);
  3878. gArmL[i].SetActive(false);
  3879. gFootL[i].SetActive(false);
  3880. gHizaL[i].SetActive(false);
  3881. gHandR[i].SetActive(false);
  3882. gArmR[i].SetActive(false);
  3883. gFootR[i].SetActive(false);
  3884. gHizaR[i].SetActive(false);
  3885. gClavicleL[i].SetActive(false);
  3886. gClavicleR[i].SetActive(false);
  3887. gNeck[i].SetActive(false);
  3888. gSpine[i].SetActive(false);
  3889. gSpine0a[i].SetActive(false);
  3890. gSpine1a[i].SetActive(false);
  3891. gSpine1[i].SetActive(false);
  3892. gPelvis[i].SetActive(false);
  3893. }
  3894. if (mMaid[i].isSelect)
  3895. {
  3896. mMaid[i].isSelect = false;
  3897. if (ikMaid != i)
  3898. {
  3899. ikMaid = i;
  3900. ikBui = 5;
  3901. SetIK(maid, i);
  3902. }
  3903. }
  3904. }
  3905. else if (ikMode[i] == 9)
  3906. {
  3907. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3908. {
  3909. mMaid[i].ido = 4;
  3910. mMaid[i].reset = true;
  3911. mMaidC[i].ido = 4;
  3912. mMaidC[i].reset = true;
  3913. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3914. }
  3915. else
  3916. {
  3917. if (!gMaid[i])
  3918. {
  3919. SetIKInit3(i);
  3920. }
  3921. gMaid[i].transform.position =
  3922. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3923. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3924. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3925. gMaid[i].transform.eulerAngles =
  3926. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3927. Spine0a2[i].transform.eulerAngles.y,
  3928. Spine0a2[i].transform.eulerAngles.z + 90f);
  3929. mMaid[i].maid = maid;
  3930. mMaid[i].ido = 4;
  3931. gMaidC[i].transform.position = maid.transform.position;
  3932. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3933. mMaidC[i].maid = maid;
  3934. mMaidC[i].ido = 4;
  3935. if (isCube)
  3936. {
  3937. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3938. gMaidC[i].SetActive(true);
  3939. }
  3940. else
  3941. {
  3942. gMaidC[i].SetActive(false);
  3943. }
  3944. gHandL[i].SetActive(false);
  3945. gArmL[i].SetActive(false);
  3946. gFootL[i].SetActive(false);
  3947. gHizaL[i].SetActive(false);
  3948. gHandR[i].SetActive(false);
  3949. gArmR[i].SetActive(false);
  3950. gFootR[i].SetActive(false);
  3951. gHizaR[i].SetActive(false);
  3952. gClavicleL[i].SetActive(false);
  3953. gClavicleR[i].SetActive(false);
  3954. gNeck[i].SetActive(false);
  3955. gSpine[i].SetActive(false);
  3956. gSpine0a[i].SetActive(false);
  3957. gSpine1a[i].SetActive(false);
  3958. gSpine1[i].SetActive(false);
  3959. gPelvis[i].SetActive(false);
  3960. }
  3961. if (mMaid[i].isSelect)
  3962. {
  3963. mMaid[i].isSelect = false;
  3964. if (ikMaid != i)
  3965. {
  3966. ikMaid = i;
  3967. ikBui = 5;
  3968. SetIK(maid, i);
  3969. }
  3970. }
  3971. }
  3972. else if (ikMode[i] == 14)
  3973. {
  3974. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3975. {
  3976. mMaid[i].ido = 6;
  3977. mMaid[i].reset = true;
  3978. mMaidC[i].ido = 6;
  3979. mMaidC[i].reset = true;
  3980. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3981. }
  3982. else
  3983. {
  3984. if (!gMaid[i])
  3985. {
  3986. SetIKInit3(i);
  3987. }
  3988. gMaid[i].transform.position =
  3989. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3990. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3991. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3992. gMaid[i].transform.eulerAngles =
  3993. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3994. Spine0a2[i].transform.eulerAngles.y,
  3995. Spine0a2[i].transform.eulerAngles.z + 90f);
  3996. mMaid[i].maid = maid;
  3997. mMaid[i].ido = 6;
  3998. gMaidC[i].transform.position = maid.transform.position;
  3999. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  4000. mMaidC[i].maid = maid;
  4001. mMaidC[i].ido = 6;
  4002. if (isCube)
  4003. {
  4004. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  4005. gMaidC[i].SetActive(true);
  4006. }
  4007. else
  4008. {
  4009. gMaidC[i].SetActive(false);
  4010. }
  4011. gHandL[i].SetActive(false);
  4012. gArmL[i].SetActive(false);
  4013. gFootL[i].SetActive(false);
  4014. gHizaL[i].SetActive(false);
  4015. gHandR[i].SetActive(false);
  4016. gArmR[i].SetActive(false);
  4017. gFootR[i].SetActive(false);
  4018. gHizaR[i].SetActive(false);
  4019. gClavicleL[i].SetActive(false);
  4020. gClavicleR[i].SetActive(false);
  4021. gNeck[i].SetActive(false);
  4022. gSpine[i].SetActive(false);
  4023. gSpine0a[i].SetActive(false);
  4024. gSpine1a[i].SetActive(false);
  4025. gSpine1[i].SetActive(false);
  4026. gPelvis[i].SetActive(false);
  4027. }
  4028. if (mMaid[i].isSelect)
  4029. {
  4030. mMaid[i].isSelect = false;
  4031. if (ikMaid != i)
  4032. {
  4033. ikMaid = i;
  4034. ikBui = 5;
  4035. SetIK(maid, i);
  4036. }
  4037. }
  4038. }
  4039. else if (ikMode[i] == 6)
  4040. {
  4041. if (!gFinger[i, 0])
  4042. {
  4043. SetIKInit2(i);
  4044. }
  4045. Destroy(gMaid[i]);
  4046. Destroy(gMaidC[i]);
  4047. Destroy(gHead[i]);
  4048. Destroy(gJotai[i]);
  4049. Destroy(gKahuku[i]);
  4050. gHandL[i].SetActive(false);
  4051. gArmL[i].SetActive(false);
  4052. gFootL[i].SetActive(false);
  4053. gHizaL[i].SetActive(false);
  4054. gHandR[i].SetActive(false);
  4055. gArmR[i].SetActive(false);
  4056. gFootR[i].SetActive(false);
  4057. gHizaR[i].SetActive(false);
  4058. gClavicleL[i].SetActive(false);
  4059. gClavicleR[i].SetActive(false);
  4060. gNeck[i].SetActive(false);
  4061. gSpine[i].SetActive(false);
  4062. gSpine0a[i].SetActive(false);
  4063. gSpine1a[i].SetActive(false);
  4064. gSpine1[i].SetActive(false);
  4065. gPelvis[i].SetActive(false);
  4066. for (int j = 0; j < 10; j++)
  4067. {
  4068. mFinger[i, j * 3 + 2].maid = maid;
  4069. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4070. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 2].ido = 12;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3 + 2].ido = 15;
  4076. }
  4077. mFinger[i, j * 3 + 1].maid = maid;
  4078. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4079. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3 + 1].ido = 11;
  4082. if (j == 0 || j == 5)
  4083. {
  4084. mFinger[i, j * 3 + 1].ido = 14;
  4085. }
  4086. mFinger[i, j * 3].maid = maid;
  4087. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4088. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4089. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4090. mFinger[i, j * 3].ido = 13;
  4091. if (j == 0 || j == 5)
  4092. {
  4093. mFinger[i, j * 3].ido = 0;
  4094. }
  4095. gFinger[i, j * 3 + 2].SetActive(false);
  4096. gFinger[i, j * 3 + 1].SetActive(false);
  4097. gFinger[i, j * 3].SetActive(true);
  4098. gFinger[i, j * 3].SetActive(true);
  4099. mFinger[i, j * 3].ido = 16;
  4100. if (ikModeOld[i] != 6)
  4101. {
  4102. mFinger[i, j * 3].reset = true;
  4103. }
  4104. gFinger[i, j * 3 + 2].transform.position =
  4105. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4106. + Finger[i, j * 4 + 2].position) / 3f;
  4107. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4108. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4109. if (mFinger[i, j * 3 + 2].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3 + 2].isStop = false;
  4114. }
  4115. if (mFinger[i, j * 3 + 1].isStop)
  4116. {
  4117. isStop[i] = true;
  4118. isLock[i] = true;
  4119. mFinger[i, j * 3 + 1].isStop = false;
  4120. }
  4121. if (mFinger[i, j * 3].isStop)
  4122. {
  4123. isStop[i] = true;
  4124. isLock[i] = true;
  4125. mFinger[i, j * 3].isStop = false;
  4126. }
  4127. }
  4128. for (int j = 0; j < 6; j++)
  4129. {
  4130. mFinger2[i, j * 2 + 1].maid = maid;
  4131. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4132. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4133. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4134. mFinger2[i, j * 2 + 1].ido = 0;
  4135. mFinger2[i, j * 2].maid = maid;
  4136. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4137. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4138. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4139. mFinger2[i, j * 2].ido = 0;
  4140. gFinger2[i, j * 2 + 1].SetActive(false);
  4141. gFinger2[i, j * 2].SetActive(false);
  4142. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4143. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4144. if (mFinger2[i, j * 2 + 1].isStop)
  4145. {
  4146. isStop[i] = true;
  4147. isLock[i] = true;
  4148. mFinger2[i, j * 2 + 1].isStop = false;
  4149. }
  4150. if (mFinger2[i, j * 2].isStop)
  4151. {
  4152. isStop[i] = true;
  4153. isLock[i] = true;
  4154. mFinger2[i, j * 2].isStop = false;
  4155. }
  4156. }
  4157. }
  4158. else if (ikMode[i] == 4)
  4159. {
  4160. if (!gFinger[i, 0])
  4161. {
  4162. SetIKInit2(i);
  4163. }
  4164. Destroy(gMaid[i]);
  4165. Destroy(gMaidC[i]);
  4166. Destroy(gHead[i]);
  4167. Destroy(gJotai[i]);
  4168. Destroy(gKahuku[i]);
  4169. gHandL[i].SetActive(false);
  4170. gArmL[i].SetActive(false);
  4171. gFootL[i].SetActive(false);
  4172. gHizaL[i].SetActive(false);
  4173. gHandR[i].SetActive(false);
  4174. gArmR[i].SetActive(false);
  4175. gFootR[i].SetActive(false);
  4176. gHizaR[i].SetActive(false);
  4177. gClavicleL[i].SetActive(false);
  4178. gClavicleR[i].SetActive(false);
  4179. gNeck[i].SetActive(false);
  4180. gSpine[i].SetActive(false);
  4181. gSpine0a[i].SetActive(false);
  4182. gSpine1a[i].SetActive(false);
  4183. gSpine1[i].SetActive(false);
  4184. gPelvis[i].SetActive(false);
  4185. for (int j = 0; j < 10; j++)
  4186. {
  4187. mFinger[i, j * 3 + 2].maid = maid;
  4188. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4189. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4190. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 2].ido = 12;
  4192. mFinger[i, j * 3 + 2].onFlg = true;
  4193. if (j == 0 || j == 5)
  4194. {
  4195. mFinger[i, j * 3 + 2].ido = 15;
  4196. }
  4197. mFinger[i, j * 3 + 1].maid = maid;
  4198. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4199. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4200. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3 + 1].ido = 11;
  4202. mFinger[i, j * 3 + 1].onFlg = true;
  4203. if (j == 0 || j == 5)
  4204. {
  4205. mFinger[i, j * 3 + 1].ido = 14;
  4206. }
  4207. mFinger[i, j * 3].maid = maid;
  4208. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4209. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4210. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4211. mFinger[i, j * 3].ido = 13;
  4212. mFinger[i, j * 3].onFlg = true;
  4213. if (j == 0 || j == 5)
  4214. {
  4215. mFinger[i, j * 3].ido = 0;
  4216. }
  4217. if (ikModeOld[i] != 4)
  4218. {
  4219. mFinger[i, j * 3].reset = true;
  4220. }
  4221. gFinger[i, j * 3 + 2].SetActive(true);
  4222. gFinger[i, j * 3 + 1].SetActive(true);
  4223. gFinger[i, j * 3].SetActive(true);
  4224. gFinger[i, j * 3 + 2].transform.position =
  4225. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4226. + Finger[i, j * 4 + 2].position) / 3f;
  4227. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4228. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4229. if (mFinger[i, j * 3 + 2].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3 + 2].isStop = false;
  4234. }
  4235. if (mFinger[i, j * 3 + 1].isStop)
  4236. {
  4237. isStop[i] = true;
  4238. isLock[i] = true;
  4239. mFinger[i, j * 3 + 1].isStop = false;
  4240. }
  4241. if (mFinger[i, j * 3].isStop)
  4242. {
  4243. isStop[i] = true;
  4244. isLock[i] = true;
  4245. mFinger[i, j * 3].isStop = false;
  4246. }
  4247. }
  4248. for (int j = 0; j < 6; j++)
  4249. {
  4250. mFinger2[i, j * 2 + 1].maid = maid;
  4251. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4252. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4253. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4254. mFinger2[i, j * 2 + 1].ido = 17;
  4255. mFinger2[i, j * 2].maid = maid;
  4256. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4257. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4258. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4259. mFinger2[i, j * 2].ido = 0;
  4260. gFinger2[i, j * 2 + 1].SetActive(true);
  4261. gFinger2[i, j * 2].SetActive(true);
  4262. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4263. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4264. if (mFinger2[i, j * 2 + 1].isStop)
  4265. {
  4266. isStop[i] = true;
  4267. isLock[i] = true;
  4268. mFinger2[i, j * 2 + 1].isStop = false;
  4269. }
  4270. if (mFinger2[i, j * 2].isStop)
  4271. {
  4272. isStop[i] = true;
  4273. isLock[i] = true;
  4274. mFinger2[i, j * 2].isStop = false;
  4275. }
  4276. }
  4277. }
  4278. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4279. {
  4280. mHandL[i].ido = 0;
  4281. mHandR[i].ido = 0;
  4282. mFootL[i].ido = 0;
  4283. mFootR[i].ido = 0;
  4284. mHizaL[i].ido = 0;
  4285. mHizaR[i].ido = 0;
  4286. mHandL[i].reset = true;
  4287. mHandR[i].reset = true;
  4288. mFootL[i].reset = true;
  4289. mFootR[i].reset = true;
  4290. mHizaL[i].reset = true;
  4291. mHizaR[i].reset = true;
  4292. }
  4293. else
  4294. {
  4295. if (gFinger[i, 0])
  4296. {
  4297. for (int j = 0; j < 30; j++)
  4298. {
  4299. gFinger[i, j].SetActive(false);
  4300. }
  4301. for (int j = 0; j < 12; j++)
  4302. {
  4303. gFinger2[i, j].SetActive(false);
  4304. }
  4305. }
  4306. Destroy(gHead[i]);
  4307. Destroy(gJotai[i]);
  4308. Destroy(gKahuku[i]);
  4309. Destroy(gIKHandL[i]);
  4310. Destroy(gIKHandR[i]);
  4311. Destroy(gIKMuneL[i]);
  4312. Destroy(gIKMuneR[i]);
  4313. Destroy(gHead2[i]);
  4314. Destroy(gMaid2[i]);
  4315. gHandL[i].SetActive(true);
  4316. gArmL[i].SetActive(true);
  4317. gFootL[i].SetActive(true);
  4318. gHizaL[i].SetActive(true);
  4319. gHandR[i].SetActive(true);
  4320. gArmR[i].SetActive(true);
  4321. gFootR[i].SetActive(true);
  4322. gHizaR[i].SetActive(true);
  4323. mHandL[i].ido = 0;
  4324. mHandR[i].ido = 0;
  4325. mFootL[i].ido = 0;
  4326. mFootR[i].ido = 0;
  4327. gClavicleL[i].SetActive(true);
  4328. gClavicleR[i].SetActive(true);
  4329. }
  4330. if (!isIK[i])
  4331. {
  4332. gHandL[i].SetActive(false);
  4333. gArmL[i].SetActive(false);
  4334. gFootL[i].SetActive(false);
  4335. gHizaL[i].SetActive(false);
  4336. gHandR[i].SetActive(false);
  4337. gArmR[i].SetActive(false);
  4338. gFootR[i].SetActive(false);
  4339. gHizaR[i].SetActive(false);
  4340. gClavicleL[i].SetActive(false);
  4341. gClavicleR[i].SetActive(false);
  4342. gNeck[i].SetActive(false);
  4343. gSpine[i].SetActive(false);
  4344. gSpine0a[i].SetActive(false);
  4345. gSpine1a[i].SetActive(false);
  4346. gSpine1[i].SetActive(false);
  4347. gPelvis[i].SetActive(false);
  4348. }
  4349. if (isIK[i])
  4350. {
  4351. mHandL[i].maid = maid;
  4352. mHandL[i].HandL = HandL1[i];
  4353. if (ikMode[i] == 2)
  4354. {
  4355. mHandL[i].UpperArmL = ForearmL1[i];
  4356. }
  4357. else
  4358. {
  4359. mHandL[i].UpperArmL = UpperArmL1[i];
  4360. if (ikModeOld[i] == 2 && isLock[i])
  4361. {
  4362. mHandL[i].OnMouseDown();
  4363. mHandL[i].isSelect = false;
  4364. }
  4365. }
  4366. mHandL[i].ForearmL = ForearmL1[i];
  4367. mArmL[i].maid = maid;
  4368. mArmL[i].HandL = ForearmL1[i];
  4369. mArmL[i].UpperArmL = UpperArmL1[i];
  4370. mArmL[i].ForearmL = UpperArmL1[i];
  4371. mArmL[i].onFlg = true;
  4372. if (mArmL[i].onFlg2)
  4373. {
  4374. mArmL[i].onFlg2 = false;
  4375. mHandL[i].initFlg = false;
  4376. }
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mHandL[i].initFlg = false;
  4380. mHandR[i].initFlg = false;
  4381. mFootL[i].initFlg = false;
  4382. mFootR[i].initFlg = false;
  4383. mHandL[i].onFlg = true;
  4384. mHandR[i].onFlg = true;
  4385. mFootL[i].onFlg = true;
  4386. mFootR[i].onFlg = true;
  4387. }
  4388. else
  4389. {
  4390. mHandL[i].onFlg = false;
  4391. mHandR[i].onFlg = false;
  4392. mFootL[i].onFlg = false;
  4393. mFootR[i].onFlg = false;
  4394. }
  4395. gHandL[i].transform.position = HandL1[i].position;
  4396. gArmL[i].transform.position = ForearmL1[i].position;
  4397. mClavicleL[i].maid = maid;
  4398. mClavicleL[i].HandL = UpperArmL1[i];
  4399. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4400. mClavicleL[i].ForearmL = ClavicleL1[i];
  4401. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4402. if (mHandL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mHandL[i].isStop = false;
  4407. }
  4408. if (mArmL[i].isStop)
  4409. {
  4410. isStop[i] = true;
  4411. isLock[i] = true;
  4412. mArmL[i].isStop = false;
  4413. }
  4414. if (mClavicleL[i].isStop)
  4415. {
  4416. isStop[i] = true;
  4417. isLock[i] = true;
  4418. mClavicleL[i].isStop = false;
  4419. }
  4420. mHandR[i].maid = maid;
  4421. mHandR[i].HandL = HandR1[i];
  4422. if (ikMode[i] == 2)
  4423. {
  4424. mHandR[i].UpperArmL = ForearmR1[i];
  4425. }
  4426. else
  4427. {
  4428. mHandR[i].UpperArmL = UpperArmR1[i];
  4429. if (ikModeOld[i] == 2 && isLock[i])
  4430. {
  4431. mHandR[i].OnMouseDown();
  4432. mHandR[i].isSelect = false;
  4433. }
  4434. }
  4435. mHandR[i].ForearmL = ForearmR1[i];
  4436. mArmR[i].maid = maid;
  4437. mArmR[i].HandL = ForearmR1[i];
  4438. mArmR[i].UpperArmL = UpperArmR1[i];
  4439. mArmR[i].ForearmL = UpperArmR1[i];
  4440. mArmR[i].onFlg = true;
  4441. if (mArmR[i].onFlg2)
  4442. {
  4443. mArmR[i].onFlg2 = false;
  4444. mHandR[i].initFlg = false;
  4445. }
  4446. gHandR[i].transform.position = HandR1[i].position;
  4447. gArmR[i].transform.position = ForearmR1[i].position;
  4448. mClavicleR[i].maid = maid;
  4449. mClavicleR[i].HandL = UpperArmR1[i];
  4450. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4451. mClavicleR[i].ForearmL = ClavicleR1[i];
  4452. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4453. if (mHandR[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mHandR[i].isStop = false;
  4458. }
  4459. if (mArmR[i].isStop)
  4460. {
  4461. isStop[i] = true;
  4462. isLock[i] = true;
  4463. mArmR[i].isStop = false;
  4464. }
  4465. if (mClavicleL[i].isStop)
  4466. {
  4467. isStop[i] = true;
  4468. isLock[i] = true;
  4469. mClavicleL[i].isStop = false;
  4470. }
  4471. mFootL[i].maid = maid;
  4472. mFootL[i].HandL = HandL2[i];
  4473. if (ikMode[i] == 2)
  4474. {
  4475. mFootL[i].UpperArmL = ForearmL2[i];
  4476. }
  4477. else
  4478. {
  4479. mFootL[i].UpperArmL = UpperArmL2[i];
  4480. if (ikModeOld[i] == 2 && isLock[i])
  4481. {
  4482. mFootL[i].OnMouseDown();
  4483. mFootL[i].isSelect = false;
  4484. }
  4485. }
  4486. mFootL[i].ForearmL = ForearmL2[i];
  4487. mHizaL[i].maid = maid;
  4488. mHizaL[i].HandL = ForearmL2[i];
  4489. mHizaL[i].UpperArmL = UpperArmL2[i];
  4490. mHizaL[i].ForearmL = UpperArmL2[i];
  4491. mHizaL[i].onFlg = true;
  4492. if (mHizaL[i].onFlg2)
  4493. {
  4494. mHizaL[i].onFlg2 = false;
  4495. mFootL[i].initFlg = false;
  4496. }
  4497. gFootL[i].transform.position = HandL2[i].position;
  4498. gHizaL[i].transform.position = ForearmL2[i].position;
  4499. if (mFootL[i].isStop)
  4500. {
  4501. isStop[i] = true;
  4502. isLock[i] = true;
  4503. mFootL[i].isStop = false;
  4504. }
  4505. if (mHizaL[i].isStop)
  4506. {
  4507. isStop[i] = true;
  4508. isLock[i] = true;
  4509. mHizaL[i].isStop = false;
  4510. }
  4511. mFootR[i].maid = maid;
  4512. mFootR[i].HandL = HandR2[i];
  4513. if (ikMode[i] == 2)
  4514. {
  4515. mFootR[i].UpperArmL = ForearmR2[i];
  4516. }
  4517. else
  4518. {
  4519. mFootR[i].UpperArmL = UpperArmR2[i];
  4520. if (ikModeOld[i] == 2 && isLock[i])
  4521. {
  4522. mFootR[i].OnMouseDown();
  4523. mFootR[i].isSelect = false;
  4524. }
  4525. }
  4526. mFootR[i].ForearmL = ForearmR2[i];
  4527. mHizaR[i].maid = maid;
  4528. mHizaR[i].HandL = ForearmR2[i];
  4529. mHizaR[i].UpperArmL = UpperArmR2[i];
  4530. mHizaR[i].ForearmL = UpperArmR2[i];
  4531. mHizaR[i].onFlg = true;
  4532. if (mHizaR[i].onFlg2)
  4533. {
  4534. mHizaR[i].onFlg2 = false;
  4535. mFootR[i].initFlg = false;
  4536. }
  4537. gFootR[i].transform.position = HandR2[i].position;
  4538. gHizaR[i].transform.position = ForearmR2[i].position;
  4539. if (mFootR[i].isStop)
  4540. {
  4541. isStop[i] = true;
  4542. isLock[i] = true;
  4543. mFootR[i].isStop = false;
  4544. }
  4545. if (mHizaR[i].isStop)
  4546. {
  4547. isStop[i] = true;
  4548. isLock[i] = true;
  4549. mHizaR[i].isStop = false;
  4550. }
  4551. bool flag13 = false;
  4552. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4553. || ikModeOld[i] == 14)
  4554. {
  4555. flag13 = true;
  4556. }
  4557. if (isBone[i])
  4558. {
  4559. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4560. || isChange[i])
  4561. {
  4562. float gizmoSizeSpine = 0.2f;
  4563. gizmoNeck[i].Visible = false;
  4564. gizmoFootL[i].Visible = false;
  4565. gizmoHandR[i].Visible = false;
  4566. gizmoHandL[i].Visible = false;
  4567. gizmoFootR[i].Visible = false;
  4568. gizmoPelvis[i].Visible = false;
  4569. if (ikMode[i] == 2 || ikMode[i] == 1)
  4570. {
  4571. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4572. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4573. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4574. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4575. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4576. if (ikMode[i] == 2)
  4577. {
  4578. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4579. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4580. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4581. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4582. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4583. if (isDragging)
  4584. {
  4585. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4586. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4587. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4588. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4589. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4590. }
  4591. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4592. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4596. gizmoNeck[i].Visible = true;
  4597. gizmoHandL[i].Visible = true;
  4598. gizmoHandR[i].Visible = true;
  4599. gizmoFootL[i].Visible = true;
  4600. gizmoFootR[i].Visible = true;
  4601. gNeck[i].SetActive(false);
  4602. gSpine[i].SetActive(false);
  4603. gSpine0a[i].SetActive(false);
  4604. gSpine1[i].SetActive(false);
  4605. gSpine1a[i].SetActive(false);
  4606. }
  4607. else
  4608. {
  4609. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4610. if (isDragging)
  4611. {
  4612. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4613. }
  4614. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4615. gizmoPelvis[i].Visible = true;
  4616. gPelvis[i].SetActive(false);
  4617. }
  4618. if (!isLock[i])
  4619. {
  4620. if (isDragging)
  4621. {
  4622. isStop[i] = true;
  4623. isLock[i] = true;
  4624. }
  4625. }
  4626. }
  4627. }
  4628. else
  4629. {
  4630. float gizmoSizeLimb = 0.25f;
  4631. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4632. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4633. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4634. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4635. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4636. if (ikMode[i] == 3)
  4637. {
  4638. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4639. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4640. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4641. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4642. if (isDragging)
  4643. {
  4644. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4645. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4646. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4647. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4648. }
  4649. else
  4650. {
  4651. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4652. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4653. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4654. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4655. }
  4656. }
  4657. else if (ikMode[i] == 5)
  4658. {
  4659. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4660. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4661. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4662. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4663. if (isDragging)
  4664. {
  4665. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4666. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4667. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4668. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4669. flag13 = true;
  4670. }
  4671. else
  4672. {
  4673. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4674. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4675. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4676. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4677. }
  4678. }
  4679. else if (ikMode[i] == 8)
  4680. {
  4681. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4682. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4683. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4684. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4685. if (isDragging)
  4686. {
  4687. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4688. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4689. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4690. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4691. flag13 = true;
  4692. }
  4693. else
  4694. {
  4695. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4696. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4697. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4698. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4699. }
  4700. }
  4701. gizmoHandL[i].Visible = true;
  4702. gizmoHandR[i].Visible = true;
  4703. gizmoFootL[i].Visible = true;
  4704. gizmoFootR[i].Visible = true;
  4705. gHandL[i].SetActive(false);
  4706. gFootL[i].SetActive(false);
  4707. gHandR[i].SetActive(false);
  4708. gFootR[i].SetActive(false);
  4709. if (!isLock[i])
  4710. {
  4711. if (isDragging)
  4712. {
  4713. isStop[i] = true;
  4714. isLock[i] = true;
  4715. }
  4716. }
  4717. }
  4718. if (isChange[i])
  4719. {
  4720. isChange[i] = false;
  4721. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4725. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4726. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4727. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4728. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4729. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4730. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4731. gHandL[i].GetComponent<Renderer>().enabled = true;
  4732. gHandR[i].GetComponent<Renderer>().enabled = true;
  4733. gArmL[i].GetComponent<Renderer>().enabled = true;
  4734. gArmR[i].GetComponent<Renderer>().enabled = true;
  4735. gFootL[i].GetComponent<Renderer>().enabled = true;
  4736. gFootR[i].GetComponent<Renderer>().enabled = true;
  4737. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4738. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4739. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4740. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4741. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4742. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4743. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4744. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4745. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4746. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4747. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4748. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4749. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4750. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4751. }
  4752. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4753. {
  4754. mNeck[i].ido = 1;
  4755. mNeck[i].reset = true;
  4756. mSpine[i].ido = 1;
  4757. mSpine[i].reset = true;
  4758. mSpine0a[i].ido = 1;
  4759. mSpine0a[i].reset = true;
  4760. mSpine1a[i].ido = 1;
  4761. mSpine1a[i].reset = true;
  4762. mSpine1[i].ido = 1;
  4763. mSpine1[i].reset = true;
  4764. mPelvis[i].ido = 1;
  4765. mPelvis[i].reset = true;
  4766. }
  4767. else if (ikMode[i] == 0)
  4768. {
  4769. gNeck[i].SetActive(true);
  4770. gSpine[i].SetActive(true);
  4771. gSpine0a[i].SetActive(true);
  4772. gSpine1a[i].SetActive(true);
  4773. gSpine1[i].SetActive(true);
  4774. gPelvis[i].SetActive(true);
  4775. if (mNeck[i].isHead)
  4776. {
  4777. mNeck[i].isHead = false;
  4778. isLookn[i] = isLook[i];
  4779. isLook[i] = !isLook[i];
  4780. }
  4781. mNeck[i].maid = maid;
  4782. mNeck[i].head = Neck[i];
  4783. mNeck[i].no = i;
  4784. mNeck[i].ido = 1;
  4785. gNeck[i].transform.position = Neck[i].position;
  4786. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4787. mSpine[i].maid = maid;
  4788. mSpine[i].head = Spine2[i];
  4789. mSpine[i].no = i;
  4790. mSpine[i].ido = 1;
  4791. gSpine[i].transform.position = Spine2[i].position;
  4792. gSpine[i].transform.eulerAngles =
  4793. new Vector3(Spine2[i].localEulerAngles.z,
  4794. Spine2[i].localEulerAngles.y,
  4795. Spine2[i].localEulerAngles.x);
  4796. mSpine0a[i].maid = maid;
  4797. mSpine0a[i].head = Spine0a2[i];
  4798. mSpine0a[i].no = i;
  4799. mSpine0a[i].ido = 1;
  4800. gSpine0a[i].transform.position = Spine0a2[i].position;
  4801. gSpine0a[i].transform.eulerAngles =
  4802. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4803. Spine0a2[i].localEulerAngles.x,
  4804. Spine0a2[i].localEulerAngles.y);
  4805. mSpine1a[i].maid = maid;
  4806. mSpine1a[i].head = Spine1a2[i];
  4807. mSpine1a[i].no = i;
  4808. mSpine1a[i].ido = 1;
  4809. gSpine1a[i].transform.position = Spine1a2[i].position;
  4810. gSpine1a[i].transform.localEulerAngles =
  4811. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4812. Spine1a2[i].localEulerAngles.x,
  4813. Spine1a2[i].localEulerAngles.y);
  4814. mSpine1[i].maid = maid;
  4815. mSpine1[i].head = Spine12[i];
  4816. mSpine1[i].no = i;
  4817. mSpine1[i].ido = 1;
  4818. gSpine1[i].transform.position = Spine12[i].position;
  4819. gSpine1[i].transform.localEulerAngles =
  4820. new Vector3(-Spine12[i].localEulerAngles.z,
  4821. Spine12[i].localEulerAngles.x,
  4822. Spine12[i].localEulerAngles.y);
  4823. mPelvis[i].maid = maid;
  4824. mPelvis[i].head = Pelvis2[i];
  4825. mPelvis[i].no = i;
  4826. mPelvis[i].ido = 1;
  4827. gPelvis[i].transform.position = Pelvis2[i].position;
  4828. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4829. if (mNeck[i].isIdo)
  4830. {
  4831. mNeck[i].isIdo = false;
  4832. isLock[i] = true;
  4833. }
  4834. if (mSpine[i].isIdo)
  4835. {
  4836. mSpine[i].isIdo = false;
  4837. flag13 = true;
  4838. isLock[i] = true;
  4839. }
  4840. if (mSpine0a[i].isIdo)
  4841. {
  4842. mSpine0a[i].isIdo = false;
  4843. flag13 = true;
  4844. isLock[i] = true;
  4845. }
  4846. if (mSpine1a[i].isIdo)
  4847. {
  4848. mSpine1a[i].isIdo = false;
  4849. flag13 = true;
  4850. isLock[i] = true;
  4851. }
  4852. if (mSpine1[i].isIdo)
  4853. {
  4854. mSpine1[i].isIdo = false;
  4855. flag13 = true;
  4856. isLock[i] = true;
  4857. }
  4858. if (mPelvis[i].isIdo)
  4859. {
  4860. mPelvis[i].isIdo = false;
  4861. flag13 = true;
  4862. isLock[i] = true;
  4863. }
  4864. if (mClavicleL[i].isIdo)
  4865. {
  4866. mClavicleL[i].isIdo = false;
  4867. flag13 = true;
  4868. isLock[i] = true;
  4869. }
  4870. if (mClavicleR[i].isIdo)
  4871. {
  4872. mClavicleR[i].isIdo = false;
  4873. flag13 = true;
  4874. isLock[i] = true;
  4875. }
  4876. }
  4877. }
  4878. else if (isChange[i])
  4879. {
  4880. isChange[i] = false;
  4881. gHandL[i].GetComponent<Renderer>().enabled = false;
  4882. gArmL[i].GetComponent<Renderer>().enabled = false;
  4883. gFootL[i].GetComponent<Renderer>().enabled = false;
  4884. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4885. gHandR[i].GetComponent<Renderer>().enabled = false;
  4886. gArmR[i].GetComponent<Renderer>().enabled = false;
  4887. gFootR[i].GetComponent<Renderer>().enabled = false;
  4888. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4889. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4890. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4891. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4892. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4893. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4894. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4895. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4896. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4897. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4898. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4899. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4900. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4901. gNeck[i].SetActive(false);
  4902. gSpine[i].SetActive(false);
  4903. gSpine0a[i].SetActive(false);
  4904. gSpine1a[i].SetActive(false);
  4905. gSpine1[i].SetActive(false);
  4906. gPelvis[i].SetActive(false);
  4907. gizmoHandL[i].Visible = false;
  4908. gizmoHandR[i].Visible = false;
  4909. gizmoFootL[i].Visible = false;
  4910. gizmoFootR[i].Visible = false;
  4911. gizmoNeck[i].Visible = false;
  4912. gizmoPelvis[i].Visible = false;
  4913. }
  4914. if (flag13)
  4915. {
  4916. mHandL[i].initFlg = false;
  4917. mHandR[i].initFlg = false;
  4918. mFootL[i].initFlg = false;
  4919. mFootR[i].initFlg = false;
  4920. }
  4921. }
  4922. ikModeOld[i] = ikMode[i];
  4923. bool flag14 = false;
  4924. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4925. {
  4926. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4927. {
  4928. for (int k = 0; k < 10; k++)
  4929. {
  4930. maid.transform.RotateAround(maid.transform.position,
  4931. Vector3.right,
  4932. -maid.transform.rotation.eulerAngles.x);
  4933. maid.transform.RotateAround(maid.transform.position,
  4934. Vector3.forward,
  4935. -maid.transform.rotation.eulerAngles.z);
  4936. }
  4937. flag14 = true;
  4938. }
  4939. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4940. {
  4941. maid.transform.RotateAround(maid.transform.position,
  4942. new Vector3(vector3.x, 0f, vector3.z),
  4943. 0.3f);
  4944. maid.transform.RotateAround(maid.transform.position,
  4945. new Vector3(vector2.x, 0f, vector2.z),
  4946. 0.3f);
  4947. flag14 = true;
  4948. }
  4949. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4950. {
  4951. maid.transform.RotateAround(maid.transform.position,
  4952. new Vector3(vector3.x, 0f, vector3.z),
  4953. 0.3f);
  4954. maid.transform.RotateAround(maid.transform.position,
  4955. new Vector3(vector2.x, 0f, vector2.z),
  4956. -0.3f);
  4957. flag14 = true;
  4958. }
  4959. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4960. {
  4961. maid.transform.RotateAround(maid.transform.position,
  4962. new Vector3(vector3.x, 0f, vector3.z),
  4963. -0.3f);
  4964. maid.transform.RotateAround(maid.transform.position,
  4965. new Vector3(vector2.x, 0f, vector2.z),
  4966. 0.3f);
  4967. flag14 = true;
  4968. }
  4969. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4970. {
  4971. maid.transform.RotateAround(maid.transform.position,
  4972. new Vector3(vector3.x, 0f, vector3.z),
  4973. -0.3f);
  4974. maid.transform.RotateAround(maid.transform.position,
  4975. new Vector3(vector2.x, 0f, vector2.z),
  4976. -0.3f);
  4977. flag14 = true;
  4978. }
  4979. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4980. {
  4981. maid.transform.RotateAround(maid.transform.position,
  4982. new Vector3(vector3.x, 0f, vector3.z),
  4983. 0.4f);
  4984. flag14 = true;
  4985. }
  4986. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4987. {
  4988. maid.transform.RotateAround(maid.transform.position,
  4989. new Vector3(vector3.x, 0f, vector3.z),
  4990. -0.4f);
  4991. flag14 = true;
  4992. }
  4993. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4994. {
  4995. maid.transform.RotateAround(maid.transform.position,
  4996. new Vector3(vector2.x, 0f, vector2.z),
  4997. 0.4f);
  4998. flag14 = true;
  4999. }
  5000. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  5001. {
  5002. maid.transform.RotateAround(maid.transform.position,
  5003. new Vector3(vector2.x, 0f, vector2.z),
  5004. -0.4f);
  5005. flag14 = true;
  5006. }
  5007. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  5008. {
  5009. maid.body0.transform.localRotation =
  5010. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5011. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5012. flag14 = true;
  5013. }
  5014. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5015. {
  5016. maid.body0.transform.localRotation =
  5017. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5018. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5019. flag14 = true;
  5020. }
  5021. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5022. {
  5023. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5024. flag14 = true;
  5025. }
  5026. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5027. {
  5028. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5029. flag14 = true;
  5030. }
  5031. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5032. {
  5033. Vector3 vector = maid.transform.position;
  5034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5035. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5036. maid.SetPos(vector);
  5037. flag14 = true;
  5038. }
  5039. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5040. {
  5041. Vector3 vector = maid.transform.position;
  5042. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5043. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5044. maid.SetPos(vector);
  5045. flag14 = true;
  5046. }
  5047. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5048. {
  5049. Vector3 vector = maid.transform.position;
  5050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5052. maid.SetPos(vector);
  5053. flag14 = true;
  5054. }
  5055. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5056. {
  5057. Vector3 vector = maid.transform.position;
  5058. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5059. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5060. maid.SetPos(vector);
  5061. flag14 = true;
  5062. }
  5063. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5064. {
  5065. Vector3 vector = maid.transform.position;
  5066. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5067. maid.SetPos(vector);
  5068. flag14 = true;
  5069. }
  5070. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5071. {
  5072. Vector3 vector = maid.transform.position;
  5073. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5074. maid.SetPos(vector);
  5075. flag14 = true;
  5076. }
  5077. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5078. {
  5079. Vector3 vector = maid.transform.position;
  5080. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5081. maid.SetPos(vector);
  5082. flag14 = true;
  5083. }
  5084. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5085. {
  5086. Vector3 vector = maid.transform.position;
  5087. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5088. maid.SetPos(vector);
  5089. flag14 = true;
  5090. }
  5091. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5092. {
  5093. Vector3 vector = maid.transform.position;
  5094. vector.y += 0.0075f * speed;
  5095. maid.SetPos(vector);
  5096. flag14 = true;
  5097. }
  5098. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5099. {
  5100. Vector3 vector = maid.transform.position;
  5101. vector.y -= 0.0075f * speed;
  5102. maid.SetPos(vector);
  5103. flag14 = true;
  5104. }
  5105. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5106. {
  5107. maid.transform.localScale =
  5108. new Vector3(maid.transform.localScale.x * 1.005f,
  5109. maid.transform.localScale.y * 1.005f,
  5110. maid.transform.localScale.z * 1.005f);
  5111. flag14 = true;
  5112. }
  5113. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5114. {
  5115. maid.transform.localScale =
  5116. new Vector3(maid.transform.localScale.x * 0.995f,
  5117. maid.transform.localScale.y * 0.995f,
  5118. maid.transform.localScale.z * 0.995f);
  5119. flag14 = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5122. {
  5123. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5124. flag14 = true;
  5125. }
  5126. }
  5127. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5128. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5129. && i == ikMaid)
  5130. {
  5131. if (Input.GetKey(KeyCode.I))
  5132. {
  5133. if (ikMode[i] == 0)
  5134. {
  5135. Vector3 vector5 = HandL.position;
  5136. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5137. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5138. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5139. }
  5140. else if (ikMode[i] == 2)
  5141. {
  5142. Vector3 vector5 = HandL.position;
  5143. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5144. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5145. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5146. }
  5147. else if (ikMode[i] == 3)
  5148. {
  5149. if (ikBui == 1 || ikBui == 2)
  5150. {
  5151. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5152. }
  5153. else
  5154. {
  5155. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5156. }
  5157. }
  5158. else if (ikMode[i] == 4)
  5159. {
  5160. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5161. }
  5162. else if (ikMode[i] == 8)
  5163. {
  5164. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5165. }
  5166. else if (ikMode[i] == 6)
  5167. {
  5168. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5169. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5170. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5171. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5172. }
  5173. else if (ikMode[i] == 7)
  5174. {
  5175. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5176. }
  5177. else if (ikMode[i] == 5)
  5178. {
  5179. Vector3 vector5 = ForearmL.position;
  5180. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5181. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5182. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5183. }
  5184. else
  5185. {
  5186. Vector3 vector5 = ForearmL.position;
  5187. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5188. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5189. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5190. }
  5191. isStop[i] = true;
  5192. isLock[i] = true;
  5193. }
  5194. else if (Input.GetKey(KeyCode.K))
  5195. {
  5196. if (ikMode[i] == 0)
  5197. {
  5198. Vector3 vector5 = HandL.position;
  5199. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5200. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5201. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5202. }
  5203. else if (ikMode[i] == 2)
  5204. {
  5205. Vector3 vector5 = HandL.position;
  5206. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5207. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5208. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5209. }
  5210. else if (ikMode[i] == 3)
  5211. {
  5212. if (ikBui == 1 || ikBui == 2)
  5213. {
  5214. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5215. }
  5216. else
  5217. {
  5218. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5219. }
  5220. }
  5221. else if (ikMode[i] == 4)
  5222. {
  5223. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5224. }
  5225. else if (ikMode[i] == 8)
  5226. {
  5227. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5228. }
  5229. else if (ikMode[i] == 6)
  5230. {
  5231. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5232. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5233. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5234. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5235. }
  5236. else if (ikMode[i] == 7)
  5237. {
  5238. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5239. }
  5240. else if (ikMode[i] == 5)
  5241. {
  5242. Vector3 vector5 = ForearmL.position;
  5243. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5244. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5245. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5246. }
  5247. else
  5248. {
  5249. Vector3 vector5 = ForearmL.position;
  5250. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5251. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5252. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5253. }
  5254. isStop[i] = true;
  5255. isLock[i] = true;
  5256. }
  5257. else if (Input.GetKey(KeyCode.J))
  5258. {
  5259. if (ikMode[i] == 0)
  5260. {
  5261. Vector3 vector5 = HandL.position;
  5262. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5263. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5264. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5265. }
  5266. else if (ikMode[i] == 2)
  5267. {
  5268. Vector3 vector5 = HandL.position;
  5269. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5270. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5271. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5272. }
  5273. else if (ikMode[i] == 3)
  5274. {
  5275. if (ikBui == 1 || ikBui == 2)
  5276. {
  5277. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5278. }
  5279. else
  5280. {
  5281. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5282. }
  5283. }
  5284. else if (ikMode[i] == 4)
  5285. {
  5286. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5287. }
  5288. else if (ikMode[i] == 8)
  5289. {
  5290. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5291. }
  5292. else if (ikMode[i] == 6)
  5293. {
  5294. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5295. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5296. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5297. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5298. }
  5299. else if (ikMode[i] == 7)
  5300. {
  5301. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5302. }
  5303. else if (ikMode[i] == 5)
  5304. {
  5305. Vector3 vector5 = ForearmL.position;
  5306. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5307. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5308. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5309. }
  5310. else
  5311. {
  5312. Vector3 vector5 = ForearmL.position;
  5313. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5314. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5315. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5316. }
  5317. isStop[i] = true;
  5318. isLock[i] = true;
  5319. }
  5320. else if (Input.GetKey(KeyCode.L))
  5321. {
  5322. if (ikMode[i] == 0)
  5323. {
  5324. Vector3 vector5 = HandL.position;
  5325. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5326. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5327. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5328. }
  5329. else if (ikMode[i] == 2)
  5330. {
  5331. Vector3 vector5 = HandL.position;
  5332. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5333. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5334. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5335. }
  5336. else if (ikMode[i] == 3)
  5337. {
  5338. if (ikBui == 1 || ikBui == 2)
  5339. {
  5340. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5341. }
  5342. else
  5343. {
  5344. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5345. }
  5346. }
  5347. else if (ikMode[i] == 4)
  5348. {
  5349. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5350. }
  5351. else if (ikMode[i] == 8)
  5352. {
  5353. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5354. }
  5355. else if (ikMode[i] == 6)
  5356. {
  5357. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5358. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5359. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5360. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5361. }
  5362. else if (ikMode[i] == 7)
  5363. {
  5364. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5365. }
  5366. else if (ikMode[i] == 5)
  5367. {
  5368. Vector3 vector5 = ForearmL.position;
  5369. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5370. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5371. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5372. }
  5373. else
  5374. {
  5375. Vector3 vector5 = ForearmL.position;
  5376. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5377. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5378. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5379. }
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (Input.GetKey(KeyCode.U))
  5384. {
  5385. if (ikMode[i] == 3)
  5386. {
  5387. HandL.localRotation =
  5388. Quaternion.Euler(HandL.localEulerAngles)
  5389. * Quaternion.AngleAxis(1f, Vector3.right);
  5390. isStop[i] = true;
  5391. isLock[i] = true;
  5392. }
  5393. else if (ikMode[i] == 4)
  5394. {
  5395. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5396. isStop[i] = true;
  5397. isLock[i] = true;
  5398. }
  5399. else if (ikMode[i] == 8)
  5400. {
  5401. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5402. isStop[i] = true;
  5403. isLock[i] = true;
  5404. }
  5405. else if (ikMode[i] == 6)
  5406. {
  5407. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5408. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5409. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5410. isStop[i] = true;
  5411. isLock[i] = true;
  5412. }
  5413. else if (ikMode[i] == 7)
  5414. {
  5415. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5416. isStop[i] = true;
  5417. isLock[i] = true;
  5418. }
  5419. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5420. {
  5421. UpperArmL.localRotation =
  5422. Quaternion.Euler(UpperArmL.localEulerAngles)
  5423. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5424. isStop[i] = true;
  5425. isLock[i] = true;
  5426. }
  5427. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5428. {
  5429. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5430. isStop[i] = true;
  5431. isLock[i] = true;
  5432. }
  5433. }
  5434. else if (Input.GetKey(KeyCode.O))
  5435. {
  5436. if (ikMode[i] == 3)
  5437. {
  5438. HandL.localRotation =
  5439. Quaternion.Euler(HandL.localEulerAngles)
  5440. * Quaternion.AngleAxis(-1f, Vector3.right);
  5441. isStop[i] = true;
  5442. isLock[i] = true;
  5443. }
  5444. else if (ikMode[i] == 4)
  5445. {
  5446. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5447. isStop[i] = true;
  5448. isLock[i] = true;
  5449. }
  5450. else if (ikMode[i] == 8)
  5451. {
  5452. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5453. isStop[i] = true;
  5454. isLock[i] = true;
  5455. }
  5456. else if (ikMode[i] == 6)
  5457. {
  5458. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5459. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5460. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5461. isStop[i] = true;
  5462. isLock[i] = true;
  5463. }
  5464. else if (ikMode[i] == 7)
  5465. {
  5466. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5467. isStop[i] = true;
  5468. isLock[i] = true;
  5469. }
  5470. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5471. {
  5472. UpperArmL.localRotation =
  5473. Quaternion.Euler(UpperArmL.localEulerAngles)
  5474. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5475. isStop[i] = true;
  5476. isLock[i] = true;
  5477. }
  5478. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5479. {
  5480. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5481. isStop[i] = true;
  5482. isLock[i] = true;
  5483. }
  5484. }
  5485. else if (Input.GetKey(KeyCode.Alpha0))
  5486. {
  5487. if (ikMode[i] == 0)
  5488. {
  5489. Vector3 vector5 = HandL.position;
  5490. vector5.y += 0.005f;
  5491. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5492. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5493. }
  5494. else if (ikMode[i] == 2)
  5495. {
  5496. Vector3 vector5 = HandL.position;
  5497. vector5.y += 0.005f;
  5498. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5499. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5500. }
  5501. else if (ikMode[i] == 5)
  5502. {
  5503. Vector3 vector5 = ForearmL.position;
  5504. vector5.y += 0.0035f;
  5505. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5506. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5507. }
  5508. else
  5509. {
  5510. Vector3 vector5 = ForearmL.position;
  5511. vector5.y += 0.0035f;
  5512. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5513. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5514. }
  5515. isStop[i] = true;
  5516. isLock[i] = true;
  5517. }
  5518. else if (Input.GetKey(KeyCode.P))
  5519. {
  5520. if (ikMode[i] == 0)
  5521. {
  5522. Vector3 vector5 = HandL.position;
  5523. vector5.y -= 0.005f;
  5524. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5525. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5526. }
  5527. else if (ikMode[i] == 2)
  5528. {
  5529. Vector3 vector5 = HandL.position;
  5530. vector5.y -= 0.005f;
  5531. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5532. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5533. }
  5534. else if (ikMode[i] == 5)
  5535. {
  5536. Vector3 vector5 = ForearmL.position;
  5537. vector5.y -= 0.0035f;
  5538. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5539. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5540. }
  5541. else
  5542. {
  5543. Vector3 vector5 = ForearmL.position;
  5544. vector5.y -= 0.0035f;
  5545. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5546. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5547. }
  5548. isStop[i] = true;
  5549. isLock[i] = true;
  5550. }
  5551. }
  5552. }
  5553. }
  5554. }
  5555. }
  5556. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5557. {
  5558. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5559. idoFlg[i] = true;
  5560. }
  5561. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5562. {
  5563. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5564. idoFlg[i] = true;
  5565. }
  5566. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5567. {
  5568. if (!xFlg[i])
  5569. {
  5570. xFlg[i] = true;
  5571. zFlg[i] = false;
  5572. if (maid.status.personal.uniqueName == "Pride")
  5573. {
  5574. string text = "s0_";
  5575. Random random = new Random();
  5576. int num4 = random.Next(10000);
  5577. bool flag7 = false;
  5578. for (int k = 0; k < tunArray.Length; k++)
  5579. {
  5580. if (tunArray[k] == num4)
  5581. {
  5582. flag7 = true;
  5583. break;
  5584. }
  5585. }
  5586. if (!flag7)
  5587. {
  5588. text = text + "0" + num4.ToString() + ".ogg";
  5589. if (GameUty.FileSystem.IsExistentFile(text))
  5590. {
  5591. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5592. }
  5593. }
  5594. }
  5595. if (maid.status.personal.uniqueName == "Cool")
  5596. {
  5597. string text = "s1_";
  5598. Random random = new Random();
  5599. int num4 = random.Next(10000);
  5600. bool flag7 = false;
  5601. for (int k = 0; k < coolArray.Length; k++)
  5602. {
  5603. if (coolArray[k] == num4)
  5604. {
  5605. flag7 = true;
  5606. break;
  5607. }
  5608. }
  5609. if (!flag7)
  5610. {
  5611. text = text + "0" + num4.ToString() + ".ogg";
  5612. if (GameUty.FileSystem.IsExistentFile(text))
  5613. {
  5614. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5615. }
  5616. }
  5617. }
  5618. if (maid.status.personal.uniqueName == "Pure")
  5619. {
  5620. string text = "s2_";
  5621. Random random = new Random();
  5622. int num4 = random.Next(10000);
  5623. bool flag7 = false;
  5624. for (int k = 0; k < pureArray.Length; k++)
  5625. {
  5626. if (pureArray[k] == num4)
  5627. {
  5628. flag7 = true;
  5629. break;
  5630. }
  5631. }
  5632. if (!flag7)
  5633. {
  5634. text = text + "0" + num4.ToString() + ".ogg";
  5635. if (GameUty.FileSystem.IsExistentFile(text))
  5636. {
  5637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5638. }
  5639. }
  5640. }
  5641. if (maid.status.personal.uniqueName == "Yandere")
  5642. {
  5643. string text = "s3_";
  5644. Random random = new Random();
  5645. int num4 = random.Next(10000);
  5646. bool flag7 = false;
  5647. for (int k = 0; k < yanArray.Length; k++)
  5648. {
  5649. if (yanArray[k] == num4)
  5650. {
  5651. flag7 = true;
  5652. break;
  5653. }
  5654. }
  5655. if (!flag7)
  5656. {
  5657. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5658. if (GameUty.FileSystem.IsExistentFile(text))
  5659. {
  5660. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5661. }
  5662. }
  5663. }
  5664. if (maid.status.personal.uniqueName == "Muku")
  5665. {
  5666. string text = "h0_";
  5667. Random random = new Random();
  5668. int num4 = random.Next(10000);
  5669. bool flag7 = false;
  5670. for (int k = 0; k < h0Array.Length; k++)
  5671. {
  5672. if (h0Array[k] == num4)
  5673. {
  5674. flag7 = true;
  5675. break;
  5676. }
  5677. }
  5678. if (flag7)
  5679. {
  5680. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5681. if (GameUty.FileSystem.IsExistentFile(text))
  5682. {
  5683. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5684. }
  5685. }
  5686. }
  5687. if (maid.status.personal.uniqueName == "Majime")
  5688. {
  5689. string text = "h1_";
  5690. Random random = new Random();
  5691. int num4 = random.Next(10000);
  5692. bool flag7 = false;
  5693. for (int k = 0; k < h1Array.Length; k++)
  5694. {
  5695. if (h1Array[k] == num4)
  5696. {
  5697. flag7 = true;
  5698. break;
  5699. }
  5700. }
  5701. if (flag7)
  5702. {
  5703. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5704. if (GameUty.FileSystem.IsExistentFile(text))
  5705. {
  5706. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5707. }
  5708. }
  5709. }
  5710. if (maid.status.personal.uniqueName == "Rindere")
  5711. {
  5712. string text = "h2_";
  5713. Random random = new Random();
  5714. int num4 = random.Next(10000);
  5715. bool flag7 = false;
  5716. for (int k = 0; k < h2Array.Length; k++)
  5717. {
  5718. if (h2Array[k] == num4)
  5719. {
  5720. flag7 = true;
  5721. break;
  5722. }
  5723. }
  5724. if (flag7)
  5725. {
  5726. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5727. if (GameUty.FileSystem.IsExistentFile(text))
  5728. {
  5729. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5730. }
  5731. }
  5732. }
  5733. }
  5734. else
  5735. {
  5736. xFlg[i] = false;
  5737. maid.AudioMan.Clear();
  5738. }
  5739. idoFlg[i] = true;
  5740. }
  5741. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5742. {
  5743. if (!zFlg[i])
  5744. {
  5745. zFlg[i] = true;
  5746. xFlg[i] = false;
  5747. string text = "";
  5748. if (maid.status.personal.uniqueName == "Pride")
  5749. {
  5750. text = "s0_";
  5751. Random random = new Random();
  5752. int num4 = random.Next(tunArray.Length);
  5753. object obj = text;
  5754. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5755. }
  5756. if (maid.status.personal.uniqueName == "Cool")
  5757. {
  5758. text = "s1_";
  5759. Random random = new Random();
  5760. int num4 = random.Next(coolArray.Length);
  5761. object obj = text;
  5762. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5763. }
  5764. if (maid.status.personal.uniqueName == "Pure")
  5765. {
  5766. text = "s2_";
  5767. Random random = new Random();
  5768. int num4 = random.Next(pureArray.Length);
  5769. object obj = text;
  5770. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5771. }
  5772. if (maid.status.personal.uniqueName == "Yandere")
  5773. {
  5774. text = "s3_";
  5775. Random random = new Random();
  5776. int num4 = random.Next(yanArray.Length);
  5777. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5778. }
  5779. if (maid.status.personal.uniqueName == "Muku")
  5780. {
  5781. text = "h0_";
  5782. Random random = new Random();
  5783. int num4 = random.Next(h0tArray.Length);
  5784. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5785. }
  5786. if (maid.status.personal.uniqueName == "Majime")
  5787. {
  5788. text = "h1_";
  5789. Random random = new Random();
  5790. int num4 = random.Next(h1tArray.Length);
  5791. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5792. }
  5793. if (maid.status.personal.uniqueName == "Rindere")
  5794. {
  5795. text = "h2_";
  5796. Random random = new Random();
  5797. int num4 = random.Next(h2tArray.Length);
  5798. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5799. }
  5800. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5801. }
  5802. else
  5803. {
  5804. zFlg[i] = false;
  5805. maid.AudioMan.Clear();
  5806. }
  5807. idoFlg[i] = true;
  5808. }
  5809. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5810. {
  5811. string text = "";
  5812. if (maid.status.personal.uniqueName == "Pride")
  5813. {
  5814. text = "s0_";
  5815. Random random = new Random();
  5816. int num4 = random.Next(tunArray.Length);
  5817. object obj = text;
  5818. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5819. }
  5820. if (maid.status.personal.uniqueName == "Cool")
  5821. {
  5822. text = "s1_";
  5823. Random random = new Random();
  5824. int num4 = random.Next(coolArray.Length);
  5825. object obj = text;
  5826. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5827. }
  5828. if (maid.status.personal.uniqueName == "Pure")
  5829. {
  5830. text = "s2_";
  5831. Random random = new Random();
  5832. int num4 = random.Next(pureArray.Length);
  5833. object obj = text;
  5834. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5835. }
  5836. if (maid.status.personal.uniqueName == "Yandere")
  5837. {
  5838. text = "s3_";
  5839. Random random = new Random();
  5840. int num4 = random.Next(yanArray.Length);
  5841. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5842. }
  5843. if (maid.status.personal.uniqueName == "Muku")
  5844. {
  5845. text = "h0_";
  5846. Random random = new Random();
  5847. int num4 = random.Next(h0tArray.Length);
  5848. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5849. }
  5850. if (maid.status.personal.uniqueName == "Majime")
  5851. {
  5852. text = "h1_";
  5853. Random random = new Random();
  5854. int num4 = random.Next(h1tArray.Length);
  5855. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5856. }
  5857. if (maid.status.personal.uniqueName == "Rindere")
  5858. {
  5859. text = "h2_";
  5860. Random random = new Random();
  5861. int num4 = random.Next(h2tArray.Length);
  5862. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5863. }
  5864. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5865. idoFlg[i] = true;
  5866. }
  5867. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5868. {
  5869. if (maid.status.personal.uniqueName == "Pride")
  5870. {
  5871. string text = "s0_";
  5872. Random random = new Random();
  5873. int num4 = random.Next(10000);
  5874. bool flag7 = false;
  5875. for (int k = 0; k < tunArray.Length; k++)
  5876. {
  5877. if (tunArray[k] == num4)
  5878. {
  5879. flag7 = true;
  5880. break;
  5881. }
  5882. }
  5883. if (!flag7)
  5884. {
  5885. text = text + "0" + num4.ToString() + ".ogg";
  5886. if (GameUty.FileSystem.IsExistentFile(text))
  5887. {
  5888. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5889. }
  5890. }
  5891. }
  5892. if (maid.status.personal.uniqueName == "Cool")
  5893. {
  5894. string text = "s1_";
  5895. Random random = new Random();
  5896. int num4 = random.Next(10000);
  5897. bool flag7 = false;
  5898. for (int k = 0; k < coolArray.Length; k++)
  5899. {
  5900. if (coolArray[k] == num4)
  5901. {
  5902. flag7 = true;
  5903. break;
  5904. }
  5905. }
  5906. if (!flag7)
  5907. {
  5908. text = text + "0" + num4.ToString() + ".ogg";
  5909. if (GameUty.FileSystem.IsExistentFile(text))
  5910. {
  5911. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5912. }
  5913. }
  5914. }
  5915. if (maid.status.personal.uniqueName == "Pure")
  5916. {
  5917. string text = "s2_";
  5918. Random random = new Random();
  5919. int num4 = random.Next(10000);
  5920. bool flag7 = false;
  5921. for (int k = 0; k < pureArray.Length; k++)
  5922. {
  5923. if (pureArray[k] == num4)
  5924. {
  5925. flag7 = true;
  5926. break;
  5927. }
  5928. }
  5929. if (!flag7)
  5930. {
  5931. text = text + "0" + num4.ToString() + ".ogg";
  5932. if (GameUty.FileSystem.IsExistentFile(text))
  5933. {
  5934. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5935. }
  5936. }
  5937. }
  5938. if (maid.status.personal.uniqueName == "Yandere")
  5939. {
  5940. string text = "s3_";
  5941. Random random = new Random();
  5942. int num4 = random.Next(10000);
  5943. bool flag7 = false;
  5944. for (int k = 0; k < yanArray.Length; k++)
  5945. {
  5946. if (yanArray[k] == num4)
  5947. {
  5948. flag7 = true;
  5949. break;
  5950. }
  5951. }
  5952. if (!flag7)
  5953. {
  5954. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5955. if (GameUty.FileSystem.IsExistentFile(text))
  5956. {
  5957. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5958. }
  5959. }
  5960. }
  5961. if (maid.status.personal.uniqueName == "Muku")
  5962. {
  5963. string text = "h0_";
  5964. Random random = new Random();
  5965. int num4 = random.Next(10000);
  5966. bool flag7 = false;
  5967. for (int k = 0; k < h0Array.Length; k++)
  5968. {
  5969. if (h0Array[k] == num4)
  5970. {
  5971. flag7 = true;
  5972. break;
  5973. }
  5974. }
  5975. if (flag7)
  5976. {
  5977. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5978. if (GameUty.FileSystem.IsExistentFile(text))
  5979. {
  5980. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5981. }
  5982. }
  5983. }
  5984. if (maid.status.personal.uniqueName == "Majime")
  5985. {
  5986. string text = "h1_";
  5987. Random random = new Random();
  5988. int num4 = random.Next(10000);
  5989. bool flag7 = false;
  5990. for (int k = 0; k < h1Array.Length; k++)
  5991. {
  5992. if (h1Array[k] == num4)
  5993. {
  5994. flag7 = true;
  5995. break;
  5996. }
  5997. }
  5998. if (flag7)
  5999. {
  6000. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6001. if (GameUty.FileSystem.IsExistentFile(text))
  6002. {
  6003. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6004. }
  6005. }
  6006. }
  6007. if (maid.status.personal.uniqueName == "Rindere")
  6008. {
  6009. string text = "h2_";
  6010. Random random = new Random();
  6011. int num4 = random.Next(10000);
  6012. bool flag7 = false;
  6013. for (int k = 0; k < h2Array.Length; k++)
  6014. {
  6015. if (h2Array[k] == num4)
  6016. {
  6017. flag7 = true;
  6018. break;
  6019. }
  6020. }
  6021. if (flag7)
  6022. {
  6023. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6024. if (GameUty.FileSystem.IsExistentFile(text))
  6025. {
  6026. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6027. }
  6028. }
  6029. }
  6030. idoFlg[i] = true;
  6031. }
  6032. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6033. {
  6034. Vector3 vector = maid.transform.position;
  6035. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6036. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6037. maid.SetPos(vector);
  6038. idoFlg[i] = true;
  6039. }
  6040. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6041. {
  6042. Vector3 vector = maid.transform.position;
  6043. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6044. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6045. maid.SetPos(vector);
  6046. idoFlg[i] = true;
  6047. }
  6048. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6049. {
  6050. Vector3 vector = maid.transform.position;
  6051. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6053. maid.SetPos(vector);
  6054. idoFlg[i] = true;
  6055. }
  6056. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6057. {
  6058. Vector3 vector = maid.transform.position;
  6059. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6060. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6061. maid.SetPos(vector);
  6062. idoFlg[i] = true;
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6065. {
  6066. Vector3 vector = maid.transform.position;
  6067. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6068. maid.SetPos(vector);
  6069. idoFlg[i] = true;
  6070. }
  6071. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6072. {
  6073. Vector3 vector = maid.transform.position;
  6074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6075. maid.SetPos(vector);
  6076. idoFlg[i] = true;
  6077. }
  6078. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6079. {
  6080. Vector3 vector = maid.transform.position;
  6081. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6082. maid.SetPos(vector);
  6083. idoFlg[i] = true;
  6084. }
  6085. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6086. {
  6087. Vector3 vector = maid.transform.position;
  6088. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6089. maid.SetPos(vector);
  6090. idoFlg[i] = true;
  6091. }
  6092. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6093. {
  6094. Vector3 vector = maid.transform.position;
  6095. vector.y += 0.0075f * speed;
  6096. maid.SetPos(vector);
  6097. idoFlg[i] = true;
  6098. }
  6099. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6100. {
  6101. Vector3 vector = maid.transform.position;
  6102. vector.y -= 0.0075f * speed;
  6103. maid.SetPos(vector);
  6104. idoFlg[i] = true;
  6105. }
  6106. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6107. {
  6108. faceIndex[i]--;
  6109. if (faceIndex[i] <= -1)
  6110. {
  6111. faceIndex[i] = faceArray.Length - 1;
  6112. }
  6113. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6114. idoFlg[i] = true;
  6115. }
  6116. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6117. {
  6118. faceIndex[i]++;
  6119. if (faceIndex[i] == faceArray.Length)
  6120. {
  6121. faceIndex[i] = 0;
  6122. }
  6123. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6124. idoFlg[i] = true;
  6125. }
  6126. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6127. {
  6128. faceBlendIndex[i]++;
  6129. if (faceBlendIndex[i] == faceBlendArray.Length)
  6130. {
  6131. faceBlendIndex[i] = 0;
  6132. }
  6133. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6134. idoFlg[i] = true;
  6135. }
  6136. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6137. {
  6138. idoFlg[i] = true;
  6139. if (i >= 7)
  6140. {
  6141. idoFlg[i - 7] = true;
  6142. }
  6143. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6144. maid.transform.localScale.y * 1.005f,
  6145. maid.transform.localScale.z * 1.005f);
  6146. }
  6147. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6148. {
  6149. idoFlg[i] = true;
  6150. if (i >= 7)
  6151. {
  6152. idoFlg[i - 7] = true;
  6153. }
  6154. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6155. maid.transform.localScale.y * 0.995f,
  6156. maid.transform.localScale.z * 0.995f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6159. {
  6160. idoFlg[i] = true;
  6161. if (i >= 7)
  6162. {
  6163. idoFlg[i - 7] = true;
  6164. }
  6165. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6166. }
  6167. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6168. {
  6169. if (!isVR)
  6170. {
  6171. if (goSlot[(int)selectList[i]] != null)
  6172. {
  6173. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6174. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6175. {
  6176. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6177. }
  6178. }
  6179. }
  6180. maid.body0.SetMask(TBody.SlotID.wear, true);
  6181. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6182. maid.body0.SetMask(TBody.SlotID.bra, true);
  6183. maid.body0.SetMask(TBody.SlotID.panz, true);
  6184. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6185. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6186. isWear = true;
  6187. isSkirt = true;
  6188. isBra = true;
  6189. isPanz = true;
  6190. Random random = new Random();
  6191. int num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.wear, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isWear = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isSkirt = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.bra, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isBra = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.panz, false);
  6222. }
  6223. if (num4 == 1)
  6224. {
  6225. isPanz = false;
  6226. }
  6227. num4 = random.Next(2);
  6228. if (num4 == 1)
  6229. {
  6230. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6231. }
  6232. num4 = random.Next(2);
  6233. if (num4 == 1)
  6234. {
  6235. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6236. }
  6237. hFlg = true;
  6238. idoFlg[i] = true;
  6239. if (i >= 7)
  6240. {
  6241. idoFlg[i - 7] = true;
  6242. }
  6243. }
  6244. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6245. {
  6246. poseIndex[i]--;
  6247. if (poseIndex[i] <= -1)
  6248. {
  6249. poseIndex[i] = poseArray.Length - 1;
  6250. }
  6251. if (maid && maid.Visible)
  6252. {
  6253. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6254. isStop[i] = false;
  6255. poseCount[i] = 20;
  6256. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6257. {
  6258. maid.body0.MuneYureL(0f);
  6259. maid.body0.MuneYureR(0f);
  6260. }
  6261. else
  6262. {
  6263. maid.body0.MuneYureL(1f);
  6264. maid.body0.MuneYureR(1f);
  6265. }
  6266. if (array[0].Contains("MultipleMaidsPose"))
  6267. {
  6268. string path = array[0].Split(new char[] { '/' })[1];
  6269. byte[] array2 = new byte[0];
  6270. try
  6271. {
  6272. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6273. {
  6274. array2 = new byte[fileStream.Length];
  6275. fileStream.Read(array2, 0, array2.Length);
  6276. }
  6277. }
  6278. catch { }
  6279. if (0 < array2.Length)
  6280. {
  6281. string text = Path.GetFileName(path);
  6282. long num5 = text.GetHashCode();
  6283. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6284. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6285. {
  6286. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6287. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6288. };
  6289. for (int m = 0; m < array3.Length; m++)
  6290. {
  6291. maid.SetAutoTwist(array3[m], true);
  6292. }
  6293. }
  6294. }
  6295. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6296. {
  6297. loadPose[i] = array[0];
  6298. }
  6299. else if (!array[0].StartsWith("dance_"))
  6300. {
  6301. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6302. }
  6303. else
  6304. {
  6305. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6306. {
  6307. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6308. }
  6309. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6310. }
  6311. if (array.Length > 1)
  6312. {
  6313. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6314. isStop[i] = true;
  6315. if (array.Length > 2)
  6316. {
  6317. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6318. isPoseIti[i] = true;
  6319. poseIti[i] = maidArray[i].transform.position;
  6320. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6321. }
  6322. }
  6323. }
  6324. idoFlg[i] = true;
  6325. if (i >= 7)
  6326. {
  6327. idoFlg[i - 7] = true;
  6328. }
  6329. }
  6330. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6331. {
  6332. int num7 = poseIndex[i];
  6333. for (int k = 0; k < groupList.Count; k++)
  6334. {
  6335. if (poseIndex[i] < (int)groupList[k])
  6336. {
  6337. poseIndex[i] = (int)groupList[k];
  6338. break;
  6339. }
  6340. }
  6341. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6342. {
  6343. poseIndex[i] = 0;
  6344. }
  6345. if (maid && maid.Visible)
  6346. {
  6347. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6348. isStop[i] = false;
  6349. poseCount[i] = 20;
  6350. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6351. {
  6352. maid.body0.MuneYureL(0f);
  6353. maid.body0.MuneYureR(0f);
  6354. }
  6355. else
  6356. {
  6357. maid.body0.MuneYureL(1f);
  6358. maid.body0.MuneYureR(1f);
  6359. }
  6360. if (array[0].Contains("MultipleMaidsPose"))
  6361. {
  6362. string path = array[0].Split(new char[] { '/' })[1];
  6363. byte[] array2 = new byte[0];
  6364. try
  6365. {
  6366. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6367. {
  6368. array2 = new byte[fileStream.Length];
  6369. fileStream.Read(array2, 0, array2.Length);
  6370. }
  6371. }
  6372. catch { }
  6373. if (0 < array2.Length)
  6374. {
  6375. string text = Path.GetFileName(path);
  6376. long num5 = text.GetHashCode();
  6377. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6378. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6379. {
  6380. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6381. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6382. };
  6383. for (int m = 0; m < array3.Length; m++)
  6384. {
  6385. maid.SetAutoTwist(array3[m], true);
  6386. }
  6387. }
  6388. }
  6389. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6390. {
  6391. loadPose[i] = array[0];
  6392. }
  6393. else if (!array[0].StartsWith("dance_"))
  6394. {
  6395. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6396. }
  6397. else
  6398. {
  6399. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6400. {
  6401. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6402. }
  6403. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6404. }
  6405. if (array.Length > 1)
  6406. {
  6407. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6408. isStop[i] = true;
  6409. if (array.Length > 2)
  6410. {
  6411. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6412. isPoseIti[i] = true;
  6413. poseIti[i] = maidArray[i].transform.position;
  6414. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6415. }
  6416. }
  6417. }
  6418. idoFlg[i] = true;
  6419. if (i >= 7)
  6420. {
  6421. idoFlg[i - 7] = true;
  6422. }
  6423. }
  6424. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6425. {
  6426. for (int k = 0; k < groupList.Count; k++)
  6427. {
  6428. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6429. {
  6430. if (poseIndex[i] == 0)
  6431. {
  6432. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6433. }
  6434. else
  6435. {
  6436. poseIndex[i] = 0;
  6437. }
  6438. break;
  6439. }
  6440. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6441. {
  6442. poseIndex[i] = (int)groupList[k - 1];
  6443. break;
  6444. }
  6445. }
  6446. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6447. {
  6448. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6449. }
  6450. if (maid && maid.Visible)
  6451. {
  6452. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6453. isStop[i] = false;
  6454. poseCount[i] = 20;
  6455. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6456. {
  6457. maid.body0.MuneYureL(0f);
  6458. maid.body0.MuneYureR(0f);
  6459. }
  6460. else
  6461. {
  6462. maid.body0.MuneYureL(1f);
  6463. maid.body0.MuneYureR(1f);
  6464. }
  6465. if (array[0].Contains("MultipleMaidsPose"))
  6466. {
  6467. string path = array[0].Split(new char[] { '/' })[1];
  6468. byte[] array2 = new byte[0];
  6469. try
  6470. {
  6471. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6472. {
  6473. array2 = new byte[fileStream.Length];
  6474. fileStream.Read(array2, 0, array2.Length);
  6475. }
  6476. }
  6477. catch { }
  6478. if (0 < array2.Length)
  6479. {
  6480. string text = Path.GetFileName(path);
  6481. long num5 = text.GetHashCode();
  6482. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6483. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6484. {
  6485. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6486. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6487. };
  6488. for (int m = 0; m < array3.Length; m++)
  6489. {
  6490. maid.SetAutoTwist(array3[m], true);
  6491. }
  6492. }
  6493. }
  6494. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6495. {
  6496. loadPose[i] = array[0];
  6497. }
  6498. else if (!array[0].StartsWith("dance_"))
  6499. {
  6500. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6501. }
  6502. else
  6503. {
  6504. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6505. {
  6506. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6507. }
  6508. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6509. }
  6510. if (array.Length > 1)
  6511. {
  6512. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6513. isStop[i] = true;
  6514. if (array.Length > 2)
  6515. {
  6516. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6517. isPoseIti[i] = true;
  6518. poseIti[i] = maidArray[i].transform.position;
  6519. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6520. }
  6521. }
  6522. }
  6523. idoFlg[i] = true;
  6524. if (i >= 7)
  6525. {
  6526. idoFlg[i - 7] = true;
  6527. }
  6528. }
  6529. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6530. {
  6531. headEyeIndex[i]++;
  6532. if (headEyeIndex[i] == headEyeArray.Length)
  6533. {
  6534. headEyeIndex[i] = 0;
  6535. }
  6536. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6537. maid.body0.boHeadToCam = true;
  6538. maid.body0.boEyeToCam = true;
  6539. if (headEyeIndex[i] == 0)
  6540. {
  6541. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6542. maid.body0.boHeadToCam = true;
  6543. maid.body0.boEyeToCam = true;
  6544. }
  6545. else
  6546. {
  6547. maid.body0.trsLookTarget = null;
  6548. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6549. if (headEyeIndex[i] == 1)
  6550. {
  6551. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6552. }
  6553. if (headEyeIndex[i] == 2)
  6554. {
  6555. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6556. }
  6557. if (headEyeIndex[i] == 3)
  6558. {
  6559. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6560. }
  6561. if (headEyeIndex[i] == 4)
  6562. {
  6563. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6564. }
  6565. if (headEyeIndex[i] == 5)
  6566. {
  6567. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6568. }
  6569. if (headEyeIndex[i] == 6)
  6570. {
  6571. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6572. }
  6573. if (headEyeIndex[i] == 7)
  6574. {
  6575. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6576. }
  6577. if (headEyeIndex[i] == 8)
  6578. {
  6579. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6580. }
  6581. if (headEyeIndex[i] == 9)
  6582. {
  6583. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6584. }
  6585. }
  6586. idoFlg[i] = true;
  6587. if (i >= 7)
  6588. {
  6589. idoFlg[i - 7] = true;
  6590. }
  6591. }
  6592. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6593. {
  6594. idoFlg[i] = true;
  6595. if (i >= 7)
  6596. {
  6597. idoFlg[i - 7] = true;
  6598. }
  6599. }
  6600. else if (Input.GetKeyUp(key))
  6601. {
  6602. if (idoFlg[i])
  6603. {
  6604. idoFlg[i] = false;
  6605. }
  6606. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6607. {
  6608. if (!isLock[i])
  6609. {
  6610. poseIndex[i]++;
  6611. if (poseIndex[i] == poseArray.Length)
  6612. {
  6613. poseIndex[i] = 0;
  6614. }
  6615. if (maid && maid.Visible)
  6616. {
  6617. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6618. isStop[i] = false;
  6619. poseCount[i] = 20;
  6620. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6621. {
  6622. maid.body0.MuneYureL(0f);
  6623. maid.body0.MuneYureR(0f);
  6624. }
  6625. else
  6626. {
  6627. maid.body0.MuneYureL(1f);
  6628. maid.body0.MuneYureR(1f);
  6629. }
  6630. if (array[0].Contains("MultipleMaidsPose"))
  6631. {
  6632. string path = array[0].Split(new char[] { '/' })[1];
  6633. byte[] array2 = new byte[0];
  6634. try
  6635. {
  6636. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6637. {
  6638. array2 = new byte[fileStream.Length];
  6639. fileStream.Read(array2, 0, array2.Length);
  6640. }
  6641. }
  6642. catch { }
  6643. if (0 < array2.Length)
  6644. {
  6645. string text = Path.GetFileName(path);
  6646. long num5 = text.GetHashCode();
  6647. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6648. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6649. {
  6650. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6651. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6652. };
  6653. for (int m = 0; m < array3.Length; m++)
  6654. {
  6655. maid.SetAutoTwist(array3[m], true);
  6656. }
  6657. }
  6658. }
  6659. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6660. {
  6661. loadPose[i] = array[0];
  6662. }
  6663. else if (!array[0].StartsWith("dance_"))
  6664. {
  6665. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6666. }
  6667. else
  6668. {
  6669. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6670. {
  6671. maid.body0.LoadAnime(array[0] + ".anm",
  6672. GameUty.FileSystem,
  6673. array[0] + ".anm",
  6674. false,
  6675. false);
  6676. }
  6677. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6678. }
  6679. if (array.Length > 1)
  6680. {
  6681. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6682. isStop[i] = true;
  6683. if (array.Length > 2)
  6684. {
  6685. Transform transform2 =
  6686. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6687. isPoseIti[i] = true;
  6688. poseIti[i] = maidArray[i].transform.position;
  6689. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6690. }
  6691. }
  6692. }
  6693. }
  6694. }
  6695. }
  6696. goto IL_1688E;
  6697. }
  6698. }
  6699. if (Input.GetKeyDown(KeyCode.E)) { }
  6700. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6701. {
  6702. bGui = false;
  6703. }
  6704. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6705. {
  6706. sceneFlg = true;
  6707. kankyoToggle = false;
  6708. bGui = true;
  6709. if (!sceneManagerInitialize) InitializeSceneManager();
  6710. }
  6711. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6712. {
  6713. bgmIndex--;
  6714. if (bgmIndex <= -1)
  6715. {
  6716. bgmIndex = bgmArray.Length - 1;
  6717. }
  6718. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6719. bgmCombo.selectedItemIndex = bgmIndex;
  6720. }
  6721. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6722. {
  6723. bgmIndex++;
  6724. if (bgmIndex == bgmArray.Length)
  6725. {
  6726. bgmIndex = 0;
  6727. }
  6728. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6729. bgmCombo.selectedItemIndex = bgmIndex;
  6730. }
  6731. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6732. {
  6733. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6734. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6735. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6736. if (isMessage)
  6737. {
  6738. isMessage = false;
  6739. messageWindowMgr.CloseMessageWindowPanel();
  6740. }
  6741. else if (!bGuiMessage)
  6742. {
  6743. bGuiMessage = true;
  6744. }
  6745. else
  6746. {
  6747. bGuiMessage = false;
  6748. isMessage = false;
  6749. messageWindowMgr.CloseMessageWindowPanel();
  6750. }
  6751. }
  6752. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6753. {
  6754. escFlg = true;
  6755. for (int j = 0; j < maidCnt; j++)
  6756. {
  6757. if (maidArray[j] && maidArray[j].Visible)
  6758. {
  6759. maidArray[j].StopKuchipakuPattern();
  6760. if (isDanceStart7V)
  6761. {
  6762. maidArray[j].SetPos(dancePos[j]);
  6763. maidArray[j].body0.transform.localRotation = danceRot[j];
  6764. }
  6765. if (isDanceStart8V)
  6766. {
  6767. maidArray[j].SetPos(dancePos[j]);
  6768. maidArray[j].body0.transform.localRotation = danceRot[j];
  6769. }
  6770. if (isDanceStart11V)
  6771. {
  6772. maidArray[j].SetPos(dancePos[j]);
  6773. maidArray[j].body0.transform.localRotation = danceRot[j];
  6774. }
  6775. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6776. || isDanceStart13K)
  6777. {
  6778. maidArray[j].SetPos(dancePos[j]);
  6779. maidArray[j].body0.transform.localRotation = danceRot[j];
  6780. int i = j;
  6781. if (!isVR)
  6782. {
  6783. delCount[i] = 20;
  6784. if (goSlot[(int)selectList[i]] != null)
  6785. {
  6786. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6787. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6788. {
  6789. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6790. }
  6791. }
  6792. }
  6793. Maid maid = maidArray[j];
  6794. maid.DelProp(MPN.handitem, true);
  6795. maid.DelProp(MPN.accvag, true);
  6796. maid.DelProp(MPN.accanl, true);
  6797. maid.DelProp(MPN.kousoku_upper, true);
  6798. maid.DelProp(MPN.kousoku_lower, true);
  6799. maid.AllProcPropSeqStart();
  6800. }
  6801. if (isDanceStart14V)
  6802. {
  6803. maidArray[j].SetPos(dancePos[j]);
  6804. maidArray[j].body0.transform.localRotation = danceRot[j];
  6805. }
  6806. if (isDanceStart15V)
  6807. {
  6808. maidArray[j].SetPos(dancePos[j]);
  6809. maidArray[j].body0.transform.localRotation = danceRot[j];
  6810. }
  6811. }
  6812. }
  6813. isDanceStart1F = false;
  6814. isDanceStart1K = false;
  6815. isDanceStart2F = false;
  6816. isDanceStart3F = false;
  6817. isDanceStart3K = false;
  6818. isDanceStart4F = false;
  6819. isDanceStart4K = false;
  6820. isDanceStart5F = false;
  6821. isDanceStart5K = false;
  6822. isDanceStart6F = false;
  6823. isDanceStart6K = false;
  6824. isDanceStart7F = false;
  6825. isDanceStart7V = false;
  6826. isDanceStart8F = false;
  6827. isDanceStart8V = false;
  6828. isDanceStart8P = false;
  6829. isDanceStart9F = false;
  6830. isDanceStart9K = false;
  6831. isDanceStart10F = false;
  6832. isDanceStart11F = false;
  6833. isDanceStart11V = false;
  6834. isDanceStart12F = false;
  6835. isDanceStart13F = false;
  6836. isDanceStart13K = false;
  6837. isDanceStart14F = false;
  6838. isDanceStart14V = false;
  6839. isDanceStart15F = false;
  6840. isDanceStart15V = false;
  6841. for (int j = 0; j < maidCnt; j++)
  6842. {
  6843. danceFace[j] = 0f;
  6844. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6845. maidArray[j].SetAutoTwistAll(true);
  6846. }
  6847. danceCheckIndex = 0;
  6848. for (int k = 0; k < danceCheck.Length; k++)
  6849. {
  6850. danceCheck[danceCheckIndex] = 1f;
  6851. }
  6852. isDance = false;
  6853. isDanceChu = false;
  6854. if (maidArray[1] && maidArray[1].Visible)
  6855. {
  6856. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6857. {
  6858. Vector3 vector = Vector3.zero;
  6859. vector.x = 0.6f;
  6860. maidArray[1].SetPos(vector);
  6861. if (maidArray[2] && maidArray[2].Visible)
  6862. {
  6863. vector.x = -0.6f;
  6864. maidArray[2].SetPos(vector);
  6865. }
  6866. if (maidArray[3] && maidArray[3].Visible)
  6867. {
  6868. vector.x = 1.2f;
  6869. maidArray[3].SetPos(vector);
  6870. }
  6871. if (maidArray[4] && maidArray[4].Visible)
  6872. {
  6873. vector.x = -1.2f;
  6874. maidArray[4].SetPos(vector);
  6875. }
  6876. if (maidArray[5] && maidArray[5].Visible)
  6877. {
  6878. vector.x = 1.8f;
  6879. maidArray[5].SetPos(vector);
  6880. }
  6881. if (maidArray[6] && maidArray[6].Visible)
  6882. {
  6883. vector.x = -1.8f;
  6884. maidArray[6].SetPos(vector);
  6885. }
  6886. if (maidArray[7] && maidArray[7].Visible)
  6887. {
  6888. vector.x = 2.4f;
  6889. maidArray[7].SetPos(vector);
  6890. }
  6891. if (maidArray[8] && maidArray[8].Visible)
  6892. {
  6893. vector.x = -2.4f;
  6894. maidArray[8].SetPos(vector);
  6895. }
  6896. if (maidArray[9] && maidArray[9].Visible)
  6897. {
  6898. vector.x = 3f;
  6899. maidArray[9].SetPos(vector);
  6900. }
  6901. if (maidArray[10] && maidArray[10].Visible)
  6902. {
  6903. vector.x = -3f;
  6904. maidArray[10].SetPos(vector);
  6905. }
  6906. if (maidArray[11] && maidArray[11].Visible)
  6907. {
  6908. vector.x = 3.6f;
  6909. maidArray[11].SetPos(vector);
  6910. }
  6911. if (maidArray[12] && maidArray[12].Visible)
  6912. {
  6913. vector.x = -3.6f;
  6914. maidArray[12].SetPos(vector);
  6915. }
  6916. if (maidArray[13] && maidArray[13].Visible)
  6917. {
  6918. vector.x = 4.2f;
  6919. maidArray[13].SetPos(vector);
  6920. }
  6921. }
  6922. }
  6923. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6924. }
  6925. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6926. {
  6927. if (isScript)
  6928. {
  6929. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6930. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6931. if (isPanel)
  6932. {
  6933. isPanel = false;
  6934. }
  6935. else
  6936. {
  6937. isPanel = true;
  6938. }
  6939. gameObject5.SetActive(isPanel);
  6940. }
  6941. else
  6942. {
  6943. bGui = !bGui;
  6944. }
  6945. }
  6946. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6947. {
  6948. keyFlg = true;
  6949. bgIndex--;
  6950. if (bgIndex <= -1)
  6951. {
  6952. bgIndex = bgArray.Length - 1;
  6953. }
  6954. if (!moveBg)
  6955. {
  6956. bg.localScale = new Vector3(1f, 1f, 1f);
  6957. if (bgArray[bgIndex].Length == 36)
  6958. {
  6959. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6960. }
  6961. else
  6962. {
  6963. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6964. }
  6965. bgCombo.selectedItemIndex = bgIndex;
  6966. if (bgArray[bgIndex] == "karaokeroom")
  6967. {
  6968. bg.transform.position = bgObject.transform.position;
  6969. Vector3 vector = Vector3.zero;
  6970. Vector3 zero3 = Vector3.zero;
  6971. zero3.y = 90f;
  6972. vector.z = 4f;
  6973. vector.x = 1f;
  6974. bg.transform.localPosition = vector;
  6975. bg.transform.localRotation = Quaternion.Euler(zero3);
  6976. }
  6977. }
  6978. }
  6979. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6980. {
  6981. keyFlg = true;
  6982. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6983. }
  6984. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6985. {
  6986. keyFlg = true;
  6987. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6988. }
  6989. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6990. {
  6991. keyFlg = true;
  6992. bg.localScale = new Vector3(1f, 1f, 1f);
  6993. }
  6994. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6995. {
  6996. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6997. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6998. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6999. Vector3 vector = bg.position;
  7000. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7001. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7002. bg.localPosition = vector;
  7003. if (Input.GetKey(KeyCode.Y))
  7004. {
  7005. keyFlg = true;
  7006. }
  7007. }
  7008. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7009. {
  7010. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7011. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7012. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7013. Vector3 vector = bg.position;
  7014. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7015. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7016. bg.localPosition = vector;
  7017. if (Input.GetKey(KeyCode.Y))
  7018. {
  7019. keyFlg = true;
  7020. }
  7021. }
  7022. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7023. {
  7024. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7025. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7026. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7027. Vector3 vector = bg.position;
  7028. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7029. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7030. bg.localPosition = vector;
  7031. if (Input.GetKey(KeyCode.Y))
  7032. {
  7033. keyFlg = true;
  7034. }
  7035. }
  7036. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7037. {
  7038. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7039. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7040. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7041. Vector3 vector = bg.position;
  7042. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7043. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7044. bg.localPosition = vector;
  7045. if (Input.GetKey(KeyCode.Y))
  7046. {
  7047. keyFlg = true;
  7048. }
  7049. }
  7050. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7051. {
  7052. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7053. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7054. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7055. Vector3 vector = bg.position;
  7056. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7057. bg.localPosition = vector;
  7058. if (Input.GetKey(KeyCode.Y))
  7059. {
  7060. keyFlg = true;
  7061. }
  7062. }
  7063. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7064. {
  7065. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7066. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7067. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7068. Vector3 vector = bg.position;
  7069. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7070. bg.localPosition = vector;
  7071. if (Input.GetKey(KeyCode.Y))
  7072. {
  7073. keyFlg = true;
  7074. }
  7075. }
  7076. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7077. {
  7078. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7079. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7080. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7081. Vector3 vector = bg.position;
  7082. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7083. bg.localPosition = vector;
  7084. if (Input.GetKey(KeyCode.Y))
  7085. {
  7086. keyFlg = true;
  7087. }
  7088. }
  7089. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7090. {
  7091. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7092. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7093. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7094. Vector3 vector = bg.position;
  7095. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7096. bg.localPosition = vector;
  7097. if (Input.GetKey(KeyCode.Y))
  7098. {
  7099. keyFlg = true;
  7100. }
  7101. }
  7102. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7103. {
  7104. Vector3 vector = bg.position;
  7105. vector.y -= 0.015f * speed;
  7106. bg.localPosition = vector;
  7107. if (Input.GetKey(KeyCode.Y))
  7108. {
  7109. keyFlg = true;
  7110. }
  7111. }
  7112. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  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.U))
  7123. {
  7124. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7125. if (Input.GetKey(KeyCode.Y))
  7126. {
  7127. keyFlg = true;
  7128. }
  7129. }
  7130. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7131. {
  7132. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7133. if (Input.GetKey(KeyCode.Y))
  7134. {
  7135. keyFlg = true;
  7136. }
  7137. }
  7138. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7139. {
  7140. if (Input.GetKey(KeyCode.Y))
  7141. {
  7142. keyFlg = true;
  7143. }
  7144. }
  7145. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7146. {
  7147. if (keyFlg)
  7148. {
  7149. keyFlg = false;
  7150. }
  7151. else
  7152. {
  7153. bgIndex++;
  7154. if (bgIndex == bgArray.Length)
  7155. {
  7156. bgIndex = 0;
  7157. }
  7158. if (!moveBg)
  7159. {
  7160. bg.localScale = new Vector3(1f, 1f, 1f);
  7161. if (bgArray[bgIndex].Length == 36)
  7162. {
  7163. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7164. }
  7165. else
  7166. {
  7167. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7168. }
  7169. bgCombo.selectedItemIndex = bgIndex;
  7170. if (bgArray[bgIndex] == "karaokeroom")
  7171. {
  7172. bg.transform.position = bgObject.transform.position;
  7173. Vector3 vector = Vector3.zero;
  7174. Vector3 zero3 = Vector3.zero;
  7175. zero3.y = 90f;
  7176. vector.z = 4f;
  7177. vector.x = 1f;
  7178. bg.transform.localPosition = vector;
  7179. bg.transform.localRotation = Quaternion.Euler(zero3);
  7180. }
  7181. }
  7182. }
  7183. }
  7184. if (maidArray[0] != null && maidArray[0].Visible)
  7185. {
  7186. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7187. {
  7188. int[] array6 = new int[1];
  7189. int[] array7 = array6;
  7190. if (maidCnt == 2)
  7191. {
  7192. array7 = new int[] { 0, 1 };
  7193. }
  7194. if (maidCnt == 3)
  7195. {
  7196. array7 = new int[] { 0, 1, 2 };
  7197. }
  7198. if (maidCnt == 4)
  7199. {
  7200. array7 = new int[] { 0, 1, 2, 3 };
  7201. }
  7202. if (maidCnt == 5)
  7203. {
  7204. array7 = new int[] { 0, 1, 2, 3, 4 };
  7205. }
  7206. if (maidCnt == 6)
  7207. {
  7208. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7209. }
  7210. if (maidCnt == 7)
  7211. {
  7212. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7213. }
  7214. if (maidCnt == 8)
  7215. {
  7216. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7217. }
  7218. if (maidCnt == 9)
  7219. {
  7220. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7221. }
  7222. if (maidCnt == 10)
  7223. {
  7224. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7225. }
  7226. if (maidCnt == 11)
  7227. {
  7228. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7229. }
  7230. if (maidCnt == 12)
  7231. {
  7232. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7233. }
  7234. Random random = new Random();
  7235. int n = array7.Length;
  7236. while (n > 1)
  7237. {
  7238. n--;
  7239. int j = random.Next(n + 1);
  7240. int num8 = array7[j];
  7241. array7[j] = array7[n];
  7242. array7[n] = num8;
  7243. }
  7244. int[] array8 = new int[maidCnt];
  7245. Vector3[] array9 = new Vector3[maidCnt];
  7246. Vector3[] array10 = new Vector3[maidCnt];
  7247. int[] array11 = new int[maidCnt];
  7248. for (int i = 0; i < maidCnt; i++)
  7249. {
  7250. array8[array7[i]] = poseIndex[array7[i]];
  7251. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7252. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7253. array11[array7[i]] = headEyeIndex[array7[i]];
  7254. }
  7255. for (int i = 0; i < maidCnt; i++)
  7256. {
  7257. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7258. {
  7259. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7260. isStop[i] = false;
  7261. poseCount[i] = 20;
  7262. Maid maid = maidArray[i];
  7263. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7264. {
  7265. maid.body0.MuneYureL(0f);
  7266. maid.body0.MuneYureR(0f);
  7267. }
  7268. else
  7269. {
  7270. maid.body0.MuneYureL(1f);
  7271. maid.body0.MuneYureR(1f);
  7272. }
  7273. if (array12[0].Contains("MultipleMaidsPose"))
  7274. {
  7275. string path = array12[0].Split(new char[] { '/' })[1];
  7276. byte[] array2 = new byte[0];
  7277. try
  7278. {
  7279. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7280. {
  7281. array2 = new byte[fileStream.Length];
  7282. fileStream.Read(array2, 0, array2.Length);
  7283. }
  7284. }
  7285. catch { }
  7286. if (0 < array2.Length)
  7287. {
  7288. string text = Path.GetFileName(path);
  7289. long num5 = text.GetHashCode();
  7290. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7291. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7292. {
  7293. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7294. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7295. };
  7296. for (int m = 0; m < array3.Length; m++)
  7297. {
  7298. maid.SetAutoTwist(array3[m], true);
  7299. }
  7300. }
  7301. }
  7302. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7303. {
  7304. loadPose[i] = array12[0];
  7305. }
  7306. else if (!array12[0].StartsWith("dance_"))
  7307. {
  7308. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7309. }
  7310. else
  7311. {
  7312. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7313. {
  7314. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7315. GameUty.FileSystem,
  7316. array12[0] + ".anm",
  7317. false,
  7318. false);
  7319. }
  7320. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7321. }
  7322. if (array12.Length > 1)
  7323. {
  7324. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7325. float.Parse(array12[1]);
  7326. isStop[i] = true;
  7327. if (array12.Length > 2)
  7328. {
  7329. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7330. isPoseIti[i] = true;
  7331. poseIti[i] = maidArray[i].transform.position;
  7332. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7333. }
  7334. }
  7335. }
  7336. poseIndex[i] = array8[array7[i]];
  7337. maidArray[i].SetRot(array9[array7[i]]);
  7338. maidArray[i].SetPos(array10[array7[i]]);
  7339. headEyeIndex[i] = array11[array7[i]];
  7340. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7341. maidArray[i].body0.boHeadToCam = true;
  7342. maidArray[i].body0.boEyeToCam = true;
  7343. if (headEyeIndex[i] == 0)
  7344. {
  7345. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7346. maidArray[i].body0.boHeadToCam = true;
  7347. maidArray[i].body0.boEyeToCam = true;
  7348. }
  7349. else
  7350. {
  7351. maidArray[i].body0.trsLookTarget = null;
  7352. if (headEyeIndex[i] == 1)
  7353. {
  7354. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7355. }
  7356. if (headEyeIndex[i] == 2)
  7357. {
  7358. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7359. }
  7360. if (headEyeIndex[i] == 3)
  7361. {
  7362. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7363. }
  7364. if (headEyeIndex[i] == 4)
  7365. {
  7366. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7367. }
  7368. if (headEyeIndex[i] == 5)
  7369. {
  7370. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7371. }
  7372. if (headEyeIndex[i] == 6)
  7373. {
  7374. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7375. }
  7376. if (headEyeIndex[i] == 7)
  7377. {
  7378. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7379. }
  7380. if (headEyeIndex[i] == 8)
  7381. {
  7382. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7383. }
  7384. if (headEyeIndex[i] == 9)
  7385. {
  7386. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7387. }
  7388. }
  7389. }
  7390. }
  7391. else if (Input.GetKeyDown(KeyCode.Comma))
  7392. {
  7393. int[] array8 = new int[maidCnt];
  7394. Vector3[] array9 = new Vector3[maidCnt];
  7395. Vector3[] array10 = new Vector3[maidCnt];
  7396. int[] array11 = new int[maidCnt];
  7397. for (int i = 0; i < maidCnt; i++)
  7398. {
  7399. array8[i] = poseIndex[i];
  7400. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7401. array10[i] = maidArray[i].transform.position;
  7402. array11[i] = headEyeIndex[i];
  7403. }
  7404. for (int i = 0; i < maidCnt; i++)
  7405. {
  7406. if (i == 0)
  7407. {
  7408. if (!isLock[i])
  7409. {
  7410. if (maidArray[i] && maidArray[i].Visible)
  7411. {
  7412. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7413. isStop[i] = false;
  7414. poseCount[i] = 20;
  7415. Maid maid = maidArray[i];
  7416. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7417. {
  7418. maid.body0.MuneYureL(0f);
  7419. maid.body0.MuneYureR(0f);
  7420. }
  7421. else
  7422. {
  7423. maid.body0.MuneYureL(1f);
  7424. maid.body0.MuneYureR(1f);
  7425. }
  7426. if (array12[0].Contains("MultipleMaidsPose"))
  7427. {
  7428. string path = array12[0].Split(new char[] { '/' })[1];
  7429. byte[] array2 = new byte[0];
  7430. try
  7431. {
  7432. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7433. {
  7434. array2 = new byte[fileStream.Length];
  7435. fileStream.Read(array2, 0, array2.Length);
  7436. }
  7437. }
  7438. catch { }
  7439. if (0 < array2.Length)
  7440. {
  7441. string text = Path.GetFileName(path);
  7442. long num5 = text.GetHashCode();
  7443. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7444. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7445. {
  7446. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7447. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7448. };
  7449. for (int m = 0; m < array3.Length; m++)
  7450. {
  7451. maid.SetAutoTwist(array3[m], true);
  7452. }
  7453. }
  7454. }
  7455. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7456. {
  7457. loadPose[i] = array12[0];
  7458. }
  7459. else if (!array12[0].StartsWith("dance_"))
  7460. {
  7461. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7462. }
  7463. else
  7464. {
  7465. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7466. {
  7467. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7468. GameUty.FileSystem,
  7469. array12[0] + ".anm",
  7470. false,
  7471. false);
  7472. }
  7473. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7474. }
  7475. if (array12.Length > 1)
  7476. {
  7477. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7478. float.Parse(array12[1]);
  7479. isStop[i] = true;
  7480. if (array12.Length > 2)
  7481. {
  7482. Transform transform2 =
  7483. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7484. isPoseIti[i] = true;
  7485. poseIti[i] = maidArray[i].transform.position;
  7486. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7487. }
  7488. }
  7489. }
  7490. }
  7491. poseIndex[i] = array8[maidCnt - i - 1];
  7492. headEyeIndex[i] = array11[maidCnt - i - 1];
  7493. }
  7494. else
  7495. {
  7496. if (!isLock[i])
  7497. {
  7498. if (maidArray[i] && maidArray[i].Visible)
  7499. {
  7500. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7501. isStop[i] = false;
  7502. poseCount[i] = 20;
  7503. Maid maid = maidArray[i];
  7504. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7505. {
  7506. maid.body0.MuneYureL(0f);
  7507. maid.body0.MuneYureR(0f);
  7508. }
  7509. else
  7510. {
  7511. maid.body0.MuneYureL(1f);
  7512. maid.body0.MuneYureR(1f);
  7513. }
  7514. if (array12[0].Contains("MultipleMaidsPose"))
  7515. {
  7516. string path = array12[0].Split(new char[] { '/' })[1];
  7517. byte[] array2 = new byte[0];
  7518. try
  7519. {
  7520. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7521. {
  7522. array2 = new byte[fileStream.Length];
  7523. fileStream.Read(array2, 0, array2.Length);
  7524. }
  7525. }
  7526. catch { }
  7527. if (0 < array2.Length)
  7528. {
  7529. string text = Path.GetFileName(path);
  7530. long num5 = text.GetHashCode();
  7531. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7532. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7533. {
  7534. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7535. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7536. };
  7537. for (int m = 0; m < array3.Length; m++)
  7538. {
  7539. maid.SetAutoTwist(array3[m], true);
  7540. }
  7541. }
  7542. }
  7543. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7544. {
  7545. loadPose[i] = array12[0];
  7546. }
  7547. else if (!array12[0].StartsWith("dance_"))
  7548. {
  7549. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7550. }
  7551. else
  7552. {
  7553. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7554. {
  7555. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7556. GameUty.FileSystem,
  7557. array12[0] + ".anm",
  7558. false,
  7559. false);
  7560. }
  7561. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7562. }
  7563. if (array12.Length > 1)
  7564. {
  7565. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7566. float.Parse(array12[1]);
  7567. isStop[i] = true;
  7568. if (array12.Length > 2)
  7569. {
  7570. Transform transform2 =
  7571. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7572. isPoseIti[i] = true;
  7573. poseIti[i] = maidArray[i].transform.position;
  7574. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7575. }
  7576. }
  7577. }
  7578. }
  7579. poseIndex[i] = array8[i - 1];
  7580. headEyeIndex[i] = array11[i - 1];
  7581. }
  7582. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7583. maidArray[i].body0.boHeadToCam = true;
  7584. maidArray[i].body0.boEyeToCam = true;
  7585. if (headEyeIndex[i] == 0)
  7586. {
  7587. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7588. maidArray[i].body0.boHeadToCam = true;
  7589. maidArray[i].body0.boEyeToCam = true;
  7590. }
  7591. else
  7592. {
  7593. maidArray[i].body0.trsLookTarget = null;
  7594. if (headEyeIndex[i] == 1)
  7595. {
  7596. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7597. }
  7598. if (headEyeIndex[i] == 2)
  7599. {
  7600. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7601. }
  7602. if (headEyeIndex[i] == 3)
  7603. {
  7604. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7605. }
  7606. if (headEyeIndex[i] == 4)
  7607. {
  7608. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7609. }
  7610. if (headEyeIndex[i] == 5)
  7611. {
  7612. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7613. }
  7614. if (headEyeIndex[i] == 6)
  7615. {
  7616. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7617. }
  7618. if (headEyeIndex[i] == 7)
  7619. {
  7620. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7621. }
  7622. if (headEyeIndex[i] == 8)
  7623. {
  7624. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7625. }
  7626. if (headEyeIndex[i] == 9)
  7627. {
  7628. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7629. }
  7630. }
  7631. if (i == 0)
  7632. {
  7633. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7634. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7635. }
  7636. else
  7637. {
  7638. maidArray[i].SetRot(array9[i - 1]);
  7639. maidArray[i].SetPos(array10[i - 1]);
  7640. }
  7641. }
  7642. }
  7643. for (int i = 0; i < maidCnt; i++)
  7644. {
  7645. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7646. {
  7647. if (maidArray[i] && maidArray[i].Visible)
  7648. {
  7649. maidArray[i].body0.transform.localRotation =
  7650. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7651. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7652. }
  7653. }
  7654. else if (Input.GetKey(KeyCode.B))
  7655. {
  7656. if (maidArray[i] && maidArray[i].Visible)
  7657. {
  7658. maidArray[i].body0.transform.localRotation =
  7659. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7660. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7661. }
  7662. }
  7663. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7664. {
  7665. if (maidArray[1] && maidArray[1].Visible)
  7666. {
  7667. if (maidArray[0].transform.position == maidArray[1].transform.position
  7668. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7669. {
  7670. Vector3 vector = Vector3.zero;
  7671. vector.x = 0.6f;
  7672. maidArray[1].SetPos(vector);
  7673. if (maidArray[2] && maidArray[2].Visible)
  7674. {
  7675. vector.x = -0.6f;
  7676. maidArray[2].SetPos(vector);
  7677. }
  7678. if (maidArray[3] && maidArray[3].Visible)
  7679. {
  7680. vector.x = 1.2f;
  7681. maidArray[3].SetPos(vector);
  7682. }
  7683. if (maidArray[4] && maidArray[4].Visible)
  7684. {
  7685. vector.x = -1.2f;
  7686. maidArray[4].SetPos(vector);
  7687. }
  7688. if (maidArray[5] && maidArray[5].Visible)
  7689. {
  7690. vector.x = 1.8f;
  7691. maidArray[5].SetPos(vector);
  7692. }
  7693. if (maidArray[6] && maidArray[6].Visible)
  7694. {
  7695. vector.x = -1.8f;
  7696. maidArray[6].SetPos(vector);
  7697. }
  7698. if (maidArray[7] && maidArray[7].Visible)
  7699. {
  7700. vector.x = 2.4f;
  7701. maidArray[7].SetPos(vector);
  7702. }
  7703. if (maidArray[8] && maidArray[8].Visible)
  7704. {
  7705. vector.x = -2.4f;
  7706. maidArray[8].SetPos(vector);
  7707. }
  7708. if (maidArray[9] && maidArray[9].Visible)
  7709. {
  7710. vector.x = 3f;
  7711. maidArray[9].SetPos(vector);
  7712. }
  7713. if (maidArray[10] && maidArray[10].Visible)
  7714. {
  7715. vector.x = -3f;
  7716. maidArray[10].SetPos(vector);
  7717. }
  7718. if (maidArray[11] && maidArray[11].Visible)
  7719. {
  7720. vector.x = 3.6f;
  7721. maidArray[11].SetPos(vector);
  7722. }
  7723. if (maidArray[12] && maidArray[12].Visible)
  7724. {
  7725. vector.x = -3.6f;
  7726. maidArray[12].SetPos(vector);
  7727. }
  7728. if (maidArray[13] && maidArray[13].Visible)
  7729. {
  7730. vector.x = 4.2f;
  7731. maidArray[13].SetPos(vector);
  7732. }
  7733. }
  7734. }
  7735. for (int k = 0; k < groupList.Count; k++)
  7736. {
  7737. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7738. {
  7739. if (poseIndex[i] == 0)
  7740. {
  7741. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7742. }
  7743. else
  7744. {
  7745. poseIndex[i] = 0;
  7746. }
  7747. break;
  7748. }
  7749. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7750. {
  7751. poseIndex[i] = (int)groupList[k - 1];
  7752. break;
  7753. }
  7754. }
  7755. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7756. {
  7757. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7758. }
  7759. if (maidArray[i] && maidArray[i].Visible)
  7760. {
  7761. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7762. isStop[i] = false;
  7763. poseCount[i] = 20;
  7764. Maid maid = maidArray[i];
  7765. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7766. {
  7767. maid.body0.MuneYureL(0f);
  7768. maid.body0.MuneYureR(0f);
  7769. }
  7770. else
  7771. {
  7772. maid.body0.MuneYureL(1f);
  7773. maid.body0.MuneYureR(1f);
  7774. }
  7775. if (array[0].Contains("MultipleMaidsPose"))
  7776. {
  7777. string path = array[0].Split(new char[] { '/' })[1];
  7778. byte[] array2 = new byte[0];
  7779. try
  7780. {
  7781. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7782. {
  7783. array2 = new byte[fileStream.Length];
  7784. fileStream.Read(array2, 0, array2.Length);
  7785. }
  7786. }
  7787. catch { }
  7788. if (0 < array2.Length)
  7789. {
  7790. string text = Path.GetFileName(path);
  7791. long num5 = text.GetHashCode();
  7792. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7793. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7794. {
  7795. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7796. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7797. };
  7798. for (int m = 0; m < array3.Length; m++)
  7799. {
  7800. maid.SetAutoTwist(array3[m], true);
  7801. }
  7802. }
  7803. }
  7804. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7805. {
  7806. loadPose[i] = array[0];
  7807. }
  7808. else if (!array[0].StartsWith("dance_"))
  7809. {
  7810. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7811. }
  7812. else
  7813. {
  7814. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7815. {
  7816. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7817. GameUty.FileSystem,
  7818. array[0] + ".anm",
  7819. false,
  7820. false);
  7821. }
  7822. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7823. }
  7824. if (array.Length > 1)
  7825. {
  7826. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7827. isStop[i] = true;
  7828. if (array.Length > 2)
  7829. {
  7830. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7831. isPoseIti[i] = true;
  7832. poseIti[i] = maidArray[i].transform.position;
  7833. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7834. }
  7835. }
  7836. }
  7837. }
  7838. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7839. {
  7840. if (maidArray[1] && maidArray[1].Visible)
  7841. {
  7842. if (maidArray[0].transform.position == maidArray[1].transform.position
  7843. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7844. {
  7845. Vector3 vector = Vector3.zero;
  7846. vector.x = 0.6f;
  7847. maidArray[1].SetPos(vector);
  7848. if (maidArray[2] && maidArray[2].Visible)
  7849. {
  7850. vector.x = -0.6f;
  7851. maidArray[2].SetPos(vector);
  7852. }
  7853. if (maidArray[3] && maidArray[3].Visible)
  7854. {
  7855. vector.x = 1.2f;
  7856. maidArray[3].SetPos(vector);
  7857. }
  7858. if (maidArray[4] && maidArray[4].Visible)
  7859. {
  7860. vector.x = -1.2f;
  7861. maidArray[4].SetPos(vector);
  7862. }
  7863. if (maidArray[5] && maidArray[5].Visible)
  7864. {
  7865. vector.x = 1.8f;
  7866. maidArray[5].SetPos(vector);
  7867. }
  7868. if (maidArray[6] && maidArray[6].Visible)
  7869. {
  7870. vector.x = -1.8f;
  7871. maidArray[6].SetPos(vector);
  7872. }
  7873. if (maidArray[7] && maidArray[7].Visible)
  7874. {
  7875. vector.x = 2.4f;
  7876. maidArray[7].SetPos(vector);
  7877. }
  7878. if (maidArray[8] && maidArray[8].Visible)
  7879. {
  7880. vector.x = -2.4f;
  7881. maidArray[8].SetPos(vector);
  7882. }
  7883. if (maidArray[9] && maidArray[9].Visible)
  7884. {
  7885. vector.x = 3f;
  7886. maidArray[9].SetPos(vector);
  7887. }
  7888. if (maidArray[10] && maidArray[10].Visible)
  7889. {
  7890. vector.x = -3f;
  7891. maidArray[10].SetPos(vector);
  7892. }
  7893. if (maidArray[11] && maidArray[11].Visible)
  7894. {
  7895. vector.x = 3.6f;
  7896. maidArray[11].SetPos(vector);
  7897. }
  7898. if (maidArray[12] && maidArray[12].Visible)
  7899. {
  7900. vector.x = -3.6f;
  7901. maidArray[12].SetPos(vector);
  7902. }
  7903. if (maidArray[13] && maidArray[13].Visible)
  7904. {
  7905. vector.x = 4.2f;
  7906. maidArray[13].SetPos(vector);
  7907. }
  7908. }
  7909. }
  7910. int num7 = poseIndex[i];
  7911. for (int k = 0; k < groupList.Count; k++)
  7912. {
  7913. if (poseIndex[i] < (int)groupList[k])
  7914. {
  7915. poseIndex[i] = (int)groupList[k];
  7916. break;
  7917. }
  7918. }
  7919. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7920. {
  7921. poseIndex[i] = 0;
  7922. }
  7923. if (maidArray[i] && maidArray[i].Visible)
  7924. {
  7925. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7926. isStop[i] = false;
  7927. poseCount[i] = 20;
  7928. Maid maid = maidArray[i];
  7929. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7930. {
  7931. maid.body0.MuneYureL(0f);
  7932. maid.body0.MuneYureR(0f);
  7933. }
  7934. else
  7935. {
  7936. maid.body0.MuneYureL(1f);
  7937. maid.body0.MuneYureR(1f);
  7938. }
  7939. if (array[0].Contains("MultipleMaidsPose"))
  7940. {
  7941. string path = array[0].Split(new char[] { '/' })[1];
  7942. byte[] array2 = new byte[0];
  7943. try
  7944. {
  7945. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7946. {
  7947. array2 = new byte[fileStream.Length];
  7948. fileStream.Read(array2, 0, array2.Length);
  7949. }
  7950. }
  7951. catch { }
  7952. if (0 < array2.Length)
  7953. {
  7954. string text = Path.GetFileName(path);
  7955. long num5 = text.GetHashCode();
  7956. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7957. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7958. {
  7959. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7960. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7961. };
  7962. for (int m = 0; m < array3.Length; m++)
  7963. {
  7964. maid.SetAutoTwist(array3[m], true);
  7965. }
  7966. }
  7967. }
  7968. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7969. {
  7970. loadPose[i] = array[0];
  7971. }
  7972. else if (!array[0].StartsWith("dance_"))
  7973. {
  7974. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7975. }
  7976. else
  7977. {
  7978. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7979. {
  7980. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7981. GameUty.FileSystem,
  7982. array[0] + ".anm",
  7983. false,
  7984. false);
  7985. }
  7986. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7987. }
  7988. if (array.Length > 1)
  7989. {
  7990. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7991. isStop[i] = true;
  7992. if (array.Length > 2)
  7993. {
  7994. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7995. isPoseIti[i] = true;
  7996. poseIti[i] = maidArray[i].transform.position;
  7997. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7998. }
  7999. }
  8000. }
  8001. }
  8002. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8003. {
  8004. if (maidArray[1] && maidArray[1].Visible)
  8005. {
  8006. if (maidArray[0].transform.position == maidArray[1].transform.position
  8007. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8008. {
  8009. Vector3 vector = Vector3.zero;
  8010. vector.x = 0.6f;
  8011. maidArray[1].SetPos(vector);
  8012. if (maidArray[2] && maidArray[2].Visible)
  8013. {
  8014. vector.x = -0.6f;
  8015. maidArray[2].SetPos(vector);
  8016. }
  8017. if (maidArray[3] && maidArray[3].Visible)
  8018. {
  8019. vector.x = 1.2f;
  8020. maidArray[3].SetPos(vector);
  8021. }
  8022. if (maidArray[4] && maidArray[4].Visible)
  8023. {
  8024. vector.x = -1.2f;
  8025. maidArray[4].SetPos(vector);
  8026. }
  8027. if (maidArray[5] && maidArray[5].Visible)
  8028. {
  8029. vector.x = 1.8f;
  8030. maidArray[5].SetPos(vector);
  8031. }
  8032. if (maidArray[6] && maidArray[6].Visible)
  8033. {
  8034. vector.x = -1.8f;
  8035. maidArray[6].SetPos(vector);
  8036. }
  8037. if (maidArray[7] && maidArray[7].Visible)
  8038. {
  8039. vector.x = 2.4f;
  8040. maidArray[7].SetPos(vector);
  8041. }
  8042. if (maidArray[8] && maidArray[8].Visible)
  8043. {
  8044. vector.x = -2.4f;
  8045. maidArray[8].SetPos(vector);
  8046. }
  8047. if (maidArray[9] && maidArray[9].Visible)
  8048. {
  8049. vector.x = 3f;
  8050. maidArray[9].SetPos(vector);
  8051. }
  8052. if (maidArray[10] && maidArray[10].Visible)
  8053. {
  8054. vector.x = -3f;
  8055. maidArray[10].SetPos(vector);
  8056. }
  8057. if (maidArray[11] && maidArray[11].Visible)
  8058. {
  8059. vector.x = 3.6f;
  8060. maidArray[11].SetPos(vector);
  8061. }
  8062. if (maidArray[12] && maidArray[12].Visible)
  8063. {
  8064. vector.x = -3.6f;
  8065. maidArray[12].SetPos(vector);
  8066. }
  8067. if (maidArray[13] && maidArray[13].Visible)
  8068. {
  8069. vector.x = 4.2f;
  8070. maidArray[13].SetPos(vector);
  8071. }
  8072. }
  8073. }
  8074. poseIndex[i]--;
  8075. if (poseIndex[i] <= -1)
  8076. {
  8077. poseIndex[i] = poseArray.Length - 1;
  8078. }
  8079. if (maidArray[i] && maidArray[i].Visible)
  8080. {
  8081. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8082. isStop[i] = false;
  8083. poseCount[i] = 20;
  8084. Maid maid = maidArray[i];
  8085. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8086. {
  8087. maid.body0.MuneYureL(0f);
  8088. maid.body0.MuneYureR(0f);
  8089. }
  8090. else
  8091. {
  8092. maid.body0.MuneYureL(1f);
  8093. maid.body0.MuneYureR(1f);
  8094. }
  8095. if (array[0].Contains("MultipleMaidsPose"))
  8096. {
  8097. string path = array[0].Split(new char[] { '/' })[1];
  8098. byte[] array2 = new byte[0];
  8099. try
  8100. {
  8101. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8102. {
  8103. array2 = new byte[fileStream.Length];
  8104. fileStream.Read(array2, 0, array2.Length);
  8105. }
  8106. }
  8107. catch { }
  8108. if (0 < array2.Length)
  8109. {
  8110. string text = Path.GetFileName(path);
  8111. long num5 = text.GetHashCode();
  8112. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8113. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8114. {
  8115. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8116. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8117. };
  8118. for (int m = 0; m < array3.Length; m++)
  8119. {
  8120. maid.SetAutoTwist(array3[m], true);
  8121. }
  8122. }
  8123. }
  8124. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8125. {
  8126. loadPose[i] = array[0];
  8127. }
  8128. else if (!array[0].StartsWith("dance_"))
  8129. {
  8130. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8131. }
  8132. else
  8133. {
  8134. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8135. {
  8136. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8137. GameUty.FileSystem,
  8138. array[0] + ".anm",
  8139. false,
  8140. false);
  8141. }
  8142. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8143. }
  8144. if (array.Length > 1)
  8145. {
  8146. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8147. isStop[i] = true;
  8148. if (array.Length > 2)
  8149. {
  8150. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8151. isPoseIti[i] = true;
  8152. poseIti[i] = maidArray[i].transform.position;
  8153. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8154. }
  8155. }
  8156. }
  8157. }
  8158. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8159. {
  8160. if (maidArray[1] && maidArray[1].Visible)
  8161. {
  8162. if (maidArray[0].transform.position == maidArray[1].transform.position
  8163. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8164. {
  8165. Vector3 vector = Vector3.zero;
  8166. vector.x = 0.6f;
  8167. maidArray[1].SetPos(vector);
  8168. if (maidArray[2] && maidArray[2].Visible)
  8169. {
  8170. vector.x = -0.6f;
  8171. maidArray[2].SetPos(vector);
  8172. }
  8173. if (maidArray[3] && maidArray[3].Visible)
  8174. {
  8175. vector.x = 1.2f;
  8176. maidArray[3].SetPos(vector);
  8177. }
  8178. if (maidArray[4] && maidArray[4].Visible)
  8179. {
  8180. vector.x = -1.2f;
  8181. maidArray[4].SetPos(vector);
  8182. }
  8183. if (maidArray[5] && maidArray[5].Visible)
  8184. {
  8185. vector.x = 1.8f;
  8186. maidArray[5].SetPos(vector);
  8187. }
  8188. if (maidArray[6] && maidArray[6].Visible)
  8189. {
  8190. vector.x = -1.8f;
  8191. maidArray[6].SetPos(vector);
  8192. }
  8193. if (maidArray[7] && maidArray[7].Visible)
  8194. {
  8195. vector.x = 2.4f;
  8196. maidArray[7].SetPos(vector);
  8197. }
  8198. if (maidArray[8] && maidArray[8].Visible)
  8199. {
  8200. vector.x = -2.4f;
  8201. maidArray[8].SetPos(vector);
  8202. }
  8203. if (maidArray[9] && maidArray[9].Visible)
  8204. {
  8205. vector.x = 3f;
  8206. maidArray[9].SetPos(vector);
  8207. }
  8208. if (maidArray[10] && maidArray[10].Visible)
  8209. {
  8210. vector.x = -3f;
  8211. maidArray[10].SetPos(vector);
  8212. }
  8213. if (maidArray[11] && maidArray[11].Visible)
  8214. {
  8215. vector.x = 3.6f;
  8216. maidArray[11].SetPos(vector);
  8217. }
  8218. if (maidArray[12] && maidArray[12].Visible)
  8219. {
  8220. vector.x = -3.6f;
  8221. maidArray[12].SetPos(vector);
  8222. }
  8223. if (maidArray[13] && maidArray[13].Visible)
  8224. {
  8225. vector.x = 4.2f;
  8226. maidArray[13].SetPos(vector);
  8227. }
  8228. }
  8229. }
  8230. poseIndex[i]++;
  8231. if (poseIndex[i] == poseArray.Length)
  8232. {
  8233. poseIndex[i] = 0;
  8234. }
  8235. if (maidArray[i] && maidArray[i].Visible)
  8236. {
  8237. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8238. isStop[i] = false;
  8239. poseCount[i] = 20;
  8240. Maid maid = maidArray[i];
  8241. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8242. {
  8243. maid.body0.MuneYureL(0f);
  8244. maid.body0.MuneYureR(0f);
  8245. }
  8246. else
  8247. {
  8248. maid.body0.MuneYureL(1f);
  8249. maid.body0.MuneYureR(1f);
  8250. }
  8251. if (array[0].Contains("MultipleMaidsPose"))
  8252. {
  8253. string path = array[0].Split(new char[] { '/' })[1];
  8254. byte[] array2 = new byte[0];
  8255. try
  8256. {
  8257. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8258. {
  8259. array2 = new byte[fileStream.Length];
  8260. fileStream.Read(array2, 0, array2.Length);
  8261. }
  8262. }
  8263. catch { }
  8264. if (0 < array2.Length)
  8265. {
  8266. string text = Path.GetFileName(path);
  8267. long num5 = text.GetHashCode();
  8268. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8269. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8270. {
  8271. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8272. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8273. };
  8274. for (int m = 0; m < array3.Length; m++)
  8275. {
  8276. maid.SetAutoTwist(array3[m], true);
  8277. }
  8278. }
  8279. }
  8280. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8281. {
  8282. loadPose[i] = array[0];
  8283. }
  8284. else if (!array[0].StartsWith("dance_"))
  8285. {
  8286. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8287. }
  8288. else
  8289. {
  8290. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8291. {
  8292. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8293. GameUty.FileSystem,
  8294. array[0] + ".anm",
  8295. false,
  8296. false);
  8297. }
  8298. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8299. }
  8300. if (array.Length > 1)
  8301. {
  8302. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8303. isStop[i] = true;
  8304. if (array.Length > 2)
  8305. {
  8306. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8307. isPoseIti[i] = true;
  8308. poseIti[i] = maidArray[i].transform.position;
  8309. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8310. }
  8311. }
  8312. }
  8313. }
  8314. }
  8315. }
  8316. if (isDanceChu)
  8317. {
  8318. for (int j = 0; j < maidCnt; j++)
  8319. {
  8320. if (maidArray[j] && maidArray[j].Visible)
  8321. {
  8322. string text2 = danceName[j];
  8323. float num = 0f;
  8324. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8325. || text2 == "dance_cm3d_004_kano_f1.anm")
  8326. {
  8327. num = 0.166666f;
  8328. }
  8329. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8330. {
  8331. num = -0.35f;
  8332. }
  8333. if (text2 != null)
  8334. {
  8335. if (danceCount > 0)
  8336. {
  8337. danceCount--;
  8338. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8339. }
  8340. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8341. {
  8342. danceCount = 20;
  8343. }
  8344. }
  8345. }
  8346. }
  8347. }
  8348. if (isDanceStart1)
  8349. {
  8350. for (int j = 0; j < maidCnt; j++)
  8351. {
  8352. if (maidArray[j] && maidArray[j].Visible)
  8353. {
  8354. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8355. if (!isShift)
  8356. {
  8357. if (j == 0)
  8358. {
  8359. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8360. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8361. danceName[j] = "dance_cm3d2_001_f1.anm";
  8362. }
  8363. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8364. {
  8365. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8366. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8367. danceName[j] = "dance_cm3d2_001_f2.anm";
  8368. }
  8369. else
  8370. {
  8371. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8372. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8373. danceName[j] = "dance_cm3d2_001_f3.anm";
  8374. }
  8375. }
  8376. else
  8377. {
  8378. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8379. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8380. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8381. }
  8382. }
  8383. }
  8384. isDanceStart1 = false;
  8385. isDanceStart1F = true;
  8386. isShift = false;
  8387. }
  8388. if (isDanceStart2)
  8389. {
  8390. for (int j = 0; j < maidCnt; j++)
  8391. {
  8392. if (maidArray[j] && maidArray[j].Visible)
  8393. {
  8394. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8395. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8396. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8397. danceName[j] = "dance_cm3d_001_f1.anm";
  8398. }
  8399. }
  8400. isDanceStart2 = false;
  8401. isDanceStart2F = true;
  8402. }
  8403. if (isDanceStart3)
  8404. {
  8405. for (int j = 0; j < maidCnt; j++)
  8406. {
  8407. if (maidArray[j] && maidArray[j].Visible)
  8408. {
  8409. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8410. if (!isShift)
  8411. {
  8412. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8413. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8414. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8415. }
  8416. else
  8417. {
  8418. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8419. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8420. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8421. }
  8422. }
  8423. }
  8424. isDanceStart3 = false;
  8425. isDanceStart3F = true;
  8426. isShift = false;
  8427. }
  8428. if (isDanceStart4)
  8429. {
  8430. for (int j = 0; j < maidCnt; j++)
  8431. {
  8432. if (maidArray[j] && maidArray[j].Visible)
  8433. {
  8434. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8435. if (!isShift)
  8436. {
  8437. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8438. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8439. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8440. }
  8441. else
  8442. {
  8443. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8444. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8445. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8446. }
  8447. }
  8448. }
  8449. isDanceStart4 = false;
  8450. isDanceStart4F = true;
  8451. isShift = false;
  8452. }
  8453. if (isDanceStart5)
  8454. {
  8455. for (int j = 0; j < maidCnt; j++)
  8456. {
  8457. if (maidArray[j] && maidArray[j].Visible)
  8458. {
  8459. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8460. if (!isShift)
  8461. {
  8462. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8463. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8464. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8465. }
  8466. else
  8467. {
  8468. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8469. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8470. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8471. }
  8472. }
  8473. }
  8474. isDanceStart5 = false;
  8475. isDanceStart5F = true;
  8476. isShift = false;
  8477. }
  8478. if (isDanceStart6)
  8479. {
  8480. for (int j = 0; j < maidCnt; j++)
  8481. {
  8482. if (maidArray[j] && maidArray[j].Visible)
  8483. {
  8484. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8485. if (!isShift)
  8486. {
  8487. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8488. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8489. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8490. }
  8491. else
  8492. {
  8493. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8494. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8495. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8496. }
  8497. }
  8498. }
  8499. isDanceStart6 = false;
  8500. isDanceStart6F = true;
  8501. isShift = false;
  8502. }
  8503. if (isDanceStart7)
  8504. {
  8505. for (int j = 0; j < maidCnt; j++)
  8506. {
  8507. if (maidArray[j] && maidArray[j].Visible)
  8508. {
  8509. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8510. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8511. {
  8512. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8513. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8514. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8515. }
  8516. else
  8517. {
  8518. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8519. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8520. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8521. }
  8522. }
  8523. }
  8524. isDanceStart7 = false;
  8525. isDanceStart7V = true;
  8526. isDanceStart7F = true;
  8527. }
  8528. if (isDanceStart8)
  8529. {
  8530. for (int j = 0; j < maidCnt; j++)
  8531. {
  8532. if (maidArray[j] && maidArray[j].Visible)
  8533. {
  8534. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8535. if (j == 0 || j == 4 || j == 8 || j == 12)
  8536. {
  8537. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8538. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8539. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8540. }
  8541. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8542. {
  8543. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8544. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8545. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8546. }
  8547. else if (j == 2 || j == 6 || j == 10)
  8548. {
  8549. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8550. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8551. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8552. }
  8553. else
  8554. {
  8555. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8556. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8557. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8558. }
  8559. }
  8560. }
  8561. isDanceStart8 = false;
  8562. isDanceStart8V = true;
  8563. isDanceStart8F = true;
  8564. }
  8565. if (isDanceStart9)
  8566. {
  8567. isDanceStart9Count++;
  8568. if (isShift)
  8569. {
  8570. for (int j = 0; j < maidCnt; j++)
  8571. {
  8572. if (maidArray[j] && maidArray[j].Visible)
  8573. {
  8574. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8575. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8576. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8577. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8578. }
  8579. }
  8580. isDanceStart9 = false;
  8581. isDanceStart9F = true;
  8582. isDanceStart9Count = 0;
  8583. isShift = false;
  8584. }
  8585. if (isDanceStart9Count == 10)
  8586. {
  8587. for (int j = 0; j < maidCnt; j++)
  8588. {
  8589. if (maidArray[j] && maidArray[j].Visible)
  8590. {
  8591. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8592. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8593. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8594. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8595. }
  8596. }
  8597. isDanceStart9 = false;
  8598. isDanceStart9F = true;
  8599. isDanceStart9Count = 0;
  8600. }
  8601. }
  8602. if (isDanceStart10)
  8603. {
  8604. for (int j = 0; j < maidCnt; j++)
  8605. {
  8606. if (maidArray[j] && maidArray[j].Visible)
  8607. {
  8608. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8609. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8610. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8611. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8612. }
  8613. }
  8614. isDanceStart10 = false;
  8615. isDanceStart10F = true;
  8616. }
  8617. if (isDanceStart11)
  8618. {
  8619. for (int j = 0; j < maidCnt; j++)
  8620. {
  8621. if (maidArray[j] && maidArray[j].Visible)
  8622. {
  8623. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8624. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8625. {
  8626. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8627. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8628. danceName[j] = nameA + danceNo2 + ".anm";
  8629. }
  8630. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8631. {
  8632. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8633. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8634. danceName[j] = nameA + danceNo3 + ".anm";
  8635. }
  8636. else
  8637. {
  8638. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8639. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8640. danceName[j] = nameA + danceNo1 + ".anm";
  8641. }
  8642. }
  8643. }
  8644. isDanceStart11 = false;
  8645. isDanceStart11V = true;
  8646. isDanceStart11F = true;
  8647. }
  8648. if (isDanceStart12)
  8649. {
  8650. for (int j = 0; j < maidCnt; j++)
  8651. {
  8652. if (maidArray[j] && maidArray[j].Visible)
  8653. {
  8654. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8655. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8656. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8657. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8658. }
  8659. }
  8660. isDanceStart12 = false;
  8661. isDanceStart12F = true;
  8662. }
  8663. if (isDanceStart13)
  8664. {
  8665. for (int j = 0; j < maidCnt; j++)
  8666. {
  8667. if (maidArray[j] && maidArray[j].Visible)
  8668. {
  8669. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8670. if (!isShift)
  8671. {
  8672. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8673. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8674. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8675. }
  8676. else
  8677. {
  8678. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8679. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8680. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8681. }
  8682. }
  8683. }
  8684. isDanceStart13 = false;
  8685. isDanceStart13F = true;
  8686. isShift = false;
  8687. }
  8688. if (isDanceStart14)
  8689. {
  8690. for (int j = 0; j < maidCnt; j++)
  8691. {
  8692. if (maidArray[j] && maidArray[j].Visible)
  8693. {
  8694. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8695. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8696. {
  8697. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8698. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8699. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8700. }
  8701. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8702. {
  8703. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8704. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8705. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8706. }
  8707. else
  8708. {
  8709. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8710. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8711. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8712. }
  8713. }
  8714. }
  8715. isDanceStart14 = false;
  8716. isDanceStart14V = true;
  8717. isDanceStart14F = true;
  8718. }
  8719. if (isDanceStart15)
  8720. {
  8721. isDanceStart15Count++;
  8722. }
  8723. if (isDanceStart15Count == 10)
  8724. {
  8725. for (int j = 0; j < maidCnt; j++)
  8726. {
  8727. if (maidArray[j] && maidArray[j].Visible)
  8728. {
  8729. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8730. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8731. {
  8732. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8733. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8734. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8735. }
  8736. else
  8737. {
  8738. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8739. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8740. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8741. }
  8742. }
  8743. }
  8744. isDanceStart15 = false;
  8745. isDanceStart15V = true;
  8746. isDanceStart15F = true;
  8747. isDanceStart15Count = 0;
  8748. }
  8749. if (isDance)
  8750. {
  8751. for (int j = 0; j < maidCnt; j++)
  8752. {
  8753. if (maidArray[j].Visible)
  8754. {
  8755. if (isDanceStart1F)
  8756. {
  8757. if (isDanceStart1K)
  8758. {
  8759. foreach (string text3 in dance1KArray)
  8760. {
  8761. string[] array = text3.Split(new char[] { ',' });
  8762. float num10 = float.Parse(array[0]);
  8763. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8764. {
  8765. danceFace[j] = num10;
  8766. FaceName[j] = FaceName2[j];
  8767. FaceName2[j] = array[1];
  8768. FaceName3[j] = array[2];
  8769. FaceTime[j] = 0.0166666675f;
  8770. break;
  8771. }
  8772. }
  8773. }
  8774. else if (j == 0)
  8775. {
  8776. foreach (string text3 in dance1Array)
  8777. {
  8778. string[] array = text3.Split(new char[] { ',' });
  8779. float num10 = float.Parse(array[0]);
  8780. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8781. {
  8782. danceFace[j] = num10;
  8783. FaceName[j] = FaceName2[j];
  8784. FaceName2[j] = array[1];
  8785. FaceName3[j] = array[2];
  8786. FaceTime[j] = 0.0166666675f;
  8787. break;
  8788. }
  8789. }
  8790. }
  8791. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8792. {
  8793. foreach (string text3 in dance1BArray)
  8794. {
  8795. string[] array = text3.Split(new char[] { ',' });
  8796. float num10 = float.Parse(array[0]);
  8797. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8798. {
  8799. danceFace[j] = num10;
  8800. FaceName[j] = FaceName2[j];
  8801. FaceName2[j] = array[1];
  8802. FaceName3[j] = array[2];
  8803. FaceTime[j] = 0.0166666675f;
  8804. break;
  8805. }
  8806. }
  8807. }
  8808. else
  8809. {
  8810. foreach (string text3 in dance1CArray)
  8811. {
  8812. string[] array = text3.Split(new char[] { ',' });
  8813. float num10 = float.Parse(array[0]);
  8814. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8815. {
  8816. danceFace[j] = num10;
  8817. FaceName[j] = FaceName2[j];
  8818. FaceName2[j] = array[1];
  8819. FaceName3[j] = array[2];
  8820. FaceTime[j] = 0.0166666675f;
  8821. break;
  8822. }
  8823. }
  8824. }
  8825. }
  8826. if (isDanceStart2F)
  8827. {
  8828. foreach (string text3 in dance2Array)
  8829. {
  8830. string[] array = text3.Split(new char[] { ',' });
  8831. float num10 = float.Parse(array[0]);
  8832. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8833. {
  8834. danceFace[j] = num10;
  8835. FaceName[j] = FaceName2[j];
  8836. FaceName2[j] = array[1];
  8837. FaceName3[j] = array[2];
  8838. FaceTime[j] = 0.0166666675f;
  8839. break;
  8840. }
  8841. }
  8842. }
  8843. if (isDanceStart3F)
  8844. {
  8845. if (isDanceStart3K)
  8846. {
  8847. foreach (string text3 in dance3KArray)
  8848. {
  8849. string[] array = text3.Split(new char[] { ',' });
  8850. float num10 = float.Parse(array[0]);
  8851. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8852. {
  8853. danceFace[j] = num10;
  8854. FaceName[j] = FaceName2[j];
  8855. FaceName2[j] = array[1];
  8856. FaceName3[j] = array[2];
  8857. FaceTime[j] = 0.0166666675f;
  8858. break;
  8859. }
  8860. }
  8861. }
  8862. else
  8863. {
  8864. foreach (string text3 in dance3Array)
  8865. {
  8866. string[] array = text3.Split(new char[] { ',' });
  8867. float num10 = float.Parse(array[0]);
  8868. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8869. {
  8870. danceFace[j] = num10;
  8871. FaceName[j] = FaceName2[j];
  8872. FaceName2[j] = array[1];
  8873. FaceName3[j] = array[2];
  8874. FaceTime[j] = 0.0166666675f;
  8875. break;
  8876. }
  8877. }
  8878. }
  8879. }
  8880. if (isDanceStart4F)
  8881. {
  8882. if (isDanceStart4K)
  8883. {
  8884. foreach (string text3 in dance4KArray)
  8885. {
  8886. string[] array = text3.Split(new char[] { ',' });
  8887. float num10 = float.Parse(array[0]);
  8888. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8889. {
  8890. danceFace[j] = num10;
  8891. FaceName[j] = FaceName2[j];
  8892. FaceName2[j] = array[1];
  8893. FaceName3[j] = array[2];
  8894. FaceTime[j] = 0.0166666675f;
  8895. break;
  8896. }
  8897. }
  8898. }
  8899. else
  8900. {
  8901. foreach (string text3 in dance4Array)
  8902. {
  8903. string[] array = text3.Split(new char[] { ',' });
  8904. float num10 = float.Parse(array[0]);
  8905. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8906. {
  8907. danceFace[j] = num10;
  8908. FaceName[j] = FaceName2[j];
  8909. FaceName2[j] = array[1];
  8910. FaceName3[j] = array[2];
  8911. FaceTime[j] = 0.0166666675f;
  8912. break;
  8913. }
  8914. }
  8915. }
  8916. }
  8917. if (isDanceStart5F)
  8918. {
  8919. if (isDanceStart5K)
  8920. {
  8921. foreach (string text3 in dance5KArray)
  8922. {
  8923. string[] array = text3.Split(new char[] { ',' });
  8924. float num10 = float.Parse(array[0]);
  8925. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8926. {
  8927. danceFace[j] = num10;
  8928. FaceName[j] = FaceName2[j];
  8929. FaceName2[j] = array[1];
  8930. FaceName3[j] = array[2];
  8931. FaceTime[j] = 0.0166666675f;
  8932. break;
  8933. }
  8934. }
  8935. }
  8936. else
  8937. {
  8938. foreach (string text3 in dance5Array)
  8939. {
  8940. string[] array = text3.Split(new char[] { ',' });
  8941. float num10 = float.Parse(array[0]);
  8942. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8943. {
  8944. danceFace[j] = num10;
  8945. FaceName[j] = FaceName2[j];
  8946. FaceName2[j] = array[1];
  8947. FaceName3[j] = array[2];
  8948. FaceTime[j] = 0.0166666675f;
  8949. break;
  8950. }
  8951. }
  8952. }
  8953. }
  8954. if (isDanceStart6F)
  8955. {
  8956. if (isDanceStart6K)
  8957. {
  8958. foreach (string text3 in dance6KArray)
  8959. {
  8960. string[] array = text3.Split(new char[] { ',' });
  8961. float num10 = float.Parse(array[0]);
  8962. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8963. {
  8964. danceFace[j] = num10;
  8965. FaceName[j] = FaceName2[j];
  8966. FaceName2[j] = array[1];
  8967. FaceName3[j] = array[2];
  8968. FaceTime[j] = 0.0166666675f;
  8969. break;
  8970. }
  8971. }
  8972. }
  8973. else
  8974. {
  8975. foreach (string text3 in dance6Array)
  8976. {
  8977. string[] array = text3.Split(new char[] { ',' });
  8978. float num10 = float.Parse(array[0]);
  8979. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8980. {
  8981. danceFace[j] = num10;
  8982. FaceName[j] = FaceName2[j];
  8983. FaceName2[j] = array[1];
  8984. FaceName3[j] = array[2];
  8985. FaceTime[j] = 0.0166666675f;
  8986. break;
  8987. }
  8988. }
  8989. }
  8990. }
  8991. if (isDanceStart7F)
  8992. {
  8993. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8994. {
  8995. foreach (string text3 in dance6BArray)
  8996. {
  8997. string[] array = text3.Split(new char[] { ',' });
  8998. float num10 = float.Parse(array[0]);
  8999. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9000. {
  9001. danceFace[j] = num10;
  9002. FaceName[j] = FaceName2[j];
  9003. FaceName2[j] = array[1];
  9004. FaceName3[j] = array[2];
  9005. FaceTime[j] = 0.0166666675f;
  9006. break;
  9007. }
  9008. }
  9009. }
  9010. else
  9011. {
  9012. foreach (string text3 in dance6Array)
  9013. {
  9014. string[] array = text3.Split(new char[] { ',' });
  9015. float num10 = float.Parse(array[0]);
  9016. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9017. {
  9018. danceFace[j] = num10;
  9019. FaceName[j] = FaceName2[j];
  9020. FaceName2[j] = array[1];
  9021. FaceName3[j] = array[2];
  9022. FaceTime[j] = 0.0166666675f;
  9023. break;
  9024. }
  9025. }
  9026. }
  9027. }
  9028. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9029. {
  9030. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9031. {
  9032. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9033. }
  9034. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9035. {
  9036. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9037. 100f,
  9038. maidArray[j - 1].transform.position.z));
  9039. }
  9040. }
  9041. if (isDanceStart8F)
  9042. {
  9043. if (j == 1 || j == 5 || j == 9 || j == 13)
  9044. {
  9045. foreach (string text3 in dance6BArray)
  9046. {
  9047. string[] array = text3.Split(new char[] { ',' });
  9048. float num10 = float.Parse(array[0]);
  9049. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9050. {
  9051. danceFace[j] = num10;
  9052. FaceName[j] = FaceName2[j];
  9053. FaceName2[j] = array[1];
  9054. FaceName3[j] = array[2];
  9055. FaceTime[j] = 0.0166666675f;
  9056. break;
  9057. }
  9058. }
  9059. }
  9060. else if (j == 2 || j == 6 || j == 10)
  9061. {
  9062. foreach (string text3 in dance6CArray)
  9063. {
  9064. string[] array = text3.Split(new char[] { ',' });
  9065. float num10 = float.Parse(array[0]);
  9066. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9067. {
  9068. danceFace[j] = num10;
  9069. FaceName[j] = FaceName2[j];
  9070. FaceName2[j] = array[1];
  9071. FaceName3[j] = array[2];
  9072. FaceTime[j] = 0.0166666675f;
  9073. break;
  9074. }
  9075. }
  9076. }
  9077. else if (j == 3 || j == 9 || j == 11)
  9078. {
  9079. foreach (string text3 in dance6DArray)
  9080. {
  9081. string[] array = text3.Split(new char[] { ',' });
  9082. float num10 = float.Parse(array[0]);
  9083. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9084. {
  9085. danceFace[j] = num10;
  9086. FaceName[j] = FaceName2[j];
  9087. FaceName2[j] = array[1];
  9088. FaceName3[j] = array[2];
  9089. FaceTime[j] = 0.0166666675f;
  9090. break;
  9091. }
  9092. }
  9093. }
  9094. else
  9095. {
  9096. foreach (string text3 in dance6Array)
  9097. {
  9098. string[] array = text3.Split(new char[] { ',' });
  9099. float num10 = float.Parse(array[0]);
  9100. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9101. {
  9102. danceFace[j] = num10;
  9103. FaceName[j] = FaceName2[j];
  9104. FaceName2[j] = array[1];
  9105. FaceName3[j] = array[2];
  9106. FaceTime[j] = 0.0166666675f;
  9107. break;
  9108. }
  9109. }
  9110. }
  9111. }
  9112. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9113. {
  9114. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9115. {
  9116. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9117. }
  9118. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9119. {
  9120. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9121. 100f,
  9122. maidArray[j - 1].transform.position.z));
  9123. }
  9124. }
  9125. if (isDanceStart8V)
  9126. {
  9127. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9128. {
  9129. isDanceStart8P = true;
  9130. for (int num11 = 0; num11 < maidCnt; num11++)
  9131. {
  9132. if (maidArray[num11].Visible)
  9133. {
  9134. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9135. {
  9136. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9137. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9138. gameObject6.transform.position =
  9139. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9140. .position;
  9141. }
  9142. }
  9143. }
  9144. }
  9145. }
  9146. if (isDanceStart9F)
  9147. {
  9148. if (isDanceStart9K)
  9149. {
  9150. foreach (string text3 in dance9KArray)
  9151. {
  9152. string[] array = text3.Split(new char[] { ',' });
  9153. float num10 = float.Parse(array[0]);
  9154. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9155. {
  9156. danceFace[j] = num10;
  9157. FaceName[j] = FaceName2[j];
  9158. FaceName2[j] = array[1];
  9159. FaceName3[j] = array[2];
  9160. FaceTime[j] = 0.0166666675f;
  9161. break;
  9162. }
  9163. }
  9164. }
  9165. else
  9166. {
  9167. foreach (string text3 in dance7Array)
  9168. {
  9169. string[] array = text3.Split(new char[] { ',' });
  9170. float num10 = float.Parse(array[0]);
  9171. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9172. {
  9173. danceFace[j] = num10;
  9174. FaceName[j] = FaceName2[j];
  9175. FaceName2[j] = array[1];
  9176. FaceName3[j] = array[2];
  9177. FaceTime[j] = 0.0166666675f;
  9178. break;
  9179. }
  9180. }
  9181. }
  9182. }
  9183. if (isDanceStart10F)
  9184. {
  9185. foreach (string text3 in danceO1Array)
  9186. {
  9187. string[] array = text3.Split(new char[] { ',' });
  9188. float num10 = float.Parse(array[0]);
  9189. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9190. {
  9191. danceFace[j] = num10;
  9192. FaceName[j] = FaceName2[j];
  9193. FaceName2[j] = array[1];
  9194. FaceName3[j] = array[2];
  9195. FaceTime[j] = 0.0166666675f;
  9196. break;
  9197. }
  9198. }
  9199. }
  9200. if (isDanceStart11F)
  9201. {
  9202. string[] array14 = null;
  9203. string[] array12 = null;
  9204. string[] array15 = null;
  9205. if (isSS1)
  9206. {
  9207. array14 = danceO1Array;
  9208. array12 = danceO1CArray;
  9209. array15 = danceO1BArray;
  9210. }
  9211. if (isSS2)
  9212. {
  9213. array14 = danceO2Array;
  9214. array12 = danceO2BArray;
  9215. array15 = danceO2CArray;
  9216. }
  9217. if (isSS3)
  9218. {
  9219. array14 = danceO3CArray;
  9220. array12 = danceO3Array;
  9221. array15 = danceO3BArray;
  9222. }
  9223. if (isSS4)
  9224. {
  9225. array14 = danceO5BArray;
  9226. array12 = danceO5Array;
  9227. array15 = danceO5CArray;
  9228. }
  9229. if (isSS5)
  9230. {
  9231. array14 = danceO4Array;
  9232. array12 = danceO4BArray;
  9233. array15 = danceO4CArray;
  9234. }
  9235. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9236. {
  9237. foreach (string text3 in array12)
  9238. {
  9239. string[] array = text3.Split(new char[] { ',' });
  9240. float num10 = float.Parse(array[0]) - 0.03f;
  9241. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9242. {
  9243. danceFace[j] = num10;
  9244. FaceName[j] = FaceName2[j];
  9245. FaceName2[j] = array[1];
  9246. FaceName3[j] = array[2];
  9247. FaceTime[j] = 0.0166666675f;
  9248. break;
  9249. }
  9250. }
  9251. }
  9252. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9253. {
  9254. foreach (string text3 in array15)
  9255. {
  9256. string[] array = text3.Split(new char[] { ',' });
  9257. float num10 = float.Parse(array[0]) - 0.03f;
  9258. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9259. {
  9260. danceFace[j] = num10;
  9261. FaceName[j] = FaceName2[j];
  9262. FaceName2[j] = array[1];
  9263. FaceName3[j] = array[2];
  9264. FaceTime[j] = 0.0166666675f;
  9265. break;
  9266. }
  9267. }
  9268. }
  9269. else
  9270. {
  9271. foreach (string text3 in array14)
  9272. {
  9273. string[] array = text3.Split(new char[] { ',' });
  9274. float num10 = float.Parse(array[0]) - 0.03f;
  9275. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9276. {
  9277. danceFace[j] = num10;
  9278. FaceName[j] = FaceName2[j];
  9279. FaceName2[j] = array[1];
  9280. FaceName3[j] = array[2];
  9281. FaceTime[j] = 0.0166666675f;
  9282. break;
  9283. }
  9284. }
  9285. }
  9286. }
  9287. if (isDanceStart12F)
  9288. {
  9289. foreach (string text3 in dance12Array)
  9290. {
  9291. string[] array = text3.Split(new char[] { ',' });
  9292. float num10 = float.Parse(array[0]);
  9293. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9294. {
  9295. danceFace[j] = num10;
  9296. FaceName[j] = FaceName2[j];
  9297. FaceName2[j] = array[1];
  9298. FaceName3[j] = array[2];
  9299. FaceTime[j] = 0.0166666675f;
  9300. break;
  9301. }
  9302. }
  9303. }
  9304. if (isDanceStart13F)
  9305. {
  9306. if (!isDanceStart13K)
  9307. {
  9308. foreach (string text3 in dance13Array)
  9309. {
  9310. string[] array = text3.Split(new char[] { ',' });
  9311. float num10 = float.Parse(array[0]);
  9312. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9313. {
  9314. danceFace[j] = num10;
  9315. FaceName[j] = FaceName2[j];
  9316. FaceName2[j] = array[1];
  9317. FaceName3[j] = array[2];
  9318. FaceTime[j] = 0.0166666675f;
  9319. break;
  9320. }
  9321. }
  9322. }
  9323. }
  9324. if (isDanceStart14F)
  9325. {
  9326. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9327. {
  9328. foreach (string text3 in dance13BArray)
  9329. {
  9330. string[] array = text3.Split(new char[] { ',' });
  9331. float num10 = float.Parse(array[0]);
  9332. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9333. {
  9334. danceFace[j] = num10;
  9335. FaceName[j] = FaceName2[j];
  9336. FaceName2[j] = array[1];
  9337. FaceName3[j] = array[2];
  9338. FaceTime[j] = 0.0166666675f;
  9339. break;
  9340. }
  9341. }
  9342. }
  9343. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9344. {
  9345. foreach (string text3 in dance13CArray)
  9346. {
  9347. string[] array = text3.Split(new char[] { ',' });
  9348. float num10 = float.Parse(array[0]);
  9349. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9350. {
  9351. danceFace[j] = num10;
  9352. FaceName[j] = FaceName2[j];
  9353. FaceName2[j] = array[1];
  9354. FaceName3[j] = array[2];
  9355. FaceTime[j] = 0.0166666675f;
  9356. break;
  9357. }
  9358. }
  9359. }
  9360. else
  9361. {
  9362. foreach (string text3 in dance13Array)
  9363. {
  9364. string[] array = text3.Split(new char[] { ',' });
  9365. float num10 = float.Parse(array[0]);
  9366. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9367. {
  9368. danceFace[j] = num10;
  9369. FaceName[j] = FaceName2[j];
  9370. FaceName2[j] = array[1];
  9371. FaceName3[j] = array[2];
  9372. FaceTime[j] = 0.0166666675f;
  9373. break;
  9374. }
  9375. }
  9376. }
  9377. }
  9378. if (isDanceStart15F)
  9379. {
  9380. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9381. {
  9382. foreach (string text3 in dance15BArray)
  9383. {
  9384. string[] array = text3.Split(new char[] { ',' });
  9385. float num10 = float.Parse(array[0]);
  9386. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9387. {
  9388. danceFace[j] = num10;
  9389. FaceName[j] = FaceName2[j];
  9390. FaceName2[j] = array[1];
  9391. FaceName3[j] = array[2];
  9392. FaceTime[j] = 0.0166666675f;
  9393. break;
  9394. }
  9395. }
  9396. }
  9397. else
  9398. {
  9399. foreach (string text3 in dance15Array)
  9400. {
  9401. string[] array = text3.Split(new char[] { ',' });
  9402. float num10 = float.Parse(array[0]);
  9403. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9404. {
  9405. danceFace[j] = num10;
  9406. FaceName[j] = FaceName2[j];
  9407. FaceName2[j] = array[1];
  9408. FaceName3[j] = array[2];
  9409. FaceTime[j] = 0.0166666675f;
  9410. break;
  9411. }
  9412. }
  9413. }
  9414. }
  9415. if (!isFadeOut)
  9416. {
  9417. Maid maid = maidArray[j];
  9418. if (maid && maid.Visible)
  9419. {
  9420. if (maid.transform.position.y != 100f)
  9421. {
  9422. FaceTime[j] += Time.deltaTime;
  9423. if (FaceTime[j] < 1f)
  9424. {
  9425. TMorph morph = maid.body0.Face.morph;
  9426. maid.boMabataki = false;
  9427. maid.body0.Face.morph.EyeMabataki = 0f;
  9428. if (FaceName[j] != string.Empty)
  9429. {
  9430. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9431. }
  9432. if (FaceName2[j] != "")
  9433. {
  9434. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9435. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9436. }
  9437. if (FaceName3[j] != string.Empty)
  9438. {
  9439. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9440. }
  9441. maid.body0.Face.morph.FixBlendValues_Face();
  9442. }
  9443. else
  9444. {
  9445. FaceName[j] = FaceName2[j];
  9446. }
  9447. if (isHenkou)
  9448. {
  9449. TMorph morph = maid.body0.Face.morph;
  9450. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9451. maid.boMabataki = false;
  9452. if (isNamidaH)
  9453. {
  9454. fieldValue[(int)morph.hash["namida"]] = 1f;
  9455. }
  9456. else
  9457. {
  9458. fieldValue[(int)morph.hash["namida"]] = 0f;
  9459. }
  9460. if (isSekimenH)
  9461. {
  9462. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9463. }
  9464. else
  9465. {
  9466. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9467. }
  9468. if (isHohoH)
  9469. {
  9470. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9471. }
  9472. else
  9473. {
  9474. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9475. }
  9476. maid.body0.Face.morph.FixBlendValues_Face();
  9477. }
  9478. }
  9479. }
  9480. }
  9481. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9482. }
  9483. }
  9484. if (Input.GetKey(KeyCode.H) || isVR)
  9485. {
  9486. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9487. {
  9488. h2Flg = true;
  9489. isNamidaH = !isNamidaH;
  9490. isHenkou = true;
  9491. }
  9492. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9493. {
  9494. h2Flg = true;
  9495. isSekimenH = !isSekimenH;
  9496. isHenkou = true;
  9497. }
  9498. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9499. {
  9500. h2Flg = true;
  9501. isHohoH = !isHohoH;
  9502. isHenkou = true;
  9503. }
  9504. }
  9505. danceCheckIndex++;
  9506. if (danceCheckIndex == 10)
  9507. {
  9508. danceCheckIndex = 0;
  9509. }
  9510. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9511. isDanceChu = false;
  9512. for (int k = 0; k < danceCheck.Length; k++)
  9513. {
  9514. if (danceCheck[k] > 0f)
  9515. {
  9516. isDanceChu = true;
  9517. break;
  9518. }
  9519. }
  9520. if (!isDanceChu)
  9521. {
  9522. danceWait--;
  9523. if (danceWait > 0)
  9524. {
  9525. isDanceChu = true;
  9526. }
  9527. }
  9528. if (!isDanceChu)
  9529. {
  9530. for (int j = 0; j < maidCnt; j++)
  9531. {
  9532. if (maidArray[j] && maidArray[j].Visible)
  9533. {
  9534. maidArray[j].StopKuchipakuPattern();
  9535. if (isDanceStart7V)
  9536. {
  9537. maidArray[j].SetPos(dancePos[j]);
  9538. maidArray[j].body0.transform.localRotation = danceRot[j];
  9539. }
  9540. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9541. {
  9542. maidArray[j].SetPos(dancePos[j]);
  9543. maidArray[j].body0.transform.localRotation = danceRot[j];
  9544. }
  9545. if (isDanceStart11V)
  9546. {
  9547. maidArray[j].SetPos(dancePos[j]);
  9548. maidArray[j].body0.transform.localRotation = danceRot[j];
  9549. }
  9550. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9551. || isDanceStart13K)
  9552. {
  9553. maidArray[j].SetPos(dancePos[j]);
  9554. maidArray[j].body0.transform.localRotation = danceRot[j];
  9555. int i = j;
  9556. if (!isVR)
  9557. {
  9558. delCount[i] = 20;
  9559. if (goSlot[(int)selectList[i]] != null)
  9560. {
  9561. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9562. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9563. {
  9564. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9565. }
  9566. }
  9567. }
  9568. Maid maid = maidArray[j];
  9569. maid.DelProp(MPN.handitem, true);
  9570. maid.DelProp(MPN.accvag, true);
  9571. maid.DelProp(MPN.accanl, true);
  9572. maid.DelProp(MPN.kousoku_upper, true);
  9573. maid.DelProp(MPN.kousoku_lower, true);
  9574. maid.AllProcPropSeqStart();
  9575. isStop[i] = true;
  9576. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9577. isPoseIti[i] = true;
  9578. poseIti[i] = maidArray[i].transform.position;
  9579. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9580. }
  9581. if (isDanceStart14V)
  9582. {
  9583. maidArray[j].SetPos(dancePos[j]);
  9584. maidArray[j].body0.transform.localRotation = danceRot[j];
  9585. }
  9586. if (isDanceStart15V)
  9587. {
  9588. maidArray[j].SetPos(dancePos[j]);
  9589. maidArray[j].body0.transform.localRotation = danceRot[j];
  9590. }
  9591. }
  9592. }
  9593. isDanceStart1F = false;
  9594. isDanceStart1K = false;
  9595. isDanceStart2F = false;
  9596. isDanceStart3F = false;
  9597. isDanceStart3K = false;
  9598. isDanceStart4F = false;
  9599. isDanceStart4K = false;
  9600. isDanceStart5F = false;
  9601. isDanceStart5K = false;
  9602. isDanceStart6F = false;
  9603. isDanceStart6K = false;
  9604. isDanceStart7F = false;
  9605. isDanceStart7V = false;
  9606. isDanceStart8F = false;
  9607. isDanceStart8V = false;
  9608. isDanceStart8P = false;
  9609. isDanceStart9F = false;
  9610. isDanceStart9K = false;
  9611. isDanceStart10F = false;
  9612. isDanceStart11F = false;
  9613. isDanceStart11V = false;
  9614. isDanceStart12F = false;
  9615. isDanceStart13F = false;
  9616. isDanceStart13K = false;
  9617. isDanceStart14F = false;
  9618. isDanceStart14V = false;
  9619. isDanceStart15F = false;
  9620. isDanceStart15V = false;
  9621. for (int j = 0; j < maidCnt; j++)
  9622. {
  9623. danceFace[j] = 0f;
  9624. }
  9625. danceCheckIndex = 0;
  9626. for (int k = 0; k < danceCheck.Length; k++)
  9627. {
  9628. danceCheck[danceCheckIndex] = 1f;
  9629. }
  9630. isDance = false;
  9631. }
  9632. }
  9633. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9634. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9635. {
  9636. if (getModKeyPressing(modKey.Shift))
  9637. {
  9638. isShift = true;
  9639. }
  9640. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9641. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9642. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9643. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9644. if (!isShift)
  9645. {
  9646. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9647. }
  9648. for (int j = 0; j < maidCnt; j++)
  9649. {
  9650. string text5 = "dance_cm3d2_001_f1.anm";
  9651. switch (j)
  9652. {
  9653. case 1:
  9654. case 3:
  9655. case 5:
  9656. case 7:
  9657. case 9:
  9658. case 11:
  9659. case 13:
  9660. text5 = "dance_cm3d2_001_f2.anm";
  9661. break;
  9662. case 2:
  9663. case 4:
  9664. case 6:
  9665. case 8:
  9666. case 10:
  9667. case 12:
  9668. text5 = "dance_cm3d2_001_f3.anm";
  9669. break;
  9670. }
  9671. if (!isShift)
  9672. {
  9673. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9674. {
  9675. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9676. }
  9677. }
  9678. else
  9679. {
  9680. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9681. {
  9682. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9683. GameUty.FileSystem,
  9684. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9685. false,
  9686. false);
  9687. }
  9688. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9689. text4 = textAsset.text;
  9690. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9691. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9692. && !isDanceStart9K && !isDanceStart13K)
  9693. {
  9694. dancePos[j] = maidArray[j].transform.position;
  9695. danceRot[j] = maidArray[j].transform.localRotation;
  9696. }
  9697. }
  9698. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9699. }
  9700. if (!isShift)
  9701. {
  9702. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9703. sw = new Stopwatch();
  9704. sw.Start();
  9705. }
  9706. else if (getModKeyPressing(modKey.Ctrl))
  9707. {
  9708. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9709. }
  9710. else
  9711. {
  9712. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9713. }
  9714. for (int j = 0; j < maidCnt; j++)
  9715. {
  9716. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9717. Vector3 vector = Vector3.zero;
  9718. switch (j)
  9719. {
  9720. case 3:
  9721. vector.x = 1f;
  9722. break;
  9723. case 4:
  9724. vector.x = -1f;
  9725. break;
  9726. case 5:
  9727. vector.x = 2f;
  9728. break;
  9729. case 6:
  9730. vector.x = -2f;
  9731. break;
  9732. case 7:
  9733. vector.x = 3f;
  9734. break;
  9735. case 8:
  9736. vector.x = -3f;
  9737. break;
  9738. case 9:
  9739. vector.x = 4f;
  9740. break;
  9741. case 10:
  9742. vector.x = -4f;
  9743. break;
  9744. case 11:
  9745. vector.x = 5f;
  9746. break;
  9747. case 12:
  9748. vector.x = -5f;
  9749. break;
  9750. case 13:
  9751. vector.x = 6f;
  9752. break;
  9753. }
  9754. if (!isShift)
  9755. {
  9756. maidArray[j].SetPos(vector);
  9757. }
  9758. isStop[j] = false;
  9759. isLock[j] = false;
  9760. pHandL[j] = 0;
  9761. pHandR[j] = 0;
  9762. muneIKL[j] = false;
  9763. muneIKR[j] = false;
  9764. if (!isVR)
  9765. {
  9766. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9767. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9768. }
  9769. }
  9770. ikBui = 5;
  9771. isDanceStart1F = false;
  9772. isDanceStart2F = false;
  9773. isDanceStart3F = false;
  9774. isDanceStart4F = false;
  9775. isDanceStart5F = false;
  9776. isDanceStart6F = false;
  9777. isDanceStart7F = false;
  9778. isDanceStart8F = false;
  9779. isDanceStart9F = false;
  9780. isDanceStart10F = false;
  9781. isDanceStart11F = false;
  9782. isDanceStart12F = false;
  9783. isDanceStart13F = false;
  9784. isDanceStart14F = false;
  9785. isDanceStart15F = false;
  9786. for (int j = 0; j < maidCnt; j++)
  9787. {
  9788. danceFace[j] = 0f;
  9789. }
  9790. if (isDanceStart7V)
  9791. {
  9792. for (int j = 0; j < maidCnt; j++)
  9793. {
  9794. if (maidArray[j] && maidArray[j].Visible)
  9795. {
  9796. if (isDanceStart7V)
  9797. {
  9798. maidArray[j].SetPos(dancePos[j]);
  9799. maidArray[j].body0.transform.localRotation = danceRot[j];
  9800. }
  9801. }
  9802. }
  9803. isDanceStart7V = false;
  9804. }
  9805. if (isDanceStart8V)
  9806. {
  9807. for (int j = 0; j < maidCnt; j++)
  9808. {
  9809. if (maidArray[j] && maidArray[j].Visible)
  9810. {
  9811. if (isDanceStart8V)
  9812. {
  9813. maidArray[j].SetPos(dancePos[j]);
  9814. maidArray[j].body0.transform.localRotation = danceRot[j];
  9815. }
  9816. }
  9817. }
  9818. isDanceStart8V = false;
  9819. isDanceStart8P = false;
  9820. }
  9821. if (isDanceStart11V)
  9822. {
  9823. for (int j = 0; j < maidCnt; j++)
  9824. {
  9825. if (maidArray[j] && maidArray[j].Visible)
  9826. {
  9827. if (isDanceStart11V)
  9828. {
  9829. maidArray[j].SetPos(dancePos[j]);
  9830. maidArray[j].body0.transform.localRotation = danceRot[j];
  9831. }
  9832. }
  9833. }
  9834. isDanceStart11V = false;
  9835. }
  9836. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9837. || isDanceStart13K)
  9838. {
  9839. for (int j = 0; j < maidCnt; j++)
  9840. {
  9841. if (maidArray[j] && maidArray[j].Visible)
  9842. {
  9843. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9844. || isDanceStart13K)
  9845. {
  9846. maidArray[j].SetPos(dancePos[j]);
  9847. maidArray[j].body0.transform.localRotation = danceRot[j];
  9848. int i = j;
  9849. if (!isVR)
  9850. {
  9851. delCount[i] = 20;
  9852. if (goSlot[(int)selectList[i]] != null)
  9853. {
  9854. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9855. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9856. {
  9857. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9858. }
  9859. }
  9860. }
  9861. Maid maid = maidArray[j];
  9862. maid.DelProp(MPN.handitem, true);
  9863. maid.DelProp(MPN.accvag, true);
  9864. maid.DelProp(MPN.accanl, true);
  9865. maid.DelProp(MPN.kousoku_upper, true);
  9866. maid.DelProp(MPN.kousoku_lower, true);
  9867. maid.AllProcPropSeqStart();
  9868. }
  9869. }
  9870. }
  9871. isDanceStart1K = false;
  9872. isDanceStart3K = false;
  9873. isDanceStart4K = false;
  9874. isDanceStart5K = false;
  9875. isDanceStart6K = false;
  9876. isDanceStart9K = false;
  9877. isDanceStart13K = false;
  9878. }
  9879. if (isDanceStart14V)
  9880. {
  9881. for (int j = 0; j < maidCnt; j++)
  9882. {
  9883. if (maidArray[j] && maidArray[j].Visible)
  9884. {
  9885. if (isDanceStart14V)
  9886. {
  9887. maidArray[j].SetPos(dancePos[j]);
  9888. maidArray[j].body0.transform.localRotation = danceRot[j];
  9889. }
  9890. }
  9891. }
  9892. isDanceStart14V = false;
  9893. }
  9894. if (isDanceStart15V)
  9895. {
  9896. for (int j = 0; j < maidCnt; j++)
  9897. {
  9898. if (maidArray[j] && maidArray[j].Visible)
  9899. {
  9900. if (isDanceStart15V)
  9901. {
  9902. maidArray[j].SetPos(dancePos[j]);
  9903. maidArray[j].body0.transform.localRotation = danceRot[j];
  9904. }
  9905. }
  9906. }
  9907. isDanceStart15V = false;
  9908. }
  9909. if (isShift)
  9910. {
  9911. if (maidArray[1] && maidArray[1].Visible)
  9912. {
  9913. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9914. {
  9915. Vector3 vector = Vector3.zero;
  9916. vector.x = 0.6f;
  9917. maidArray[1].SetPos(vector);
  9918. if (maidArray[2] && maidArray[2].Visible)
  9919. {
  9920. vector.x = -0.6f;
  9921. maidArray[2].SetPos(vector);
  9922. }
  9923. if (maidArray[3] && maidArray[3].Visible)
  9924. {
  9925. vector.x = 1.2f;
  9926. maidArray[3].SetPos(vector);
  9927. }
  9928. if (maidArray[4] && maidArray[4].Visible)
  9929. {
  9930. vector.x = -1.2f;
  9931. maidArray[4].SetPos(vector);
  9932. }
  9933. if (maidArray[5] && maidArray[5].Visible)
  9934. {
  9935. vector.x = 1.8f;
  9936. maidArray[5].SetPos(vector);
  9937. }
  9938. if (maidArray[6] && maidArray[6].Visible)
  9939. {
  9940. vector.x = -1.8f;
  9941. maidArray[6].SetPos(vector);
  9942. }
  9943. if (maidArray[7] && maidArray[7].Visible)
  9944. {
  9945. vector.x = 2.4f;
  9946. maidArray[7].SetPos(vector);
  9947. }
  9948. if (maidArray[8] && maidArray[8].Visible)
  9949. {
  9950. vector.x = -2.4f;
  9951. maidArray[8].SetPos(vector);
  9952. }
  9953. if (maidArray[9] && maidArray[9].Visible)
  9954. {
  9955. vector.x = 3f;
  9956. maidArray[9].SetPos(vector);
  9957. }
  9958. if (maidArray[10] && maidArray[10].Visible)
  9959. {
  9960. vector.x = -3f;
  9961. maidArray[10].SetPos(vector);
  9962. }
  9963. if (maidArray[11] && maidArray[11].Visible)
  9964. {
  9965. vector.x = 3.6f;
  9966. maidArray[11].SetPos(vector);
  9967. }
  9968. if (maidArray[12] && maidArray[12].Visible)
  9969. {
  9970. vector.x = -3.6f;
  9971. maidArray[12].SetPos(vector);
  9972. }
  9973. if (maidArray[13] && maidArray[13].Visible)
  9974. {
  9975. vector.x = 4.2f;
  9976. maidArray[13].SetPos(vector);
  9977. }
  9978. }
  9979. }
  9980. isDanceStart1K = true;
  9981. for (int j = 0; j < maidCnt; j++)
  9982. {
  9983. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9984. maidArray[j].body0.transform.localRotation.y + 90f,
  9985. maidArray[j].body0.transform.localRotation.z));
  9986. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9987. maidArray[j].body0.transform.position.y,
  9988. maidArray[j].body0.transform.position.z + 4f));
  9989. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9990. int i = j;
  9991. Maid maid = maidArray[j];
  9992. if (!isVR)
  9993. {
  9994. delCount[i] = 20;
  9995. if (goSlot[(int)selectList[i]] != null)
  9996. {
  9997. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9998. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9999. {
  10000. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10001. }
  10002. }
  10003. }
  10004. string[] array = new string[2];
  10005. array = text2.Split(new char[] { ',' });
  10006. maid.DelProp(MPN.handitem, true);
  10007. maid.DelProp(MPN.accvag, true);
  10008. maid.DelProp(MPN.accanl, true);
  10009. maid.DelProp(MPN.kousoku_upper, true);
  10010. maid.DelProp(MPN.kousoku_lower, true);
  10011. if (array[0] != "")
  10012. {
  10013. maid.SetProp(array[0], array[1], 0, true, false);
  10014. }
  10015. maid.AllProcPropSeqStart();
  10016. }
  10017. }
  10018. isDance = true;
  10019. isDanceStart1 = true;
  10020. }
  10021. if (isF2)
  10022. {
  10023. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10024. string text4 = textAsset.text;
  10025. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10026. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10027. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10028. for (int j = 0; j < maidCnt; j++)
  10029. {
  10030. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10031. {
  10032. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10033. GameUty.FileSystem,
  10034. "dance_cm3d_001_f1.anm",
  10035. false,
  10036. false);
  10037. }
  10038. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10039. }
  10040. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10041. for (int j = 0; j < maidCnt; j++)
  10042. {
  10043. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10044. isStop[j] = false;
  10045. isLock[j] = false;
  10046. pHandL[j] = 0;
  10047. pHandR[j] = 0;
  10048. muneIKL[j] = false;
  10049. muneIKR[j] = false;
  10050. if (!isVR)
  10051. {
  10052. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10053. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10054. }
  10055. }
  10056. ikBui = 5;
  10057. isDanceStart1F = false;
  10058. isDanceStart2F = false;
  10059. isDanceStart3F = false;
  10060. isDanceStart4F = false;
  10061. isDanceStart5F = false;
  10062. isDanceStart6F = false;
  10063. isDanceStart7F = false;
  10064. isDanceStart8F = false;
  10065. isDanceStart9F = false;
  10066. isDanceStart10F = false;
  10067. isDanceStart11F = false;
  10068. isDanceStart12F = false;
  10069. isDanceStart13F = false;
  10070. isDanceStart14F = false;
  10071. isDanceStart15F = false;
  10072. for (int j = 0; j < maidCnt; j++)
  10073. {
  10074. danceFace[j] = 0f;
  10075. }
  10076. if (isDanceStart7V)
  10077. {
  10078. for (int j = 0; j < maidCnt; j++)
  10079. {
  10080. if (maidArray[j] && maidArray[j].Visible)
  10081. {
  10082. if (isDanceStart7V)
  10083. {
  10084. maidArray[j].SetPos(dancePos[j]);
  10085. maidArray[j].body0.transform.localRotation = danceRot[j];
  10086. }
  10087. }
  10088. }
  10089. isDanceStart7V = false;
  10090. }
  10091. if (isDanceStart8V)
  10092. {
  10093. for (int j = 0; j < maidCnt; j++)
  10094. {
  10095. if (maidArray[j] && maidArray[j].Visible)
  10096. {
  10097. if (isDanceStart8V)
  10098. {
  10099. maidArray[j].SetPos(dancePos[j]);
  10100. maidArray[j].body0.transform.localRotation = danceRot[j];
  10101. }
  10102. }
  10103. }
  10104. isDanceStart8V = false;
  10105. isDanceStart8P = false;
  10106. }
  10107. if (isDanceStart11V)
  10108. {
  10109. for (int j = 0; j < maidCnt; j++)
  10110. {
  10111. if (maidArray[j] && maidArray[j].Visible)
  10112. {
  10113. if (isDanceStart11V)
  10114. {
  10115. maidArray[j].SetPos(dancePos[j]);
  10116. maidArray[j].body0.transform.localRotation = danceRot[j];
  10117. }
  10118. }
  10119. }
  10120. isDanceStart11V = false;
  10121. }
  10122. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10123. || isDanceStart13K)
  10124. {
  10125. for (int j = 0; j < maidCnt; j++)
  10126. {
  10127. if (maidArray[j] && maidArray[j].Visible)
  10128. {
  10129. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10130. || isDanceStart13K)
  10131. {
  10132. maidArray[j].SetPos(dancePos[j]);
  10133. maidArray[j].body0.transform.localRotation = danceRot[j];
  10134. int i = j;
  10135. if (!isVR)
  10136. {
  10137. delCount[i] = 20;
  10138. if (goSlot[(int)selectList[i]] != null)
  10139. {
  10140. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10141. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10142. {
  10143. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10144. }
  10145. }
  10146. }
  10147. Maid maid = maidArray[j];
  10148. maid.DelProp(MPN.handitem, true);
  10149. maid.DelProp(MPN.accvag, true);
  10150. maid.DelProp(MPN.accanl, true);
  10151. maid.DelProp(MPN.kousoku_upper, true);
  10152. maid.DelProp(MPN.kousoku_lower, true);
  10153. maid.AllProcPropSeqStart();
  10154. }
  10155. }
  10156. }
  10157. isDanceStart1K = false;
  10158. isDanceStart3K = false;
  10159. isDanceStart4K = false;
  10160. isDanceStart5K = false;
  10161. isDanceStart6K = false;
  10162. isDanceStart9K = false;
  10163. isDanceStart13K = false;
  10164. }
  10165. if (isDanceStart14V)
  10166. {
  10167. for (int j = 0; j < maidCnt; j++)
  10168. {
  10169. if (maidArray[j] && maidArray[j].Visible)
  10170. {
  10171. if (isDanceStart14V)
  10172. {
  10173. maidArray[j].SetPos(dancePos[j]);
  10174. maidArray[j].body0.transform.localRotation = danceRot[j];
  10175. }
  10176. }
  10177. }
  10178. isDanceStart14V = false;
  10179. }
  10180. if (isDanceStart15V)
  10181. {
  10182. for (int j = 0; j < maidCnt; j++)
  10183. {
  10184. if (maidArray[j] && maidArray[j].Visible)
  10185. {
  10186. if (isDanceStart15V)
  10187. {
  10188. maidArray[j].SetPos(dancePos[j]);
  10189. maidArray[j].body0.transform.localRotation = danceRot[j];
  10190. }
  10191. }
  10192. }
  10193. isDanceStart15V = false;
  10194. }
  10195. if (maidArray[1] && maidArray[1].Visible)
  10196. {
  10197. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10198. {
  10199. Vector3 vector = Vector3.zero;
  10200. vector.x = 0.6f;
  10201. maidArray[1].SetPos(vector);
  10202. if (maidArray[2] && maidArray[2].Visible)
  10203. {
  10204. vector.x = -0.6f;
  10205. maidArray[2].SetPos(vector);
  10206. }
  10207. if (maidArray[3] && maidArray[3].Visible)
  10208. {
  10209. vector.x = 1.2f;
  10210. maidArray[3].SetPos(vector);
  10211. }
  10212. if (maidArray[4] && maidArray[4].Visible)
  10213. {
  10214. vector.x = -1.2f;
  10215. maidArray[4].SetPos(vector);
  10216. }
  10217. if (maidArray[5] && maidArray[5].Visible)
  10218. {
  10219. vector.x = 1.8f;
  10220. maidArray[5].SetPos(vector);
  10221. }
  10222. if (maidArray[6] && maidArray[6].Visible)
  10223. {
  10224. vector.x = -1.8f;
  10225. maidArray[6].SetPos(vector);
  10226. }
  10227. if (maidArray[7] && maidArray[7].Visible)
  10228. {
  10229. vector.x = 2.4f;
  10230. maidArray[7].SetPos(vector);
  10231. }
  10232. if (maidArray[8] && maidArray[8].Visible)
  10233. {
  10234. vector.x = -2.4f;
  10235. maidArray[8].SetPos(vector);
  10236. }
  10237. if (maidArray[9] && maidArray[9].Visible)
  10238. {
  10239. vector.x = 3f;
  10240. maidArray[9].SetPos(vector);
  10241. }
  10242. if (maidArray[10] && maidArray[10].Visible)
  10243. {
  10244. vector.x = -3f;
  10245. maidArray[10].SetPos(vector);
  10246. }
  10247. if (maidArray[11] && maidArray[11].Visible)
  10248. {
  10249. vector.x = 3.6f;
  10250. maidArray[11].SetPos(vector);
  10251. }
  10252. if (maidArray[12] && maidArray[12].Visible)
  10253. {
  10254. vector.x = -3.6f;
  10255. maidArray[12].SetPos(vector);
  10256. }
  10257. if (maidArray[13] && maidArray[13].Visible)
  10258. {
  10259. vector.x = 4.2f;
  10260. maidArray[13].SetPos(vector);
  10261. }
  10262. }
  10263. }
  10264. isDance = true;
  10265. isDanceStart2 = true;
  10266. isF2 = false;
  10267. }
  10268. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10269. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10270. {
  10271. GameMain.Instance.SoundMgr.StopBGM(0f);
  10272. isF2 = true;
  10273. }
  10274. if (isF3)
  10275. {
  10276. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10277. string text4 = textAsset.text;
  10278. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10279. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10280. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10281. for (int j = 0; j < maidCnt; j++)
  10282. {
  10283. if (!isShift)
  10284. {
  10285. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10286. {
  10287. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10288. GameUty.FileSystem,
  10289. "dance_cm3d_002_end_f1.anm",
  10290. false,
  10291. false);
  10292. }
  10293. }
  10294. else
  10295. {
  10296. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10297. {
  10298. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10299. GameUty.FileSystem,
  10300. "dance_cm3d2_kara_001_sl_f1.anm",
  10301. false,
  10302. false);
  10303. }
  10304. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10305. text4 = textAsset.text;
  10306. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10307. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10308. && !isDanceStart9K && !isDanceStart13K)
  10309. {
  10310. dancePos[j] = maidArray[j].transform.position;
  10311. danceRot[j] = maidArray[j].transform.localRotation;
  10312. }
  10313. }
  10314. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10315. }
  10316. if (!isShift)
  10317. {
  10318. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10319. }
  10320. else
  10321. {
  10322. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10323. }
  10324. for (int j = 0; j < maidCnt; j++)
  10325. {
  10326. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10327. isStop[j] = false;
  10328. isLock[j] = false;
  10329. pHandL[j] = 0;
  10330. pHandR[j] = 0;
  10331. muneIKL[j] = false;
  10332. muneIKR[j] = false;
  10333. if (!isVR)
  10334. {
  10335. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10336. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10337. }
  10338. }
  10339. ikBui = 5;
  10340. isDanceStart1F = false;
  10341. isDanceStart2F = false;
  10342. isDanceStart3F = false;
  10343. isDanceStart4F = false;
  10344. isDanceStart5F = false;
  10345. isDanceStart6F = false;
  10346. isDanceStart7F = false;
  10347. isDanceStart8F = false;
  10348. isDanceStart9F = false;
  10349. isDanceStart10F = false;
  10350. isDanceStart11F = false;
  10351. isDanceStart12F = false;
  10352. isDanceStart13F = false;
  10353. isDanceStart14F = false;
  10354. isDanceStart15F = false;
  10355. for (int j = 0; j < maidCnt; j++)
  10356. {
  10357. danceFace[j] = 0f;
  10358. }
  10359. if (isDanceStart7V)
  10360. {
  10361. for (int j = 0; j < maidCnt; j++)
  10362. {
  10363. if (maidArray[j] && maidArray[j].Visible)
  10364. {
  10365. if (isDanceStart7V)
  10366. {
  10367. maidArray[j].SetPos(dancePos[j]);
  10368. maidArray[j].body0.transform.localRotation = danceRot[j];
  10369. }
  10370. }
  10371. }
  10372. isDanceStart7V = false;
  10373. }
  10374. if (isDanceStart8V)
  10375. {
  10376. for (int j = 0; j < maidCnt; j++)
  10377. {
  10378. if (maidArray[j] && maidArray[j].Visible)
  10379. {
  10380. if (isDanceStart8V)
  10381. {
  10382. maidArray[j].SetPos(dancePos[j]);
  10383. maidArray[j].body0.transform.localRotation = danceRot[j];
  10384. }
  10385. }
  10386. }
  10387. isDanceStart8V = false;
  10388. isDanceStart8P = false;
  10389. }
  10390. if (isDanceStart11V)
  10391. {
  10392. for (int j = 0; j < maidCnt; j++)
  10393. {
  10394. if (maidArray[j] && maidArray[j].Visible)
  10395. {
  10396. if (isDanceStart11V)
  10397. {
  10398. maidArray[j].SetPos(dancePos[j]);
  10399. maidArray[j].body0.transform.localRotation = danceRot[j];
  10400. }
  10401. }
  10402. }
  10403. isDanceStart11V = false;
  10404. }
  10405. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10406. || isDanceStart13K)
  10407. {
  10408. for (int j = 0; j < maidCnt; j++)
  10409. {
  10410. if (maidArray[j] && maidArray[j].Visible)
  10411. {
  10412. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10413. || isDanceStart13K)
  10414. {
  10415. maidArray[j].SetPos(dancePos[j]);
  10416. maidArray[j].body0.transform.localRotation = danceRot[j];
  10417. int i = j;
  10418. if (!isVR)
  10419. {
  10420. delCount[i] = 20;
  10421. if (goSlot[(int)selectList[i]] != null)
  10422. {
  10423. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10424. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10425. {
  10426. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10427. }
  10428. }
  10429. }
  10430. Maid maid = maidArray[j];
  10431. maid.DelProp(MPN.handitem, true);
  10432. maid.DelProp(MPN.accvag, true);
  10433. maid.DelProp(MPN.accanl, true);
  10434. maid.DelProp(MPN.kousoku_upper, true);
  10435. maid.DelProp(MPN.kousoku_lower, true);
  10436. maid.AllProcPropSeqStart();
  10437. }
  10438. }
  10439. }
  10440. isDanceStart1K = false;
  10441. isDanceStart3K = false;
  10442. isDanceStart4K = false;
  10443. isDanceStart5K = false;
  10444. isDanceStart6K = false;
  10445. isDanceStart9K = false;
  10446. isDanceStart13K = false;
  10447. }
  10448. if (isDanceStart14V)
  10449. {
  10450. for (int j = 0; j < maidCnt; j++)
  10451. {
  10452. if (maidArray[j] && maidArray[j].Visible)
  10453. {
  10454. if (isDanceStart14V)
  10455. {
  10456. maidArray[j].SetPos(dancePos[j]);
  10457. maidArray[j].body0.transform.localRotation = danceRot[j];
  10458. }
  10459. }
  10460. }
  10461. isDanceStart14V = false;
  10462. }
  10463. if (isDanceStart15V)
  10464. {
  10465. for (int j = 0; j < maidCnt; j++)
  10466. {
  10467. if (maidArray[j] && maidArray[j].Visible)
  10468. {
  10469. if (isDanceStart15V)
  10470. {
  10471. maidArray[j].SetPos(dancePos[j]);
  10472. maidArray[j].body0.transform.localRotation = danceRot[j];
  10473. }
  10474. }
  10475. }
  10476. isDanceStart15V = false;
  10477. }
  10478. if (maidArray[1] && maidArray[1].Visible)
  10479. {
  10480. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10481. {
  10482. Vector3 vector = Vector3.zero;
  10483. vector.x = 0.6f;
  10484. maidArray[1].SetPos(vector);
  10485. if (maidArray[2] && maidArray[2].Visible)
  10486. {
  10487. vector.x = -0.6f;
  10488. maidArray[2].SetPos(vector);
  10489. }
  10490. if (maidArray[3] && maidArray[3].Visible)
  10491. {
  10492. vector.x = 1.2f;
  10493. maidArray[3].SetPos(vector);
  10494. }
  10495. if (maidArray[4] && maidArray[4].Visible)
  10496. {
  10497. vector.x = -1.2f;
  10498. maidArray[4].SetPos(vector);
  10499. }
  10500. if (maidArray[5] && maidArray[5].Visible)
  10501. {
  10502. vector.x = 1.8f;
  10503. maidArray[5].SetPos(vector);
  10504. }
  10505. if (maidArray[6] && maidArray[6].Visible)
  10506. {
  10507. vector.x = -1.8f;
  10508. maidArray[6].SetPos(vector);
  10509. }
  10510. if (maidArray[7] && maidArray[7].Visible)
  10511. {
  10512. vector.x = 2.4f;
  10513. maidArray[7].SetPos(vector);
  10514. }
  10515. if (maidArray[8] && maidArray[8].Visible)
  10516. {
  10517. vector.x = -2.4f;
  10518. maidArray[8].SetPos(vector);
  10519. }
  10520. if (maidArray[9] && maidArray[9].Visible)
  10521. {
  10522. vector.x = 3f;
  10523. maidArray[9].SetPos(vector);
  10524. }
  10525. if (maidArray[10] && maidArray[10].Visible)
  10526. {
  10527. vector.x = -3f;
  10528. maidArray[10].SetPos(vector);
  10529. }
  10530. if (maidArray[11] && maidArray[11].Visible)
  10531. {
  10532. vector.x = 3.6f;
  10533. maidArray[11].SetPos(vector);
  10534. }
  10535. if (maidArray[12] && maidArray[12].Visible)
  10536. {
  10537. vector.x = -3.6f;
  10538. maidArray[12].SetPos(vector);
  10539. }
  10540. if (maidArray[13] && maidArray[13].Visible)
  10541. {
  10542. vector.x = 4.2f;
  10543. maidArray[13].SetPos(vector);
  10544. }
  10545. }
  10546. }
  10547. if (isShift)
  10548. {
  10549. isDanceStart3K = true;
  10550. for (int j = 0; j < maidCnt; j++)
  10551. {
  10552. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10553. maidArray[j].body0.transform.localRotation.y + 90f,
  10554. maidArray[j].body0.transform.localRotation.z));
  10555. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10556. maidArray[j].body0.transform.position.y,
  10557. maidArray[j].body0.transform.position.z + 4f));
  10558. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10559. int i = j;
  10560. Maid maid = maidArray[j];
  10561. if (!isVR)
  10562. {
  10563. delCount[i] = 20;
  10564. if (goSlot[(int)selectList[i]] != null)
  10565. {
  10566. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10567. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10568. {
  10569. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10570. }
  10571. }
  10572. }
  10573. string[] array = new string[2];
  10574. array = text2.Split(new char[] { ',' });
  10575. maid.DelProp(MPN.handitem, true);
  10576. maid.DelProp(MPN.accvag, true);
  10577. maid.DelProp(MPN.accanl, true);
  10578. maid.DelProp(MPN.kousoku_upper, true);
  10579. maid.DelProp(MPN.kousoku_lower, true);
  10580. if (array[0] != "")
  10581. {
  10582. maid.SetProp(array[0], array[1], 0, true, false);
  10583. }
  10584. maid.AllProcPropSeqStart();
  10585. }
  10586. }
  10587. isDance = true;
  10588. isDanceStart3 = true;
  10589. isF3 = false;
  10590. }
  10591. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10592. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10593. {
  10594. GameMain.Instance.SoundMgr.StopBGM(0f);
  10595. isF3 = true;
  10596. if (getModKeyPressing(modKey.Shift))
  10597. {
  10598. isShift = true;
  10599. }
  10600. }
  10601. if (isSF1 || isSF2 || isSF3)
  10602. {
  10603. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10604. string text4 = textAsset.text;
  10605. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10606. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10607. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10608. for (int j = 0; j < maidCnt; j++)
  10609. {
  10610. if (!isShift)
  10611. {
  10612. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10613. {
  10614. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10615. GameUty.FileSystem,
  10616. "dance_cm3d2_002_smt_f.anm",
  10617. false,
  10618. false);
  10619. }
  10620. }
  10621. else
  10622. {
  10623. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10624. {
  10625. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10626. GameUty.FileSystem,
  10627. "dance_cm3d2_kara02_001_smt_f1.anm",
  10628. false,
  10629. false);
  10630. }
  10631. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10632. text4 = textAsset.text;
  10633. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10634. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10635. && !isDanceStart9K && !isDanceStart13K)
  10636. {
  10637. dancePos[j] = maidArray[j].transform.position;
  10638. danceRot[j] = maidArray[j].transform.localRotation;
  10639. }
  10640. }
  10641. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10642. }
  10643. if (!isShift)
  10644. {
  10645. if (isSF1)
  10646. {
  10647. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10648. }
  10649. if (isSF2)
  10650. {
  10651. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10652. }
  10653. if (isSF3)
  10654. {
  10655. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10656. }
  10657. }
  10658. else
  10659. {
  10660. if (isSF1)
  10661. {
  10662. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10663. }
  10664. if (isSF2)
  10665. {
  10666. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10667. }
  10668. if (isSF3)
  10669. {
  10670. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10671. }
  10672. }
  10673. for (int j = 0; j < maidCnt; j++)
  10674. {
  10675. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10676. isStop[j] = false;
  10677. isLock[j] = false;
  10678. pHandL[j] = 0;
  10679. pHandR[j] = 0;
  10680. muneIKL[j] = false;
  10681. muneIKR[j] = false;
  10682. if (!isVR)
  10683. {
  10684. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10685. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10686. }
  10687. }
  10688. ikBui = 5;
  10689. isDanceStart1F = false;
  10690. isDanceStart2F = false;
  10691. isDanceStart3F = false;
  10692. isDanceStart4F = false;
  10693. isDanceStart5F = false;
  10694. isDanceStart6F = false;
  10695. isDanceStart7F = false;
  10696. isDanceStart8F = false;
  10697. isDanceStart9F = false;
  10698. isDanceStart10F = false;
  10699. isDanceStart11F = false;
  10700. isDanceStart12F = false;
  10701. isDanceStart13F = false;
  10702. isDanceStart14F = false;
  10703. isDanceStart15F = false;
  10704. for (int j = 0; j < maidCnt; j++)
  10705. {
  10706. danceFace[j] = 0f;
  10707. }
  10708. if (isDanceStart7V)
  10709. {
  10710. for (int j = 0; j < maidCnt; j++)
  10711. {
  10712. if (maidArray[j] && maidArray[j].Visible)
  10713. {
  10714. if (isDanceStart7V)
  10715. {
  10716. maidArray[j].SetPos(dancePos[j]);
  10717. maidArray[j].body0.transform.localRotation = danceRot[j];
  10718. }
  10719. }
  10720. }
  10721. isDanceStart7V = false;
  10722. }
  10723. if (isDanceStart8V)
  10724. {
  10725. for (int j = 0; j < maidCnt; j++)
  10726. {
  10727. if (maidArray[j] && maidArray[j].Visible)
  10728. {
  10729. if (isDanceStart8V)
  10730. {
  10731. maidArray[j].SetPos(dancePos[j]);
  10732. maidArray[j].body0.transform.localRotation = danceRot[j];
  10733. }
  10734. }
  10735. }
  10736. isDanceStart8V = false;
  10737. isDanceStart8P = false;
  10738. }
  10739. if (isDanceStart11V)
  10740. {
  10741. for (int j = 0; j < maidCnt; j++)
  10742. {
  10743. if (maidArray[j] && maidArray[j].Visible)
  10744. {
  10745. if (isDanceStart11V)
  10746. {
  10747. maidArray[j].SetPos(dancePos[j]);
  10748. maidArray[j].body0.transform.localRotation = danceRot[j];
  10749. }
  10750. }
  10751. }
  10752. isDanceStart11V = false;
  10753. }
  10754. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10755. || isDanceStart13K)
  10756. {
  10757. for (int j = 0; j < maidCnt; j++)
  10758. {
  10759. if (maidArray[j] && maidArray[j].Visible)
  10760. {
  10761. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10762. || isDanceStart13K)
  10763. {
  10764. maidArray[j].SetPos(dancePos[j]);
  10765. maidArray[j].body0.transform.localRotation = danceRot[j];
  10766. int i = j;
  10767. if (!isVR)
  10768. {
  10769. delCount[i] = 20;
  10770. if (goSlot[(int)selectList[i]] != null)
  10771. {
  10772. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10773. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10774. {
  10775. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10776. }
  10777. }
  10778. }
  10779. Maid maid = maidArray[j];
  10780. maid.DelProp(MPN.handitem, true);
  10781. maid.DelProp(MPN.accvag, true);
  10782. maid.DelProp(MPN.accanl, true);
  10783. maid.DelProp(MPN.kousoku_upper, true);
  10784. maid.DelProp(MPN.kousoku_lower, true);
  10785. maid.AllProcPropSeqStart();
  10786. }
  10787. }
  10788. }
  10789. isDanceStart1K = false;
  10790. isDanceStart3K = false;
  10791. isDanceStart4K = false;
  10792. isDanceStart5K = false;
  10793. isDanceStart6K = false;
  10794. isDanceStart9K = false;
  10795. isDanceStart13K = false;
  10796. }
  10797. if (isDanceStart14V)
  10798. {
  10799. for (int j = 0; j < maidCnt; j++)
  10800. {
  10801. if (maidArray[j] && maidArray[j].Visible)
  10802. {
  10803. if (isDanceStart14V)
  10804. {
  10805. maidArray[j].SetPos(dancePos[j]);
  10806. maidArray[j].body0.transform.localRotation = danceRot[j];
  10807. }
  10808. }
  10809. }
  10810. isDanceStart14V = false;
  10811. }
  10812. if (isDanceStart15V)
  10813. {
  10814. for (int j = 0; j < maidCnt; j++)
  10815. {
  10816. if (maidArray[j] && maidArray[j].Visible)
  10817. {
  10818. if (isDanceStart15V)
  10819. {
  10820. maidArray[j].SetPos(dancePos[j]);
  10821. maidArray[j].body0.transform.localRotation = danceRot[j];
  10822. }
  10823. }
  10824. }
  10825. isDanceStart15V = false;
  10826. }
  10827. if (maidArray[1] && maidArray[1].Visible)
  10828. {
  10829. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10830. {
  10831. Vector3 vector = Vector3.zero;
  10832. vector.x = 0.6f;
  10833. maidArray[1].SetPos(vector);
  10834. if (maidArray[2] && maidArray[2].Visible)
  10835. {
  10836. vector.x = -0.6f;
  10837. maidArray[2].SetPos(vector);
  10838. }
  10839. if (maidArray[3] && maidArray[3].Visible)
  10840. {
  10841. vector.x = 1.2f;
  10842. maidArray[3].SetPos(vector);
  10843. }
  10844. if (maidArray[4] && maidArray[4].Visible)
  10845. {
  10846. vector.x = -1.2f;
  10847. maidArray[4].SetPos(vector);
  10848. }
  10849. if (maidArray[5] && maidArray[5].Visible)
  10850. {
  10851. vector.x = 1.8f;
  10852. maidArray[5].SetPos(vector);
  10853. }
  10854. if (maidArray[6] && maidArray[6].Visible)
  10855. {
  10856. vector.x = -1.8f;
  10857. maidArray[6].SetPos(vector);
  10858. }
  10859. if (maidArray[7] && maidArray[7].Visible)
  10860. {
  10861. vector.x = 2.4f;
  10862. maidArray[7].SetPos(vector);
  10863. }
  10864. if (maidArray[8] && maidArray[8].Visible)
  10865. {
  10866. vector.x = -2.4f;
  10867. maidArray[8].SetPos(vector);
  10868. }
  10869. if (maidArray[9] && maidArray[9].Visible)
  10870. {
  10871. vector.x = 3f;
  10872. maidArray[9].SetPos(vector);
  10873. }
  10874. if (maidArray[10] && maidArray[10].Visible)
  10875. {
  10876. vector.x = -3f;
  10877. maidArray[10].SetPos(vector);
  10878. }
  10879. if (maidArray[11] && maidArray[11].Visible)
  10880. {
  10881. vector.x = 3.6f;
  10882. maidArray[11].SetPos(vector);
  10883. }
  10884. if (maidArray[12] && maidArray[12].Visible)
  10885. {
  10886. vector.x = -3.6f;
  10887. maidArray[12].SetPos(vector);
  10888. }
  10889. if (maidArray[13] && maidArray[13].Visible)
  10890. {
  10891. vector.x = 4.2f;
  10892. maidArray[13].SetPos(vector);
  10893. }
  10894. }
  10895. }
  10896. if (isShift)
  10897. {
  10898. isDanceStart4K = true;
  10899. for (int j = 0; j < maidCnt; j++)
  10900. {
  10901. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10902. maidArray[j].body0.transform.localRotation.y + 90f,
  10903. maidArray[j].body0.transform.localRotation.z));
  10904. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10905. maidArray[j].body0.transform.position.y,
  10906. maidArray[j].body0.transform.position.z + 4f));
  10907. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10908. int i = j;
  10909. Maid maid = maidArray[j];
  10910. if (!isVR)
  10911. {
  10912. delCount[i] = 20;
  10913. if (goSlot[(int)selectList[i]] != null)
  10914. {
  10915. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10916. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10917. {
  10918. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10919. }
  10920. }
  10921. }
  10922. string[] array = new string[2];
  10923. array = text2.Split(new char[] { ',' });
  10924. maid.DelProp(MPN.handitem, true);
  10925. maid.DelProp(MPN.accvag, true);
  10926. maid.DelProp(MPN.accanl, true);
  10927. maid.DelProp(MPN.kousoku_upper, true);
  10928. maid.DelProp(MPN.kousoku_lower, true);
  10929. if (array[0] != "")
  10930. {
  10931. maid.SetProp(array[0], array[1], 0, true, false);
  10932. }
  10933. maid.AllProcPropSeqStart();
  10934. }
  10935. }
  10936. isDance = true;
  10937. isDanceStart4 = true;
  10938. isSF1 = false;
  10939. isSF2 = false;
  10940. isSF3 = false;
  10941. }
  10942. if (isHS1 || isHS2 || isHS3)
  10943. {
  10944. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10945. string text4 = textAsset.text;
  10946. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10947. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10948. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10949. for (int j = 0; j < maidCnt; j++)
  10950. {
  10951. if (!isShift)
  10952. {
  10953. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10954. {
  10955. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10956. GameUty.FileSystem,
  10957. "dance_cm3d2_003_hs_f1.anm",
  10958. false,
  10959. false);
  10960. }
  10961. }
  10962. else
  10963. {
  10964. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10965. {
  10966. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10967. GameUty.FileSystem,
  10968. "dance_cm3d2_kara02_003_hs_f1.anm",
  10969. false,
  10970. false);
  10971. }
  10972. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10973. text4 = textAsset.text;
  10974. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10975. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10976. && !isDanceStart9K && !isDanceStart13K)
  10977. {
  10978. dancePos[j] = maidArray[j].transform.position;
  10979. danceRot[j] = maidArray[j].transform.localRotation;
  10980. }
  10981. }
  10982. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10983. }
  10984. if (!isShift)
  10985. {
  10986. if (isHS1)
  10987. {
  10988. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10989. }
  10990. if (isHS2)
  10991. {
  10992. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10993. }
  10994. if (isHS3)
  10995. {
  10996. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10997. }
  10998. }
  10999. else
  11000. {
  11001. if (isHS1)
  11002. {
  11003. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11004. }
  11005. if (isHS2)
  11006. {
  11007. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11008. }
  11009. if (isHS3)
  11010. {
  11011. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11012. }
  11013. }
  11014. for (int j = 0; j < maidCnt; j++)
  11015. {
  11016. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11017. isStop[j] = false;
  11018. isLock[j] = false;
  11019. pHandL[j] = 0;
  11020. pHandR[j] = 0;
  11021. muneIKL[j] = false;
  11022. muneIKR[j] = false;
  11023. if (!isVR)
  11024. {
  11025. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11026. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11027. }
  11028. }
  11029. ikBui = 5;
  11030. isDanceStart1F = false;
  11031. isDanceStart2F = false;
  11032. isDanceStart3F = false;
  11033. isDanceStart4F = false;
  11034. isDanceStart5F = false;
  11035. isDanceStart6F = false;
  11036. isDanceStart7F = false;
  11037. isDanceStart8F = false;
  11038. isDanceStart9F = false;
  11039. isDanceStart10F = false;
  11040. isDanceStart11F = false;
  11041. isDanceStart12F = false;
  11042. isDanceStart13F = false;
  11043. isDanceStart14F = false;
  11044. isDanceStart15F = false;
  11045. for (int j = 0; j < maidCnt; j++)
  11046. {
  11047. danceFace[j] = 0f;
  11048. }
  11049. if (isDanceStart7V)
  11050. {
  11051. for (int j = 0; j < maidCnt; j++)
  11052. {
  11053. if (maidArray[j] && maidArray[j].Visible)
  11054. {
  11055. if (isDanceStart7V)
  11056. {
  11057. maidArray[j].SetPos(dancePos[j]);
  11058. maidArray[j].body0.transform.localRotation = danceRot[j];
  11059. }
  11060. }
  11061. }
  11062. isDanceStart7V = false;
  11063. }
  11064. if (isDanceStart8V)
  11065. {
  11066. for (int j = 0; j < maidCnt; j++)
  11067. {
  11068. if (maidArray[j] && maidArray[j].Visible)
  11069. {
  11070. if (isDanceStart8V)
  11071. {
  11072. maidArray[j].SetPos(dancePos[j]);
  11073. maidArray[j].body0.transform.localRotation = danceRot[j];
  11074. }
  11075. }
  11076. }
  11077. isDanceStart8V = false;
  11078. isDanceStart8P = false;
  11079. }
  11080. if (isDanceStart11V)
  11081. {
  11082. for (int j = 0; j < maidCnt; j++)
  11083. {
  11084. if (maidArray[j] && maidArray[j].Visible)
  11085. {
  11086. if (isDanceStart11V)
  11087. {
  11088. maidArray[j].SetPos(dancePos[j]);
  11089. maidArray[j].body0.transform.localRotation = danceRot[j];
  11090. }
  11091. }
  11092. }
  11093. isDanceStart11V = false;
  11094. }
  11095. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11096. || isDanceStart13K)
  11097. {
  11098. for (int j = 0; j < maidCnt; j++)
  11099. {
  11100. if (maidArray[j] && maidArray[j].Visible)
  11101. {
  11102. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11103. || isDanceStart13K)
  11104. {
  11105. maidArray[j].SetPos(dancePos[j]);
  11106. maidArray[j].body0.transform.localRotation = danceRot[j];
  11107. int i = j;
  11108. if (!isVR)
  11109. {
  11110. delCount[i] = 20;
  11111. if (goSlot[(int)selectList[i]] != null)
  11112. {
  11113. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11114. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11115. {
  11116. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11117. }
  11118. }
  11119. }
  11120. Maid maid = maidArray[j];
  11121. maid.DelProp(MPN.handitem, true);
  11122. maid.DelProp(MPN.accvag, true);
  11123. maid.DelProp(MPN.accanl, true);
  11124. maid.DelProp(MPN.kousoku_upper, true);
  11125. maid.DelProp(MPN.kousoku_lower, true);
  11126. maid.AllProcPropSeqStart();
  11127. }
  11128. }
  11129. }
  11130. isDanceStart1K = false;
  11131. isDanceStart3K = false;
  11132. isDanceStart4K = false;
  11133. isDanceStart5K = false;
  11134. isDanceStart6K = false;
  11135. isDanceStart9K = false;
  11136. isDanceStart13K = false;
  11137. }
  11138. if (isDanceStart14V)
  11139. {
  11140. for (int j = 0; j < maidCnt; j++)
  11141. {
  11142. if (maidArray[j] && maidArray[j].Visible)
  11143. {
  11144. if (isDanceStart14V)
  11145. {
  11146. maidArray[j].SetPos(dancePos[j]);
  11147. maidArray[j].body0.transform.localRotation = danceRot[j];
  11148. }
  11149. }
  11150. }
  11151. isDanceStart14V = false;
  11152. }
  11153. if (isDanceStart15V)
  11154. {
  11155. for (int j = 0; j < maidCnt; j++)
  11156. {
  11157. if (maidArray[j] && maidArray[j].Visible)
  11158. {
  11159. if (isDanceStart15V)
  11160. {
  11161. maidArray[j].SetPos(dancePos[j]);
  11162. maidArray[j].body0.transform.localRotation = danceRot[j];
  11163. }
  11164. }
  11165. }
  11166. isDanceStart15V = false;
  11167. }
  11168. if (maidArray[1] && maidArray[1].Visible)
  11169. {
  11170. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11171. {
  11172. Vector3 vector = Vector3.zero;
  11173. vector.x = 0.6f;
  11174. maidArray[1].SetPos(vector);
  11175. if (maidArray[2] && maidArray[2].Visible)
  11176. {
  11177. vector.x = -0.6f;
  11178. maidArray[2].SetPos(vector);
  11179. }
  11180. if (maidArray[3] && maidArray[3].Visible)
  11181. {
  11182. vector.x = 1.2f;
  11183. maidArray[3].SetPos(vector);
  11184. }
  11185. if (maidArray[4] && maidArray[4].Visible)
  11186. {
  11187. vector.x = -1.2f;
  11188. maidArray[4].SetPos(vector);
  11189. }
  11190. if (maidArray[5] && maidArray[5].Visible)
  11191. {
  11192. vector.x = 1.8f;
  11193. maidArray[5].SetPos(vector);
  11194. }
  11195. if (maidArray[6] && maidArray[6].Visible)
  11196. {
  11197. vector.x = -1.8f;
  11198. maidArray[6].SetPos(vector);
  11199. }
  11200. if (maidArray[7] && maidArray[7].Visible)
  11201. {
  11202. vector.x = 2.4f;
  11203. maidArray[7].SetPos(vector);
  11204. }
  11205. if (maidArray[8] && maidArray[8].Visible)
  11206. {
  11207. vector.x = -2.4f;
  11208. maidArray[8].SetPos(vector);
  11209. }
  11210. if (maidArray[9] && maidArray[9].Visible)
  11211. {
  11212. vector.x = 3f;
  11213. maidArray[9].SetPos(vector);
  11214. }
  11215. if (maidArray[10] && maidArray[10].Visible)
  11216. {
  11217. vector.x = -3f;
  11218. maidArray[10].SetPos(vector);
  11219. }
  11220. if (maidArray[11] && maidArray[11].Visible)
  11221. {
  11222. vector.x = 3.6f;
  11223. maidArray[11].SetPos(vector);
  11224. }
  11225. if (maidArray[12] && maidArray[12].Visible)
  11226. {
  11227. vector.x = -3.6f;
  11228. maidArray[12].SetPos(vector);
  11229. }
  11230. if (maidArray[13] && maidArray[13].Visible)
  11231. {
  11232. vector.x = 4.2f;
  11233. maidArray[13].SetPos(vector);
  11234. }
  11235. }
  11236. }
  11237. if (isShift)
  11238. {
  11239. isDanceStart6K = true;
  11240. for (int j = 0; j < maidCnt; j++)
  11241. {
  11242. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11243. maidArray[j].body0.transform.localRotation.y + 90f,
  11244. maidArray[j].body0.transform.localRotation.z));
  11245. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11246. maidArray[j].body0.transform.position.y,
  11247. maidArray[j].body0.transform.position.z + 4f));
  11248. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11249. int i = j;
  11250. Maid maid = maidArray[j];
  11251. if (!isVR)
  11252. {
  11253. delCount[i] = 20;
  11254. if (goSlot[(int)selectList[i]] != null)
  11255. {
  11256. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11257. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11258. {
  11259. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11260. }
  11261. }
  11262. }
  11263. string[] array = new string[2];
  11264. array = text2.Split(new char[] { ',' });
  11265. maid.DelProp(MPN.handitem, true);
  11266. maid.DelProp(MPN.accvag, true);
  11267. maid.DelProp(MPN.accanl, true);
  11268. maid.DelProp(MPN.kousoku_upper, true);
  11269. maid.DelProp(MPN.kousoku_lower, true);
  11270. if (array[0] != "")
  11271. {
  11272. maid.SetProp(array[0], array[1], 0, true, false);
  11273. }
  11274. maid.AllProcPropSeqStart();
  11275. }
  11276. }
  11277. isDance = true;
  11278. isDanceStart6 = true;
  11279. isHS1 = false;
  11280. isHS2 = false;
  11281. isHS3 = false;
  11282. }
  11283. if (isHS4 || isHS5 || isHS6)
  11284. {
  11285. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11286. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11287. for (int j = 0; j < maidCnt; j++)
  11288. {
  11289. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11290. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11291. switch (j)
  11292. {
  11293. case 1:
  11294. case 3:
  11295. case 5:
  11296. case 7:
  11297. case 9:
  11298. case 11:
  11299. case 13:
  11300. text5 = "dance_cm3d2_003_hs_f2.anm";
  11301. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11302. break;
  11303. }
  11304. if (maidArray[j] && maidArray[j].Visible)
  11305. {
  11306. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11307. {
  11308. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11309. }
  11310. string text4 = textAsset.text;
  11311. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11312. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11313. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11314. }
  11315. }
  11316. if (isHS4)
  11317. {
  11318. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11319. }
  11320. if (isHS5)
  11321. {
  11322. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11323. }
  11324. if (isHS6)
  11325. {
  11326. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11327. }
  11328. ikBui = 5;
  11329. isDanceStart1F = false;
  11330. isDanceStart2F = false;
  11331. isDanceStart3F = false;
  11332. isDanceStart4F = false;
  11333. isDanceStart5F = false;
  11334. isDanceStart6F = false;
  11335. isDanceStart7F = false;
  11336. isDanceStart8F = false;
  11337. isDanceStart9F = false;
  11338. isDanceStart10F = false;
  11339. isDanceStart11F = false;
  11340. isDanceStart12F = false;
  11341. isDanceStart13F = false;
  11342. isDanceStart14F = false;
  11343. isDanceStart15F = false;
  11344. for (int j = 0; j < maidCnt; j++)
  11345. {
  11346. danceFace[j] = 0f;
  11347. }
  11348. if (isDanceStart7V)
  11349. {
  11350. for (int j = 0; j < maidCnt; j++)
  11351. {
  11352. if (maidArray[j] && maidArray[j].Visible)
  11353. {
  11354. if (isDanceStart7V)
  11355. {
  11356. maidArray[j].SetPos(dancePos[j]);
  11357. maidArray[j].body0.transform.localRotation = danceRot[j];
  11358. }
  11359. }
  11360. }
  11361. isDanceStart7V = false;
  11362. }
  11363. if (isDanceStart8V)
  11364. {
  11365. for (int j = 0; j < maidCnt; j++)
  11366. {
  11367. if (maidArray[j] && maidArray[j].Visible)
  11368. {
  11369. if (isDanceStart8V)
  11370. {
  11371. maidArray[j].SetPos(dancePos[j]);
  11372. maidArray[j].body0.transform.localRotation = danceRot[j];
  11373. }
  11374. }
  11375. }
  11376. isDanceStart8V = false;
  11377. isDanceStart8P = false;
  11378. }
  11379. if (isDanceStart11V)
  11380. {
  11381. for (int j = 0; j < maidCnt; j++)
  11382. {
  11383. if (maidArray[j] && maidArray[j].Visible)
  11384. {
  11385. if (isDanceStart11V)
  11386. {
  11387. maidArray[j].SetPos(dancePos[j]);
  11388. maidArray[j].body0.transform.localRotation = danceRot[j];
  11389. }
  11390. }
  11391. }
  11392. isDanceStart11V = false;
  11393. }
  11394. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11395. || isDanceStart13K)
  11396. {
  11397. for (int j = 0; j < maidCnt; j++)
  11398. {
  11399. if (maidArray[j] && maidArray[j].Visible)
  11400. {
  11401. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11402. || isDanceStart13K)
  11403. {
  11404. maidArray[j].SetPos(dancePos[j]);
  11405. maidArray[j].body0.transform.localRotation = danceRot[j];
  11406. int i = j;
  11407. if (!isVR)
  11408. {
  11409. delCount[i] = 20;
  11410. if (goSlot[(int)selectList[i]] != null)
  11411. {
  11412. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11413. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11414. {
  11415. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11416. }
  11417. }
  11418. }
  11419. Maid maid = maidArray[j];
  11420. maid.DelProp(MPN.handitem, true);
  11421. maid.DelProp(MPN.accvag, true);
  11422. maid.DelProp(MPN.accanl, true);
  11423. maid.DelProp(MPN.kousoku_upper, true);
  11424. maid.DelProp(MPN.kousoku_lower, true);
  11425. maid.AllProcPropSeqStart();
  11426. }
  11427. }
  11428. }
  11429. isDanceStart1K = false;
  11430. isDanceStart3K = false;
  11431. isDanceStart4K = false;
  11432. isDanceStart5K = false;
  11433. isDanceStart6K = false;
  11434. isDanceStart9K = false;
  11435. isDanceStart13K = false;
  11436. }
  11437. if (isDanceStart14V)
  11438. {
  11439. for (int j = 0; j < maidCnt; j++)
  11440. {
  11441. if (maidArray[j] && maidArray[j].Visible)
  11442. {
  11443. if (isDanceStart14V)
  11444. {
  11445. maidArray[j].SetPos(dancePos[j]);
  11446. maidArray[j].body0.transform.localRotation = danceRot[j];
  11447. }
  11448. }
  11449. }
  11450. isDanceStart14V = false;
  11451. }
  11452. if (isDanceStart15V)
  11453. {
  11454. for (int j = 0; j < maidCnt; j++)
  11455. {
  11456. if (maidArray[j] && maidArray[j].Visible)
  11457. {
  11458. if (isDanceStart15V)
  11459. {
  11460. maidArray[j].SetPos(dancePos[j]);
  11461. maidArray[j].body0.transform.localRotation = danceRot[j];
  11462. }
  11463. }
  11464. }
  11465. isDanceStart15V = false;
  11466. }
  11467. for (int j = 0; j < maidCnt; j++)
  11468. {
  11469. isStop[j] = false;
  11470. isLock[j] = false;
  11471. pHandL[j] = 0;
  11472. pHandR[j] = 0;
  11473. muneIKL[j] = false;
  11474. muneIKR[j] = false;
  11475. if (!isVR)
  11476. {
  11477. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11478. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11479. }
  11480. if (maidArray[j].transform.position.y != 100f)
  11481. {
  11482. dancePos[j] = maidArray[j].transform.position;
  11483. }
  11484. else
  11485. {
  11486. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11487. }
  11488. danceRot[j] = maidArray[j].transform.localRotation;
  11489. }
  11490. if (maidArray[1] && maidArray[1].Visible)
  11491. {
  11492. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11493. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11494. }
  11495. if (maidArray[3] && maidArray[3].Visible)
  11496. {
  11497. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11498. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11499. }
  11500. if (maidArray[5] && maidArray[5].Visible)
  11501. {
  11502. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11503. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11504. }
  11505. if (maidArray[7] && maidArray[7].Visible)
  11506. {
  11507. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11508. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11509. }
  11510. if (maidArray[9] && maidArray[9].Visible)
  11511. {
  11512. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11513. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11514. }
  11515. if (maidArray[11] && maidArray[11].Visible)
  11516. {
  11517. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11518. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11519. }
  11520. if (maidArray[13] && maidArray[13].Visible)
  11521. {
  11522. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11523. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11524. }
  11525. if (maidArray[2] && maidArray[2].Visible)
  11526. {
  11527. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11528. {
  11529. Vector3 vector = Vector3.zero;
  11530. vector.x = 0.6f;
  11531. maidArray[1].SetPos(vector);
  11532. if (maidArray[2] && maidArray[2].Visible)
  11533. {
  11534. vector.x = -0.6f;
  11535. maidArray[2].SetPos(vector);
  11536. }
  11537. if (maidArray[3] && maidArray[3].Visible)
  11538. {
  11539. vector.x = 1.2f;
  11540. maidArray[3].SetPos(vector);
  11541. }
  11542. if (maidArray[4] && maidArray[4].Visible)
  11543. {
  11544. vector.x = -1.2f;
  11545. maidArray[4].SetPos(vector);
  11546. }
  11547. if (maidArray[5] && maidArray[5].Visible)
  11548. {
  11549. vector.x = 1.8f;
  11550. maidArray[5].SetPos(vector);
  11551. }
  11552. if (maidArray[6] && maidArray[6].Visible)
  11553. {
  11554. vector.x = -1.8f;
  11555. maidArray[6].SetPos(vector);
  11556. }
  11557. if (maidArray[7] && maidArray[7].Visible)
  11558. {
  11559. vector.x = 2.4f;
  11560. maidArray[7].SetPos(vector);
  11561. }
  11562. if (maidArray[8] && maidArray[8].Visible)
  11563. {
  11564. vector.x = -2.4f;
  11565. maidArray[8].SetPos(vector);
  11566. }
  11567. if (maidArray[9] && maidArray[9].Visible)
  11568. {
  11569. vector.x = 3f;
  11570. maidArray[9].SetPos(vector);
  11571. }
  11572. if (maidArray[10] && maidArray[10].Visible)
  11573. {
  11574. vector.x = -3f;
  11575. maidArray[10].SetPos(vector);
  11576. }
  11577. if (maidArray[11] && maidArray[11].Visible)
  11578. {
  11579. vector.x = 3.6f;
  11580. maidArray[11].SetPos(vector);
  11581. }
  11582. if (maidArray[12] && maidArray[12].Visible)
  11583. {
  11584. vector.x = -3.6f;
  11585. maidArray[12].SetPos(vector);
  11586. }
  11587. if (maidArray[13] && maidArray[13].Visible)
  11588. {
  11589. vector.x = 4.2f;
  11590. maidArray[13].SetPos(vector);
  11591. }
  11592. }
  11593. }
  11594. isDance = true;
  11595. isDanceStart7 = true;
  11596. isHS4 = false;
  11597. isHS5 = false;
  11598. isHS6 = false;
  11599. }
  11600. if (isHS7 || isHS8 || isHS9)
  11601. {
  11602. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11603. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11604. for (int j = 0; j < maidCnt; j++)
  11605. {
  11606. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11607. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11608. switch (j)
  11609. {
  11610. case 1:
  11611. case 5:
  11612. case 9:
  11613. case 13:
  11614. text5 = "dance_cm3d2_003_hs_f2.anm";
  11615. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11616. break;
  11617. case 2:
  11618. case 6:
  11619. case 10:
  11620. text5 = "dance_cm3d2_003_hs_f3.anm";
  11621. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11622. break;
  11623. case 3:
  11624. case 7:
  11625. case 11:
  11626. text5 = "dance_cm3d2_003_hs_f4.anm";
  11627. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11628. break;
  11629. }
  11630. if (maidArray[j] && maidArray[j].Visible)
  11631. {
  11632. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11633. {
  11634. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11635. }
  11636. }
  11637. string text4 = textAsset.text;
  11638. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11639. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11640. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11641. }
  11642. if (isHS7)
  11643. {
  11644. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11645. }
  11646. if (isHS8)
  11647. {
  11648. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11649. }
  11650. if (isHS9)
  11651. {
  11652. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11653. }
  11654. ikBui = 5;
  11655. isDanceStart1F = false;
  11656. isDanceStart2F = false;
  11657. isDanceStart3F = false;
  11658. isDanceStart4F = false;
  11659. isDanceStart5F = false;
  11660. isDanceStart6F = false;
  11661. isDanceStart7F = false;
  11662. isDanceStart8F = false;
  11663. isDanceStart9F = false;
  11664. isDanceStart10F = false;
  11665. isDanceStart11F = false;
  11666. isDanceStart12F = false;
  11667. isDanceStart13F = false;
  11668. isDanceStart14F = false;
  11669. isDanceStart15F = false;
  11670. for (int j = 0; j < maidCnt; j++)
  11671. {
  11672. danceFace[j] = 0f;
  11673. }
  11674. if (isDanceStart8V)
  11675. {
  11676. for (int j = 0; j < maidCnt; j++)
  11677. {
  11678. if (maidArray[j] && maidArray[j].Visible)
  11679. {
  11680. if (isDanceStart8V)
  11681. {
  11682. maidArray[j].SetPos(dancePos[j]);
  11683. maidArray[j].body0.transform.localRotation = danceRot[j];
  11684. }
  11685. }
  11686. }
  11687. isDanceStart8V = false;
  11688. isDanceStart8P = false;
  11689. }
  11690. for (int j = 0; j < maidCnt; j++)
  11691. {
  11692. isStop[j] = false;
  11693. isLock[j] = false;
  11694. pHandL[j] = 0;
  11695. pHandR[j] = 0;
  11696. muneIKL[j] = false;
  11697. muneIKR[j] = false;
  11698. if (!isVR)
  11699. {
  11700. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11701. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11702. }
  11703. if (maidArray[j].transform.position.y != 100f)
  11704. {
  11705. dancePos[j] = maidArray[j].transform.position;
  11706. }
  11707. else
  11708. {
  11709. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11710. }
  11711. danceRot[j] = maidArray[j].transform.localRotation;
  11712. }
  11713. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11714. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11715. {
  11716. maidArray[0].SetPos(Vector3.zero);
  11717. maidArray[0].SetRot(Vector3.zero);
  11718. }
  11719. if (maidArray[1] && maidArray[1].Visible)
  11720. {
  11721. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11722. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11723. }
  11724. if (maidArray[2] && maidArray[2].Visible)
  11725. {
  11726. maidArray[2].SetPos(maidArray[0].transform.position);
  11727. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11728. }
  11729. if (maidArray[3] && maidArray[3].Visible)
  11730. {
  11731. maidArray[3].SetPos(maidArray[0].transform.position);
  11732. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11733. }
  11734. if (maidArray[5] && maidArray[5].Visible)
  11735. {
  11736. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11737. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11738. }
  11739. if (maidArray[6] && maidArray[6].Visible)
  11740. {
  11741. maidArray[6].SetPos(maidArray[4].transform.position);
  11742. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11743. }
  11744. if (maidArray[7] && maidArray[7].Visible)
  11745. {
  11746. maidArray[7].SetPos(maidArray[4].transform.position);
  11747. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11748. }
  11749. if (maidArray[9] && maidArray[9].Visible)
  11750. {
  11751. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11752. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11753. }
  11754. if (maidArray[10] && maidArray[10].Visible)
  11755. {
  11756. maidArray[10].SetPos(maidArray[8].transform.position);
  11757. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11758. }
  11759. if (maidArray[11] && maidArray[11].Visible)
  11760. {
  11761. maidArray[11].SetPos(maidArray[8].transform.position);
  11762. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11763. }
  11764. if (maidArray[13] && maidArray[13].Visible)
  11765. {
  11766. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11767. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11768. }
  11769. if (maidArray[4] && maidArray[4].Visible)
  11770. {
  11771. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11772. {
  11773. Vector3 vector = Vector3.zero;
  11774. vector.x = 0.6f;
  11775. maidArray[1].SetPos(vector);
  11776. if (maidArray[2] && maidArray[2].Visible)
  11777. {
  11778. vector.x = -0.6f;
  11779. maidArray[2].SetPos(vector);
  11780. }
  11781. if (maidArray[3] && maidArray[3].Visible)
  11782. {
  11783. vector.x = 1.2f;
  11784. maidArray[3].SetPos(vector);
  11785. }
  11786. if (maidArray[4] && maidArray[4].Visible)
  11787. {
  11788. vector.x = -1.2f;
  11789. maidArray[4].SetPos(vector);
  11790. }
  11791. if (maidArray[5] && maidArray[5].Visible)
  11792. {
  11793. vector.x = 1.8f;
  11794. maidArray[5].SetPos(vector);
  11795. }
  11796. if (maidArray[6] && maidArray[6].Visible)
  11797. {
  11798. vector.x = -1.8f;
  11799. maidArray[6].SetPos(vector);
  11800. }
  11801. if (maidArray[7] && maidArray[7].Visible)
  11802. {
  11803. vector.x = 2.4f;
  11804. maidArray[7].SetPos(vector);
  11805. }
  11806. if (maidArray[8] && maidArray[8].Visible)
  11807. {
  11808. vector.x = -2.4f;
  11809. maidArray[8].SetPos(vector);
  11810. }
  11811. if (maidArray[9] && maidArray[9].Visible)
  11812. {
  11813. vector.x = 3f;
  11814. maidArray[9].SetPos(vector);
  11815. }
  11816. if (maidArray[10] && maidArray[10].Visible)
  11817. {
  11818. vector.x = -3f;
  11819. maidArray[10].SetPos(vector);
  11820. }
  11821. if (maidArray[11] && maidArray[11].Visible)
  11822. {
  11823. vector.x = 3.6f;
  11824. maidArray[11].SetPos(vector);
  11825. }
  11826. if (maidArray[12] && maidArray[12].Visible)
  11827. {
  11828. vector.x = -3.6f;
  11829. maidArray[12].SetPos(vector);
  11830. }
  11831. if (maidArray[13] && maidArray[13].Visible)
  11832. {
  11833. vector.x = 4.2f;
  11834. maidArray[13].SetPos(vector);
  11835. }
  11836. }
  11837. }
  11838. isDance = true;
  11839. isDanceStart8 = true;
  11840. isHS7 = false;
  11841. isHS8 = false;
  11842. isHS9 = false;
  11843. }
  11844. if (isCF1)
  11845. {
  11846. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11847. string text4 = textAsset.text;
  11848. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11849. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11850. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11851. for (int j = 0; j < maidCnt; j++)
  11852. {
  11853. if (!isShift)
  11854. {
  11855. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11856. {
  11857. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11858. GameUty.FileSystem,
  11859. "dance_cm3d_003_sp2_f1.anm",
  11860. false,
  11861. false);
  11862. }
  11863. }
  11864. else
  11865. {
  11866. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11867. {
  11868. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11869. GameUty.FileSystem,
  11870. "dance_cm3d2_kara02_002_rty_f1.anm",
  11871. false,
  11872. false);
  11873. }
  11874. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11875. text4 = textAsset.text;
  11876. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11877. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11878. && !isDanceStart9K && !isDanceStart13K)
  11879. {
  11880. dancePos[j] = maidArray[j].transform.position;
  11881. danceRot[j] = maidArray[j].transform.localRotation;
  11882. }
  11883. }
  11884. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11885. }
  11886. if (!isShift)
  11887. {
  11888. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11889. }
  11890. else
  11891. {
  11892. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11893. }
  11894. for (int j = 0; j < maidCnt; j++)
  11895. {
  11896. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11897. isStop[j] = false;
  11898. isLock[j] = false;
  11899. pHandL[j] = 0;
  11900. pHandR[j] = 0;
  11901. muneIKL[j] = false;
  11902. muneIKR[j] = false;
  11903. if (!isVR)
  11904. {
  11905. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11906. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11907. }
  11908. }
  11909. ikBui = 5;
  11910. isDanceStart1F = false;
  11911. isDanceStart2F = false;
  11912. isDanceStart3F = false;
  11913. isDanceStart4F = false;
  11914. isDanceStart5F = false;
  11915. isDanceStart6F = false;
  11916. isDanceStart7F = false;
  11917. isDanceStart8F = false;
  11918. isDanceStart9F = false;
  11919. isDanceStart10F = false;
  11920. isDanceStart11F = false;
  11921. isDanceStart12F = false;
  11922. isDanceStart13F = false;
  11923. isDanceStart14F = false;
  11924. isDanceStart15F = false;
  11925. for (int j = 0; j < maidCnt; j++)
  11926. {
  11927. danceFace[j] = 0f;
  11928. }
  11929. if (isDanceStart7V)
  11930. {
  11931. for (int j = 0; j < maidCnt; j++)
  11932. {
  11933. if (maidArray[j] && maidArray[j].Visible)
  11934. {
  11935. if (isDanceStart7V)
  11936. {
  11937. maidArray[j].SetPos(dancePos[j]);
  11938. maidArray[j].body0.transform.localRotation = danceRot[j];
  11939. }
  11940. }
  11941. }
  11942. isDanceStart7V = false;
  11943. }
  11944. if (isDanceStart8V)
  11945. {
  11946. for (int j = 0; j < maidCnt; j++)
  11947. {
  11948. if (maidArray[j] && maidArray[j].Visible)
  11949. {
  11950. if (isDanceStart8V)
  11951. {
  11952. maidArray[j].SetPos(dancePos[j]);
  11953. maidArray[j].body0.transform.localRotation = danceRot[j];
  11954. }
  11955. }
  11956. }
  11957. isDanceStart8V = false;
  11958. isDanceStart8P = false;
  11959. }
  11960. if (isDanceStart11V)
  11961. {
  11962. for (int j = 0; j < maidCnt; j++)
  11963. {
  11964. if (maidArray[j] && maidArray[j].Visible)
  11965. {
  11966. if (isDanceStart11V)
  11967. {
  11968. maidArray[j].SetPos(dancePos[j]);
  11969. maidArray[j].body0.transform.localRotation = danceRot[j];
  11970. }
  11971. }
  11972. }
  11973. isDanceStart11V = false;
  11974. }
  11975. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11976. || isDanceStart13K)
  11977. {
  11978. for (int j = 0; j < maidCnt; j++)
  11979. {
  11980. if (maidArray[j] && maidArray[j].Visible)
  11981. {
  11982. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11983. || isDanceStart13K)
  11984. {
  11985. maidArray[j].SetPos(dancePos[j]);
  11986. maidArray[j].body0.transform.localRotation = danceRot[j];
  11987. int i = j;
  11988. if (!isVR)
  11989. {
  11990. delCount[i] = 20;
  11991. if (goSlot[(int)selectList[i]] != null)
  11992. {
  11993. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11994. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11995. {
  11996. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11997. }
  11998. }
  11999. }
  12000. Maid maid = maidArray[j];
  12001. maid.DelProp(MPN.handitem, true);
  12002. maid.DelProp(MPN.accvag, true);
  12003. maid.DelProp(MPN.accanl, true);
  12004. maid.DelProp(MPN.kousoku_upper, true);
  12005. maid.DelProp(MPN.kousoku_lower, true);
  12006. maid.AllProcPropSeqStart();
  12007. }
  12008. }
  12009. }
  12010. isDanceStart1K = false;
  12011. isDanceStart3K = false;
  12012. isDanceStart4K = false;
  12013. isDanceStart5K = false;
  12014. isDanceStart6K = false;
  12015. isDanceStart9K = false;
  12016. isDanceStart13K = false;
  12017. }
  12018. if (isDanceStart14V)
  12019. {
  12020. for (int j = 0; j < maidCnt; j++)
  12021. {
  12022. if (maidArray[j] && maidArray[j].Visible)
  12023. {
  12024. if (isDanceStart14V)
  12025. {
  12026. maidArray[j].SetPos(dancePos[j]);
  12027. maidArray[j].body0.transform.localRotation = danceRot[j];
  12028. }
  12029. }
  12030. }
  12031. isDanceStart14V = false;
  12032. }
  12033. if (isDanceStart15V)
  12034. {
  12035. for (int j = 0; j < maidCnt; j++)
  12036. {
  12037. if (maidArray[j] && maidArray[j].Visible)
  12038. {
  12039. if (isDanceStart15V)
  12040. {
  12041. maidArray[j].SetPos(dancePos[j]);
  12042. maidArray[j].body0.transform.localRotation = danceRot[j];
  12043. }
  12044. }
  12045. }
  12046. isDanceStart15V = false;
  12047. }
  12048. if (maidArray[1] && maidArray[1].Visible)
  12049. {
  12050. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12051. {
  12052. Vector3 vector = Vector3.zero;
  12053. vector.x = 0.6f;
  12054. maidArray[1].SetPos(vector);
  12055. if (maidArray[2] && maidArray[2].Visible)
  12056. {
  12057. vector.x = -0.6f;
  12058. maidArray[2].SetPos(vector);
  12059. }
  12060. if (maidArray[3] && maidArray[3].Visible)
  12061. {
  12062. vector.x = 1.2f;
  12063. maidArray[3].SetPos(vector);
  12064. }
  12065. if (maidArray[4] && maidArray[4].Visible)
  12066. {
  12067. vector.x = -1.2f;
  12068. maidArray[4].SetPos(vector);
  12069. }
  12070. if (maidArray[5] && maidArray[5].Visible)
  12071. {
  12072. vector.x = 1.8f;
  12073. maidArray[5].SetPos(vector);
  12074. }
  12075. if (maidArray[6] && maidArray[6].Visible)
  12076. {
  12077. vector.x = -1.8f;
  12078. maidArray[6].SetPos(vector);
  12079. }
  12080. if (maidArray[7] && maidArray[7].Visible)
  12081. {
  12082. vector.x = 2.4f;
  12083. maidArray[7].SetPos(vector);
  12084. }
  12085. if (maidArray[8] && maidArray[8].Visible)
  12086. {
  12087. vector.x = -2.4f;
  12088. maidArray[8].SetPos(vector);
  12089. }
  12090. if (maidArray[9] && maidArray[9].Visible)
  12091. {
  12092. vector.x = 3f;
  12093. maidArray[9].SetPos(vector);
  12094. }
  12095. if (maidArray[10] && maidArray[10].Visible)
  12096. {
  12097. vector.x = -3f;
  12098. maidArray[10].SetPos(vector);
  12099. }
  12100. if (maidArray[11] && maidArray[11].Visible)
  12101. {
  12102. vector.x = 3.6f;
  12103. maidArray[11].SetPos(vector);
  12104. }
  12105. if (maidArray[12] && maidArray[12].Visible)
  12106. {
  12107. vector.x = -3.6f;
  12108. maidArray[12].SetPos(vector);
  12109. }
  12110. if (maidArray[13] && maidArray[13].Visible)
  12111. {
  12112. vector.x = 4.2f;
  12113. maidArray[13].SetPos(vector);
  12114. }
  12115. }
  12116. }
  12117. if (isShift)
  12118. {
  12119. isDanceStart5K = true;
  12120. for (int j = 0; j < maidCnt; j++)
  12121. {
  12122. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12123. maidArray[j].body0.transform.localRotation.y + 90f,
  12124. maidArray[j].body0.transform.localRotation.z));
  12125. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12126. maidArray[j].body0.transform.position.y,
  12127. maidArray[j].body0.transform.position.z + 4f));
  12128. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12129. int i = j;
  12130. Maid maid = maidArray[j];
  12131. if (!isVR)
  12132. {
  12133. delCount[i] = 20;
  12134. if (goSlot[(int)selectList[i]] != null)
  12135. {
  12136. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12137. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12138. {
  12139. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12140. }
  12141. }
  12142. }
  12143. string[] array = new string[2];
  12144. array = text2.Split(new char[] { ',' });
  12145. maid.DelProp(MPN.handitem, true);
  12146. maid.DelProp(MPN.accvag, true);
  12147. maid.DelProp(MPN.accanl, true);
  12148. maid.DelProp(MPN.kousoku_upper, true);
  12149. maid.DelProp(MPN.kousoku_lower, true);
  12150. if (array[0] != "")
  12151. {
  12152. maid.SetProp(array[0], array[1], 0, true, false);
  12153. }
  12154. maid.AllProcPropSeqStart();
  12155. }
  12156. }
  12157. isDance = true;
  12158. isDanceStart5 = true;
  12159. isCF1 = false;
  12160. }
  12161. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12162. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12163. {
  12164. GameMain.Instance.SoundMgr.StopBGM(0f);
  12165. isCF1 = true;
  12166. if (getModKeyPressing(modKey.Shift))
  12167. {
  12168. isShift = true;
  12169. }
  12170. }
  12171. if (isKT1)
  12172. {
  12173. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12174. string text4 = textAsset.text;
  12175. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12176. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12177. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12178. for (int j = 0; j < maidCnt; j++)
  12179. {
  12180. if (!isShift)
  12181. {
  12182. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12183. {
  12184. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12185. GameUty.FileSystem,
  12186. "dance_cm3d_004_kano_f1.anm",
  12187. false,
  12188. false);
  12189. }
  12190. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12191. }
  12192. else
  12193. {
  12194. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12195. {
  12196. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12197. GameUty.FileSystem,
  12198. "dance_cm3d2_kara_002_cktc_f1.anm",
  12199. false,
  12200. false);
  12201. }
  12202. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12203. text4 = textAsset.text;
  12204. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12205. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12206. && !isDanceStart9K && !isDanceStart13K)
  12207. {
  12208. dancePos[j] = maidArray[j].transform.position;
  12209. danceRot[j] = maidArray[j].transform.localRotation;
  12210. }
  12211. }
  12212. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12213. }
  12214. if (!isShift)
  12215. {
  12216. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12217. }
  12218. else
  12219. {
  12220. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12221. }
  12222. for (int j = 0; j < maidCnt; j++)
  12223. {
  12224. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12225. isStop[j] = false;
  12226. isLock[j] = false;
  12227. pHandL[j] = 0;
  12228. pHandR[j] = 0;
  12229. muneIKL[j] = false;
  12230. muneIKR[j] = false;
  12231. if (!isVR)
  12232. {
  12233. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12234. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12235. }
  12236. }
  12237. ikBui = 5;
  12238. isDanceStart1F = false;
  12239. isDanceStart2F = false;
  12240. isDanceStart3F = false;
  12241. isDanceStart4F = false;
  12242. isDanceStart5F = false;
  12243. isDanceStart6F = false;
  12244. isDanceStart7F = false;
  12245. isDanceStart8F = false;
  12246. isDanceStart9F = false;
  12247. isDanceStart10F = false;
  12248. isDanceStart11F = false;
  12249. isDanceStart12F = false;
  12250. isDanceStart13F = false;
  12251. isDanceStart14F = false;
  12252. isDanceStart15F = false;
  12253. for (int j = 0; j < maidCnt; j++)
  12254. {
  12255. danceFace[j] = 0f;
  12256. }
  12257. if (isDanceStart7V)
  12258. {
  12259. for (int j = 0; j < maidCnt; j++)
  12260. {
  12261. if (maidArray[j] && maidArray[j].Visible)
  12262. {
  12263. if (isDanceStart7V)
  12264. {
  12265. maidArray[j].SetPos(dancePos[j]);
  12266. maidArray[j].body0.transform.localRotation = danceRot[j];
  12267. }
  12268. }
  12269. }
  12270. isDanceStart7V = false;
  12271. }
  12272. if (isDanceStart8V)
  12273. {
  12274. for (int j = 0; j < maidCnt; j++)
  12275. {
  12276. if (maidArray[j] && maidArray[j].Visible)
  12277. {
  12278. if (isDanceStart8V)
  12279. {
  12280. maidArray[j].SetPos(dancePos[j]);
  12281. maidArray[j].body0.transform.localRotation = danceRot[j];
  12282. }
  12283. }
  12284. }
  12285. isDanceStart8V = false;
  12286. isDanceStart8P = false;
  12287. }
  12288. if (isDanceStart11V)
  12289. {
  12290. for (int j = 0; j < maidCnt; j++)
  12291. {
  12292. if (maidArray[j] && maidArray[j].Visible)
  12293. {
  12294. if (isDanceStart11V)
  12295. {
  12296. maidArray[j].SetPos(dancePos[j]);
  12297. maidArray[j].body0.transform.localRotation = danceRot[j];
  12298. }
  12299. }
  12300. }
  12301. isDanceStart11V = false;
  12302. }
  12303. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12304. || isDanceStart13K)
  12305. {
  12306. for (int j = 0; j < maidCnt; j++)
  12307. {
  12308. if (maidArray[j] && maidArray[j].Visible)
  12309. {
  12310. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12311. || isDanceStart13K)
  12312. {
  12313. maidArray[j].SetPos(dancePos[j]);
  12314. maidArray[j].body0.transform.localRotation = danceRot[j];
  12315. int i = j;
  12316. if (!isVR)
  12317. {
  12318. delCount[i] = 20;
  12319. if (goSlot[(int)selectList[i]] != null)
  12320. {
  12321. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12322. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12323. {
  12324. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12325. }
  12326. }
  12327. }
  12328. Maid maid = maidArray[j];
  12329. maid.DelProp(MPN.handitem, true);
  12330. maid.DelProp(MPN.accvag, true);
  12331. maid.DelProp(MPN.accanl, true);
  12332. maid.DelProp(MPN.kousoku_upper, true);
  12333. maid.DelProp(MPN.kousoku_lower, true);
  12334. maid.AllProcPropSeqStart();
  12335. }
  12336. }
  12337. }
  12338. isDanceStart1K = false;
  12339. isDanceStart3K = false;
  12340. isDanceStart4K = false;
  12341. isDanceStart5K = false;
  12342. isDanceStart6K = false;
  12343. isDanceStart9K = false;
  12344. isDanceStart13K = false;
  12345. }
  12346. if (isDanceStart14V)
  12347. {
  12348. for (int j = 0; j < maidCnt; j++)
  12349. {
  12350. if (maidArray[j] && maidArray[j].Visible)
  12351. {
  12352. if (isDanceStart14V)
  12353. {
  12354. maidArray[j].SetPos(dancePos[j]);
  12355. maidArray[j].body0.transform.localRotation = danceRot[j];
  12356. }
  12357. }
  12358. }
  12359. isDanceStart14V = false;
  12360. }
  12361. if (isDanceStart15V)
  12362. {
  12363. for (int j = 0; j < maidCnt; j++)
  12364. {
  12365. if (maidArray[j] && maidArray[j].Visible)
  12366. {
  12367. if (isDanceStart15V)
  12368. {
  12369. maidArray[j].SetPos(dancePos[j]);
  12370. maidArray[j].body0.transform.localRotation = danceRot[j];
  12371. }
  12372. }
  12373. }
  12374. isDanceStart15V = false;
  12375. }
  12376. if (maidArray[1] && maidArray[1].Visible)
  12377. {
  12378. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12379. {
  12380. Vector3 vector = Vector3.zero;
  12381. vector.x = 0.6f;
  12382. maidArray[1].SetPos(vector);
  12383. if (maidArray[2] && maidArray[2].Visible)
  12384. {
  12385. vector.x = -0.6f;
  12386. maidArray[2].SetPos(vector);
  12387. }
  12388. if (maidArray[3] && maidArray[3].Visible)
  12389. {
  12390. vector.x = 1.2f;
  12391. maidArray[3].SetPos(vector);
  12392. }
  12393. if (maidArray[4] && maidArray[4].Visible)
  12394. {
  12395. vector.x = -1.2f;
  12396. maidArray[4].SetPos(vector);
  12397. }
  12398. if (maidArray[5] && maidArray[5].Visible)
  12399. {
  12400. vector.x = 1.8f;
  12401. maidArray[5].SetPos(vector);
  12402. }
  12403. if (maidArray[6] && maidArray[6].Visible)
  12404. {
  12405. vector.x = -1.8f;
  12406. maidArray[6].SetPos(vector);
  12407. }
  12408. if (maidArray[7] && maidArray[7].Visible)
  12409. {
  12410. vector.x = 2.4f;
  12411. maidArray[7].SetPos(vector);
  12412. }
  12413. if (maidArray[8] && maidArray[8].Visible)
  12414. {
  12415. vector.x = -2.4f;
  12416. maidArray[8].SetPos(vector);
  12417. }
  12418. if (maidArray[9] && maidArray[9].Visible)
  12419. {
  12420. vector.x = 3f;
  12421. maidArray[9].SetPos(vector);
  12422. }
  12423. if (maidArray[10] && maidArray[10].Visible)
  12424. {
  12425. vector.x = -3f;
  12426. maidArray[10].SetPos(vector);
  12427. }
  12428. if (maidArray[11] && maidArray[11].Visible)
  12429. {
  12430. vector.x = 3.6f;
  12431. maidArray[11].SetPos(vector);
  12432. }
  12433. if (maidArray[12] && maidArray[12].Visible)
  12434. {
  12435. vector.x = -3.6f;
  12436. maidArray[12].SetPos(vector);
  12437. }
  12438. if (maidArray[13] && maidArray[13].Visible)
  12439. {
  12440. vector.x = 4.2f;
  12441. maidArray[13].SetPos(vector);
  12442. }
  12443. }
  12444. }
  12445. if (maidArray[2] && maidArray[2].Visible)
  12446. {
  12447. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12448. {
  12449. Vector3 vector = Vector3.zero;
  12450. vector.x = 0.6f;
  12451. maidArray[1].SetPos(vector);
  12452. if (maidArray[2] && maidArray[2].Visible)
  12453. {
  12454. vector.x = -0.6f;
  12455. maidArray[2].SetPos(vector);
  12456. }
  12457. if (maidArray[3] && maidArray[3].Visible)
  12458. {
  12459. vector.x = 1.2f;
  12460. maidArray[3].SetPos(vector);
  12461. }
  12462. if (maidArray[4] && maidArray[4].Visible)
  12463. {
  12464. vector.x = -1.2f;
  12465. maidArray[4].SetPos(vector);
  12466. }
  12467. if (maidArray[5] && maidArray[5].Visible)
  12468. {
  12469. vector.x = 1.8f;
  12470. maidArray[5].SetPos(vector);
  12471. }
  12472. if (maidArray[6] && maidArray[6].Visible)
  12473. {
  12474. vector.x = -1.8f;
  12475. maidArray[6].SetPos(vector);
  12476. }
  12477. if (maidArray[7] && maidArray[7].Visible)
  12478. {
  12479. vector.x = 2.4f;
  12480. maidArray[7].SetPos(vector);
  12481. }
  12482. if (maidArray[8] && maidArray[8].Visible)
  12483. {
  12484. vector.x = -2.4f;
  12485. maidArray[8].SetPos(vector);
  12486. }
  12487. if (maidArray[9] && maidArray[9].Visible)
  12488. {
  12489. vector.x = 3f;
  12490. maidArray[9].SetPos(vector);
  12491. }
  12492. if (maidArray[10] && maidArray[10].Visible)
  12493. {
  12494. vector.x = -3f;
  12495. maidArray[10].SetPos(vector);
  12496. }
  12497. if (maidArray[11] && maidArray[11].Visible)
  12498. {
  12499. vector.x = 3.6f;
  12500. maidArray[11].SetPos(vector);
  12501. }
  12502. if (maidArray[12] && maidArray[12].Visible)
  12503. {
  12504. vector.x = -3.6f;
  12505. maidArray[12].SetPos(vector);
  12506. }
  12507. if (maidArray[13] && maidArray[13].Visible)
  12508. {
  12509. vector.x = 4.2f;
  12510. maidArray[13].SetPos(vector);
  12511. }
  12512. }
  12513. }
  12514. if (isShift)
  12515. {
  12516. isDanceStart9K = true;
  12517. for (int j = 0; j < maidCnt; j++)
  12518. {
  12519. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12520. maidArray[j].body0.transform.localRotation.y + 90f,
  12521. maidArray[j].body0.transform.localRotation.z));
  12522. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12523. maidArray[j].body0.transform.position.y,
  12524. maidArray[j].body0.transform.position.z + 4f));
  12525. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12526. int i = j;
  12527. Maid maid = maidArray[j];
  12528. if (!isVR)
  12529. {
  12530. delCount[i] = 20;
  12531. if (goSlot[(int)selectList[i]] != null)
  12532. {
  12533. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12534. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12535. {
  12536. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12537. }
  12538. }
  12539. }
  12540. string[] array = new string[2];
  12541. array = text2.Split(new char[] { ',' });
  12542. maid.DelProp(MPN.handitem, true);
  12543. maid.DelProp(MPN.accvag, true);
  12544. maid.DelProp(MPN.accanl, true);
  12545. maid.DelProp(MPN.kousoku_upper, true);
  12546. maid.DelProp(MPN.kousoku_lower, true);
  12547. if (array[0] != "")
  12548. {
  12549. maid.SetProp(array[0], array[1], 0, true, false);
  12550. }
  12551. maid.AllProcPropSeqStart();
  12552. }
  12553. }
  12554. isDance = true;
  12555. isDanceStart9 = true;
  12556. isKT1 = false;
  12557. }
  12558. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12559. {
  12560. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12561. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12562. if (isSS1)
  12563. {
  12564. nameK = "dance_BlD_m";
  12565. nameA = "dance_cm3d21_002_bid_f";
  12566. nameS = "bloomingdreaming_short";
  12567. danceNo1 = 1;
  12568. danceNo2 = 3;
  12569. danceNo3 = 2;
  12570. }
  12571. if (isSS2)
  12572. {
  12573. nameK = "dance_KAD_m";
  12574. nameA = "dance_cm3d21_003_kad_f";
  12575. nameS = "kiminiaijodelicious_short";
  12576. danceNo1 = 1;
  12577. danceNo2 = 2;
  12578. danceNo3 = 3;
  12579. }
  12580. if (isSS3)
  12581. {
  12582. nameK = "dance_LUM_m";
  12583. nameA = "dance_cm3d21_004_lm_f";
  12584. nameS = "luminousmoment_short";
  12585. danceNo1 = 3;
  12586. danceNo2 = 1;
  12587. danceNo3 = 2;
  12588. }
  12589. if (isSS4)
  12590. {
  12591. nameK = "dance_NmF_m";
  12592. nameA = "dance_cm3d21_001_nmf_f";
  12593. nameS = "nightmagicfire_short";
  12594. danceNo1 = 2;
  12595. danceNo2 = 1;
  12596. danceNo3 = 3;
  12597. }
  12598. if (isSS5)
  12599. {
  12600. nameK = "dance_MoE_m";
  12601. nameA = "dance_cm3d21_005_moe_f";
  12602. nameS = "melodyofempire_short";
  12603. danceNo1 = 1;
  12604. danceNo2 = 3;
  12605. danceNo3 = 2;
  12606. }
  12607. if (isSS6)
  12608. {
  12609. nameK = "dance_NmF_m";
  12610. nameA = "dance_cm3d21_kara_001_nmf_f";
  12611. nameS = "nightmagicfire_short";
  12612. danceNo1 = 1;
  12613. danceNo2 = 1;
  12614. danceNo3 = 1;
  12615. }
  12616. for (int j = 0; j < maidCnt; j++)
  12617. {
  12618. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12619. string text5 = nameA + danceNo1 + ".anm";
  12620. switch (j)
  12621. {
  12622. case 1:
  12623. case 4:
  12624. case 7:
  12625. case 10:
  12626. case 13:
  12627. text5 = nameA + danceNo2 + ".anm";
  12628. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12629. break;
  12630. case 2:
  12631. case 5:
  12632. case 8:
  12633. case 11:
  12634. text5 = nameA + danceNo3 + ".anm";
  12635. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12636. break;
  12637. }
  12638. if (maidArray[j] && maidArray[j].Visible)
  12639. {
  12640. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12641. {
  12642. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12643. }
  12644. string text4 = textAsset.text;
  12645. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12646. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12647. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12648. }
  12649. }
  12650. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12651. ikBui = 5;
  12652. isDanceStart1F = false;
  12653. isDanceStart2F = false;
  12654. isDanceStart3F = false;
  12655. isDanceStart4F = false;
  12656. isDanceStart5F = false;
  12657. isDanceStart6F = false;
  12658. isDanceStart7F = false;
  12659. isDanceStart8F = false;
  12660. isDanceStart9F = false;
  12661. isDanceStart10F = false;
  12662. isDanceStart11F = false;
  12663. isDanceStart12F = false;
  12664. isDanceStart13F = false;
  12665. isDanceStart14F = false;
  12666. isDanceStart15F = false;
  12667. for (int j = 0; j < maidCnt; j++)
  12668. {
  12669. danceFace[j] = 0f;
  12670. }
  12671. if (isDanceStart7V)
  12672. {
  12673. for (int j = 0; j < maidCnt; j++)
  12674. {
  12675. if (maidArray[j] && maidArray[j].Visible)
  12676. {
  12677. if (isDanceStart7V)
  12678. {
  12679. maidArray[j].SetPos(dancePos[j]);
  12680. maidArray[j].body0.transform.localRotation = danceRot[j];
  12681. }
  12682. }
  12683. }
  12684. isDanceStart7V = false;
  12685. }
  12686. if (isDanceStart8V)
  12687. {
  12688. for (int j = 0; j < maidCnt; j++)
  12689. {
  12690. if (maidArray[j] && maidArray[j].Visible)
  12691. {
  12692. if (isDanceStart8V)
  12693. {
  12694. maidArray[j].SetPos(dancePos[j]);
  12695. maidArray[j].body0.transform.localRotation = danceRot[j];
  12696. }
  12697. }
  12698. }
  12699. isDanceStart8V = false;
  12700. isDanceStart8P = false;
  12701. }
  12702. if (isDanceStart11V)
  12703. {
  12704. for (int j = 0; j < maidCnt; j++)
  12705. {
  12706. if (maidArray[j] && maidArray[j].Visible)
  12707. {
  12708. if (isDanceStart11V)
  12709. {
  12710. maidArray[j].SetPos(dancePos[j]);
  12711. maidArray[j].body0.transform.localRotation = danceRot[j];
  12712. }
  12713. }
  12714. }
  12715. isDanceStart11V = false;
  12716. }
  12717. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12718. || isDanceStart13K)
  12719. {
  12720. for (int j = 0; j < maidCnt; j++)
  12721. {
  12722. if (maidArray[j] && maidArray[j].Visible)
  12723. {
  12724. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12725. || isDanceStart13K)
  12726. {
  12727. maidArray[j].SetPos(dancePos[j]);
  12728. maidArray[j].body0.transform.localRotation = danceRot[j];
  12729. int i = j;
  12730. if (!isVR)
  12731. {
  12732. delCount[i] = 20;
  12733. if (goSlot[(int)selectList[i]] != null)
  12734. {
  12735. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12736. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12737. {
  12738. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12739. }
  12740. }
  12741. }
  12742. Maid maid = maidArray[j];
  12743. maid.DelProp(MPN.handitem, true);
  12744. maid.DelProp(MPN.accvag, true);
  12745. maid.DelProp(MPN.accanl, true);
  12746. maid.DelProp(MPN.kousoku_upper, true);
  12747. maid.DelProp(MPN.kousoku_lower, true);
  12748. maid.AllProcPropSeqStart();
  12749. }
  12750. }
  12751. }
  12752. isDanceStart1K = false;
  12753. isDanceStart3K = false;
  12754. isDanceStart4K = false;
  12755. isDanceStart5K = false;
  12756. isDanceStart6K = false;
  12757. isDanceStart9K = false;
  12758. isDanceStart13K = false;
  12759. }
  12760. if (isDanceStart14V)
  12761. {
  12762. for (int j = 0; j < maidCnt; j++)
  12763. {
  12764. if (maidArray[j] && maidArray[j].Visible)
  12765. {
  12766. if (isDanceStart14V)
  12767. {
  12768. maidArray[j].SetPos(dancePos[j]);
  12769. maidArray[j].body0.transform.localRotation = danceRot[j];
  12770. }
  12771. }
  12772. }
  12773. isDanceStart14V = false;
  12774. }
  12775. if (isDanceStart15V)
  12776. {
  12777. for (int j = 0; j < maidCnt; j++)
  12778. {
  12779. if (maidArray[j] && maidArray[j].Visible)
  12780. {
  12781. if (isDanceStart15V)
  12782. {
  12783. maidArray[j].SetPos(dancePos[j]);
  12784. maidArray[j].body0.transform.localRotation = danceRot[j];
  12785. }
  12786. }
  12787. }
  12788. isDanceStart15V = false;
  12789. }
  12790. for (int j = 0; j < maidCnt; j++)
  12791. {
  12792. isStop[j] = false;
  12793. isLock[j] = false;
  12794. pHandL[j] = 0;
  12795. pHandR[j] = 0;
  12796. muneIKL[j] = false;
  12797. muneIKR[j] = false;
  12798. if (!isVR)
  12799. {
  12800. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12801. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12802. }
  12803. if (maidArray[j].transform.position.y != 100f)
  12804. {
  12805. dancePos[j] = maidArray[j].transform.position;
  12806. }
  12807. else
  12808. {
  12809. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12810. }
  12811. danceRot[j] = maidArray[j].transform.localRotation;
  12812. }
  12813. if (maidArray[1] && maidArray[1].Visible)
  12814. {
  12815. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12816. maidArray[0].transform.position.y,
  12817. maidArray[0].transform.position.z));
  12818. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12819. }
  12820. if (maidArray[2] && maidArray[2].Visible)
  12821. {
  12822. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12823. maidArray[0].transform.position.y,
  12824. maidArray[0].transform.position.z));
  12825. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12826. }
  12827. if (maidArray[4] && maidArray[4].Visible)
  12828. {
  12829. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12830. maidArray[3].transform.position.y,
  12831. maidArray[3].transform.position.z));
  12832. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12833. }
  12834. if (maidArray[5] && maidArray[5].Visible)
  12835. {
  12836. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12837. maidArray[3].transform.position.y,
  12838. maidArray[3].transform.position.z));
  12839. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12840. }
  12841. if (maidArray[7] && maidArray[7].Visible)
  12842. {
  12843. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12844. maidArray[6].transform.position.y,
  12845. maidArray[6].transform.position.z));
  12846. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12847. }
  12848. if (maidArray[8] && maidArray[8].Visible)
  12849. {
  12850. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12851. maidArray[6].transform.position.y,
  12852. maidArray[6].transform.position.z));
  12853. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12854. }
  12855. if (maidArray[10] && maidArray[10].Visible)
  12856. {
  12857. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12858. maidArray[9].transform.position.y,
  12859. maidArray[9].transform.position.z));
  12860. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12861. }
  12862. if (maidArray[11] && maidArray[11].Visible)
  12863. {
  12864. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12865. maidArray[9].transform.position.y,
  12866. maidArray[9].transform.position.z));
  12867. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12868. }
  12869. if (maidArray[13] && maidArray[13].Visible)
  12870. {
  12871. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12872. maidArray[12].transform.position.y,
  12873. maidArray[12].transform.position.z));
  12874. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12875. }
  12876. isSS = false;
  12877. isDance = true;
  12878. isDanceStart11 = true;
  12879. }
  12880. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12881. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12882. {
  12883. GameMain.Instance.SoundMgr.StopBGM(0f);
  12884. isSS1 = true;
  12885. isSS2 = false;
  12886. isSS3 = false;
  12887. isSS4 = false;
  12888. isSS5 = false;
  12889. isSS6 = false;
  12890. isSS = true;
  12891. }
  12892. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12893. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12894. {
  12895. GameMain.Instance.SoundMgr.StopBGM(0f);
  12896. isSS1 = false;
  12897. isSS2 = true;
  12898. isSS3 = false;
  12899. isSS4 = false;
  12900. isSS5 = false;
  12901. isSS6 = false;
  12902. isSS = true;
  12903. }
  12904. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12905. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12906. {
  12907. GameMain.Instance.SoundMgr.StopBGM(0f);
  12908. isSS1 = false;
  12909. isSS2 = false;
  12910. isSS3 = true;
  12911. isSS4 = false;
  12912. isSS5 = false;
  12913. isSS6 = false;
  12914. isSS = true;
  12915. }
  12916. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12917. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12918. {
  12919. GameMain.Instance.SoundMgr.StopBGM(0f);
  12920. isSS1 = false;
  12921. isSS2 = false;
  12922. isSS3 = false;
  12923. isSS4 = true;
  12924. isSS5 = false;
  12925. isSS6 = false;
  12926. isSS = true;
  12927. }
  12928. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12929. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12930. {
  12931. GameMain.Instance.SoundMgr.StopBGM(0f);
  12932. isSS1 = false;
  12933. isSS2 = false;
  12934. isSS3 = false;
  12935. isSS4 = false;
  12936. isSS5 = true;
  12937. isSS6 = false;
  12938. isSS = true;
  12939. }
  12940. if (isKHG1 || isKHG2)
  12941. {
  12942. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12943. string text4 = textAsset.text;
  12944. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12945. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12946. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12947. for (int j = 0; j < maidCnt; j++)
  12948. {
  12949. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12950. {
  12951. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12952. GameUty.FileSystem,
  12953. "dance_cm3d2_005_khg_f.anm",
  12954. false,
  12955. false);
  12956. }
  12957. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12958. }
  12959. if (isKHG1)
  12960. {
  12961. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12962. }
  12963. if (isKHG2)
  12964. {
  12965. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12966. }
  12967. for (int j = 0; j < maidCnt; j++)
  12968. {
  12969. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12970. isStop[j] = false;
  12971. isLock[j] = false;
  12972. pHandL[j] = 0;
  12973. pHandR[j] = 0;
  12974. muneIKL[j] = false;
  12975. muneIKR[j] = false;
  12976. if (!isVR)
  12977. {
  12978. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12979. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12980. }
  12981. }
  12982. ikBui = 5;
  12983. isDanceStart1F = false;
  12984. isDanceStart2F = false;
  12985. isDanceStart3F = false;
  12986. isDanceStart4F = false;
  12987. isDanceStart5F = false;
  12988. isDanceStart6F = false;
  12989. isDanceStart7F = false;
  12990. isDanceStart8F = false;
  12991. isDanceStart9F = false;
  12992. isDanceStart10F = false;
  12993. isDanceStart11F = false;
  12994. isDanceStart12F = false;
  12995. isDanceStart13F = false;
  12996. isDanceStart14F = false;
  12997. isDanceStart15F = false;
  12998. for (int j = 0; j < maidCnt; j++)
  12999. {
  13000. danceFace[j] = 0f;
  13001. }
  13002. if (isDanceStart7V)
  13003. {
  13004. for (int j = 0; j < maidCnt; j++)
  13005. {
  13006. if (maidArray[j] && maidArray[j].Visible)
  13007. {
  13008. if (isDanceStart7V)
  13009. {
  13010. maidArray[j].SetPos(dancePos[j]);
  13011. maidArray[j].body0.transform.localRotation = danceRot[j];
  13012. }
  13013. }
  13014. }
  13015. isDanceStart7V = false;
  13016. }
  13017. if (isDanceStart8V)
  13018. {
  13019. for (int j = 0; j < maidCnt; j++)
  13020. {
  13021. if (maidArray[j] && maidArray[j].Visible)
  13022. {
  13023. if (isDanceStart8V)
  13024. {
  13025. maidArray[j].SetPos(dancePos[j]);
  13026. maidArray[j].body0.transform.localRotation = danceRot[j];
  13027. }
  13028. }
  13029. }
  13030. isDanceStart8V = false;
  13031. isDanceStart8P = false;
  13032. }
  13033. if (isDanceStart11V)
  13034. {
  13035. for (int j = 0; j < maidCnt; j++)
  13036. {
  13037. if (maidArray[j] && maidArray[j].Visible)
  13038. {
  13039. if (isDanceStart11V)
  13040. {
  13041. maidArray[j].SetPos(dancePos[j]);
  13042. maidArray[j].body0.transform.localRotation = danceRot[j];
  13043. }
  13044. }
  13045. }
  13046. isDanceStart11V = false;
  13047. }
  13048. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13049. || isDanceStart13K)
  13050. {
  13051. for (int j = 0; j < maidCnt; j++)
  13052. {
  13053. if (maidArray[j] && maidArray[j].Visible)
  13054. {
  13055. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13056. || isDanceStart13K)
  13057. {
  13058. maidArray[j].SetPos(dancePos[j]);
  13059. maidArray[j].body0.transform.localRotation = danceRot[j];
  13060. int i = j;
  13061. if (!isVR)
  13062. {
  13063. delCount[i] = 20;
  13064. if (goSlot[(int)selectList[i]] != null)
  13065. {
  13066. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13067. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13068. {
  13069. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13070. }
  13071. }
  13072. }
  13073. Maid maid = maidArray[j];
  13074. maid.DelProp(MPN.handitem, true);
  13075. maid.DelProp(MPN.accvag, true);
  13076. maid.DelProp(MPN.accanl, true);
  13077. maid.DelProp(MPN.kousoku_upper, true);
  13078. maid.DelProp(MPN.kousoku_lower, true);
  13079. maid.AllProcPropSeqStart();
  13080. }
  13081. }
  13082. }
  13083. isDanceStart1K = false;
  13084. isDanceStart3K = false;
  13085. isDanceStart4K = false;
  13086. isDanceStart5K = false;
  13087. isDanceStart6K = false;
  13088. isDanceStart9K = false;
  13089. isDanceStart13K = false;
  13090. }
  13091. if (isDanceStart14V)
  13092. {
  13093. for (int j = 0; j < maidCnt; j++)
  13094. {
  13095. if (maidArray[j] && maidArray[j].Visible)
  13096. {
  13097. if (isDanceStart14V)
  13098. {
  13099. maidArray[j].SetPos(dancePos[j]);
  13100. maidArray[j].body0.transform.localRotation = danceRot[j];
  13101. }
  13102. }
  13103. }
  13104. isDanceStart14V = false;
  13105. }
  13106. if (isDanceStart15V)
  13107. {
  13108. for (int j = 0; j < maidCnt; j++)
  13109. {
  13110. if (maidArray[j] && maidArray[j].Visible)
  13111. {
  13112. if (isDanceStart15V)
  13113. {
  13114. maidArray[j].SetPos(dancePos[j]);
  13115. maidArray[j].body0.transform.localRotation = danceRot[j];
  13116. }
  13117. }
  13118. }
  13119. isDanceStart15V = false;
  13120. }
  13121. if (maidArray[1] && maidArray[1].Visible)
  13122. {
  13123. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13124. {
  13125. Vector3 vector = Vector3.zero;
  13126. vector.x = 0.6f;
  13127. maidArray[1].SetPos(vector);
  13128. if (maidArray[2] && maidArray[2].Visible)
  13129. {
  13130. vector.x = -0.6f;
  13131. maidArray[2].SetPos(vector);
  13132. }
  13133. if (maidArray[3] && maidArray[3].Visible)
  13134. {
  13135. vector.x = 1.2f;
  13136. maidArray[3].SetPos(vector);
  13137. }
  13138. if (maidArray[4] && maidArray[4].Visible)
  13139. {
  13140. vector.x = -1.2f;
  13141. maidArray[4].SetPos(vector);
  13142. }
  13143. if (maidArray[5] && maidArray[5].Visible)
  13144. {
  13145. vector.x = 1.8f;
  13146. maidArray[5].SetPos(vector);
  13147. }
  13148. if (maidArray[6] && maidArray[6].Visible)
  13149. {
  13150. vector.x = -1.8f;
  13151. maidArray[6].SetPos(vector);
  13152. }
  13153. if (maidArray[7] && maidArray[7].Visible)
  13154. {
  13155. vector.x = 2.4f;
  13156. maidArray[7].SetPos(vector);
  13157. }
  13158. if (maidArray[8] && maidArray[8].Visible)
  13159. {
  13160. vector.x = -2.4f;
  13161. maidArray[8].SetPos(vector);
  13162. }
  13163. if (maidArray[9] && maidArray[9].Visible)
  13164. {
  13165. vector.x = 3f;
  13166. maidArray[9].SetPos(vector);
  13167. }
  13168. if (maidArray[10] && maidArray[10].Visible)
  13169. {
  13170. vector.x = -3f;
  13171. maidArray[10].SetPos(vector);
  13172. }
  13173. if (maidArray[11] && maidArray[11].Visible)
  13174. {
  13175. vector.x = 3.6f;
  13176. maidArray[11].SetPos(vector);
  13177. }
  13178. if (maidArray[12] && maidArray[12].Visible)
  13179. {
  13180. vector.x = -3.6f;
  13181. maidArray[12].SetPos(vector);
  13182. }
  13183. if (maidArray[13] && maidArray[13].Visible)
  13184. {
  13185. vector.x = 4.2f;
  13186. maidArray[13].SetPos(vector);
  13187. }
  13188. }
  13189. }
  13190. isDance = true;
  13191. isDanceStart12 = true;
  13192. isKHG1 = false;
  13193. isKHG2 = false;
  13194. }
  13195. if (isDanceStart13Count > 0)
  13196. {
  13197. isDanceStart13Count++;
  13198. }
  13199. if (isDanceStart13Count == 1)
  13200. {
  13201. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13202. isDanceStart13Count = 0;
  13203. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13204. string text4 = textAsset.text;
  13205. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13206. for (int j = 0; j < maidCnt; j++)
  13207. {
  13208. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13209. }
  13210. }
  13211. if ((isSN1 || isSN2 || isSN3) && isShift)
  13212. {
  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. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13217. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13218. for (int j = 0; j < maidCnt; j++)
  13219. {
  13220. if (!isShift)
  13221. {
  13222. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13223. {
  13224. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13225. GameUty.FileSystem,
  13226. "dance_cm3d2_006_ssn_f1.anm",
  13227. false,
  13228. false);
  13229. }
  13230. }
  13231. else
  13232. {
  13233. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13234. {
  13235. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13236. GameUty.FileSystem,
  13237. "dance_cm3d21_kara_001_nmf_f1.anm",
  13238. false,
  13239. false);
  13240. }
  13241. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13242. string text5 = nameA + danceNo1 + ".anm";
  13243. switch (j)
  13244. {
  13245. case 1:
  13246. case 4:
  13247. case 7:
  13248. case 10:
  13249. case 13:
  13250. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13251. break;
  13252. case 2:
  13253. case 5:
  13254. case 8:
  13255. case 11:
  13256. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13257. break;
  13258. }
  13259. text4 = textAsset.text;
  13260. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13261. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13262. && !isDanceStart9K && !isDanceStart13K)
  13263. {
  13264. dancePos[j] = maidArray[j].transform.position;
  13265. danceRot[j] = maidArray[j].transform.localRotation;
  13266. }
  13267. }
  13268. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13269. }
  13270. if (!isShift)
  13271. {
  13272. if (isSN1)
  13273. {
  13274. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13275. }
  13276. if (isSN2)
  13277. {
  13278. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13279. }
  13280. if (isSN3)
  13281. {
  13282. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13283. }
  13284. }
  13285. else
  13286. {
  13287. danceWait = 400;
  13288. isDanceStart13Count++;
  13289. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13290. }
  13291. for (int j = 0; j < maidCnt; j++)
  13292. {
  13293. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13294. isStop[j] = false;
  13295. isLock[j] = false;
  13296. pHandL[j] = 0;
  13297. pHandR[j] = 0;
  13298. muneIKL[j] = false;
  13299. muneIKR[j] = false;
  13300. if (!isVR)
  13301. {
  13302. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13303. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13304. }
  13305. }
  13306. ikBui = 5;
  13307. isDanceStart1F = false;
  13308. isDanceStart2F = false;
  13309. isDanceStart3F = false;
  13310. isDanceStart4F = false;
  13311. isDanceStart5F = false;
  13312. isDanceStart6F = false;
  13313. isDanceStart7F = false;
  13314. isDanceStart8F = false;
  13315. isDanceStart9F = false;
  13316. isDanceStart10F = false;
  13317. isDanceStart11F = false;
  13318. isDanceStart12F = false;
  13319. isDanceStart13F = false;
  13320. isDanceStart14F = false;
  13321. isDanceStart15F = false;
  13322. for (int j = 0; j < maidCnt; j++)
  13323. {
  13324. danceFace[j] = 0f;
  13325. }
  13326. if (isDanceStart7V)
  13327. {
  13328. for (int j = 0; j < maidCnt; j++)
  13329. {
  13330. if (maidArray[j] && maidArray[j].Visible)
  13331. {
  13332. if (isDanceStart7V)
  13333. {
  13334. maidArray[j].SetPos(dancePos[j]);
  13335. maidArray[j].body0.transform.localRotation = danceRot[j];
  13336. }
  13337. }
  13338. }
  13339. isDanceStart7V = false;
  13340. }
  13341. if (isDanceStart8V)
  13342. {
  13343. for (int j = 0; j < maidCnt; j++)
  13344. {
  13345. if (maidArray[j] && maidArray[j].Visible)
  13346. {
  13347. if (isDanceStart8V)
  13348. {
  13349. maidArray[j].SetPos(dancePos[j]);
  13350. maidArray[j].body0.transform.localRotation = danceRot[j];
  13351. }
  13352. }
  13353. }
  13354. isDanceStart8V = false;
  13355. isDanceStart8P = false;
  13356. }
  13357. if (isDanceStart11V)
  13358. {
  13359. for (int j = 0; j < maidCnt; j++)
  13360. {
  13361. if (maidArray[j] && maidArray[j].Visible)
  13362. {
  13363. if (isDanceStart11V)
  13364. {
  13365. maidArray[j].SetPos(dancePos[j]);
  13366. maidArray[j].body0.transform.localRotation = danceRot[j];
  13367. }
  13368. }
  13369. }
  13370. isDanceStart11V = false;
  13371. }
  13372. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13373. || isDanceStart13K)
  13374. {
  13375. for (int j = 0; j < maidCnt; j++)
  13376. {
  13377. if (maidArray[j] && maidArray[j].Visible)
  13378. {
  13379. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13380. || isDanceStart13K)
  13381. {
  13382. maidArray[j].SetPos(dancePos[j]);
  13383. maidArray[j].body0.transform.localRotation = danceRot[j];
  13384. int i = j;
  13385. if (!isVR)
  13386. {
  13387. delCount[i] = 20;
  13388. if (goSlot[(int)selectList[i]] != null)
  13389. {
  13390. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13391. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13392. {
  13393. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13394. }
  13395. }
  13396. }
  13397. Maid maid = maidArray[j];
  13398. maid.DelProp(MPN.handitem, true);
  13399. maid.DelProp(MPN.accvag, true);
  13400. maid.DelProp(MPN.accanl, true);
  13401. maid.DelProp(MPN.kousoku_upper, true);
  13402. maid.DelProp(MPN.kousoku_lower, true);
  13403. maid.AllProcPropSeqStart();
  13404. }
  13405. }
  13406. }
  13407. isDanceStart1K = false;
  13408. isDanceStart3K = false;
  13409. isDanceStart4K = false;
  13410. isDanceStart5K = false;
  13411. isDanceStart6K = false;
  13412. isDanceStart9K = false;
  13413. isDanceStart13K = false;
  13414. }
  13415. if (isDanceStart14V)
  13416. {
  13417. for (int j = 0; j < maidCnt; j++)
  13418. {
  13419. if (maidArray[j] && maidArray[j].Visible)
  13420. {
  13421. if (isDanceStart14V)
  13422. {
  13423. maidArray[j].SetPos(dancePos[j]);
  13424. maidArray[j].body0.transform.localRotation = danceRot[j];
  13425. }
  13426. }
  13427. }
  13428. isDanceStart14V = false;
  13429. }
  13430. if (isDanceStart15V)
  13431. {
  13432. for (int j = 0; j < maidCnt; j++)
  13433. {
  13434. if (maidArray[j] && maidArray[j].Visible)
  13435. {
  13436. if (isDanceStart15V)
  13437. {
  13438. maidArray[j].SetPos(dancePos[j]);
  13439. maidArray[j].body0.transform.localRotation = danceRot[j];
  13440. }
  13441. }
  13442. }
  13443. isDanceStart15V = false;
  13444. }
  13445. if (maidArray[1] && maidArray[1].Visible)
  13446. {
  13447. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13448. {
  13449. Vector3 vector = Vector3.zero;
  13450. vector.x = 0.6f;
  13451. maidArray[1].SetPos(vector);
  13452. if (maidArray[2] && maidArray[2].Visible)
  13453. {
  13454. vector.x = -0.6f;
  13455. maidArray[2].SetPos(vector);
  13456. }
  13457. if (maidArray[3] && maidArray[3].Visible)
  13458. {
  13459. vector.x = 1.2f;
  13460. maidArray[3].SetPos(vector);
  13461. }
  13462. if (maidArray[4] && maidArray[4].Visible)
  13463. {
  13464. vector.x = -1.2f;
  13465. maidArray[4].SetPos(vector);
  13466. }
  13467. if (maidArray[5] && maidArray[5].Visible)
  13468. {
  13469. vector.x = 1.8f;
  13470. maidArray[5].SetPos(vector);
  13471. }
  13472. if (maidArray[6] && maidArray[6].Visible)
  13473. {
  13474. vector.x = -1.8f;
  13475. maidArray[6].SetPos(vector);
  13476. }
  13477. if (maidArray[7] && maidArray[7].Visible)
  13478. {
  13479. vector.x = 2.4f;
  13480. maidArray[7].SetPos(vector);
  13481. }
  13482. if (maidArray[8] && maidArray[8].Visible)
  13483. {
  13484. vector.x = -2.4f;
  13485. maidArray[8].SetPos(vector);
  13486. }
  13487. if (maidArray[9] && maidArray[9].Visible)
  13488. {
  13489. vector.x = 3f;
  13490. maidArray[9].SetPos(vector);
  13491. }
  13492. if (maidArray[10] && maidArray[10].Visible)
  13493. {
  13494. vector.x = -3f;
  13495. maidArray[10].SetPos(vector);
  13496. }
  13497. if (maidArray[11] && maidArray[11].Visible)
  13498. {
  13499. vector.x = 3.6f;
  13500. maidArray[11].SetPos(vector);
  13501. }
  13502. if (maidArray[12] && maidArray[12].Visible)
  13503. {
  13504. vector.x = -3.6f;
  13505. maidArray[12].SetPos(vector);
  13506. }
  13507. if (maidArray[13] && maidArray[13].Visible)
  13508. {
  13509. vector.x = 4.2f;
  13510. maidArray[13].SetPos(vector);
  13511. }
  13512. }
  13513. }
  13514. if (isShift)
  13515. {
  13516. isDanceStart13K = true;
  13517. for (int j = 0; j < maidCnt; j++)
  13518. {
  13519. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13520. maidArray[j].body0.transform.localRotation.y + 90f,
  13521. maidArray[j].body0.transform.localRotation.z));
  13522. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13523. maidArray[j].body0.transform.position.y,
  13524. maidArray[j].body0.transform.position.z + 4f));
  13525. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13526. int i = j;
  13527. Maid maid = maidArray[j];
  13528. if (!isVR)
  13529. {
  13530. delCount[i] = 20;
  13531. if (goSlot[(int)selectList[i]] != null)
  13532. {
  13533. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13534. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13535. {
  13536. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13537. }
  13538. }
  13539. }
  13540. string[] array = new string[2];
  13541. array = text2.Split(new char[] { ',' });
  13542. maid.DelProp(MPN.handitem, true);
  13543. maid.DelProp(MPN.accvag, true);
  13544. maid.DelProp(MPN.accanl, true);
  13545. maid.DelProp(MPN.kousoku_upper, true);
  13546. maid.DelProp(MPN.kousoku_lower, true);
  13547. if (array[0] != "")
  13548. {
  13549. maid.SetProp(array[0], array[1], 0, true, false);
  13550. }
  13551. maid.AllProcPropSeqStart();
  13552. }
  13553. }
  13554. isDance = true;
  13555. isDanceStart13 = true;
  13556. isSN1 = false;
  13557. isSN2 = false;
  13558. isSN3 = false;
  13559. }
  13560. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13561. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13562. {
  13563. GameMain.Instance.SoundMgr.StopBGM(0f);
  13564. isSN1 = true;
  13565. hFlg = true;
  13566. if (getModKeyPressing(modKey.Shift))
  13567. {
  13568. isShift = true;
  13569. }
  13570. }
  13571. if (isSN4 || isSN5 || isSN6)
  13572. {
  13573. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13574. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13575. for (int j = 0; j < maidCnt; j++)
  13576. {
  13577. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13578. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13579. switch (j)
  13580. {
  13581. case 1:
  13582. case 4:
  13583. case 7:
  13584. case 10:
  13585. case 13:
  13586. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13587. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13588. break;
  13589. case 2:
  13590. case 5:
  13591. case 8:
  13592. case 11:
  13593. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13594. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13595. break;
  13596. }
  13597. if (maidArray[j] && maidArray[j].Visible)
  13598. {
  13599. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13600. {
  13601. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13602. }
  13603. string text4 = textAsset.text;
  13604. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13605. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13606. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13607. }
  13608. }
  13609. if (isSN4)
  13610. {
  13611. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13612. }
  13613. if (isSN5)
  13614. {
  13615. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13616. }
  13617. if (isSN6)
  13618. {
  13619. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13620. }
  13621. ikBui = 5;
  13622. isDanceStart1F = false;
  13623. isDanceStart2F = false;
  13624. isDanceStart3F = false;
  13625. isDanceStart4F = false;
  13626. isDanceStart5F = false;
  13627. isDanceStart6F = false;
  13628. isDanceStart7F = false;
  13629. isDanceStart8F = false;
  13630. isDanceStart9F = false;
  13631. isDanceStart10F = false;
  13632. isDanceStart11F = false;
  13633. isDanceStart12F = false;
  13634. isDanceStart13F = false;
  13635. isDanceStart14F = false;
  13636. isDanceStart15F = false;
  13637. for (int j = 0; j < maidCnt; j++)
  13638. {
  13639. danceFace[j] = 0f;
  13640. }
  13641. if (isDanceStart7V)
  13642. {
  13643. for (int j = 0; j < maidCnt; j++)
  13644. {
  13645. if (maidArray[j] && maidArray[j].Visible)
  13646. {
  13647. if (isDanceStart7V)
  13648. {
  13649. maidArray[j].SetPos(dancePos[j]);
  13650. maidArray[j].body0.transform.localRotation = danceRot[j];
  13651. }
  13652. }
  13653. }
  13654. isDanceStart7V = false;
  13655. }
  13656. if (isDanceStart8V)
  13657. {
  13658. for (int j = 0; j < maidCnt; j++)
  13659. {
  13660. if (maidArray[j] && maidArray[j].Visible)
  13661. {
  13662. if (isDanceStart8V)
  13663. {
  13664. maidArray[j].SetPos(dancePos[j]);
  13665. maidArray[j].body0.transform.localRotation = danceRot[j];
  13666. }
  13667. }
  13668. }
  13669. isDanceStart8V = false;
  13670. isDanceStart8P = false;
  13671. }
  13672. if (isDanceStart11V)
  13673. {
  13674. for (int j = 0; j < maidCnt; j++)
  13675. {
  13676. if (maidArray[j] && maidArray[j].Visible)
  13677. {
  13678. if (isDanceStart11V)
  13679. {
  13680. maidArray[j].SetPos(dancePos[j]);
  13681. maidArray[j].body0.transform.localRotation = danceRot[j];
  13682. }
  13683. }
  13684. }
  13685. isDanceStart11V = false;
  13686. }
  13687. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13688. || isDanceStart13K)
  13689. {
  13690. for (int j = 0; j < maidCnt; j++)
  13691. {
  13692. if (maidArray[j] && maidArray[j].Visible)
  13693. {
  13694. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13695. || isDanceStart13K)
  13696. {
  13697. maidArray[j].SetPos(dancePos[j]);
  13698. maidArray[j].body0.transform.localRotation = danceRot[j];
  13699. int i = j;
  13700. if (!isVR)
  13701. {
  13702. delCount[i] = 20;
  13703. if (goSlot[(int)selectList[i]] != null)
  13704. {
  13705. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13706. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13707. {
  13708. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13709. }
  13710. }
  13711. }
  13712. Maid maid = maidArray[j];
  13713. maid.DelProp(MPN.handitem, true);
  13714. maid.DelProp(MPN.accvag, true);
  13715. maid.DelProp(MPN.accanl, true);
  13716. maid.DelProp(MPN.kousoku_upper, true);
  13717. maid.DelProp(MPN.kousoku_lower, true);
  13718. maid.AllProcPropSeqStart();
  13719. }
  13720. }
  13721. }
  13722. isDanceStart1K = false;
  13723. isDanceStart3K = false;
  13724. isDanceStart4K = false;
  13725. isDanceStart5K = false;
  13726. isDanceStart6K = false;
  13727. isDanceStart9K = false;
  13728. isDanceStart13K = false;
  13729. }
  13730. if (isDanceStart14V)
  13731. {
  13732. for (int j = 0; j < maidCnt; j++)
  13733. {
  13734. if (maidArray[j] && maidArray[j].Visible)
  13735. {
  13736. if (isDanceStart14V)
  13737. {
  13738. maidArray[j].SetPos(dancePos[j]);
  13739. maidArray[j].body0.transform.localRotation = danceRot[j];
  13740. }
  13741. }
  13742. }
  13743. isDanceStart14V = false;
  13744. }
  13745. if (isDanceStart15V)
  13746. {
  13747. for (int j = 0; j < maidCnt; j++)
  13748. {
  13749. if (maidArray[j] && maidArray[j].Visible)
  13750. {
  13751. if (isDanceStart15V)
  13752. {
  13753. maidArray[j].SetPos(dancePos[j]);
  13754. maidArray[j].body0.transform.localRotation = danceRot[j];
  13755. }
  13756. }
  13757. }
  13758. isDanceStart15V = false;
  13759. }
  13760. for (int j = 0; j < maidCnt; j++)
  13761. {
  13762. isStop[j] = false;
  13763. isLock[j] = false;
  13764. pHandL[j] = 0;
  13765. pHandR[j] = 0;
  13766. muneIKL[j] = false;
  13767. muneIKR[j] = false;
  13768. if (!isVR)
  13769. {
  13770. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13771. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13772. }
  13773. if (maidArray[j].transform.position.y != 100f)
  13774. {
  13775. dancePos[j] = maidArray[j].transform.position;
  13776. }
  13777. else
  13778. {
  13779. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13780. }
  13781. danceRot[j] = maidArray[j].transform.localRotation;
  13782. }
  13783. if (maidArray[1] && maidArray[1].Visible)
  13784. {
  13785. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13786. maidArray[0].transform.position.y,
  13787. maidArray[0].transform.position.z));
  13788. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13789. }
  13790. if (maidArray[2] && maidArray[2].Visible)
  13791. {
  13792. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13793. maidArray[0].transform.position.y,
  13794. maidArray[0].transform.position.z));
  13795. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13796. }
  13797. if (maidArray[4] && maidArray[4].Visible)
  13798. {
  13799. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13800. maidArray[3].transform.position.y,
  13801. maidArray[3].transform.position.z));
  13802. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13803. }
  13804. if (maidArray[5] && maidArray[5].Visible)
  13805. {
  13806. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13807. maidArray[3].transform.position.y,
  13808. maidArray[3].transform.position.z));
  13809. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13810. }
  13811. if (maidArray[7] && maidArray[7].Visible)
  13812. {
  13813. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13814. maidArray[6].transform.position.y,
  13815. maidArray[6].transform.position.z));
  13816. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13817. }
  13818. if (maidArray[8] && maidArray[8].Visible)
  13819. {
  13820. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13821. maidArray[6].transform.position.y,
  13822. maidArray[6].transform.position.z));
  13823. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13824. }
  13825. if (maidArray[10] && maidArray[10].Visible)
  13826. {
  13827. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13828. maidArray[9].transform.position.y,
  13829. maidArray[9].transform.position.z));
  13830. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13831. }
  13832. if (maidArray[11] && maidArray[11].Visible)
  13833. {
  13834. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13835. maidArray[9].transform.position.y,
  13836. maidArray[9].transform.position.z));
  13837. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13838. }
  13839. if (maidArray[13] && maidArray[13].Visible)
  13840. {
  13841. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13842. maidArray[12].transform.position.y,
  13843. maidArray[12].transform.position.z));
  13844. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13845. }
  13846. isDance = true;
  13847. isDanceStart14 = true;
  13848. isSN4 = false;
  13849. isSN5 = false;
  13850. isSN6 = false;
  13851. }
  13852. if (isSD1)
  13853. {
  13854. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13855. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13856. for (int j = 0; j < maidCnt; j++)
  13857. {
  13858. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13859. string text5 = "dance_cmo_002_sd_f1.anm";
  13860. switch (j)
  13861. {
  13862. case 1:
  13863. case 3:
  13864. case 5:
  13865. case 7:
  13866. case 9:
  13867. case 11:
  13868. case 13:
  13869. text5 = "dance_cmo_002_sd_f2.anm";
  13870. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13871. break;
  13872. }
  13873. danceName[j] = text5;
  13874. if (maidArray[j] && maidArray[j].Visible)
  13875. {
  13876. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13877. {
  13878. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13879. }
  13880. string text4 = textAsset.text;
  13881. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13882. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13883. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13884. }
  13885. }
  13886. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13887. ikBui = 5;
  13888. isDanceStart1F = false;
  13889. isDanceStart2F = false;
  13890. isDanceStart3F = false;
  13891. isDanceStart4F = false;
  13892. isDanceStart5F = false;
  13893. isDanceStart6F = false;
  13894. isDanceStart7F = false;
  13895. isDanceStart8F = false;
  13896. isDanceStart9F = false;
  13897. isDanceStart10F = false;
  13898. isDanceStart11F = false;
  13899. isDanceStart12F = false;
  13900. isDanceStart13F = false;
  13901. isDanceStart14F = false;
  13902. isDanceStart15F = false;
  13903. for (int j = 0; j < maidCnt; j++)
  13904. {
  13905. danceFace[j] = 0f;
  13906. }
  13907. if (isDanceStart7V)
  13908. {
  13909. for (int j = 0; j < maidCnt; j++)
  13910. {
  13911. if (maidArray[j] && maidArray[j].Visible)
  13912. {
  13913. if (isDanceStart7V)
  13914. {
  13915. maidArray[j].SetPos(dancePos[j]);
  13916. maidArray[j].body0.transform.localRotation = danceRot[j];
  13917. }
  13918. }
  13919. }
  13920. isDanceStart7V = false;
  13921. }
  13922. if (isDanceStart8V)
  13923. {
  13924. for (int j = 0; j < maidCnt; j++)
  13925. {
  13926. if (maidArray[j] && maidArray[j].Visible)
  13927. {
  13928. if (isDanceStart8V)
  13929. {
  13930. maidArray[j].SetPos(dancePos[j]);
  13931. maidArray[j].body0.transform.localRotation = danceRot[j];
  13932. }
  13933. }
  13934. }
  13935. isDanceStart8V = false;
  13936. isDanceStart8P = false;
  13937. }
  13938. if (isDanceStart11V)
  13939. {
  13940. for (int j = 0; j < maidCnt; j++)
  13941. {
  13942. if (maidArray[j] && maidArray[j].Visible)
  13943. {
  13944. if (isDanceStart11V)
  13945. {
  13946. maidArray[j].SetPos(dancePos[j]);
  13947. maidArray[j].body0.transform.localRotation = danceRot[j];
  13948. }
  13949. }
  13950. }
  13951. isDanceStart11V = false;
  13952. }
  13953. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13954. || isDanceStart13K)
  13955. {
  13956. for (int j = 0; j < maidCnt; j++)
  13957. {
  13958. if (maidArray[j] && maidArray[j].Visible)
  13959. {
  13960. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13961. || isDanceStart13K)
  13962. {
  13963. maidArray[j].SetPos(dancePos[j]);
  13964. maidArray[j].body0.transform.localRotation = danceRot[j];
  13965. int i = j;
  13966. if (!isVR)
  13967. {
  13968. delCount[i] = 20;
  13969. if (goSlot[(int)selectList[i]] != null)
  13970. {
  13971. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13972. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13973. {
  13974. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13975. }
  13976. }
  13977. }
  13978. Maid maid = maidArray[j];
  13979. maid.DelProp(MPN.handitem, true);
  13980. maid.DelProp(MPN.accvag, true);
  13981. maid.DelProp(MPN.accanl, true);
  13982. maid.DelProp(MPN.kousoku_upper, true);
  13983. maid.DelProp(MPN.kousoku_lower, true);
  13984. maid.AllProcPropSeqStart();
  13985. }
  13986. }
  13987. }
  13988. isDanceStart1K = false;
  13989. isDanceStart3K = false;
  13990. isDanceStart4K = false;
  13991. isDanceStart5K = false;
  13992. isDanceStart6K = false;
  13993. isDanceStart9K = false;
  13994. isDanceStart13K = false;
  13995. }
  13996. if (isDanceStart14V)
  13997. {
  13998. for (int j = 0; j < maidCnt; j++)
  13999. {
  14000. if (maidArray[j] && maidArray[j].Visible)
  14001. {
  14002. if (isDanceStart14V)
  14003. {
  14004. maidArray[j].SetPos(dancePos[j]);
  14005. maidArray[j].body0.transform.localRotation = danceRot[j];
  14006. }
  14007. }
  14008. }
  14009. isDanceStart14V = false;
  14010. }
  14011. if (isDanceStart15V)
  14012. {
  14013. for (int j = 0; j < maidCnt; j++)
  14014. {
  14015. if (maidArray[j] && maidArray[j].Visible)
  14016. {
  14017. if (isDanceStart15V)
  14018. {
  14019. maidArray[j].SetPos(dancePos[j]);
  14020. maidArray[j].body0.transform.localRotation = danceRot[j];
  14021. }
  14022. }
  14023. }
  14024. isDanceStart15V = false;
  14025. }
  14026. for (int j = 0; j < maidCnt; j++)
  14027. {
  14028. isStop[j] = false;
  14029. isLock[j] = false;
  14030. pHandL[j] = 0;
  14031. pHandR[j] = 0;
  14032. muneIKL[j] = false;
  14033. muneIKR[j] = false;
  14034. if (!isVR)
  14035. {
  14036. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14037. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14038. }
  14039. if (maidArray[j].transform.position.y != 100f)
  14040. {
  14041. dancePos[j] = maidArray[j].transform.position;
  14042. }
  14043. else
  14044. {
  14045. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14046. }
  14047. danceRot[j] = maidArray[j].transform.localRotation;
  14048. }
  14049. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14050. {
  14051. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14052. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14053. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14054. maidArray[0].body0.transform.localRotation =
  14055. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14056. }
  14057. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14058. {
  14059. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14060. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14061. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14062. maidArray[2].body0.transform.localRotation =
  14063. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14064. }
  14065. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14066. {
  14067. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14068. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14069. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14070. maidArray[4].body0.transform.localRotation =
  14071. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14072. }
  14073. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14074. {
  14075. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14076. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14077. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14078. maidArray[6].body0.transform.localRotation =
  14079. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14080. }
  14081. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14082. {
  14083. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14084. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14085. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14086. maidArray[8].body0.transform.localRotation =
  14087. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14088. }
  14089. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14090. {
  14091. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14092. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14093. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14094. maidArray[10].body0.transform.localRotation =
  14095. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14096. }
  14097. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14098. {
  14099. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14100. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14101. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14102. maidArray[12].body0.transform.localRotation =
  14103. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14104. }
  14105. if (maidArray[1] && maidArray[1].Visible)
  14106. {
  14107. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14108. maidArray[0].transform.position.y,
  14109. maidArray[0].transform.position.z));
  14110. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14111. }
  14112. if (maidArray[3] && maidArray[3].Visible)
  14113. {
  14114. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14115. maidArray[2].transform.position.y,
  14116. maidArray[2].transform.position.z));
  14117. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14118. }
  14119. if (maidArray[5] && maidArray[5].Visible)
  14120. {
  14121. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14122. maidArray[4].transform.position.y,
  14123. maidArray[4].transform.position.z));
  14124. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14125. }
  14126. if (maidArray[7] && maidArray[7].Visible)
  14127. {
  14128. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14129. maidArray[6].transform.position.y,
  14130. maidArray[6].transform.position.z));
  14131. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14132. }
  14133. if (maidArray[9] && maidArray[9].Visible)
  14134. {
  14135. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14136. maidArray[8].transform.position.y,
  14137. maidArray[8].transform.position.z));
  14138. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14139. }
  14140. if (maidArray[11] && maidArray[11].Visible)
  14141. {
  14142. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14143. maidArray[10].transform.position.y,
  14144. maidArray[10].transform.position.z));
  14145. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14146. }
  14147. if (maidArray[13] && maidArray[13].Visible)
  14148. {
  14149. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14150. maidArray[12].transform.position.y,
  14151. maidArray[12].transform.position.z));
  14152. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14153. }
  14154. if (maidArray[2] && maidArray[2].Visible)
  14155. {
  14156. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14157. {
  14158. Vector3 vector = Vector3.zero;
  14159. vector.x = 0.6f;
  14160. maidArray[1].SetPos(vector);
  14161. if (maidArray[2] && maidArray[2].Visible)
  14162. {
  14163. vector.x = -0.6f;
  14164. maidArray[2].SetPos(vector);
  14165. }
  14166. if (maidArray[3] && maidArray[3].Visible)
  14167. {
  14168. vector.x = 1.2f;
  14169. maidArray[3].SetPos(vector);
  14170. }
  14171. if (maidArray[4] && maidArray[4].Visible)
  14172. {
  14173. vector.x = -1.2f;
  14174. maidArray[4].SetPos(vector);
  14175. }
  14176. if (maidArray[5] && maidArray[5].Visible)
  14177. {
  14178. vector.x = 1.8f;
  14179. maidArray[5].SetPos(vector);
  14180. }
  14181. if (maidArray[6] && maidArray[6].Visible)
  14182. {
  14183. vector.x = -1.8f;
  14184. maidArray[6].SetPos(vector);
  14185. }
  14186. if (maidArray[7] && maidArray[7].Visible)
  14187. {
  14188. vector.x = 2.4f;
  14189. maidArray[7].SetPos(vector);
  14190. }
  14191. if (maidArray[8] && maidArray[8].Visible)
  14192. {
  14193. vector.x = -2.4f;
  14194. maidArray[8].SetPos(vector);
  14195. }
  14196. if (maidArray[9] && maidArray[9].Visible)
  14197. {
  14198. vector.x = 3f;
  14199. maidArray[9].SetPos(vector);
  14200. }
  14201. if (maidArray[10] && maidArray[10].Visible)
  14202. {
  14203. vector.x = -3f;
  14204. maidArray[10].SetPos(vector);
  14205. }
  14206. if (maidArray[11] && maidArray[11].Visible)
  14207. {
  14208. vector.x = 3.6f;
  14209. maidArray[11].SetPos(vector);
  14210. }
  14211. if (maidArray[12] && maidArray[12].Visible)
  14212. {
  14213. vector.x = -3.6f;
  14214. maidArray[12].SetPos(vector);
  14215. }
  14216. if (maidArray[13] && maidArray[13].Visible)
  14217. {
  14218. vector.x = 4.2f;
  14219. maidArray[13].SetPos(vector);
  14220. }
  14221. }
  14222. }
  14223. isDance = true;
  14224. isDanceStart15 = true;
  14225. isSD1 = false;
  14226. }
  14227. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14228. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14229. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14230. || Input.GetKeyDown(KeyCode.Keypad0))
  14231. {
  14232. for (int j = 0; j < maidCnt; j++)
  14233. {
  14234. if (maidArray[j] && maidArray[j].Visible)
  14235. {
  14236. if (!isVR)
  14237. {
  14238. if (goSlot[(int)selectList[j]] != null)
  14239. {
  14240. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14241. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14242. {
  14243. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14244. }
  14245. }
  14246. }
  14247. }
  14248. }
  14249. }
  14250. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14251. {
  14252. if (h2Flg)
  14253. {
  14254. h2Flg = false;
  14255. }
  14256. else
  14257. {
  14258. string text4 = "";
  14259. if (wearIndex == 0)
  14260. {
  14261. text4 = "Underwear";
  14262. wearIndex = 1;
  14263. isWear = false;
  14264. isSkirt = false;
  14265. isBra = true;
  14266. isPanz = true;
  14267. isHeadset = false;
  14268. isGlove = false;
  14269. isStkg = true;
  14270. isShoes = false;
  14271. }
  14272. else if (wearIndex == 1)
  14273. {
  14274. text4 = "Nude";
  14275. wearIndex = 2;
  14276. isWear = false;
  14277. isSkirt = false;
  14278. isBra = false;
  14279. isPanz = false;
  14280. isHeadset = false;
  14281. isGlove = false;
  14282. isStkg = false;
  14283. isShoes = false;
  14284. }
  14285. else if (wearIndex == 2)
  14286. {
  14287. text4 = "None";
  14288. wearIndex = 0;
  14289. isWear = true;
  14290. isSkirt = true;
  14291. isBra = true;
  14292. isPanz = true;
  14293. isHeadset = true;
  14294. isGlove = true;
  14295. isStkg = true;
  14296. isShoes = true;
  14297. }
  14298. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14299. for (int j = 0; j < maidCnt; j++)
  14300. {
  14301. if (maidArray[j] && maidArray[j].Visible)
  14302. {
  14303. if (!isVR)
  14304. {
  14305. if (goSlot[(int)selectList[j]] != null)
  14306. {
  14307. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14308. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14309. {
  14310. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14311. }
  14312. }
  14313. }
  14314. maidArray[j].body0.SetMaskMode(maskMode);
  14315. }
  14316. }
  14317. }
  14318. }
  14319. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14320. {
  14321. quickSaveFlag = true;
  14322. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14323. try
  14324. {
  14325. thum_byte_to_base64_ = string.Empty;
  14326. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14327. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14328. }
  14329. catch { }
  14330. }
  14331. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14332. {
  14333. loadScene = 9999;
  14334. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14335. }
  14336. if (isScreen)
  14337. {
  14338. isScreen = false;
  14339. bGui = isGui;
  14340. isGui = false;
  14341. if (!isMessage)
  14342. {
  14343. foreach (UICamera uicamera in ui_cam_hide_list_)
  14344. {
  14345. uicamera.GetComponent<Camera>().enabled = true;
  14346. }
  14347. ui_cam_hide_list_.Clear();
  14348. }
  14349. else
  14350. {
  14351. if (editUI != null)
  14352. {
  14353. editUI.SetActive(true);
  14354. }
  14355. if (GameMain.Instance.CMSystem.ViewFps)
  14356. {
  14357. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14358. childObject.SetActive(true);
  14359. }
  14360. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14361. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14362. childObject2.SetActive(true);
  14363. childObject3.SetActive(true);
  14364. }
  14365. for (int j = 0; j < maidCnt; j++)
  14366. {
  14367. if (maidArray[j] && maidArray[j].Visible)
  14368. {
  14369. isBone[j] = isBoneN[j];
  14370. if (isBone[j])
  14371. {
  14372. gNeck[j].SetActive(true);
  14373. gSpine[j].SetActive(true);
  14374. gSpine0a[j].SetActive(true);
  14375. gSpine1a[j].SetActive(true);
  14376. gSpine1[j].SetActive(true);
  14377. gPelvis[j].SetActive(true);
  14378. gHandL[j].SetActive(true);
  14379. gArmL[j].SetActive(true);
  14380. gFootL[j].SetActive(true);
  14381. gHizaL[j].SetActive(true);
  14382. gHandR[j].SetActive(true);
  14383. gArmR[j].SetActive(true);
  14384. gFootR[j].SetActive(true);
  14385. gHizaR[j].SetActive(true);
  14386. gClavicleL[j].SetActive(true);
  14387. gClavicleR[j].SetActive(true);
  14388. }
  14389. }
  14390. }
  14391. }
  14392. if (isScreen2)
  14393. {
  14394. isScreen = true;
  14395. isScreen2 = false;
  14396. }
  14397. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14398. && !Input.GetKey(KeyCode.Q))
  14399. {
  14400. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14401. {
  14402. isScreen = true;
  14403. for (int j = 0; j < maidCnt; j++)
  14404. {
  14405. if (maidArray[j] && maidArray[j].Visible)
  14406. {
  14407. if (isBone[j])
  14408. {
  14409. gNeck[j].SetActive(false);
  14410. gSpine[j].SetActive(false);
  14411. gSpine0a[j].SetActive(false);
  14412. gSpine1a[j].SetActive(false);
  14413. gSpine1[j].SetActive(false);
  14414. gPelvis[j].SetActive(false);
  14415. gHandL[j].SetActive(false);
  14416. gArmL[j].SetActive(false);
  14417. gFootL[j].SetActive(false);
  14418. gHizaL[j].SetActive(false);
  14419. gHandR[j].SetActive(false);
  14420. gArmR[j].SetActive(false);
  14421. gFootR[j].SetActive(false);
  14422. gHizaR[j].SetActive(false);
  14423. gClavicleL[j].SetActive(false);
  14424. gClavicleR[j].SetActive(false);
  14425. }
  14426. isBoneN[j] = isBone[j];
  14427. isBone[j] = false;
  14428. }
  14429. }
  14430. if (!isMessage)
  14431. {
  14432. ui_cam_hide_list_.Clear();
  14433. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14434. foreach (UICamera uicamera2 in array16)
  14435. {
  14436. if (uicamera2.GetComponent<Camera>().enabled)
  14437. {
  14438. uicamera2.GetComponent<Camera>().enabled = false;
  14439. ui_cam_hide_list_.Add(uicamera2);
  14440. }
  14441. }
  14442. }
  14443. else
  14444. {
  14445. editUI = GameObject.Find("/UI Root/Camera");
  14446. if (editUI != null)
  14447. {
  14448. editUI.SetActive(false);
  14449. }
  14450. if (GameMain.Instance.CMSystem.ViewFps)
  14451. {
  14452. GameObject childObject =
  14453. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14454. childObject.SetActive(false);
  14455. }
  14456. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14457. GameObject childObject3 =
  14458. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14459. childObject2.SetActive(false);
  14460. childObject3.SetActive(false);
  14461. }
  14462. isGui = bGui;
  14463. bGui = false;
  14464. GameMain.Instance.MainCamera.ScreenShot(false);
  14465. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14466. }
  14467. }
  14468. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14469. {
  14470. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14471. keyFlg2 = true;
  14472. }
  14473. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14474. {
  14475. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14476. keyFlg2 = true;
  14477. }
  14478. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14479. {
  14480. mainCameraTransform.eulerAngles =
  14481. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14482. keyFlg2 = true;
  14483. }
  14484. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14485. {
  14486. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14487. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14488. mainCamera.SetDistance(3f, true);
  14489. keyFlg2 = true;
  14490. }
  14491. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14492. {
  14493. cameraIti = mainCamera.GetTargetPos();
  14494. cameraIti2 = mainCamera.GetPos();
  14495. cameraItiAngle = mainCamera.transform.eulerAngles;
  14496. cameraItiDistance = mainCamera.GetDistance();
  14497. keyFlg2 = true;
  14498. }
  14499. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14500. {
  14501. mainCamera.SetTargetPos(cameraIti, true);
  14502. mainCamera.SetPos(cameraIti2);
  14503. mainCamera.transform.eulerAngles = cameraItiAngle;
  14504. mainCamera.SetDistance(cameraItiDistance, true);
  14505. keyFlg2 = true;
  14506. }
  14507. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14508. {
  14509. if (keyFlg2)
  14510. {
  14511. keyFlg2 = false;
  14512. }
  14513. else
  14514. {
  14515. effectIndex++;
  14516. if (effectIndex == 9)
  14517. {
  14518. kami.SetActive(false);
  14519. effectIndex = 0;
  14520. }
  14521. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14522. if (!isBlur)
  14523. {
  14524. component3.mode = Vignetting.AberrationMode.Simple;
  14525. component3.intensity = -3.98f;
  14526. component3.chromaticAberration = -0.75f;
  14527. component3.axialAberration = 1.18f;
  14528. component3.blurSpread = 4.19f;
  14529. component3.luminanceDependency = 0.494f;
  14530. component3.blurDistance = 1.71f;
  14531. component3.enabled = false;
  14532. }
  14533. if (kami) { }
  14534. if (effectIndex == 0)
  14535. {
  14536. component3.enabled = false;
  14537. }
  14538. if (effectIndex == 1)
  14539. {
  14540. component3.mode = Vignetting.AberrationMode.Simple;
  14541. component3.intensity = -1f;
  14542. component3.chromaticAberration = 0f;
  14543. component3.axialAberration = 0f;
  14544. component3.blurSpread = 5f;
  14545. component3.luminanceDependency = 0f;
  14546. component3.blurDistance = 0f;
  14547. component3.enabled = true;
  14548. }
  14549. if (effectIndex == 2)
  14550. {
  14551. component3.enabled = true;
  14552. }
  14553. if (effectIndex == 3)
  14554. {
  14555. component3.mode = Vignetting.AberrationMode.Simple;
  14556. component3.intensity = 9f;
  14557. component3.chromaticAberration = 0f;
  14558. component3.axialAberration = 0f;
  14559. component3.blurSpread = 5f;
  14560. component3.luminanceDependency = 0f;
  14561. component3.blurDistance = 0f;
  14562. component3.enabled = true;
  14563. }
  14564. if (effectIndex == 4)
  14565. {
  14566. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14567. kami = (GameObject)Instantiate(@object);
  14568. Vector3 localPosition = kami.transform.localPosition;
  14569. localPosition.y = 3.5f;
  14570. kami.transform.localPosition = localPosition;
  14571. }
  14572. if (effectIndex == 5)
  14573. {
  14574. component3.enabled = true;
  14575. component3.mode = Vignetting.AberrationMode.Simple;
  14576. component3.intensity = -2.5f;
  14577. component3.chromaticAberration = -0.3f;
  14578. component3.axialAberration = 0.5f;
  14579. component3.blurSpread = 4.5f;
  14580. component3.luminanceDependency = 0.2f;
  14581. component3.blurDistance = 0.8f;
  14582. component3.enabled = true;
  14583. }
  14584. if (effectIndex == 6)
  14585. {
  14586. kami.SetActive(false);
  14587. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14588. kami = (GameObject)Instantiate(@object);
  14589. Vector3 localPosition = kami.transform.localPosition;
  14590. localPosition.y = 3.5f;
  14591. kami.transform.localPosition = localPosition;
  14592. }
  14593. if (effectIndex == 7)
  14594. {
  14595. component3.enabled = true;
  14596. component3.mode = Vignetting.AberrationMode.Simple;
  14597. component3.intensity = -2.5f;
  14598. component3.chromaticAberration = -0.3f;
  14599. component3.axialAberration = 0.5f;
  14600. component3.blurSpread = 4.5f;
  14601. component3.luminanceDependency = 0.2f;
  14602. component3.blurDistance = 0.8f;
  14603. component3.enabled = true;
  14604. }
  14605. if (effectIndex == 8)
  14606. {
  14607. component3.mode = Vignetting.AberrationMode.Simple;
  14608. component3.intensity = 8f;
  14609. component3.chromaticAberration = 0f;
  14610. component3.axialAberration = 0f;
  14611. component3.blurSpread = 5f;
  14612. component3.luminanceDependency = 0f;
  14613. component3.blurDistance = 0f;
  14614. component3.enabled = true;
  14615. }
  14616. }
  14617. }
  14618. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14619. {
  14620. qFlg = false;
  14621. }
  14622. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14623. {
  14624. bool flag5 = false;
  14625. for (int k = 0; k < keyArray.Length; k++)
  14626. {
  14627. if (Input.GetKey(keyArray[k]))
  14628. {
  14629. flag5 = true;
  14630. break;
  14631. }
  14632. }
  14633. if (!getModKeyPressing(modKey.Shift))
  14634. {
  14635. if (!flag5)
  14636. {
  14637. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14638. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14639. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14640. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14641. {
  14642. Vector3 vector = softG;
  14643. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14644. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14645. softG = vector;
  14646. }
  14647. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14648. {
  14649. Vector3 vector = softG;
  14650. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14651. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14652. softG = vector;
  14653. }
  14654. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14655. {
  14656. Vector3 vector = softG;
  14657. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14658. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14659. softG = vector;
  14660. }
  14661. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14662. {
  14663. Vector3 vector = softG;
  14664. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14665. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14666. softG = vector;
  14667. }
  14668. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14669. {
  14670. Vector3 vector = softG;
  14671. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14672. softG = vector;
  14673. }
  14674. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14675. {
  14676. Vector3 vector = softG;
  14677. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14678. softG = vector;
  14679. }
  14680. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14681. {
  14682. Vector3 vector = softG;
  14683. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14684. softG = vector;
  14685. }
  14686. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14687. {
  14688. Vector3 vector = softG;
  14689. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14690. softG = vector;
  14691. }
  14692. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14693. {
  14694. Vector3 vector = softG;
  14695. vector.y += 6E-05f * speed;
  14696. softG = vector;
  14697. }
  14698. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14699. {
  14700. Vector3 vector = softG;
  14701. vector.y -= 6E-05f * speed;
  14702. softG = vector;
  14703. }
  14704. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14705. {
  14706. softG = new Vector3(0f, -0.003f, 0f);
  14707. }
  14708. for (int j = 0; j < maidCnt; j++)
  14709. {
  14710. Maid maid = maidArray[j];
  14711. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14712. {
  14713. if (maid.body0.goSlot[l].obj != null)
  14714. {
  14715. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14716. if (component2 != null && component2.enabled)
  14717. {
  14718. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14719. }
  14720. }
  14721. List<THair1> fieldValue3 =
  14722. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14723. for (int k = 0; k < fieldValue3.Count; k++)
  14724. {
  14725. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14726. }
  14727. }
  14728. }
  14729. }
  14730. }
  14731. else if (!flag5)
  14732. {
  14733. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14734. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14735. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14736. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14737. {
  14738. Vector3 vector = softG2;
  14739. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14740. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14741. softG2 = vector;
  14742. }
  14743. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14744. {
  14745. Vector3 vector = softG2;
  14746. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14747. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14748. softG2 = vector;
  14749. }
  14750. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14751. {
  14752. Vector3 vector = softG2;
  14753. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14754. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14755. softG2 = vector;
  14756. }
  14757. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14758. {
  14759. Vector3 vector = softG2;
  14760. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14761. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14762. softG2 = vector;
  14763. }
  14764. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14765. {
  14766. Vector3 vector = softG2;
  14767. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14768. softG2 = vector;
  14769. }
  14770. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14771. {
  14772. Vector3 vector = softG2;
  14773. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14774. softG2 = vector;
  14775. }
  14776. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14777. {
  14778. Vector3 vector = softG2;
  14779. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14780. softG2 = vector;
  14781. }
  14782. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14783. {
  14784. Vector3 vector = softG2;
  14785. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14786. softG2 = vector;
  14787. }
  14788. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14789. {
  14790. Vector3 vector = softG2;
  14791. vector.y += 2E-05f * speed;
  14792. softG2 = vector;
  14793. }
  14794. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14795. {
  14796. Vector3 vector = softG2;
  14797. vector.y -= 2E-05f * speed;
  14798. softG2 = vector;
  14799. }
  14800. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14801. {
  14802. softG2 = new Vector3(0f, -0.005f, 0f);
  14803. }
  14804. for (int j = 0; j < maidCnt; j++)
  14805. {
  14806. Maid maid = maidArray[j];
  14807. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14808. {
  14809. if (maid.body0.goSlot[l].obj != null)
  14810. {
  14811. DynamicSkirtBone fieldValue8 =
  14812. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14813. "m_SkirtBone");
  14814. if (fieldValue8 != null)
  14815. {
  14816. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14817. fieldValue8.UpdateParameters();
  14818. }
  14819. }
  14820. }
  14821. }
  14822. }
  14823. }
  14824. if (!isVR)
  14825. {
  14826. if (doguObject.Count > 0)
  14827. {
  14828. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14829. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14830. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14831. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14832. {
  14833. idoFlg2 = true;
  14834. doguObject[doguSelectIndex].transform.localScale =
  14835. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14836. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14837. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14838. }
  14839. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14840. {
  14841. idoFlg2 = true;
  14842. doguObject[doguSelectIndex].transform.localScale =
  14843. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14844. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14845. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14846. }
  14847. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14848. {
  14849. idoFlg2 = true;
  14850. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14851. }
  14852. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14853. {
  14854. doguObject[doguSelectIndex]
  14855. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14856. idoFlg2 = true;
  14857. }
  14858. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14859. {
  14860. doguObject[doguSelectIndex]
  14861. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14862. idoFlg2 = true;
  14863. }
  14864. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14865. && getModKeyPressing(modKey.Alt))
  14866. {
  14867. for (int k = 0; k < 10; k++)
  14868. {
  14869. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14870. Vector3.right,
  14871. -doguObject[doguSelectIndex]
  14872. .transform.rotation.eulerAngles.x);
  14873. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14874. Vector3.forward,
  14875. -doguObject[doguSelectIndex]
  14876. .transform.rotation.eulerAngles.z);
  14877. }
  14878. idoFlg2 = true;
  14879. Vector3 vector = Vector3.zero;
  14880. Vector3 zero3 = Vector3.zero;
  14881. zero3.x = -90f;
  14882. int num12 = doguIndex[doguSelectIndex];
  14883. switch (num12)
  14884. {
  14885. case 3:
  14886. vector.z = 0.5f;
  14887. zero3.z = 90f;
  14888. break;
  14889. case 4:
  14890. case 5:
  14891. case 7:
  14892. case 10:
  14893. case 11: break;
  14894. case 6:
  14895. vector.z = 0.6f;
  14896. zero3.x = 0f;
  14897. break;
  14898. case 8:
  14899. vector.z = 0.5f;
  14900. zero3.x = 0f;
  14901. break;
  14902. case 9:
  14903. vector.z = 0.32f;
  14904. zero3.z = 180f;
  14905. break;
  14906. case 12:
  14907. vector.z = 0.5f;
  14908. zero3.z = 180f;
  14909. break;
  14910. case 13:
  14911. vector.z = 0.7f;
  14912. zero3.z = 180f;
  14913. break;
  14914. default:
  14915. if (num12 != 16)
  14916. {
  14917. switch (num12)
  14918. {
  14919. case 23:
  14920. vector.z = 2.7f;
  14921. vector.x = 0.77f;
  14922. zero3.z = 90f;
  14923. break;
  14924. case 25:
  14925. vector.z = 0.5f;
  14926. vector.y = 0.9f;
  14927. zero3.z = 180f;
  14928. break;
  14929. case 26:
  14930. vector.z = 0.5f;
  14931. vector.y = 0.9f;
  14932. zero3.z = 180f;
  14933. break;
  14934. case 30:
  14935. vector.z = 0f;
  14936. zero3.z = 0f;
  14937. break;
  14938. case 31:
  14939. vector.z = -0.6f;
  14940. vector.y = 0.96f;
  14941. zero3.z = 180f;
  14942. break;
  14943. case 32:
  14944. vector.z = -0.6f;
  14945. vector.y = 0.96f;
  14946. zero3.z = 180f;
  14947. break;
  14948. case 33:
  14949. vector.z = -0.6f;
  14950. vector.y = 0.85f;
  14951. zero3.z = 180f;
  14952. break;
  14953. }
  14954. }
  14955. else
  14956. {
  14957. vector.z = -0.4f;
  14958. zero3.z = 180f;
  14959. }
  14960. break;
  14961. }
  14962. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14963. }
  14964. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14965. && Input.GetKey(KeyCode.J))
  14966. {
  14967. doguObject[doguSelectIndex]
  14968. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14969. new Vector3(vector3.x, 0f, vector3.z),
  14970. 0.3f);
  14971. doguObject[doguSelectIndex]
  14972. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14973. new Vector3(vector2.x, 0f, vector2.z),
  14974. 0.3f);
  14975. idoFlg2 = true;
  14976. }
  14977. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14978. && Input.GetKey(KeyCode.L))
  14979. {
  14980. doguObject[doguSelectIndex]
  14981. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14982. new Vector3(vector3.x, 0f, vector3.z),
  14983. 0.3f);
  14984. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14985. new Vector3(vector2.x, 0f, vector2.z),
  14986. -0.3f);
  14987. idoFlg2 = true;
  14988. }
  14989. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14990. && Input.GetKey(KeyCode.J))
  14991. {
  14992. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14993. new Vector3(vector3.x, 0f, vector3.z),
  14994. -0.3f);
  14995. doguObject[doguSelectIndex]
  14996. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14997. new Vector3(vector2.x, 0f, vector2.z),
  14998. 0.3f);
  14999. idoFlg2 = true;
  15000. }
  15001. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15002. && Input.GetKey(KeyCode.L))
  15003. {
  15004. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15005. new Vector3(vector3.x, 0f, vector3.z),
  15006. -0.3f);
  15007. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15008. new Vector3(vector2.x, 0f, vector2.z),
  15009. -0.3f);
  15010. idoFlg2 = true;
  15011. }
  15012. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15013. {
  15014. doguObject[doguSelectIndex]
  15015. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15016. new Vector3(vector3.x, 0f, vector3.z),
  15017. 0.4f);
  15018. idoFlg2 = true;
  15019. }
  15020. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15021. {
  15022. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15023. new Vector3(vector3.x, 0f, vector3.z),
  15024. -0.4f);
  15025. idoFlg2 = true;
  15026. }
  15027. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15028. {
  15029. doguObject[doguSelectIndex]
  15030. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15031. new Vector3(vector2.x, 0f, vector2.z),
  15032. 0.4f);
  15033. idoFlg2 = true;
  15034. }
  15035. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15036. {
  15037. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15038. new Vector3(vector2.x, 0f, vector2.z),
  15039. -0.4f);
  15040. idoFlg2 = true;
  15041. }
  15042. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15043. {
  15044. doguObject[doguSelectIndex].transform.localRotation =
  15045. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15046. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15047. idoFlg2 = true;
  15048. }
  15049. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15050. {
  15051. doguObject[doguSelectIndex].transform.localRotation =
  15052. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15053. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15054. idoFlg2 = true;
  15055. }
  15056. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15057. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15058. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15059. {
  15060. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15061. new Vector3(vector3.x, 0f, vector3.z),
  15062. -0.7f);
  15063. idoFlg2 = true;
  15064. }
  15065. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15066. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15067. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15068. {
  15069. doguObject[doguSelectIndex]
  15070. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15071. new Vector3(vector3.x, 0f, vector3.z),
  15072. 0.7f);
  15073. idoFlg2 = true;
  15074. }
  15075. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15076. && (Input.GetKey(KeyCode.Minus)
  15077. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15078. {
  15079. doguObject[doguSelectIndex]
  15080. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15081. new Vector3(vector2.x, 0f, vector2.z),
  15082. 0.7f);
  15083. idoFlg2 = true;
  15084. }
  15085. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15086. && (Input.GetKey(KeyCode.Quote)
  15087. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15088. {
  15089. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15090. new Vector3(vector2.x, 0f, vector2.z),
  15091. -0.7f);
  15092. idoFlg2 = true;
  15093. }
  15094. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15095. && Input.GetKey(KeyCode.J))
  15096. {
  15097. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15098. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15099. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15100. doguObject[doguSelectIndex].transform.localPosition = vector;
  15101. idoFlg2 = true;
  15102. }
  15103. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15104. && Input.GetKey(KeyCode.L))
  15105. {
  15106. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15107. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15108. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15109. doguObject[doguSelectIndex].transform.localPosition = vector;
  15110. idoFlg2 = true;
  15111. }
  15112. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15113. && Input.GetKey(KeyCode.J))
  15114. {
  15115. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15116. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15117. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15118. doguObject[doguSelectIndex].transform.localPosition = vector;
  15119. idoFlg2 = true;
  15120. }
  15121. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15122. && Input.GetKey(KeyCode.L))
  15123. {
  15124. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15125. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15126. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15127. doguObject[doguSelectIndex].transform.localPosition = vector;
  15128. idoFlg2 = true;
  15129. }
  15130. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15131. {
  15132. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15133. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15134. doguObject[doguSelectIndex].transform.localPosition = vector;
  15135. idoFlg2 = true;
  15136. }
  15137. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15138. {
  15139. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15140. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15141. doguObject[doguSelectIndex].transform.localPosition = vector;
  15142. idoFlg2 = true;
  15143. }
  15144. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15145. {
  15146. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15147. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15148. doguObject[doguSelectIndex].transform.localPosition = vector;
  15149. idoFlg2 = true;
  15150. }
  15151. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15152. {
  15153. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15154. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15155. doguObject[doguSelectIndex].transform.localPosition = vector;
  15156. idoFlg2 = true;
  15157. }
  15158. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15159. {
  15160. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15161. vector.y += 0.0075f * speed;
  15162. doguObject[doguSelectIndex].transform.localPosition = vector;
  15163. idoFlg2 = true;
  15164. }
  15165. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15166. {
  15167. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15168. vector.y -= 0.0075f * speed;
  15169. doguObject[doguSelectIndex].transform.localPosition = vector;
  15170. idoFlg2 = true;
  15171. }
  15172. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15173. {
  15174. idoFlg2 = true;
  15175. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15176. {
  15177. Destroy(doguObject[doguSelectIndex]);
  15178. doguObject.RemoveAt(doguSelectIndex);
  15179. }
  15180. doguIndex.RemoveAt(doguSelectIndex);
  15181. doguSelectIndex = 0;
  15182. }
  15183. }
  15184. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15185. {
  15186. idoFlg2 = true;
  15187. if (doguSelectIndex == doguObject.Count)
  15188. {
  15189. doguIndex.Add(0);
  15190. }
  15191. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15192. {
  15193. Destroy(doguObject[doguSelectIndex]);
  15194. doguObject.RemoveAt(doguSelectIndex);
  15195. }
  15196. else
  15197. {
  15198. doguIndex.Add(0);
  15199. doguSelectIndex = doguIndex.Count - 1;
  15200. }
  15201. List<int> list2;
  15202. int index;
  15203. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15204. if (doguIndex[doguSelectIndex] <= -1)
  15205. {
  15206. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15207. }
  15208. if (doguIndex[doguSelectIndex] > 0)
  15209. {
  15210. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15211. {
  15212. Object @object = null;
  15213. for (int j = 0; j < 5; j++)
  15214. {
  15215. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15216. if (@object != null)
  15217. {
  15218. break;
  15219. }
  15220. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15221. }
  15222. doguObject.Add(Instantiate(@object) as GameObject);
  15223. }
  15224. else
  15225. {
  15226. Material material = new Material(Shader.Find("Mirror"));
  15227. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15228. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15229. gameObject7.GetComponent<Renderer>().material = material;
  15230. gameObject7.AddComponent<MirrorReflection2>();
  15231. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15232. component5.m_TextureSize = 2048;
  15233. component5.m_ClipPlaneOffset = 0f;
  15234. gameObject7.GetComponent<Renderer>().enabled = true;
  15235. doguObject.Add(gameObject7);
  15236. }
  15237. Vector3 vector = Vector3.zero;
  15238. Vector3 zero3 = Vector3.zero;
  15239. zero3.x = -90f;
  15240. switch (doguIndex[doguSelectIndex])
  15241. {
  15242. case 1:
  15243. vector.z = -0.5f;
  15244. goto IL_344DC;
  15245. case 2:
  15246. vector.z = -0.5f;
  15247. goto IL_344DC;
  15248. case 3:
  15249. vector.z = 0.5f;
  15250. zero3.z = 90f;
  15251. goto IL_344DC;
  15252. case 4:
  15253. vector.z = 0.9f;
  15254. goto IL_344DC;
  15255. case 5:
  15256. vector.z = 0.9f;
  15257. goto IL_344DC;
  15258. case 6:
  15259. vector.z = 0.6f;
  15260. zero3.x = 0f;
  15261. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15262. goto IL_344DC;
  15263. case 7:
  15264. vector.z = 0.6f;
  15265. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15266. goto IL_344DC;
  15267. case 8:
  15268. vector.z = 0.5f;
  15269. zero3.x = 0f;
  15270. goto IL_344DC;
  15271. case 9:
  15272. vector.z = 0.32f;
  15273. zero3.z = 180f;
  15274. goto IL_344DC;
  15275. case 10:
  15276. vector.z = 0.6f;
  15277. goto IL_344DC;
  15278. case 11:
  15279. vector.z = 0.6f;
  15280. goto IL_344DC;
  15281. case 12:
  15282. vector.z = 0.5f;
  15283. zero3.z = 180f;
  15284. goto IL_344DC;
  15285. case 13:
  15286. vector.z = 0.7f;
  15287. zero3.z = 180f;
  15288. goto IL_344DC;
  15289. case 14:
  15290. vector.z = -0.4f;
  15291. goto IL_344DC;
  15292. case 15:
  15293. vector.z = -0.4f;
  15294. goto IL_344DC;
  15295. case 16:
  15296. vector.z = -0.4f;
  15297. zero3.z = 180f;
  15298. goto IL_344DC;
  15299. case 17:
  15300. vector.z = -0.4f;
  15301. goto IL_344DC;
  15302. case 18:
  15303. vector.z = -0.2f;
  15304. goto IL_344DC;
  15305. case 19:
  15306. vector.z = 0f;
  15307. goto IL_344DC;
  15308. case 20:
  15309. vector.z = 3.4f;
  15310. vector.x = -1f;
  15311. goto IL_344DC;
  15312. case 21:
  15313. vector.z = 3.4f;
  15314. vector.x = -1f;
  15315. goto IL_344DC;
  15316. case 22:
  15317. vector.z = 3.4f;
  15318. vector.y = 0.3f;
  15319. vector.x = -1f;
  15320. goto IL_344DC;
  15321. case 23:
  15322. vector.z = 2.7f;
  15323. vector.x = 0.77f;
  15324. zero3.z = 90f;
  15325. goto IL_344DC;
  15326. case 25:
  15327. vector.z = 0.5f;
  15328. vector.y = 0.9f;
  15329. zero3.z = 180f;
  15330. goto IL_344DC;
  15331. case 26:
  15332. vector.z = 0.5f;
  15333. vector.y = 0.9f;
  15334. zero3.z = 180f;
  15335. goto IL_344DC;
  15336. case 29:
  15337. vector.z = 0.5f;
  15338. vector.x = -1.05f;
  15339. goto IL_344DC;
  15340. case 30:
  15341. vector.z = -2.8f;
  15342. zero3.z = 0f;
  15343. zero3.x = 0f;
  15344. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15345. goto IL_344DC;
  15346. case 31:
  15347. vector.z = -0.6f;
  15348. vector.y = 0.96f;
  15349. zero3.z = 180f;
  15350. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15351. goto IL_344DC;
  15352. case 32:
  15353. vector.z = -0.6f;
  15354. vector.y = 0.96f;
  15355. zero3.z = 180f;
  15356. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15357. goto IL_344DC;
  15358. case 33:
  15359. vector.z = -0.6f;
  15360. vector.y = 0.85f;
  15361. zero3.z = 180f;
  15362. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15363. goto IL_344DC;
  15364. }
  15365. vector.z = 0.5f;
  15366. IL_344DC:
  15367. doguObject[doguSelectIndex].transform.localPosition = vector;
  15368. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15369. }
  15370. if (doguIndex[doguSelectIndex] == 0)
  15371. {
  15372. doguIndex.RemoveAt(doguSelectIndex);
  15373. }
  15374. }
  15375. else if (Input.GetKeyDown(KeyCode.W))
  15376. {
  15377. for (int k = 0; k < keyArray.Length; k++)
  15378. {
  15379. if (Input.GetKey(keyArray[k]))
  15380. {
  15381. wFlg = true;
  15382. break;
  15383. }
  15384. }
  15385. }
  15386. else if (Input.GetKeyUp(KeyCode.W))
  15387. {
  15388. if (wFlg)
  15389. {
  15390. wFlg = false;
  15391. }
  15392. else if (idoFlg2)
  15393. {
  15394. idoFlg2 = false;
  15395. }
  15396. else
  15397. {
  15398. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15399. {
  15400. Destroy(doguObject[doguSelectIndex]);
  15401. doguObject.RemoveAt(doguSelectIndex);
  15402. }
  15403. else
  15404. {
  15405. doguIndex.Add(0);
  15406. doguSelectIndex = doguIndex.Count - 1;
  15407. }
  15408. List<int> list2;
  15409. int index;
  15410. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15411. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15412. {
  15413. doguIndex[doguSelectIndex] = 0;
  15414. }
  15415. if (doguIndex[doguSelectIndex] > 0)
  15416. {
  15417. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15418. {
  15419. Object @object = null;
  15420. for (int j = 0; j < 5; j++)
  15421. {
  15422. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15423. if (@object != null)
  15424. {
  15425. break;
  15426. }
  15427. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15428. }
  15429. doguObject.Add(Instantiate(@object) as GameObject);
  15430. }
  15431. else
  15432. {
  15433. Material material = new Material(Shader.Find("Mirror"));
  15434. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15435. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15436. gameObject7.GetComponent<Renderer>().material = material;
  15437. gameObject7.AddComponent<MirrorReflection2>();
  15438. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15439. component5.m_TextureSize = 2048;
  15440. component5.m_ClipPlaneOffset = 0f;
  15441. gameObject7.GetComponent<Renderer>().enabled = true;
  15442. doguObject.Add(gameObject7);
  15443. }
  15444. Vector3 vector = Vector3.zero;
  15445. Vector3 zero3 = Vector3.zero;
  15446. zero3.x = -90f;
  15447. switch (doguIndex[doguSelectIndex])
  15448. {
  15449. case 1:
  15450. vector.z = -0.5f;
  15451. goto IL_34D66;
  15452. case 2:
  15453. vector.z = -0.5f;
  15454. goto IL_34D66;
  15455. case 3:
  15456. vector.z = 0.5f;
  15457. zero3.z = 90f;
  15458. goto IL_34D66;
  15459. case 4:
  15460. vector.z = 0.9f;
  15461. goto IL_34D66;
  15462. case 5:
  15463. vector.z = 0.9f;
  15464. goto IL_34D66;
  15465. case 6:
  15466. vector.z = 0.6f;
  15467. zero3.x = 0f;
  15468. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15469. goto IL_34D66;
  15470. case 7:
  15471. vector.z = 0.6f;
  15472. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15473. goto IL_34D66;
  15474. case 8:
  15475. vector.z = 0.5f;
  15476. zero3.x = 0f;
  15477. goto IL_34D66;
  15478. case 9:
  15479. vector.z = 0.32f;
  15480. zero3.z = 180f;
  15481. goto IL_34D66;
  15482. case 10:
  15483. vector.z = 0.6f;
  15484. goto IL_34D66;
  15485. case 11:
  15486. vector.z = 0.6f;
  15487. goto IL_34D66;
  15488. case 12:
  15489. vector.z = 0.5f;
  15490. zero3.z = 180f;
  15491. goto IL_34D66;
  15492. case 13:
  15493. vector.z = 0.7f;
  15494. zero3.z = 180f;
  15495. goto IL_34D66;
  15496. case 14:
  15497. vector.z = -0.4f;
  15498. goto IL_34D66;
  15499. case 15:
  15500. vector.z = -0.4f;
  15501. goto IL_34D66;
  15502. case 16:
  15503. vector.z = -0.4f;
  15504. zero3.z = 180f;
  15505. goto IL_34D66;
  15506. case 17:
  15507. vector.z = -0.4f;
  15508. goto IL_34D66;
  15509. case 18:
  15510. vector.z = -0.2f;
  15511. goto IL_34D66;
  15512. case 19:
  15513. vector.z = 0f;
  15514. goto IL_34D66;
  15515. case 20:
  15516. vector.z = 3.4f;
  15517. vector.x = -1f;
  15518. goto IL_34D66;
  15519. case 21:
  15520. vector.z = 3.4f;
  15521. vector.x = -1f;
  15522. goto IL_34D66;
  15523. case 22:
  15524. vector.z = 3.4f;
  15525. vector.y = 0.3f;
  15526. vector.x = -1f;
  15527. goto IL_34D66;
  15528. case 23:
  15529. vector.z = 2.7f;
  15530. vector.x = 0.77f;
  15531. zero3.z = 90f;
  15532. goto IL_34D66;
  15533. case 25:
  15534. vector.z = 0.5f;
  15535. vector.y = 0.9f;
  15536. zero3.z = 180f;
  15537. goto IL_34D66;
  15538. case 26:
  15539. vector.z = 0.5f;
  15540. vector.y = 0.9f;
  15541. zero3.z = 180f;
  15542. goto IL_34D66;
  15543. case 29:
  15544. vector.z = 0.5f;
  15545. vector.x = -1.05f;
  15546. goto IL_34D66;
  15547. case 30:
  15548. vector.z = -2.8f;
  15549. zero3.z = 0f;
  15550. zero3.x = 0f;
  15551. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15552. goto IL_34D66;
  15553. case 31:
  15554. vector.z = -0.6f;
  15555. vector.y = 0.96f;
  15556. zero3.z = 180f;
  15557. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15558. goto IL_34D66;
  15559. case 32:
  15560. vector.z = -0.6f;
  15561. vector.y = 0.96f;
  15562. zero3.z = 180f;
  15563. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15564. goto IL_34D66;
  15565. case 33:
  15566. vector.z = -0.6f;
  15567. vector.y = 0.85f;
  15568. zero3.z = 180f;
  15569. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15570. goto IL_34D66;
  15571. }
  15572. vector.z = 0.5f;
  15573. IL_34D66:;
  15574. }
  15575. if (doguIndex[doguSelectIndex] == 0)
  15576. {
  15577. doguIndex.RemoveAt(doguSelectIndex);
  15578. }
  15579. }
  15580. }
  15581. }
  15582. if (!isVR)
  15583. {
  15584. int i;
  15585. for (i = 0; i < 999; i++)
  15586. {
  15587. if (gDogu[i] != null)
  15588. {
  15589. gDogu[i].GetComponent<Renderer>().enabled = false;
  15590. gDogu[i].SetActive(false);
  15591. if (mDogu[i].del)
  15592. {
  15593. mDogu[i].del = false;
  15594. Destroy(doguBObject[i]);
  15595. doguBObject.RemoveAt(i);
  15596. }
  15597. else if (mDogu[i].count > 0)
  15598. {
  15599. mDogu[i].count--;
  15600. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15601. {
  15602. if (mDogu[i].count == 1)
  15603. {
  15604. doguBObject[i].SetActive(false);
  15605. }
  15606. if (mDogu[i].count == 0)
  15607. {
  15608. doguBObject[i].SetActive(true);
  15609. string name = doguBObject[i].name;
  15610. if (name != null)
  15611. {
  15612. if (!(name == "Particle/pLineY"))
  15613. {
  15614. if (!(name == "Particle/pLineP02"))
  15615. {
  15616. if (!(name == "Particle/pLine_act2"))
  15617. {
  15618. if (name == "Particle/pHeart01")
  15619. {
  15620. mDogu[i].count = 77;
  15621. }
  15622. }
  15623. else
  15624. {
  15625. mDogu[i].count = 90;
  15626. }
  15627. }
  15628. else
  15629. {
  15630. mDogu[i].count = 115;
  15631. }
  15632. }
  15633. else
  15634. {
  15635. mDogu[i].count = 180;
  15636. }
  15637. }
  15638. }
  15639. }
  15640. }
  15641. }
  15642. }
  15643. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15644. {
  15645. ikMode2 = 11;
  15646. }
  15647. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15648. {
  15649. ikMode2 = 12;
  15650. }
  15651. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15652. {
  15653. ikMode2 = 14;
  15654. }
  15655. else if (Input.GetKey(KeyCode.X))
  15656. {
  15657. ikMode2 = 9;
  15658. }
  15659. else if (Input.GetKey(KeyCode.Z))
  15660. {
  15661. ikMode2 = 10;
  15662. }
  15663. else if (Input.GetKey(KeyCode.C))
  15664. {
  15665. ikMode2 = 13;
  15666. }
  15667. else if (Input.GetKey(KeyCode.D))
  15668. {
  15669. ikMode2 = 15;
  15670. }
  15671. else
  15672. {
  15673. ikMode2 = 0;
  15674. }
  15675. if (gBg != null)
  15676. {
  15677. if (!isCube3)
  15678. {
  15679. gBg.GetComponent<Renderer>().enabled = false;
  15680. gBg.SetActive(false);
  15681. }
  15682. else
  15683. {
  15684. if (ikMode2 > 0 && ikMode2 != 15)
  15685. {
  15686. gBg.GetComponent<Renderer>().enabled = true;
  15687. gBg.SetActive(true);
  15688. }
  15689. else
  15690. {
  15691. gBg.GetComponent<Renderer>().enabled = false;
  15692. gBg.SetActive(false);
  15693. }
  15694. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15695. {
  15696. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15697. }
  15698. if (ikMode2 == 9 || ikMode2 == 14)
  15699. {
  15700. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15701. mBg.Update();
  15702. }
  15703. if (ikMode2 == 13)
  15704. {
  15705. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15706. mBg.Update();
  15707. }
  15708. if (ikMode2 == 13)
  15709. {
  15710. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15711. {
  15712. mBg.ido = 5;
  15713. mBg.reset = true;
  15714. }
  15715. else
  15716. {
  15717. gBg.transform.position = bg.position;
  15718. gBg.transform.eulerAngles = bg.eulerAngles;
  15719. mBg.maid = bgObject;
  15720. mBg.ido = 5;
  15721. }
  15722. }
  15723. else if (ikMode2 == 11)
  15724. {
  15725. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15726. {
  15727. mBg.ido = 3;
  15728. mBg.reset = true;
  15729. }
  15730. else
  15731. {
  15732. gBg.transform.position = bg.position;
  15733. gBg.transform.eulerAngles = bg.eulerAngles;
  15734. mBg.maid = bgObject;
  15735. mBg.ido = 3;
  15736. }
  15737. }
  15738. else if (ikMode2 == 12)
  15739. {
  15740. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15741. {
  15742. mBg.ido = 2;
  15743. mBg.reset = true;
  15744. }
  15745. else
  15746. {
  15747. gBg.transform.position = bg.position;
  15748. gBg.transform.eulerAngles = bg.eulerAngles;
  15749. mBg.maid = bgObject;
  15750. mBg.ido = 2;
  15751. }
  15752. }
  15753. else if (ikMode2 == 10)
  15754. {
  15755. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15756. {
  15757. mBg.ido = 1;
  15758. mBg.reset = true;
  15759. }
  15760. else
  15761. {
  15762. gBg.transform.position = bg.position;
  15763. gBg.transform.eulerAngles = bg.eulerAngles;
  15764. mBg.maid = bgObject;
  15765. mBg.ido = 1;
  15766. }
  15767. }
  15768. else if (ikMode2 == 9)
  15769. {
  15770. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15771. {
  15772. mBg.ido = 4;
  15773. mBg.reset = true;
  15774. }
  15775. else
  15776. {
  15777. gBg.transform.position = bg.position;
  15778. gBg.transform.eulerAngles = bg.eulerAngles;
  15779. mBg.maid = bgObject;
  15780. mBg.ido = 4;
  15781. }
  15782. }
  15783. else if (ikMode2 == 14)
  15784. {
  15785. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15786. {
  15787. mBg.ido = 6;
  15788. mBg.reset = true;
  15789. }
  15790. else
  15791. {
  15792. gBg.transform.position = bg.position;
  15793. gBg.transform.eulerAngles = bg.eulerAngles;
  15794. mBg.maid = bgObject;
  15795. mBg.ido = 6;
  15796. }
  15797. }
  15798. }
  15799. }
  15800. for (i = 0; i < lightIndex.Count; i++)
  15801. {
  15802. if (gLight[0] == null)
  15803. {
  15804. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15805. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15806. {
  15807. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15808. };
  15809. gLight[0].GetComponent<Renderer>().material = material2;
  15810. gLight[0].layer = 8;
  15811. gLight[0].GetComponent<Renderer>().enabled = false;
  15812. gLight[0].SetActive(false);
  15813. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15814. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15815. mLight[0].obj = gLight[0];
  15816. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15817. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15818. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15819. mLight[0].ido = 1;
  15820. mLight[0].isScale = false;
  15821. }
  15822. if (gLight[i] != null)
  15823. {
  15824. if (!isCube4)
  15825. {
  15826. gLight[i].GetComponent<Renderer>().enabled = false;
  15827. gLight[i].SetActive(false);
  15828. }
  15829. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15830. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15831. {
  15832. if (ikMode2 > 0 && ikMode2 != 15)
  15833. {
  15834. gLight[i].GetComponent<Renderer>().enabled = true;
  15835. gLight[i].SetActive(true);
  15836. }
  15837. else
  15838. {
  15839. gLight[i].GetComponent<Renderer>().enabled = false;
  15840. gLight[i].SetActive(false);
  15841. mLight[i].isAlt = false;
  15842. }
  15843. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15844. {
  15845. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15846. if (mLight[i].isAlt)
  15847. {
  15848. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15849. }
  15850. }
  15851. if (ikMode2 == 9 || ikMode2 == 14)
  15852. {
  15853. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15854. mLight[i].Update();
  15855. }
  15856. if (ikMode2 == 13)
  15857. {
  15858. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15859. mLight[i].Update();
  15860. }
  15861. if (ikMode2 == 13)
  15862. {
  15863. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15864. {
  15865. mLight[i].ido = 15;
  15866. mLight[i].reset = true;
  15867. }
  15868. else
  15869. {
  15870. if (lightList[i].transform.localScale.x == 1f)
  15871. {
  15872. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15873. }
  15874. lightRange[i] = lightList[i].transform.localScale.x;
  15875. gLight[i].transform.position = lightList[i].transform.position;
  15876. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15877. mLight[i].maid = lightList[i];
  15878. mLight[i].ido = 15;
  15879. }
  15880. }
  15881. else if (ikMode2 == 11)
  15882. {
  15883. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15884. {
  15885. mLight[i].ido = 3;
  15886. mLight[i].reset = true;
  15887. }
  15888. else
  15889. {
  15890. gLight[i].transform.position = lightList[i].transform.position;
  15891. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15892. lightX[i] = gLight[i].transform.eulerAngles.x;
  15893. lightY[i] = gLight[i].transform.eulerAngles.y;
  15894. mLight[i].maid = lightList[i];
  15895. mLight[i].ido = 3;
  15896. }
  15897. }
  15898. else if (ikMode2 == 12)
  15899. {
  15900. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15901. {
  15902. mLight[i].ido = 2;
  15903. mLight[i].reset = true;
  15904. }
  15905. else
  15906. {
  15907. gLight[i].transform.position = lightList[i].transform.position;
  15908. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15909. mLight[i].maid = lightList[i];
  15910. mLight[i].ido = 2;
  15911. }
  15912. }
  15913. else if (ikMode2 == 10)
  15914. {
  15915. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15916. {
  15917. mLight[i].ido = 1;
  15918. mLight[i].reset = true;
  15919. }
  15920. else
  15921. {
  15922. gLight[i].transform.position = lightList[i].transform.position;
  15923. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15924. mLight[i].maid = lightList[i];
  15925. mLight[i].maidArray = lightList.ToArray();
  15926. mLight[i].mArray = mLight.ToArray();
  15927. mLight[i].ido = 1;
  15928. }
  15929. }
  15930. else if (ikMode2 == 9)
  15931. {
  15932. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15933. {
  15934. mLight[i].ido = 4;
  15935. mLight[i].reset = true;
  15936. }
  15937. else
  15938. {
  15939. gLight[i].transform.position = lightList[i].transform.position;
  15940. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15941. lightX[i] = gLight[i].transform.eulerAngles.x;
  15942. lightY[i] = gLight[i].transform.eulerAngles.y;
  15943. mLight[i].maid = lightList[i];
  15944. mLight[i].ido = 4;
  15945. }
  15946. }
  15947. else if (ikMode2 == 14)
  15948. {
  15949. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15950. {
  15951. mLight[i].ido = 6;
  15952. mLight[i].reset = true;
  15953. }
  15954. else
  15955. {
  15956. gLight[i].transform.position = lightList[i].transform.position;
  15957. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15958. lightX[i] = gLight[i].transform.eulerAngles.x;
  15959. lightY[i] = gLight[i].transform.eulerAngles.y;
  15960. mLight[i].maid = lightList[i];
  15961. mLight[i].ido = 6;
  15962. }
  15963. }
  15964. }
  15965. }
  15966. }
  15967. for (i = 0; i < doguBObject.Count; i++)
  15968. {
  15969. if (!isCube2)
  15970. {
  15971. gDogu[i].GetComponent<Renderer>().enabled = false;
  15972. gDogu[i].SetActive(false);
  15973. }
  15974. else
  15975. {
  15976. if (ikMode2 > 0)
  15977. {
  15978. gDogu[i].GetComponent<Renderer>().enabled = true;
  15979. gDogu[i].SetActive(true);
  15980. }
  15981. else
  15982. {
  15983. gDogu[i].GetComponent<Renderer>().enabled = false;
  15984. gDogu[i].SetActive(false);
  15985. mDogu[i].isAlt = false;
  15986. }
  15987. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15988. {
  15989. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15990. if (mDogu[i].isAlt)
  15991. {
  15992. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15993. }
  15994. }
  15995. if (ikMode2 == 9 || ikMode2 == 14)
  15996. {
  15997. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15998. mDogu[i].Update();
  15999. }
  16000. if (ikMode2 == 15)
  16001. {
  16002. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16003. }
  16004. if (ikMode2 == 13)
  16005. {
  16006. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16007. mDogu[i].Update();
  16008. }
  16009. if (ikMode2 == 13)
  16010. {
  16011. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16012. {
  16013. mDogu[i].ido = 5;
  16014. mDogu[i].reset = true;
  16015. }
  16016. else
  16017. {
  16018. gDogu[i].transform.position = doguBObject[i].transform.position;
  16019. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16020. mDogu[i].maid = doguBObject[i];
  16021. mDogu[i].ido = 5;
  16022. }
  16023. }
  16024. else if (ikMode2 == 11)
  16025. {
  16026. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16027. {
  16028. mDogu[i].ido = 3;
  16029. mDogu[i].reset = true;
  16030. }
  16031. else
  16032. {
  16033. gDogu[i].transform.position = doguBObject[i].transform.position;
  16034. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16035. mDogu[i].maid = doguBObject[i];
  16036. mDogu[i].ido = 3;
  16037. }
  16038. }
  16039. else if (ikMode2 == 12)
  16040. {
  16041. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16042. {
  16043. mDogu[i].ido = 2;
  16044. mDogu[i].reset = true;
  16045. }
  16046. else
  16047. {
  16048. gDogu[i].transform.position = doguBObject[i].transform.position;
  16049. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16050. mDogu[i].maid = doguBObject[i];
  16051. mDogu[i].ido = 2;
  16052. }
  16053. }
  16054. else if (ikMode2 == 10)
  16055. {
  16056. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16057. {
  16058. mDogu[i].ido = 1;
  16059. mDogu[i].reset = true;
  16060. }
  16061. else
  16062. {
  16063. gDogu[i].transform.position = doguBObject[i].transform.position;
  16064. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16065. mDogu[i].maid = doguBObject[i];
  16066. mDogu[i].maidArray = doguBObject.ToArray();
  16067. mDogu[i].mArray = mDogu.ToArray();
  16068. mDogu[i].ido = 1;
  16069. }
  16070. }
  16071. else if (ikMode2 == 9)
  16072. {
  16073. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16074. {
  16075. mDogu[i].ido = 4;
  16076. mDogu[i].reset = true;
  16077. }
  16078. else
  16079. {
  16080. gDogu[i].transform.position = doguBObject[i].transform.position;
  16081. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16082. mDogu[i].maid = doguBObject[i];
  16083. mDogu[i].ido = 4;
  16084. }
  16085. }
  16086. else if (ikMode2 == 14)
  16087. {
  16088. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16089. {
  16090. mDogu[i].ido = 6;
  16091. mDogu[i].reset = true;
  16092. }
  16093. else
  16094. {
  16095. gDogu[i].transform.position = doguBObject[i].transform.position;
  16096. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16097. mDogu[i].maid = doguBObject[i];
  16098. mDogu[i].ido = 6;
  16099. }
  16100. }
  16101. else if (ikMode2 == 15)
  16102. {
  16103. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16104. {
  16105. mDogu[i].ido = 7;
  16106. mDogu[i].reset = true;
  16107. }
  16108. else
  16109. {
  16110. gDogu[i].transform.position = doguBObject[i].transform.position;
  16111. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16112. mDogu[i].maid = doguBObject[i];
  16113. mDogu[i].ido = 7;
  16114. }
  16115. }
  16116. }
  16117. }
  16118. ikModeOld2 = ikMode2;
  16119. }
  16120. if (isVR)
  16121. {
  16122. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16123. {
  16124. if (!isVR2)
  16125. {
  16126. isVR2 = true;
  16127. Preferences["config"]["shift_f8"].Value = "true";
  16128. SaveConfig();
  16129. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16130. }
  16131. else
  16132. {
  16133. isVR2 = false;
  16134. Preferences["config"]["shift_f8"].Value = "false";
  16135. SaveConfig();
  16136. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16137. }
  16138. }
  16139. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16140. {
  16141. loadScene = 1;
  16142. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16143. }
  16144. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16145. {
  16146. loadScene = 2;
  16147. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16148. }
  16149. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16150. {
  16151. loadScene = 3;
  16152. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16153. }
  16154. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16155. {
  16156. loadScene = 4;
  16157. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16158. }
  16159. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16160. {
  16161. loadScene = 5;
  16162. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16163. }
  16164. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16165. {
  16166. loadScene = 6;
  16167. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16168. }
  16169. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16170. {
  16171. loadScene = 7;
  16172. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16173. }
  16174. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16175. {
  16176. loadScene = 8;
  16177. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16178. }
  16179. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16180. {
  16181. loadScene = 9;
  16182. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16183. }
  16184. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16185. {
  16186. loadScene = 10;
  16187. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16188. }
  16189. for (int j = 0; j < 7; j++)
  16190. {
  16191. if (!maidArray[j])
  16192. {
  16193. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16194. }
  16195. }
  16196. }
  16197. }
  16198. }
  16199. }
  16200. }