MultipleMaids.MaidUpdate.cs 921 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507
  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. if (!isVR)
  575. {
  576. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  577. CameraMain cameraMain = GameMain.Instance.MainCamera;
  578. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  579. cameraMain.SetDistance(3f, true);
  580. }
  581. isYobidashi = true;
  582. bGui = false;
  583. isFadeOut = true;
  584. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  585. selectList = new ArrayList
  586. {
  587. 0
  588. };
  589. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  590. bgmCombo.selectedItemIndex = 0;
  591. }
  592. else
  593. {
  594. init();
  595. isPanel = true;
  596. isF7 = false;
  597. bGui = false;
  598. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  599. if (flag2)
  600. {
  601. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  602. }
  603. else
  604. {
  605. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  606. }
  607. if (!isVR)
  608. {
  609. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  610. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  611. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  612. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  613. }
  614. }
  615. gameObject2.SetActive(isPanel);
  616. }
  617. if (!okFlg)
  618. {
  619. if (maidArray[0] && maidArray[0].Visible)
  620. {
  621. int num3 = (int)maidArray[0].transform.position.y;
  622. if (num3 == 100)
  623. {
  624. okFlg = true;
  625. Vector3 vector = Vector3.zero;
  626. maidArray[0].SetPos(vector);
  627. isScript = true;
  628. }
  629. }
  630. else if (maidArray[0] && !maidArray[0].Visible)
  631. {
  632. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  633. }
  634. else if (!maidArray[0])
  635. {
  636. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  637. }
  638. }
  639. if (okFlg)
  640. {
  641. hFlg = false;
  642. mFlg = false;
  643. fFlg = false;
  644. sFlg = false;
  645. atFlg = false;
  646. yFlg = false;
  647. escFlg = false;
  648. maidCnt = 0;
  649. if (!cameraObj && !isVR)
  650. {
  651. cameraObj = new GameObject("subCamera");
  652. subcamera = cameraObj.AddComponent<Camera>();
  653. subcamera.CopyFrom(Camera.main);
  654. cameraObj.SetActive(true);
  655. subcamera.clearFlags = CameraClearFlags.Depth;
  656. subcamera.cullingMask = 256;
  657. subcamera.depth = 1f;
  658. subcamera.transform.parent = mainCamera.transform;
  659. float num2 = 2f;
  660. if (Application.unityVersion.StartsWith("4"))
  661. {
  662. num2 = 1f;
  663. }
  664. GameObject gameObject3 = new GameObject("Light");
  665. gameObject3.AddComponent<Light>();
  666. lightList.Add(gameObject3);
  667. lightColorR.Add(1f);
  668. lightColorG.Add(1f);
  669. lightColorB.Add(1f);
  670. lightIndex.Add(0);
  671. lightX.Add(40f);
  672. lightY.Add(180f);
  673. lightAkarusa.Add(num2);
  674. lightKage.Add(0.098f);
  675. lightRange.Add(50f);
  676. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  677. gameObject3.GetComponent<Light>().intensity = num2;
  678. gameObject3.GetComponent<Light>().spotAngle = 50f;
  679. gameObject3.GetComponent<Light>().range = 10f;
  680. gameObject3.GetComponent<Light>().type = LightType.Directional;
  681. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  682. gameObject3.GetComponent<Light>().cullingMask = 256;
  683. }
  684. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  685. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  686. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  687. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  688. {
  689. float axis = Input.GetAxis("Mouse ScrollWheel");
  690. if (axis > 0f)
  691. {
  692. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  693. if (mainCamera.GetDistance() < 0.1f)
  694. {
  695. mainCamera.SetDistance(0.1f, true);
  696. }
  697. }
  698. else if (axis < 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  701. if (mainCamera.GetDistance() > 25f)
  702. {
  703. mainCamera.SetDistance(25f, true);
  704. }
  705. }
  706. }
  707. for (int j = 0; j < maxMaidCnt; j++)
  708. {
  709. if (maidArray[j] && maidArray[j].Visible)
  710. {
  711. maidCnt++;
  712. }
  713. }
  714. if (maidArray[0] != null && maidArray[0].Visible)
  715. {
  716. if (getModKeyPressing(modKey.Shift))
  717. {
  718. speed = 5f * Time.deltaTime * 60f;
  719. }
  720. else
  721. {
  722. speed = 1f * Time.deltaTime * 60f;
  723. }
  724. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  725. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  726. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  727. if (!isVR || isVR2)
  728. {
  729. if (!isVR)
  730. {
  731. if (isBloom)
  732. {
  733. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  734. fieldValue2.enabled = true;
  735. fieldValue2.bloomIntensity = bloom1;
  736. fieldValue2.bloomBlurIterations = (int)bloom2;
  737. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  738. if (isBloomA)
  739. {
  740. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  741. }
  742. else
  743. {
  744. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  745. }
  746. isBloom2 = true;
  747. }
  748. else if (isBloom2)
  749. {
  750. isBloom2 = false;
  751. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  752. fieldValue2.enabled = true;
  753. fieldValue2.bloomIntensity = 2.85f;
  754. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  755. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  756. fieldValue2.bloomBlurIterations = 3;
  757. }
  758. if (isDepth)
  759. {
  760. depth_field_.enabled = true;
  761. depth_field_.focalLength = depth1;
  762. depth_field_.focalSize = depth2;
  763. depth_field_.aperture = depth3;
  764. depth_field_.maxBlurSize = depth4;
  765. if (isDepthA)
  766. {
  767. depth_field_.visualizeFocus = true;
  768. }
  769. else
  770. {
  771. depth_field_.visualizeFocus = false;
  772. }
  773. }
  774. else
  775. {
  776. if (depth_field_ == null)
  777. {
  778. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  779. if (depth_field_.dofHdrShader == null)
  780. {
  781. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  782. }
  783. if (depth_field_.dx11BokehShader == null)
  784. {
  785. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  786. }
  787. if (depth_field_.dx11BokehTexture == null)
  788. {
  789. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  790. }
  791. }
  792. depth_field_.enabled = false;
  793. }
  794. if (isFog)
  795. {
  796. if (fog_.fogShader == null)
  797. {
  798. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  799. }
  800. fog_.enabled = true;
  801. fog_.startDistance = fog1;
  802. fog_.globalDensity = fog2;
  803. fog_.heightScale = fog3;
  804. fog_.height = fog4;
  805. fog_.globalFogColor.r = fog5;
  806. fog_.globalFogColor.g = fog6;
  807. fog_.globalFogColor.b = fog7;
  808. }
  809. else
  810. {
  811. if (fog_ == null)
  812. {
  813. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  814. }
  815. fog_.enabled = false;
  816. }
  817. if (isSepia != isSepian)
  818. {
  819. isSepia = isSepian;
  820. if (isSepia)
  821. {
  822. if (sepia_tone_.shader == null)
  823. {
  824. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  825. }
  826. sepia_tone_.enabled = true;
  827. }
  828. else
  829. {
  830. if (sepia_tone_ == null)
  831. {
  832. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  833. }
  834. sepia_tone_.enabled = false;
  835. }
  836. }
  837. if (bokashi > 0f)
  838. {
  839. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  840. component.enabled = true;
  841. component.blurSize = bokashi / 10f;
  842. component.blurIterations = 0;
  843. component.downsample = 0;
  844. if (bokashi > 3f)
  845. {
  846. component.blurSize -= 0.3f;
  847. component.blurIterations = 1;
  848. component.downsample = 1;
  849. }
  850. }
  851. else
  852. {
  853. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  854. component.enabled = false;
  855. }
  856. if (kamiyure > 0f)
  857. {
  858. for (int j = 0; j < maidCnt; j++)
  859. {
  860. Maid maid = maidArray[j];
  861. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  862. {
  863. if (maid.body0.goSlot[l].obj != null)
  864. {
  865. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  866. if (component2 != null && component2.enabled)
  867. {
  868. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  869. }
  870. }
  871. List<THair1> fieldValue3 =
  872. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  873. for (int k = 0; k < fieldValue3.Count; k++)
  874. {
  875. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  876. }
  877. }
  878. }
  879. }
  880. if (isBlur)
  881. {
  882. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  883. component3.mode = Vignetting.AberrationMode.Simple;
  884. component3.intensity = blur1;
  885. component3.chromaticAberration = blur4;
  886. component3.blur = blur2;
  887. component3.blurSpread = blur3;
  888. component3.enabled = true;
  889. isBlur2 = true;
  890. }
  891. else if (isBlur2)
  892. {
  893. isBlur2 = false;
  894. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  895. component3.mode = Vignetting.AberrationMode.Simple;
  896. component3.intensity = -3.98f;
  897. component3.chromaticAberration = -0.75f;
  898. component3.axialAberration = 1.18f;
  899. component3.blurSpread = 4.19f;
  900. component3.luminanceDependency = 0.494f;
  901. component3.blurDistance = 1.71f;
  902. component3.enabled = false;
  903. }
  904. }
  905. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  906. {
  907. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  908. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  909. }
  910. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  911. {
  912. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  913. {
  914. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  915. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  916. }
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  919. {
  920. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  921. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  922. }
  923. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  924. {
  925. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  926. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  927. }
  928. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  929. {
  930. GameMain.Instance.MainLight.Reset();
  931. GameMain.Instance.MainLight.SetIntensity(0.95f);
  932. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  933. lightIndex[0] = 0;
  934. lightColorR[0] = 1f;
  935. lightColorG[0] = 1f;
  936. lightColorB[0] = 1f;
  937. lightX[0] = 40f;
  938. lightY[0] = 180f;
  939. lightAkarusa[0] = 0.95f;
  940. lightKage[0] = 0.098f;
  941. lightRange[0] = 50f;
  942. bgObject.SetActive(true);
  943. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  944. isIdx1 = false;
  945. isIdx2 = false;
  946. isIdx3 = false;
  947. isIdx4 = false;
  948. }
  949. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  950. {
  951. List<float> list;
  952. (list = lightColorR)[0] = list[0] + 0.01f;
  953. if (lightColorR[0] > 1f)
  954. {
  955. lightColorR[0] = 1f;
  956. }
  957. if (lightIndex[0] != 3)
  958. {
  959. GameMain.Instance.MainLight.GetComponent<Light>().color =
  960. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  961. }
  962. else
  963. {
  964. mainCamera.GetComponent<Camera>().backgroundColor =
  965. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  966. }
  967. }
  968. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  969. {
  970. List<float> list;
  971. (list = lightColorG)[0] = list[0] + 0.01f;
  972. if (lightColorG[0] > 1f)
  973. {
  974. lightColorG[0] = 1f;
  975. }
  976. if (lightIndex[0] != 3)
  977. {
  978. GameMain.Instance.MainLight.GetComponent<Light>().color =
  979. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  980. }
  981. else
  982. {
  983. mainCamera.GetComponent<Camera>().backgroundColor =
  984. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  985. }
  986. }
  987. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  988. {
  989. List<float> list;
  990. (list = lightColorB)[0] = list[0] + 0.01f;
  991. if (lightColorB[0] > 1f)
  992. {
  993. lightColorB[0] = 1f;
  994. }
  995. if (lightIndex[0] != 3)
  996. {
  997. GameMain.Instance.MainLight.GetComponent<Light>().color =
  998. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  999. }
  1000. else
  1001. {
  1002. mainCamera.GetComponent<Camera>().backgroundColor =
  1003. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1004. }
  1005. }
  1006. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1007. {
  1008. List<float> list;
  1009. (list = lightColorR)[0] = list[0] - 0.01f;
  1010. if (lightColorR[0] < 0f)
  1011. {
  1012. lightColorR[0] = 0f;
  1013. }
  1014. if (lightIndex[0] != 3)
  1015. {
  1016. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1017. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1018. }
  1019. else
  1020. {
  1021. mainCamera.GetComponent<Camera>().backgroundColor =
  1022. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1023. }
  1024. }
  1025. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1026. {
  1027. List<float> list;
  1028. (list = lightColorG)[0] = list[0] - 0.01f;
  1029. if (lightColorG[0] < 0f)
  1030. {
  1031. lightColorG[0] = 0f;
  1032. }
  1033. if (lightIndex[0] != 3)
  1034. {
  1035. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1036. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1037. }
  1038. else
  1039. {
  1040. mainCamera.GetComponent<Camera>().backgroundColor =
  1041. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1042. }
  1043. }
  1044. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1045. {
  1046. List<float> list;
  1047. (list = lightColorB)[0] = list[0] - 0.01f;
  1048. if (lightColorB[0] < 0f)
  1049. {
  1050. lightColorB[0] = 0f;
  1051. }
  1052. if (lightIndex[0] != 3)
  1053. {
  1054. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1055. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1056. }
  1057. else
  1058. {
  1059. mainCamera.GetComponent<Camera>().backgroundColor =
  1060. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1061. }
  1062. }
  1063. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1064. {
  1065. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1066. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1067. }
  1068. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1069. {
  1070. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1071. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1072. }
  1073. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1074. {
  1075. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1076. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1077. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1078. }
  1079. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1080. {
  1081. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1082. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1083. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1084. }
  1085. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1086. {
  1087. List<int> list2;
  1088. (list2 = lightIndex)[0] = list2[0] + 1;
  1089. if (lightIndex[0] == 4)
  1090. {
  1091. lightIndex[0] = 0;
  1092. }
  1093. lightColorR[0] = 1f;
  1094. lightColorG[0] = 1f;
  1095. lightColorB[0] = 1f;
  1096. lightX[0] = 40f;
  1097. lightY[0] = 180f;
  1098. lightAkarusa[0] = 0.95f;
  1099. lightKage[0] = 0.098f;
  1100. lightRange[0] = 50f;
  1101. GameMain.Instance.MainLight.Reset();
  1102. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1103. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1104. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1105. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1106. if (lightIndex[0] == 0)
  1107. {
  1108. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1109. bgObject.SetActive(true);
  1110. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1111. }
  1112. else if (lightIndex[0] == 1)
  1113. {
  1114. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1115. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1117. }
  1118. else if (lightIndex[0] == 2)
  1119. {
  1120. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1121. }
  1122. else if (lightIndex[0] == 3)
  1123. {
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1125. mainCamera.GetComponent<Camera>().backgroundColor =
  1126. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1127. bgObject.SetActive(false);
  1128. }
  1129. isIdx1 = false;
  1130. isIdx2 = false;
  1131. isIdx3 = false;
  1132. isIdx4 = false;
  1133. }
  1134. }
  1135. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1136. {
  1137. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1138. }
  1139. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1140. {
  1141. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1142. {
  1143. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1144. }
  1145. }
  1146. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1147. {
  1148. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1149. }
  1150. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1151. {
  1152. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1155. {
  1156. GameMain.Instance.MainLight.Reset();
  1157. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1158. }
  1159. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1160. {
  1161. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1162. }
  1163. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1164. {
  1165. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1168. {
  1169. if (lightIndex[0] == 1)
  1170. {
  1171. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1172. }
  1173. else
  1174. {
  1175. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1176. }
  1177. }
  1178. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1179. {
  1180. if (lightIndex[0] == 1)
  1181. {
  1182. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1183. }
  1184. else
  1185. {
  1186. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1187. }
  1188. }
  1189. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1190. {
  1191. List<int> list2;
  1192. (list2 = lightIndex)[0] = list2[0] + 1;
  1193. if (lightIndex[0] == 3)
  1194. {
  1195. lightIndex[0] = 0;
  1196. }
  1197. GameMain.Instance.MainLight.Reset();
  1198. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1199. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1200. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1201. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1202. if (lightIndex[0] == 0)
  1203. {
  1204. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1205. }
  1206. else if (lightIndex[0] == 1)
  1207. {
  1208. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1209. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1210. }
  1211. else if (lightIndex[0] == 2)
  1212. {
  1213. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1214. }
  1215. }
  1216. int i;
  1217. for (i = 0; i < lightList.Count; i++)
  1218. {
  1219. if (i > 0)
  1220. {
  1221. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1222. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1223. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1224. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1225. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1226. {
  1227. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1228. }
  1229. }
  1230. else
  1231. {
  1232. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1233. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1234. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1235. {
  1236. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1237. }
  1238. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1239. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1240. if (lightIndex[i] != 3)
  1241. {
  1242. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1243. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1244. }
  1245. else
  1246. {
  1247. mainCamera.GetComponent<Camera>().backgroundColor =
  1248. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1249. }
  1250. }
  1251. }
  1252. bool flag3 = false;
  1253. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1254. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1255. {
  1256. for (i = 0; i < maidCnt; i++)
  1257. {
  1258. if (goSlot[(int)selectList[i]] != null)
  1259. {
  1260. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1261. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1262. {
  1263. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1264. }
  1265. }
  1266. }
  1267. }
  1268. for (int j = 0; j < maidCnt; j++)
  1269. {
  1270. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1271. {
  1272. bool flag4 = shodaiFlg[(int)selectList[j]];
  1273. shodaiFlg[(int)selectList[j]] = false;
  1274. try
  1275. {
  1276. TMorph morph = maidArray[j].body0.Face.morph;
  1277. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1278. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1279. }
  1280. catch
  1281. {
  1282. shodaiFlg[(int)selectList[j]] = true;
  1283. }
  1284. if (shodaiFlg[(int)selectList[j]] != flag4)
  1285. {
  1286. if (!isVR)
  1287. {
  1288. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1289. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1290. }
  1291. }
  1292. }
  1293. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1294. {
  1295. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1296. }
  1297. if (sceneLevel == 5)
  1298. {
  1299. if (editSelectMaid == maidArray[j])
  1300. {
  1301. flag3 = true;
  1302. }
  1303. }
  1304. Maid maid = maidArray[j];
  1305. }
  1306. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1307. {
  1308. isEditNo = 0;
  1309. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1310. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1311. }
  1312. i = 0;
  1313. while (i < maidCnt)
  1314. {
  1315. Transform transform = maidArray[i].transform;
  1316. Maid maid = maidArray[i];
  1317. if (cafeFlg[i])
  1318. {
  1319. cafeCount[i]++;
  1320. if (cafeCount[i] > 1)
  1321. {
  1322. maid.DelProp(MPN.handitem, true);
  1323. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1324. maid.AllProcPropSeqStart();
  1325. cafeFlg[i] = false;
  1326. cafeCount[i] = 0;
  1327. }
  1328. }
  1329. KeyCode key;
  1330. if (i >= 14)
  1331. {
  1332. bool flag5 = false;
  1333. bool flag6 = false;
  1334. for (int k = 0; k < keyArray.Length; k++)
  1335. {
  1336. if (Input.GetKey(keyArray[k]))
  1337. {
  1338. flag5 = true;
  1339. break;
  1340. }
  1341. if (Input.GetKeyUp(keyArray[k]))
  1342. {
  1343. flag6 = true;
  1344. break;
  1345. }
  1346. }
  1347. key = keyArray[6];
  1348. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1349. {
  1350. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1351. {
  1352. goto IL_49FE;
  1353. }
  1354. idoFlg[i - 7] = false;
  1355. }
  1356. }
  1357. else if (i >= 7)
  1358. {
  1359. bool flag5 = false;
  1360. bool flag6 = false;
  1361. for (int k = 0; k < keyArray.Length; k++)
  1362. {
  1363. if (Input.GetKey(keyArray[k]))
  1364. {
  1365. flag5 = true;
  1366. break;
  1367. }
  1368. if (Input.GetKeyUp(keyArray[k]))
  1369. {
  1370. flag6 = true;
  1371. break;
  1372. }
  1373. }
  1374. key = keyArray[i - 7];
  1375. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1376. {
  1377. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1378. {
  1379. goto IL_49FE;
  1380. }
  1381. idoFlg[i - 7] = false;
  1382. }
  1383. }
  1384. else
  1385. {
  1386. bool flag5 = false;
  1387. for (int k = 0; k < keyArray.Length; k++)
  1388. {
  1389. if (Input.GetKey(keyArray[k]))
  1390. {
  1391. flag5 = true;
  1392. break;
  1393. }
  1394. }
  1395. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1396. {
  1397. key = keyArray[i];
  1398. goto IL_49FE;
  1399. }
  1400. }
  1401. IL_1688E:
  1402. i++;
  1403. continue;
  1404. IL_49FE:
  1405. if (xFlg[i])
  1406. {
  1407. if (!maid.AudioMan.audiosource.isPlaying)
  1408. {
  1409. if (maid.status.personal.uniqueName == "Pride")
  1410. {
  1411. string text = "s0_";
  1412. Random random = new Random();
  1413. int num4 = random.Next(10000);
  1414. bool flag7 = false;
  1415. for (int k = 0; k < tunArray.Length; k++)
  1416. {
  1417. if (tunArray[k] == num4)
  1418. {
  1419. flag7 = true;
  1420. break;
  1421. }
  1422. }
  1423. if (!flag7)
  1424. {
  1425. text = text + "0" + num4.ToString() + ".ogg";
  1426. if (GameUty.FileSystem.IsExistentFile(text))
  1427. {
  1428. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1429. }
  1430. }
  1431. }
  1432. if (maid.status.personal.uniqueName == "Cool")
  1433. {
  1434. string text = "s1_";
  1435. Random random = new Random();
  1436. int num4 = random.Next(10000);
  1437. bool flag7 = false;
  1438. for (int k = 0; k < coolArray.Length; k++)
  1439. {
  1440. if (coolArray[k] == num4)
  1441. {
  1442. flag7 = true;
  1443. break;
  1444. }
  1445. }
  1446. if (!flag7)
  1447. {
  1448. text = text + "0" + num4.ToString() + ".ogg";
  1449. if (GameUty.FileSystem.IsExistentFile(text))
  1450. {
  1451. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1452. }
  1453. }
  1454. }
  1455. if (maid.status.personal.uniqueName == "Pure")
  1456. {
  1457. string text = "s2_";
  1458. Random random = new Random();
  1459. int num4 = random.Next(10000);
  1460. bool flag7 = false;
  1461. for (int k = 0; k < pureArray.Length; k++)
  1462. {
  1463. if (pureArray[k] == num4)
  1464. {
  1465. flag7 = true;
  1466. break;
  1467. }
  1468. }
  1469. if (!flag7)
  1470. {
  1471. text = text + "0" + num4.ToString() + ".ogg";
  1472. if (GameUty.FileSystem.IsExistentFile(text))
  1473. {
  1474. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1475. }
  1476. }
  1477. }
  1478. if (maid.status.personal.uniqueName == "Yandere")
  1479. {
  1480. string text = "s3_";
  1481. Random random = new Random();
  1482. int num4 = random.Next(10000);
  1483. bool flag7 = false;
  1484. for (int k = 0; k < yanArray.Length; k++)
  1485. {
  1486. if (yanArray[k] == num4)
  1487. {
  1488. flag7 = true;
  1489. break;
  1490. }
  1491. }
  1492. if (!flag7)
  1493. {
  1494. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1495. if (GameUty.FileSystem.IsExistentFile(text))
  1496. {
  1497. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1498. }
  1499. }
  1500. }
  1501. if (maid.status.personal.uniqueName == "Muku")
  1502. {
  1503. string text = "h0_";
  1504. Random random = new Random();
  1505. int num4 = random.Next(10000);
  1506. bool flag7 = false;
  1507. for (int k = 0; k < h0Array.Length; k++)
  1508. {
  1509. if (h0Array[k] == num4)
  1510. {
  1511. flag7 = true;
  1512. break;
  1513. }
  1514. }
  1515. if (flag7)
  1516. {
  1517. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1518. if (GameUty.FileSystem.IsExistentFile(text))
  1519. {
  1520. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1521. }
  1522. }
  1523. }
  1524. if (maid.status.personal.uniqueName == "Majime")
  1525. {
  1526. string text = "h1_";
  1527. Random random = new Random();
  1528. int num4 = random.Next(10000);
  1529. bool flag7 = false;
  1530. for (int k = 0; k < h1Array.Length; k++)
  1531. {
  1532. if (h1Array[k] == num4)
  1533. {
  1534. flag7 = true;
  1535. break;
  1536. }
  1537. }
  1538. if (flag7)
  1539. {
  1540. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1541. if (GameUty.FileSystem.IsExistentFile(text))
  1542. {
  1543. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1544. }
  1545. }
  1546. }
  1547. if (maid.status.personal.uniqueName == "Rindere")
  1548. {
  1549. string text = "h2_";
  1550. Random random = new Random();
  1551. int num4 = random.Next(10000);
  1552. bool flag7 = false;
  1553. for (int k = 0; k < h2Array.Length; k++)
  1554. {
  1555. if (h2Array[k] == num4)
  1556. {
  1557. flag7 = true;
  1558. break;
  1559. }
  1560. }
  1561. if (flag7)
  1562. {
  1563. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1564. if (GameUty.FileSystem.IsExistentFile(text))
  1565. {
  1566. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1567. }
  1568. }
  1569. }
  1570. }
  1571. }
  1572. if (zFlg[i])
  1573. {
  1574. if (!maid.AudioMan.audiosource.isPlaying)
  1575. {
  1576. string text = "";
  1577. if (maid.status.personal.uniqueName == "Pride")
  1578. {
  1579. text = "s0_";
  1580. Random random = new Random();
  1581. int num4 = random.Next(tunArray.Length);
  1582. object obj = text;
  1583. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1584. }
  1585. if (maid.status.personal.uniqueName == "Cool")
  1586. {
  1587. text = "s1_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(coolArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Pure")
  1594. {
  1595. text = "s2_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(pureArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Yandere")
  1602. {
  1603. text = "s3_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(yanArray.Length);
  1606. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1607. }
  1608. if (maid.status.personal.uniqueName == "Muku")
  1609. {
  1610. text = "h0_";
  1611. Random random = new Random();
  1612. int num4 = random.Next(h0tArray.Length);
  1613. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1614. }
  1615. if (maid.status.personal.uniqueName == "Majime")
  1616. {
  1617. text = "h1_";
  1618. Random random = new Random();
  1619. int num4 = random.Next(h1tArray.Length);
  1620. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1621. }
  1622. if (maid.status.personal.uniqueName == "Rindere")
  1623. {
  1624. text = "h2_";
  1625. Random random = new Random();
  1626. int num4 = random.Next(h2tArray.Length);
  1627. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1628. }
  1629. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1630. }
  1631. }
  1632. if (!isVR || isVR2)
  1633. {
  1634. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1635. {
  1636. ikMaid = i;
  1637. isIK[i] = true;
  1638. ikBui = 1;
  1639. ikMode[i] = 0;
  1640. SetIK(maid, i);
  1641. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1642. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1643. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1644. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1645. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1646. idoFlg[i] = true;
  1647. if (i >= 7)
  1648. {
  1649. idoFlg[i - 7] = true;
  1650. }
  1651. qFlg = true;
  1652. }
  1653. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1654. {
  1655. ikMaid = i;
  1656. isIK[i] = true;
  1657. ikBui = 2;
  1658. ikMode[i] = 0;
  1659. SetIK(maid, i);
  1660. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1661. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1662. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1663. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1664. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1665. idoFlg[i] = true;
  1666. if (i >= 7)
  1667. {
  1668. idoFlg[i - 7] = true;
  1669. }
  1670. }
  1671. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1672. {
  1673. ikMaid = i;
  1674. isIK[i] = true;
  1675. ikBui = 3;
  1676. ikMode[i] = 0;
  1677. SetIK(maid, i);
  1678. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1679. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1680. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1681. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1682. idoFlg[i] = true;
  1683. if (i >= 7)
  1684. {
  1685. idoFlg[i - 7] = true;
  1686. }
  1687. }
  1688. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1689. {
  1690. ikMaid = i;
  1691. isIK[i] = true;
  1692. ikBui = 4;
  1693. ikMode[i] = 0;
  1694. SetIK(maid, i);
  1695. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1696. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1697. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1698. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1699. idoFlg[i] = true;
  1700. if (i >= 7)
  1701. {
  1702. idoFlg[i - 7] = true;
  1703. }
  1704. sFlg = true;
  1705. }
  1706. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1707. {
  1708. maid.body0.transform.localRotation =
  1709. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1710. if (i >= 7)
  1711. {
  1712. idoFlg[i - 7] = true;
  1713. }
  1714. idoFlg[i] = true;
  1715. }
  1716. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1717. {
  1718. maid.body0.transform.localRotation =
  1719. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1720. if (i >= 7)
  1721. {
  1722. idoFlg[i - 7] = true;
  1723. }
  1724. idoFlg[i] = true;
  1725. }
  1726. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1727. {
  1728. bGui = true;
  1729. isPoseInit = true;
  1730. isGuiInit = true;
  1731. poseFlg = true;
  1732. faceFlg = false;
  1733. sceneFlg = false;
  1734. kankyoFlg = false;
  1735. kankyo2Flg = false;
  1736. fFlg = true;
  1737. for (int k = 0; k < maidCnt; k++)
  1738. {
  1739. if (maid == maidArray[k])
  1740. {
  1741. selectMaidIndex = k;
  1742. }
  1743. }
  1744. copyIndex = 0;
  1745. if (i >= 7)
  1746. {
  1747. idoFlg[i - 7] = true;
  1748. }
  1749. idoFlg[i] = true;
  1750. }
  1751. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1752. {
  1753. bGui = true;
  1754. isFaceInit = true;
  1755. isGuiInit = true;
  1756. faceFlg = true;
  1757. poseFlg = false;
  1758. sceneFlg = false;
  1759. kankyoFlg = false;
  1760. kankyo2Flg = false;
  1761. maid.boMabataki = false;
  1762. for (int k = 0; k < maidCnt; k++)
  1763. {
  1764. if (maid == maidArray[k])
  1765. {
  1766. selectMaidIndex = k;
  1767. }
  1768. }
  1769. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1770. if (i >= 7)
  1771. {
  1772. idoFlg[i - 7] = true;
  1773. }
  1774. idoFlg[i] = true;
  1775. }
  1776. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1777. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1778. {
  1779. if (!xFlg[i])
  1780. {
  1781. xFlg[i] = true;
  1782. zFlg[i] = false;
  1783. if (maid.status.personal.uniqueName == "Pride")
  1784. {
  1785. string text = "s0_";
  1786. Random random = new Random();
  1787. int num4 = random.Next(10000);
  1788. bool flag7 = false;
  1789. for (int k = 0; k < tunArray.Length; k++)
  1790. {
  1791. if (tunArray[k] == num4)
  1792. {
  1793. flag7 = true;
  1794. break;
  1795. }
  1796. }
  1797. if (!flag7)
  1798. {
  1799. text = text + "0" + num4.ToString() + ".ogg";
  1800. if (GameUty.FileSystem.IsExistentFile(text))
  1801. {
  1802. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1803. }
  1804. }
  1805. }
  1806. if (maid.status.personal.uniqueName == "Cool")
  1807. {
  1808. string text = "s1_";
  1809. Random random = new Random();
  1810. int num4 = random.Next(10000);
  1811. bool flag7 = false;
  1812. for (int k = 0; k < coolArray.Length; k++)
  1813. {
  1814. if (coolArray[k] == num4)
  1815. {
  1816. flag7 = true;
  1817. break;
  1818. }
  1819. }
  1820. if (!flag7)
  1821. {
  1822. text = text + "0" + num4.ToString() + ".ogg";
  1823. if (GameUty.FileSystem.IsExistentFile(text))
  1824. {
  1825. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1826. }
  1827. }
  1828. }
  1829. if (maid.status.personal.uniqueName == "Pure")
  1830. {
  1831. string text = "s2_";
  1832. Random random = new Random();
  1833. int num4 = random.Next(10000);
  1834. bool flag7 = false;
  1835. for (int k = 0; k < pureArray.Length; k++)
  1836. {
  1837. if (pureArray[k] == num4)
  1838. {
  1839. flag7 = true;
  1840. break;
  1841. }
  1842. }
  1843. if (!flag7)
  1844. {
  1845. text = text + "0" + num4.ToString() + ".ogg";
  1846. if (GameUty.FileSystem.IsExistentFile(text))
  1847. {
  1848. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1849. }
  1850. }
  1851. }
  1852. if (maid.status.personal.uniqueName == "Yandere")
  1853. {
  1854. string text = "s3_";
  1855. Random random = new Random();
  1856. int num4 = random.Next(10000);
  1857. bool flag7 = false;
  1858. for (int k = 0; k < yanArray.Length; k++)
  1859. {
  1860. if (yanArray[k] == num4)
  1861. {
  1862. flag7 = true;
  1863. break;
  1864. }
  1865. }
  1866. if (!flag7)
  1867. {
  1868. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1869. if (GameUty.FileSystem.IsExistentFile(text))
  1870. {
  1871. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1872. }
  1873. }
  1874. }
  1875. if (maid.status.personal.uniqueName == "Muku")
  1876. {
  1877. string text = "h0_";
  1878. Random random = new Random();
  1879. int num4 = random.Next(10000);
  1880. bool flag7 = false;
  1881. for (int k = 0; k < h0Array.Length; k++)
  1882. {
  1883. if (h0Array[k] == num4)
  1884. {
  1885. flag7 = true;
  1886. break;
  1887. }
  1888. }
  1889. if (flag7)
  1890. {
  1891. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1892. if (GameUty.FileSystem.IsExistentFile(text))
  1893. {
  1894. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1895. }
  1896. }
  1897. }
  1898. if (maid.status.personal.uniqueName == "Majime")
  1899. {
  1900. string text = "h1_";
  1901. Random random = new Random();
  1902. int num4 = random.Next(10000);
  1903. bool flag7 = false;
  1904. for (int k = 0; k < h1Array.Length; k++)
  1905. {
  1906. if (h1Array[k] == num4)
  1907. {
  1908. flag7 = true;
  1909. break;
  1910. }
  1911. }
  1912. if (flag7)
  1913. {
  1914. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1915. if (GameUty.FileSystem.IsExistentFile(text))
  1916. {
  1917. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1918. }
  1919. }
  1920. }
  1921. if (maid.status.personal.uniqueName == "Rindere")
  1922. {
  1923. string text = "h2_";
  1924. Random random = new Random();
  1925. int num4 = random.Next(10000);
  1926. bool flag7 = false;
  1927. for (int k = 0; k < h2Array.Length; k++)
  1928. {
  1929. if (h2Array[k] == num4)
  1930. {
  1931. flag7 = true;
  1932. break;
  1933. }
  1934. }
  1935. if (flag7)
  1936. {
  1937. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1938. if (GameUty.FileSystem.IsExistentFile(text))
  1939. {
  1940. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1941. }
  1942. }
  1943. }
  1944. }
  1945. else
  1946. {
  1947. xFlg[i] = false;
  1948. maid.AudioMan.Clear();
  1949. }
  1950. idoFlg[i] = true;
  1951. if (i >= 7)
  1952. {
  1953. idoFlg[i - 7] = true;
  1954. }
  1955. }
  1956. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1957. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1958. {
  1959. if (!zFlg[i])
  1960. {
  1961. zFlg[i] = true;
  1962. xFlg[i] = false;
  1963. string text = "";
  1964. if (maid.status.personal.uniqueName == "Pride")
  1965. {
  1966. text = "s0_";
  1967. Random random = new Random();
  1968. int num4 = random.Next(tunArray.Length);
  1969. object obj = text;
  1970. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1971. }
  1972. if (maid.status.personal.uniqueName == "Cool")
  1973. {
  1974. text = "s1_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(coolArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Pure")
  1981. {
  1982. text = "s2_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(pureArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Yandere")
  1989. {
  1990. text = "s3_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(yanArray.Length);
  1993. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1994. }
  1995. if (maid.status.personal.uniqueName == "Muku")
  1996. {
  1997. text = "h0_";
  1998. Random random = new Random();
  1999. int num4 = random.Next(h0tArray.Length);
  2000. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2001. }
  2002. if (maid.status.personal.uniqueName == "Majime")
  2003. {
  2004. text = "h1_";
  2005. Random random = new Random();
  2006. int num4 = random.Next(h1tArray.Length);
  2007. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2008. }
  2009. if (maid.status.personal.uniqueName == "Rindere")
  2010. {
  2011. text = "h2_";
  2012. Random random = new Random();
  2013. int num4 = random.Next(h2tArray.Length);
  2014. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2015. }
  2016. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2017. }
  2018. else
  2019. {
  2020. zFlg[i] = false;
  2021. maid.AudioMan.Clear();
  2022. }
  2023. idoFlg[i] = true;
  2024. if (i >= 7)
  2025. {
  2026. idoFlg[i - 7] = true;
  2027. }
  2028. }
  2029. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2030. {
  2031. string text = "";
  2032. if (maid.status.personal.uniqueName == "Pride")
  2033. {
  2034. text = "s0_";
  2035. Random random = new Random();
  2036. int num4 = random.Next(tunArray.Length);
  2037. object obj = text;
  2038. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2039. }
  2040. if (maid.status.personal.uniqueName == "Cool")
  2041. {
  2042. text = "s1_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(coolArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Pure")
  2049. {
  2050. text = "s2_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(pureArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Yandere")
  2057. {
  2058. text = "s3_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(yanArray.Length);
  2061. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2062. }
  2063. if (maid.status.personal.uniqueName == "Muku")
  2064. {
  2065. text = "h0_";
  2066. Random random = new Random();
  2067. int num4 = random.Next(h0tArray.Length);
  2068. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2069. }
  2070. if (maid.status.personal.uniqueName == "Majime")
  2071. {
  2072. text = "h1_";
  2073. Random random = new Random();
  2074. int num4 = random.Next(h1tArray.Length);
  2075. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2076. }
  2077. if (maid.status.personal.uniqueName == "Rindere")
  2078. {
  2079. text = "h2_";
  2080. Random random = new Random();
  2081. int num4 = random.Next(h2tArray.Length);
  2082. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2083. }
  2084. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2085. idoFlg[i] = true;
  2086. if (i >= 7)
  2087. {
  2088. idoFlg[i - 7] = true;
  2089. }
  2090. }
  2091. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2092. {
  2093. if (maid.status.personal.uniqueName == "Pride")
  2094. {
  2095. string text = "s0_";
  2096. Random random = new Random();
  2097. int num4 = random.Next(10000);
  2098. bool flag7 = false;
  2099. for (int k = 0; k < tunArray.Length; k++)
  2100. {
  2101. if (tunArray[k] == num4)
  2102. {
  2103. flag7 = true;
  2104. break;
  2105. }
  2106. }
  2107. if (!flag7)
  2108. {
  2109. text = text + "0" + num4.ToString() + ".ogg";
  2110. if (GameUty.FileSystem.IsExistentFile(text))
  2111. {
  2112. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2113. }
  2114. }
  2115. }
  2116. if (maid.status.personal.uniqueName == "Cool")
  2117. {
  2118. string text = "s1_";
  2119. Random random = new Random();
  2120. int num4 = random.Next(10000);
  2121. bool flag7 = false;
  2122. for (int k = 0; k < coolArray.Length; k++)
  2123. {
  2124. if (coolArray[k] == num4)
  2125. {
  2126. flag7 = true;
  2127. break;
  2128. }
  2129. }
  2130. if (!flag7)
  2131. {
  2132. text = text + "0" + num4.ToString() + ".ogg";
  2133. if (GameUty.FileSystem.IsExistentFile(text))
  2134. {
  2135. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2136. }
  2137. }
  2138. }
  2139. if (maid.status.personal.uniqueName == "Pure")
  2140. {
  2141. string text = "s2_";
  2142. Random random = new Random();
  2143. int num4 = random.Next(10000);
  2144. bool flag7 = false;
  2145. for (int k = 0; k < pureArray.Length; k++)
  2146. {
  2147. if (pureArray[k] == num4)
  2148. {
  2149. flag7 = true;
  2150. break;
  2151. }
  2152. }
  2153. if (!flag7)
  2154. {
  2155. text = text + "0" + num4.ToString() + ".ogg";
  2156. if (GameUty.FileSystem.IsExistentFile(text))
  2157. {
  2158. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2159. }
  2160. }
  2161. }
  2162. if (maid.status.personal.uniqueName == "Yandere")
  2163. {
  2164. string text = "s3_";
  2165. Random random = new Random();
  2166. int num4 = random.Next(10000);
  2167. bool flag7 = false;
  2168. for (int k = 0; k < yanArray.Length; k++)
  2169. {
  2170. if (yanArray[k] == num4)
  2171. {
  2172. flag7 = true;
  2173. break;
  2174. }
  2175. }
  2176. if (!flag7)
  2177. {
  2178. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2179. if (GameUty.FileSystem.IsExistentFile(text))
  2180. {
  2181. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2182. }
  2183. }
  2184. }
  2185. if (maid.status.personal.uniqueName == "Muku")
  2186. {
  2187. string text = "h0_";
  2188. Random random = new Random();
  2189. int num4 = random.Next(10000);
  2190. bool flag7 = false;
  2191. for (int k = 0; k < h0Array.Length; k++)
  2192. {
  2193. if (h0Array[k] == num4)
  2194. {
  2195. flag7 = true;
  2196. break;
  2197. }
  2198. }
  2199. if (flag7)
  2200. {
  2201. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2202. if (GameUty.FileSystem.IsExistentFile(text))
  2203. {
  2204. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2205. }
  2206. }
  2207. }
  2208. if (maid.status.personal.uniqueName == "Majime")
  2209. {
  2210. string text = "h1_";
  2211. Random random = new Random();
  2212. int num4 = random.Next(10000);
  2213. bool flag7 = false;
  2214. for (int k = 0; k < h1Array.Length; k++)
  2215. {
  2216. if (h1Array[k] == num4)
  2217. {
  2218. flag7 = true;
  2219. break;
  2220. }
  2221. }
  2222. if (flag7)
  2223. {
  2224. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2225. if (GameUty.FileSystem.IsExistentFile(text))
  2226. {
  2227. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2228. }
  2229. }
  2230. }
  2231. if (maid.status.personal.uniqueName == "Rindere")
  2232. {
  2233. string text = "h2_";
  2234. Random random = new Random();
  2235. int num4 = random.Next(10000);
  2236. bool flag7 = false;
  2237. for (int k = 0; k < h2Array.Length; k++)
  2238. {
  2239. if (h2Array[k] == num4)
  2240. {
  2241. flag7 = true;
  2242. break;
  2243. }
  2244. }
  2245. if (flag7)
  2246. {
  2247. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2248. if (GameUty.FileSystem.IsExistentFile(text))
  2249. {
  2250. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2251. }
  2252. }
  2253. }
  2254. idoFlg[i] = true;
  2255. if (i >= 7)
  2256. {
  2257. idoFlg[i - 7] = true;
  2258. }
  2259. }
  2260. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2261. {
  2262. delCount[i] = 20;
  2263. if (goSlot[(int)selectList[i]] != null)
  2264. {
  2265. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2266. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2267. {
  2268. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2269. }
  2270. }
  2271. itemIndex[i]++;
  2272. if (itemIndex[i] == itemArray.Length - 1)
  2273. {
  2274. itemIndex[i] = 0;
  2275. }
  2276. string[] array = new string[2];
  2277. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2278. if (itemIndex[i] > 13)
  2279. {
  2280. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2281. }
  2282. maid.DelProp(MPN.handitem, true);
  2283. maid.DelProp(MPN.accvag, true);
  2284. maid.DelProp(MPN.accanl, true);
  2285. bool flag8 = false;
  2286. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2287. {
  2288. flag8 = true;
  2289. }
  2290. if (!flag8)
  2291. {
  2292. maid.DelProp(MPN.kousoku_upper, true);
  2293. maid.DelProp(MPN.kousoku_lower, true);
  2294. }
  2295. if (array[0] != "")
  2296. {
  2297. maid.SetProp(array[0], array[1], 0, true, false);
  2298. }
  2299. if (itemIndex[i] == 13)
  2300. {
  2301. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2302. maid.SetProp(array[0], array[1], 0, true, false);
  2303. }
  2304. if (itemIndex[i] == 23)
  2305. {
  2306. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2307. maid.SetProp(array[0], array[1], 0, true, false);
  2308. cafeFlg[i] = true;
  2309. }
  2310. maid.AllProcPropSeqStart();
  2311. idoFlg[i] = true;
  2312. if (i >= 7)
  2313. {
  2314. idoFlg[i - 7] = true;
  2315. }
  2316. mFlg = true;
  2317. }
  2318. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2319. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2320. {
  2321. for (int k = 0; k < 10; k++)
  2322. {
  2323. maid.transform.RotateAround(maid.transform.position,
  2324. Vector3.right,
  2325. -maid.transform.rotation.eulerAngles.x);
  2326. maid.transform.RotateAround(maid.transform.position,
  2327. Vector3.forward,
  2328. -maid.transform.rotation.eulerAngles.z);
  2329. }
  2330. idoFlg[i] = true;
  2331. atFlg = true;
  2332. if (i >= 7)
  2333. {
  2334. idoFlg[i - 7] = true;
  2335. }
  2336. }
  2337. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2338. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2339. {
  2340. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2341. idoFlg[i] = true;
  2342. if (i >= 7)
  2343. {
  2344. idoFlg[i - 7] = true;
  2345. }
  2346. }
  2347. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2348. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2349. {
  2350. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2351. idoFlg[i] = true;
  2352. if (i >= 7)
  2353. {
  2354. idoFlg[i - 7] = true;
  2355. }
  2356. }
  2357. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2358. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2359. {
  2360. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2361. idoFlg[i] = true;
  2362. if (i >= 7)
  2363. {
  2364. idoFlg[i - 7] = true;
  2365. }
  2366. }
  2367. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2368. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2369. {
  2370. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2371. idoFlg[i] = true;
  2372. if (i >= 7)
  2373. {
  2374. idoFlg[i - 7] = true;
  2375. }
  2376. }
  2377. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2378. {
  2379. Vector3 vector = maid.transform.position;
  2380. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2381. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2382. maid.SetPos(vector);
  2383. idoFlg[i] = true;
  2384. if (i >= 7)
  2385. {
  2386. idoFlg[i - 7] = true;
  2387. }
  2388. }
  2389. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2390. {
  2391. Vector3 vector = maid.transform.position;
  2392. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2393. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2394. maid.SetPos(vector);
  2395. idoFlg[i] = true;
  2396. if (i >= 7)
  2397. {
  2398. idoFlg[i - 7] = true;
  2399. }
  2400. }
  2401. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2402. {
  2403. Vector3 vector = maid.transform.position;
  2404. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2405. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2406. maid.SetPos(vector);
  2407. idoFlg[i] = true;
  2408. if (i >= 7)
  2409. {
  2410. idoFlg[i - 7] = true;
  2411. }
  2412. }
  2413. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2414. {
  2415. Vector3 vector = maid.transform.position;
  2416. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2417. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2418. maid.SetPos(vector);
  2419. idoFlg[i] = true;
  2420. if (i >= 7)
  2421. {
  2422. idoFlg[i - 7] = true;
  2423. }
  2424. }
  2425. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2426. {
  2427. Vector3 vector = maid.transform.position;
  2428. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2429. maid.SetPos(vector);
  2430. idoFlg[i] = true;
  2431. if (i >= 7)
  2432. {
  2433. idoFlg[i - 7] = true;
  2434. }
  2435. }
  2436. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2437. {
  2438. Vector3 vector = maid.transform.position;
  2439. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2440. maid.SetPos(vector);
  2441. idoFlg[i] = true;
  2442. if (i >= 7)
  2443. {
  2444. idoFlg[i - 7] = true;
  2445. }
  2446. }
  2447. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2448. {
  2449. Vector3 vector = maid.transform.position;
  2450. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2451. maid.SetPos(vector);
  2452. idoFlg[i] = true;
  2453. if (i >= 7)
  2454. {
  2455. idoFlg[i - 7] = true;
  2456. }
  2457. }
  2458. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2459. {
  2460. Vector3 vector = maid.transform.position;
  2461. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2462. maid.SetPos(vector);
  2463. idoFlg[i] = true;
  2464. if (i >= 7)
  2465. {
  2466. idoFlg[i - 7] = true;
  2467. }
  2468. }
  2469. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2470. {
  2471. Vector3 vector = maid.transform.position;
  2472. vector.y += 0.0075f * speed;
  2473. maid.SetPos(vector);
  2474. idoFlg[i] = true;
  2475. if (i >= 7)
  2476. {
  2477. idoFlg[i - 7] = true;
  2478. }
  2479. }
  2480. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2481. {
  2482. Vector3 vector = maid.transform.position;
  2483. vector.y -= 0.0075f * speed;
  2484. maid.SetPos(vector);
  2485. idoFlg[i] = true;
  2486. if (i >= 7)
  2487. {
  2488. idoFlg[i - 7] = true;
  2489. }
  2490. }
  2491. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2492. && getModKeyPressing(modKey.Shift))
  2493. {
  2494. faceIndex[i]--;
  2495. if (faceIndex[i] <= -1)
  2496. {
  2497. faceIndex[i] = faceArray.Length - 1;
  2498. }
  2499. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2500. idoFlg[i] = true;
  2501. if (i >= 7)
  2502. {
  2503. idoFlg[i - 7] = true;
  2504. }
  2505. }
  2506. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2507. {
  2508. faceIndex[i]++;
  2509. if (faceIndex[i] == faceArray.Length)
  2510. {
  2511. faceIndex[i] = 0;
  2512. }
  2513. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2514. idoFlg[i] = true;
  2515. if (i >= 7)
  2516. {
  2517. idoFlg[i - 7] = true;
  2518. }
  2519. }
  2520. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2521. {
  2522. faceBlendIndex[i]++;
  2523. if (faceBlendIndex[i] == faceBlendArray.Length)
  2524. {
  2525. faceBlendIndex[i] = 0;
  2526. }
  2527. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2528. idoFlg[i] = true;
  2529. if (i >= 7)
  2530. {
  2531. idoFlg[i - 7] = true;
  2532. }
  2533. }
  2534. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2535. {
  2536. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2537. isStop[i] = false;
  2538. poseCount[i] = 20;
  2539. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2540. {
  2541. maid.body0.MuneYureL(0f);
  2542. maid.body0.MuneYureR(0f);
  2543. }
  2544. else
  2545. {
  2546. maid.body0.MuneYureL(1f);
  2547. maid.body0.MuneYureR(1f);
  2548. maid.body0.jbMuneL.enabled = true;
  2549. maid.body0.jbMuneR.enabled = true;
  2550. }
  2551. if (array[0].Contains("MultipleMaidsPose"))
  2552. {
  2553. string path = array[0].Split(new char[] { '/' })[1];
  2554. byte[] array2 = new byte[0];
  2555. try
  2556. {
  2557. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2558. {
  2559. array2 = new byte[fileStream.Length];
  2560. fileStream.Read(array2, 0, array2.Length);
  2561. }
  2562. }
  2563. catch { }
  2564. if (0 < array2.Length)
  2565. {
  2566. string text = Path.GetFileName(path);
  2567. long num5 = text.GetHashCode();
  2568. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2569. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2570. {
  2571. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2572. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2573. };
  2574. for (int m = 0; m < array3.Length; m++)
  2575. {
  2576. maid.SetAutoTwist(array3[m], true);
  2577. }
  2578. }
  2579. }
  2580. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2581. {
  2582. loadPose[i] = array[0];
  2583. }
  2584. else if (!array[0].StartsWith("dance_"))
  2585. {
  2586. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2587. }
  2588. else
  2589. {
  2590. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2591. {
  2592. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2593. GameUty.FileSystem,
  2594. array[0] + ".anm",
  2595. false,
  2596. false);
  2597. }
  2598. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2599. }
  2600. if (array.Length > 1)
  2601. {
  2602. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2603. isStop[i] = true;
  2604. if (array.Length > 2)
  2605. {
  2606. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2607. isPoseIti[i] = true;
  2608. poseIti[i] = maidArray[i].transform.position;
  2609. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2610. }
  2611. }
  2612. isLock[i] = false;
  2613. idoFlg[i] = true;
  2614. mHandL[i].initFlg = false;
  2615. mHandR[i].initFlg = false;
  2616. mFootL[i].initFlg = false;
  2617. mFootR[i].initFlg = false;
  2618. pHandL[i] = 0;
  2619. pHandR[i] = 0;
  2620. muneIKL[i] = false;
  2621. muneIKR[i] = false;
  2622. if (!isVR)
  2623. {
  2624. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2625. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2626. }
  2627. if (i >= 7)
  2628. {
  2629. idoFlg[i - 7] = true;
  2630. }
  2631. }
  2632. else if (maid.body0.isLoadedBody)
  2633. {
  2634. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2635. {
  2636. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2637. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2638. }
  2639. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2640. {
  2641. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2642. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2643. }
  2644. if (!HandL1[i])
  2645. {
  2646. SetIKInit(i);
  2647. SetIK(maid, i);
  2648. ikBui = 5;
  2649. }
  2650. else
  2651. {
  2652. bool flag5 = false;
  2653. for (int k = 0; k < keyArray.Length; k++)
  2654. {
  2655. if (Input.GetKey(keyArray[k]))
  2656. {
  2657. flag5 = true;
  2658. break;
  2659. }
  2660. }
  2661. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2662. || Input.GetKey(KeyCode.Y))
  2663. {
  2664. flag5 = true;
  2665. }
  2666. if (!flag5)
  2667. {
  2668. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2669. && getModKeyPressing(modKey.Shift))
  2670. {
  2671. ikMode[i] = 15;
  2672. }
  2673. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2674. {
  2675. ikMode[i] = 5;
  2676. }
  2677. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2678. {
  2679. ikMode[i] = 6;
  2680. }
  2681. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2682. {
  2683. ikMode[i] = 7;
  2684. }
  2685. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2686. {
  2687. ikMode[i] = 11;
  2688. }
  2689. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2690. {
  2691. ikMode[i] = 12;
  2692. }
  2693. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 14;
  2696. }
  2697. else if (getModKeyPressing(modKey.Shift))
  2698. {
  2699. ikMode[i] = 1;
  2700. }
  2701. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2702. {
  2703. ikMode[i] = 8;
  2704. }
  2705. else if (getModKeyPressing(modKey.Ctrl))
  2706. {
  2707. ikMode[i] = 2;
  2708. }
  2709. else if (getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 3;
  2712. }
  2713. else if (Input.GetKey(KeyCode.Space))
  2714. {
  2715. ikMode[i] = 4;
  2716. }
  2717. else if (Input.GetKey(KeyCode.X))
  2718. {
  2719. ikMode[i] = 9;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Z))
  2722. {
  2723. ikMode[i] = 10;
  2724. }
  2725. else if (Input.GetKey(KeyCode.C))
  2726. {
  2727. ikMode[i] = 13;
  2728. }
  2729. else if (Input.GetKey(KeyCode.A))
  2730. {
  2731. ikMode[i] = 16;
  2732. }
  2733. else
  2734. {
  2735. ikMode[i] = 0;
  2736. }
  2737. if (!isIK[i])
  2738. {
  2739. if (ikMode[i] < 9)
  2740. {
  2741. ikMode[i] = 0;
  2742. }
  2743. }
  2744. bool flag9 = false;
  2745. bool flag10 = false;
  2746. bool flag11 = false;
  2747. bool flag12 = false;
  2748. if (gFinger[i, 0])
  2749. {
  2750. for (int j = 0; j < 15; j++)
  2751. {
  2752. if (mFinger[i, j].isStop)
  2753. {
  2754. flag9 = true;
  2755. }
  2756. }
  2757. for (int j = 15; j < 30; j++)
  2758. {
  2759. if (mFinger[i, j].isStop)
  2760. {
  2761. flag10 = true;
  2762. }
  2763. }
  2764. for (int j = 0; j < 6; j++)
  2765. {
  2766. if (mFinger2[i, j].isStop)
  2767. {
  2768. flag11 = true;
  2769. }
  2770. }
  2771. for (int j = 6; j < 12; j++)
  2772. {
  2773. if (mFinger2[i, j].isStop)
  2774. {
  2775. flag12 = true;
  2776. }
  2777. }
  2778. }
  2779. if (gMaid[i] != null)
  2780. {
  2781. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2782. {
  2783. gMaid[i].SetActive(true);
  2784. if (isCube)
  2785. {
  2786. gMaidC[i].SetActive(true);
  2787. }
  2788. }
  2789. else
  2790. {
  2791. gMaid[i].SetActive(false);
  2792. gMaidC[i].SetActive(false);
  2793. }
  2794. }
  2795. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2796. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2797. {
  2798. ikBui = 1;
  2799. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2800. {
  2801. ikMaid = i;
  2802. }
  2803. if (ikMaid == i)
  2804. {
  2805. SetIK(maid, i);
  2806. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2807. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2808. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2809. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2810. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2811. }
  2812. if (Input.GetKeyDown(KeyCode.Q))
  2813. {
  2814. qFlg = true;
  2815. }
  2816. }
  2817. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2818. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2819. {
  2820. ikBui = 2;
  2821. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2822. {
  2823. ikMaid = i;
  2824. }
  2825. if (ikMaid == i)
  2826. {
  2827. SetIK(maid, i);
  2828. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2829. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2830. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2831. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2832. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2833. }
  2834. if (Input.GetKeyDown(KeyCode.W))
  2835. {
  2836. wFlg = true;
  2837. }
  2838. }
  2839. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2840. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2841. {
  2842. ikBui = 3;
  2843. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2844. {
  2845. ikMaid = i;
  2846. }
  2847. if (ikMaid == i)
  2848. {
  2849. SetIK(maid, i);
  2850. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2851. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2852. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2853. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2854. }
  2855. }
  2856. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2857. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2858. {
  2859. ikBui = 4;
  2860. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2861. {
  2862. ikMaid = i;
  2863. }
  2864. if (ikMaid == i)
  2865. {
  2866. SetIK(maid, i);
  2867. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2868. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2869. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2870. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2871. }
  2872. if (Input.GetKeyDown(KeyCode.S))
  2873. {
  2874. sFlg = true;
  2875. }
  2876. }
  2877. mHandR[i].isSelect = false;
  2878. mArmR[i].isSelect = false;
  2879. mHandL[i].isSelect = false;
  2880. mArmL[i].isSelect = false;
  2881. mFootR[i].isSelect = false;
  2882. mHizaR[i].isSelect = false;
  2883. mFootL[i].isSelect = false;
  2884. mHizaL[i].isSelect = false;
  2885. mClavicleL[i].isSelect = false;
  2886. mClavicleR[i].isSelect = false;
  2887. if (ikMode[i] == 16)
  2888. {
  2889. if (!gHead2[i])
  2890. {
  2891. SetIKInit6(i);
  2892. }
  2893. if (mHead2[i].isClick)
  2894. {
  2895. mHead2[i].isClick = false;
  2896. bGui = true;
  2897. isFaceInit = true;
  2898. // isGuiInit = true;
  2899. faceFlg = true;
  2900. poseFlg = false;
  2901. sceneFlg = false;
  2902. kankyoFlg = false;
  2903. kankyo2Flg = false;
  2904. maid.boMabataki = false;
  2905. selectMaidIndex = mHead2[i].no;
  2906. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2907. }
  2908. if (mMaid2[i].isClick)
  2909. {
  2910. mMaid2[i].isClick = false;
  2911. bGui = true;
  2912. isPoseInit = true;
  2913. // isGuiInit = true;
  2914. poseFlg = true;
  2915. faceFlg = false;
  2916. sceneFlg = false;
  2917. kankyoFlg = false;
  2918. kankyo2Flg = false;
  2919. selectMaidIndex = mMaid2[i].no;
  2920. copyIndex = 0;
  2921. }
  2922. gHead2[i].transform.position =
  2923. new Vector3(Head2[i].position.x,
  2924. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2925. Head2[i].position.z);
  2926. gHead2[i].transform.eulerAngles =
  2927. new Vector3(Head2[i].transform.eulerAngles.x,
  2928. Head2[i].transform.eulerAngles.y,
  2929. Head2[i].transform.eulerAngles.z + 90f);
  2930. mHead2[i].no = i;
  2931. mHead2[i].maid = maid;
  2932. mHead2[i].ido = 1;
  2933. gMaid2[i].transform.position =
  2934. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2935. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2936. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2937. gMaid2[i].transform.eulerAngles =
  2938. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2939. Spine0a2[i].transform.eulerAngles.y,
  2940. Spine0a2[i].transform.eulerAngles.z + 90f);
  2941. mMaid2[i].no = i;
  2942. mMaid2[i].maid = maid;
  2943. mMaid2[i].ido = 2;
  2944. gArmL[i].SetActive(false);
  2945. gFootL[i].SetActive(false);
  2946. gHizaL[i].SetActive(false);
  2947. gHandR[i].SetActive(false);
  2948. gArmR[i].SetActive(false);
  2949. gFootR[i].SetActive(false);
  2950. gHizaR[i].SetActive(false);
  2951. gClavicleL[i].SetActive(false);
  2952. gClavicleR[i].SetActive(false);
  2953. gNeck[i].SetActive(false);
  2954. gSpine[i].SetActive(false);
  2955. gSpine0a[i].SetActive(false);
  2956. gSpine1a[i].SetActive(false);
  2957. gSpine1[i].SetActive(false);
  2958. gPelvis[i].SetActive(false);
  2959. }
  2960. else if (ikMode[i] == 8)
  2961. {
  2962. if (ikModeOld[i] == 15 && gIKHandL[i])
  2963. {
  2964. mIKHandL[i].ido = 1;
  2965. mIKHandL[i].reset = true;
  2966. mIKHandR[i].ido = 1;
  2967. mIKHandR[i].reset = true;
  2968. }
  2969. else if (ikModeOld[i] == 3 && gHead[i])
  2970. {
  2971. mHead[i].ido = 7;
  2972. mHead[i].reset = true;
  2973. }
  2974. else
  2975. {
  2976. if (!gIKHandL[i])
  2977. {
  2978. SetIKInit5(i);
  2979. }
  2980. gIKHandL[i].transform.position = IKHandL[i].position;
  2981. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2982. mIKHandL[i].maid = maid;
  2983. mIKHandL[i].HandL = IKHandL[i];
  2984. mIKHandL[i].ido = 1;
  2985. gIKHandR[i].transform.position = IKHandR[i].position;
  2986. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2987. mIKHandR[i].maid = maid;
  2988. mIKHandR[i].HandL = IKHandR[i];
  2989. mIKHandR[i].ido = 1;
  2990. if (!gIKMuneL[i])
  2991. {
  2992. SetIKInit7(i);
  2993. }
  2994. if (!gHead[i])
  2995. {
  2996. SetIKInit4(i);
  2997. }
  2998. mIKMuneL[i].maid = maid;
  2999. mIKMuneL[i].HandL = IKMuneLSub[i];
  3000. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3001. mIKMuneL[i].ForearmL = IKMuneL[i];
  3002. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3003. mIKMuneR[i].maid = maid;
  3004. mIKMuneR[i].HandL = IKMuneRSub[i];
  3005. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3006. mIKMuneR[i].ForearmL = IKMuneR[i];
  3007. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3008. gHead[i].transform.position =
  3009. new Vector3(Head2[i].position.x,
  3010. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3011. Head2[i].position.z);
  3012. gHead[i].transform.eulerAngles =
  3013. new Vector3(Head2[i].transform.eulerAngles.x,
  3014. Head2[i].transform.eulerAngles.y,
  3015. Head2[i].transform.eulerAngles.z + 90f);
  3016. mHead[i].head = Head1[i];
  3017. mHead[i].maid = maid;
  3018. mHead[i].ido = 7;
  3019. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3020. gHead[i].SetActive(true);
  3021. if (mHead[i].isClick)
  3022. {
  3023. mHead[i].isClick = false;
  3024. mHead[i].isClick2 = false;
  3025. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3026. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3027. }
  3028. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3029. {
  3030. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3031. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3032. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3033. IKMuneLSub[i].localEulerAngles.y,
  3034. IKMuneLSub[i].localEulerAngles.z);
  3035. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3036. IKMuneL[i].localEulerAngles.y,
  3037. IKMuneL[i].localEulerAngles.z);
  3038. muneIKL[i] = true;
  3039. isStop[i] = true;
  3040. isLock[i] = true;
  3041. mIKMuneL[i].isMouseDrag = false;
  3042. }
  3043. if (mIKMuneL[i].isMouseDown)
  3044. {
  3045. maid.body0.MuneYureL(0f);
  3046. maid.body0.MuneYureR(0f);
  3047. maid.body0.jbMuneL.enabled = false;
  3048. maid.body0.jbMuneR.enabled = false;
  3049. muneIKL[i] = false;
  3050. mIKMuneL[i].isMouseUp = false;
  3051. }
  3052. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3053. {
  3054. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3055. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3056. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3057. IKMuneRSub[i].localEulerAngles.y,
  3058. IKMuneRSub[i].localEulerAngles.z);
  3059. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3060. IKMuneR[i].localEulerAngles.y,
  3061. IKMuneR[i].localEulerAngles.z);
  3062. muneIKR[i] = true;
  3063. isStop[i] = true;
  3064. isLock[i] = true;
  3065. mIKMuneR[i].isMouseDrag = false;
  3066. }
  3067. if (mIKMuneR[i].isMouseDown)
  3068. {
  3069. maid.body0.MuneYureL(0f);
  3070. maid.body0.MuneYureR(0f);
  3071. maid.body0.jbMuneL.enabled = false;
  3072. maid.body0.jbMuneR.enabled = false;
  3073. muneIKR[i] = false;
  3074. mIKMuneL[i].isMouseUp = false;
  3075. }
  3076. if (mHead[i].isStop)
  3077. {
  3078. isStop[i] = true;
  3079. isLock[i] = true;
  3080. mHead[i].isStop = false;
  3081. }
  3082. gJotai[i].SetActive(false);
  3083. gKahuku[i].SetActive(false);
  3084. gHandL[i].SetActive(false);
  3085. gArmL[i].SetActive(false);
  3086. gFootL[i].SetActive(false);
  3087. gHizaL[i].SetActive(false);
  3088. gHandR[i].SetActive(false);
  3089. gArmR[i].SetActive(false);
  3090. gFootR[i].SetActive(false);
  3091. gHizaR[i].SetActive(false);
  3092. gClavicleL[i].SetActive(false);
  3093. gClavicleR[i].SetActive(false);
  3094. gNeck[i].SetActive(false);
  3095. gSpine[i].SetActive(false);
  3096. gSpine0a[i].SetActive(false);
  3097. gSpine1a[i].SetActive(false);
  3098. gSpine1[i].SetActive(false);
  3099. gPelvis[i].SetActive(false);
  3100. }
  3101. }
  3102. else if (ikMode[i] == 15)
  3103. {
  3104. if (ikModeOld[i] == 8 && gIKHandL[i])
  3105. {
  3106. mIKHandL[i].ido = 2;
  3107. mIKHandL[i].reset = true;
  3108. mIKHandR[i].ido = 2;
  3109. mIKHandR[i].reset = true;
  3110. }
  3111. else
  3112. {
  3113. if (!gIKHandL[i])
  3114. {
  3115. SetIKInit5(i);
  3116. }
  3117. gIKHandL[i].transform.position = IKHandL[i].position;
  3118. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3119. mIKHandL[i].maid = maid;
  3120. mIKHandL[i].HandL = IKHandL[i];
  3121. mIKHandL[i].ido = 2;
  3122. gIKHandR[i].transform.position = IKHandR[i].position;
  3123. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3124. mIKHandR[i].maid = maid;
  3125. mIKHandR[i].HandL = IKHandR[i];
  3126. mIKHandR[i].ido = 2;
  3127. Destroy(gHead[i]);
  3128. Destroy(gJotai[i]);
  3129. Destroy(gKahuku[i]);
  3130. gHandL[i].SetActive(false);
  3131. gArmL[i].SetActive(false);
  3132. gFootL[i].SetActive(false);
  3133. gHizaL[i].SetActive(false);
  3134. gHandR[i].SetActive(false);
  3135. gArmR[i].SetActive(false);
  3136. gFootR[i].SetActive(false);
  3137. gHizaR[i].SetActive(false);
  3138. gClavicleL[i].SetActive(false);
  3139. gClavicleR[i].SetActive(false);
  3140. gNeck[i].SetActive(false);
  3141. gSpine[i].SetActive(false);
  3142. gSpine0a[i].SetActive(false);
  3143. gSpine1a[i].SetActive(false);
  3144. gSpine1[i].SetActive(false);
  3145. gPelvis[i].SetActive(false);
  3146. }
  3147. }
  3148. else if (ikMode[i] == 1)
  3149. {
  3150. mHandL[i].ido = 10;
  3151. mHandR[i].ido = 10;
  3152. mFootL[i].ido = 10;
  3153. mFootR[i].ido = 10;
  3154. if (ikModeOld[i] == 0 && gNeck[i])
  3155. {
  3156. if (isBone[i])
  3157. {
  3158. mNeck[i].ido = 4;
  3159. mNeck[i].reset = true;
  3160. mSpine[i].ido = 4;
  3161. mSpine[i].reset = true;
  3162. mSpine0a[i].ido = 4;
  3163. mSpine0a[i].reset = true;
  3164. mSpine1a[i].ido = 4;
  3165. mSpine1a[i].reset = true;
  3166. mSpine1[i].ido = 4;
  3167. mSpine1[i].reset = true;
  3168. mPelvis[i].ido = 4;
  3169. mPelvis[i].reset = true;
  3170. mHizaL[i].ido = 5;
  3171. mHizaL[i].reset = true;
  3172. mHizaR[i].ido = 5;
  3173. mHizaR[i].reset = true;
  3174. }
  3175. }
  3176. else
  3177. {
  3178. gArmL[i].SetActive(false);
  3179. gArmR[i].SetActive(false);
  3180. if (!isBone[i])
  3181. {
  3182. gHizaL[i].SetActive(false);
  3183. gHizaR[i].SetActive(false);
  3184. }
  3185. gClavicleL[i].SetActive(false);
  3186. gClavicleR[i].SetActive(false);
  3187. if (isBone[i])
  3188. {
  3189. mNeck[i].maid = maid;
  3190. mNeck[i].head = Neck[i];
  3191. mNeck[i].no = i;
  3192. mNeck[i].ido = 4;
  3193. gNeck[i].transform.position = Neck[i].position;
  3194. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3195. if (mNeck[i].isHead)
  3196. {
  3197. mNeck[i].isHead = false;
  3198. isLookn[i] = isLook[i];
  3199. isLook[i] = !isLook[i];
  3200. }
  3201. mSpine[i].maid = maid;
  3202. mSpine[i].head = Spine2[i];
  3203. mSpine[i].no = i;
  3204. mSpine[i].ido = 4;
  3205. gSpine[i].transform.position = Spine2[i].position;
  3206. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3207. mSpine0a[i].maid = maid;
  3208. mSpine0a[i].head = Spine0a2[i];
  3209. mSpine0a[i].no = i;
  3210. mSpine0a[i].ido = 4;
  3211. gSpine0a[i].transform.position = Spine0a2[i].position;
  3212. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3213. mSpine1a[i].maid = maid;
  3214. mSpine1a[i].head = Spine1a2[i];
  3215. mSpine1a[i].no = i;
  3216. mSpine1a[i].ido = 4;
  3217. gSpine1a[i].transform.position = Spine1a2[i].position;
  3218. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3219. mSpine1[i].maid = maid;
  3220. mSpine1[i].head = Spine12[i];
  3221. mSpine1[i].no = i;
  3222. mSpine1[i].ido = 4;
  3223. gSpine1[i].transform.position = Spine12[i].position;
  3224. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3225. mPelvis[i].maid = maid;
  3226. mPelvis[i].head = Pelvis2[i];
  3227. mPelvis[i].no = i;
  3228. mPelvis[i].ido = 8;
  3229. gPelvis[i].transform.position = Pelvis2[i].position;
  3230. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3231. mHizaL[i].ido = 5;
  3232. mHizaR[i].ido = 5;
  3233. }
  3234. }
  3235. }
  3236. else if (ikMode[i] == 2)
  3237. {
  3238. if (ikModeOld[i] == 0 && gPelvis[i])
  3239. {
  3240. mPelvis[i].ido = 9;
  3241. mPelvis[i].reset = true;
  3242. }
  3243. else
  3244. {
  3245. gArmL[i].SetActive(false);
  3246. gHizaL[i].SetActive(false);
  3247. gArmR[i].SetActive(false);
  3248. gHizaR[i].SetActive(false);
  3249. gClavicleL[i].SetActive(false);
  3250. gClavicleR[i].SetActive(false);
  3251. gNeck[i].SetActive(false);
  3252. gSpine[i].SetActive(false);
  3253. gSpine0a[i].SetActive(false);
  3254. gSpine1a[i].SetActive(false);
  3255. gSpine1[i].SetActive(false);
  3256. mPelvis[i].maid = maid;
  3257. mPelvis[i].head = Pelvis2[i];
  3258. mPelvis[i].no = i;
  3259. mPelvis[i].ido = 9;
  3260. gPelvis[i].transform.position = Pelvis2[i].position;
  3261. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3262. }
  3263. }
  3264. else if (ikMode[i] == 3)
  3265. {
  3266. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3267. {
  3268. mHead[i].ido = 1;
  3269. mHead[i].reset = true;
  3270. mJotai[i].ido = 2;
  3271. mJotai[i].reset = true;
  3272. mKahuku[i].ido = 3;
  3273. mKahuku[i].reset = true;
  3274. mHandL[i].ido = 1;
  3275. mHandR[i].ido = 1;
  3276. mFootL[i].ido = 3;
  3277. mFootR[i].ido = 3;
  3278. mHizaL[i].ido = 5;
  3279. mHizaR[i].ido = 5;
  3280. mHandL[i].reset = true;
  3281. mHandR[i].reset = true;
  3282. mFootL[i].reset = true;
  3283. mFootR[i].reset = true;
  3284. mHizaL[i].reset = true;
  3285. mHizaR[i].reset = true;
  3286. }
  3287. else if (ikModeOld[i] == 0)
  3288. {
  3289. mHandL[i].ido = 1;
  3290. mHandR[i].ido = 1;
  3291. mFootL[i].ido = 3;
  3292. mFootR[i].ido = 3;
  3293. mHizaL[i].ido = 5;
  3294. mHizaR[i].ido = 5;
  3295. mHandL[i].reset = true;
  3296. mHandR[i].reset = true;
  3297. mFootL[i].reset = true;
  3298. mFootR[i].reset = true;
  3299. mHizaL[i].reset = true;
  3300. mHizaR[i].reset = true;
  3301. }
  3302. else
  3303. {
  3304. if (!gHead[i])
  3305. {
  3306. SetIKInit4(i);
  3307. }
  3308. if (mHead[i].isHead)
  3309. {
  3310. mHead[i].isHead = false;
  3311. isLookn[i] = isLook[i];
  3312. isLook[i] = !isLook[i];
  3313. }
  3314. gHead[i].transform.position =
  3315. new Vector3(Head2[i].position.x,
  3316. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3317. Head2[i].position.z);
  3318. gHead[i].transform.eulerAngles =
  3319. new Vector3(Head2[i].transform.eulerAngles.x,
  3320. Head2[i].transform.eulerAngles.y,
  3321. Head2[i].transform.eulerAngles.z + 90f);
  3322. mHead[i].head = Head1[i];
  3323. mHead[i].maid = maid;
  3324. mHead[i].no = i;
  3325. mHead[i].ido = 1;
  3326. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3327. Transform transform3 =
  3328. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3329. Transform transform4 =
  3330. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3331. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3332. Transform transform6 =
  3333. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3334. gJotai[i].transform.position =
  3335. new Vector3(transform3.position.x,
  3336. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3337. transform3.position.z);
  3338. gJotai[i].transform.eulerAngles =
  3339. new Vector3(transform3.transform.eulerAngles.x,
  3340. transform3.transform.eulerAngles.y,
  3341. transform3.transform.eulerAngles.z + 90f);
  3342. mJotai[i].Spine0a = spine0a;
  3343. mJotai[i].Spine1 = transform3;
  3344. mJotai[i].Spine1a = transform4;
  3345. mJotai[i].Spine = transform5;
  3346. mJotai[i].maid = maid;
  3347. mJotai[i].ido = 2;
  3348. gKahuku[i].transform.position =
  3349. new Vector3(transform6.position.x,
  3350. (transform6.position.y + transform5.position.y) / 2f,
  3351. transform6.position.z);
  3352. gKahuku[i].transform.eulerAngles =
  3353. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3354. transform6.transform.eulerAngles.y + 90f,
  3355. transform6.transform.eulerAngles.z);
  3356. mKahuku[i].Pelvis = transform6;
  3357. mKahuku[i].maid = maid;
  3358. mKahuku[i].ido = 3;
  3359. mHandL[i].ido = 1;
  3360. mHandR[i].ido = 1;
  3361. mFootL[i].ido = 3;
  3362. mFootR[i].ido = 3;
  3363. mHizaL[i].ido = 5;
  3364. mHizaR[i].ido = 5;
  3365. gJotai[i].SetActive(true);
  3366. gKahuku[i].SetActive(true);
  3367. gHandL[i].SetActive(true);
  3368. gArmL[i].SetActive(false);
  3369. gFootL[i].SetActive(true);
  3370. gHizaL[i].SetActive(true);
  3371. gHandR[i].SetActive(true);
  3372. gArmR[i].SetActive(false);
  3373. gFootR[i].SetActive(true);
  3374. gHizaR[i].SetActive(true);
  3375. Destroy(gIKHandL[i]);
  3376. Destroy(gIKHandR[i]);
  3377. Destroy(gIKMuneL[i]);
  3378. Destroy(gIKMuneR[i]);
  3379. if (isBone[i])
  3380. {
  3381. gHizaL[i].SetActive(false);
  3382. gHizaR[i].SetActive(false);
  3383. gHead[i].SetActive(false);
  3384. gJotai[i].SetActive(false);
  3385. gKahuku[i].SetActive(false);
  3386. }
  3387. else
  3388. {
  3389. gHizaL[i].SetActive(true);
  3390. gHizaR[i].SetActive(true);
  3391. gHead[i].SetActive(true);
  3392. gJotai[i].SetActive(true);
  3393. gKahuku[i].SetActive(true);
  3394. }
  3395. gClavicleL[i].SetActive(false);
  3396. gClavicleR[i].SetActive(false);
  3397. gNeck[i].SetActive(false);
  3398. gSpine[i].SetActive(false);
  3399. gSpine0a[i].SetActive(false);
  3400. gSpine1a[i].SetActive(false);
  3401. gSpine1[i].SetActive(false);
  3402. gPelvis[i].SetActive(false);
  3403. if (mHead[i].isStop)
  3404. {
  3405. isStop[i] = true;
  3406. isLock[i] = true;
  3407. mHead[i].isStop = false;
  3408. }
  3409. if (mJotai[i].isStop)
  3410. {
  3411. isStop[i] = true;
  3412. isLock[i] = true;
  3413. mJotai[i].isStop = false;
  3414. }
  3415. if (mKahuku[i].isStop)
  3416. {
  3417. isStop[i] = true;
  3418. isLock[i] = true;
  3419. mKahuku[i].isStop = false;
  3420. }
  3421. if (mKahuku[i].isSelect)
  3422. {
  3423. mKahuku[i].isSelect = false;
  3424. if (ikMaid != i)
  3425. {
  3426. ikMaid = i;
  3427. ikBui = 5;
  3428. SetIK(maid, i);
  3429. }
  3430. }
  3431. if (mJotai[i].isSelect)
  3432. {
  3433. mJotai[i].isSelect = false;
  3434. if (ikMaid != i)
  3435. {
  3436. ikMaid = i;
  3437. ikBui = 5;
  3438. SetIK(maid, i);
  3439. }
  3440. }
  3441. if (mKahuku[i].isSelect)
  3442. {
  3443. mKahuku[i].isSelect = false;
  3444. if (ikMaid != i)
  3445. {
  3446. ikMaid = i;
  3447. ikBui = 5;
  3448. SetIK(maid, i);
  3449. }
  3450. }
  3451. }
  3452. }
  3453. else if (ikMode[i] == 5)
  3454. {
  3455. if (ikModeOld[i] == 3 && gHead[i])
  3456. {
  3457. mHead[i].ido = 4;
  3458. mHead[i].reset = true;
  3459. mJotai[i].ido = 5;
  3460. mJotai[i].reset = true;
  3461. mKahuku[i].ido = 6;
  3462. mKahuku[i].reset = true;
  3463. mHandL[i].ido = 2;
  3464. mHandR[i].ido = 2;
  3465. mFootL[i].ido = 4;
  3466. mFootR[i].ido = 4;
  3467. mHizaL[i].ido = 5;
  3468. mHizaR[i].ido = 5;
  3469. mHandL[i].reset = true;
  3470. mHandR[i].reset = true;
  3471. mFootL[i].reset = true;
  3472. mFootR[i].reset = true;
  3473. mHizaL[i].reset = true;
  3474. mHizaR[i].reset = true;
  3475. }
  3476. else if (ikModeOld[i] == 0)
  3477. {
  3478. mHandL[i].ido = 2;
  3479. mHandR[i].ido = 2;
  3480. mFootL[i].ido = 4;
  3481. mFootR[i].ido = 4;
  3482. mHizaL[i].ido = 5;
  3483. mHizaR[i].ido = 5;
  3484. mHandL[i].reset = true;
  3485. mHandR[i].reset = true;
  3486. mFootL[i].reset = true;
  3487. mFootR[i].reset = true;
  3488. mHizaL[i].reset = true;
  3489. mHizaR[i].reset = true;
  3490. }
  3491. else
  3492. {
  3493. if (!gHead[i])
  3494. {
  3495. SetIKInit4(i);
  3496. }
  3497. if (mHead[i].isHead)
  3498. {
  3499. mHead[i].isHead = false;
  3500. isLookn[i] = isLook[i];
  3501. isLook[i] = !isLook[i];
  3502. }
  3503. gHead[i].transform.position =
  3504. new Vector3(Head2[i].position.x,
  3505. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3506. Head2[i].position.z);
  3507. gHead[i].transform.eulerAngles =
  3508. new Vector3(Head2[i].transform.eulerAngles.x,
  3509. Head2[i].transform.eulerAngles.y,
  3510. Head2[i].transform.eulerAngles.z + 90f);
  3511. mHead[i].head = Head1[i];
  3512. mHead[i].maid = maid;
  3513. mHead[i].ido = 4;
  3514. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3515. Transform transform3 =
  3516. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3517. Transform transform4 =
  3518. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3519. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3520. Transform transform6 =
  3521. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3522. gJotai[i].transform.position =
  3523. new Vector3(transform3.position.x,
  3524. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3525. transform3.position.z);
  3526. gJotai[i].transform.eulerAngles =
  3527. new Vector3(transform3.transform.eulerAngles.x,
  3528. transform3.transform.eulerAngles.y,
  3529. transform3.transform.eulerAngles.z + 90f);
  3530. mJotai[i].Spine0a = spine0a;
  3531. mJotai[i].Spine1 = transform3;
  3532. mJotai[i].Spine1a = transform4;
  3533. mJotai[i].Spine = transform5;
  3534. mJotai[i].maid = maid;
  3535. mJotai[i].ido = 5;
  3536. gKahuku[i].transform.position =
  3537. new Vector3(transform6.position.x,
  3538. (transform6.position.y + transform5.position.y) / 2f,
  3539. transform6.position.z);
  3540. gKahuku[i].transform.eulerAngles =
  3541. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3542. transform6.transform.eulerAngles.y + 90f,
  3543. transform6.transform.eulerAngles.z);
  3544. mKahuku[i].Pelvis = transform6;
  3545. mKahuku[i].maid = maid;
  3546. mKahuku[i].ido = 6;
  3547. mHandL[i].ido = 2;
  3548. mHandR[i].ido = 2;
  3549. mFootL[i].ido = 4;
  3550. mFootR[i].ido = 4;
  3551. mHizaL[i].ido = 5;
  3552. mHizaR[i].ido = 5;
  3553. gArmL[i].SetActive(false);
  3554. gArmR[i].SetActive(false);
  3555. gClavicleL[i].SetActive(false);
  3556. gClavicleR[i].SetActive(false);
  3557. gNeck[i].SetActive(false);
  3558. gSpine[i].SetActive(false);
  3559. gSpine0a[i].SetActive(false);
  3560. gSpine1a[i].SetActive(false);
  3561. gSpine1[i].SetActive(false);
  3562. gPelvis[i].SetActive(false);
  3563. if (isBone[i])
  3564. {
  3565. gHizaL[i].SetActive(false);
  3566. gHizaR[i].SetActive(false);
  3567. gHead[i].SetActive(false);
  3568. gJotai[i].SetActive(false);
  3569. gKahuku[i].SetActive(false);
  3570. }
  3571. else
  3572. {
  3573. gHizaL[i].SetActive(true);
  3574. gHizaR[i].SetActive(true);
  3575. gHead[i].SetActive(true);
  3576. gJotai[i].SetActive(true);
  3577. gKahuku[i].SetActive(true);
  3578. }
  3579. if (mHead[i].isStop)
  3580. {
  3581. isStop[i] = true;
  3582. isLock[i] = true;
  3583. mHead[i].isStop = false;
  3584. }
  3585. if (mJotai[i].isStop)
  3586. {
  3587. isStop[i] = true;
  3588. isLock[i] = true;
  3589. mJotai[i].isStop = false;
  3590. }
  3591. if (mKahuku[i].isStop)
  3592. {
  3593. isStop[i] = true;
  3594. isLock[i] = true;
  3595. mKahuku[i].isStop = false;
  3596. }
  3597. if (mHead[i].isSelect)
  3598. {
  3599. mHead[i].isSelect = false;
  3600. if (ikMaid != i)
  3601. {
  3602. ikMaid = i;
  3603. ikBui = 5;
  3604. SetIK(maid, i);
  3605. }
  3606. }
  3607. if (mJotai[i].isSelect)
  3608. {
  3609. mJotai[i].isSelect = false;
  3610. if (ikMaid != i)
  3611. {
  3612. ikMaid = i;
  3613. ikBui = 5;
  3614. SetIK(maid, i);
  3615. }
  3616. }
  3617. if (mKahuku[i].isSelect)
  3618. {
  3619. mKahuku[i].isSelect = false;
  3620. if (ikMaid != i)
  3621. {
  3622. ikMaid = i;
  3623. ikBui = 5;
  3624. SetIK(maid, i);
  3625. }
  3626. }
  3627. }
  3628. }
  3629. else if (ikMode[i] == 13)
  3630. {
  3631. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3632. {
  3633. mMaid[i].ido = 5;
  3634. mMaid[i].reset = true;
  3635. mMaidC[i].ido = 5;
  3636. mMaidC[i].reset = true;
  3637. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3638. }
  3639. else
  3640. {
  3641. if (!gMaid[i])
  3642. {
  3643. SetIKInit3(i);
  3644. }
  3645. gMaid[i].transform.position =
  3646. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3647. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3648. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3649. gMaid[i].transform.eulerAngles =
  3650. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3651. Spine0a2[i].transform.eulerAngles.y,
  3652. Spine0a2[i].transform.eulerAngles.z + 90f);
  3653. mMaid[i].maid = maid;
  3654. mMaid[i].ido = 5;
  3655. gMaidC[i].transform.position = maid.transform.position;
  3656. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3657. mMaidC[i].maid = maid;
  3658. mMaidC[i].ido = 5;
  3659. if (isCube)
  3660. {
  3661. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3662. gMaidC[i].SetActive(true);
  3663. }
  3664. else
  3665. {
  3666. gMaidC[i].SetActive(false);
  3667. }
  3668. gHandL[i].SetActive(false);
  3669. gArmL[i].SetActive(false);
  3670. gFootL[i].SetActive(false);
  3671. gHizaL[i].SetActive(false);
  3672. gHandR[i].SetActive(false);
  3673. gArmR[i].SetActive(false);
  3674. gFootR[i].SetActive(false);
  3675. gHizaR[i].SetActive(false);
  3676. gClavicleL[i].SetActive(false);
  3677. gClavicleR[i].SetActive(false);
  3678. gNeck[i].SetActive(false);
  3679. gSpine[i].SetActive(false);
  3680. gSpine0a[i].SetActive(false);
  3681. gSpine1a[i].SetActive(false);
  3682. gSpine1[i].SetActive(false);
  3683. gPelvis[i].SetActive(false);
  3684. }
  3685. if (mMaid[i].isSelect)
  3686. {
  3687. mMaid[i].isSelect = false;
  3688. if (ikMaid != i)
  3689. {
  3690. ikMaid = i;
  3691. ikBui = 5;
  3692. SetIK(maid, i);
  3693. }
  3694. }
  3695. }
  3696. else if (ikMode[i] == 11)
  3697. {
  3698. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3699. {
  3700. mMaid[i].ido = 3;
  3701. mMaid[i].reset = true;
  3702. mMaidC[i].ido = 3;
  3703. mMaidC[i].reset = true;
  3704. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3705. }
  3706. else
  3707. {
  3708. if (!gMaid[i])
  3709. {
  3710. SetIKInit3(i);
  3711. }
  3712. gMaid[i].transform.position =
  3713. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3714. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3715. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3716. gMaid[i].transform.eulerAngles =
  3717. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3718. Spine0a2[i].transform.eulerAngles.y,
  3719. Spine0a2[i].transform.eulerAngles.z + 90f);
  3720. mMaid[i].maid = maid;
  3721. mMaid[i].ido = 3;
  3722. gMaidC[i].transform.position = maid.transform.position;
  3723. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3724. mMaidC[i].maid = maid;
  3725. mMaidC[i].ido = 3;
  3726. if (isCube)
  3727. {
  3728. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3729. gMaidC[i].SetActive(true);
  3730. }
  3731. else
  3732. {
  3733. gMaidC[i].SetActive(false);
  3734. }
  3735. gHandL[i].SetActive(false);
  3736. gArmL[i].SetActive(false);
  3737. gFootL[i].SetActive(false);
  3738. gHizaL[i].SetActive(false);
  3739. gHandR[i].SetActive(false);
  3740. gArmR[i].SetActive(false);
  3741. gFootR[i].SetActive(false);
  3742. gHizaR[i].SetActive(false);
  3743. gClavicleL[i].SetActive(false);
  3744. gClavicleR[i].SetActive(false);
  3745. gNeck[i].SetActive(false);
  3746. gSpine[i].SetActive(false);
  3747. gSpine0a[i].SetActive(false);
  3748. gSpine1a[i].SetActive(false);
  3749. gSpine1[i].SetActive(false);
  3750. gPelvis[i].SetActive(false);
  3751. }
  3752. if (mMaid[i].isSelect)
  3753. {
  3754. mMaid[i].isSelect = false;
  3755. if (ikMaid != i)
  3756. {
  3757. ikMaid = i;
  3758. ikBui = 5;
  3759. SetIK(maid, i);
  3760. }
  3761. }
  3762. }
  3763. else if (ikMode[i] == 12)
  3764. {
  3765. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3766. {
  3767. mMaid[i].ido = 2;
  3768. mMaid[i].reset = true;
  3769. mMaidC[i].ido = 2;
  3770. mMaidC[i].reset = true;
  3771. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3772. }
  3773. else
  3774. {
  3775. if (!gMaid[i])
  3776. {
  3777. SetIKInit3(i);
  3778. }
  3779. gMaid[i].transform.position =
  3780. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3781. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3782. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3783. gMaid[i].transform.eulerAngles =
  3784. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3785. Spine0a2[i].transform.eulerAngles.y,
  3786. Spine0a2[i].transform.eulerAngles.z + 90f);
  3787. mMaid[i].maid = maid;
  3788. mMaid[i].ido = 2;
  3789. gMaidC[i].transform.position = maid.transform.position;
  3790. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3791. mMaidC[i].maid = maid;
  3792. mMaidC[i].ido = 2;
  3793. if (isCube)
  3794. {
  3795. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3796. gMaidC[i].SetActive(true);
  3797. }
  3798. else
  3799. {
  3800. gMaidC[i].SetActive(false);
  3801. }
  3802. gHandL[i].SetActive(false);
  3803. gArmL[i].SetActive(false);
  3804. gFootL[i].SetActive(false);
  3805. gHizaL[i].SetActive(false);
  3806. gHandR[i].SetActive(false);
  3807. gArmR[i].SetActive(false);
  3808. gFootR[i].SetActive(false);
  3809. gHizaR[i].SetActive(false);
  3810. gClavicleL[i].SetActive(false);
  3811. gClavicleR[i].SetActive(false);
  3812. gNeck[i].SetActive(false);
  3813. gSpine[i].SetActive(false);
  3814. gSpine0a[i].SetActive(false);
  3815. gSpine1a[i].SetActive(false);
  3816. gSpine1[i].SetActive(false);
  3817. gPelvis[i].SetActive(false);
  3818. }
  3819. if (mMaid[i].isSelect)
  3820. {
  3821. mMaid[i].isSelect = false;
  3822. if (ikMaid != i)
  3823. {
  3824. ikMaid = i;
  3825. ikBui = 5;
  3826. SetIK(maid, i);
  3827. }
  3828. }
  3829. }
  3830. else if (ikMode[i] == 10)
  3831. {
  3832. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3833. {
  3834. mMaid[i].ido = 1;
  3835. mMaid[i].reset = true;
  3836. mMaidC[i].ido = 1;
  3837. mMaidC[i].reset = true;
  3838. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3839. }
  3840. else
  3841. {
  3842. if (!gMaid[i])
  3843. {
  3844. SetIKInit3(i);
  3845. }
  3846. gMaid[i].transform.position =
  3847. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3848. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3849. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3850. gMaid[i].transform.eulerAngles =
  3851. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3852. Spine0a2[i].transform.eulerAngles.y,
  3853. Spine0a2[i].transform.eulerAngles.z + 90f);
  3854. mMaid[i].maid = maid;
  3855. mMaid[i].ido = 1;
  3856. gMaidC[i].transform.position = maid.transform.position;
  3857. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3858. mMaidC[i].maid = maid;
  3859. mMaidC[i].ido = 1;
  3860. if (isCube)
  3861. {
  3862. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3863. gMaidC[i].SetActive(true);
  3864. }
  3865. else
  3866. {
  3867. gMaidC[i].SetActive(false);
  3868. }
  3869. gHandL[i].SetActive(false);
  3870. gArmL[i].SetActive(false);
  3871. gFootL[i].SetActive(false);
  3872. gHizaL[i].SetActive(false);
  3873. gHandR[i].SetActive(false);
  3874. gArmR[i].SetActive(false);
  3875. gFootR[i].SetActive(false);
  3876. gHizaR[i].SetActive(false);
  3877. gClavicleL[i].SetActive(false);
  3878. gClavicleR[i].SetActive(false);
  3879. gNeck[i].SetActive(false);
  3880. gSpine[i].SetActive(false);
  3881. gSpine0a[i].SetActive(false);
  3882. gSpine1a[i].SetActive(false);
  3883. gSpine1[i].SetActive(false);
  3884. gPelvis[i].SetActive(false);
  3885. }
  3886. if (mMaid[i].isSelect)
  3887. {
  3888. mMaid[i].isSelect = false;
  3889. if (ikMaid != i)
  3890. {
  3891. ikMaid = i;
  3892. ikBui = 5;
  3893. SetIK(maid, i);
  3894. }
  3895. }
  3896. }
  3897. else if (ikMode[i] == 9)
  3898. {
  3899. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3900. {
  3901. mMaid[i].ido = 4;
  3902. mMaid[i].reset = true;
  3903. mMaidC[i].ido = 4;
  3904. mMaidC[i].reset = true;
  3905. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3906. }
  3907. else
  3908. {
  3909. if (!gMaid[i])
  3910. {
  3911. SetIKInit3(i);
  3912. }
  3913. gMaid[i].transform.position =
  3914. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3915. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3916. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3917. gMaid[i].transform.eulerAngles =
  3918. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3919. Spine0a2[i].transform.eulerAngles.y,
  3920. Spine0a2[i].transform.eulerAngles.z + 90f);
  3921. mMaid[i].maid = maid;
  3922. mMaid[i].ido = 4;
  3923. gMaidC[i].transform.position = maid.transform.position;
  3924. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3925. mMaidC[i].maid = maid;
  3926. mMaidC[i].ido = 4;
  3927. if (isCube)
  3928. {
  3929. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3930. gMaidC[i].SetActive(true);
  3931. }
  3932. else
  3933. {
  3934. gMaidC[i].SetActive(false);
  3935. }
  3936. gHandL[i].SetActive(false);
  3937. gArmL[i].SetActive(false);
  3938. gFootL[i].SetActive(false);
  3939. gHizaL[i].SetActive(false);
  3940. gHandR[i].SetActive(false);
  3941. gArmR[i].SetActive(false);
  3942. gFootR[i].SetActive(false);
  3943. gHizaR[i].SetActive(false);
  3944. gClavicleL[i].SetActive(false);
  3945. gClavicleR[i].SetActive(false);
  3946. gNeck[i].SetActive(false);
  3947. gSpine[i].SetActive(false);
  3948. gSpine0a[i].SetActive(false);
  3949. gSpine1a[i].SetActive(false);
  3950. gSpine1[i].SetActive(false);
  3951. gPelvis[i].SetActive(false);
  3952. }
  3953. if (mMaid[i].isSelect)
  3954. {
  3955. mMaid[i].isSelect = false;
  3956. if (ikMaid != i)
  3957. {
  3958. ikMaid = i;
  3959. ikBui = 5;
  3960. SetIK(maid, i);
  3961. }
  3962. }
  3963. }
  3964. else if (ikMode[i] == 14)
  3965. {
  3966. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3967. {
  3968. mMaid[i].ido = 6;
  3969. mMaid[i].reset = true;
  3970. mMaidC[i].ido = 6;
  3971. mMaidC[i].reset = true;
  3972. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3973. }
  3974. else
  3975. {
  3976. if (!gMaid[i])
  3977. {
  3978. SetIKInit3(i);
  3979. }
  3980. gMaid[i].transform.position =
  3981. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3982. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3983. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3984. gMaid[i].transform.eulerAngles =
  3985. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3986. Spine0a2[i].transform.eulerAngles.y,
  3987. Spine0a2[i].transform.eulerAngles.z + 90f);
  3988. mMaid[i].maid = maid;
  3989. mMaid[i].ido = 6;
  3990. gMaidC[i].transform.position = maid.transform.position;
  3991. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3992. mMaidC[i].maid = maid;
  3993. mMaidC[i].ido = 6;
  3994. if (isCube)
  3995. {
  3996. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3997. gMaidC[i].SetActive(true);
  3998. }
  3999. else
  4000. {
  4001. gMaidC[i].SetActive(false);
  4002. }
  4003. gHandL[i].SetActive(false);
  4004. gArmL[i].SetActive(false);
  4005. gFootL[i].SetActive(false);
  4006. gHizaL[i].SetActive(false);
  4007. gHandR[i].SetActive(false);
  4008. gArmR[i].SetActive(false);
  4009. gFootR[i].SetActive(false);
  4010. gHizaR[i].SetActive(false);
  4011. gClavicleL[i].SetActive(false);
  4012. gClavicleR[i].SetActive(false);
  4013. gNeck[i].SetActive(false);
  4014. gSpine[i].SetActive(false);
  4015. gSpine0a[i].SetActive(false);
  4016. gSpine1a[i].SetActive(false);
  4017. gSpine1[i].SetActive(false);
  4018. gPelvis[i].SetActive(false);
  4019. }
  4020. if (mMaid[i].isSelect)
  4021. {
  4022. mMaid[i].isSelect = false;
  4023. if (ikMaid != i)
  4024. {
  4025. ikMaid = i;
  4026. ikBui = 5;
  4027. SetIK(maid, i);
  4028. }
  4029. }
  4030. }
  4031. else if (ikMode[i] == 6)
  4032. {
  4033. if (!gFinger[i, 0])
  4034. {
  4035. SetIKInit2(i);
  4036. }
  4037. Destroy(gMaid[i]);
  4038. Destroy(gMaidC[i]);
  4039. Destroy(gHead[i]);
  4040. Destroy(gJotai[i]);
  4041. Destroy(gKahuku[i]);
  4042. gHandL[i].SetActive(false);
  4043. gArmL[i].SetActive(false);
  4044. gFootL[i].SetActive(false);
  4045. gHizaL[i].SetActive(false);
  4046. gHandR[i].SetActive(false);
  4047. gArmR[i].SetActive(false);
  4048. gFootR[i].SetActive(false);
  4049. gHizaR[i].SetActive(false);
  4050. gClavicleL[i].SetActive(false);
  4051. gClavicleR[i].SetActive(false);
  4052. gNeck[i].SetActive(false);
  4053. gSpine[i].SetActive(false);
  4054. gSpine0a[i].SetActive(false);
  4055. gSpine1a[i].SetActive(false);
  4056. gSpine1[i].SetActive(false);
  4057. gPelvis[i].SetActive(false);
  4058. for (int j = 0; j < 10; j++)
  4059. {
  4060. mFinger[i, j * 3 + 2].maid = maid;
  4061. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4062. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4063. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4064. mFinger[i, j * 3 + 2].ido = 12;
  4065. if (j == 0 || j == 5)
  4066. {
  4067. mFinger[i, j * 3 + 2].ido = 15;
  4068. }
  4069. mFinger[i, j * 3 + 1].maid = maid;
  4070. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4072. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4073. mFinger[i, j * 3 + 1].ido = 11;
  4074. if (j == 0 || j == 5)
  4075. {
  4076. mFinger[i, j * 3 + 1].ido = 14;
  4077. }
  4078. mFinger[i, j * 3].maid = maid;
  4079. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4081. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4082. mFinger[i, j * 3].ido = 13;
  4083. if (j == 0 || j == 5)
  4084. {
  4085. mFinger[i, j * 3].ido = 0;
  4086. }
  4087. gFinger[i, j * 3 + 2].SetActive(false);
  4088. gFinger[i, j * 3 + 1].SetActive(false);
  4089. gFinger[i, j * 3].SetActive(true);
  4090. gFinger[i, j * 3].SetActive(true);
  4091. mFinger[i, j * 3].ido = 16;
  4092. if (ikModeOld[i] != 6)
  4093. {
  4094. mFinger[i, j * 3].reset = true;
  4095. }
  4096. gFinger[i, j * 3 + 2].transform.position =
  4097. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4098. + Finger[i, j * 4 + 2].position) / 3f;
  4099. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4100. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4101. if (mFinger[i, j * 3 + 2].isStop)
  4102. {
  4103. isStop[i] = true;
  4104. isLock[i] = true;
  4105. mFinger[i, j * 3 + 2].isStop = false;
  4106. }
  4107. if (mFinger[i, j * 3 + 1].isStop)
  4108. {
  4109. isStop[i] = true;
  4110. isLock[i] = true;
  4111. mFinger[i, j * 3 + 1].isStop = false;
  4112. }
  4113. if (mFinger[i, j * 3].isStop)
  4114. {
  4115. isStop[i] = true;
  4116. isLock[i] = true;
  4117. mFinger[i, j * 3].isStop = false;
  4118. }
  4119. }
  4120. for (int j = 0; j < 6; j++)
  4121. {
  4122. mFinger2[i, j * 2 + 1].maid = maid;
  4123. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4124. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4125. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4126. mFinger2[i, j * 2 + 1].ido = 0;
  4127. mFinger2[i, j * 2].maid = maid;
  4128. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4129. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4130. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4131. mFinger2[i, j * 2].ido = 0;
  4132. gFinger2[i, j * 2 + 1].SetActive(false);
  4133. gFinger2[i, j * 2].SetActive(false);
  4134. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4135. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4136. if (mFinger2[i, j * 2 + 1].isStop)
  4137. {
  4138. isStop[i] = true;
  4139. isLock[i] = true;
  4140. mFinger2[i, j * 2 + 1].isStop = false;
  4141. }
  4142. if (mFinger2[i, j * 2].isStop)
  4143. {
  4144. isStop[i] = true;
  4145. isLock[i] = true;
  4146. mFinger2[i, j * 2].isStop = false;
  4147. }
  4148. }
  4149. }
  4150. else if (ikMode[i] == 4)
  4151. {
  4152. if (!gFinger[i, 0])
  4153. {
  4154. SetIKInit2(i);
  4155. }
  4156. Destroy(gMaid[i]);
  4157. Destroy(gMaidC[i]);
  4158. Destroy(gHead[i]);
  4159. Destroy(gJotai[i]);
  4160. Destroy(gKahuku[i]);
  4161. gHandL[i].SetActive(false);
  4162. gArmL[i].SetActive(false);
  4163. gFootL[i].SetActive(false);
  4164. gHizaL[i].SetActive(false);
  4165. gHandR[i].SetActive(false);
  4166. gArmR[i].SetActive(false);
  4167. gFootR[i].SetActive(false);
  4168. gHizaR[i].SetActive(false);
  4169. gClavicleL[i].SetActive(false);
  4170. gClavicleR[i].SetActive(false);
  4171. gNeck[i].SetActive(false);
  4172. gSpine[i].SetActive(false);
  4173. gSpine0a[i].SetActive(false);
  4174. gSpine1a[i].SetActive(false);
  4175. gSpine1[i].SetActive(false);
  4176. gPelvis[i].SetActive(false);
  4177. for (int j = 0; j < 10; j++)
  4178. {
  4179. mFinger[i, j * 3 + 2].maid = maid;
  4180. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4181. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4182. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4183. mFinger[i, j * 3 + 2].ido = 12;
  4184. mFinger[i, j * 3 + 2].onFlg = true;
  4185. if (j == 0 || j == 5)
  4186. {
  4187. mFinger[i, j * 3 + 2].ido = 15;
  4188. }
  4189. mFinger[i, j * 3 + 1].maid = maid;
  4190. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4192. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4193. mFinger[i, j * 3 + 1].ido = 11;
  4194. mFinger[i, j * 3 + 1].onFlg = true;
  4195. if (j == 0 || j == 5)
  4196. {
  4197. mFinger[i, j * 3 + 1].ido = 14;
  4198. }
  4199. mFinger[i, j * 3].maid = maid;
  4200. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4202. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4203. mFinger[i, j * 3].ido = 13;
  4204. mFinger[i, j * 3].onFlg = true;
  4205. if (j == 0 || j == 5)
  4206. {
  4207. mFinger[i, j * 3].ido = 0;
  4208. }
  4209. if (ikModeOld[i] != 4)
  4210. {
  4211. mFinger[i, j * 3].reset = true;
  4212. }
  4213. gFinger[i, j * 3 + 2].SetActive(true);
  4214. gFinger[i, j * 3 + 1].SetActive(true);
  4215. gFinger[i, j * 3].SetActive(true);
  4216. gFinger[i, j * 3 + 2].transform.position =
  4217. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4218. + Finger[i, j * 4 + 2].position) / 3f;
  4219. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4220. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4221. if (mFinger[i, j * 3 + 2].isStop)
  4222. {
  4223. isStop[i] = true;
  4224. isLock[i] = true;
  4225. mFinger[i, j * 3 + 2].isStop = false;
  4226. }
  4227. if (mFinger[i, j * 3 + 1].isStop)
  4228. {
  4229. isStop[i] = true;
  4230. isLock[i] = true;
  4231. mFinger[i, j * 3 + 1].isStop = false;
  4232. }
  4233. if (mFinger[i, j * 3].isStop)
  4234. {
  4235. isStop[i] = true;
  4236. isLock[i] = true;
  4237. mFinger[i, j * 3].isStop = false;
  4238. }
  4239. }
  4240. for (int j = 0; j < 6; j++)
  4241. {
  4242. mFinger2[i, j * 2 + 1].maid = maid;
  4243. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4244. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4245. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4246. mFinger2[i, j * 2 + 1].ido = 17;
  4247. mFinger2[i, j * 2].maid = maid;
  4248. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4249. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4250. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4251. mFinger2[i, j * 2].ido = 0;
  4252. gFinger2[i, j * 2 + 1].SetActive(true);
  4253. gFinger2[i, j * 2].SetActive(true);
  4254. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4255. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4256. if (mFinger2[i, j * 2 + 1].isStop)
  4257. {
  4258. isStop[i] = true;
  4259. isLock[i] = true;
  4260. mFinger2[i, j * 2 + 1].isStop = false;
  4261. }
  4262. if (mFinger2[i, j * 2].isStop)
  4263. {
  4264. isStop[i] = true;
  4265. isLock[i] = true;
  4266. mFinger2[i, j * 2].isStop = false;
  4267. }
  4268. }
  4269. }
  4270. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4271. {
  4272. mHandL[i].ido = 0;
  4273. mHandR[i].ido = 0;
  4274. mFootL[i].ido = 0;
  4275. mFootR[i].ido = 0;
  4276. mHizaL[i].ido = 0;
  4277. mHizaR[i].ido = 0;
  4278. mHandL[i].reset = true;
  4279. mHandR[i].reset = true;
  4280. mFootL[i].reset = true;
  4281. mFootR[i].reset = true;
  4282. mHizaL[i].reset = true;
  4283. mHizaR[i].reset = true;
  4284. }
  4285. else
  4286. {
  4287. if (gFinger[i, 0])
  4288. {
  4289. for (int j = 0; j < 30; j++)
  4290. {
  4291. gFinger[i, j].SetActive(false);
  4292. }
  4293. for (int j = 0; j < 12; j++)
  4294. {
  4295. gFinger2[i, j].SetActive(false);
  4296. }
  4297. }
  4298. Destroy(gHead[i]);
  4299. Destroy(gJotai[i]);
  4300. Destroy(gKahuku[i]);
  4301. Destroy(gIKHandL[i]);
  4302. Destroy(gIKHandR[i]);
  4303. Destroy(gIKMuneL[i]);
  4304. Destroy(gIKMuneR[i]);
  4305. Destroy(gHead2[i]);
  4306. Destroy(gMaid2[i]);
  4307. gHandL[i].SetActive(true);
  4308. gArmL[i].SetActive(true);
  4309. gFootL[i].SetActive(true);
  4310. gHizaL[i].SetActive(true);
  4311. gHandR[i].SetActive(true);
  4312. gArmR[i].SetActive(true);
  4313. gFootR[i].SetActive(true);
  4314. gHizaR[i].SetActive(true);
  4315. mHandL[i].ido = 0;
  4316. mHandR[i].ido = 0;
  4317. mFootL[i].ido = 0;
  4318. mFootR[i].ido = 0;
  4319. gClavicleL[i].SetActive(true);
  4320. gClavicleR[i].SetActive(true);
  4321. }
  4322. if (!isIK[i])
  4323. {
  4324. gHandL[i].SetActive(false);
  4325. gArmL[i].SetActive(false);
  4326. gFootL[i].SetActive(false);
  4327. gHizaL[i].SetActive(false);
  4328. gHandR[i].SetActive(false);
  4329. gArmR[i].SetActive(false);
  4330. gFootR[i].SetActive(false);
  4331. gHizaR[i].SetActive(false);
  4332. gClavicleL[i].SetActive(false);
  4333. gClavicleR[i].SetActive(false);
  4334. gNeck[i].SetActive(false);
  4335. gSpine[i].SetActive(false);
  4336. gSpine0a[i].SetActive(false);
  4337. gSpine1a[i].SetActive(false);
  4338. gSpine1[i].SetActive(false);
  4339. gPelvis[i].SetActive(false);
  4340. }
  4341. if (isIK[i])
  4342. {
  4343. mHandL[i].maid = maid;
  4344. mHandL[i].HandL = HandL1[i];
  4345. if (ikMode[i] == 2)
  4346. {
  4347. mHandL[i].UpperArmL = ForearmL1[i];
  4348. }
  4349. else
  4350. {
  4351. mHandL[i].UpperArmL = UpperArmL1[i];
  4352. if (ikModeOld[i] == 2 && isLock[i])
  4353. {
  4354. mHandL[i].OnMouseDown();
  4355. mHandL[i].isSelect = false;
  4356. }
  4357. }
  4358. mHandL[i].ForearmL = ForearmL1[i];
  4359. mArmL[i].maid = maid;
  4360. mArmL[i].HandL = ForearmL1[i];
  4361. mArmL[i].UpperArmL = UpperArmL1[i];
  4362. mArmL[i].ForearmL = UpperArmL1[i];
  4363. mArmL[i].onFlg = true;
  4364. if (mArmL[i].onFlg2)
  4365. {
  4366. mArmL[i].onFlg2 = false;
  4367. mHandL[i].initFlg = false;
  4368. }
  4369. if (ikMode[i] == 2)
  4370. {
  4371. mHandL[i].initFlg = false;
  4372. mHandR[i].initFlg = false;
  4373. mFootL[i].initFlg = false;
  4374. mFootR[i].initFlg = false;
  4375. mHandL[i].onFlg = true;
  4376. mHandR[i].onFlg = true;
  4377. mFootL[i].onFlg = true;
  4378. mFootR[i].onFlg = true;
  4379. }
  4380. else
  4381. {
  4382. mHandL[i].onFlg = false;
  4383. mHandR[i].onFlg = false;
  4384. mFootL[i].onFlg = false;
  4385. mFootR[i].onFlg = false;
  4386. }
  4387. gHandL[i].transform.position = HandL1[i].position;
  4388. gArmL[i].transform.position = ForearmL1[i].position;
  4389. mClavicleL[i].maid = maid;
  4390. mClavicleL[i].HandL = UpperArmL1[i];
  4391. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4392. mClavicleL[i].ForearmL = ClavicleL1[i];
  4393. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4394. if (mHandL[i].isStop)
  4395. {
  4396. isStop[i] = true;
  4397. isLock[i] = true;
  4398. mHandL[i].isStop = false;
  4399. }
  4400. if (mArmL[i].isStop)
  4401. {
  4402. isStop[i] = true;
  4403. isLock[i] = true;
  4404. mArmL[i].isStop = false;
  4405. }
  4406. if (mClavicleL[i].isStop)
  4407. {
  4408. isStop[i] = true;
  4409. isLock[i] = true;
  4410. mClavicleL[i].isStop = false;
  4411. }
  4412. mHandR[i].maid = maid;
  4413. mHandR[i].HandL = HandR1[i];
  4414. if (ikMode[i] == 2)
  4415. {
  4416. mHandR[i].UpperArmL = ForearmR1[i];
  4417. }
  4418. else
  4419. {
  4420. mHandR[i].UpperArmL = UpperArmR1[i];
  4421. if (ikModeOld[i] == 2 && isLock[i])
  4422. {
  4423. mHandR[i].OnMouseDown();
  4424. mHandR[i].isSelect = false;
  4425. }
  4426. }
  4427. mHandR[i].ForearmL = ForearmR1[i];
  4428. mArmR[i].maid = maid;
  4429. mArmR[i].HandL = ForearmR1[i];
  4430. mArmR[i].UpperArmL = UpperArmR1[i];
  4431. mArmR[i].ForearmL = UpperArmR1[i];
  4432. mArmR[i].onFlg = true;
  4433. if (mArmR[i].onFlg2)
  4434. {
  4435. mArmR[i].onFlg2 = false;
  4436. mHandR[i].initFlg = false;
  4437. }
  4438. gHandR[i].transform.position = HandR1[i].position;
  4439. gArmR[i].transform.position = ForearmR1[i].position;
  4440. mClavicleR[i].maid = maid;
  4441. mClavicleR[i].HandL = UpperArmR1[i];
  4442. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4443. mClavicleR[i].ForearmL = ClavicleR1[i];
  4444. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4445. if (mHandR[i].isStop)
  4446. {
  4447. isStop[i] = true;
  4448. isLock[i] = true;
  4449. mHandR[i].isStop = false;
  4450. }
  4451. if (mArmR[i].isStop)
  4452. {
  4453. isStop[i] = true;
  4454. isLock[i] = true;
  4455. mArmR[i].isStop = false;
  4456. }
  4457. if (mClavicleL[i].isStop)
  4458. {
  4459. isStop[i] = true;
  4460. isLock[i] = true;
  4461. mClavicleL[i].isStop = false;
  4462. }
  4463. mFootL[i].maid = maid;
  4464. mFootL[i].HandL = HandL2[i];
  4465. if (ikMode[i] == 2)
  4466. {
  4467. mFootL[i].UpperArmL = ForearmL2[i];
  4468. }
  4469. else
  4470. {
  4471. mFootL[i].UpperArmL = UpperArmL2[i];
  4472. if (ikModeOld[i] == 2 && isLock[i])
  4473. {
  4474. mFootL[i].OnMouseDown();
  4475. mFootL[i].isSelect = false;
  4476. }
  4477. }
  4478. mFootL[i].ForearmL = ForearmL2[i];
  4479. mHizaL[i].maid = maid;
  4480. mHizaL[i].HandL = ForearmL2[i];
  4481. mHizaL[i].UpperArmL = UpperArmL2[i];
  4482. mHizaL[i].ForearmL = UpperArmL2[i];
  4483. mHizaL[i].onFlg = true;
  4484. if (mHizaL[i].onFlg2)
  4485. {
  4486. mHizaL[i].onFlg2 = false;
  4487. mFootL[i].initFlg = false;
  4488. }
  4489. gFootL[i].transform.position = HandL2[i].position;
  4490. gHizaL[i].transform.position = ForearmL2[i].position;
  4491. if (mFootL[i].isStop)
  4492. {
  4493. isStop[i] = true;
  4494. isLock[i] = true;
  4495. mFootL[i].isStop = false;
  4496. }
  4497. if (mHizaL[i].isStop)
  4498. {
  4499. isStop[i] = true;
  4500. isLock[i] = true;
  4501. mHizaL[i].isStop = false;
  4502. }
  4503. mFootR[i].maid = maid;
  4504. mFootR[i].HandL = HandR2[i];
  4505. if (ikMode[i] == 2)
  4506. {
  4507. mFootR[i].UpperArmL = ForearmR2[i];
  4508. }
  4509. else
  4510. {
  4511. mFootR[i].UpperArmL = UpperArmR2[i];
  4512. if (ikModeOld[i] == 2 && isLock[i])
  4513. {
  4514. mFootR[i].OnMouseDown();
  4515. mFootR[i].isSelect = false;
  4516. }
  4517. }
  4518. mFootR[i].ForearmL = ForearmR2[i];
  4519. mHizaR[i].maid = maid;
  4520. mHizaR[i].HandL = ForearmR2[i];
  4521. mHizaR[i].UpperArmL = UpperArmR2[i];
  4522. mHizaR[i].ForearmL = UpperArmR2[i];
  4523. mHizaR[i].onFlg = true;
  4524. if (mHizaR[i].onFlg2)
  4525. {
  4526. mHizaR[i].onFlg2 = false;
  4527. mFootR[i].initFlg = false;
  4528. }
  4529. gFootR[i].transform.position = HandR2[i].position;
  4530. gHizaR[i].transform.position = ForearmR2[i].position;
  4531. if (mFootR[i].isStop)
  4532. {
  4533. isStop[i] = true;
  4534. isLock[i] = true;
  4535. mFootR[i].isStop = false;
  4536. }
  4537. if (mHizaR[i].isStop)
  4538. {
  4539. isStop[i] = true;
  4540. isLock[i] = true;
  4541. mHizaR[i].isStop = false;
  4542. }
  4543. bool flag13 = false;
  4544. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4545. || ikModeOld[i] == 14)
  4546. {
  4547. flag13 = true;
  4548. }
  4549. if (isBone[i])
  4550. {
  4551. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4552. || isChange[i])
  4553. {
  4554. float gizmoSizeSpine = 0.2f;
  4555. gizmoNeck[i].Visible = false;
  4556. gizmoFootL[i].Visible = false;
  4557. gizmoHandR[i].Visible = false;
  4558. gizmoHandL[i].Visible = false;
  4559. gizmoFootR[i].Visible = false;
  4560. gizmoPelvis[i].Visible = false;
  4561. if (ikMode[i] == 2 || ikMode[i] == 1)
  4562. {
  4563. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4564. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4565. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4566. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4567. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4568. if (ikMode[i] == 2)
  4569. {
  4570. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4571. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4572. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4573. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4574. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4575. if (isDragging)
  4576. {
  4577. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4578. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4579. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4580. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4581. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4582. }
  4583. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4584. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4585. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4586. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4587. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4588. gizmoNeck[i].Visible = true;
  4589. gizmoHandL[i].Visible = true;
  4590. gizmoHandR[i].Visible = true;
  4591. gizmoFootL[i].Visible = true;
  4592. gizmoFootR[i].Visible = true;
  4593. gNeck[i].SetActive(false);
  4594. gSpine[i].SetActive(false);
  4595. gSpine0a[i].SetActive(false);
  4596. gSpine1[i].SetActive(false);
  4597. gSpine1a[i].SetActive(false);
  4598. }
  4599. else
  4600. {
  4601. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4602. if (isDragging)
  4603. {
  4604. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4605. }
  4606. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4607. gizmoPelvis[i].Visible = true;
  4608. gPelvis[i].SetActive(false);
  4609. }
  4610. if (!isLock[i])
  4611. {
  4612. if (isDragging)
  4613. {
  4614. isStop[i] = true;
  4615. isLock[i] = true;
  4616. }
  4617. }
  4618. }
  4619. }
  4620. else
  4621. {
  4622. float gizmoSizeLimb = 0.25f;
  4623. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4624. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4625. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4626. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4627. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4628. if (ikMode[i] == 3)
  4629. {
  4630. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4631. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4632. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4633. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4634. if (isDragging)
  4635. {
  4636. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4637. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4638. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4639. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4640. }
  4641. else
  4642. {
  4643. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4644. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4645. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4646. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4647. }
  4648. }
  4649. else if (ikMode[i] == 5)
  4650. {
  4651. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4652. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4653. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4654. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4655. if (isDragging)
  4656. {
  4657. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4658. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4659. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4660. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4661. flag13 = true;
  4662. }
  4663. else
  4664. {
  4665. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4666. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4667. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4668. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4669. }
  4670. }
  4671. else if (ikMode[i] == 8)
  4672. {
  4673. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4674. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4675. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4676. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4677. if (isDragging)
  4678. {
  4679. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4680. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4681. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4682. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4683. flag13 = true;
  4684. }
  4685. else
  4686. {
  4687. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4688. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4689. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4690. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4691. }
  4692. }
  4693. gizmoHandL[i].Visible = true;
  4694. gizmoHandR[i].Visible = true;
  4695. gizmoFootL[i].Visible = true;
  4696. gizmoFootR[i].Visible = true;
  4697. gHandL[i].SetActive(false);
  4698. gFootL[i].SetActive(false);
  4699. gHandR[i].SetActive(false);
  4700. gFootR[i].SetActive(false);
  4701. if (!isLock[i])
  4702. {
  4703. if (isDragging)
  4704. {
  4705. isStop[i] = true;
  4706. isLock[i] = true;
  4707. }
  4708. }
  4709. }
  4710. if (isChange[i])
  4711. {
  4712. isChange[i] = false;
  4713. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4714. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4715. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4716. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4717. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4718. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4719. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4720. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4721. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gHandL[i].GetComponent<Renderer>().enabled = true;
  4724. gHandR[i].GetComponent<Renderer>().enabled = true;
  4725. gArmL[i].GetComponent<Renderer>().enabled = true;
  4726. gArmR[i].GetComponent<Renderer>().enabled = true;
  4727. gFootL[i].GetComponent<Renderer>().enabled = true;
  4728. gFootR[i].GetComponent<Renderer>().enabled = true;
  4729. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4730. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4731. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4732. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4733. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4734. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4735. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4736. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4737. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4738. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4739. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4740. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4741. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4742. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4743. }
  4744. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4745. {
  4746. mNeck[i].ido = 1;
  4747. mNeck[i].reset = true;
  4748. mSpine[i].ido = 1;
  4749. mSpine[i].reset = true;
  4750. mSpine0a[i].ido = 1;
  4751. mSpine0a[i].reset = true;
  4752. mSpine1a[i].ido = 1;
  4753. mSpine1a[i].reset = true;
  4754. mSpine1[i].ido = 1;
  4755. mSpine1[i].reset = true;
  4756. mPelvis[i].ido = 1;
  4757. mPelvis[i].reset = true;
  4758. }
  4759. else if (ikMode[i] == 0)
  4760. {
  4761. gNeck[i].SetActive(true);
  4762. gSpine[i].SetActive(true);
  4763. gSpine0a[i].SetActive(true);
  4764. gSpine1a[i].SetActive(true);
  4765. gSpine1[i].SetActive(true);
  4766. gPelvis[i].SetActive(true);
  4767. if (mNeck[i].isHead)
  4768. {
  4769. mNeck[i].isHead = false;
  4770. isLookn[i] = isLook[i];
  4771. isLook[i] = !isLook[i];
  4772. }
  4773. mNeck[i].maid = maid;
  4774. mNeck[i].head = Neck[i];
  4775. mNeck[i].no = i;
  4776. mNeck[i].ido = 1;
  4777. gNeck[i].transform.position = Neck[i].position;
  4778. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4779. mSpine[i].maid = maid;
  4780. mSpine[i].head = Spine2[i];
  4781. mSpine[i].no = i;
  4782. mSpine[i].ido = 1;
  4783. gSpine[i].transform.position = Spine2[i].position;
  4784. gSpine[i].transform.eulerAngles =
  4785. new Vector3(Spine2[i].localEulerAngles.z,
  4786. Spine2[i].localEulerAngles.y,
  4787. Spine2[i].localEulerAngles.x);
  4788. mSpine0a[i].maid = maid;
  4789. mSpine0a[i].head = Spine0a2[i];
  4790. mSpine0a[i].no = i;
  4791. mSpine0a[i].ido = 1;
  4792. gSpine0a[i].transform.position = Spine0a2[i].position;
  4793. gSpine0a[i].transform.eulerAngles =
  4794. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4795. Spine0a2[i].localEulerAngles.x,
  4796. Spine0a2[i].localEulerAngles.y);
  4797. mSpine1a[i].maid = maid;
  4798. mSpine1a[i].head = Spine1a2[i];
  4799. mSpine1a[i].no = i;
  4800. mSpine1a[i].ido = 1;
  4801. gSpine1a[i].transform.position = Spine1a2[i].position;
  4802. gSpine1a[i].transform.localEulerAngles =
  4803. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4804. Spine1a2[i].localEulerAngles.x,
  4805. Spine1a2[i].localEulerAngles.y);
  4806. mSpine1[i].maid = maid;
  4807. mSpine1[i].head = Spine12[i];
  4808. mSpine1[i].no = i;
  4809. mSpine1[i].ido = 1;
  4810. gSpine1[i].transform.position = Spine12[i].position;
  4811. gSpine1[i].transform.localEulerAngles =
  4812. new Vector3(-Spine12[i].localEulerAngles.z,
  4813. Spine12[i].localEulerAngles.x,
  4814. Spine12[i].localEulerAngles.y);
  4815. mPelvis[i].maid = maid;
  4816. mPelvis[i].head = Pelvis2[i];
  4817. mPelvis[i].no = i;
  4818. mPelvis[i].ido = 1;
  4819. gPelvis[i].transform.position = Pelvis2[i].position;
  4820. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4821. if (mNeck[i].isIdo)
  4822. {
  4823. mNeck[i].isIdo = false;
  4824. isLock[i] = true;
  4825. }
  4826. if (mSpine[i].isIdo)
  4827. {
  4828. mSpine[i].isIdo = false;
  4829. flag13 = true;
  4830. isLock[i] = true;
  4831. }
  4832. if (mSpine0a[i].isIdo)
  4833. {
  4834. mSpine0a[i].isIdo = false;
  4835. flag13 = true;
  4836. isLock[i] = true;
  4837. }
  4838. if (mSpine1a[i].isIdo)
  4839. {
  4840. mSpine1a[i].isIdo = false;
  4841. flag13 = true;
  4842. isLock[i] = true;
  4843. }
  4844. if (mSpine1[i].isIdo)
  4845. {
  4846. mSpine1[i].isIdo = false;
  4847. flag13 = true;
  4848. isLock[i] = true;
  4849. }
  4850. if (mPelvis[i].isIdo)
  4851. {
  4852. mPelvis[i].isIdo = false;
  4853. flag13 = true;
  4854. isLock[i] = true;
  4855. }
  4856. if (mClavicleL[i].isIdo)
  4857. {
  4858. mClavicleL[i].isIdo = false;
  4859. flag13 = true;
  4860. isLock[i] = true;
  4861. }
  4862. if (mClavicleR[i].isIdo)
  4863. {
  4864. mClavicleR[i].isIdo = false;
  4865. flag13 = true;
  4866. isLock[i] = true;
  4867. }
  4868. }
  4869. }
  4870. else if (isChange[i])
  4871. {
  4872. isChange[i] = false;
  4873. gHandL[i].GetComponent<Renderer>().enabled = false;
  4874. gArmL[i].GetComponent<Renderer>().enabled = false;
  4875. gFootL[i].GetComponent<Renderer>().enabled = false;
  4876. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4877. gHandR[i].GetComponent<Renderer>().enabled = false;
  4878. gArmR[i].GetComponent<Renderer>().enabled = false;
  4879. gFootR[i].GetComponent<Renderer>().enabled = false;
  4880. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4881. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4882. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4883. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4884. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4885. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4886. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4887. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4888. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4889. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4890. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4891. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4892. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4893. gNeck[i].SetActive(false);
  4894. gSpine[i].SetActive(false);
  4895. gSpine0a[i].SetActive(false);
  4896. gSpine1a[i].SetActive(false);
  4897. gSpine1[i].SetActive(false);
  4898. gPelvis[i].SetActive(false);
  4899. gizmoHandL[i].Visible = false;
  4900. gizmoHandR[i].Visible = false;
  4901. gizmoFootL[i].Visible = false;
  4902. gizmoFootR[i].Visible = false;
  4903. }
  4904. if (flag13)
  4905. {
  4906. mHandL[i].initFlg = false;
  4907. mHandR[i].initFlg = false;
  4908. mFootL[i].initFlg = false;
  4909. mFootR[i].initFlg = false;
  4910. }
  4911. }
  4912. ikModeOld[i] = ikMode[i];
  4913. bool flag14 = false;
  4914. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4915. {
  4916. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4917. {
  4918. for (int k = 0; k < 10; k++)
  4919. {
  4920. maid.transform.RotateAround(maid.transform.position,
  4921. Vector3.right,
  4922. -maid.transform.rotation.eulerAngles.x);
  4923. maid.transform.RotateAround(maid.transform.position,
  4924. Vector3.forward,
  4925. -maid.transform.rotation.eulerAngles.z);
  4926. }
  4927. flag14 = true;
  4928. }
  4929. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4930. {
  4931. maid.transform.RotateAround(maid.transform.position,
  4932. new Vector3(vector3.x, 0f, vector3.z),
  4933. 0.3f);
  4934. maid.transform.RotateAround(maid.transform.position,
  4935. new Vector3(vector2.x, 0f, vector2.z),
  4936. 0.3f);
  4937. flag14 = true;
  4938. }
  4939. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  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.K) && Input.GetKey(KeyCode.J))
  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.L))
  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.I))
  4970. {
  4971. maid.transform.RotateAround(maid.transform.position,
  4972. new Vector3(vector3.x, 0f, vector3.z),
  4973. 0.4f);
  4974. flag14 = true;
  4975. }
  4976. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4977. {
  4978. maid.transform.RotateAround(maid.transform.position,
  4979. new Vector3(vector3.x, 0f, vector3.z),
  4980. -0.4f);
  4981. flag14 = true;
  4982. }
  4983. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4984. {
  4985. maid.transform.RotateAround(maid.transform.position,
  4986. new Vector3(vector2.x, 0f, vector2.z),
  4987. 0.4f);
  4988. flag14 = true;
  4989. }
  4990. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4991. {
  4992. maid.transform.RotateAround(maid.transform.position,
  4993. new Vector3(vector2.x, 0f, vector2.z),
  4994. -0.4f);
  4995. flag14 = true;
  4996. }
  4997. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4998. {
  4999. maid.body0.transform.localRotation =
  5000. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5001. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5002. flag14 = true;
  5003. }
  5004. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5005. {
  5006. maid.body0.transform.localRotation =
  5007. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5008. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5009. flag14 = true;
  5010. }
  5011. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5012. {
  5013. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5014. flag14 = true;
  5015. }
  5016. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5017. {
  5018. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5019. flag14 = true;
  5020. }
  5021. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5022. {
  5023. Vector3 vector = maid.transform.position;
  5024. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5025. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5026. maid.SetPos(vector);
  5027. flag14 = true;
  5028. }
  5029. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5030. {
  5031. Vector3 vector = maid.transform.position;
  5032. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5033. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5034. maid.SetPos(vector);
  5035. flag14 = true;
  5036. }
  5037. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5038. {
  5039. Vector3 vector = maid.transform.position;
  5040. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5041. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5042. maid.SetPos(vector);
  5043. flag14 = true;
  5044. }
  5045. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5046. {
  5047. Vector3 vector = maid.transform.position;
  5048. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5049. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5050. maid.SetPos(vector);
  5051. flag14 = true;
  5052. }
  5053. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5054. {
  5055. Vector3 vector = maid.transform.position;
  5056. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5057. maid.SetPos(vector);
  5058. flag14 = true;
  5059. }
  5060. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5061. {
  5062. Vector3 vector = maid.transform.position;
  5063. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5064. maid.SetPos(vector);
  5065. flag14 = true;
  5066. }
  5067. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5068. {
  5069. Vector3 vector = maid.transform.position;
  5070. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5071. maid.SetPos(vector);
  5072. flag14 = true;
  5073. }
  5074. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5075. {
  5076. Vector3 vector = maid.transform.position;
  5077. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5078. maid.SetPos(vector);
  5079. flag14 = true;
  5080. }
  5081. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5082. {
  5083. Vector3 vector = maid.transform.position;
  5084. vector.y += 0.0075f * speed;
  5085. maid.SetPos(vector);
  5086. flag14 = true;
  5087. }
  5088. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5089. {
  5090. Vector3 vector = maid.transform.position;
  5091. vector.y -= 0.0075f * speed;
  5092. maid.SetPos(vector);
  5093. flag14 = true;
  5094. }
  5095. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5096. {
  5097. maid.transform.localScale =
  5098. new Vector3(maid.transform.localScale.x * 1.005f,
  5099. maid.transform.localScale.y * 1.005f,
  5100. maid.transform.localScale.z * 1.005f);
  5101. flag14 = true;
  5102. }
  5103. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5104. {
  5105. maid.transform.localScale =
  5106. new Vector3(maid.transform.localScale.x * 0.995f,
  5107. maid.transform.localScale.y * 0.995f,
  5108. maid.transform.localScale.z * 0.995f);
  5109. flag14 = true;
  5110. }
  5111. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5112. {
  5113. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5114. flag14 = true;
  5115. }
  5116. }
  5117. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5118. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5119. && i == ikMaid)
  5120. {
  5121. if (Input.GetKey(KeyCode.I))
  5122. {
  5123. if (ikMode[i] == 0)
  5124. {
  5125. Vector3 vector5 = HandL.position;
  5126. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5127. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5128. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5129. }
  5130. else if (ikMode[i] == 2)
  5131. {
  5132. Vector3 vector5 = HandL.position;
  5133. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5134. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5135. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5136. }
  5137. else if (ikMode[i] == 3)
  5138. {
  5139. if (ikBui == 1 || ikBui == 2)
  5140. {
  5141. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5142. }
  5143. else
  5144. {
  5145. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5146. }
  5147. }
  5148. else if (ikMode[i] == 4)
  5149. {
  5150. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5151. }
  5152. else if (ikMode[i] == 8)
  5153. {
  5154. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5155. }
  5156. else if (ikMode[i] == 6)
  5157. {
  5158. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5159. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5160. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5161. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5162. }
  5163. else if (ikMode[i] == 7)
  5164. {
  5165. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5166. }
  5167. else if (ikMode[i] == 5)
  5168. {
  5169. Vector3 vector5 = ForearmL.position;
  5170. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5171. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5172. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5173. }
  5174. else
  5175. {
  5176. Vector3 vector5 = ForearmL.position;
  5177. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5178. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5179. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5180. }
  5181. isStop[i] = true;
  5182. isLock[i] = true;
  5183. }
  5184. else if (Input.GetKey(KeyCode.K))
  5185. {
  5186. if (ikMode[i] == 0)
  5187. {
  5188. Vector3 vector5 = HandL.position;
  5189. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5190. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5191. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5192. }
  5193. else if (ikMode[i] == 2)
  5194. {
  5195. Vector3 vector5 = HandL.position;
  5196. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5197. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5198. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5199. }
  5200. else if (ikMode[i] == 3)
  5201. {
  5202. if (ikBui == 1 || ikBui == 2)
  5203. {
  5204. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5205. }
  5206. else
  5207. {
  5208. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5209. }
  5210. }
  5211. else if (ikMode[i] == 4)
  5212. {
  5213. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5214. }
  5215. else if (ikMode[i] == 8)
  5216. {
  5217. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5218. }
  5219. else if (ikMode[i] == 6)
  5220. {
  5221. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5222. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5223. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5224. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5225. }
  5226. else if (ikMode[i] == 7)
  5227. {
  5228. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5229. }
  5230. else if (ikMode[i] == 5)
  5231. {
  5232. Vector3 vector5 = ForearmL.position;
  5233. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5234. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5235. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5236. }
  5237. else
  5238. {
  5239. Vector3 vector5 = ForearmL.position;
  5240. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5241. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5242. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5243. }
  5244. isStop[i] = true;
  5245. isLock[i] = true;
  5246. }
  5247. else if (Input.GetKey(KeyCode.J))
  5248. {
  5249. if (ikMode[i] == 0)
  5250. {
  5251. Vector3 vector5 = HandL.position;
  5252. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5253. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5254. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5255. }
  5256. else if (ikMode[i] == 2)
  5257. {
  5258. Vector3 vector5 = HandL.position;
  5259. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5260. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5261. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5262. }
  5263. else if (ikMode[i] == 3)
  5264. {
  5265. if (ikBui == 1 || ikBui == 2)
  5266. {
  5267. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5268. }
  5269. else
  5270. {
  5271. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5272. }
  5273. }
  5274. else if (ikMode[i] == 4)
  5275. {
  5276. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5277. }
  5278. else if (ikMode[i] == 8)
  5279. {
  5280. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5281. }
  5282. else if (ikMode[i] == 6)
  5283. {
  5284. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5285. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5286. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5287. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5288. }
  5289. else if (ikMode[i] == 7)
  5290. {
  5291. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5292. }
  5293. else if (ikMode[i] == 5)
  5294. {
  5295. Vector3 vector5 = ForearmL.position;
  5296. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5297. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5298. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5299. }
  5300. else
  5301. {
  5302. Vector3 vector5 = ForearmL.position;
  5303. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5304. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5305. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5306. }
  5307. isStop[i] = true;
  5308. isLock[i] = true;
  5309. }
  5310. else if (Input.GetKey(KeyCode.L))
  5311. {
  5312. if (ikMode[i] == 0)
  5313. {
  5314. Vector3 vector5 = HandL.position;
  5315. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5316. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5317. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5318. }
  5319. else if (ikMode[i] == 2)
  5320. {
  5321. Vector3 vector5 = HandL.position;
  5322. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5323. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5324. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5325. }
  5326. else if (ikMode[i] == 3)
  5327. {
  5328. if (ikBui == 1 || ikBui == 2)
  5329. {
  5330. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5331. }
  5332. else
  5333. {
  5334. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5335. }
  5336. }
  5337. else if (ikMode[i] == 4)
  5338. {
  5339. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5340. }
  5341. else if (ikMode[i] == 8)
  5342. {
  5343. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5344. }
  5345. else if (ikMode[i] == 6)
  5346. {
  5347. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5348. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5349. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5350. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5351. }
  5352. else if (ikMode[i] == 7)
  5353. {
  5354. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5355. }
  5356. else if (ikMode[i] == 5)
  5357. {
  5358. Vector3 vector5 = ForearmL.position;
  5359. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5360. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5361. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5362. }
  5363. else
  5364. {
  5365. Vector3 vector5 = ForearmL.position;
  5366. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5367. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5368. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5369. }
  5370. isStop[i] = true;
  5371. isLock[i] = true;
  5372. }
  5373. else if (Input.GetKey(KeyCode.U))
  5374. {
  5375. if (ikMode[i] == 3)
  5376. {
  5377. HandL.localRotation =
  5378. Quaternion.Euler(HandL.localEulerAngles)
  5379. * Quaternion.AngleAxis(1f, Vector3.right);
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (ikMode[i] == 4)
  5384. {
  5385. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5386. isStop[i] = true;
  5387. isLock[i] = true;
  5388. }
  5389. else if (ikMode[i] == 8)
  5390. {
  5391. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5392. isStop[i] = true;
  5393. isLock[i] = true;
  5394. }
  5395. else if (ikMode[i] == 6)
  5396. {
  5397. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5398. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5399. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5400. isStop[i] = true;
  5401. isLock[i] = true;
  5402. }
  5403. else if (ikMode[i] == 7)
  5404. {
  5405. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5406. isStop[i] = true;
  5407. isLock[i] = true;
  5408. }
  5409. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5410. {
  5411. UpperArmL.localRotation =
  5412. Quaternion.Euler(UpperArmL.localEulerAngles)
  5413. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5414. isStop[i] = true;
  5415. isLock[i] = true;
  5416. }
  5417. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5418. {
  5419. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5420. isStop[i] = true;
  5421. isLock[i] = true;
  5422. }
  5423. }
  5424. else if (Input.GetKey(KeyCode.O))
  5425. {
  5426. if (ikMode[i] == 3)
  5427. {
  5428. HandL.localRotation =
  5429. Quaternion.Euler(HandL.localEulerAngles)
  5430. * Quaternion.AngleAxis(-1f, Vector3.right);
  5431. isStop[i] = true;
  5432. isLock[i] = true;
  5433. }
  5434. else if (ikMode[i] == 4)
  5435. {
  5436. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5437. isStop[i] = true;
  5438. isLock[i] = true;
  5439. }
  5440. else if (ikMode[i] == 8)
  5441. {
  5442. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5443. isStop[i] = true;
  5444. isLock[i] = true;
  5445. }
  5446. else if (ikMode[i] == 6)
  5447. {
  5448. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5449. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5450. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5451. isStop[i] = true;
  5452. isLock[i] = true;
  5453. }
  5454. else if (ikMode[i] == 7)
  5455. {
  5456. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5457. isStop[i] = true;
  5458. isLock[i] = true;
  5459. }
  5460. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5461. {
  5462. UpperArmL.localRotation =
  5463. Quaternion.Euler(UpperArmL.localEulerAngles)
  5464. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5465. isStop[i] = true;
  5466. isLock[i] = true;
  5467. }
  5468. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5469. {
  5470. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5471. isStop[i] = true;
  5472. isLock[i] = true;
  5473. }
  5474. }
  5475. else if (Input.GetKey(KeyCode.Alpha0))
  5476. {
  5477. if (ikMode[i] == 0)
  5478. {
  5479. Vector3 vector5 = HandL.position;
  5480. vector5.y += 0.005f;
  5481. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5482. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5483. }
  5484. else if (ikMode[i] == 2)
  5485. {
  5486. Vector3 vector5 = HandL.position;
  5487. vector5.y += 0.005f;
  5488. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5489. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5490. }
  5491. else if (ikMode[i] == 5)
  5492. {
  5493. Vector3 vector5 = ForearmL.position;
  5494. vector5.y += 0.0035f;
  5495. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5496. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5497. }
  5498. else
  5499. {
  5500. Vector3 vector5 = ForearmL.position;
  5501. vector5.y += 0.0035f;
  5502. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5503. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5504. }
  5505. isStop[i] = true;
  5506. isLock[i] = true;
  5507. }
  5508. else if (Input.GetKey(KeyCode.P))
  5509. {
  5510. if (ikMode[i] == 0)
  5511. {
  5512. Vector3 vector5 = HandL.position;
  5513. vector5.y -= 0.005f;
  5514. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5515. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5516. }
  5517. else if (ikMode[i] == 2)
  5518. {
  5519. Vector3 vector5 = HandL.position;
  5520. vector5.y -= 0.005f;
  5521. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5522. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5523. }
  5524. else if (ikMode[i] == 5)
  5525. {
  5526. Vector3 vector5 = ForearmL.position;
  5527. vector5.y -= 0.0035f;
  5528. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5529. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5530. }
  5531. else
  5532. {
  5533. Vector3 vector5 = ForearmL.position;
  5534. vector5.y -= 0.0035f;
  5535. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5536. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5537. }
  5538. isStop[i] = true;
  5539. isLock[i] = true;
  5540. }
  5541. }
  5542. }
  5543. }
  5544. }
  5545. }
  5546. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5547. {
  5548. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5549. idoFlg[i] = true;
  5550. }
  5551. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5552. {
  5553. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5554. idoFlg[i] = true;
  5555. }
  5556. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5557. {
  5558. if (!xFlg[i])
  5559. {
  5560. xFlg[i] = true;
  5561. zFlg[i] = false;
  5562. if (maid.status.personal.uniqueName == "Pride")
  5563. {
  5564. string text = "s0_";
  5565. Random random = new Random();
  5566. int num4 = random.Next(10000);
  5567. bool flag7 = false;
  5568. for (int k = 0; k < tunArray.Length; k++)
  5569. {
  5570. if (tunArray[k] == num4)
  5571. {
  5572. flag7 = true;
  5573. break;
  5574. }
  5575. }
  5576. if (!flag7)
  5577. {
  5578. text = text + "0" + num4.ToString() + ".ogg";
  5579. if (GameUty.FileSystem.IsExistentFile(text))
  5580. {
  5581. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5582. }
  5583. }
  5584. }
  5585. if (maid.status.personal.uniqueName == "Cool")
  5586. {
  5587. string text = "s1_";
  5588. Random random = new Random();
  5589. int num4 = random.Next(10000);
  5590. bool flag7 = false;
  5591. for (int k = 0; k < coolArray.Length; k++)
  5592. {
  5593. if (coolArray[k] == num4)
  5594. {
  5595. flag7 = true;
  5596. break;
  5597. }
  5598. }
  5599. if (!flag7)
  5600. {
  5601. text = text + "0" + num4.ToString() + ".ogg";
  5602. if (GameUty.FileSystem.IsExistentFile(text))
  5603. {
  5604. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5605. }
  5606. }
  5607. }
  5608. if (maid.status.personal.uniqueName == "Pure")
  5609. {
  5610. string text = "s2_";
  5611. Random random = new Random();
  5612. int num4 = random.Next(10000);
  5613. bool flag7 = false;
  5614. for (int k = 0; k < pureArray.Length; k++)
  5615. {
  5616. if (pureArray[k] == num4)
  5617. {
  5618. flag7 = true;
  5619. break;
  5620. }
  5621. }
  5622. if (!flag7)
  5623. {
  5624. text = text + "0" + num4.ToString() + ".ogg";
  5625. if (GameUty.FileSystem.IsExistentFile(text))
  5626. {
  5627. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5628. }
  5629. }
  5630. }
  5631. if (maid.status.personal.uniqueName == "Yandere")
  5632. {
  5633. string text = "s3_";
  5634. Random random = new Random();
  5635. int num4 = random.Next(10000);
  5636. bool flag7 = false;
  5637. for (int k = 0; k < yanArray.Length; k++)
  5638. {
  5639. if (yanArray[k] == num4)
  5640. {
  5641. flag7 = true;
  5642. break;
  5643. }
  5644. }
  5645. if (!flag7)
  5646. {
  5647. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5648. if (GameUty.FileSystem.IsExistentFile(text))
  5649. {
  5650. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5651. }
  5652. }
  5653. }
  5654. if (maid.status.personal.uniqueName == "Muku")
  5655. {
  5656. string text = "h0_";
  5657. Random random = new Random();
  5658. int num4 = random.Next(10000);
  5659. bool flag7 = false;
  5660. for (int k = 0; k < h0Array.Length; k++)
  5661. {
  5662. if (h0Array[k] == num4)
  5663. {
  5664. flag7 = true;
  5665. break;
  5666. }
  5667. }
  5668. if (flag7)
  5669. {
  5670. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5671. if (GameUty.FileSystem.IsExistentFile(text))
  5672. {
  5673. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5674. }
  5675. }
  5676. }
  5677. if (maid.status.personal.uniqueName == "Majime")
  5678. {
  5679. string text = "h1_";
  5680. Random random = new Random();
  5681. int num4 = random.Next(10000);
  5682. bool flag7 = false;
  5683. for (int k = 0; k < h1Array.Length; k++)
  5684. {
  5685. if (h1Array[k] == num4)
  5686. {
  5687. flag7 = true;
  5688. break;
  5689. }
  5690. }
  5691. if (flag7)
  5692. {
  5693. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5694. if (GameUty.FileSystem.IsExistentFile(text))
  5695. {
  5696. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5697. }
  5698. }
  5699. }
  5700. if (maid.status.personal.uniqueName == "Rindere")
  5701. {
  5702. string text = "h2_";
  5703. Random random = new Random();
  5704. int num4 = random.Next(10000);
  5705. bool flag7 = false;
  5706. for (int k = 0; k < h2Array.Length; k++)
  5707. {
  5708. if (h2Array[k] == num4)
  5709. {
  5710. flag7 = true;
  5711. break;
  5712. }
  5713. }
  5714. if (flag7)
  5715. {
  5716. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5717. if (GameUty.FileSystem.IsExistentFile(text))
  5718. {
  5719. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5720. }
  5721. }
  5722. }
  5723. }
  5724. else
  5725. {
  5726. xFlg[i] = false;
  5727. maid.AudioMan.Clear();
  5728. }
  5729. idoFlg[i] = true;
  5730. }
  5731. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5732. {
  5733. if (!zFlg[i])
  5734. {
  5735. zFlg[i] = true;
  5736. xFlg[i] = false;
  5737. string text = "";
  5738. if (maid.status.personal.uniqueName == "Pride")
  5739. {
  5740. text = "s0_";
  5741. Random random = new Random();
  5742. int num4 = random.Next(tunArray.Length);
  5743. object obj = text;
  5744. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5745. }
  5746. if (maid.status.personal.uniqueName == "Cool")
  5747. {
  5748. text = "s1_";
  5749. Random random = new Random();
  5750. int num4 = random.Next(coolArray.Length);
  5751. object obj = text;
  5752. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5753. }
  5754. if (maid.status.personal.uniqueName == "Pure")
  5755. {
  5756. text = "s2_";
  5757. Random random = new Random();
  5758. int num4 = random.Next(pureArray.Length);
  5759. object obj = text;
  5760. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5761. }
  5762. if (maid.status.personal.uniqueName == "Yandere")
  5763. {
  5764. text = "s3_";
  5765. Random random = new Random();
  5766. int num4 = random.Next(yanArray.Length);
  5767. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5768. }
  5769. if (maid.status.personal.uniqueName == "Muku")
  5770. {
  5771. text = "h0_";
  5772. Random random = new Random();
  5773. int num4 = random.Next(h0tArray.Length);
  5774. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5775. }
  5776. if (maid.status.personal.uniqueName == "Majime")
  5777. {
  5778. text = "h1_";
  5779. Random random = new Random();
  5780. int num4 = random.Next(h1tArray.Length);
  5781. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5782. }
  5783. if (maid.status.personal.uniqueName == "Rindere")
  5784. {
  5785. text = "h2_";
  5786. Random random = new Random();
  5787. int num4 = random.Next(h2tArray.Length);
  5788. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5789. }
  5790. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5791. }
  5792. else
  5793. {
  5794. zFlg[i] = false;
  5795. maid.AudioMan.Clear();
  5796. }
  5797. idoFlg[i] = true;
  5798. }
  5799. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5800. {
  5801. string text = "";
  5802. if (maid.status.personal.uniqueName == "Pride")
  5803. {
  5804. text = "s0_";
  5805. Random random = new Random();
  5806. int num4 = random.Next(tunArray.Length);
  5807. object obj = text;
  5808. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5809. }
  5810. if (maid.status.personal.uniqueName == "Cool")
  5811. {
  5812. text = "s1_";
  5813. Random random = new Random();
  5814. int num4 = random.Next(coolArray.Length);
  5815. object obj = text;
  5816. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5817. }
  5818. if (maid.status.personal.uniqueName == "Pure")
  5819. {
  5820. text = "s2_";
  5821. Random random = new Random();
  5822. int num4 = random.Next(pureArray.Length);
  5823. object obj = text;
  5824. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5825. }
  5826. if (maid.status.personal.uniqueName == "Yandere")
  5827. {
  5828. text = "s3_";
  5829. Random random = new Random();
  5830. int num4 = random.Next(yanArray.Length);
  5831. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5832. }
  5833. if (maid.status.personal.uniqueName == "Muku")
  5834. {
  5835. text = "h0_";
  5836. Random random = new Random();
  5837. int num4 = random.Next(h0tArray.Length);
  5838. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5839. }
  5840. if (maid.status.personal.uniqueName == "Majime")
  5841. {
  5842. text = "h1_";
  5843. Random random = new Random();
  5844. int num4 = random.Next(h1tArray.Length);
  5845. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5846. }
  5847. if (maid.status.personal.uniqueName == "Rindere")
  5848. {
  5849. text = "h2_";
  5850. Random random = new Random();
  5851. int num4 = random.Next(h2tArray.Length);
  5852. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5853. }
  5854. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5855. idoFlg[i] = true;
  5856. }
  5857. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5858. {
  5859. if (maid.status.personal.uniqueName == "Pride")
  5860. {
  5861. string text = "s0_";
  5862. Random random = new Random();
  5863. int num4 = random.Next(10000);
  5864. bool flag7 = false;
  5865. for (int k = 0; k < tunArray.Length; k++)
  5866. {
  5867. if (tunArray[k] == num4)
  5868. {
  5869. flag7 = true;
  5870. break;
  5871. }
  5872. }
  5873. if (!flag7)
  5874. {
  5875. text = text + "0" + num4.ToString() + ".ogg";
  5876. if (GameUty.FileSystem.IsExistentFile(text))
  5877. {
  5878. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5879. }
  5880. }
  5881. }
  5882. if (maid.status.personal.uniqueName == "Cool")
  5883. {
  5884. string text = "s1_";
  5885. Random random = new Random();
  5886. int num4 = random.Next(10000);
  5887. bool flag7 = false;
  5888. for (int k = 0; k < coolArray.Length; k++)
  5889. {
  5890. if (coolArray[k] == num4)
  5891. {
  5892. flag7 = true;
  5893. break;
  5894. }
  5895. }
  5896. if (!flag7)
  5897. {
  5898. text = text + "0" + num4.ToString() + ".ogg";
  5899. if (GameUty.FileSystem.IsExistentFile(text))
  5900. {
  5901. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5902. }
  5903. }
  5904. }
  5905. if (maid.status.personal.uniqueName == "Pure")
  5906. {
  5907. string text = "s2_";
  5908. Random random = new Random();
  5909. int num4 = random.Next(10000);
  5910. bool flag7 = false;
  5911. for (int k = 0; k < pureArray.Length; k++)
  5912. {
  5913. if (pureArray[k] == num4)
  5914. {
  5915. flag7 = true;
  5916. break;
  5917. }
  5918. }
  5919. if (!flag7)
  5920. {
  5921. text = text + "0" + num4.ToString() + ".ogg";
  5922. if (GameUty.FileSystem.IsExistentFile(text))
  5923. {
  5924. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5925. }
  5926. }
  5927. }
  5928. if (maid.status.personal.uniqueName == "Yandere")
  5929. {
  5930. string text = "s3_";
  5931. Random random = new Random();
  5932. int num4 = random.Next(10000);
  5933. bool flag7 = false;
  5934. for (int k = 0; k < yanArray.Length; k++)
  5935. {
  5936. if (yanArray[k] == num4)
  5937. {
  5938. flag7 = true;
  5939. break;
  5940. }
  5941. }
  5942. if (!flag7)
  5943. {
  5944. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5945. if (GameUty.FileSystem.IsExistentFile(text))
  5946. {
  5947. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5948. }
  5949. }
  5950. }
  5951. if (maid.status.personal.uniqueName == "Muku")
  5952. {
  5953. string text = "h0_";
  5954. Random random = new Random();
  5955. int num4 = random.Next(10000);
  5956. bool flag7 = false;
  5957. for (int k = 0; k < h0Array.Length; k++)
  5958. {
  5959. if (h0Array[k] == num4)
  5960. {
  5961. flag7 = true;
  5962. break;
  5963. }
  5964. }
  5965. if (flag7)
  5966. {
  5967. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5968. if (GameUty.FileSystem.IsExistentFile(text))
  5969. {
  5970. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5971. }
  5972. }
  5973. }
  5974. if (maid.status.personal.uniqueName == "Majime")
  5975. {
  5976. string text = "h1_";
  5977. Random random = new Random();
  5978. int num4 = random.Next(10000);
  5979. bool flag7 = false;
  5980. for (int k = 0; k < h1Array.Length; k++)
  5981. {
  5982. if (h1Array[k] == num4)
  5983. {
  5984. flag7 = true;
  5985. break;
  5986. }
  5987. }
  5988. if (flag7)
  5989. {
  5990. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5991. if (GameUty.FileSystem.IsExistentFile(text))
  5992. {
  5993. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5994. }
  5995. }
  5996. }
  5997. if (maid.status.personal.uniqueName == "Rindere")
  5998. {
  5999. string text = "h2_";
  6000. Random random = new Random();
  6001. int num4 = random.Next(10000);
  6002. bool flag7 = false;
  6003. for (int k = 0; k < h2Array.Length; k++)
  6004. {
  6005. if (h2Array[k] == num4)
  6006. {
  6007. flag7 = true;
  6008. break;
  6009. }
  6010. }
  6011. if (flag7)
  6012. {
  6013. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6014. if (GameUty.FileSystem.IsExistentFile(text))
  6015. {
  6016. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6017. }
  6018. }
  6019. }
  6020. idoFlg[i] = true;
  6021. }
  6022. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6023. {
  6024. Vector3 vector = maid.transform.position;
  6025. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6026. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6027. maid.SetPos(vector);
  6028. idoFlg[i] = true;
  6029. }
  6030. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6031. {
  6032. Vector3 vector = maid.transform.position;
  6033. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6034. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6035. maid.SetPos(vector);
  6036. idoFlg[i] = true;
  6037. }
  6038. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6039. {
  6040. Vector3 vector = maid.transform.position;
  6041. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6042. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6043. maid.SetPos(vector);
  6044. idoFlg[i] = true;
  6045. }
  6046. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6047. {
  6048. Vector3 vector = maid.transform.position;
  6049. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6050. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6051. maid.SetPos(vector);
  6052. idoFlg[i] = true;
  6053. }
  6054. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6055. {
  6056. Vector3 vector = maid.transform.position;
  6057. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6058. maid.SetPos(vector);
  6059. idoFlg[i] = true;
  6060. }
  6061. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6062. {
  6063. Vector3 vector = maid.transform.position;
  6064. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6065. maid.SetPos(vector);
  6066. idoFlg[i] = true;
  6067. }
  6068. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6069. {
  6070. Vector3 vector = maid.transform.position;
  6071. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6072. maid.SetPos(vector);
  6073. idoFlg[i] = true;
  6074. }
  6075. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6076. {
  6077. Vector3 vector = maid.transform.position;
  6078. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6079. maid.SetPos(vector);
  6080. idoFlg[i] = true;
  6081. }
  6082. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6083. {
  6084. Vector3 vector = maid.transform.position;
  6085. vector.y += 0.0075f * speed;
  6086. maid.SetPos(vector);
  6087. idoFlg[i] = true;
  6088. }
  6089. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6090. {
  6091. Vector3 vector = maid.transform.position;
  6092. vector.y -= 0.0075f * speed;
  6093. maid.SetPos(vector);
  6094. idoFlg[i] = true;
  6095. }
  6096. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6097. {
  6098. faceIndex[i]--;
  6099. if (faceIndex[i] <= -1)
  6100. {
  6101. faceIndex[i] = faceArray.Length - 1;
  6102. }
  6103. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6104. idoFlg[i] = true;
  6105. }
  6106. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6107. {
  6108. faceIndex[i]++;
  6109. if (faceIndex[i] == faceArray.Length)
  6110. {
  6111. faceIndex[i] = 0;
  6112. }
  6113. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6114. idoFlg[i] = true;
  6115. }
  6116. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6117. {
  6118. faceBlendIndex[i]++;
  6119. if (faceBlendIndex[i] == faceBlendArray.Length)
  6120. {
  6121. faceBlendIndex[i] = 0;
  6122. }
  6123. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6124. idoFlg[i] = true;
  6125. }
  6126. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6127. {
  6128. idoFlg[i] = true;
  6129. if (i >= 7)
  6130. {
  6131. idoFlg[i - 7] = true;
  6132. }
  6133. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6134. maid.transform.localScale.y * 1.005f,
  6135. maid.transform.localScale.z * 1.005f);
  6136. }
  6137. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6138. {
  6139. idoFlg[i] = true;
  6140. if (i >= 7)
  6141. {
  6142. idoFlg[i - 7] = true;
  6143. }
  6144. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6145. maid.transform.localScale.y * 0.995f,
  6146. maid.transform.localScale.z * 0.995f);
  6147. }
  6148. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6149. {
  6150. idoFlg[i] = true;
  6151. if (i >= 7)
  6152. {
  6153. idoFlg[i - 7] = true;
  6154. }
  6155. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6156. }
  6157. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6158. {
  6159. if (!isVR)
  6160. {
  6161. if (goSlot[(int)selectList[i]] != null)
  6162. {
  6163. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6164. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6165. {
  6166. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6167. }
  6168. }
  6169. }
  6170. maid.body0.SetMask(TBody.SlotID.wear, true);
  6171. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6172. maid.body0.SetMask(TBody.SlotID.bra, true);
  6173. maid.body0.SetMask(TBody.SlotID.panz, true);
  6174. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6175. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6176. isWear = true;
  6177. isSkirt = true;
  6178. isBra = true;
  6179. isPanz = true;
  6180. Random random = new Random();
  6181. int num4 = random.Next(2);
  6182. if (num4 == 1)
  6183. {
  6184. maid.body0.SetMask(TBody.SlotID.wear, false);
  6185. }
  6186. if (num4 == 1)
  6187. {
  6188. isWear = false;
  6189. }
  6190. num4 = random.Next(2);
  6191. if (num4 == 1)
  6192. {
  6193. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6194. }
  6195. if (num4 == 1)
  6196. {
  6197. isSkirt = false;
  6198. }
  6199. num4 = random.Next(2);
  6200. if (num4 == 1)
  6201. {
  6202. maid.body0.SetMask(TBody.SlotID.bra, false);
  6203. }
  6204. if (num4 == 1)
  6205. {
  6206. isBra = false;
  6207. }
  6208. num4 = random.Next(2);
  6209. if (num4 == 1)
  6210. {
  6211. maid.body0.SetMask(TBody.SlotID.panz, false);
  6212. }
  6213. if (num4 == 1)
  6214. {
  6215. isPanz = false;
  6216. }
  6217. num4 = random.Next(2);
  6218. if (num4 == 1)
  6219. {
  6220. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6221. }
  6222. num4 = random.Next(2);
  6223. if (num4 == 1)
  6224. {
  6225. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6226. }
  6227. hFlg = true;
  6228. idoFlg[i] = true;
  6229. if (i >= 7)
  6230. {
  6231. idoFlg[i - 7] = true;
  6232. }
  6233. }
  6234. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6235. {
  6236. poseIndex[i]--;
  6237. if (poseIndex[i] <= -1)
  6238. {
  6239. poseIndex[i] = poseArray.Length - 1;
  6240. }
  6241. if (maid && maid.Visible)
  6242. {
  6243. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6244. isStop[i] = false;
  6245. poseCount[i] = 20;
  6246. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6247. {
  6248. maid.body0.MuneYureL(0f);
  6249. maid.body0.MuneYureR(0f);
  6250. }
  6251. else
  6252. {
  6253. maid.body0.MuneYureL(1f);
  6254. maid.body0.MuneYureR(1f);
  6255. }
  6256. if (array[0].Contains("MultipleMaidsPose"))
  6257. {
  6258. string path = array[0].Split(new char[] { '/' })[1];
  6259. byte[] array2 = new byte[0];
  6260. try
  6261. {
  6262. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6263. {
  6264. array2 = new byte[fileStream.Length];
  6265. fileStream.Read(array2, 0, array2.Length);
  6266. }
  6267. }
  6268. catch { }
  6269. if (0 < array2.Length)
  6270. {
  6271. string text = Path.GetFileName(path);
  6272. long num5 = text.GetHashCode();
  6273. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6274. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6275. {
  6276. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6277. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6278. };
  6279. for (int m = 0; m < array3.Length; m++)
  6280. {
  6281. maid.SetAutoTwist(array3[m], true);
  6282. }
  6283. }
  6284. }
  6285. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6286. {
  6287. loadPose[i] = array[0];
  6288. }
  6289. else if (!array[0].StartsWith("dance_"))
  6290. {
  6291. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6292. }
  6293. else
  6294. {
  6295. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6296. {
  6297. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6298. }
  6299. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6300. }
  6301. if (array.Length > 1)
  6302. {
  6303. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6304. isStop[i] = true;
  6305. if (array.Length > 2)
  6306. {
  6307. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6308. isPoseIti[i] = true;
  6309. poseIti[i] = maidArray[i].transform.position;
  6310. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6311. }
  6312. }
  6313. }
  6314. idoFlg[i] = true;
  6315. if (i >= 7)
  6316. {
  6317. idoFlg[i - 7] = true;
  6318. }
  6319. }
  6320. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6321. {
  6322. int num7 = poseIndex[i];
  6323. for (int k = 0; k < groupList.Count; k++)
  6324. {
  6325. if (poseIndex[i] < (int)groupList[k])
  6326. {
  6327. poseIndex[i] = (int)groupList[k];
  6328. break;
  6329. }
  6330. }
  6331. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6332. {
  6333. poseIndex[i] = 0;
  6334. }
  6335. if (maid && maid.Visible)
  6336. {
  6337. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6338. isStop[i] = false;
  6339. poseCount[i] = 20;
  6340. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6341. {
  6342. maid.body0.MuneYureL(0f);
  6343. maid.body0.MuneYureR(0f);
  6344. }
  6345. else
  6346. {
  6347. maid.body0.MuneYureL(1f);
  6348. maid.body0.MuneYureR(1f);
  6349. }
  6350. if (array[0].Contains("MultipleMaidsPose"))
  6351. {
  6352. string path = array[0].Split(new char[] { '/' })[1];
  6353. byte[] array2 = new byte[0];
  6354. try
  6355. {
  6356. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6357. {
  6358. array2 = new byte[fileStream.Length];
  6359. fileStream.Read(array2, 0, array2.Length);
  6360. }
  6361. }
  6362. catch { }
  6363. if (0 < array2.Length)
  6364. {
  6365. string text = Path.GetFileName(path);
  6366. long num5 = text.GetHashCode();
  6367. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6368. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6369. {
  6370. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6371. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6372. };
  6373. for (int m = 0; m < array3.Length; m++)
  6374. {
  6375. maid.SetAutoTwist(array3[m], true);
  6376. }
  6377. }
  6378. }
  6379. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6380. {
  6381. loadPose[i] = array[0];
  6382. }
  6383. else if (!array[0].StartsWith("dance_"))
  6384. {
  6385. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6386. }
  6387. else
  6388. {
  6389. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6390. {
  6391. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6392. }
  6393. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6394. }
  6395. if (array.Length > 1)
  6396. {
  6397. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6398. isStop[i] = true;
  6399. if (array.Length > 2)
  6400. {
  6401. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6402. isPoseIti[i] = true;
  6403. poseIti[i] = maidArray[i].transform.position;
  6404. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6405. }
  6406. }
  6407. }
  6408. idoFlg[i] = true;
  6409. if (i >= 7)
  6410. {
  6411. idoFlg[i - 7] = true;
  6412. }
  6413. }
  6414. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6415. {
  6416. for (int k = 0; k < groupList.Count; k++)
  6417. {
  6418. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6419. {
  6420. if (poseIndex[i] == 0)
  6421. {
  6422. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6423. }
  6424. else
  6425. {
  6426. poseIndex[i] = 0;
  6427. }
  6428. break;
  6429. }
  6430. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6431. {
  6432. poseIndex[i] = (int)groupList[k - 1];
  6433. break;
  6434. }
  6435. }
  6436. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6437. {
  6438. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6439. }
  6440. if (maid && maid.Visible)
  6441. {
  6442. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6443. isStop[i] = false;
  6444. poseCount[i] = 20;
  6445. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6446. {
  6447. maid.body0.MuneYureL(0f);
  6448. maid.body0.MuneYureR(0f);
  6449. }
  6450. else
  6451. {
  6452. maid.body0.MuneYureL(1f);
  6453. maid.body0.MuneYureR(1f);
  6454. }
  6455. if (array[0].Contains("MultipleMaidsPose"))
  6456. {
  6457. string path = array[0].Split(new char[] { '/' })[1];
  6458. byte[] array2 = new byte[0];
  6459. try
  6460. {
  6461. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6462. {
  6463. array2 = new byte[fileStream.Length];
  6464. fileStream.Read(array2, 0, array2.Length);
  6465. }
  6466. }
  6467. catch { }
  6468. if (0 < array2.Length)
  6469. {
  6470. string text = Path.GetFileName(path);
  6471. long num5 = text.GetHashCode();
  6472. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6473. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6474. {
  6475. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6476. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6477. };
  6478. for (int m = 0; m < array3.Length; m++)
  6479. {
  6480. maid.SetAutoTwist(array3[m], true);
  6481. }
  6482. }
  6483. }
  6484. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6485. {
  6486. loadPose[i] = array[0];
  6487. }
  6488. else if (!array[0].StartsWith("dance_"))
  6489. {
  6490. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6491. }
  6492. else
  6493. {
  6494. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6495. {
  6496. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6497. }
  6498. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6499. }
  6500. if (array.Length > 1)
  6501. {
  6502. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6503. isStop[i] = true;
  6504. if (array.Length > 2)
  6505. {
  6506. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6507. isPoseIti[i] = true;
  6508. poseIti[i] = maidArray[i].transform.position;
  6509. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6510. }
  6511. }
  6512. }
  6513. idoFlg[i] = true;
  6514. if (i >= 7)
  6515. {
  6516. idoFlg[i - 7] = true;
  6517. }
  6518. }
  6519. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6520. {
  6521. headEyeIndex[i]++;
  6522. if (headEyeIndex[i] == headEyeArray.Length)
  6523. {
  6524. headEyeIndex[i] = 0;
  6525. }
  6526. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6527. maid.body0.boHeadToCam = true;
  6528. maid.body0.boEyeToCam = true;
  6529. if (headEyeIndex[i] == 0)
  6530. {
  6531. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6532. maid.body0.boHeadToCam = true;
  6533. maid.body0.boEyeToCam = true;
  6534. }
  6535. else
  6536. {
  6537. maid.body0.trsLookTarget = null;
  6538. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6539. if (headEyeIndex[i] == 1)
  6540. {
  6541. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6542. }
  6543. if (headEyeIndex[i] == 2)
  6544. {
  6545. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6546. }
  6547. if (headEyeIndex[i] == 3)
  6548. {
  6549. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6550. }
  6551. if (headEyeIndex[i] == 4)
  6552. {
  6553. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6554. }
  6555. if (headEyeIndex[i] == 5)
  6556. {
  6557. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6558. }
  6559. if (headEyeIndex[i] == 6)
  6560. {
  6561. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6562. }
  6563. if (headEyeIndex[i] == 7)
  6564. {
  6565. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6566. }
  6567. if (headEyeIndex[i] == 8)
  6568. {
  6569. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6570. }
  6571. if (headEyeIndex[i] == 9)
  6572. {
  6573. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6574. }
  6575. }
  6576. idoFlg[i] = true;
  6577. if (i >= 7)
  6578. {
  6579. idoFlg[i - 7] = true;
  6580. }
  6581. }
  6582. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6583. {
  6584. idoFlg[i] = true;
  6585. if (i >= 7)
  6586. {
  6587. idoFlg[i - 7] = true;
  6588. }
  6589. }
  6590. else if (Input.GetKeyUp(key))
  6591. {
  6592. if (idoFlg[i])
  6593. {
  6594. idoFlg[i] = false;
  6595. }
  6596. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6597. {
  6598. if (!isLock[i])
  6599. {
  6600. poseIndex[i]++;
  6601. if (poseIndex[i] == poseArray.Length)
  6602. {
  6603. poseIndex[i] = 0;
  6604. }
  6605. if (maid && maid.Visible)
  6606. {
  6607. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6608. isStop[i] = false;
  6609. poseCount[i] = 20;
  6610. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6611. {
  6612. maid.body0.MuneYureL(0f);
  6613. maid.body0.MuneYureR(0f);
  6614. }
  6615. else
  6616. {
  6617. maid.body0.MuneYureL(1f);
  6618. maid.body0.MuneYureR(1f);
  6619. }
  6620. if (array[0].Contains("MultipleMaidsPose"))
  6621. {
  6622. string path = array[0].Split(new char[] { '/' })[1];
  6623. byte[] array2 = new byte[0];
  6624. try
  6625. {
  6626. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6627. {
  6628. array2 = new byte[fileStream.Length];
  6629. fileStream.Read(array2, 0, array2.Length);
  6630. }
  6631. }
  6632. catch { }
  6633. if (0 < array2.Length)
  6634. {
  6635. string text = Path.GetFileName(path);
  6636. long num5 = text.GetHashCode();
  6637. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6638. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6639. {
  6640. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6641. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6642. };
  6643. for (int m = 0; m < array3.Length; m++)
  6644. {
  6645. maid.SetAutoTwist(array3[m], true);
  6646. }
  6647. }
  6648. }
  6649. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6650. {
  6651. loadPose[i] = array[0];
  6652. }
  6653. else if (!array[0].StartsWith("dance_"))
  6654. {
  6655. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6656. }
  6657. else
  6658. {
  6659. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6660. {
  6661. maid.body0.LoadAnime(array[0] + ".anm",
  6662. GameUty.FileSystem,
  6663. array[0] + ".anm",
  6664. false,
  6665. false);
  6666. }
  6667. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6668. }
  6669. if (array.Length > 1)
  6670. {
  6671. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6672. isStop[i] = true;
  6673. if (array.Length > 2)
  6674. {
  6675. Transform transform2 =
  6676. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6677. isPoseIti[i] = true;
  6678. poseIti[i] = maidArray[i].transform.position;
  6679. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6680. }
  6681. }
  6682. }
  6683. }
  6684. }
  6685. }
  6686. goto IL_1688E;
  6687. }
  6688. }
  6689. if (Input.GetKeyDown(KeyCode.E)) { }
  6690. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6691. {
  6692. bGui = false;
  6693. }
  6694. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6695. {
  6696. sceneFlg = true;
  6697. faceFlg = false;
  6698. poseFlg = false;
  6699. kankyoFlg = false;
  6700. kankyo2Flg = false;
  6701. bGui = true;
  6702. if (!saveManagerInitialize) InitializeSaveManager();
  6703. for (int i = 0; i < 10; i++)
  6704. {
  6705. date[i] = "未保存";
  6706. ninzu[i] = "";
  6707. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6708. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6709. {
  6710. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6711. if (array4.Length >= 2)
  6712. {
  6713. string[] array5 = array4[0].Split(new char[] { ',' });
  6714. date[i] = array5[0];
  6715. ninzu[i] = array5[1] + "人";
  6716. }
  6717. }
  6718. }
  6719. }
  6720. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6721. {
  6722. bgmIndex--;
  6723. if (bgmIndex <= -1)
  6724. {
  6725. bgmIndex = bgmArray.Length - 1;
  6726. }
  6727. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6728. bgmCombo.selectedItemIndex = bgmIndex;
  6729. }
  6730. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6731. {
  6732. bgmIndex++;
  6733. if (bgmIndex == bgmArray.Length)
  6734. {
  6735. bgmIndex = 0;
  6736. }
  6737. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6738. bgmCombo.selectedItemIndex = bgmIndex;
  6739. }
  6740. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6741. {
  6742. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6743. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6744. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6745. if (isMessage)
  6746. {
  6747. isMessage = false;
  6748. messageWindowMgr.CloseMessageWindowPanel();
  6749. }
  6750. else if (!bGuiMessage)
  6751. {
  6752. bGuiMessage = true;
  6753. }
  6754. else
  6755. {
  6756. bGuiMessage = false;
  6757. isMessage = false;
  6758. messageWindowMgr.CloseMessageWindowPanel();
  6759. }
  6760. }
  6761. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6762. {
  6763. escFlg = true;
  6764. for (int j = 0; j < maidCnt; j++)
  6765. {
  6766. if (maidArray[j] && maidArray[j].Visible)
  6767. {
  6768. maidArray[j].StopKuchipakuPattern();
  6769. if (isDanceStart7V)
  6770. {
  6771. maidArray[j].SetPos(dancePos[j]);
  6772. maidArray[j].body0.transform.localRotation = danceRot[j];
  6773. }
  6774. if (isDanceStart8V)
  6775. {
  6776. maidArray[j].SetPos(dancePos[j]);
  6777. maidArray[j].body0.transform.localRotation = danceRot[j];
  6778. }
  6779. if (isDanceStart11V)
  6780. {
  6781. maidArray[j].SetPos(dancePos[j]);
  6782. maidArray[j].body0.transform.localRotation = danceRot[j];
  6783. }
  6784. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6785. || isDanceStart13K)
  6786. {
  6787. maidArray[j].SetPos(dancePos[j]);
  6788. maidArray[j].body0.transform.localRotation = danceRot[j];
  6789. int i = j;
  6790. if (!isVR)
  6791. {
  6792. delCount[i] = 20;
  6793. if (goSlot[(int)selectList[i]] != null)
  6794. {
  6795. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6796. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6797. {
  6798. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6799. }
  6800. }
  6801. }
  6802. Maid maid = maidArray[j];
  6803. maid.DelProp(MPN.handitem, true);
  6804. maid.DelProp(MPN.accvag, true);
  6805. maid.DelProp(MPN.accanl, true);
  6806. maid.DelProp(MPN.kousoku_upper, true);
  6807. maid.DelProp(MPN.kousoku_lower, true);
  6808. maid.AllProcPropSeqStart();
  6809. }
  6810. if (isDanceStart14V)
  6811. {
  6812. maidArray[j].SetPos(dancePos[j]);
  6813. maidArray[j].body0.transform.localRotation = danceRot[j];
  6814. }
  6815. if (isDanceStart15V)
  6816. {
  6817. maidArray[j].SetPos(dancePos[j]);
  6818. maidArray[j].body0.transform.localRotation = danceRot[j];
  6819. }
  6820. }
  6821. }
  6822. isDanceStart1F = false;
  6823. isDanceStart1K = false;
  6824. isDanceStart2F = false;
  6825. isDanceStart3F = false;
  6826. isDanceStart3K = false;
  6827. isDanceStart4F = false;
  6828. isDanceStart4K = false;
  6829. isDanceStart5F = false;
  6830. isDanceStart5K = false;
  6831. isDanceStart6F = false;
  6832. isDanceStart6K = false;
  6833. isDanceStart7F = false;
  6834. isDanceStart7V = false;
  6835. isDanceStart8F = false;
  6836. isDanceStart8V = false;
  6837. isDanceStart8P = false;
  6838. isDanceStart9F = false;
  6839. isDanceStart9K = false;
  6840. isDanceStart10F = false;
  6841. isDanceStart11F = false;
  6842. isDanceStart11V = false;
  6843. isDanceStart12F = false;
  6844. isDanceStart13F = false;
  6845. isDanceStart13K = false;
  6846. isDanceStart14F = false;
  6847. isDanceStart14V = false;
  6848. isDanceStart15F = false;
  6849. isDanceStart15V = false;
  6850. for (int j = 0; j < maidCnt; j++)
  6851. {
  6852. danceFace[j] = 0f;
  6853. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6854. maidArray[j].SetAutoTwistAll(true);
  6855. }
  6856. danceCheckIndex = 0;
  6857. for (int k = 0; k < danceCheck.Length; k++)
  6858. {
  6859. danceCheck[danceCheckIndex] = 1f;
  6860. }
  6861. isDance = false;
  6862. isDanceChu = false;
  6863. if (maidArray[1] && maidArray[1].Visible)
  6864. {
  6865. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6866. {
  6867. Vector3 vector = Vector3.zero;
  6868. vector.x = 0.6f;
  6869. maidArray[1].SetPos(vector);
  6870. if (maidArray[2] && maidArray[2].Visible)
  6871. {
  6872. vector.x = -0.6f;
  6873. maidArray[2].SetPos(vector);
  6874. }
  6875. if (maidArray[3] && maidArray[3].Visible)
  6876. {
  6877. vector.x = 1.2f;
  6878. maidArray[3].SetPos(vector);
  6879. }
  6880. if (maidArray[4] && maidArray[4].Visible)
  6881. {
  6882. vector.x = -1.2f;
  6883. maidArray[4].SetPos(vector);
  6884. }
  6885. if (maidArray[5] && maidArray[5].Visible)
  6886. {
  6887. vector.x = 1.8f;
  6888. maidArray[5].SetPos(vector);
  6889. }
  6890. if (maidArray[6] && maidArray[6].Visible)
  6891. {
  6892. vector.x = -1.8f;
  6893. maidArray[6].SetPos(vector);
  6894. }
  6895. if (maidArray[7] && maidArray[7].Visible)
  6896. {
  6897. vector.x = 2.4f;
  6898. maidArray[7].SetPos(vector);
  6899. }
  6900. if (maidArray[8] && maidArray[8].Visible)
  6901. {
  6902. vector.x = -2.4f;
  6903. maidArray[8].SetPos(vector);
  6904. }
  6905. if (maidArray[9] && maidArray[9].Visible)
  6906. {
  6907. vector.x = 3f;
  6908. maidArray[9].SetPos(vector);
  6909. }
  6910. if (maidArray[10] && maidArray[10].Visible)
  6911. {
  6912. vector.x = -3f;
  6913. maidArray[10].SetPos(vector);
  6914. }
  6915. if (maidArray[11] && maidArray[11].Visible)
  6916. {
  6917. vector.x = 3.6f;
  6918. maidArray[11].SetPos(vector);
  6919. }
  6920. if (maidArray[12] && maidArray[12].Visible)
  6921. {
  6922. vector.x = -3.6f;
  6923. maidArray[12].SetPos(vector);
  6924. }
  6925. if (maidArray[13] && maidArray[13].Visible)
  6926. {
  6927. vector.x = 4.2f;
  6928. maidArray[13].SetPos(vector);
  6929. }
  6930. }
  6931. }
  6932. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6933. }
  6934. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6935. {
  6936. if (isScript)
  6937. {
  6938. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6939. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6940. if (isPanel)
  6941. {
  6942. isPanel = false;
  6943. }
  6944. else
  6945. {
  6946. isPanel = true;
  6947. }
  6948. gameObject5.SetActive(isPanel);
  6949. }
  6950. else
  6951. {
  6952. bGui = !bGui;
  6953. }
  6954. }
  6955. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6956. {
  6957. keyFlg = true;
  6958. bgIndex--;
  6959. if (bgIndex <= -1)
  6960. {
  6961. bgIndex = bgArray.Length - 1;
  6962. }
  6963. if (!moveBg)
  6964. {
  6965. bg.localScale = new Vector3(1f, 1f, 1f);
  6966. if (bgArray[bgIndex].Length == 36)
  6967. {
  6968. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6969. }
  6970. else
  6971. {
  6972. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6973. }
  6974. bgCombo.selectedItemIndex = bgIndex;
  6975. if (bgArray[bgIndex] == "karaokeroom")
  6976. {
  6977. bg.transform.position = bgObject.transform.position;
  6978. Vector3 vector = Vector3.zero;
  6979. Vector3 zero3 = Vector3.zero;
  6980. zero3.y = 90f;
  6981. vector.z = 4f;
  6982. vector.x = 1f;
  6983. bg.transform.localPosition = vector;
  6984. bg.transform.localRotation = Quaternion.Euler(zero3);
  6985. }
  6986. }
  6987. }
  6988. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6989. {
  6990. keyFlg = true;
  6991. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6992. }
  6993. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6994. {
  6995. keyFlg = true;
  6996. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6997. }
  6998. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6999. {
  7000. keyFlg = true;
  7001. bg.localScale = new Vector3(1f, 1f, 1f);
  7002. }
  7003. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7004. {
  7005. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7006. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7007. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7008. Vector3 vector = bg.position;
  7009. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7010. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7011. bg.localPosition = vector;
  7012. if (Input.GetKey(KeyCode.Y))
  7013. {
  7014. keyFlg = true;
  7015. }
  7016. }
  7017. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7018. {
  7019. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7020. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7021. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7022. Vector3 vector = bg.position;
  7023. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7024. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7025. bg.localPosition = vector;
  7026. if (Input.GetKey(KeyCode.Y))
  7027. {
  7028. keyFlg = true;
  7029. }
  7030. }
  7031. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7032. {
  7033. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7034. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7035. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7036. Vector3 vector = bg.position;
  7037. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7038. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7039. bg.localPosition = vector;
  7040. if (Input.GetKey(KeyCode.Y))
  7041. {
  7042. keyFlg = true;
  7043. }
  7044. }
  7045. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7046. {
  7047. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7048. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7049. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7050. Vector3 vector = bg.position;
  7051. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7053. bg.localPosition = vector;
  7054. if (Input.GetKey(KeyCode.Y))
  7055. {
  7056. keyFlg = true;
  7057. }
  7058. }
  7059. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7060. {
  7061. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7062. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7063. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7064. Vector3 vector = bg.position;
  7065. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7066. bg.localPosition = vector;
  7067. if (Input.GetKey(KeyCode.Y))
  7068. {
  7069. keyFlg = true;
  7070. }
  7071. }
  7072. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7073. {
  7074. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7075. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7076. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7077. Vector3 vector = bg.position;
  7078. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7079. bg.localPosition = vector;
  7080. if (Input.GetKey(KeyCode.Y))
  7081. {
  7082. keyFlg = true;
  7083. }
  7084. }
  7085. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7086. {
  7087. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7088. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7089. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7090. Vector3 vector = bg.position;
  7091. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7092. bg.localPosition = vector;
  7093. if (Input.GetKey(KeyCode.Y))
  7094. {
  7095. keyFlg = true;
  7096. }
  7097. }
  7098. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7099. {
  7100. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7101. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7102. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7103. Vector3 vector = bg.position;
  7104. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7105. bg.localPosition = vector;
  7106. if (Input.GetKey(KeyCode.Y))
  7107. {
  7108. keyFlg = true;
  7109. }
  7110. }
  7111. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7112. {
  7113. Vector3 vector = bg.position;
  7114. vector.y -= 0.015f * speed;
  7115. bg.localPosition = vector;
  7116. if (Input.GetKey(KeyCode.Y))
  7117. {
  7118. keyFlg = true;
  7119. }
  7120. }
  7121. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7122. {
  7123. Vector3 vector = bg.position;
  7124. vector.y += 0.015f * speed;
  7125. bg.localPosition = vector;
  7126. if (Input.GetKey(KeyCode.Y))
  7127. {
  7128. keyFlg = true;
  7129. }
  7130. }
  7131. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7132. {
  7133. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7134. if (Input.GetKey(KeyCode.Y))
  7135. {
  7136. keyFlg = true;
  7137. }
  7138. }
  7139. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7140. {
  7141. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7142. if (Input.GetKey(KeyCode.Y))
  7143. {
  7144. keyFlg = true;
  7145. }
  7146. }
  7147. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7148. {
  7149. if (Input.GetKey(KeyCode.Y))
  7150. {
  7151. keyFlg = true;
  7152. }
  7153. }
  7154. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7155. {
  7156. if (keyFlg)
  7157. {
  7158. keyFlg = false;
  7159. }
  7160. else
  7161. {
  7162. bgIndex++;
  7163. if (bgIndex == bgArray.Length)
  7164. {
  7165. bgIndex = 0;
  7166. }
  7167. if (!moveBg)
  7168. {
  7169. bg.localScale = new Vector3(1f, 1f, 1f);
  7170. if (bgArray[bgIndex].Length == 36)
  7171. {
  7172. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7173. }
  7174. else
  7175. {
  7176. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7177. }
  7178. bgCombo.selectedItemIndex = bgIndex;
  7179. if (bgArray[bgIndex] == "karaokeroom")
  7180. {
  7181. bg.transform.position = bgObject.transform.position;
  7182. Vector3 vector = Vector3.zero;
  7183. Vector3 zero3 = Vector3.zero;
  7184. zero3.y = 90f;
  7185. vector.z = 4f;
  7186. vector.x = 1f;
  7187. bg.transform.localPosition = vector;
  7188. bg.transform.localRotation = Quaternion.Euler(zero3);
  7189. }
  7190. }
  7191. }
  7192. }
  7193. if (maidArray[0] != null && maidArray[0].Visible)
  7194. {
  7195. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7196. {
  7197. int[] array6 = new int[1];
  7198. int[] array7 = array6;
  7199. if (maidCnt == 2)
  7200. {
  7201. array7 = new int[] { 0, 1 };
  7202. }
  7203. if (maidCnt == 3)
  7204. {
  7205. array7 = new int[] { 0, 1, 2 };
  7206. }
  7207. if (maidCnt == 4)
  7208. {
  7209. array7 = new int[] { 0, 1, 2, 3 };
  7210. }
  7211. if (maidCnt == 5)
  7212. {
  7213. array7 = new int[] { 0, 1, 2, 3, 4 };
  7214. }
  7215. if (maidCnt == 6)
  7216. {
  7217. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7218. }
  7219. if (maidCnt == 7)
  7220. {
  7221. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7222. }
  7223. if (maidCnt == 8)
  7224. {
  7225. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7226. }
  7227. if (maidCnt == 9)
  7228. {
  7229. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7230. }
  7231. if (maidCnt == 10)
  7232. {
  7233. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7234. }
  7235. if (maidCnt == 11)
  7236. {
  7237. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7238. }
  7239. if (maidCnt == 12)
  7240. {
  7241. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7242. }
  7243. Random random = new Random();
  7244. int n = array7.Length;
  7245. while (n > 1)
  7246. {
  7247. n--;
  7248. int j = random.Next(n + 1);
  7249. int num8 = array7[j];
  7250. array7[j] = array7[n];
  7251. array7[n] = num8;
  7252. }
  7253. int[] array8 = new int[maidCnt];
  7254. Vector3[] array9 = new Vector3[maidCnt];
  7255. Vector3[] array10 = new Vector3[maidCnt];
  7256. int[] array11 = new int[maidCnt];
  7257. for (int i = 0; i < maidCnt; i++)
  7258. {
  7259. array8[array7[i]] = poseIndex[array7[i]];
  7260. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7261. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7262. array11[array7[i]] = headEyeIndex[array7[i]];
  7263. }
  7264. for (int i = 0; i < maidCnt; i++)
  7265. {
  7266. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7267. {
  7268. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7269. isStop[i] = false;
  7270. poseCount[i] = 20;
  7271. Maid maid = maidArray[i];
  7272. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7273. {
  7274. maid.body0.MuneYureL(0f);
  7275. maid.body0.MuneYureR(0f);
  7276. }
  7277. else
  7278. {
  7279. maid.body0.MuneYureL(1f);
  7280. maid.body0.MuneYureR(1f);
  7281. }
  7282. if (array12[0].Contains("MultipleMaidsPose"))
  7283. {
  7284. string path = array12[0].Split(new char[] { '/' })[1];
  7285. byte[] array2 = new byte[0];
  7286. try
  7287. {
  7288. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7289. {
  7290. array2 = new byte[fileStream.Length];
  7291. fileStream.Read(array2, 0, array2.Length);
  7292. }
  7293. }
  7294. catch { }
  7295. if (0 < array2.Length)
  7296. {
  7297. string text = Path.GetFileName(path);
  7298. long num5 = text.GetHashCode();
  7299. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7300. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7301. {
  7302. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7303. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7304. };
  7305. for (int m = 0; m < array3.Length; m++)
  7306. {
  7307. maid.SetAutoTwist(array3[m], true);
  7308. }
  7309. }
  7310. }
  7311. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7312. {
  7313. loadPose[i] = array12[0];
  7314. }
  7315. else if (!array12[0].StartsWith("dance_"))
  7316. {
  7317. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7318. }
  7319. else
  7320. {
  7321. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7322. {
  7323. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7324. GameUty.FileSystem,
  7325. array12[0] + ".anm",
  7326. false,
  7327. false);
  7328. }
  7329. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7330. }
  7331. if (array12.Length > 1)
  7332. {
  7333. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7334. float.Parse(array12[1]);
  7335. isStop[i] = true;
  7336. if (array12.Length > 2)
  7337. {
  7338. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7339. isPoseIti[i] = true;
  7340. poseIti[i] = maidArray[i].transform.position;
  7341. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7342. }
  7343. }
  7344. }
  7345. poseIndex[i] = array8[array7[i]];
  7346. maidArray[i].SetRot(array9[array7[i]]);
  7347. maidArray[i].SetPos(array10[array7[i]]);
  7348. headEyeIndex[i] = array11[array7[i]];
  7349. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7350. maidArray[i].body0.boHeadToCam = true;
  7351. maidArray[i].body0.boEyeToCam = true;
  7352. if (headEyeIndex[i] == 0)
  7353. {
  7354. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7355. maidArray[i].body0.boHeadToCam = true;
  7356. maidArray[i].body0.boEyeToCam = true;
  7357. }
  7358. else
  7359. {
  7360. maidArray[i].body0.trsLookTarget = null;
  7361. if (headEyeIndex[i] == 1)
  7362. {
  7363. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7364. }
  7365. if (headEyeIndex[i] == 2)
  7366. {
  7367. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7368. }
  7369. if (headEyeIndex[i] == 3)
  7370. {
  7371. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7372. }
  7373. if (headEyeIndex[i] == 4)
  7374. {
  7375. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7376. }
  7377. if (headEyeIndex[i] == 5)
  7378. {
  7379. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7380. }
  7381. if (headEyeIndex[i] == 6)
  7382. {
  7383. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7384. }
  7385. if (headEyeIndex[i] == 7)
  7386. {
  7387. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7388. }
  7389. if (headEyeIndex[i] == 8)
  7390. {
  7391. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7392. }
  7393. if (headEyeIndex[i] == 9)
  7394. {
  7395. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7396. }
  7397. }
  7398. }
  7399. }
  7400. else if (Input.GetKeyDown(KeyCode.Comma))
  7401. {
  7402. int[] array8 = new int[maidCnt];
  7403. Vector3[] array9 = new Vector3[maidCnt];
  7404. Vector3[] array10 = new Vector3[maidCnt];
  7405. int[] array11 = new int[maidCnt];
  7406. for (int i = 0; i < maidCnt; i++)
  7407. {
  7408. array8[i] = poseIndex[i];
  7409. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7410. array10[i] = maidArray[i].transform.position;
  7411. array11[i] = headEyeIndex[i];
  7412. }
  7413. for (int i = 0; i < maidCnt; i++)
  7414. {
  7415. if (i == 0)
  7416. {
  7417. if (!isLock[i])
  7418. {
  7419. if (maidArray[i] && maidArray[i].Visible)
  7420. {
  7421. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7422. isStop[i] = false;
  7423. poseCount[i] = 20;
  7424. Maid maid = maidArray[i];
  7425. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7426. {
  7427. maid.body0.MuneYureL(0f);
  7428. maid.body0.MuneYureR(0f);
  7429. }
  7430. else
  7431. {
  7432. maid.body0.MuneYureL(1f);
  7433. maid.body0.MuneYureR(1f);
  7434. }
  7435. if (array12[0].Contains("MultipleMaidsPose"))
  7436. {
  7437. string path = array12[0].Split(new char[] { '/' })[1];
  7438. byte[] array2 = new byte[0];
  7439. try
  7440. {
  7441. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7442. {
  7443. array2 = new byte[fileStream.Length];
  7444. fileStream.Read(array2, 0, array2.Length);
  7445. }
  7446. }
  7447. catch { }
  7448. if (0 < array2.Length)
  7449. {
  7450. string text = Path.GetFileName(path);
  7451. long num5 = text.GetHashCode();
  7452. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7453. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7454. {
  7455. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7456. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7457. };
  7458. for (int m = 0; m < array3.Length; m++)
  7459. {
  7460. maid.SetAutoTwist(array3[m], true);
  7461. }
  7462. }
  7463. }
  7464. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7465. {
  7466. loadPose[i] = array12[0];
  7467. }
  7468. else if (!array12[0].StartsWith("dance_"))
  7469. {
  7470. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7471. }
  7472. else
  7473. {
  7474. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7475. {
  7476. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7477. GameUty.FileSystem,
  7478. array12[0] + ".anm",
  7479. false,
  7480. false);
  7481. }
  7482. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7483. }
  7484. if (array12.Length > 1)
  7485. {
  7486. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7487. float.Parse(array12[1]);
  7488. isStop[i] = true;
  7489. if (array12.Length > 2)
  7490. {
  7491. Transform transform2 =
  7492. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7493. isPoseIti[i] = true;
  7494. poseIti[i] = maidArray[i].transform.position;
  7495. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7496. }
  7497. }
  7498. }
  7499. }
  7500. poseIndex[i] = array8[maidCnt - i - 1];
  7501. headEyeIndex[i] = array11[maidCnt - i - 1];
  7502. }
  7503. else
  7504. {
  7505. if (!isLock[i])
  7506. {
  7507. if (maidArray[i] && maidArray[i].Visible)
  7508. {
  7509. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7510. isStop[i] = false;
  7511. poseCount[i] = 20;
  7512. Maid maid = maidArray[i];
  7513. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7514. {
  7515. maid.body0.MuneYureL(0f);
  7516. maid.body0.MuneYureR(0f);
  7517. }
  7518. else
  7519. {
  7520. maid.body0.MuneYureL(1f);
  7521. maid.body0.MuneYureR(1f);
  7522. }
  7523. if (array12[0].Contains("MultipleMaidsPose"))
  7524. {
  7525. string path = array12[0].Split(new char[] { '/' })[1];
  7526. byte[] array2 = new byte[0];
  7527. try
  7528. {
  7529. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7530. {
  7531. array2 = new byte[fileStream.Length];
  7532. fileStream.Read(array2, 0, array2.Length);
  7533. }
  7534. }
  7535. catch { }
  7536. if (0 < array2.Length)
  7537. {
  7538. string text = Path.GetFileName(path);
  7539. long num5 = text.GetHashCode();
  7540. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7541. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7542. {
  7543. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7544. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7545. };
  7546. for (int m = 0; m < array3.Length; m++)
  7547. {
  7548. maid.SetAutoTwist(array3[m], true);
  7549. }
  7550. }
  7551. }
  7552. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7553. {
  7554. loadPose[i] = array12[0];
  7555. }
  7556. else if (!array12[0].StartsWith("dance_"))
  7557. {
  7558. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7559. }
  7560. else
  7561. {
  7562. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7563. {
  7564. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7565. GameUty.FileSystem,
  7566. array12[0] + ".anm",
  7567. false,
  7568. false);
  7569. }
  7570. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7571. }
  7572. if (array12.Length > 1)
  7573. {
  7574. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7575. float.Parse(array12[1]);
  7576. isStop[i] = true;
  7577. if (array12.Length > 2)
  7578. {
  7579. Transform transform2 =
  7580. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7581. isPoseIti[i] = true;
  7582. poseIti[i] = maidArray[i].transform.position;
  7583. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7584. }
  7585. }
  7586. }
  7587. }
  7588. poseIndex[i] = array8[i - 1];
  7589. headEyeIndex[i] = array11[i - 1];
  7590. }
  7591. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7592. maidArray[i].body0.boHeadToCam = true;
  7593. maidArray[i].body0.boEyeToCam = true;
  7594. if (headEyeIndex[i] == 0)
  7595. {
  7596. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7597. maidArray[i].body0.boHeadToCam = true;
  7598. maidArray[i].body0.boEyeToCam = true;
  7599. }
  7600. else
  7601. {
  7602. maidArray[i].body0.trsLookTarget = null;
  7603. if (headEyeIndex[i] == 1)
  7604. {
  7605. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7606. }
  7607. if (headEyeIndex[i] == 2)
  7608. {
  7609. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7610. }
  7611. if (headEyeIndex[i] == 3)
  7612. {
  7613. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7614. }
  7615. if (headEyeIndex[i] == 4)
  7616. {
  7617. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7618. }
  7619. if (headEyeIndex[i] == 5)
  7620. {
  7621. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7622. }
  7623. if (headEyeIndex[i] == 6)
  7624. {
  7625. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7626. }
  7627. if (headEyeIndex[i] == 7)
  7628. {
  7629. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7630. }
  7631. if (headEyeIndex[i] == 8)
  7632. {
  7633. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7634. }
  7635. if (headEyeIndex[i] == 9)
  7636. {
  7637. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7638. }
  7639. }
  7640. if (i == 0)
  7641. {
  7642. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7643. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7644. }
  7645. else
  7646. {
  7647. maidArray[i].SetRot(array9[i - 1]);
  7648. maidArray[i].SetPos(array10[i - 1]);
  7649. }
  7650. }
  7651. }
  7652. for (int i = 0; i < maidCnt; i++)
  7653. {
  7654. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  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. else if (Input.GetKey(KeyCode.B))
  7664. {
  7665. if (maidArray[i] && maidArray[i].Visible)
  7666. {
  7667. maidArray[i].body0.transform.localRotation =
  7668. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7669. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7670. }
  7671. }
  7672. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7673. {
  7674. if (maidArray[1] && maidArray[1].Visible)
  7675. {
  7676. if (maidArray[0].transform.position == maidArray[1].transform.position
  7677. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7678. {
  7679. Vector3 vector = Vector3.zero;
  7680. vector.x = 0.6f;
  7681. maidArray[1].SetPos(vector);
  7682. if (maidArray[2] && maidArray[2].Visible)
  7683. {
  7684. vector.x = -0.6f;
  7685. maidArray[2].SetPos(vector);
  7686. }
  7687. if (maidArray[3] && maidArray[3].Visible)
  7688. {
  7689. vector.x = 1.2f;
  7690. maidArray[3].SetPos(vector);
  7691. }
  7692. if (maidArray[4] && maidArray[4].Visible)
  7693. {
  7694. vector.x = -1.2f;
  7695. maidArray[4].SetPos(vector);
  7696. }
  7697. if (maidArray[5] && maidArray[5].Visible)
  7698. {
  7699. vector.x = 1.8f;
  7700. maidArray[5].SetPos(vector);
  7701. }
  7702. if (maidArray[6] && maidArray[6].Visible)
  7703. {
  7704. vector.x = -1.8f;
  7705. maidArray[6].SetPos(vector);
  7706. }
  7707. if (maidArray[7] && maidArray[7].Visible)
  7708. {
  7709. vector.x = 2.4f;
  7710. maidArray[7].SetPos(vector);
  7711. }
  7712. if (maidArray[8] && maidArray[8].Visible)
  7713. {
  7714. vector.x = -2.4f;
  7715. maidArray[8].SetPos(vector);
  7716. }
  7717. if (maidArray[9] && maidArray[9].Visible)
  7718. {
  7719. vector.x = 3f;
  7720. maidArray[9].SetPos(vector);
  7721. }
  7722. if (maidArray[10] && maidArray[10].Visible)
  7723. {
  7724. vector.x = -3f;
  7725. maidArray[10].SetPos(vector);
  7726. }
  7727. if (maidArray[11] && maidArray[11].Visible)
  7728. {
  7729. vector.x = 3.6f;
  7730. maidArray[11].SetPos(vector);
  7731. }
  7732. if (maidArray[12] && maidArray[12].Visible)
  7733. {
  7734. vector.x = -3.6f;
  7735. maidArray[12].SetPos(vector);
  7736. }
  7737. if (maidArray[13] && maidArray[13].Visible)
  7738. {
  7739. vector.x = 4.2f;
  7740. maidArray[13].SetPos(vector);
  7741. }
  7742. }
  7743. }
  7744. for (int k = 0; k < groupList.Count; k++)
  7745. {
  7746. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7747. {
  7748. if (poseIndex[i] == 0)
  7749. {
  7750. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7751. }
  7752. else
  7753. {
  7754. poseIndex[i] = 0;
  7755. }
  7756. break;
  7757. }
  7758. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7759. {
  7760. poseIndex[i] = (int)groupList[k - 1];
  7761. break;
  7762. }
  7763. }
  7764. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7765. {
  7766. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7767. }
  7768. if (maidArray[i] && maidArray[i].Visible)
  7769. {
  7770. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7771. isStop[i] = false;
  7772. poseCount[i] = 20;
  7773. Maid maid = maidArray[i];
  7774. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7775. {
  7776. maid.body0.MuneYureL(0f);
  7777. maid.body0.MuneYureR(0f);
  7778. }
  7779. else
  7780. {
  7781. maid.body0.MuneYureL(1f);
  7782. maid.body0.MuneYureR(1f);
  7783. }
  7784. if (array[0].Contains("MultipleMaidsPose"))
  7785. {
  7786. string path = array[0].Split(new char[] { '/' })[1];
  7787. byte[] array2 = new byte[0];
  7788. try
  7789. {
  7790. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7791. {
  7792. array2 = new byte[fileStream.Length];
  7793. fileStream.Read(array2, 0, array2.Length);
  7794. }
  7795. }
  7796. catch { }
  7797. if (0 < array2.Length)
  7798. {
  7799. string text = Path.GetFileName(path);
  7800. long num5 = text.GetHashCode();
  7801. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7802. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7803. {
  7804. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7805. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7806. };
  7807. for (int m = 0; m < array3.Length; m++)
  7808. {
  7809. maid.SetAutoTwist(array3[m], true);
  7810. }
  7811. }
  7812. }
  7813. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7814. {
  7815. loadPose[i] = array[0];
  7816. }
  7817. else if (!array[0].StartsWith("dance_"))
  7818. {
  7819. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7820. }
  7821. else
  7822. {
  7823. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7824. {
  7825. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7826. GameUty.FileSystem,
  7827. array[0] + ".anm",
  7828. false,
  7829. false);
  7830. }
  7831. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7832. }
  7833. if (array.Length > 1)
  7834. {
  7835. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7836. isStop[i] = true;
  7837. if (array.Length > 2)
  7838. {
  7839. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7840. isPoseIti[i] = true;
  7841. poseIti[i] = maidArray[i].transform.position;
  7842. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7843. }
  7844. }
  7845. }
  7846. }
  7847. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7848. {
  7849. if (maidArray[1] && maidArray[1].Visible)
  7850. {
  7851. if (maidArray[0].transform.position == maidArray[1].transform.position
  7852. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7853. {
  7854. Vector3 vector = Vector3.zero;
  7855. vector.x = 0.6f;
  7856. maidArray[1].SetPos(vector);
  7857. if (maidArray[2] && maidArray[2].Visible)
  7858. {
  7859. vector.x = -0.6f;
  7860. maidArray[2].SetPos(vector);
  7861. }
  7862. if (maidArray[3] && maidArray[3].Visible)
  7863. {
  7864. vector.x = 1.2f;
  7865. maidArray[3].SetPos(vector);
  7866. }
  7867. if (maidArray[4] && maidArray[4].Visible)
  7868. {
  7869. vector.x = -1.2f;
  7870. maidArray[4].SetPos(vector);
  7871. }
  7872. if (maidArray[5] && maidArray[5].Visible)
  7873. {
  7874. vector.x = 1.8f;
  7875. maidArray[5].SetPos(vector);
  7876. }
  7877. if (maidArray[6] && maidArray[6].Visible)
  7878. {
  7879. vector.x = -1.8f;
  7880. maidArray[6].SetPos(vector);
  7881. }
  7882. if (maidArray[7] && maidArray[7].Visible)
  7883. {
  7884. vector.x = 2.4f;
  7885. maidArray[7].SetPos(vector);
  7886. }
  7887. if (maidArray[8] && maidArray[8].Visible)
  7888. {
  7889. vector.x = -2.4f;
  7890. maidArray[8].SetPos(vector);
  7891. }
  7892. if (maidArray[9] && maidArray[9].Visible)
  7893. {
  7894. vector.x = 3f;
  7895. maidArray[9].SetPos(vector);
  7896. }
  7897. if (maidArray[10] && maidArray[10].Visible)
  7898. {
  7899. vector.x = -3f;
  7900. maidArray[10].SetPos(vector);
  7901. }
  7902. if (maidArray[11] && maidArray[11].Visible)
  7903. {
  7904. vector.x = 3.6f;
  7905. maidArray[11].SetPos(vector);
  7906. }
  7907. if (maidArray[12] && maidArray[12].Visible)
  7908. {
  7909. vector.x = -3.6f;
  7910. maidArray[12].SetPos(vector);
  7911. }
  7912. if (maidArray[13] && maidArray[13].Visible)
  7913. {
  7914. vector.x = 4.2f;
  7915. maidArray[13].SetPos(vector);
  7916. }
  7917. }
  7918. }
  7919. int num7 = poseIndex[i];
  7920. for (int k = 0; k < groupList.Count; k++)
  7921. {
  7922. if (poseIndex[i] < (int)groupList[k])
  7923. {
  7924. poseIndex[i] = (int)groupList[k];
  7925. break;
  7926. }
  7927. }
  7928. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7929. {
  7930. poseIndex[i] = 0;
  7931. }
  7932. if (maidArray[i] && maidArray[i].Visible)
  7933. {
  7934. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7935. isStop[i] = false;
  7936. poseCount[i] = 20;
  7937. Maid maid = maidArray[i];
  7938. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7939. {
  7940. maid.body0.MuneYureL(0f);
  7941. maid.body0.MuneYureR(0f);
  7942. }
  7943. else
  7944. {
  7945. maid.body0.MuneYureL(1f);
  7946. maid.body0.MuneYureR(1f);
  7947. }
  7948. if (array[0].Contains("MultipleMaidsPose"))
  7949. {
  7950. string path = array[0].Split(new char[] { '/' })[1];
  7951. byte[] array2 = new byte[0];
  7952. try
  7953. {
  7954. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7955. {
  7956. array2 = new byte[fileStream.Length];
  7957. fileStream.Read(array2, 0, array2.Length);
  7958. }
  7959. }
  7960. catch { }
  7961. if (0 < array2.Length)
  7962. {
  7963. string text = Path.GetFileName(path);
  7964. long num5 = text.GetHashCode();
  7965. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7966. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7967. {
  7968. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7969. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7970. };
  7971. for (int m = 0; m < array3.Length; m++)
  7972. {
  7973. maid.SetAutoTwist(array3[m], true);
  7974. }
  7975. }
  7976. }
  7977. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7978. {
  7979. loadPose[i] = array[0];
  7980. }
  7981. else if (!array[0].StartsWith("dance_"))
  7982. {
  7983. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7984. }
  7985. else
  7986. {
  7987. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7988. {
  7989. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7990. GameUty.FileSystem,
  7991. array[0] + ".anm",
  7992. false,
  7993. false);
  7994. }
  7995. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7996. }
  7997. if (array.Length > 1)
  7998. {
  7999. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8000. isStop[i] = true;
  8001. if (array.Length > 2)
  8002. {
  8003. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8004. isPoseIti[i] = true;
  8005. poseIti[i] = maidArray[i].transform.position;
  8006. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8007. }
  8008. }
  8009. }
  8010. }
  8011. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8012. {
  8013. if (maidArray[1] && maidArray[1].Visible)
  8014. {
  8015. if (maidArray[0].transform.position == maidArray[1].transform.position
  8016. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8017. {
  8018. Vector3 vector = Vector3.zero;
  8019. vector.x = 0.6f;
  8020. maidArray[1].SetPos(vector);
  8021. if (maidArray[2] && maidArray[2].Visible)
  8022. {
  8023. vector.x = -0.6f;
  8024. maidArray[2].SetPos(vector);
  8025. }
  8026. if (maidArray[3] && maidArray[3].Visible)
  8027. {
  8028. vector.x = 1.2f;
  8029. maidArray[3].SetPos(vector);
  8030. }
  8031. if (maidArray[4] && maidArray[4].Visible)
  8032. {
  8033. vector.x = -1.2f;
  8034. maidArray[4].SetPos(vector);
  8035. }
  8036. if (maidArray[5] && maidArray[5].Visible)
  8037. {
  8038. vector.x = 1.8f;
  8039. maidArray[5].SetPos(vector);
  8040. }
  8041. if (maidArray[6] && maidArray[6].Visible)
  8042. {
  8043. vector.x = -1.8f;
  8044. maidArray[6].SetPos(vector);
  8045. }
  8046. if (maidArray[7] && maidArray[7].Visible)
  8047. {
  8048. vector.x = 2.4f;
  8049. maidArray[7].SetPos(vector);
  8050. }
  8051. if (maidArray[8] && maidArray[8].Visible)
  8052. {
  8053. vector.x = -2.4f;
  8054. maidArray[8].SetPos(vector);
  8055. }
  8056. if (maidArray[9] && maidArray[9].Visible)
  8057. {
  8058. vector.x = 3f;
  8059. maidArray[9].SetPos(vector);
  8060. }
  8061. if (maidArray[10] && maidArray[10].Visible)
  8062. {
  8063. vector.x = -3f;
  8064. maidArray[10].SetPos(vector);
  8065. }
  8066. if (maidArray[11] && maidArray[11].Visible)
  8067. {
  8068. vector.x = 3.6f;
  8069. maidArray[11].SetPos(vector);
  8070. }
  8071. if (maidArray[12] && maidArray[12].Visible)
  8072. {
  8073. vector.x = -3.6f;
  8074. maidArray[12].SetPos(vector);
  8075. }
  8076. if (maidArray[13] && maidArray[13].Visible)
  8077. {
  8078. vector.x = 4.2f;
  8079. maidArray[13].SetPos(vector);
  8080. }
  8081. }
  8082. }
  8083. poseIndex[i]--;
  8084. if (poseIndex[i] <= -1)
  8085. {
  8086. poseIndex[i] = poseArray.Length - 1;
  8087. }
  8088. if (maidArray[i] && maidArray[i].Visible)
  8089. {
  8090. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8091. isStop[i] = false;
  8092. poseCount[i] = 20;
  8093. Maid maid = maidArray[i];
  8094. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8095. {
  8096. maid.body0.MuneYureL(0f);
  8097. maid.body0.MuneYureR(0f);
  8098. }
  8099. else
  8100. {
  8101. maid.body0.MuneYureL(1f);
  8102. maid.body0.MuneYureR(1f);
  8103. }
  8104. if (array[0].Contains("MultipleMaidsPose"))
  8105. {
  8106. string path = array[0].Split(new char[] { '/' })[1];
  8107. byte[] array2 = new byte[0];
  8108. try
  8109. {
  8110. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8111. {
  8112. array2 = new byte[fileStream.Length];
  8113. fileStream.Read(array2, 0, array2.Length);
  8114. }
  8115. }
  8116. catch { }
  8117. if (0 < array2.Length)
  8118. {
  8119. string text = Path.GetFileName(path);
  8120. long num5 = text.GetHashCode();
  8121. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8122. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8123. {
  8124. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8125. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8126. };
  8127. for (int m = 0; m < array3.Length; m++)
  8128. {
  8129. maid.SetAutoTwist(array3[m], true);
  8130. }
  8131. }
  8132. }
  8133. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8134. {
  8135. loadPose[i] = array[0];
  8136. }
  8137. else if (!array[0].StartsWith("dance_"))
  8138. {
  8139. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8140. }
  8141. else
  8142. {
  8143. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8144. {
  8145. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8146. GameUty.FileSystem,
  8147. array[0] + ".anm",
  8148. false,
  8149. false);
  8150. }
  8151. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8152. }
  8153. if (array.Length > 1)
  8154. {
  8155. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8156. isStop[i] = true;
  8157. if (array.Length > 2)
  8158. {
  8159. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8160. isPoseIti[i] = true;
  8161. poseIti[i] = maidArray[i].transform.position;
  8162. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8163. }
  8164. }
  8165. }
  8166. }
  8167. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8168. {
  8169. if (maidArray[1] && maidArray[1].Visible)
  8170. {
  8171. if (maidArray[0].transform.position == maidArray[1].transform.position
  8172. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8173. {
  8174. Vector3 vector = Vector3.zero;
  8175. vector.x = 0.6f;
  8176. maidArray[1].SetPos(vector);
  8177. if (maidArray[2] && maidArray[2].Visible)
  8178. {
  8179. vector.x = -0.6f;
  8180. maidArray[2].SetPos(vector);
  8181. }
  8182. if (maidArray[3] && maidArray[3].Visible)
  8183. {
  8184. vector.x = 1.2f;
  8185. maidArray[3].SetPos(vector);
  8186. }
  8187. if (maidArray[4] && maidArray[4].Visible)
  8188. {
  8189. vector.x = -1.2f;
  8190. maidArray[4].SetPos(vector);
  8191. }
  8192. if (maidArray[5] && maidArray[5].Visible)
  8193. {
  8194. vector.x = 1.8f;
  8195. maidArray[5].SetPos(vector);
  8196. }
  8197. if (maidArray[6] && maidArray[6].Visible)
  8198. {
  8199. vector.x = -1.8f;
  8200. maidArray[6].SetPos(vector);
  8201. }
  8202. if (maidArray[7] && maidArray[7].Visible)
  8203. {
  8204. vector.x = 2.4f;
  8205. maidArray[7].SetPos(vector);
  8206. }
  8207. if (maidArray[8] && maidArray[8].Visible)
  8208. {
  8209. vector.x = -2.4f;
  8210. maidArray[8].SetPos(vector);
  8211. }
  8212. if (maidArray[9] && maidArray[9].Visible)
  8213. {
  8214. vector.x = 3f;
  8215. maidArray[9].SetPos(vector);
  8216. }
  8217. if (maidArray[10] && maidArray[10].Visible)
  8218. {
  8219. vector.x = -3f;
  8220. maidArray[10].SetPos(vector);
  8221. }
  8222. if (maidArray[11] && maidArray[11].Visible)
  8223. {
  8224. vector.x = 3.6f;
  8225. maidArray[11].SetPos(vector);
  8226. }
  8227. if (maidArray[12] && maidArray[12].Visible)
  8228. {
  8229. vector.x = -3.6f;
  8230. maidArray[12].SetPos(vector);
  8231. }
  8232. if (maidArray[13] && maidArray[13].Visible)
  8233. {
  8234. vector.x = 4.2f;
  8235. maidArray[13].SetPos(vector);
  8236. }
  8237. }
  8238. }
  8239. poseIndex[i]++;
  8240. if (poseIndex[i] == poseArray.Length)
  8241. {
  8242. poseIndex[i] = 0;
  8243. }
  8244. if (maidArray[i] && maidArray[i].Visible)
  8245. {
  8246. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8247. isStop[i] = false;
  8248. poseCount[i] = 20;
  8249. Maid maid = maidArray[i];
  8250. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8251. {
  8252. maid.body0.MuneYureL(0f);
  8253. maid.body0.MuneYureR(0f);
  8254. }
  8255. else
  8256. {
  8257. maid.body0.MuneYureL(1f);
  8258. maid.body0.MuneYureR(1f);
  8259. }
  8260. if (array[0].Contains("MultipleMaidsPose"))
  8261. {
  8262. string path = array[0].Split(new char[] { '/' })[1];
  8263. byte[] array2 = new byte[0];
  8264. try
  8265. {
  8266. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8267. {
  8268. array2 = new byte[fileStream.Length];
  8269. fileStream.Read(array2, 0, array2.Length);
  8270. }
  8271. }
  8272. catch { }
  8273. if (0 < array2.Length)
  8274. {
  8275. string text = Path.GetFileName(path);
  8276. long num5 = text.GetHashCode();
  8277. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8278. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8279. {
  8280. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8281. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8282. };
  8283. for (int m = 0; m < array3.Length; m++)
  8284. {
  8285. maid.SetAutoTwist(array3[m], true);
  8286. }
  8287. }
  8288. }
  8289. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8290. {
  8291. loadPose[i] = array[0];
  8292. }
  8293. else if (!array[0].StartsWith("dance_"))
  8294. {
  8295. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8296. }
  8297. else
  8298. {
  8299. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8300. {
  8301. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8302. GameUty.FileSystem,
  8303. array[0] + ".anm",
  8304. false,
  8305. false);
  8306. }
  8307. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8308. }
  8309. if (array.Length > 1)
  8310. {
  8311. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8312. isStop[i] = true;
  8313. if (array.Length > 2)
  8314. {
  8315. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8316. isPoseIti[i] = true;
  8317. poseIti[i] = maidArray[i].transform.position;
  8318. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8319. }
  8320. }
  8321. }
  8322. }
  8323. }
  8324. }
  8325. if (isDanceChu)
  8326. {
  8327. for (int j = 0; j < maidCnt; j++)
  8328. {
  8329. if (maidArray[j] && maidArray[j].Visible)
  8330. {
  8331. string text2 = danceName[j];
  8332. float num = 0f;
  8333. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8334. || text2 == "dance_cm3d_004_kano_f1.anm")
  8335. {
  8336. num = 0.166666f;
  8337. }
  8338. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8339. {
  8340. num = -0.35f;
  8341. }
  8342. if (text2 != null)
  8343. {
  8344. if (danceCount > 0)
  8345. {
  8346. danceCount--;
  8347. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8348. }
  8349. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8350. {
  8351. danceCount = 20;
  8352. }
  8353. }
  8354. }
  8355. }
  8356. }
  8357. if (isDanceStart1)
  8358. {
  8359. for (int j = 0; j < maidCnt; j++)
  8360. {
  8361. if (maidArray[j] && maidArray[j].Visible)
  8362. {
  8363. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8364. if (!isShift)
  8365. {
  8366. if (j == 0)
  8367. {
  8368. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8369. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8370. danceName[j] = "dance_cm3d2_001_f1.anm";
  8371. }
  8372. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8373. {
  8374. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8375. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8376. danceName[j] = "dance_cm3d2_001_f2.anm";
  8377. }
  8378. else
  8379. {
  8380. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8381. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8382. danceName[j] = "dance_cm3d2_001_f3.anm";
  8383. }
  8384. }
  8385. else
  8386. {
  8387. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8388. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8389. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8390. }
  8391. }
  8392. }
  8393. isDanceStart1 = false;
  8394. isDanceStart1F = true;
  8395. isShift = false;
  8396. }
  8397. if (isDanceStart2)
  8398. {
  8399. for (int j = 0; j < maidCnt; j++)
  8400. {
  8401. if (maidArray[j] && maidArray[j].Visible)
  8402. {
  8403. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8404. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8406. danceName[j] = "dance_cm3d_001_f1.anm";
  8407. }
  8408. }
  8409. isDanceStart2 = false;
  8410. isDanceStart2F = true;
  8411. }
  8412. if (isDanceStart3)
  8413. {
  8414. for (int j = 0; j < maidCnt; j++)
  8415. {
  8416. if (maidArray[j] && maidArray[j].Visible)
  8417. {
  8418. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8419. if (!isShift)
  8420. {
  8421. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8422. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8423. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8424. }
  8425. else
  8426. {
  8427. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8428. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8429. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8430. }
  8431. }
  8432. }
  8433. isDanceStart3 = false;
  8434. isDanceStart3F = true;
  8435. isShift = false;
  8436. }
  8437. if (isDanceStart4)
  8438. {
  8439. for (int j = 0; j < maidCnt; j++)
  8440. {
  8441. if (maidArray[j] && maidArray[j].Visible)
  8442. {
  8443. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8444. if (!isShift)
  8445. {
  8446. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8447. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8448. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8449. }
  8450. else
  8451. {
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8453. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8454. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8455. }
  8456. }
  8457. }
  8458. isDanceStart4 = false;
  8459. isDanceStart4F = true;
  8460. isShift = false;
  8461. }
  8462. if (isDanceStart5)
  8463. {
  8464. for (int j = 0; j < maidCnt; j++)
  8465. {
  8466. if (maidArray[j] && maidArray[j].Visible)
  8467. {
  8468. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8469. if (!isShift)
  8470. {
  8471. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8472. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8473. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8474. }
  8475. else
  8476. {
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8478. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8479. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8480. }
  8481. }
  8482. }
  8483. isDanceStart5 = false;
  8484. isDanceStart5F = true;
  8485. isShift = false;
  8486. }
  8487. if (isDanceStart6)
  8488. {
  8489. for (int j = 0; j < maidCnt; j++)
  8490. {
  8491. if (maidArray[j] && maidArray[j].Visible)
  8492. {
  8493. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8494. if (!isShift)
  8495. {
  8496. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8497. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8498. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8499. }
  8500. else
  8501. {
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8503. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8504. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8505. }
  8506. }
  8507. }
  8508. isDanceStart6 = false;
  8509. isDanceStart6F = true;
  8510. isShift = false;
  8511. }
  8512. if (isDanceStart7)
  8513. {
  8514. for (int j = 0; j < maidCnt; j++)
  8515. {
  8516. if (maidArray[j] && maidArray[j].Visible)
  8517. {
  8518. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8519. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8520. {
  8521. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8522. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8523. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8524. }
  8525. else
  8526. {
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8528. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8529. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8530. }
  8531. }
  8532. }
  8533. isDanceStart7 = false;
  8534. isDanceStart7V = true;
  8535. isDanceStart7F = true;
  8536. }
  8537. if (isDanceStart8)
  8538. {
  8539. for (int j = 0; j < maidCnt; j++)
  8540. {
  8541. if (maidArray[j] && maidArray[j].Visible)
  8542. {
  8543. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8544. if (j == 0 || j == 4 || j == 8 || j == 12)
  8545. {
  8546. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8547. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8548. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8549. }
  8550. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8551. {
  8552. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8553. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8554. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8555. }
  8556. else if (j == 2 || j == 6 || j == 10)
  8557. {
  8558. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8559. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8560. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8561. }
  8562. else
  8563. {
  8564. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8565. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8566. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8567. }
  8568. }
  8569. }
  8570. isDanceStart8 = false;
  8571. isDanceStart8V = true;
  8572. isDanceStart8F = true;
  8573. }
  8574. if (isDanceStart9)
  8575. {
  8576. isDanceStart9Count++;
  8577. if (isShift)
  8578. {
  8579. for (int j = 0; j < maidCnt; j++)
  8580. {
  8581. if (maidArray[j] && maidArray[j].Visible)
  8582. {
  8583. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8584. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8585. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8586. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8587. }
  8588. }
  8589. isDanceStart9 = false;
  8590. isDanceStart9F = true;
  8591. isDanceStart9Count = 0;
  8592. isShift = false;
  8593. }
  8594. if (isDanceStart9Count == 10)
  8595. {
  8596. for (int j = 0; j < maidCnt; j++)
  8597. {
  8598. if (maidArray[j] && maidArray[j].Visible)
  8599. {
  8600. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8601. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8602. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8603. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8604. }
  8605. }
  8606. isDanceStart9 = false;
  8607. isDanceStart9F = true;
  8608. isDanceStart9Count = 0;
  8609. }
  8610. }
  8611. if (isDanceStart10)
  8612. {
  8613. for (int j = 0; j < maidCnt; j++)
  8614. {
  8615. if (maidArray[j] && maidArray[j].Visible)
  8616. {
  8617. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8618. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8619. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8620. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8621. }
  8622. }
  8623. isDanceStart10 = false;
  8624. isDanceStart10F = true;
  8625. }
  8626. if (isDanceStart11)
  8627. {
  8628. for (int j = 0; j < maidCnt; j++)
  8629. {
  8630. if (maidArray[j] && maidArray[j].Visible)
  8631. {
  8632. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8633. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8634. {
  8635. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8636. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8637. danceName[j] = nameA + danceNo2 + ".anm";
  8638. }
  8639. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8640. {
  8641. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8642. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8643. danceName[j] = nameA + danceNo3 + ".anm";
  8644. }
  8645. else
  8646. {
  8647. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8648. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8649. danceName[j] = nameA + danceNo1 + ".anm";
  8650. }
  8651. }
  8652. }
  8653. isDanceStart11 = false;
  8654. isDanceStart11V = true;
  8655. isDanceStart11F = true;
  8656. }
  8657. if (isDanceStart12)
  8658. {
  8659. for (int j = 0; j < maidCnt; j++)
  8660. {
  8661. if (maidArray[j] && maidArray[j].Visible)
  8662. {
  8663. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8664. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8666. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8667. }
  8668. }
  8669. isDanceStart12 = false;
  8670. isDanceStart12F = true;
  8671. }
  8672. if (isDanceStart13)
  8673. {
  8674. for (int j = 0; j < maidCnt; j++)
  8675. {
  8676. if (maidArray[j] && maidArray[j].Visible)
  8677. {
  8678. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8679. if (!isShift)
  8680. {
  8681. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8682. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8683. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8684. }
  8685. else
  8686. {
  8687. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8688. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8689. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8690. }
  8691. }
  8692. }
  8693. isDanceStart13 = false;
  8694. isDanceStart13F = true;
  8695. isShift = false;
  8696. }
  8697. if (isDanceStart14)
  8698. {
  8699. for (int j = 0; j < maidCnt; j++)
  8700. {
  8701. if (maidArray[j] && maidArray[j].Visible)
  8702. {
  8703. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8704. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8705. {
  8706. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8707. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8708. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8709. }
  8710. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8711. {
  8712. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8713. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8714. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8715. }
  8716. else
  8717. {
  8718. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8719. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8720. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8721. }
  8722. }
  8723. }
  8724. isDanceStart14 = false;
  8725. isDanceStart14V = true;
  8726. isDanceStart14F = true;
  8727. }
  8728. if (isDanceStart15)
  8729. {
  8730. isDanceStart15Count++;
  8731. }
  8732. if (isDanceStart15Count == 10)
  8733. {
  8734. for (int j = 0; j < maidCnt; j++)
  8735. {
  8736. if (maidArray[j] && maidArray[j].Visible)
  8737. {
  8738. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8739. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8740. {
  8741. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8742. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8743. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8744. }
  8745. else
  8746. {
  8747. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8748. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8749. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8750. }
  8751. }
  8752. }
  8753. isDanceStart15 = false;
  8754. isDanceStart15V = true;
  8755. isDanceStart15F = true;
  8756. isDanceStart15Count = 0;
  8757. }
  8758. if (isDance)
  8759. {
  8760. for (int j = 0; j < maidCnt; j++)
  8761. {
  8762. if (maidArray[j].Visible)
  8763. {
  8764. if (isDanceStart1F)
  8765. {
  8766. if (isDanceStart1K)
  8767. {
  8768. foreach (string text3 in dance1KArray)
  8769. {
  8770. string[] array = text3.Split(new char[] { ',' });
  8771. float num10 = float.Parse(array[0]);
  8772. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8773. {
  8774. danceFace[j] = num10;
  8775. FaceName[j] = FaceName2[j];
  8776. FaceName2[j] = array[1];
  8777. FaceName3[j] = array[2];
  8778. FaceTime[j] = 0.0166666675f;
  8779. break;
  8780. }
  8781. }
  8782. }
  8783. else if (j == 0)
  8784. {
  8785. foreach (string text3 in dance1Array)
  8786. {
  8787. string[] array = text3.Split(new char[] { ',' });
  8788. float num10 = float.Parse(array[0]);
  8789. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8790. {
  8791. danceFace[j] = num10;
  8792. FaceName[j] = FaceName2[j];
  8793. FaceName2[j] = array[1];
  8794. FaceName3[j] = array[2];
  8795. FaceTime[j] = 0.0166666675f;
  8796. break;
  8797. }
  8798. }
  8799. }
  8800. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8801. {
  8802. foreach (string text3 in dance1BArray)
  8803. {
  8804. string[] array = text3.Split(new char[] { ',' });
  8805. float num10 = float.Parse(array[0]);
  8806. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8807. {
  8808. danceFace[j] = num10;
  8809. FaceName[j] = FaceName2[j];
  8810. FaceName2[j] = array[1];
  8811. FaceName3[j] = array[2];
  8812. FaceTime[j] = 0.0166666675f;
  8813. break;
  8814. }
  8815. }
  8816. }
  8817. else
  8818. {
  8819. foreach (string text3 in dance1CArray)
  8820. {
  8821. string[] array = text3.Split(new char[] { ',' });
  8822. float num10 = float.Parse(array[0]);
  8823. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8824. {
  8825. danceFace[j] = num10;
  8826. FaceName[j] = FaceName2[j];
  8827. FaceName2[j] = array[1];
  8828. FaceName3[j] = array[2];
  8829. FaceTime[j] = 0.0166666675f;
  8830. break;
  8831. }
  8832. }
  8833. }
  8834. }
  8835. if (isDanceStart2F)
  8836. {
  8837. foreach (string text3 in dance2Array)
  8838. {
  8839. string[] array = text3.Split(new char[] { ',' });
  8840. float num10 = float.Parse(array[0]);
  8841. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8842. {
  8843. danceFace[j] = num10;
  8844. FaceName[j] = FaceName2[j];
  8845. FaceName2[j] = array[1];
  8846. FaceName3[j] = array[2];
  8847. FaceTime[j] = 0.0166666675f;
  8848. break;
  8849. }
  8850. }
  8851. }
  8852. if (isDanceStart3F)
  8853. {
  8854. if (isDanceStart3K)
  8855. {
  8856. foreach (string text3 in dance3KArray)
  8857. {
  8858. string[] array = text3.Split(new char[] { ',' });
  8859. float num10 = float.Parse(array[0]);
  8860. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8861. {
  8862. danceFace[j] = num10;
  8863. FaceName[j] = FaceName2[j];
  8864. FaceName2[j] = array[1];
  8865. FaceName3[j] = array[2];
  8866. FaceTime[j] = 0.0166666675f;
  8867. break;
  8868. }
  8869. }
  8870. }
  8871. else
  8872. {
  8873. foreach (string text3 in dance3Array)
  8874. {
  8875. string[] array = text3.Split(new char[] { ',' });
  8876. float num10 = float.Parse(array[0]);
  8877. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8878. {
  8879. danceFace[j] = num10;
  8880. FaceName[j] = FaceName2[j];
  8881. FaceName2[j] = array[1];
  8882. FaceName3[j] = array[2];
  8883. FaceTime[j] = 0.0166666675f;
  8884. break;
  8885. }
  8886. }
  8887. }
  8888. }
  8889. if (isDanceStart4F)
  8890. {
  8891. if (isDanceStart4K)
  8892. {
  8893. foreach (string text3 in dance4KArray)
  8894. {
  8895. string[] array = text3.Split(new char[] { ',' });
  8896. float num10 = float.Parse(array[0]);
  8897. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8898. {
  8899. danceFace[j] = num10;
  8900. FaceName[j] = FaceName2[j];
  8901. FaceName2[j] = array[1];
  8902. FaceName3[j] = array[2];
  8903. FaceTime[j] = 0.0166666675f;
  8904. break;
  8905. }
  8906. }
  8907. }
  8908. else
  8909. {
  8910. foreach (string text3 in dance4Array)
  8911. {
  8912. string[] array = text3.Split(new char[] { ',' });
  8913. float num10 = float.Parse(array[0]);
  8914. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8915. {
  8916. danceFace[j] = num10;
  8917. FaceName[j] = FaceName2[j];
  8918. FaceName2[j] = array[1];
  8919. FaceName3[j] = array[2];
  8920. FaceTime[j] = 0.0166666675f;
  8921. break;
  8922. }
  8923. }
  8924. }
  8925. }
  8926. if (isDanceStart5F)
  8927. {
  8928. if (isDanceStart5K)
  8929. {
  8930. foreach (string text3 in dance5KArray)
  8931. {
  8932. string[] array = text3.Split(new char[] { ',' });
  8933. float num10 = float.Parse(array[0]);
  8934. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8935. {
  8936. danceFace[j] = num10;
  8937. FaceName[j] = FaceName2[j];
  8938. FaceName2[j] = array[1];
  8939. FaceName3[j] = array[2];
  8940. FaceTime[j] = 0.0166666675f;
  8941. break;
  8942. }
  8943. }
  8944. }
  8945. else
  8946. {
  8947. foreach (string text3 in dance5Array)
  8948. {
  8949. string[] array = text3.Split(new char[] { ',' });
  8950. float num10 = float.Parse(array[0]);
  8951. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8952. {
  8953. danceFace[j] = num10;
  8954. FaceName[j] = FaceName2[j];
  8955. FaceName2[j] = array[1];
  8956. FaceName3[j] = array[2];
  8957. FaceTime[j] = 0.0166666675f;
  8958. break;
  8959. }
  8960. }
  8961. }
  8962. }
  8963. if (isDanceStart6F)
  8964. {
  8965. if (isDanceStart6K)
  8966. {
  8967. foreach (string text3 in dance6KArray)
  8968. {
  8969. string[] array = text3.Split(new char[] { ',' });
  8970. float num10 = float.Parse(array[0]);
  8971. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8972. {
  8973. danceFace[j] = num10;
  8974. FaceName[j] = FaceName2[j];
  8975. FaceName2[j] = array[1];
  8976. FaceName3[j] = array[2];
  8977. FaceTime[j] = 0.0166666675f;
  8978. break;
  8979. }
  8980. }
  8981. }
  8982. else
  8983. {
  8984. foreach (string text3 in dance6Array)
  8985. {
  8986. string[] array = text3.Split(new char[] { ',' });
  8987. float num10 = float.Parse(array[0]);
  8988. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8989. {
  8990. danceFace[j] = num10;
  8991. FaceName[j] = FaceName2[j];
  8992. FaceName2[j] = array[1];
  8993. FaceName3[j] = array[2];
  8994. FaceTime[j] = 0.0166666675f;
  8995. break;
  8996. }
  8997. }
  8998. }
  8999. }
  9000. if (isDanceStart7F)
  9001. {
  9002. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9003. {
  9004. foreach (string text3 in dance6BArray)
  9005. {
  9006. string[] array = text3.Split(new char[] { ',' });
  9007. float num10 = float.Parse(array[0]);
  9008. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9009. {
  9010. danceFace[j] = num10;
  9011. FaceName[j] = FaceName2[j];
  9012. FaceName2[j] = array[1];
  9013. FaceName3[j] = array[2];
  9014. FaceTime[j] = 0.0166666675f;
  9015. break;
  9016. }
  9017. }
  9018. }
  9019. else
  9020. {
  9021. foreach (string text3 in dance6Array)
  9022. {
  9023. string[] array = text3.Split(new char[] { ',' });
  9024. float num10 = float.Parse(array[0]);
  9025. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9026. {
  9027. danceFace[j] = num10;
  9028. FaceName[j] = FaceName2[j];
  9029. FaceName2[j] = array[1];
  9030. FaceName3[j] = array[2];
  9031. FaceTime[j] = 0.0166666675f;
  9032. break;
  9033. }
  9034. }
  9035. }
  9036. }
  9037. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9038. {
  9039. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9040. {
  9041. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9042. }
  9043. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9044. {
  9045. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9046. 100f,
  9047. maidArray[j - 1].transform.position.z));
  9048. }
  9049. }
  9050. if (isDanceStart8F)
  9051. {
  9052. if (j == 1 || j == 5 || j == 9 || j == 13)
  9053. {
  9054. foreach (string text3 in dance6BArray)
  9055. {
  9056. string[] array = text3.Split(new char[] { ',' });
  9057. float num10 = float.Parse(array[0]);
  9058. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9059. {
  9060. danceFace[j] = num10;
  9061. FaceName[j] = FaceName2[j];
  9062. FaceName2[j] = array[1];
  9063. FaceName3[j] = array[2];
  9064. FaceTime[j] = 0.0166666675f;
  9065. break;
  9066. }
  9067. }
  9068. }
  9069. else if (j == 2 || j == 6 || j == 10)
  9070. {
  9071. foreach (string text3 in dance6CArray)
  9072. {
  9073. string[] array = text3.Split(new char[] { ',' });
  9074. float num10 = float.Parse(array[0]);
  9075. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9076. {
  9077. danceFace[j] = num10;
  9078. FaceName[j] = FaceName2[j];
  9079. FaceName2[j] = array[1];
  9080. FaceName3[j] = array[2];
  9081. FaceTime[j] = 0.0166666675f;
  9082. break;
  9083. }
  9084. }
  9085. }
  9086. else if (j == 3 || j == 9 || j == 11)
  9087. {
  9088. foreach (string text3 in dance6DArray)
  9089. {
  9090. string[] array = text3.Split(new char[] { ',' });
  9091. float num10 = float.Parse(array[0]);
  9092. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9093. {
  9094. danceFace[j] = num10;
  9095. FaceName[j] = FaceName2[j];
  9096. FaceName2[j] = array[1];
  9097. FaceName3[j] = array[2];
  9098. FaceTime[j] = 0.0166666675f;
  9099. break;
  9100. }
  9101. }
  9102. }
  9103. else
  9104. {
  9105. foreach (string text3 in dance6Array)
  9106. {
  9107. string[] array = text3.Split(new char[] { ',' });
  9108. float num10 = float.Parse(array[0]);
  9109. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9110. {
  9111. danceFace[j] = num10;
  9112. FaceName[j] = FaceName2[j];
  9113. FaceName2[j] = array[1];
  9114. FaceName3[j] = array[2];
  9115. FaceTime[j] = 0.0166666675f;
  9116. break;
  9117. }
  9118. }
  9119. }
  9120. }
  9121. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9122. {
  9123. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9124. {
  9125. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9126. }
  9127. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9128. {
  9129. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9130. 100f,
  9131. maidArray[j - 1].transform.position.z));
  9132. }
  9133. }
  9134. if (isDanceStart8V)
  9135. {
  9136. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9137. {
  9138. isDanceStart8P = true;
  9139. for (int num11 = 0; num11 < maidCnt; num11++)
  9140. {
  9141. if (maidArray[num11].Visible)
  9142. {
  9143. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9144. {
  9145. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9146. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9147. gameObject6.transform.position =
  9148. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9149. .position;
  9150. }
  9151. }
  9152. }
  9153. }
  9154. }
  9155. if (isDanceStart9F)
  9156. {
  9157. if (isDanceStart9K)
  9158. {
  9159. foreach (string text3 in dance9KArray)
  9160. {
  9161. string[] array = text3.Split(new char[] { ',' });
  9162. float num10 = float.Parse(array[0]);
  9163. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9164. {
  9165. danceFace[j] = num10;
  9166. FaceName[j] = FaceName2[j];
  9167. FaceName2[j] = array[1];
  9168. FaceName3[j] = array[2];
  9169. FaceTime[j] = 0.0166666675f;
  9170. break;
  9171. }
  9172. }
  9173. }
  9174. else
  9175. {
  9176. foreach (string text3 in dance7Array)
  9177. {
  9178. string[] array = text3.Split(new char[] { ',' });
  9179. float num10 = float.Parse(array[0]);
  9180. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9181. {
  9182. danceFace[j] = num10;
  9183. FaceName[j] = FaceName2[j];
  9184. FaceName2[j] = array[1];
  9185. FaceName3[j] = array[2];
  9186. FaceTime[j] = 0.0166666675f;
  9187. break;
  9188. }
  9189. }
  9190. }
  9191. }
  9192. if (isDanceStart10F)
  9193. {
  9194. foreach (string text3 in danceO1Array)
  9195. {
  9196. string[] array = text3.Split(new char[] { ',' });
  9197. float num10 = float.Parse(array[0]);
  9198. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9199. {
  9200. danceFace[j] = num10;
  9201. FaceName[j] = FaceName2[j];
  9202. FaceName2[j] = array[1];
  9203. FaceName3[j] = array[2];
  9204. FaceTime[j] = 0.0166666675f;
  9205. break;
  9206. }
  9207. }
  9208. }
  9209. if (isDanceStart11F)
  9210. {
  9211. string[] array14 = null;
  9212. string[] array12 = null;
  9213. string[] array15 = null;
  9214. if (isSS1)
  9215. {
  9216. array14 = danceO1Array;
  9217. array12 = danceO1CArray;
  9218. array15 = danceO1BArray;
  9219. }
  9220. if (isSS2)
  9221. {
  9222. array14 = danceO2Array;
  9223. array12 = danceO2BArray;
  9224. array15 = danceO2CArray;
  9225. }
  9226. if (isSS3)
  9227. {
  9228. array14 = danceO3CArray;
  9229. array12 = danceO3Array;
  9230. array15 = danceO3BArray;
  9231. }
  9232. if (isSS4)
  9233. {
  9234. array14 = danceO5BArray;
  9235. array12 = danceO5Array;
  9236. array15 = danceO5CArray;
  9237. }
  9238. if (isSS5)
  9239. {
  9240. array14 = danceO4Array;
  9241. array12 = danceO4BArray;
  9242. array15 = danceO4CArray;
  9243. }
  9244. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9245. {
  9246. foreach (string text3 in array12)
  9247. {
  9248. string[] array = text3.Split(new char[] { ',' });
  9249. float num10 = float.Parse(array[0]) - 0.03f;
  9250. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9251. {
  9252. danceFace[j] = num10;
  9253. FaceName[j] = FaceName2[j];
  9254. FaceName2[j] = array[1];
  9255. FaceName3[j] = array[2];
  9256. FaceTime[j] = 0.0166666675f;
  9257. break;
  9258. }
  9259. }
  9260. }
  9261. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9262. {
  9263. foreach (string text3 in array15)
  9264. {
  9265. string[] array = text3.Split(new char[] { ',' });
  9266. float num10 = float.Parse(array[0]) - 0.03f;
  9267. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9268. {
  9269. danceFace[j] = num10;
  9270. FaceName[j] = FaceName2[j];
  9271. FaceName2[j] = array[1];
  9272. FaceName3[j] = array[2];
  9273. FaceTime[j] = 0.0166666675f;
  9274. break;
  9275. }
  9276. }
  9277. }
  9278. else
  9279. {
  9280. foreach (string text3 in array14)
  9281. {
  9282. string[] array = text3.Split(new char[] { ',' });
  9283. float num10 = float.Parse(array[0]) - 0.03f;
  9284. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9285. {
  9286. danceFace[j] = num10;
  9287. FaceName[j] = FaceName2[j];
  9288. FaceName2[j] = array[1];
  9289. FaceName3[j] = array[2];
  9290. FaceTime[j] = 0.0166666675f;
  9291. break;
  9292. }
  9293. }
  9294. }
  9295. }
  9296. if (isDanceStart12F)
  9297. {
  9298. foreach (string text3 in dance12Array)
  9299. {
  9300. string[] array = text3.Split(new char[] { ',' });
  9301. float num10 = float.Parse(array[0]);
  9302. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9303. {
  9304. danceFace[j] = num10;
  9305. FaceName[j] = FaceName2[j];
  9306. FaceName2[j] = array[1];
  9307. FaceName3[j] = array[2];
  9308. FaceTime[j] = 0.0166666675f;
  9309. break;
  9310. }
  9311. }
  9312. }
  9313. if (isDanceStart13F)
  9314. {
  9315. if (!isDanceStart13K)
  9316. {
  9317. foreach (string text3 in dance13Array)
  9318. {
  9319. string[] array = text3.Split(new char[] { ',' });
  9320. float num10 = float.Parse(array[0]);
  9321. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9322. {
  9323. danceFace[j] = num10;
  9324. FaceName[j] = FaceName2[j];
  9325. FaceName2[j] = array[1];
  9326. FaceName3[j] = array[2];
  9327. FaceTime[j] = 0.0166666675f;
  9328. break;
  9329. }
  9330. }
  9331. }
  9332. }
  9333. if (isDanceStart14F)
  9334. {
  9335. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9336. {
  9337. foreach (string text3 in dance13BArray)
  9338. {
  9339. string[] array = text3.Split(new char[] { ',' });
  9340. float num10 = float.Parse(array[0]);
  9341. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9342. {
  9343. danceFace[j] = num10;
  9344. FaceName[j] = FaceName2[j];
  9345. FaceName2[j] = array[1];
  9346. FaceName3[j] = array[2];
  9347. FaceTime[j] = 0.0166666675f;
  9348. break;
  9349. }
  9350. }
  9351. }
  9352. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9353. {
  9354. foreach (string text3 in dance13CArray)
  9355. {
  9356. string[] array = text3.Split(new char[] { ',' });
  9357. float num10 = float.Parse(array[0]);
  9358. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9359. {
  9360. danceFace[j] = num10;
  9361. FaceName[j] = FaceName2[j];
  9362. FaceName2[j] = array[1];
  9363. FaceName3[j] = array[2];
  9364. FaceTime[j] = 0.0166666675f;
  9365. break;
  9366. }
  9367. }
  9368. }
  9369. else
  9370. {
  9371. foreach (string text3 in dance13Array)
  9372. {
  9373. string[] array = text3.Split(new char[] { ',' });
  9374. float num10 = float.Parse(array[0]);
  9375. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9376. {
  9377. danceFace[j] = num10;
  9378. FaceName[j] = FaceName2[j];
  9379. FaceName2[j] = array[1];
  9380. FaceName3[j] = array[2];
  9381. FaceTime[j] = 0.0166666675f;
  9382. break;
  9383. }
  9384. }
  9385. }
  9386. }
  9387. if (isDanceStart15F)
  9388. {
  9389. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9390. {
  9391. foreach (string text3 in dance15BArray)
  9392. {
  9393. string[] array = text3.Split(new char[] { ',' });
  9394. float num10 = float.Parse(array[0]);
  9395. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9396. {
  9397. danceFace[j] = num10;
  9398. FaceName[j] = FaceName2[j];
  9399. FaceName2[j] = array[1];
  9400. FaceName3[j] = array[2];
  9401. FaceTime[j] = 0.0166666675f;
  9402. break;
  9403. }
  9404. }
  9405. }
  9406. else
  9407. {
  9408. foreach (string text3 in dance15Array)
  9409. {
  9410. string[] array = text3.Split(new char[] { ',' });
  9411. float num10 = float.Parse(array[0]);
  9412. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9413. {
  9414. danceFace[j] = num10;
  9415. FaceName[j] = FaceName2[j];
  9416. FaceName2[j] = array[1];
  9417. FaceName3[j] = array[2];
  9418. FaceTime[j] = 0.0166666675f;
  9419. break;
  9420. }
  9421. }
  9422. }
  9423. }
  9424. if (!isFadeOut)
  9425. {
  9426. Maid maid = maidArray[j];
  9427. if (maid && maid.Visible)
  9428. {
  9429. if (maid.transform.position.y != 100f)
  9430. {
  9431. FaceTime[j] += Time.deltaTime;
  9432. if (FaceTime[j] < 1f)
  9433. {
  9434. TMorph morph = maid.body0.Face.morph;
  9435. maid.boMabataki = false;
  9436. maid.body0.Face.morph.EyeMabataki = 0f;
  9437. if (FaceName[j] != string.Empty)
  9438. {
  9439. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9440. }
  9441. if (FaceName2[j] != "")
  9442. {
  9443. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9444. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9445. }
  9446. if (FaceName3[j] != string.Empty)
  9447. {
  9448. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9449. }
  9450. maid.body0.Face.morph.FixBlendValues_Face();
  9451. }
  9452. else
  9453. {
  9454. FaceName[j] = FaceName2[j];
  9455. }
  9456. if (isHenkou)
  9457. {
  9458. TMorph morph = maid.body0.Face.morph;
  9459. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9460. maid.boMabataki = false;
  9461. if (isNamidaH)
  9462. {
  9463. fieldValue[(int)morph.hash["namida"]] = 1f;
  9464. }
  9465. else
  9466. {
  9467. fieldValue[(int)morph.hash["namida"]] = 0f;
  9468. }
  9469. if (isSekimenH)
  9470. {
  9471. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9472. }
  9473. else
  9474. {
  9475. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9476. }
  9477. if (isHohoH)
  9478. {
  9479. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9480. }
  9481. else
  9482. {
  9483. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9484. }
  9485. maid.body0.Face.morph.FixBlendValues_Face();
  9486. }
  9487. }
  9488. }
  9489. }
  9490. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9491. }
  9492. }
  9493. if (Input.GetKey(KeyCode.H) || isVR)
  9494. {
  9495. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9496. {
  9497. h2Flg = true;
  9498. isNamidaH = !isNamidaH;
  9499. isHenkou = true;
  9500. }
  9501. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9502. {
  9503. h2Flg = true;
  9504. isSekimenH = !isSekimenH;
  9505. isHenkou = true;
  9506. }
  9507. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9508. {
  9509. h2Flg = true;
  9510. isHohoH = !isHohoH;
  9511. isHenkou = true;
  9512. }
  9513. }
  9514. danceCheckIndex++;
  9515. if (danceCheckIndex == 10)
  9516. {
  9517. danceCheckIndex = 0;
  9518. }
  9519. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9520. isDanceChu = false;
  9521. for (int k = 0; k < danceCheck.Length; k++)
  9522. {
  9523. if (danceCheck[k] > 0f)
  9524. {
  9525. isDanceChu = true;
  9526. break;
  9527. }
  9528. }
  9529. if (!isDanceChu)
  9530. {
  9531. danceWait--;
  9532. if (danceWait > 0)
  9533. {
  9534. isDanceChu = true;
  9535. }
  9536. }
  9537. if (!isDanceChu)
  9538. {
  9539. for (int j = 0; j < maidCnt; j++)
  9540. {
  9541. if (maidArray[j] && maidArray[j].Visible)
  9542. {
  9543. maidArray[j].StopKuchipakuPattern();
  9544. if (isDanceStart7V)
  9545. {
  9546. maidArray[j].SetPos(dancePos[j]);
  9547. maidArray[j].body0.transform.localRotation = danceRot[j];
  9548. }
  9549. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9550. {
  9551. maidArray[j].SetPos(dancePos[j]);
  9552. maidArray[j].body0.transform.localRotation = danceRot[j];
  9553. }
  9554. if (isDanceStart11V)
  9555. {
  9556. maidArray[j].SetPos(dancePos[j]);
  9557. maidArray[j].body0.transform.localRotation = danceRot[j];
  9558. }
  9559. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9560. || isDanceStart13K)
  9561. {
  9562. maidArray[j].SetPos(dancePos[j]);
  9563. maidArray[j].body0.transform.localRotation = danceRot[j];
  9564. int i = j;
  9565. if (!isVR)
  9566. {
  9567. delCount[i] = 20;
  9568. if (goSlot[(int)selectList[i]] != null)
  9569. {
  9570. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9571. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9572. {
  9573. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9574. }
  9575. }
  9576. }
  9577. Maid maid = maidArray[j];
  9578. maid.DelProp(MPN.handitem, true);
  9579. maid.DelProp(MPN.accvag, true);
  9580. maid.DelProp(MPN.accanl, true);
  9581. maid.DelProp(MPN.kousoku_upper, true);
  9582. maid.DelProp(MPN.kousoku_lower, true);
  9583. maid.AllProcPropSeqStart();
  9584. isStop[i] = true;
  9585. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9586. isPoseIti[i] = true;
  9587. poseIti[i] = maidArray[i].transform.position;
  9588. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9589. }
  9590. if (isDanceStart14V)
  9591. {
  9592. maidArray[j].SetPos(dancePos[j]);
  9593. maidArray[j].body0.transform.localRotation = danceRot[j];
  9594. }
  9595. if (isDanceStart15V)
  9596. {
  9597. maidArray[j].SetPos(dancePos[j]);
  9598. maidArray[j].body0.transform.localRotation = danceRot[j];
  9599. }
  9600. }
  9601. }
  9602. isDanceStart1F = false;
  9603. isDanceStart1K = false;
  9604. isDanceStart2F = false;
  9605. isDanceStart3F = false;
  9606. isDanceStart3K = false;
  9607. isDanceStart4F = false;
  9608. isDanceStart4K = false;
  9609. isDanceStart5F = false;
  9610. isDanceStart5K = false;
  9611. isDanceStart6F = false;
  9612. isDanceStart6K = false;
  9613. isDanceStart7F = false;
  9614. isDanceStart7V = false;
  9615. isDanceStart8F = false;
  9616. isDanceStart8V = false;
  9617. isDanceStart8P = false;
  9618. isDanceStart9F = false;
  9619. isDanceStart9K = false;
  9620. isDanceStart10F = false;
  9621. isDanceStart11F = false;
  9622. isDanceStart11V = false;
  9623. isDanceStart12F = false;
  9624. isDanceStart13F = false;
  9625. isDanceStart13K = false;
  9626. isDanceStart14F = false;
  9627. isDanceStart14V = false;
  9628. isDanceStart15F = false;
  9629. isDanceStart15V = false;
  9630. for (int j = 0; j < maidCnt; j++)
  9631. {
  9632. danceFace[j] = 0f;
  9633. }
  9634. danceCheckIndex = 0;
  9635. for (int k = 0; k < danceCheck.Length; k++)
  9636. {
  9637. danceCheck[danceCheckIndex] = 1f;
  9638. }
  9639. isDance = false;
  9640. }
  9641. }
  9642. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9643. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9644. {
  9645. if (getModKeyPressing(modKey.Shift))
  9646. {
  9647. isShift = true;
  9648. }
  9649. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9650. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9651. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9652. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9653. if (!isShift)
  9654. {
  9655. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9656. }
  9657. for (int j = 0; j < maidCnt; j++)
  9658. {
  9659. string text5 = "dance_cm3d2_001_f1.anm";
  9660. switch (j)
  9661. {
  9662. case 1:
  9663. case 3:
  9664. case 5:
  9665. case 7:
  9666. case 9:
  9667. case 11:
  9668. case 13:
  9669. text5 = "dance_cm3d2_001_f2.anm";
  9670. break;
  9671. case 2:
  9672. case 4:
  9673. case 6:
  9674. case 8:
  9675. case 10:
  9676. case 12:
  9677. text5 = "dance_cm3d2_001_f3.anm";
  9678. break;
  9679. }
  9680. if (!isShift)
  9681. {
  9682. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9683. {
  9684. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9685. }
  9686. }
  9687. else
  9688. {
  9689. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9690. {
  9691. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9692. GameUty.FileSystem,
  9693. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9694. false,
  9695. false);
  9696. }
  9697. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9698. text4 = textAsset.text;
  9699. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9700. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9701. && !isDanceStart9K && !isDanceStart13K)
  9702. {
  9703. dancePos[j] = maidArray[j].transform.position;
  9704. danceRot[j] = maidArray[j].transform.localRotation;
  9705. }
  9706. }
  9707. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9708. }
  9709. if (!isShift)
  9710. {
  9711. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9712. sw = new Stopwatch();
  9713. sw.Start();
  9714. }
  9715. else if (getModKeyPressing(modKey.Ctrl))
  9716. {
  9717. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9718. }
  9719. else
  9720. {
  9721. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9722. }
  9723. for (int j = 0; j < maidCnt; j++)
  9724. {
  9725. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9726. Vector3 vector = Vector3.zero;
  9727. switch (j)
  9728. {
  9729. case 3:
  9730. vector.x = 1f;
  9731. break;
  9732. case 4:
  9733. vector.x = -1f;
  9734. break;
  9735. case 5:
  9736. vector.x = 2f;
  9737. break;
  9738. case 6:
  9739. vector.x = -2f;
  9740. break;
  9741. case 7:
  9742. vector.x = 3f;
  9743. break;
  9744. case 8:
  9745. vector.x = -3f;
  9746. break;
  9747. case 9:
  9748. vector.x = 4f;
  9749. break;
  9750. case 10:
  9751. vector.x = -4f;
  9752. break;
  9753. case 11:
  9754. vector.x = 5f;
  9755. break;
  9756. case 12:
  9757. vector.x = -5f;
  9758. break;
  9759. case 13:
  9760. vector.x = 6f;
  9761. break;
  9762. }
  9763. if (!isShift)
  9764. {
  9765. maidArray[j].SetPos(vector);
  9766. }
  9767. isStop[j] = false;
  9768. isLock[j] = false;
  9769. pHandL[j] = 0;
  9770. pHandR[j] = 0;
  9771. muneIKL[j] = false;
  9772. muneIKR[j] = false;
  9773. if (!isVR)
  9774. {
  9775. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9776. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9777. }
  9778. }
  9779. ikBui = 5;
  9780. isDanceStart1F = false;
  9781. isDanceStart2F = false;
  9782. isDanceStart3F = false;
  9783. isDanceStart4F = false;
  9784. isDanceStart5F = false;
  9785. isDanceStart6F = false;
  9786. isDanceStart7F = false;
  9787. isDanceStart8F = false;
  9788. isDanceStart9F = false;
  9789. isDanceStart10F = false;
  9790. isDanceStart11F = false;
  9791. isDanceStart12F = false;
  9792. isDanceStart13F = false;
  9793. isDanceStart14F = false;
  9794. isDanceStart15F = false;
  9795. for (int j = 0; j < maidCnt; j++)
  9796. {
  9797. danceFace[j] = 0f;
  9798. }
  9799. if (isDanceStart7V)
  9800. {
  9801. for (int j = 0; j < maidCnt; j++)
  9802. {
  9803. if (maidArray[j] && maidArray[j].Visible)
  9804. {
  9805. if (isDanceStart7V)
  9806. {
  9807. maidArray[j].SetPos(dancePos[j]);
  9808. maidArray[j].body0.transform.localRotation = danceRot[j];
  9809. }
  9810. }
  9811. }
  9812. isDanceStart7V = false;
  9813. }
  9814. if (isDanceStart8V)
  9815. {
  9816. for (int j = 0; j < maidCnt; j++)
  9817. {
  9818. if (maidArray[j] && maidArray[j].Visible)
  9819. {
  9820. if (isDanceStart8V)
  9821. {
  9822. maidArray[j].SetPos(dancePos[j]);
  9823. maidArray[j].body0.transform.localRotation = danceRot[j];
  9824. }
  9825. }
  9826. }
  9827. isDanceStart8V = false;
  9828. isDanceStart8P = false;
  9829. }
  9830. if (isDanceStart11V)
  9831. {
  9832. for (int j = 0; j < maidCnt; j++)
  9833. {
  9834. if (maidArray[j] && maidArray[j].Visible)
  9835. {
  9836. if (isDanceStart11V)
  9837. {
  9838. maidArray[j].SetPos(dancePos[j]);
  9839. maidArray[j].body0.transform.localRotation = danceRot[j];
  9840. }
  9841. }
  9842. }
  9843. isDanceStart11V = false;
  9844. }
  9845. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9846. || isDanceStart13K)
  9847. {
  9848. for (int j = 0; j < maidCnt; j++)
  9849. {
  9850. if (maidArray[j] && maidArray[j].Visible)
  9851. {
  9852. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9853. || isDanceStart13K)
  9854. {
  9855. maidArray[j].SetPos(dancePos[j]);
  9856. maidArray[j].body0.transform.localRotation = danceRot[j];
  9857. int i = j;
  9858. if (!isVR)
  9859. {
  9860. delCount[i] = 20;
  9861. if (goSlot[(int)selectList[i]] != null)
  9862. {
  9863. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9864. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9865. {
  9866. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9867. }
  9868. }
  9869. }
  9870. Maid maid = maidArray[j];
  9871. maid.DelProp(MPN.handitem, true);
  9872. maid.DelProp(MPN.accvag, true);
  9873. maid.DelProp(MPN.accanl, true);
  9874. maid.DelProp(MPN.kousoku_upper, true);
  9875. maid.DelProp(MPN.kousoku_lower, true);
  9876. maid.AllProcPropSeqStart();
  9877. }
  9878. }
  9879. }
  9880. isDanceStart1K = false;
  9881. isDanceStart3K = false;
  9882. isDanceStart4K = false;
  9883. isDanceStart5K = false;
  9884. isDanceStart6K = false;
  9885. isDanceStart9K = false;
  9886. isDanceStart13K = false;
  9887. }
  9888. if (isDanceStart14V)
  9889. {
  9890. for (int j = 0; j < maidCnt; j++)
  9891. {
  9892. if (maidArray[j] && maidArray[j].Visible)
  9893. {
  9894. if (isDanceStart14V)
  9895. {
  9896. maidArray[j].SetPos(dancePos[j]);
  9897. maidArray[j].body0.transform.localRotation = danceRot[j];
  9898. }
  9899. }
  9900. }
  9901. isDanceStart14V = false;
  9902. }
  9903. if (isDanceStart15V)
  9904. {
  9905. for (int j = 0; j < maidCnt; j++)
  9906. {
  9907. if (maidArray[j] && maidArray[j].Visible)
  9908. {
  9909. if (isDanceStart15V)
  9910. {
  9911. maidArray[j].SetPos(dancePos[j]);
  9912. maidArray[j].body0.transform.localRotation = danceRot[j];
  9913. }
  9914. }
  9915. }
  9916. isDanceStart15V = false;
  9917. }
  9918. if (isShift)
  9919. {
  9920. if (maidArray[1] && maidArray[1].Visible)
  9921. {
  9922. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9923. {
  9924. Vector3 vector = Vector3.zero;
  9925. vector.x = 0.6f;
  9926. maidArray[1].SetPos(vector);
  9927. if (maidArray[2] && maidArray[2].Visible)
  9928. {
  9929. vector.x = -0.6f;
  9930. maidArray[2].SetPos(vector);
  9931. }
  9932. if (maidArray[3] && maidArray[3].Visible)
  9933. {
  9934. vector.x = 1.2f;
  9935. maidArray[3].SetPos(vector);
  9936. }
  9937. if (maidArray[4] && maidArray[4].Visible)
  9938. {
  9939. vector.x = -1.2f;
  9940. maidArray[4].SetPos(vector);
  9941. }
  9942. if (maidArray[5] && maidArray[5].Visible)
  9943. {
  9944. vector.x = 1.8f;
  9945. maidArray[5].SetPos(vector);
  9946. }
  9947. if (maidArray[6] && maidArray[6].Visible)
  9948. {
  9949. vector.x = -1.8f;
  9950. maidArray[6].SetPos(vector);
  9951. }
  9952. if (maidArray[7] && maidArray[7].Visible)
  9953. {
  9954. vector.x = 2.4f;
  9955. maidArray[7].SetPos(vector);
  9956. }
  9957. if (maidArray[8] && maidArray[8].Visible)
  9958. {
  9959. vector.x = -2.4f;
  9960. maidArray[8].SetPos(vector);
  9961. }
  9962. if (maidArray[9] && maidArray[9].Visible)
  9963. {
  9964. vector.x = 3f;
  9965. maidArray[9].SetPos(vector);
  9966. }
  9967. if (maidArray[10] && maidArray[10].Visible)
  9968. {
  9969. vector.x = -3f;
  9970. maidArray[10].SetPos(vector);
  9971. }
  9972. if (maidArray[11] && maidArray[11].Visible)
  9973. {
  9974. vector.x = 3.6f;
  9975. maidArray[11].SetPos(vector);
  9976. }
  9977. if (maidArray[12] && maidArray[12].Visible)
  9978. {
  9979. vector.x = -3.6f;
  9980. maidArray[12].SetPos(vector);
  9981. }
  9982. if (maidArray[13] && maidArray[13].Visible)
  9983. {
  9984. vector.x = 4.2f;
  9985. maidArray[13].SetPos(vector);
  9986. }
  9987. }
  9988. }
  9989. isDanceStart1K = true;
  9990. for (int j = 0; j < maidCnt; j++)
  9991. {
  9992. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9993. maidArray[j].body0.transform.localRotation.y + 90f,
  9994. maidArray[j].body0.transform.localRotation.z));
  9995. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9996. maidArray[j].body0.transform.position.y,
  9997. maidArray[j].body0.transform.position.z + 4f));
  9998. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9999. int i = j;
  10000. Maid maid = maidArray[j];
  10001. if (!isVR)
  10002. {
  10003. delCount[i] = 20;
  10004. if (goSlot[(int)selectList[i]] != null)
  10005. {
  10006. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10007. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10008. {
  10009. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10010. }
  10011. }
  10012. }
  10013. string[] array = new string[2];
  10014. array = text2.Split(new char[] { ',' });
  10015. maid.DelProp(MPN.handitem, true);
  10016. maid.DelProp(MPN.accvag, true);
  10017. maid.DelProp(MPN.accanl, true);
  10018. maid.DelProp(MPN.kousoku_upper, true);
  10019. maid.DelProp(MPN.kousoku_lower, true);
  10020. if (array[0] != "")
  10021. {
  10022. maid.SetProp(array[0], array[1], 0, true, false);
  10023. }
  10024. maid.AllProcPropSeqStart();
  10025. }
  10026. }
  10027. isDance = true;
  10028. isDanceStart1 = true;
  10029. }
  10030. if (isF2)
  10031. {
  10032. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10033. string text4 = textAsset.text;
  10034. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10035. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10036. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10037. for (int j = 0; j < maidCnt; j++)
  10038. {
  10039. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10040. {
  10041. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10042. GameUty.FileSystem,
  10043. "dance_cm3d_001_f1.anm",
  10044. false,
  10045. false);
  10046. }
  10047. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10048. }
  10049. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10050. for (int j = 0; j < maidCnt; j++)
  10051. {
  10052. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10053. isStop[j] = false;
  10054. isLock[j] = false;
  10055. pHandL[j] = 0;
  10056. pHandR[j] = 0;
  10057. muneIKL[j] = false;
  10058. muneIKR[j] = false;
  10059. if (!isVR)
  10060. {
  10061. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10062. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10063. }
  10064. }
  10065. ikBui = 5;
  10066. isDanceStart1F = false;
  10067. isDanceStart2F = false;
  10068. isDanceStart3F = false;
  10069. isDanceStart4F = false;
  10070. isDanceStart5F = false;
  10071. isDanceStart6F = false;
  10072. isDanceStart7F = false;
  10073. isDanceStart8F = false;
  10074. isDanceStart9F = false;
  10075. isDanceStart10F = false;
  10076. isDanceStart11F = false;
  10077. isDanceStart12F = false;
  10078. isDanceStart13F = false;
  10079. isDanceStart14F = false;
  10080. isDanceStart15F = false;
  10081. for (int j = 0; j < maidCnt; j++)
  10082. {
  10083. danceFace[j] = 0f;
  10084. }
  10085. if (isDanceStart7V)
  10086. {
  10087. for (int j = 0; j < maidCnt; j++)
  10088. {
  10089. if (maidArray[j] && maidArray[j].Visible)
  10090. {
  10091. if (isDanceStart7V)
  10092. {
  10093. maidArray[j].SetPos(dancePos[j]);
  10094. maidArray[j].body0.transform.localRotation = danceRot[j];
  10095. }
  10096. }
  10097. }
  10098. isDanceStart7V = false;
  10099. }
  10100. if (isDanceStart8V)
  10101. {
  10102. for (int j = 0; j < maidCnt; j++)
  10103. {
  10104. if (maidArray[j] && maidArray[j].Visible)
  10105. {
  10106. if (isDanceStart8V)
  10107. {
  10108. maidArray[j].SetPos(dancePos[j]);
  10109. maidArray[j].body0.transform.localRotation = danceRot[j];
  10110. }
  10111. }
  10112. }
  10113. isDanceStart8V = false;
  10114. isDanceStart8P = false;
  10115. }
  10116. if (isDanceStart11V)
  10117. {
  10118. for (int j = 0; j < maidCnt; j++)
  10119. {
  10120. if (maidArray[j] && maidArray[j].Visible)
  10121. {
  10122. if (isDanceStart11V)
  10123. {
  10124. maidArray[j].SetPos(dancePos[j]);
  10125. maidArray[j].body0.transform.localRotation = danceRot[j];
  10126. }
  10127. }
  10128. }
  10129. isDanceStart11V = false;
  10130. }
  10131. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10132. || isDanceStart13K)
  10133. {
  10134. for (int j = 0; j < maidCnt; j++)
  10135. {
  10136. if (maidArray[j] && maidArray[j].Visible)
  10137. {
  10138. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10139. || isDanceStart13K)
  10140. {
  10141. maidArray[j].SetPos(dancePos[j]);
  10142. maidArray[j].body0.transform.localRotation = danceRot[j];
  10143. int i = j;
  10144. if (!isVR)
  10145. {
  10146. delCount[i] = 20;
  10147. if (goSlot[(int)selectList[i]] != null)
  10148. {
  10149. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10150. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10151. {
  10152. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10153. }
  10154. }
  10155. }
  10156. Maid maid = maidArray[j];
  10157. maid.DelProp(MPN.handitem, true);
  10158. maid.DelProp(MPN.accvag, true);
  10159. maid.DelProp(MPN.accanl, true);
  10160. maid.DelProp(MPN.kousoku_upper, true);
  10161. maid.DelProp(MPN.kousoku_lower, true);
  10162. maid.AllProcPropSeqStart();
  10163. }
  10164. }
  10165. }
  10166. isDanceStart1K = false;
  10167. isDanceStart3K = false;
  10168. isDanceStart4K = false;
  10169. isDanceStart5K = false;
  10170. isDanceStart6K = false;
  10171. isDanceStart9K = false;
  10172. isDanceStart13K = false;
  10173. }
  10174. if (isDanceStart14V)
  10175. {
  10176. for (int j = 0; j < maidCnt; j++)
  10177. {
  10178. if (maidArray[j] && maidArray[j].Visible)
  10179. {
  10180. if (isDanceStart14V)
  10181. {
  10182. maidArray[j].SetPos(dancePos[j]);
  10183. maidArray[j].body0.transform.localRotation = danceRot[j];
  10184. }
  10185. }
  10186. }
  10187. isDanceStart14V = false;
  10188. }
  10189. if (isDanceStart15V)
  10190. {
  10191. for (int j = 0; j < maidCnt; j++)
  10192. {
  10193. if (maidArray[j] && maidArray[j].Visible)
  10194. {
  10195. if (isDanceStart15V)
  10196. {
  10197. maidArray[j].SetPos(dancePos[j]);
  10198. maidArray[j].body0.transform.localRotation = danceRot[j];
  10199. }
  10200. }
  10201. }
  10202. isDanceStart15V = false;
  10203. }
  10204. if (maidArray[1] && maidArray[1].Visible)
  10205. {
  10206. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10207. {
  10208. Vector3 vector = Vector3.zero;
  10209. vector.x = 0.6f;
  10210. maidArray[1].SetPos(vector);
  10211. if (maidArray[2] && maidArray[2].Visible)
  10212. {
  10213. vector.x = -0.6f;
  10214. maidArray[2].SetPos(vector);
  10215. }
  10216. if (maidArray[3] && maidArray[3].Visible)
  10217. {
  10218. vector.x = 1.2f;
  10219. maidArray[3].SetPos(vector);
  10220. }
  10221. if (maidArray[4] && maidArray[4].Visible)
  10222. {
  10223. vector.x = -1.2f;
  10224. maidArray[4].SetPos(vector);
  10225. }
  10226. if (maidArray[5] && maidArray[5].Visible)
  10227. {
  10228. vector.x = 1.8f;
  10229. maidArray[5].SetPos(vector);
  10230. }
  10231. if (maidArray[6] && maidArray[6].Visible)
  10232. {
  10233. vector.x = -1.8f;
  10234. maidArray[6].SetPos(vector);
  10235. }
  10236. if (maidArray[7] && maidArray[7].Visible)
  10237. {
  10238. vector.x = 2.4f;
  10239. maidArray[7].SetPos(vector);
  10240. }
  10241. if (maidArray[8] && maidArray[8].Visible)
  10242. {
  10243. vector.x = -2.4f;
  10244. maidArray[8].SetPos(vector);
  10245. }
  10246. if (maidArray[9] && maidArray[9].Visible)
  10247. {
  10248. vector.x = 3f;
  10249. maidArray[9].SetPos(vector);
  10250. }
  10251. if (maidArray[10] && maidArray[10].Visible)
  10252. {
  10253. vector.x = -3f;
  10254. maidArray[10].SetPos(vector);
  10255. }
  10256. if (maidArray[11] && maidArray[11].Visible)
  10257. {
  10258. vector.x = 3.6f;
  10259. maidArray[11].SetPos(vector);
  10260. }
  10261. if (maidArray[12] && maidArray[12].Visible)
  10262. {
  10263. vector.x = -3.6f;
  10264. maidArray[12].SetPos(vector);
  10265. }
  10266. if (maidArray[13] && maidArray[13].Visible)
  10267. {
  10268. vector.x = 4.2f;
  10269. maidArray[13].SetPos(vector);
  10270. }
  10271. }
  10272. }
  10273. isDance = true;
  10274. isDanceStart2 = true;
  10275. isF2 = false;
  10276. }
  10277. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10278. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10279. {
  10280. GameMain.Instance.SoundMgr.StopBGM(0f);
  10281. isF2 = true;
  10282. }
  10283. if (isF3)
  10284. {
  10285. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10286. string text4 = textAsset.text;
  10287. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10288. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10289. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10290. for (int j = 0; j < maidCnt; j++)
  10291. {
  10292. if (!isShift)
  10293. {
  10294. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10295. {
  10296. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10297. GameUty.FileSystem,
  10298. "dance_cm3d_002_end_f1.anm",
  10299. false,
  10300. false);
  10301. }
  10302. }
  10303. else
  10304. {
  10305. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10306. {
  10307. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10308. GameUty.FileSystem,
  10309. "dance_cm3d2_kara_001_sl_f1.anm",
  10310. false,
  10311. false);
  10312. }
  10313. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10314. text4 = textAsset.text;
  10315. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10316. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10317. && !isDanceStart9K && !isDanceStart13K)
  10318. {
  10319. dancePos[j] = maidArray[j].transform.position;
  10320. danceRot[j] = maidArray[j].transform.localRotation;
  10321. }
  10322. }
  10323. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10324. }
  10325. if (!isShift)
  10326. {
  10327. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10328. }
  10329. else
  10330. {
  10331. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10332. }
  10333. for (int j = 0; j < maidCnt; j++)
  10334. {
  10335. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10336. isStop[j] = false;
  10337. isLock[j] = false;
  10338. pHandL[j] = 0;
  10339. pHandR[j] = 0;
  10340. muneIKL[j] = false;
  10341. muneIKR[j] = false;
  10342. if (!isVR)
  10343. {
  10344. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10345. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10346. }
  10347. }
  10348. ikBui = 5;
  10349. isDanceStart1F = false;
  10350. isDanceStart2F = false;
  10351. isDanceStart3F = false;
  10352. isDanceStart4F = false;
  10353. isDanceStart5F = false;
  10354. isDanceStart6F = false;
  10355. isDanceStart7F = false;
  10356. isDanceStart8F = false;
  10357. isDanceStart9F = false;
  10358. isDanceStart10F = false;
  10359. isDanceStart11F = false;
  10360. isDanceStart12F = false;
  10361. isDanceStart13F = false;
  10362. isDanceStart14F = false;
  10363. isDanceStart15F = false;
  10364. for (int j = 0; j < maidCnt; j++)
  10365. {
  10366. danceFace[j] = 0f;
  10367. }
  10368. if (isDanceStart7V)
  10369. {
  10370. for (int j = 0; j < maidCnt; j++)
  10371. {
  10372. if (maidArray[j] && maidArray[j].Visible)
  10373. {
  10374. if (isDanceStart7V)
  10375. {
  10376. maidArray[j].SetPos(dancePos[j]);
  10377. maidArray[j].body0.transform.localRotation = danceRot[j];
  10378. }
  10379. }
  10380. }
  10381. isDanceStart7V = false;
  10382. }
  10383. if (isDanceStart8V)
  10384. {
  10385. for (int j = 0; j < maidCnt; j++)
  10386. {
  10387. if (maidArray[j] && maidArray[j].Visible)
  10388. {
  10389. if (isDanceStart8V)
  10390. {
  10391. maidArray[j].SetPos(dancePos[j]);
  10392. maidArray[j].body0.transform.localRotation = danceRot[j];
  10393. }
  10394. }
  10395. }
  10396. isDanceStart8V = false;
  10397. isDanceStart8P = false;
  10398. }
  10399. if (isDanceStart11V)
  10400. {
  10401. for (int j = 0; j < maidCnt; j++)
  10402. {
  10403. if (maidArray[j] && maidArray[j].Visible)
  10404. {
  10405. if (isDanceStart11V)
  10406. {
  10407. maidArray[j].SetPos(dancePos[j]);
  10408. maidArray[j].body0.transform.localRotation = danceRot[j];
  10409. }
  10410. }
  10411. }
  10412. isDanceStart11V = false;
  10413. }
  10414. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10415. || isDanceStart13K)
  10416. {
  10417. for (int j = 0; j < maidCnt; j++)
  10418. {
  10419. if (maidArray[j] && maidArray[j].Visible)
  10420. {
  10421. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10422. || isDanceStart13K)
  10423. {
  10424. maidArray[j].SetPos(dancePos[j]);
  10425. maidArray[j].body0.transform.localRotation = danceRot[j];
  10426. int i = j;
  10427. if (!isVR)
  10428. {
  10429. delCount[i] = 20;
  10430. if (goSlot[(int)selectList[i]] != null)
  10431. {
  10432. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10433. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10434. {
  10435. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10436. }
  10437. }
  10438. }
  10439. Maid maid = maidArray[j];
  10440. maid.DelProp(MPN.handitem, true);
  10441. maid.DelProp(MPN.accvag, true);
  10442. maid.DelProp(MPN.accanl, true);
  10443. maid.DelProp(MPN.kousoku_upper, true);
  10444. maid.DelProp(MPN.kousoku_lower, true);
  10445. maid.AllProcPropSeqStart();
  10446. }
  10447. }
  10448. }
  10449. isDanceStart1K = false;
  10450. isDanceStart3K = false;
  10451. isDanceStart4K = false;
  10452. isDanceStart5K = false;
  10453. isDanceStart6K = false;
  10454. isDanceStart9K = false;
  10455. isDanceStart13K = false;
  10456. }
  10457. if (isDanceStart14V)
  10458. {
  10459. for (int j = 0; j < maidCnt; j++)
  10460. {
  10461. if (maidArray[j] && maidArray[j].Visible)
  10462. {
  10463. if (isDanceStart14V)
  10464. {
  10465. maidArray[j].SetPos(dancePos[j]);
  10466. maidArray[j].body0.transform.localRotation = danceRot[j];
  10467. }
  10468. }
  10469. }
  10470. isDanceStart14V = false;
  10471. }
  10472. if (isDanceStart15V)
  10473. {
  10474. for (int j = 0; j < maidCnt; j++)
  10475. {
  10476. if (maidArray[j] && maidArray[j].Visible)
  10477. {
  10478. if (isDanceStart15V)
  10479. {
  10480. maidArray[j].SetPos(dancePos[j]);
  10481. maidArray[j].body0.transform.localRotation = danceRot[j];
  10482. }
  10483. }
  10484. }
  10485. isDanceStart15V = false;
  10486. }
  10487. if (maidArray[1] && maidArray[1].Visible)
  10488. {
  10489. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10490. {
  10491. Vector3 vector = Vector3.zero;
  10492. vector.x = 0.6f;
  10493. maidArray[1].SetPos(vector);
  10494. if (maidArray[2] && maidArray[2].Visible)
  10495. {
  10496. vector.x = -0.6f;
  10497. maidArray[2].SetPos(vector);
  10498. }
  10499. if (maidArray[3] && maidArray[3].Visible)
  10500. {
  10501. vector.x = 1.2f;
  10502. maidArray[3].SetPos(vector);
  10503. }
  10504. if (maidArray[4] && maidArray[4].Visible)
  10505. {
  10506. vector.x = -1.2f;
  10507. maidArray[4].SetPos(vector);
  10508. }
  10509. if (maidArray[5] && maidArray[5].Visible)
  10510. {
  10511. vector.x = 1.8f;
  10512. maidArray[5].SetPos(vector);
  10513. }
  10514. if (maidArray[6] && maidArray[6].Visible)
  10515. {
  10516. vector.x = -1.8f;
  10517. maidArray[6].SetPos(vector);
  10518. }
  10519. if (maidArray[7] && maidArray[7].Visible)
  10520. {
  10521. vector.x = 2.4f;
  10522. maidArray[7].SetPos(vector);
  10523. }
  10524. if (maidArray[8] && maidArray[8].Visible)
  10525. {
  10526. vector.x = -2.4f;
  10527. maidArray[8].SetPos(vector);
  10528. }
  10529. if (maidArray[9] && maidArray[9].Visible)
  10530. {
  10531. vector.x = 3f;
  10532. maidArray[9].SetPos(vector);
  10533. }
  10534. if (maidArray[10] && maidArray[10].Visible)
  10535. {
  10536. vector.x = -3f;
  10537. maidArray[10].SetPos(vector);
  10538. }
  10539. if (maidArray[11] && maidArray[11].Visible)
  10540. {
  10541. vector.x = 3.6f;
  10542. maidArray[11].SetPos(vector);
  10543. }
  10544. if (maidArray[12] && maidArray[12].Visible)
  10545. {
  10546. vector.x = -3.6f;
  10547. maidArray[12].SetPos(vector);
  10548. }
  10549. if (maidArray[13] && maidArray[13].Visible)
  10550. {
  10551. vector.x = 4.2f;
  10552. maidArray[13].SetPos(vector);
  10553. }
  10554. }
  10555. }
  10556. if (isShift)
  10557. {
  10558. isDanceStart3K = true;
  10559. for (int j = 0; j < maidCnt; j++)
  10560. {
  10561. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10562. maidArray[j].body0.transform.localRotation.y + 90f,
  10563. maidArray[j].body0.transform.localRotation.z));
  10564. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10565. maidArray[j].body0.transform.position.y,
  10566. maidArray[j].body0.transform.position.z + 4f));
  10567. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10568. int i = j;
  10569. Maid maid = maidArray[j];
  10570. if (!isVR)
  10571. {
  10572. delCount[i] = 20;
  10573. if (goSlot[(int)selectList[i]] != null)
  10574. {
  10575. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10576. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10577. {
  10578. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10579. }
  10580. }
  10581. }
  10582. string[] array = new string[2];
  10583. array = text2.Split(new char[] { ',' });
  10584. maid.DelProp(MPN.handitem, true);
  10585. maid.DelProp(MPN.accvag, true);
  10586. maid.DelProp(MPN.accanl, true);
  10587. maid.DelProp(MPN.kousoku_upper, true);
  10588. maid.DelProp(MPN.kousoku_lower, true);
  10589. if (array[0] != "")
  10590. {
  10591. maid.SetProp(array[0], array[1], 0, true, false);
  10592. }
  10593. maid.AllProcPropSeqStart();
  10594. }
  10595. }
  10596. isDance = true;
  10597. isDanceStart3 = true;
  10598. isF3 = false;
  10599. }
  10600. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10601. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10602. {
  10603. GameMain.Instance.SoundMgr.StopBGM(0f);
  10604. isF3 = true;
  10605. if (getModKeyPressing(modKey.Shift))
  10606. {
  10607. isShift = true;
  10608. }
  10609. }
  10610. if (isSF1 || isSF2 || isSF3)
  10611. {
  10612. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10613. string text4 = textAsset.text;
  10614. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10615. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10616. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10617. for (int j = 0; j < maidCnt; j++)
  10618. {
  10619. if (!isShift)
  10620. {
  10621. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10622. {
  10623. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10624. GameUty.FileSystem,
  10625. "dance_cm3d2_002_smt_f.anm",
  10626. false,
  10627. false);
  10628. }
  10629. }
  10630. else
  10631. {
  10632. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10633. {
  10634. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10635. GameUty.FileSystem,
  10636. "dance_cm3d2_kara02_001_smt_f1.anm",
  10637. false,
  10638. false);
  10639. }
  10640. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10641. text4 = textAsset.text;
  10642. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10643. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10644. && !isDanceStart9K && !isDanceStart13K)
  10645. {
  10646. dancePos[j] = maidArray[j].transform.position;
  10647. danceRot[j] = maidArray[j].transform.localRotation;
  10648. }
  10649. }
  10650. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10651. }
  10652. if (!isShift)
  10653. {
  10654. if (isSF1)
  10655. {
  10656. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10657. }
  10658. if (isSF2)
  10659. {
  10660. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10661. }
  10662. if (isSF3)
  10663. {
  10664. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10665. }
  10666. }
  10667. else
  10668. {
  10669. if (isSF1)
  10670. {
  10671. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10672. }
  10673. if (isSF2)
  10674. {
  10675. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10676. }
  10677. if (isSF3)
  10678. {
  10679. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10680. }
  10681. }
  10682. for (int j = 0; j < maidCnt; j++)
  10683. {
  10684. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10685. isStop[j] = false;
  10686. isLock[j] = false;
  10687. pHandL[j] = 0;
  10688. pHandR[j] = 0;
  10689. muneIKL[j] = false;
  10690. muneIKR[j] = false;
  10691. if (!isVR)
  10692. {
  10693. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10694. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10695. }
  10696. }
  10697. ikBui = 5;
  10698. isDanceStart1F = false;
  10699. isDanceStart2F = false;
  10700. isDanceStart3F = false;
  10701. isDanceStart4F = false;
  10702. isDanceStart5F = false;
  10703. isDanceStart6F = false;
  10704. isDanceStart7F = false;
  10705. isDanceStart8F = false;
  10706. isDanceStart9F = false;
  10707. isDanceStart10F = false;
  10708. isDanceStart11F = false;
  10709. isDanceStart12F = false;
  10710. isDanceStart13F = false;
  10711. isDanceStart14F = false;
  10712. isDanceStart15F = false;
  10713. for (int j = 0; j < maidCnt; j++)
  10714. {
  10715. danceFace[j] = 0f;
  10716. }
  10717. if (isDanceStart7V)
  10718. {
  10719. for (int j = 0; j < maidCnt; j++)
  10720. {
  10721. if (maidArray[j] && maidArray[j].Visible)
  10722. {
  10723. if (isDanceStart7V)
  10724. {
  10725. maidArray[j].SetPos(dancePos[j]);
  10726. maidArray[j].body0.transform.localRotation = danceRot[j];
  10727. }
  10728. }
  10729. }
  10730. isDanceStart7V = false;
  10731. }
  10732. if (isDanceStart8V)
  10733. {
  10734. for (int j = 0; j < maidCnt; j++)
  10735. {
  10736. if (maidArray[j] && maidArray[j].Visible)
  10737. {
  10738. if (isDanceStart8V)
  10739. {
  10740. maidArray[j].SetPos(dancePos[j]);
  10741. maidArray[j].body0.transform.localRotation = danceRot[j];
  10742. }
  10743. }
  10744. }
  10745. isDanceStart8V = false;
  10746. isDanceStart8P = false;
  10747. }
  10748. if (isDanceStart11V)
  10749. {
  10750. for (int j = 0; j < maidCnt; j++)
  10751. {
  10752. if (maidArray[j] && maidArray[j].Visible)
  10753. {
  10754. if (isDanceStart11V)
  10755. {
  10756. maidArray[j].SetPos(dancePos[j]);
  10757. maidArray[j].body0.transform.localRotation = danceRot[j];
  10758. }
  10759. }
  10760. }
  10761. isDanceStart11V = false;
  10762. }
  10763. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10764. || isDanceStart13K)
  10765. {
  10766. for (int j = 0; j < maidCnt; j++)
  10767. {
  10768. if (maidArray[j] && maidArray[j].Visible)
  10769. {
  10770. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10771. || isDanceStart13K)
  10772. {
  10773. maidArray[j].SetPos(dancePos[j]);
  10774. maidArray[j].body0.transform.localRotation = danceRot[j];
  10775. int i = j;
  10776. if (!isVR)
  10777. {
  10778. delCount[i] = 20;
  10779. if (goSlot[(int)selectList[i]] != null)
  10780. {
  10781. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10782. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10783. {
  10784. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10785. }
  10786. }
  10787. }
  10788. Maid maid = maidArray[j];
  10789. maid.DelProp(MPN.handitem, true);
  10790. maid.DelProp(MPN.accvag, true);
  10791. maid.DelProp(MPN.accanl, true);
  10792. maid.DelProp(MPN.kousoku_upper, true);
  10793. maid.DelProp(MPN.kousoku_lower, true);
  10794. maid.AllProcPropSeqStart();
  10795. }
  10796. }
  10797. }
  10798. isDanceStart1K = false;
  10799. isDanceStart3K = false;
  10800. isDanceStart4K = false;
  10801. isDanceStart5K = false;
  10802. isDanceStart6K = false;
  10803. isDanceStart9K = false;
  10804. isDanceStart13K = false;
  10805. }
  10806. if (isDanceStart14V)
  10807. {
  10808. for (int j = 0; j < maidCnt; j++)
  10809. {
  10810. if (maidArray[j] && maidArray[j].Visible)
  10811. {
  10812. if (isDanceStart14V)
  10813. {
  10814. maidArray[j].SetPos(dancePos[j]);
  10815. maidArray[j].body0.transform.localRotation = danceRot[j];
  10816. }
  10817. }
  10818. }
  10819. isDanceStart14V = false;
  10820. }
  10821. if (isDanceStart15V)
  10822. {
  10823. for (int j = 0; j < maidCnt; j++)
  10824. {
  10825. if (maidArray[j] && maidArray[j].Visible)
  10826. {
  10827. if (isDanceStart15V)
  10828. {
  10829. maidArray[j].SetPos(dancePos[j]);
  10830. maidArray[j].body0.transform.localRotation = danceRot[j];
  10831. }
  10832. }
  10833. }
  10834. isDanceStart15V = false;
  10835. }
  10836. if (maidArray[1] && maidArray[1].Visible)
  10837. {
  10838. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10839. {
  10840. Vector3 vector = Vector3.zero;
  10841. vector.x = 0.6f;
  10842. maidArray[1].SetPos(vector);
  10843. if (maidArray[2] && maidArray[2].Visible)
  10844. {
  10845. vector.x = -0.6f;
  10846. maidArray[2].SetPos(vector);
  10847. }
  10848. if (maidArray[3] && maidArray[3].Visible)
  10849. {
  10850. vector.x = 1.2f;
  10851. maidArray[3].SetPos(vector);
  10852. }
  10853. if (maidArray[4] && maidArray[4].Visible)
  10854. {
  10855. vector.x = -1.2f;
  10856. maidArray[4].SetPos(vector);
  10857. }
  10858. if (maidArray[5] && maidArray[5].Visible)
  10859. {
  10860. vector.x = 1.8f;
  10861. maidArray[5].SetPos(vector);
  10862. }
  10863. if (maidArray[6] && maidArray[6].Visible)
  10864. {
  10865. vector.x = -1.8f;
  10866. maidArray[6].SetPos(vector);
  10867. }
  10868. if (maidArray[7] && maidArray[7].Visible)
  10869. {
  10870. vector.x = 2.4f;
  10871. maidArray[7].SetPos(vector);
  10872. }
  10873. if (maidArray[8] && maidArray[8].Visible)
  10874. {
  10875. vector.x = -2.4f;
  10876. maidArray[8].SetPos(vector);
  10877. }
  10878. if (maidArray[9] && maidArray[9].Visible)
  10879. {
  10880. vector.x = 3f;
  10881. maidArray[9].SetPos(vector);
  10882. }
  10883. if (maidArray[10] && maidArray[10].Visible)
  10884. {
  10885. vector.x = -3f;
  10886. maidArray[10].SetPos(vector);
  10887. }
  10888. if (maidArray[11] && maidArray[11].Visible)
  10889. {
  10890. vector.x = 3.6f;
  10891. maidArray[11].SetPos(vector);
  10892. }
  10893. if (maidArray[12] && maidArray[12].Visible)
  10894. {
  10895. vector.x = -3.6f;
  10896. maidArray[12].SetPos(vector);
  10897. }
  10898. if (maidArray[13] && maidArray[13].Visible)
  10899. {
  10900. vector.x = 4.2f;
  10901. maidArray[13].SetPos(vector);
  10902. }
  10903. }
  10904. }
  10905. if (isShift)
  10906. {
  10907. isDanceStart4K = true;
  10908. for (int j = 0; j < maidCnt; j++)
  10909. {
  10910. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10911. maidArray[j].body0.transform.localRotation.y + 90f,
  10912. maidArray[j].body0.transform.localRotation.z));
  10913. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10914. maidArray[j].body0.transform.position.y,
  10915. maidArray[j].body0.transform.position.z + 4f));
  10916. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10917. int i = j;
  10918. Maid maid = maidArray[j];
  10919. if (!isVR)
  10920. {
  10921. delCount[i] = 20;
  10922. if (goSlot[(int)selectList[i]] != null)
  10923. {
  10924. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10925. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10926. {
  10927. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10928. }
  10929. }
  10930. }
  10931. string[] array = new string[2];
  10932. array = text2.Split(new char[] { ',' });
  10933. maid.DelProp(MPN.handitem, true);
  10934. maid.DelProp(MPN.accvag, true);
  10935. maid.DelProp(MPN.accanl, true);
  10936. maid.DelProp(MPN.kousoku_upper, true);
  10937. maid.DelProp(MPN.kousoku_lower, true);
  10938. if (array[0] != "")
  10939. {
  10940. maid.SetProp(array[0], array[1], 0, true, false);
  10941. }
  10942. maid.AllProcPropSeqStart();
  10943. }
  10944. }
  10945. isDance = true;
  10946. isDanceStart4 = true;
  10947. isSF1 = false;
  10948. isSF2 = false;
  10949. isSF3 = false;
  10950. }
  10951. if (isHS1 || isHS2 || isHS3)
  10952. {
  10953. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10954. string text4 = textAsset.text;
  10955. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10956. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10957. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10958. for (int j = 0; j < maidCnt; j++)
  10959. {
  10960. if (!isShift)
  10961. {
  10962. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10963. {
  10964. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10965. GameUty.FileSystem,
  10966. "dance_cm3d2_003_hs_f1.anm",
  10967. false,
  10968. false);
  10969. }
  10970. }
  10971. else
  10972. {
  10973. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10974. {
  10975. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10976. GameUty.FileSystem,
  10977. "dance_cm3d2_kara02_003_hs_f1.anm",
  10978. false,
  10979. false);
  10980. }
  10981. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10982. text4 = textAsset.text;
  10983. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10984. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10985. && !isDanceStart9K && !isDanceStart13K)
  10986. {
  10987. dancePos[j] = maidArray[j].transform.position;
  10988. danceRot[j] = maidArray[j].transform.localRotation;
  10989. }
  10990. }
  10991. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10992. }
  10993. if (!isShift)
  10994. {
  10995. if (isHS1)
  10996. {
  10997. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10998. }
  10999. if (isHS2)
  11000. {
  11001. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11002. }
  11003. if (isHS3)
  11004. {
  11005. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11006. }
  11007. }
  11008. else
  11009. {
  11010. if (isHS1)
  11011. {
  11012. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11013. }
  11014. if (isHS2)
  11015. {
  11016. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11017. }
  11018. if (isHS3)
  11019. {
  11020. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11021. }
  11022. }
  11023. for (int j = 0; j < maidCnt; j++)
  11024. {
  11025. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11026. isStop[j] = false;
  11027. isLock[j] = false;
  11028. pHandL[j] = 0;
  11029. pHandR[j] = 0;
  11030. muneIKL[j] = false;
  11031. muneIKR[j] = false;
  11032. if (!isVR)
  11033. {
  11034. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11035. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11036. }
  11037. }
  11038. ikBui = 5;
  11039. isDanceStart1F = false;
  11040. isDanceStart2F = false;
  11041. isDanceStart3F = false;
  11042. isDanceStart4F = false;
  11043. isDanceStart5F = false;
  11044. isDanceStart6F = false;
  11045. isDanceStart7F = false;
  11046. isDanceStart8F = false;
  11047. isDanceStart9F = false;
  11048. isDanceStart10F = false;
  11049. isDanceStart11F = false;
  11050. isDanceStart12F = false;
  11051. isDanceStart13F = false;
  11052. isDanceStart14F = false;
  11053. isDanceStart15F = false;
  11054. for (int j = 0; j < maidCnt; j++)
  11055. {
  11056. danceFace[j] = 0f;
  11057. }
  11058. if (isDanceStart7V)
  11059. {
  11060. for (int j = 0; j < maidCnt; j++)
  11061. {
  11062. if (maidArray[j] && maidArray[j].Visible)
  11063. {
  11064. if (isDanceStart7V)
  11065. {
  11066. maidArray[j].SetPos(dancePos[j]);
  11067. maidArray[j].body0.transform.localRotation = danceRot[j];
  11068. }
  11069. }
  11070. }
  11071. isDanceStart7V = false;
  11072. }
  11073. if (isDanceStart8V)
  11074. {
  11075. for (int j = 0; j < maidCnt; j++)
  11076. {
  11077. if (maidArray[j] && maidArray[j].Visible)
  11078. {
  11079. if (isDanceStart8V)
  11080. {
  11081. maidArray[j].SetPos(dancePos[j]);
  11082. maidArray[j].body0.transform.localRotation = danceRot[j];
  11083. }
  11084. }
  11085. }
  11086. isDanceStart8V = false;
  11087. isDanceStart8P = false;
  11088. }
  11089. if (isDanceStart11V)
  11090. {
  11091. for (int j = 0; j < maidCnt; j++)
  11092. {
  11093. if (maidArray[j] && maidArray[j].Visible)
  11094. {
  11095. if (isDanceStart11V)
  11096. {
  11097. maidArray[j].SetPos(dancePos[j]);
  11098. maidArray[j].body0.transform.localRotation = danceRot[j];
  11099. }
  11100. }
  11101. }
  11102. isDanceStart11V = false;
  11103. }
  11104. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11105. || isDanceStart13K)
  11106. {
  11107. for (int j = 0; j < maidCnt; j++)
  11108. {
  11109. if (maidArray[j] && maidArray[j].Visible)
  11110. {
  11111. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11112. || isDanceStart13K)
  11113. {
  11114. maidArray[j].SetPos(dancePos[j]);
  11115. maidArray[j].body0.transform.localRotation = danceRot[j];
  11116. int i = j;
  11117. if (!isVR)
  11118. {
  11119. delCount[i] = 20;
  11120. if (goSlot[(int)selectList[i]] != null)
  11121. {
  11122. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11123. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11124. {
  11125. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11126. }
  11127. }
  11128. }
  11129. Maid maid = maidArray[j];
  11130. maid.DelProp(MPN.handitem, true);
  11131. maid.DelProp(MPN.accvag, true);
  11132. maid.DelProp(MPN.accanl, true);
  11133. maid.DelProp(MPN.kousoku_upper, true);
  11134. maid.DelProp(MPN.kousoku_lower, true);
  11135. maid.AllProcPropSeqStart();
  11136. }
  11137. }
  11138. }
  11139. isDanceStart1K = false;
  11140. isDanceStart3K = false;
  11141. isDanceStart4K = false;
  11142. isDanceStart5K = false;
  11143. isDanceStart6K = false;
  11144. isDanceStart9K = false;
  11145. isDanceStart13K = false;
  11146. }
  11147. if (isDanceStart14V)
  11148. {
  11149. for (int j = 0; j < maidCnt; j++)
  11150. {
  11151. if (maidArray[j] && maidArray[j].Visible)
  11152. {
  11153. if (isDanceStart14V)
  11154. {
  11155. maidArray[j].SetPos(dancePos[j]);
  11156. maidArray[j].body0.transform.localRotation = danceRot[j];
  11157. }
  11158. }
  11159. }
  11160. isDanceStart14V = false;
  11161. }
  11162. if (isDanceStart15V)
  11163. {
  11164. for (int j = 0; j < maidCnt; j++)
  11165. {
  11166. if (maidArray[j] && maidArray[j].Visible)
  11167. {
  11168. if (isDanceStart15V)
  11169. {
  11170. maidArray[j].SetPos(dancePos[j]);
  11171. maidArray[j].body0.transform.localRotation = danceRot[j];
  11172. }
  11173. }
  11174. }
  11175. isDanceStart15V = false;
  11176. }
  11177. if (maidArray[1] && maidArray[1].Visible)
  11178. {
  11179. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11180. {
  11181. Vector3 vector = Vector3.zero;
  11182. vector.x = 0.6f;
  11183. maidArray[1].SetPos(vector);
  11184. if (maidArray[2] && maidArray[2].Visible)
  11185. {
  11186. vector.x = -0.6f;
  11187. maidArray[2].SetPos(vector);
  11188. }
  11189. if (maidArray[3] && maidArray[3].Visible)
  11190. {
  11191. vector.x = 1.2f;
  11192. maidArray[3].SetPos(vector);
  11193. }
  11194. if (maidArray[4] && maidArray[4].Visible)
  11195. {
  11196. vector.x = -1.2f;
  11197. maidArray[4].SetPos(vector);
  11198. }
  11199. if (maidArray[5] && maidArray[5].Visible)
  11200. {
  11201. vector.x = 1.8f;
  11202. maidArray[5].SetPos(vector);
  11203. }
  11204. if (maidArray[6] && maidArray[6].Visible)
  11205. {
  11206. vector.x = -1.8f;
  11207. maidArray[6].SetPos(vector);
  11208. }
  11209. if (maidArray[7] && maidArray[7].Visible)
  11210. {
  11211. vector.x = 2.4f;
  11212. maidArray[7].SetPos(vector);
  11213. }
  11214. if (maidArray[8] && maidArray[8].Visible)
  11215. {
  11216. vector.x = -2.4f;
  11217. maidArray[8].SetPos(vector);
  11218. }
  11219. if (maidArray[9] && maidArray[9].Visible)
  11220. {
  11221. vector.x = 3f;
  11222. maidArray[9].SetPos(vector);
  11223. }
  11224. if (maidArray[10] && maidArray[10].Visible)
  11225. {
  11226. vector.x = -3f;
  11227. maidArray[10].SetPos(vector);
  11228. }
  11229. if (maidArray[11] && maidArray[11].Visible)
  11230. {
  11231. vector.x = 3.6f;
  11232. maidArray[11].SetPos(vector);
  11233. }
  11234. if (maidArray[12] && maidArray[12].Visible)
  11235. {
  11236. vector.x = -3.6f;
  11237. maidArray[12].SetPos(vector);
  11238. }
  11239. if (maidArray[13] && maidArray[13].Visible)
  11240. {
  11241. vector.x = 4.2f;
  11242. maidArray[13].SetPos(vector);
  11243. }
  11244. }
  11245. }
  11246. if (isShift)
  11247. {
  11248. isDanceStart6K = true;
  11249. for (int j = 0; j < maidCnt; j++)
  11250. {
  11251. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11252. maidArray[j].body0.transform.localRotation.y + 90f,
  11253. maidArray[j].body0.transform.localRotation.z));
  11254. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11255. maidArray[j].body0.transform.position.y,
  11256. maidArray[j].body0.transform.position.z + 4f));
  11257. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11258. int i = j;
  11259. Maid maid = maidArray[j];
  11260. if (!isVR)
  11261. {
  11262. delCount[i] = 20;
  11263. if (goSlot[(int)selectList[i]] != null)
  11264. {
  11265. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11266. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11267. {
  11268. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11269. }
  11270. }
  11271. }
  11272. string[] array = new string[2];
  11273. array = text2.Split(new char[] { ',' });
  11274. maid.DelProp(MPN.handitem, true);
  11275. maid.DelProp(MPN.accvag, true);
  11276. maid.DelProp(MPN.accanl, true);
  11277. maid.DelProp(MPN.kousoku_upper, true);
  11278. maid.DelProp(MPN.kousoku_lower, true);
  11279. if (array[0] != "")
  11280. {
  11281. maid.SetProp(array[0], array[1], 0, true, false);
  11282. }
  11283. maid.AllProcPropSeqStart();
  11284. }
  11285. }
  11286. isDance = true;
  11287. isDanceStart6 = true;
  11288. isHS1 = false;
  11289. isHS2 = false;
  11290. isHS3 = false;
  11291. }
  11292. if (isHS4 || isHS5 || isHS6)
  11293. {
  11294. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11295. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11296. for (int j = 0; j < maidCnt; j++)
  11297. {
  11298. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11299. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11300. switch (j)
  11301. {
  11302. case 1:
  11303. case 3:
  11304. case 5:
  11305. case 7:
  11306. case 9:
  11307. case 11:
  11308. case 13:
  11309. text5 = "dance_cm3d2_003_hs_f2.anm";
  11310. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11311. break;
  11312. }
  11313. if (maidArray[j] && maidArray[j].Visible)
  11314. {
  11315. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11316. {
  11317. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11318. }
  11319. string text4 = textAsset.text;
  11320. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11321. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11322. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11323. }
  11324. }
  11325. if (isHS4)
  11326. {
  11327. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11328. }
  11329. if (isHS5)
  11330. {
  11331. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11332. }
  11333. if (isHS6)
  11334. {
  11335. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11336. }
  11337. ikBui = 5;
  11338. isDanceStart1F = false;
  11339. isDanceStart2F = false;
  11340. isDanceStart3F = false;
  11341. isDanceStart4F = false;
  11342. isDanceStart5F = false;
  11343. isDanceStart6F = false;
  11344. isDanceStart7F = false;
  11345. isDanceStart8F = false;
  11346. isDanceStart9F = false;
  11347. isDanceStart10F = false;
  11348. isDanceStart11F = false;
  11349. isDanceStart12F = false;
  11350. isDanceStart13F = false;
  11351. isDanceStart14F = false;
  11352. isDanceStart15F = false;
  11353. for (int j = 0; j < maidCnt; j++)
  11354. {
  11355. danceFace[j] = 0f;
  11356. }
  11357. if (isDanceStart7V)
  11358. {
  11359. for (int j = 0; j < maidCnt; j++)
  11360. {
  11361. if (maidArray[j] && maidArray[j].Visible)
  11362. {
  11363. if (isDanceStart7V)
  11364. {
  11365. maidArray[j].SetPos(dancePos[j]);
  11366. maidArray[j].body0.transform.localRotation = danceRot[j];
  11367. }
  11368. }
  11369. }
  11370. isDanceStart7V = false;
  11371. }
  11372. if (isDanceStart8V)
  11373. {
  11374. for (int j = 0; j < maidCnt; j++)
  11375. {
  11376. if (maidArray[j] && maidArray[j].Visible)
  11377. {
  11378. if (isDanceStart8V)
  11379. {
  11380. maidArray[j].SetPos(dancePos[j]);
  11381. maidArray[j].body0.transform.localRotation = danceRot[j];
  11382. }
  11383. }
  11384. }
  11385. isDanceStart8V = false;
  11386. isDanceStart8P = false;
  11387. }
  11388. if (isDanceStart11V)
  11389. {
  11390. for (int j = 0; j < maidCnt; j++)
  11391. {
  11392. if (maidArray[j] && maidArray[j].Visible)
  11393. {
  11394. if (isDanceStart11V)
  11395. {
  11396. maidArray[j].SetPos(dancePos[j]);
  11397. maidArray[j].body0.transform.localRotation = danceRot[j];
  11398. }
  11399. }
  11400. }
  11401. isDanceStart11V = false;
  11402. }
  11403. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11404. || isDanceStart13K)
  11405. {
  11406. for (int j = 0; j < maidCnt; j++)
  11407. {
  11408. if (maidArray[j] && maidArray[j].Visible)
  11409. {
  11410. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11411. || isDanceStart13K)
  11412. {
  11413. maidArray[j].SetPos(dancePos[j]);
  11414. maidArray[j].body0.transform.localRotation = danceRot[j];
  11415. int i = j;
  11416. if (!isVR)
  11417. {
  11418. delCount[i] = 20;
  11419. if (goSlot[(int)selectList[i]] != null)
  11420. {
  11421. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11422. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11423. {
  11424. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11425. }
  11426. }
  11427. }
  11428. Maid maid = maidArray[j];
  11429. maid.DelProp(MPN.handitem, true);
  11430. maid.DelProp(MPN.accvag, true);
  11431. maid.DelProp(MPN.accanl, true);
  11432. maid.DelProp(MPN.kousoku_upper, true);
  11433. maid.DelProp(MPN.kousoku_lower, true);
  11434. maid.AllProcPropSeqStart();
  11435. }
  11436. }
  11437. }
  11438. isDanceStart1K = false;
  11439. isDanceStart3K = false;
  11440. isDanceStart4K = false;
  11441. isDanceStart5K = false;
  11442. isDanceStart6K = false;
  11443. isDanceStart9K = false;
  11444. isDanceStart13K = false;
  11445. }
  11446. if (isDanceStart14V)
  11447. {
  11448. for (int j = 0; j < maidCnt; j++)
  11449. {
  11450. if (maidArray[j] && maidArray[j].Visible)
  11451. {
  11452. if (isDanceStart14V)
  11453. {
  11454. maidArray[j].SetPos(dancePos[j]);
  11455. maidArray[j].body0.transform.localRotation = danceRot[j];
  11456. }
  11457. }
  11458. }
  11459. isDanceStart14V = false;
  11460. }
  11461. if (isDanceStart15V)
  11462. {
  11463. for (int j = 0; j < maidCnt; j++)
  11464. {
  11465. if (maidArray[j] && maidArray[j].Visible)
  11466. {
  11467. if (isDanceStart15V)
  11468. {
  11469. maidArray[j].SetPos(dancePos[j]);
  11470. maidArray[j].body0.transform.localRotation = danceRot[j];
  11471. }
  11472. }
  11473. }
  11474. isDanceStart15V = false;
  11475. }
  11476. for (int j = 0; j < maidCnt; j++)
  11477. {
  11478. isStop[j] = false;
  11479. isLock[j] = false;
  11480. pHandL[j] = 0;
  11481. pHandR[j] = 0;
  11482. muneIKL[j] = false;
  11483. muneIKR[j] = false;
  11484. if (!isVR)
  11485. {
  11486. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11487. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11488. }
  11489. if (maidArray[j].transform.position.y != 100f)
  11490. {
  11491. dancePos[j] = maidArray[j].transform.position;
  11492. }
  11493. else
  11494. {
  11495. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11496. }
  11497. danceRot[j] = maidArray[j].transform.localRotation;
  11498. }
  11499. if (maidArray[1] && maidArray[1].Visible)
  11500. {
  11501. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11502. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11503. }
  11504. if (maidArray[3] && maidArray[3].Visible)
  11505. {
  11506. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11507. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11508. }
  11509. if (maidArray[5] && maidArray[5].Visible)
  11510. {
  11511. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11512. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11513. }
  11514. if (maidArray[7] && maidArray[7].Visible)
  11515. {
  11516. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11517. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11518. }
  11519. if (maidArray[9] && maidArray[9].Visible)
  11520. {
  11521. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11522. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11523. }
  11524. if (maidArray[11] && maidArray[11].Visible)
  11525. {
  11526. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11527. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11528. }
  11529. if (maidArray[13] && maidArray[13].Visible)
  11530. {
  11531. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11532. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11533. }
  11534. if (maidArray[2] && maidArray[2].Visible)
  11535. {
  11536. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11537. {
  11538. Vector3 vector = Vector3.zero;
  11539. vector.x = 0.6f;
  11540. maidArray[1].SetPos(vector);
  11541. if (maidArray[2] && maidArray[2].Visible)
  11542. {
  11543. vector.x = -0.6f;
  11544. maidArray[2].SetPos(vector);
  11545. }
  11546. if (maidArray[3] && maidArray[3].Visible)
  11547. {
  11548. vector.x = 1.2f;
  11549. maidArray[3].SetPos(vector);
  11550. }
  11551. if (maidArray[4] && maidArray[4].Visible)
  11552. {
  11553. vector.x = -1.2f;
  11554. maidArray[4].SetPos(vector);
  11555. }
  11556. if (maidArray[5] && maidArray[5].Visible)
  11557. {
  11558. vector.x = 1.8f;
  11559. maidArray[5].SetPos(vector);
  11560. }
  11561. if (maidArray[6] && maidArray[6].Visible)
  11562. {
  11563. vector.x = -1.8f;
  11564. maidArray[6].SetPos(vector);
  11565. }
  11566. if (maidArray[7] && maidArray[7].Visible)
  11567. {
  11568. vector.x = 2.4f;
  11569. maidArray[7].SetPos(vector);
  11570. }
  11571. if (maidArray[8] && maidArray[8].Visible)
  11572. {
  11573. vector.x = -2.4f;
  11574. maidArray[8].SetPos(vector);
  11575. }
  11576. if (maidArray[9] && maidArray[9].Visible)
  11577. {
  11578. vector.x = 3f;
  11579. maidArray[9].SetPos(vector);
  11580. }
  11581. if (maidArray[10] && maidArray[10].Visible)
  11582. {
  11583. vector.x = -3f;
  11584. maidArray[10].SetPos(vector);
  11585. }
  11586. if (maidArray[11] && maidArray[11].Visible)
  11587. {
  11588. vector.x = 3.6f;
  11589. maidArray[11].SetPos(vector);
  11590. }
  11591. if (maidArray[12] && maidArray[12].Visible)
  11592. {
  11593. vector.x = -3.6f;
  11594. maidArray[12].SetPos(vector);
  11595. }
  11596. if (maidArray[13] && maidArray[13].Visible)
  11597. {
  11598. vector.x = 4.2f;
  11599. maidArray[13].SetPos(vector);
  11600. }
  11601. }
  11602. }
  11603. isDance = true;
  11604. isDanceStart7 = true;
  11605. isHS4 = false;
  11606. isHS5 = false;
  11607. isHS6 = false;
  11608. }
  11609. if (isHS7 || isHS8 || isHS9)
  11610. {
  11611. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11612. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11613. for (int j = 0; j < maidCnt; j++)
  11614. {
  11615. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11616. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11617. switch (j)
  11618. {
  11619. case 1:
  11620. case 5:
  11621. case 9:
  11622. case 13:
  11623. text5 = "dance_cm3d2_003_hs_f2.anm";
  11624. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11625. break;
  11626. case 2:
  11627. case 6:
  11628. case 10:
  11629. text5 = "dance_cm3d2_003_hs_f3.anm";
  11630. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11631. break;
  11632. case 3:
  11633. case 7:
  11634. case 11:
  11635. text5 = "dance_cm3d2_003_hs_f4.anm";
  11636. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11637. break;
  11638. }
  11639. if (maidArray[j] && maidArray[j].Visible)
  11640. {
  11641. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11642. {
  11643. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11644. }
  11645. }
  11646. string text4 = textAsset.text;
  11647. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11648. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11649. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11650. }
  11651. if (isHS7)
  11652. {
  11653. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11654. }
  11655. if (isHS8)
  11656. {
  11657. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11658. }
  11659. if (isHS9)
  11660. {
  11661. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11662. }
  11663. ikBui = 5;
  11664. isDanceStart1F = false;
  11665. isDanceStart2F = false;
  11666. isDanceStart3F = false;
  11667. isDanceStart4F = false;
  11668. isDanceStart5F = false;
  11669. isDanceStart6F = false;
  11670. isDanceStart7F = false;
  11671. isDanceStart8F = false;
  11672. isDanceStart9F = false;
  11673. isDanceStart10F = false;
  11674. isDanceStart11F = false;
  11675. isDanceStart12F = false;
  11676. isDanceStart13F = false;
  11677. isDanceStart14F = false;
  11678. isDanceStart15F = false;
  11679. for (int j = 0; j < maidCnt; j++)
  11680. {
  11681. danceFace[j] = 0f;
  11682. }
  11683. if (isDanceStart8V)
  11684. {
  11685. for (int j = 0; j < maidCnt; j++)
  11686. {
  11687. if (maidArray[j] && maidArray[j].Visible)
  11688. {
  11689. if (isDanceStart8V)
  11690. {
  11691. maidArray[j].SetPos(dancePos[j]);
  11692. maidArray[j].body0.transform.localRotation = danceRot[j];
  11693. }
  11694. }
  11695. }
  11696. isDanceStart8V = false;
  11697. isDanceStart8P = false;
  11698. }
  11699. for (int j = 0; j < maidCnt; j++)
  11700. {
  11701. isStop[j] = false;
  11702. isLock[j] = false;
  11703. pHandL[j] = 0;
  11704. pHandR[j] = 0;
  11705. muneIKL[j] = false;
  11706. muneIKR[j] = false;
  11707. if (!isVR)
  11708. {
  11709. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11710. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11711. }
  11712. if (maidArray[j].transform.position.y != 100f)
  11713. {
  11714. dancePos[j] = maidArray[j].transform.position;
  11715. }
  11716. else
  11717. {
  11718. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11719. }
  11720. danceRot[j] = maidArray[j].transform.localRotation;
  11721. }
  11722. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11723. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11724. {
  11725. maidArray[0].SetPos(Vector3.zero);
  11726. maidArray[0].SetRot(Vector3.zero);
  11727. }
  11728. if (maidArray[1] && maidArray[1].Visible)
  11729. {
  11730. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11731. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11732. }
  11733. if (maidArray[2] && maidArray[2].Visible)
  11734. {
  11735. maidArray[2].SetPos(maidArray[0].transform.position);
  11736. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11737. }
  11738. if (maidArray[3] && maidArray[3].Visible)
  11739. {
  11740. maidArray[3].SetPos(maidArray[0].transform.position);
  11741. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11742. }
  11743. if (maidArray[5] && maidArray[5].Visible)
  11744. {
  11745. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11746. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11747. }
  11748. if (maidArray[6] && maidArray[6].Visible)
  11749. {
  11750. maidArray[6].SetPos(maidArray[4].transform.position);
  11751. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11752. }
  11753. if (maidArray[7] && maidArray[7].Visible)
  11754. {
  11755. maidArray[7].SetPos(maidArray[4].transform.position);
  11756. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11757. }
  11758. if (maidArray[9] && maidArray[9].Visible)
  11759. {
  11760. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11761. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11762. }
  11763. if (maidArray[10] && maidArray[10].Visible)
  11764. {
  11765. maidArray[10].SetPos(maidArray[8].transform.position);
  11766. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11767. }
  11768. if (maidArray[11] && maidArray[11].Visible)
  11769. {
  11770. maidArray[11].SetPos(maidArray[8].transform.position);
  11771. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11772. }
  11773. if (maidArray[13] && maidArray[13].Visible)
  11774. {
  11775. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11776. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11777. }
  11778. if (maidArray[4] && maidArray[4].Visible)
  11779. {
  11780. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11781. {
  11782. Vector3 vector = Vector3.zero;
  11783. vector.x = 0.6f;
  11784. maidArray[1].SetPos(vector);
  11785. if (maidArray[2] && maidArray[2].Visible)
  11786. {
  11787. vector.x = -0.6f;
  11788. maidArray[2].SetPos(vector);
  11789. }
  11790. if (maidArray[3] && maidArray[3].Visible)
  11791. {
  11792. vector.x = 1.2f;
  11793. maidArray[3].SetPos(vector);
  11794. }
  11795. if (maidArray[4] && maidArray[4].Visible)
  11796. {
  11797. vector.x = -1.2f;
  11798. maidArray[4].SetPos(vector);
  11799. }
  11800. if (maidArray[5] && maidArray[5].Visible)
  11801. {
  11802. vector.x = 1.8f;
  11803. maidArray[5].SetPos(vector);
  11804. }
  11805. if (maidArray[6] && maidArray[6].Visible)
  11806. {
  11807. vector.x = -1.8f;
  11808. maidArray[6].SetPos(vector);
  11809. }
  11810. if (maidArray[7] && maidArray[7].Visible)
  11811. {
  11812. vector.x = 2.4f;
  11813. maidArray[7].SetPos(vector);
  11814. }
  11815. if (maidArray[8] && maidArray[8].Visible)
  11816. {
  11817. vector.x = -2.4f;
  11818. maidArray[8].SetPos(vector);
  11819. }
  11820. if (maidArray[9] && maidArray[9].Visible)
  11821. {
  11822. vector.x = 3f;
  11823. maidArray[9].SetPos(vector);
  11824. }
  11825. if (maidArray[10] && maidArray[10].Visible)
  11826. {
  11827. vector.x = -3f;
  11828. maidArray[10].SetPos(vector);
  11829. }
  11830. if (maidArray[11] && maidArray[11].Visible)
  11831. {
  11832. vector.x = 3.6f;
  11833. maidArray[11].SetPos(vector);
  11834. }
  11835. if (maidArray[12] && maidArray[12].Visible)
  11836. {
  11837. vector.x = -3.6f;
  11838. maidArray[12].SetPos(vector);
  11839. }
  11840. if (maidArray[13] && maidArray[13].Visible)
  11841. {
  11842. vector.x = 4.2f;
  11843. maidArray[13].SetPos(vector);
  11844. }
  11845. }
  11846. }
  11847. isDance = true;
  11848. isDanceStart8 = true;
  11849. isHS7 = false;
  11850. isHS8 = false;
  11851. isHS9 = false;
  11852. }
  11853. if (isCF1)
  11854. {
  11855. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11856. string text4 = textAsset.text;
  11857. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11858. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11859. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11860. for (int j = 0; j < maidCnt; j++)
  11861. {
  11862. if (!isShift)
  11863. {
  11864. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11865. {
  11866. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11867. GameUty.FileSystem,
  11868. "dance_cm3d_003_sp2_f1.anm",
  11869. false,
  11870. false);
  11871. }
  11872. }
  11873. else
  11874. {
  11875. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11876. {
  11877. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11878. GameUty.FileSystem,
  11879. "dance_cm3d2_kara02_002_rty_f1.anm",
  11880. false,
  11881. false);
  11882. }
  11883. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11884. text4 = textAsset.text;
  11885. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11886. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11887. && !isDanceStart9K && !isDanceStart13K)
  11888. {
  11889. dancePos[j] = maidArray[j].transform.position;
  11890. danceRot[j] = maidArray[j].transform.localRotation;
  11891. }
  11892. }
  11893. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11894. }
  11895. if (!isShift)
  11896. {
  11897. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11898. }
  11899. else
  11900. {
  11901. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11902. }
  11903. for (int j = 0; j < maidCnt; j++)
  11904. {
  11905. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11906. isStop[j] = false;
  11907. isLock[j] = false;
  11908. pHandL[j] = 0;
  11909. pHandR[j] = 0;
  11910. muneIKL[j] = false;
  11911. muneIKR[j] = false;
  11912. if (!isVR)
  11913. {
  11914. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11915. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11916. }
  11917. }
  11918. ikBui = 5;
  11919. isDanceStart1F = false;
  11920. isDanceStart2F = false;
  11921. isDanceStart3F = false;
  11922. isDanceStart4F = false;
  11923. isDanceStart5F = false;
  11924. isDanceStart6F = false;
  11925. isDanceStart7F = false;
  11926. isDanceStart8F = false;
  11927. isDanceStart9F = false;
  11928. isDanceStart10F = false;
  11929. isDanceStart11F = false;
  11930. isDanceStart12F = false;
  11931. isDanceStart13F = false;
  11932. isDanceStart14F = false;
  11933. isDanceStart15F = false;
  11934. for (int j = 0; j < maidCnt; j++)
  11935. {
  11936. danceFace[j] = 0f;
  11937. }
  11938. if (isDanceStart7V)
  11939. {
  11940. for (int j = 0; j < maidCnt; j++)
  11941. {
  11942. if (maidArray[j] && maidArray[j].Visible)
  11943. {
  11944. if (isDanceStart7V)
  11945. {
  11946. maidArray[j].SetPos(dancePos[j]);
  11947. maidArray[j].body0.transform.localRotation = danceRot[j];
  11948. }
  11949. }
  11950. }
  11951. isDanceStart7V = false;
  11952. }
  11953. if (isDanceStart8V)
  11954. {
  11955. for (int j = 0; j < maidCnt; j++)
  11956. {
  11957. if (maidArray[j] && maidArray[j].Visible)
  11958. {
  11959. if (isDanceStart8V)
  11960. {
  11961. maidArray[j].SetPos(dancePos[j]);
  11962. maidArray[j].body0.transform.localRotation = danceRot[j];
  11963. }
  11964. }
  11965. }
  11966. isDanceStart8V = false;
  11967. isDanceStart8P = false;
  11968. }
  11969. if (isDanceStart11V)
  11970. {
  11971. for (int j = 0; j < maidCnt; j++)
  11972. {
  11973. if (maidArray[j] && maidArray[j].Visible)
  11974. {
  11975. if (isDanceStart11V)
  11976. {
  11977. maidArray[j].SetPos(dancePos[j]);
  11978. maidArray[j].body0.transform.localRotation = danceRot[j];
  11979. }
  11980. }
  11981. }
  11982. isDanceStart11V = false;
  11983. }
  11984. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11985. || isDanceStart13K)
  11986. {
  11987. for (int j = 0; j < maidCnt; j++)
  11988. {
  11989. if (maidArray[j] && maidArray[j].Visible)
  11990. {
  11991. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11992. || isDanceStart13K)
  11993. {
  11994. maidArray[j].SetPos(dancePos[j]);
  11995. maidArray[j].body0.transform.localRotation = danceRot[j];
  11996. int i = j;
  11997. if (!isVR)
  11998. {
  11999. delCount[i] = 20;
  12000. if (goSlot[(int)selectList[i]] != null)
  12001. {
  12002. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12003. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12004. {
  12005. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12006. }
  12007. }
  12008. }
  12009. Maid maid = maidArray[j];
  12010. maid.DelProp(MPN.handitem, true);
  12011. maid.DelProp(MPN.accvag, true);
  12012. maid.DelProp(MPN.accanl, true);
  12013. maid.DelProp(MPN.kousoku_upper, true);
  12014. maid.DelProp(MPN.kousoku_lower, true);
  12015. maid.AllProcPropSeqStart();
  12016. }
  12017. }
  12018. }
  12019. isDanceStart1K = false;
  12020. isDanceStart3K = false;
  12021. isDanceStart4K = false;
  12022. isDanceStart5K = false;
  12023. isDanceStart6K = false;
  12024. isDanceStart9K = false;
  12025. isDanceStart13K = false;
  12026. }
  12027. if (isDanceStart14V)
  12028. {
  12029. for (int j = 0; j < maidCnt; j++)
  12030. {
  12031. if (maidArray[j] && maidArray[j].Visible)
  12032. {
  12033. if (isDanceStart14V)
  12034. {
  12035. maidArray[j].SetPos(dancePos[j]);
  12036. maidArray[j].body0.transform.localRotation = danceRot[j];
  12037. }
  12038. }
  12039. }
  12040. isDanceStart14V = false;
  12041. }
  12042. if (isDanceStart15V)
  12043. {
  12044. for (int j = 0; j < maidCnt; j++)
  12045. {
  12046. if (maidArray[j] && maidArray[j].Visible)
  12047. {
  12048. if (isDanceStart15V)
  12049. {
  12050. maidArray[j].SetPos(dancePos[j]);
  12051. maidArray[j].body0.transform.localRotation = danceRot[j];
  12052. }
  12053. }
  12054. }
  12055. isDanceStart15V = false;
  12056. }
  12057. if (maidArray[1] && maidArray[1].Visible)
  12058. {
  12059. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12060. {
  12061. Vector3 vector = Vector3.zero;
  12062. vector.x = 0.6f;
  12063. maidArray[1].SetPos(vector);
  12064. if (maidArray[2] && maidArray[2].Visible)
  12065. {
  12066. vector.x = -0.6f;
  12067. maidArray[2].SetPos(vector);
  12068. }
  12069. if (maidArray[3] && maidArray[3].Visible)
  12070. {
  12071. vector.x = 1.2f;
  12072. maidArray[3].SetPos(vector);
  12073. }
  12074. if (maidArray[4] && maidArray[4].Visible)
  12075. {
  12076. vector.x = -1.2f;
  12077. maidArray[4].SetPos(vector);
  12078. }
  12079. if (maidArray[5] && maidArray[5].Visible)
  12080. {
  12081. vector.x = 1.8f;
  12082. maidArray[5].SetPos(vector);
  12083. }
  12084. if (maidArray[6] && maidArray[6].Visible)
  12085. {
  12086. vector.x = -1.8f;
  12087. maidArray[6].SetPos(vector);
  12088. }
  12089. if (maidArray[7] && maidArray[7].Visible)
  12090. {
  12091. vector.x = 2.4f;
  12092. maidArray[7].SetPos(vector);
  12093. }
  12094. if (maidArray[8] && maidArray[8].Visible)
  12095. {
  12096. vector.x = -2.4f;
  12097. maidArray[8].SetPos(vector);
  12098. }
  12099. if (maidArray[9] && maidArray[9].Visible)
  12100. {
  12101. vector.x = 3f;
  12102. maidArray[9].SetPos(vector);
  12103. }
  12104. if (maidArray[10] && maidArray[10].Visible)
  12105. {
  12106. vector.x = -3f;
  12107. maidArray[10].SetPos(vector);
  12108. }
  12109. if (maidArray[11] && maidArray[11].Visible)
  12110. {
  12111. vector.x = 3.6f;
  12112. maidArray[11].SetPos(vector);
  12113. }
  12114. if (maidArray[12] && maidArray[12].Visible)
  12115. {
  12116. vector.x = -3.6f;
  12117. maidArray[12].SetPos(vector);
  12118. }
  12119. if (maidArray[13] && maidArray[13].Visible)
  12120. {
  12121. vector.x = 4.2f;
  12122. maidArray[13].SetPos(vector);
  12123. }
  12124. }
  12125. }
  12126. if (isShift)
  12127. {
  12128. isDanceStart5K = true;
  12129. for (int j = 0; j < maidCnt; j++)
  12130. {
  12131. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12132. maidArray[j].body0.transform.localRotation.y + 90f,
  12133. maidArray[j].body0.transform.localRotation.z));
  12134. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12135. maidArray[j].body0.transform.position.y,
  12136. maidArray[j].body0.transform.position.z + 4f));
  12137. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12138. int i = j;
  12139. Maid maid = maidArray[j];
  12140. if (!isVR)
  12141. {
  12142. delCount[i] = 20;
  12143. if (goSlot[(int)selectList[i]] != null)
  12144. {
  12145. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12146. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12147. {
  12148. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12149. }
  12150. }
  12151. }
  12152. string[] array = new string[2];
  12153. array = text2.Split(new char[] { ',' });
  12154. maid.DelProp(MPN.handitem, true);
  12155. maid.DelProp(MPN.accvag, true);
  12156. maid.DelProp(MPN.accanl, true);
  12157. maid.DelProp(MPN.kousoku_upper, true);
  12158. maid.DelProp(MPN.kousoku_lower, true);
  12159. if (array[0] != "")
  12160. {
  12161. maid.SetProp(array[0], array[1], 0, true, false);
  12162. }
  12163. maid.AllProcPropSeqStart();
  12164. }
  12165. }
  12166. isDance = true;
  12167. isDanceStart5 = true;
  12168. isCF1 = false;
  12169. }
  12170. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12171. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12172. {
  12173. GameMain.Instance.SoundMgr.StopBGM(0f);
  12174. isCF1 = true;
  12175. if (getModKeyPressing(modKey.Shift))
  12176. {
  12177. isShift = true;
  12178. }
  12179. }
  12180. if (isKT1)
  12181. {
  12182. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12183. string text4 = textAsset.text;
  12184. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12185. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12186. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12187. for (int j = 0; j < maidCnt; j++)
  12188. {
  12189. if (!isShift)
  12190. {
  12191. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12192. {
  12193. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12194. GameUty.FileSystem,
  12195. "dance_cm3d_004_kano_f1.anm",
  12196. false,
  12197. false);
  12198. }
  12199. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12200. }
  12201. else
  12202. {
  12203. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12204. {
  12205. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12206. GameUty.FileSystem,
  12207. "dance_cm3d2_kara_002_cktc_f1.anm",
  12208. false,
  12209. false);
  12210. }
  12211. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12212. text4 = textAsset.text;
  12213. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12214. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12215. && !isDanceStart9K && !isDanceStart13K)
  12216. {
  12217. dancePos[j] = maidArray[j].transform.position;
  12218. danceRot[j] = maidArray[j].transform.localRotation;
  12219. }
  12220. }
  12221. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12222. }
  12223. if (!isShift)
  12224. {
  12225. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12226. }
  12227. else
  12228. {
  12229. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12230. }
  12231. for (int j = 0; j < maidCnt; j++)
  12232. {
  12233. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12234. isStop[j] = false;
  12235. isLock[j] = false;
  12236. pHandL[j] = 0;
  12237. pHandR[j] = 0;
  12238. muneIKL[j] = false;
  12239. muneIKR[j] = false;
  12240. if (!isVR)
  12241. {
  12242. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12243. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12244. }
  12245. }
  12246. ikBui = 5;
  12247. isDanceStart1F = false;
  12248. isDanceStart2F = false;
  12249. isDanceStart3F = false;
  12250. isDanceStart4F = false;
  12251. isDanceStart5F = false;
  12252. isDanceStart6F = false;
  12253. isDanceStart7F = false;
  12254. isDanceStart8F = false;
  12255. isDanceStart9F = false;
  12256. isDanceStart10F = false;
  12257. isDanceStart11F = false;
  12258. isDanceStart12F = false;
  12259. isDanceStart13F = false;
  12260. isDanceStart14F = false;
  12261. isDanceStart15F = false;
  12262. for (int j = 0; j < maidCnt; j++)
  12263. {
  12264. danceFace[j] = 0f;
  12265. }
  12266. if (isDanceStart7V)
  12267. {
  12268. for (int j = 0; j < maidCnt; j++)
  12269. {
  12270. if (maidArray[j] && maidArray[j].Visible)
  12271. {
  12272. if (isDanceStart7V)
  12273. {
  12274. maidArray[j].SetPos(dancePos[j]);
  12275. maidArray[j].body0.transform.localRotation = danceRot[j];
  12276. }
  12277. }
  12278. }
  12279. isDanceStart7V = false;
  12280. }
  12281. if (isDanceStart8V)
  12282. {
  12283. for (int j = 0; j < maidCnt; j++)
  12284. {
  12285. if (maidArray[j] && maidArray[j].Visible)
  12286. {
  12287. if (isDanceStart8V)
  12288. {
  12289. maidArray[j].SetPos(dancePos[j]);
  12290. maidArray[j].body0.transform.localRotation = danceRot[j];
  12291. }
  12292. }
  12293. }
  12294. isDanceStart8V = false;
  12295. isDanceStart8P = false;
  12296. }
  12297. if (isDanceStart11V)
  12298. {
  12299. for (int j = 0; j < maidCnt; j++)
  12300. {
  12301. if (maidArray[j] && maidArray[j].Visible)
  12302. {
  12303. if (isDanceStart11V)
  12304. {
  12305. maidArray[j].SetPos(dancePos[j]);
  12306. maidArray[j].body0.transform.localRotation = danceRot[j];
  12307. }
  12308. }
  12309. }
  12310. isDanceStart11V = false;
  12311. }
  12312. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12313. || isDanceStart13K)
  12314. {
  12315. for (int j = 0; j < maidCnt; j++)
  12316. {
  12317. if (maidArray[j] && maidArray[j].Visible)
  12318. {
  12319. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12320. || isDanceStart13K)
  12321. {
  12322. maidArray[j].SetPos(dancePos[j]);
  12323. maidArray[j].body0.transform.localRotation = danceRot[j];
  12324. int i = j;
  12325. if (!isVR)
  12326. {
  12327. delCount[i] = 20;
  12328. if (goSlot[(int)selectList[i]] != null)
  12329. {
  12330. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12331. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12332. {
  12333. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12334. }
  12335. }
  12336. }
  12337. Maid maid = maidArray[j];
  12338. maid.DelProp(MPN.handitem, true);
  12339. maid.DelProp(MPN.accvag, true);
  12340. maid.DelProp(MPN.accanl, true);
  12341. maid.DelProp(MPN.kousoku_upper, true);
  12342. maid.DelProp(MPN.kousoku_lower, true);
  12343. maid.AllProcPropSeqStart();
  12344. }
  12345. }
  12346. }
  12347. isDanceStart1K = false;
  12348. isDanceStart3K = false;
  12349. isDanceStart4K = false;
  12350. isDanceStart5K = false;
  12351. isDanceStart6K = false;
  12352. isDanceStart9K = false;
  12353. isDanceStart13K = false;
  12354. }
  12355. if (isDanceStart14V)
  12356. {
  12357. for (int j = 0; j < maidCnt; j++)
  12358. {
  12359. if (maidArray[j] && maidArray[j].Visible)
  12360. {
  12361. if (isDanceStart14V)
  12362. {
  12363. maidArray[j].SetPos(dancePos[j]);
  12364. maidArray[j].body0.transform.localRotation = danceRot[j];
  12365. }
  12366. }
  12367. }
  12368. isDanceStart14V = false;
  12369. }
  12370. if (isDanceStart15V)
  12371. {
  12372. for (int j = 0; j < maidCnt; j++)
  12373. {
  12374. if (maidArray[j] && maidArray[j].Visible)
  12375. {
  12376. if (isDanceStart15V)
  12377. {
  12378. maidArray[j].SetPos(dancePos[j]);
  12379. maidArray[j].body0.transform.localRotation = danceRot[j];
  12380. }
  12381. }
  12382. }
  12383. isDanceStart15V = false;
  12384. }
  12385. if (maidArray[1] && maidArray[1].Visible)
  12386. {
  12387. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12388. {
  12389. Vector3 vector = Vector3.zero;
  12390. vector.x = 0.6f;
  12391. maidArray[1].SetPos(vector);
  12392. if (maidArray[2] && maidArray[2].Visible)
  12393. {
  12394. vector.x = -0.6f;
  12395. maidArray[2].SetPos(vector);
  12396. }
  12397. if (maidArray[3] && maidArray[3].Visible)
  12398. {
  12399. vector.x = 1.2f;
  12400. maidArray[3].SetPos(vector);
  12401. }
  12402. if (maidArray[4] && maidArray[4].Visible)
  12403. {
  12404. vector.x = -1.2f;
  12405. maidArray[4].SetPos(vector);
  12406. }
  12407. if (maidArray[5] && maidArray[5].Visible)
  12408. {
  12409. vector.x = 1.8f;
  12410. maidArray[5].SetPos(vector);
  12411. }
  12412. if (maidArray[6] && maidArray[6].Visible)
  12413. {
  12414. vector.x = -1.8f;
  12415. maidArray[6].SetPos(vector);
  12416. }
  12417. if (maidArray[7] && maidArray[7].Visible)
  12418. {
  12419. vector.x = 2.4f;
  12420. maidArray[7].SetPos(vector);
  12421. }
  12422. if (maidArray[8] && maidArray[8].Visible)
  12423. {
  12424. vector.x = -2.4f;
  12425. maidArray[8].SetPos(vector);
  12426. }
  12427. if (maidArray[9] && maidArray[9].Visible)
  12428. {
  12429. vector.x = 3f;
  12430. maidArray[9].SetPos(vector);
  12431. }
  12432. if (maidArray[10] && maidArray[10].Visible)
  12433. {
  12434. vector.x = -3f;
  12435. maidArray[10].SetPos(vector);
  12436. }
  12437. if (maidArray[11] && maidArray[11].Visible)
  12438. {
  12439. vector.x = 3.6f;
  12440. maidArray[11].SetPos(vector);
  12441. }
  12442. if (maidArray[12] && maidArray[12].Visible)
  12443. {
  12444. vector.x = -3.6f;
  12445. maidArray[12].SetPos(vector);
  12446. }
  12447. if (maidArray[13] && maidArray[13].Visible)
  12448. {
  12449. vector.x = 4.2f;
  12450. maidArray[13].SetPos(vector);
  12451. }
  12452. }
  12453. }
  12454. if (maidArray[2] && maidArray[2].Visible)
  12455. {
  12456. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12457. {
  12458. Vector3 vector = Vector3.zero;
  12459. vector.x = 0.6f;
  12460. maidArray[1].SetPos(vector);
  12461. if (maidArray[2] && maidArray[2].Visible)
  12462. {
  12463. vector.x = -0.6f;
  12464. maidArray[2].SetPos(vector);
  12465. }
  12466. if (maidArray[3] && maidArray[3].Visible)
  12467. {
  12468. vector.x = 1.2f;
  12469. maidArray[3].SetPos(vector);
  12470. }
  12471. if (maidArray[4] && maidArray[4].Visible)
  12472. {
  12473. vector.x = -1.2f;
  12474. maidArray[4].SetPos(vector);
  12475. }
  12476. if (maidArray[5] && maidArray[5].Visible)
  12477. {
  12478. vector.x = 1.8f;
  12479. maidArray[5].SetPos(vector);
  12480. }
  12481. if (maidArray[6] && maidArray[6].Visible)
  12482. {
  12483. vector.x = -1.8f;
  12484. maidArray[6].SetPos(vector);
  12485. }
  12486. if (maidArray[7] && maidArray[7].Visible)
  12487. {
  12488. vector.x = 2.4f;
  12489. maidArray[7].SetPos(vector);
  12490. }
  12491. if (maidArray[8] && maidArray[8].Visible)
  12492. {
  12493. vector.x = -2.4f;
  12494. maidArray[8].SetPos(vector);
  12495. }
  12496. if (maidArray[9] && maidArray[9].Visible)
  12497. {
  12498. vector.x = 3f;
  12499. maidArray[9].SetPos(vector);
  12500. }
  12501. if (maidArray[10] && maidArray[10].Visible)
  12502. {
  12503. vector.x = -3f;
  12504. maidArray[10].SetPos(vector);
  12505. }
  12506. if (maidArray[11] && maidArray[11].Visible)
  12507. {
  12508. vector.x = 3.6f;
  12509. maidArray[11].SetPos(vector);
  12510. }
  12511. if (maidArray[12] && maidArray[12].Visible)
  12512. {
  12513. vector.x = -3.6f;
  12514. maidArray[12].SetPos(vector);
  12515. }
  12516. if (maidArray[13] && maidArray[13].Visible)
  12517. {
  12518. vector.x = 4.2f;
  12519. maidArray[13].SetPos(vector);
  12520. }
  12521. }
  12522. }
  12523. if (isShift)
  12524. {
  12525. isDanceStart9K = true;
  12526. for (int j = 0; j < maidCnt; j++)
  12527. {
  12528. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12529. maidArray[j].body0.transform.localRotation.y + 90f,
  12530. maidArray[j].body0.transform.localRotation.z));
  12531. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12532. maidArray[j].body0.transform.position.y,
  12533. maidArray[j].body0.transform.position.z + 4f));
  12534. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12535. int i = j;
  12536. Maid maid = maidArray[j];
  12537. if (!isVR)
  12538. {
  12539. delCount[i] = 20;
  12540. if (goSlot[(int)selectList[i]] != null)
  12541. {
  12542. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12543. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12544. {
  12545. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12546. }
  12547. }
  12548. }
  12549. string[] array = new string[2];
  12550. array = text2.Split(new char[] { ',' });
  12551. maid.DelProp(MPN.handitem, true);
  12552. maid.DelProp(MPN.accvag, true);
  12553. maid.DelProp(MPN.accanl, true);
  12554. maid.DelProp(MPN.kousoku_upper, true);
  12555. maid.DelProp(MPN.kousoku_lower, true);
  12556. if (array[0] != "")
  12557. {
  12558. maid.SetProp(array[0], array[1], 0, true, false);
  12559. }
  12560. maid.AllProcPropSeqStart();
  12561. }
  12562. }
  12563. isDance = true;
  12564. isDanceStart9 = true;
  12565. isKT1 = false;
  12566. }
  12567. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12568. {
  12569. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12570. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12571. if (isSS1)
  12572. {
  12573. nameK = "dance_BlD_m";
  12574. nameA = "dance_cm3d21_002_bid_f";
  12575. nameS = "bloomingdreaming_short";
  12576. danceNo1 = 1;
  12577. danceNo2 = 3;
  12578. danceNo3 = 2;
  12579. }
  12580. if (isSS2)
  12581. {
  12582. nameK = "dance_KAD_m";
  12583. nameA = "dance_cm3d21_003_kad_f";
  12584. nameS = "kiminiaijodelicious_short";
  12585. danceNo1 = 1;
  12586. danceNo2 = 2;
  12587. danceNo3 = 3;
  12588. }
  12589. if (isSS3)
  12590. {
  12591. nameK = "dance_LUM_m";
  12592. nameA = "dance_cm3d21_004_lm_f";
  12593. nameS = "luminousmoment_short";
  12594. danceNo1 = 3;
  12595. danceNo2 = 1;
  12596. danceNo3 = 2;
  12597. }
  12598. if (isSS4)
  12599. {
  12600. nameK = "dance_NmF_m";
  12601. nameA = "dance_cm3d21_001_nmf_f";
  12602. nameS = "nightmagicfire_short";
  12603. danceNo1 = 2;
  12604. danceNo2 = 1;
  12605. danceNo3 = 3;
  12606. }
  12607. if (isSS5)
  12608. {
  12609. nameK = "dance_MoE_m";
  12610. nameA = "dance_cm3d21_005_moe_f";
  12611. nameS = "melodyofempire_short";
  12612. danceNo1 = 1;
  12613. danceNo2 = 3;
  12614. danceNo3 = 2;
  12615. }
  12616. if (isSS6)
  12617. {
  12618. nameK = "dance_NmF_m";
  12619. nameA = "dance_cm3d21_kara_001_nmf_f";
  12620. nameS = "nightmagicfire_short";
  12621. danceNo1 = 1;
  12622. danceNo2 = 1;
  12623. danceNo3 = 1;
  12624. }
  12625. for (int j = 0; j < maidCnt; j++)
  12626. {
  12627. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12628. string text5 = nameA + danceNo1 + ".anm";
  12629. switch (j)
  12630. {
  12631. case 1:
  12632. case 4:
  12633. case 7:
  12634. case 10:
  12635. case 13:
  12636. text5 = nameA + danceNo2 + ".anm";
  12637. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12638. break;
  12639. case 2:
  12640. case 5:
  12641. case 8:
  12642. case 11:
  12643. text5 = nameA + danceNo3 + ".anm";
  12644. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12645. break;
  12646. }
  12647. if (maidArray[j] && maidArray[j].Visible)
  12648. {
  12649. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12650. {
  12651. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12652. }
  12653. string text4 = textAsset.text;
  12654. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12655. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12656. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12657. }
  12658. }
  12659. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12660. ikBui = 5;
  12661. isDanceStart1F = false;
  12662. isDanceStart2F = false;
  12663. isDanceStart3F = false;
  12664. isDanceStart4F = false;
  12665. isDanceStart5F = false;
  12666. isDanceStart6F = false;
  12667. isDanceStart7F = false;
  12668. isDanceStart8F = false;
  12669. isDanceStart9F = false;
  12670. isDanceStart10F = false;
  12671. isDanceStart11F = false;
  12672. isDanceStart12F = false;
  12673. isDanceStart13F = false;
  12674. isDanceStart14F = false;
  12675. isDanceStart15F = false;
  12676. for (int j = 0; j < maidCnt; j++)
  12677. {
  12678. danceFace[j] = 0f;
  12679. }
  12680. if (isDanceStart7V)
  12681. {
  12682. for (int j = 0; j < maidCnt; j++)
  12683. {
  12684. if (maidArray[j] && maidArray[j].Visible)
  12685. {
  12686. if (isDanceStart7V)
  12687. {
  12688. maidArray[j].SetPos(dancePos[j]);
  12689. maidArray[j].body0.transform.localRotation = danceRot[j];
  12690. }
  12691. }
  12692. }
  12693. isDanceStart7V = false;
  12694. }
  12695. if (isDanceStart8V)
  12696. {
  12697. for (int j = 0; j < maidCnt; j++)
  12698. {
  12699. if (maidArray[j] && maidArray[j].Visible)
  12700. {
  12701. if (isDanceStart8V)
  12702. {
  12703. maidArray[j].SetPos(dancePos[j]);
  12704. maidArray[j].body0.transform.localRotation = danceRot[j];
  12705. }
  12706. }
  12707. }
  12708. isDanceStart8V = false;
  12709. isDanceStart8P = false;
  12710. }
  12711. if (isDanceStart11V)
  12712. {
  12713. for (int j = 0; j < maidCnt; j++)
  12714. {
  12715. if (maidArray[j] && maidArray[j].Visible)
  12716. {
  12717. if (isDanceStart11V)
  12718. {
  12719. maidArray[j].SetPos(dancePos[j]);
  12720. maidArray[j].body0.transform.localRotation = danceRot[j];
  12721. }
  12722. }
  12723. }
  12724. isDanceStart11V = false;
  12725. }
  12726. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12727. || isDanceStart13K)
  12728. {
  12729. for (int j = 0; j < maidCnt; j++)
  12730. {
  12731. if (maidArray[j] && maidArray[j].Visible)
  12732. {
  12733. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12734. || isDanceStart13K)
  12735. {
  12736. maidArray[j].SetPos(dancePos[j]);
  12737. maidArray[j].body0.transform.localRotation = danceRot[j];
  12738. int i = j;
  12739. if (!isVR)
  12740. {
  12741. delCount[i] = 20;
  12742. if (goSlot[(int)selectList[i]] != null)
  12743. {
  12744. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12745. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12746. {
  12747. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12748. }
  12749. }
  12750. }
  12751. Maid maid = maidArray[j];
  12752. maid.DelProp(MPN.handitem, true);
  12753. maid.DelProp(MPN.accvag, true);
  12754. maid.DelProp(MPN.accanl, true);
  12755. maid.DelProp(MPN.kousoku_upper, true);
  12756. maid.DelProp(MPN.kousoku_lower, true);
  12757. maid.AllProcPropSeqStart();
  12758. }
  12759. }
  12760. }
  12761. isDanceStart1K = false;
  12762. isDanceStart3K = false;
  12763. isDanceStart4K = false;
  12764. isDanceStart5K = false;
  12765. isDanceStart6K = false;
  12766. isDanceStart9K = false;
  12767. isDanceStart13K = false;
  12768. }
  12769. if (isDanceStart14V)
  12770. {
  12771. for (int j = 0; j < maidCnt; j++)
  12772. {
  12773. if (maidArray[j] && maidArray[j].Visible)
  12774. {
  12775. if (isDanceStart14V)
  12776. {
  12777. maidArray[j].SetPos(dancePos[j]);
  12778. maidArray[j].body0.transform.localRotation = danceRot[j];
  12779. }
  12780. }
  12781. }
  12782. isDanceStart14V = false;
  12783. }
  12784. if (isDanceStart15V)
  12785. {
  12786. for (int j = 0; j < maidCnt; j++)
  12787. {
  12788. if (maidArray[j] && maidArray[j].Visible)
  12789. {
  12790. if (isDanceStart15V)
  12791. {
  12792. maidArray[j].SetPos(dancePos[j]);
  12793. maidArray[j].body0.transform.localRotation = danceRot[j];
  12794. }
  12795. }
  12796. }
  12797. isDanceStart15V = false;
  12798. }
  12799. for (int j = 0; j < maidCnt; j++)
  12800. {
  12801. isStop[j] = false;
  12802. isLock[j] = false;
  12803. pHandL[j] = 0;
  12804. pHandR[j] = 0;
  12805. muneIKL[j] = false;
  12806. muneIKR[j] = false;
  12807. if (!isVR)
  12808. {
  12809. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12810. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12811. }
  12812. if (maidArray[j].transform.position.y != 100f)
  12813. {
  12814. dancePos[j] = maidArray[j].transform.position;
  12815. }
  12816. else
  12817. {
  12818. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12819. }
  12820. danceRot[j] = maidArray[j].transform.localRotation;
  12821. }
  12822. if (maidArray[1] && maidArray[1].Visible)
  12823. {
  12824. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12825. maidArray[0].transform.position.y,
  12826. maidArray[0].transform.position.z));
  12827. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12828. }
  12829. if (maidArray[2] && maidArray[2].Visible)
  12830. {
  12831. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12832. maidArray[0].transform.position.y,
  12833. maidArray[0].transform.position.z));
  12834. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12835. }
  12836. if (maidArray[4] && maidArray[4].Visible)
  12837. {
  12838. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12839. maidArray[3].transform.position.y,
  12840. maidArray[3].transform.position.z));
  12841. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12842. }
  12843. if (maidArray[5] && maidArray[5].Visible)
  12844. {
  12845. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12846. maidArray[3].transform.position.y,
  12847. maidArray[3].transform.position.z));
  12848. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12849. }
  12850. if (maidArray[7] && maidArray[7].Visible)
  12851. {
  12852. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12853. maidArray[6].transform.position.y,
  12854. maidArray[6].transform.position.z));
  12855. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12856. }
  12857. if (maidArray[8] && maidArray[8].Visible)
  12858. {
  12859. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12860. maidArray[6].transform.position.y,
  12861. maidArray[6].transform.position.z));
  12862. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12863. }
  12864. if (maidArray[10] && maidArray[10].Visible)
  12865. {
  12866. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12867. maidArray[9].transform.position.y,
  12868. maidArray[9].transform.position.z));
  12869. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12870. }
  12871. if (maidArray[11] && maidArray[11].Visible)
  12872. {
  12873. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12874. maidArray[9].transform.position.y,
  12875. maidArray[9].transform.position.z));
  12876. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12877. }
  12878. if (maidArray[13] && maidArray[13].Visible)
  12879. {
  12880. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12881. maidArray[12].transform.position.y,
  12882. maidArray[12].transform.position.z));
  12883. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12884. }
  12885. isSS = false;
  12886. isDance = true;
  12887. isDanceStart11 = true;
  12888. }
  12889. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12890. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12891. {
  12892. GameMain.Instance.SoundMgr.StopBGM(0f);
  12893. isSS1 = true;
  12894. isSS2 = false;
  12895. isSS3 = false;
  12896. isSS4 = false;
  12897. isSS5 = false;
  12898. isSS6 = false;
  12899. isSS = true;
  12900. }
  12901. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12902. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12903. {
  12904. GameMain.Instance.SoundMgr.StopBGM(0f);
  12905. isSS1 = false;
  12906. isSS2 = true;
  12907. isSS3 = false;
  12908. isSS4 = false;
  12909. isSS5 = false;
  12910. isSS6 = false;
  12911. isSS = true;
  12912. }
  12913. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12914. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12915. {
  12916. GameMain.Instance.SoundMgr.StopBGM(0f);
  12917. isSS1 = false;
  12918. isSS2 = false;
  12919. isSS3 = true;
  12920. isSS4 = false;
  12921. isSS5 = false;
  12922. isSS6 = false;
  12923. isSS = true;
  12924. }
  12925. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12926. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12927. {
  12928. GameMain.Instance.SoundMgr.StopBGM(0f);
  12929. isSS1 = false;
  12930. isSS2 = false;
  12931. isSS3 = false;
  12932. isSS4 = true;
  12933. isSS5 = false;
  12934. isSS6 = false;
  12935. isSS = true;
  12936. }
  12937. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12938. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12939. {
  12940. GameMain.Instance.SoundMgr.StopBGM(0f);
  12941. isSS1 = false;
  12942. isSS2 = false;
  12943. isSS3 = false;
  12944. isSS4 = false;
  12945. isSS5 = true;
  12946. isSS6 = false;
  12947. isSS = true;
  12948. }
  12949. if (isKHG1 || isKHG2)
  12950. {
  12951. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12952. string text4 = textAsset.text;
  12953. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12954. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12955. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12956. for (int j = 0; j < maidCnt; j++)
  12957. {
  12958. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12959. {
  12960. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12961. GameUty.FileSystem,
  12962. "dance_cm3d2_005_khg_f.anm",
  12963. false,
  12964. false);
  12965. }
  12966. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12967. }
  12968. if (isKHG1)
  12969. {
  12970. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12971. }
  12972. if (isKHG2)
  12973. {
  12974. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12975. }
  12976. for (int j = 0; j < maidCnt; j++)
  12977. {
  12978. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12979. isStop[j] = false;
  12980. isLock[j] = false;
  12981. pHandL[j] = 0;
  12982. pHandR[j] = 0;
  12983. muneIKL[j] = false;
  12984. muneIKR[j] = false;
  12985. if (!isVR)
  12986. {
  12987. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12988. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12989. }
  12990. }
  12991. ikBui = 5;
  12992. isDanceStart1F = false;
  12993. isDanceStart2F = false;
  12994. isDanceStart3F = false;
  12995. isDanceStart4F = false;
  12996. isDanceStart5F = false;
  12997. isDanceStart6F = false;
  12998. isDanceStart7F = false;
  12999. isDanceStart8F = false;
  13000. isDanceStart9F = false;
  13001. isDanceStart10F = false;
  13002. isDanceStart11F = false;
  13003. isDanceStart12F = false;
  13004. isDanceStart13F = false;
  13005. isDanceStart14F = false;
  13006. isDanceStart15F = false;
  13007. for (int j = 0; j < maidCnt; j++)
  13008. {
  13009. danceFace[j] = 0f;
  13010. }
  13011. if (isDanceStart7V)
  13012. {
  13013. for (int j = 0; j < maidCnt; j++)
  13014. {
  13015. if (maidArray[j] && maidArray[j].Visible)
  13016. {
  13017. if (isDanceStart7V)
  13018. {
  13019. maidArray[j].SetPos(dancePos[j]);
  13020. maidArray[j].body0.transform.localRotation = danceRot[j];
  13021. }
  13022. }
  13023. }
  13024. isDanceStart7V = false;
  13025. }
  13026. if (isDanceStart8V)
  13027. {
  13028. for (int j = 0; j < maidCnt; j++)
  13029. {
  13030. if (maidArray[j] && maidArray[j].Visible)
  13031. {
  13032. if (isDanceStart8V)
  13033. {
  13034. maidArray[j].SetPos(dancePos[j]);
  13035. maidArray[j].body0.transform.localRotation = danceRot[j];
  13036. }
  13037. }
  13038. }
  13039. isDanceStart8V = false;
  13040. isDanceStart8P = false;
  13041. }
  13042. if (isDanceStart11V)
  13043. {
  13044. for (int j = 0; j < maidCnt; j++)
  13045. {
  13046. if (maidArray[j] && maidArray[j].Visible)
  13047. {
  13048. if (isDanceStart11V)
  13049. {
  13050. maidArray[j].SetPos(dancePos[j]);
  13051. maidArray[j].body0.transform.localRotation = danceRot[j];
  13052. }
  13053. }
  13054. }
  13055. isDanceStart11V = false;
  13056. }
  13057. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13058. || isDanceStart13K)
  13059. {
  13060. for (int j = 0; j < maidCnt; j++)
  13061. {
  13062. if (maidArray[j] && maidArray[j].Visible)
  13063. {
  13064. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13065. || isDanceStart13K)
  13066. {
  13067. maidArray[j].SetPos(dancePos[j]);
  13068. maidArray[j].body0.transform.localRotation = danceRot[j];
  13069. int i = j;
  13070. if (!isVR)
  13071. {
  13072. delCount[i] = 20;
  13073. if (goSlot[(int)selectList[i]] != null)
  13074. {
  13075. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13076. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13077. {
  13078. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13079. }
  13080. }
  13081. }
  13082. Maid maid = maidArray[j];
  13083. maid.DelProp(MPN.handitem, true);
  13084. maid.DelProp(MPN.accvag, true);
  13085. maid.DelProp(MPN.accanl, true);
  13086. maid.DelProp(MPN.kousoku_upper, true);
  13087. maid.DelProp(MPN.kousoku_lower, true);
  13088. maid.AllProcPropSeqStart();
  13089. }
  13090. }
  13091. }
  13092. isDanceStart1K = false;
  13093. isDanceStart3K = false;
  13094. isDanceStart4K = false;
  13095. isDanceStart5K = false;
  13096. isDanceStart6K = false;
  13097. isDanceStart9K = false;
  13098. isDanceStart13K = false;
  13099. }
  13100. if (isDanceStart14V)
  13101. {
  13102. for (int j = 0; j < maidCnt; j++)
  13103. {
  13104. if (maidArray[j] && maidArray[j].Visible)
  13105. {
  13106. if (isDanceStart14V)
  13107. {
  13108. maidArray[j].SetPos(dancePos[j]);
  13109. maidArray[j].body0.transform.localRotation = danceRot[j];
  13110. }
  13111. }
  13112. }
  13113. isDanceStart14V = false;
  13114. }
  13115. if (isDanceStart15V)
  13116. {
  13117. for (int j = 0; j < maidCnt; j++)
  13118. {
  13119. if (maidArray[j] && maidArray[j].Visible)
  13120. {
  13121. if (isDanceStart15V)
  13122. {
  13123. maidArray[j].SetPos(dancePos[j]);
  13124. maidArray[j].body0.transform.localRotation = danceRot[j];
  13125. }
  13126. }
  13127. }
  13128. isDanceStart15V = false;
  13129. }
  13130. if (maidArray[1] && maidArray[1].Visible)
  13131. {
  13132. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13133. {
  13134. Vector3 vector = Vector3.zero;
  13135. vector.x = 0.6f;
  13136. maidArray[1].SetPos(vector);
  13137. if (maidArray[2] && maidArray[2].Visible)
  13138. {
  13139. vector.x = -0.6f;
  13140. maidArray[2].SetPos(vector);
  13141. }
  13142. if (maidArray[3] && maidArray[3].Visible)
  13143. {
  13144. vector.x = 1.2f;
  13145. maidArray[3].SetPos(vector);
  13146. }
  13147. if (maidArray[4] && maidArray[4].Visible)
  13148. {
  13149. vector.x = -1.2f;
  13150. maidArray[4].SetPos(vector);
  13151. }
  13152. if (maidArray[5] && maidArray[5].Visible)
  13153. {
  13154. vector.x = 1.8f;
  13155. maidArray[5].SetPos(vector);
  13156. }
  13157. if (maidArray[6] && maidArray[6].Visible)
  13158. {
  13159. vector.x = -1.8f;
  13160. maidArray[6].SetPos(vector);
  13161. }
  13162. if (maidArray[7] && maidArray[7].Visible)
  13163. {
  13164. vector.x = 2.4f;
  13165. maidArray[7].SetPos(vector);
  13166. }
  13167. if (maidArray[8] && maidArray[8].Visible)
  13168. {
  13169. vector.x = -2.4f;
  13170. maidArray[8].SetPos(vector);
  13171. }
  13172. if (maidArray[9] && maidArray[9].Visible)
  13173. {
  13174. vector.x = 3f;
  13175. maidArray[9].SetPos(vector);
  13176. }
  13177. if (maidArray[10] && maidArray[10].Visible)
  13178. {
  13179. vector.x = -3f;
  13180. maidArray[10].SetPos(vector);
  13181. }
  13182. if (maidArray[11] && maidArray[11].Visible)
  13183. {
  13184. vector.x = 3.6f;
  13185. maidArray[11].SetPos(vector);
  13186. }
  13187. if (maidArray[12] && maidArray[12].Visible)
  13188. {
  13189. vector.x = -3.6f;
  13190. maidArray[12].SetPos(vector);
  13191. }
  13192. if (maidArray[13] && maidArray[13].Visible)
  13193. {
  13194. vector.x = 4.2f;
  13195. maidArray[13].SetPos(vector);
  13196. }
  13197. }
  13198. }
  13199. isDance = true;
  13200. isDanceStart12 = true;
  13201. isKHG1 = false;
  13202. isKHG2 = false;
  13203. }
  13204. if (isDanceStart13Count > 0)
  13205. {
  13206. isDanceStart13Count++;
  13207. }
  13208. if (isDanceStart13Count == 1)
  13209. {
  13210. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13211. isDanceStart13Count = 0;
  13212. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13213. string text4 = textAsset.text;
  13214. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13215. for (int j = 0; j < maidCnt; j++)
  13216. {
  13217. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13218. }
  13219. }
  13220. if ((isSN1 || isSN2 || isSN3) && isShift)
  13221. {
  13222. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13223. string text4 = textAsset.text;
  13224. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13225. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13226. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13227. for (int j = 0; j < maidCnt; j++)
  13228. {
  13229. if (!isShift)
  13230. {
  13231. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13232. {
  13233. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13234. GameUty.FileSystem,
  13235. "dance_cm3d2_006_ssn_f1.anm",
  13236. false,
  13237. false);
  13238. }
  13239. }
  13240. else
  13241. {
  13242. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13243. {
  13244. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13245. GameUty.FileSystem,
  13246. "dance_cm3d21_kara_001_nmf_f1.anm",
  13247. false,
  13248. false);
  13249. }
  13250. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13251. string text5 = nameA + danceNo1 + ".anm";
  13252. switch (j)
  13253. {
  13254. case 1:
  13255. case 4:
  13256. case 7:
  13257. case 10:
  13258. case 13:
  13259. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13260. break;
  13261. case 2:
  13262. case 5:
  13263. case 8:
  13264. case 11:
  13265. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13266. break;
  13267. }
  13268. text4 = textAsset.text;
  13269. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13270. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13271. && !isDanceStart9K && !isDanceStart13K)
  13272. {
  13273. dancePos[j] = maidArray[j].transform.position;
  13274. danceRot[j] = maidArray[j].transform.localRotation;
  13275. }
  13276. }
  13277. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13278. }
  13279. if (!isShift)
  13280. {
  13281. if (isSN1)
  13282. {
  13283. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13284. }
  13285. if (isSN2)
  13286. {
  13287. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13288. }
  13289. if (isSN3)
  13290. {
  13291. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13292. }
  13293. }
  13294. else
  13295. {
  13296. danceWait = 400;
  13297. isDanceStart13Count++;
  13298. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13299. }
  13300. for (int j = 0; j < maidCnt; j++)
  13301. {
  13302. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13303. isStop[j] = false;
  13304. isLock[j] = false;
  13305. pHandL[j] = 0;
  13306. pHandR[j] = 0;
  13307. muneIKL[j] = false;
  13308. muneIKR[j] = false;
  13309. if (!isVR)
  13310. {
  13311. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13312. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13313. }
  13314. }
  13315. ikBui = 5;
  13316. isDanceStart1F = false;
  13317. isDanceStart2F = false;
  13318. isDanceStart3F = false;
  13319. isDanceStart4F = false;
  13320. isDanceStart5F = false;
  13321. isDanceStart6F = false;
  13322. isDanceStart7F = false;
  13323. isDanceStart8F = false;
  13324. isDanceStart9F = false;
  13325. isDanceStart10F = false;
  13326. isDanceStart11F = false;
  13327. isDanceStart12F = false;
  13328. isDanceStart13F = false;
  13329. isDanceStart14F = false;
  13330. isDanceStart15F = false;
  13331. for (int j = 0; j < maidCnt; j++)
  13332. {
  13333. danceFace[j] = 0f;
  13334. }
  13335. if (isDanceStart7V)
  13336. {
  13337. for (int j = 0; j < maidCnt; j++)
  13338. {
  13339. if (maidArray[j] && maidArray[j].Visible)
  13340. {
  13341. if (isDanceStart7V)
  13342. {
  13343. maidArray[j].SetPos(dancePos[j]);
  13344. maidArray[j].body0.transform.localRotation = danceRot[j];
  13345. }
  13346. }
  13347. }
  13348. isDanceStart7V = false;
  13349. }
  13350. if (isDanceStart8V)
  13351. {
  13352. for (int j = 0; j < maidCnt; j++)
  13353. {
  13354. if (maidArray[j] && maidArray[j].Visible)
  13355. {
  13356. if (isDanceStart8V)
  13357. {
  13358. maidArray[j].SetPos(dancePos[j]);
  13359. maidArray[j].body0.transform.localRotation = danceRot[j];
  13360. }
  13361. }
  13362. }
  13363. isDanceStart8V = false;
  13364. isDanceStart8P = false;
  13365. }
  13366. if (isDanceStart11V)
  13367. {
  13368. for (int j = 0; j < maidCnt; j++)
  13369. {
  13370. if (maidArray[j] && maidArray[j].Visible)
  13371. {
  13372. if (isDanceStart11V)
  13373. {
  13374. maidArray[j].SetPos(dancePos[j]);
  13375. maidArray[j].body0.transform.localRotation = danceRot[j];
  13376. }
  13377. }
  13378. }
  13379. isDanceStart11V = false;
  13380. }
  13381. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13382. || isDanceStart13K)
  13383. {
  13384. for (int j = 0; j < maidCnt; j++)
  13385. {
  13386. if (maidArray[j] && maidArray[j].Visible)
  13387. {
  13388. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13389. || isDanceStart13K)
  13390. {
  13391. maidArray[j].SetPos(dancePos[j]);
  13392. maidArray[j].body0.transform.localRotation = danceRot[j];
  13393. int i = j;
  13394. if (!isVR)
  13395. {
  13396. delCount[i] = 20;
  13397. if (goSlot[(int)selectList[i]] != null)
  13398. {
  13399. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13400. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13401. {
  13402. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13403. }
  13404. }
  13405. }
  13406. Maid maid = maidArray[j];
  13407. maid.DelProp(MPN.handitem, true);
  13408. maid.DelProp(MPN.accvag, true);
  13409. maid.DelProp(MPN.accanl, true);
  13410. maid.DelProp(MPN.kousoku_upper, true);
  13411. maid.DelProp(MPN.kousoku_lower, true);
  13412. maid.AllProcPropSeqStart();
  13413. }
  13414. }
  13415. }
  13416. isDanceStart1K = false;
  13417. isDanceStart3K = false;
  13418. isDanceStart4K = false;
  13419. isDanceStart5K = false;
  13420. isDanceStart6K = false;
  13421. isDanceStart9K = false;
  13422. isDanceStart13K = false;
  13423. }
  13424. if (isDanceStart14V)
  13425. {
  13426. for (int j = 0; j < maidCnt; j++)
  13427. {
  13428. if (maidArray[j] && maidArray[j].Visible)
  13429. {
  13430. if (isDanceStart14V)
  13431. {
  13432. maidArray[j].SetPos(dancePos[j]);
  13433. maidArray[j].body0.transform.localRotation = danceRot[j];
  13434. }
  13435. }
  13436. }
  13437. isDanceStart14V = false;
  13438. }
  13439. if (isDanceStart15V)
  13440. {
  13441. for (int j = 0; j < maidCnt; j++)
  13442. {
  13443. if (maidArray[j] && maidArray[j].Visible)
  13444. {
  13445. if (isDanceStart15V)
  13446. {
  13447. maidArray[j].SetPos(dancePos[j]);
  13448. maidArray[j].body0.transform.localRotation = danceRot[j];
  13449. }
  13450. }
  13451. }
  13452. isDanceStart15V = false;
  13453. }
  13454. if (maidArray[1] && maidArray[1].Visible)
  13455. {
  13456. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13457. {
  13458. Vector3 vector = Vector3.zero;
  13459. vector.x = 0.6f;
  13460. maidArray[1].SetPos(vector);
  13461. if (maidArray[2] && maidArray[2].Visible)
  13462. {
  13463. vector.x = -0.6f;
  13464. maidArray[2].SetPos(vector);
  13465. }
  13466. if (maidArray[3] && maidArray[3].Visible)
  13467. {
  13468. vector.x = 1.2f;
  13469. maidArray[3].SetPos(vector);
  13470. }
  13471. if (maidArray[4] && maidArray[4].Visible)
  13472. {
  13473. vector.x = -1.2f;
  13474. maidArray[4].SetPos(vector);
  13475. }
  13476. if (maidArray[5] && maidArray[5].Visible)
  13477. {
  13478. vector.x = 1.8f;
  13479. maidArray[5].SetPos(vector);
  13480. }
  13481. if (maidArray[6] && maidArray[6].Visible)
  13482. {
  13483. vector.x = -1.8f;
  13484. maidArray[6].SetPos(vector);
  13485. }
  13486. if (maidArray[7] && maidArray[7].Visible)
  13487. {
  13488. vector.x = 2.4f;
  13489. maidArray[7].SetPos(vector);
  13490. }
  13491. if (maidArray[8] && maidArray[8].Visible)
  13492. {
  13493. vector.x = -2.4f;
  13494. maidArray[8].SetPos(vector);
  13495. }
  13496. if (maidArray[9] && maidArray[9].Visible)
  13497. {
  13498. vector.x = 3f;
  13499. maidArray[9].SetPos(vector);
  13500. }
  13501. if (maidArray[10] && maidArray[10].Visible)
  13502. {
  13503. vector.x = -3f;
  13504. maidArray[10].SetPos(vector);
  13505. }
  13506. if (maidArray[11] && maidArray[11].Visible)
  13507. {
  13508. vector.x = 3.6f;
  13509. maidArray[11].SetPos(vector);
  13510. }
  13511. if (maidArray[12] && maidArray[12].Visible)
  13512. {
  13513. vector.x = -3.6f;
  13514. maidArray[12].SetPos(vector);
  13515. }
  13516. if (maidArray[13] && maidArray[13].Visible)
  13517. {
  13518. vector.x = 4.2f;
  13519. maidArray[13].SetPos(vector);
  13520. }
  13521. }
  13522. }
  13523. if (isShift)
  13524. {
  13525. isDanceStart13K = true;
  13526. for (int j = 0; j < maidCnt; j++)
  13527. {
  13528. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13529. maidArray[j].body0.transform.localRotation.y + 90f,
  13530. maidArray[j].body0.transform.localRotation.z));
  13531. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13532. maidArray[j].body0.transform.position.y,
  13533. maidArray[j].body0.transform.position.z + 4f));
  13534. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13535. int i = j;
  13536. Maid maid = maidArray[j];
  13537. if (!isVR)
  13538. {
  13539. delCount[i] = 20;
  13540. if (goSlot[(int)selectList[i]] != null)
  13541. {
  13542. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13543. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13544. {
  13545. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13546. }
  13547. }
  13548. }
  13549. string[] array = new string[2];
  13550. array = text2.Split(new char[] { ',' });
  13551. maid.DelProp(MPN.handitem, true);
  13552. maid.DelProp(MPN.accvag, true);
  13553. maid.DelProp(MPN.accanl, true);
  13554. maid.DelProp(MPN.kousoku_upper, true);
  13555. maid.DelProp(MPN.kousoku_lower, true);
  13556. if (array[0] != "")
  13557. {
  13558. maid.SetProp(array[0], array[1], 0, true, false);
  13559. }
  13560. maid.AllProcPropSeqStart();
  13561. }
  13562. }
  13563. isDance = true;
  13564. isDanceStart13 = true;
  13565. isSN1 = false;
  13566. isSN2 = false;
  13567. isSN3 = false;
  13568. }
  13569. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13570. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13571. {
  13572. GameMain.Instance.SoundMgr.StopBGM(0f);
  13573. isSN1 = true;
  13574. hFlg = true;
  13575. if (getModKeyPressing(modKey.Shift))
  13576. {
  13577. isShift = true;
  13578. }
  13579. }
  13580. if (isSN4 || isSN5 || isSN6)
  13581. {
  13582. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13583. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13584. for (int j = 0; j < maidCnt; j++)
  13585. {
  13586. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13587. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13588. switch (j)
  13589. {
  13590. case 1:
  13591. case 4:
  13592. case 7:
  13593. case 10:
  13594. case 13:
  13595. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13596. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13597. break;
  13598. case 2:
  13599. case 5:
  13600. case 8:
  13601. case 11:
  13602. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13603. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13604. break;
  13605. }
  13606. if (maidArray[j] && maidArray[j].Visible)
  13607. {
  13608. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13609. {
  13610. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13611. }
  13612. string text4 = textAsset.text;
  13613. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13614. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13615. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13616. }
  13617. }
  13618. if (isSN4)
  13619. {
  13620. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13621. }
  13622. if (isSN5)
  13623. {
  13624. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13625. }
  13626. if (isSN6)
  13627. {
  13628. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13629. }
  13630. ikBui = 5;
  13631. isDanceStart1F = false;
  13632. isDanceStart2F = false;
  13633. isDanceStart3F = false;
  13634. isDanceStart4F = false;
  13635. isDanceStart5F = false;
  13636. isDanceStart6F = false;
  13637. isDanceStart7F = false;
  13638. isDanceStart8F = false;
  13639. isDanceStart9F = false;
  13640. isDanceStart10F = false;
  13641. isDanceStart11F = false;
  13642. isDanceStart12F = false;
  13643. isDanceStart13F = false;
  13644. isDanceStart14F = false;
  13645. isDanceStart15F = false;
  13646. for (int j = 0; j < maidCnt; j++)
  13647. {
  13648. danceFace[j] = 0f;
  13649. }
  13650. if (isDanceStart7V)
  13651. {
  13652. for (int j = 0; j < maidCnt; j++)
  13653. {
  13654. if (maidArray[j] && maidArray[j].Visible)
  13655. {
  13656. if (isDanceStart7V)
  13657. {
  13658. maidArray[j].SetPos(dancePos[j]);
  13659. maidArray[j].body0.transform.localRotation = danceRot[j];
  13660. }
  13661. }
  13662. }
  13663. isDanceStart7V = false;
  13664. }
  13665. if (isDanceStart8V)
  13666. {
  13667. for (int j = 0; j < maidCnt; j++)
  13668. {
  13669. if (maidArray[j] && maidArray[j].Visible)
  13670. {
  13671. if (isDanceStart8V)
  13672. {
  13673. maidArray[j].SetPos(dancePos[j]);
  13674. maidArray[j].body0.transform.localRotation = danceRot[j];
  13675. }
  13676. }
  13677. }
  13678. isDanceStart8V = false;
  13679. isDanceStart8P = false;
  13680. }
  13681. if (isDanceStart11V)
  13682. {
  13683. for (int j = 0; j < maidCnt; j++)
  13684. {
  13685. if (maidArray[j] && maidArray[j].Visible)
  13686. {
  13687. if (isDanceStart11V)
  13688. {
  13689. maidArray[j].SetPos(dancePos[j]);
  13690. maidArray[j].body0.transform.localRotation = danceRot[j];
  13691. }
  13692. }
  13693. }
  13694. isDanceStart11V = false;
  13695. }
  13696. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13697. || isDanceStart13K)
  13698. {
  13699. for (int j = 0; j < maidCnt; j++)
  13700. {
  13701. if (maidArray[j] && maidArray[j].Visible)
  13702. {
  13703. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13704. || isDanceStart13K)
  13705. {
  13706. maidArray[j].SetPos(dancePos[j]);
  13707. maidArray[j].body0.transform.localRotation = danceRot[j];
  13708. int i = j;
  13709. if (!isVR)
  13710. {
  13711. delCount[i] = 20;
  13712. if (goSlot[(int)selectList[i]] != null)
  13713. {
  13714. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13715. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13716. {
  13717. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13718. }
  13719. }
  13720. }
  13721. Maid maid = maidArray[j];
  13722. maid.DelProp(MPN.handitem, true);
  13723. maid.DelProp(MPN.accvag, true);
  13724. maid.DelProp(MPN.accanl, true);
  13725. maid.DelProp(MPN.kousoku_upper, true);
  13726. maid.DelProp(MPN.kousoku_lower, true);
  13727. maid.AllProcPropSeqStart();
  13728. }
  13729. }
  13730. }
  13731. isDanceStart1K = false;
  13732. isDanceStart3K = false;
  13733. isDanceStart4K = false;
  13734. isDanceStart5K = false;
  13735. isDanceStart6K = false;
  13736. isDanceStart9K = false;
  13737. isDanceStart13K = false;
  13738. }
  13739. if (isDanceStart14V)
  13740. {
  13741. for (int j = 0; j < maidCnt; j++)
  13742. {
  13743. if (maidArray[j] && maidArray[j].Visible)
  13744. {
  13745. if (isDanceStart14V)
  13746. {
  13747. maidArray[j].SetPos(dancePos[j]);
  13748. maidArray[j].body0.transform.localRotation = danceRot[j];
  13749. }
  13750. }
  13751. }
  13752. isDanceStart14V = false;
  13753. }
  13754. if (isDanceStart15V)
  13755. {
  13756. for (int j = 0; j < maidCnt; j++)
  13757. {
  13758. if (maidArray[j] && maidArray[j].Visible)
  13759. {
  13760. if (isDanceStart15V)
  13761. {
  13762. maidArray[j].SetPos(dancePos[j]);
  13763. maidArray[j].body0.transform.localRotation = danceRot[j];
  13764. }
  13765. }
  13766. }
  13767. isDanceStart15V = false;
  13768. }
  13769. for (int j = 0; j < maidCnt; j++)
  13770. {
  13771. isStop[j] = false;
  13772. isLock[j] = false;
  13773. pHandL[j] = 0;
  13774. pHandR[j] = 0;
  13775. muneIKL[j] = false;
  13776. muneIKR[j] = false;
  13777. if (!isVR)
  13778. {
  13779. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13780. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13781. }
  13782. if (maidArray[j].transform.position.y != 100f)
  13783. {
  13784. dancePos[j] = maidArray[j].transform.position;
  13785. }
  13786. else
  13787. {
  13788. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13789. }
  13790. danceRot[j] = maidArray[j].transform.localRotation;
  13791. }
  13792. if (maidArray[1] && maidArray[1].Visible)
  13793. {
  13794. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13795. maidArray[0].transform.position.y,
  13796. maidArray[0].transform.position.z));
  13797. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13798. }
  13799. if (maidArray[2] && maidArray[2].Visible)
  13800. {
  13801. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13802. maidArray[0].transform.position.y,
  13803. maidArray[0].transform.position.z));
  13804. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13805. }
  13806. if (maidArray[4] && maidArray[4].Visible)
  13807. {
  13808. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13809. maidArray[3].transform.position.y,
  13810. maidArray[3].transform.position.z));
  13811. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13812. }
  13813. if (maidArray[5] && maidArray[5].Visible)
  13814. {
  13815. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13816. maidArray[3].transform.position.y,
  13817. maidArray[3].transform.position.z));
  13818. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13819. }
  13820. if (maidArray[7] && maidArray[7].Visible)
  13821. {
  13822. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13823. maidArray[6].transform.position.y,
  13824. maidArray[6].transform.position.z));
  13825. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13826. }
  13827. if (maidArray[8] && maidArray[8].Visible)
  13828. {
  13829. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13830. maidArray[6].transform.position.y,
  13831. maidArray[6].transform.position.z));
  13832. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13833. }
  13834. if (maidArray[10] && maidArray[10].Visible)
  13835. {
  13836. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13837. maidArray[9].transform.position.y,
  13838. maidArray[9].transform.position.z));
  13839. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13840. }
  13841. if (maidArray[11] && maidArray[11].Visible)
  13842. {
  13843. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13844. maidArray[9].transform.position.y,
  13845. maidArray[9].transform.position.z));
  13846. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13847. }
  13848. if (maidArray[13] && maidArray[13].Visible)
  13849. {
  13850. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13851. maidArray[12].transform.position.y,
  13852. maidArray[12].transform.position.z));
  13853. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13854. }
  13855. isDance = true;
  13856. isDanceStart14 = true;
  13857. isSN4 = false;
  13858. isSN5 = false;
  13859. isSN6 = false;
  13860. }
  13861. if (isSD1)
  13862. {
  13863. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13864. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13865. for (int j = 0; j < maidCnt; j++)
  13866. {
  13867. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13868. string text5 = "dance_cmo_002_sd_f1.anm";
  13869. switch (j)
  13870. {
  13871. case 1:
  13872. case 3:
  13873. case 5:
  13874. case 7:
  13875. case 9:
  13876. case 11:
  13877. case 13:
  13878. text5 = "dance_cmo_002_sd_f2.anm";
  13879. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13880. break;
  13881. }
  13882. danceName[j] = text5;
  13883. if (maidArray[j] && maidArray[j].Visible)
  13884. {
  13885. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13886. {
  13887. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13888. }
  13889. string text4 = textAsset.text;
  13890. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13891. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13892. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13893. }
  13894. }
  13895. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13896. ikBui = 5;
  13897. isDanceStart1F = false;
  13898. isDanceStart2F = false;
  13899. isDanceStart3F = false;
  13900. isDanceStart4F = false;
  13901. isDanceStart5F = false;
  13902. isDanceStart6F = false;
  13903. isDanceStart7F = false;
  13904. isDanceStart8F = false;
  13905. isDanceStart9F = false;
  13906. isDanceStart10F = false;
  13907. isDanceStart11F = false;
  13908. isDanceStart12F = false;
  13909. isDanceStart13F = false;
  13910. isDanceStart14F = false;
  13911. isDanceStart15F = false;
  13912. for (int j = 0; j < maidCnt; j++)
  13913. {
  13914. danceFace[j] = 0f;
  13915. }
  13916. if (isDanceStart7V)
  13917. {
  13918. for (int j = 0; j < maidCnt; j++)
  13919. {
  13920. if (maidArray[j] && maidArray[j].Visible)
  13921. {
  13922. if (isDanceStart7V)
  13923. {
  13924. maidArray[j].SetPos(dancePos[j]);
  13925. maidArray[j].body0.transform.localRotation = danceRot[j];
  13926. }
  13927. }
  13928. }
  13929. isDanceStart7V = false;
  13930. }
  13931. if (isDanceStart8V)
  13932. {
  13933. for (int j = 0; j < maidCnt; j++)
  13934. {
  13935. if (maidArray[j] && maidArray[j].Visible)
  13936. {
  13937. if (isDanceStart8V)
  13938. {
  13939. maidArray[j].SetPos(dancePos[j]);
  13940. maidArray[j].body0.transform.localRotation = danceRot[j];
  13941. }
  13942. }
  13943. }
  13944. isDanceStart8V = false;
  13945. isDanceStart8P = false;
  13946. }
  13947. if (isDanceStart11V)
  13948. {
  13949. for (int j = 0; j < maidCnt; j++)
  13950. {
  13951. if (maidArray[j] && maidArray[j].Visible)
  13952. {
  13953. if (isDanceStart11V)
  13954. {
  13955. maidArray[j].SetPos(dancePos[j]);
  13956. maidArray[j].body0.transform.localRotation = danceRot[j];
  13957. }
  13958. }
  13959. }
  13960. isDanceStart11V = false;
  13961. }
  13962. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13963. || isDanceStart13K)
  13964. {
  13965. for (int j = 0; j < maidCnt; j++)
  13966. {
  13967. if (maidArray[j] && maidArray[j].Visible)
  13968. {
  13969. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13970. || isDanceStart13K)
  13971. {
  13972. maidArray[j].SetPos(dancePos[j]);
  13973. maidArray[j].body0.transform.localRotation = danceRot[j];
  13974. int i = j;
  13975. if (!isVR)
  13976. {
  13977. delCount[i] = 20;
  13978. if (goSlot[(int)selectList[i]] != null)
  13979. {
  13980. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13981. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13982. {
  13983. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13984. }
  13985. }
  13986. }
  13987. Maid maid = maidArray[j];
  13988. maid.DelProp(MPN.handitem, true);
  13989. maid.DelProp(MPN.accvag, true);
  13990. maid.DelProp(MPN.accanl, true);
  13991. maid.DelProp(MPN.kousoku_upper, true);
  13992. maid.DelProp(MPN.kousoku_lower, true);
  13993. maid.AllProcPropSeqStart();
  13994. }
  13995. }
  13996. }
  13997. isDanceStart1K = false;
  13998. isDanceStart3K = false;
  13999. isDanceStart4K = false;
  14000. isDanceStart5K = false;
  14001. isDanceStart6K = false;
  14002. isDanceStart9K = false;
  14003. isDanceStart13K = false;
  14004. }
  14005. if (isDanceStart14V)
  14006. {
  14007. for (int j = 0; j < maidCnt; j++)
  14008. {
  14009. if (maidArray[j] && maidArray[j].Visible)
  14010. {
  14011. if (isDanceStart14V)
  14012. {
  14013. maidArray[j].SetPos(dancePos[j]);
  14014. maidArray[j].body0.transform.localRotation = danceRot[j];
  14015. }
  14016. }
  14017. }
  14018. isDanceStart14V = false;
  14019. }
  14020. if (isDanceStart15V)
  14021. {
  14022. for (int j = 0; j < maidCnt; j++)
  14023. {
  14024. if (maidArray[j] && maidArray[j].Visible)
  14025. {
  14026. if (isDanceStart15V)
  14027. {
  14028. maidArray[j].SetPos(dancePos[j]);
  14029. maidArray[j].body0.transform.localRotation = danceRot[j];
  14030. }
  14031. }
  14032. }
  14033. isDanceStart15V = false;
  14034. }
  14035. for (int j = 0; j < maidCnt; j++)
  14036. {
  14037. isStop[j] = false;
  14038. isLock[j] = false;
  14039. pHandL[j] = 0;
  14040. pHandR[j] = 0;
  14041. muneIKL[j] = false;
  14042. muneIKR[j] = false;
  14043. if (!isVR)
  14044. {
  14045. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14046. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14047. }
  14048. if (maidArray[j].transform.position.y != 100f)
  14049. {
  14050. dancePos[j] = maidArray[j].transform.position;
  14051. }
  14052. else
  14053. {
  14054. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14055. }
  14056. danceRot[j] = maidArray[j].transform.localRotation;
  14057. }
  14058. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14059. {
  14060. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14061. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14062. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14063. maidArray[0].body0.transform.localRotation =
  14064. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14065. }
  14066. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14067. {
  14068. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14069. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14070. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14071. maidArray[2].body0.transform.localRotation =
  14072. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14073. }
  14074. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14075. {
  14076. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14077. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14078. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14079. maidArray[4].body0.transform.localRotation =
  14080. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14081. }
  14082. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14083. {
  14084. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14085. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14086. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14087. maidArray[6].body0.transform.localRotation =
  14088. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14089. }
  14090. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14091. {
  14092. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14093. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14094. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14095. maidArray[8].body0.transform.localRotation =
  14096. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14097. }
  14098. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14099. {
  14100. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14101. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14102. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14103. maidArray[10].body0.transform.localRotation =
  14104. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14105. }
  14106. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14107. {
  14108. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14109. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14110. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14111. maidArray[12].body0.transform.localRotation =
  14112. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14113. }
  14114. if (maidArray[1] && maidArray[1].Visible)
  14115. {
  14116. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14117. maidArray[0].transform.position.y,
  14118. maidArray[0].transform.position.z));
  14119. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14120. }
  14121. if (maidArray[3] && maidArray[3].Visible)
  14122. {
  14123. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14124. maidArray[2].transform.position.y,
  14125. maidArray[2].transform.position.z));
  14126. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14127. }
  14128. if (maidArray[5] && maidArray[5].Visible)
  14129. {
  14130. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14131. maidArray[4].transform.position.y,
  14132. maidArray[4].transform.position.z));
  14133. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14134. }
  14135. if (maidArray[7] && maidArray[7].Visible)
  14136. {
  14137. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14138. maidArray[6].transform.position.y,
  14139. maidArray[6].transform.position.z));
  14140. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14141. }
  14142. if (maidArray[9] && maidArray[9].Visible)
  14143. {
  14144. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14145. maidArray[8].transform.position.y,
  14146. maidArray[8].transform.position.z));
  14147. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14148. }
  14149. if (maidArray[11] && maidArray[11].Visible)
  14150. {
  14151. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14152. maidArray[10].transform.position.y,
  14153. maidArray[10].transform.position.z));
  14154. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14155. }
  14156. if (maidArray[13] && maidArray[13].Visible)
  14157. {
  14158. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14159. maidArray[12].transform.position.y,
  14160. maidArray[12].transform.position.z));
  14161. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14162. }
  14163. if (maidArray[2] && maidArray[2].Visible)
  14164. {
  14165. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14166. {
  14167. Vector3 vector = Vector3.zero;
  14168. vector.x = 0.6f;
  14169. maidArray[1].SetPos(vector);
  14170. if (maidArray[2] && maidArray[2].Visible)
  14171. {
  14172. vector.x = -0.6f;
  14173. maidArray[2].SetPos(vector);
  14174. }
  14175. if (maidArray[3] && maidArray[3].Visible)
  14176. {
  14177. vector.x = 1.2f;
  14178. maidArray[3].SetPos(vector);
  14179. }
  14180. if (maidArray[4] && maidArray[4].Visible)
  14181. {
  14182. vector.x = -1.2f;
  14183. maidArray[4].SetPos(vector);
  14184. }
  14185. if (maidArray[5] && maidArray[5].Visible)
  14186. {
  14187. vector.x = 1.8f;
  14188. maidArray[5].SetPos(vector);
  14189. }
  14190. if (maidArray[6] && maidArray[6].Visible)
  14191. {
  14192. vector.x = -1.8f;
  14193. maidArray[6].SetPos(vector);
  14194. }
  14195. if (maidArray[7] && maidArray[7].Visible)
  14196. {
  14197. vector.x = 2.4f;
  14198. maidArray[7].SetPos(vector);
  14199. }
  14200. if (maidArray[8] && maidArray[8].Visible)
  14201. {
  14202. vector.x = -2.4f;
  14203. maidArray[8].SetPos(vector);
  14204. }
  14205. if (maidArray[9] && maidArray[9].Visible)
  14206. {
  14207. vector.x = 3f;
  14208. maidArray[9].SetPos(vector);
  14209. }
  14210. if (maidArray[10] && maidArray[10].Visible)
  14211. {
  14212. vector.x = -3f;
  14213. maidArray[10].SetPos(vector);
  14214. }
  14215. if (maidArray[11] && maidArray[11].Visible)
  14216. {
  14217. vector.x = 3.6f;
  14218. maidArray[11].SetPos(vector);
  14219. }
  14220. if (maidArray[12] && maidArray[12].Visible)
  14221. {
  14222. vector.x = -3.6f;
  14223. maidArray[12].SetPos(vector);
  14224. }
  14225. if (maidArray[13] && maidArray[13].Visible)
  14226. {
  14227. vector.x = 4.2f;
  14228. maidArray[13].SetPos(vector);
  14229. }
  14230. }
  14231. }
  14232. isDance = true;
  14233. isDanceStart15 = true;
  14234. isSD1 = false;
  14235. }
  14236. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14237. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14238. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14239. || Input.GetKeyDown(KeyCode.Keypad0))
  14240. {
  14241. for (int j = 0; j < maidCnt; j++)
  14242. {
  14243. if (maidArray[j] && maidArray[j].Visible)
  14244. {
  14245. if (!isVR)
  14246. {
  14247. if (goSlot[(int)selectList[j]] != null)
  14248. {
  14249. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14250. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14251. {
  14252. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14253. }
  14254. }
  14255. }
  14256. }
  14257. }
  14258. }
  14259. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14260. {
  14261. if (h2Flg)
  14262. {
  14263. h2Flg = false;
  14264. }
  14265. else
  14266. {
  14267. string text4 = "";
  14268. if (wearIndex == 0)
  14269. {
  14270. text4 = "Underwear";
  14271. wearIndex = 1;
  14272. isWear = false;
  14273. isSkirt = false;
  14274. isBra = true;
  14275. isPanz = true;
  14276. isHeadset = false;
  14277. isGlove = false;
  14278. isStkg = true;
  14279. isShoes = false;
  14280. }
  14281. else if (wearIndex == 1)
  14282. {
  14283. text4 = "Nude";
  14284. wearIndex = 2;
  14285. isWear = false;
  14286. isSkirt = false;
  14287. isBra = false;
  14288. isPanz = false;
  14289. isHeadset = false;
  14290. isGlove = false;
  14291. isStkg = false;
  14292. isShoes = false;
  14293. }
  14294. else if (wearIndex == 2)
  14295. {
  14296. text4 = "None";
  14297. wearIndex = 0;
  14298. isWear = true;
  14299. isSkirt = true;
  14300. isBra = true;
  14301. isPanz = true;
  14302. isHeadset = true;
  14303. isGlove = true;
  14304. isStkg = true;
  14305. isShoes = true;
  14306. }
  14307. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14308. for (int j = 0; j < maidCnt; j++)
  14309. {
  14310. if (maidArray[j] && maidArray[j].Visible)
  14311. {
  14312. if (!isVR)
  14313. {
  14314. if (goSlot[(int)selectList[j]] != null)
  14315. {
  14316. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14317. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14318. {
  14319. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14320. }
  14321. }
  14322. }
  14323. maidArray[j].body0.SetMaskMode(maskMode);
  14324. }
  14325. }
  14326. }
  14327. }
  14328. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14329. {
  14330. saveScene = 9999;
  14331. saveScene2 = saveScene;
  14332. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14333. try
  14334. {
  14335. thum_byte_to_base64_ = string.Empty;
  14336. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14337. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14338. }
  14339. catch { }
  14340. }
  14341. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14342. {
  14343. loadScene = 9999;
  14344. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14345. }
  14346. if (isScreen)
  14347. {
  14348. isScreen = false;
  14349. bGui = isGui;
  14350. isGui = false;
  14351. if (!isMessage)
  14352. {
  14353. foreach (UICamera uicamera in ui_cam_hide_list_)
  14354. {
  14355. uicamera.GetComponent<Camera>().enabled = true;
  14356. }
  14357. ui_cam_hide_list_.Clear();
  14358. }
  14359. else
  14360. {
  14361. if (editUI != null)
  14362. {
  14363. editUI.SetActive(true);
  14364. }
  14365. if (GameMain.Instance.CMSystem.ViewFps)
  14366. {
  14367. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14368. childObject.SetActive(true);
  14369. }
  14370. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14371. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14372. childObject2.SetActive(true);
  14373. childObject3.SetActive(true);
  14374. }
  14375. for (int j = 0; j < maidCnt; j++)
  14376. {
  14377. if (maidArray[j] && maidArray[j].Visible)
  14378. {
  14379. isBone[j] = isBoneN[j];
  14380. if (isBone[j])
  14381. {
  14382. gNeck[j].SetActive(true);
  14383. gSpine[j].SetActive(true);
  14384. gSpine0a[j].SetActive(true);
  14385. gSpine1a[j].SetActive(true);
  14386. gSpine1[j].SetActive(true);
  14387. gPelvis[j].SetActive(true);
  14388. gHandL[j].SetActive(true);
  14389. gArmL[j].SetActive(true);
  14390. gFootL[j].SetActive(true);
  14391. gHizaL[j].SetActive(true);
  14392. gHandR[j].SetActive(true);
  14393. gArmR[j].SetActive(true);
  14394. gFootR[j].SetActive(true);
  14395. gHizaR[j].SetActive(true);
  14396. gClavicleL[j].SetActive(true);
  14397. gClavicleR[j].SetActive(true);
  14398. }
  14399. }
  14400. }
  14401. }
  14402. if (isScreen2)
  14403. {
  14404. isScreen = true;
  14405. isScreen2 = false;
  14406. }
  14407. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14408. && !Input.GetKey(KeyCode.Q))
  14409. {
  14410. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14411. {
  14412. isScreen = true;
  14413. for (int j = 0; j < maidCnt; j++)
  14414. {
  14415. if (maidArray[j] && maidArray[j].Visible)
  14416. {
  14417. if (isBone[j])
  14418. {
  14419. gNeck[j].SetActive(false);
  14420. gSpine[j].SetActive(false);
  14421. gSpine0a[j].SetActive(false);
  14422. gSpine1a[j].SetActive(false);
  14423. gSpine1[j].SetActive(false);
  14424. gPelvis[j].SetActive(false);
  14425. gHandL[j].SetActive(false);
  14426. gArmL[j].SetActive(false);
  14427. gFootL[j].SetActive(false);
  14428. gHizaL[j].SetActive(false);
  14429. gHandR[j].SetActive(false);
  14430. gArmR[j].SetActive(false);
  14431. gFootR[j].SetActive(false);
  14432. gHizaR[j].SetActive(false);
  14433. gClavicleL[j].SetActive(false);
  14434. gClavicleR[j].SetActive(false);
  14435. }
  14436. isBoneN[j] = isBone[j];
  14437. isBone[j] = false;
  14438. }
  14439. }
  14440. if (!isMessage)
  14441. {
  14442. ui_cam_hide_list_.Clear();
  14443. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14444. foreach (UICamera uicamera2 in array16)
  14445. {
  14446. if (uicamera2.GetComponent<Camera>().enabled)
  14447. {
  14448. uicamera2.GetComponent<Camera>().enabled = false;
  14449. ui_cam_hide_list_.Add(uicamera2);
  14450. }
  14451. }
  14452. }
  14453. else
  14454. {
  14455. editUI = GameObject.Find("/UI Root/Camera");
  14456. if (editUI != null)
  14457. {
  14458. editUI.SetActive(false);
  14459. }
  14460. if (GameMain.Instance.CMSystem.ViewFps)
  14461. {
  14462. GameObject childObject =
  14463. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14464. childObject.SetActive(false);
  14465. }
  14466. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14467. GameObject childObject3 =
  14468. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14469. childObject2.SetActive(false);
  14470. childObject3.SetActive(false);
  14471. }
  14472. isGui = bGui;
  14473. bGui = false;
  14474. GameMain.Instance.MainCamera.ScreenShot(false);
  14475. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14476. }
  14477. }
  14478. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14479. {
  14480. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14481. keyFlg2 = true;
  14482. }
  14483. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14484. {
  14485. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14486. keyFlg2 = true;
  14487. }
  14488. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14489. {
  14490. mainCameraTransform.eulerAngles =
  14491. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14492. keyFlg2 = true;
  14493. }
  14494. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14495. {
  14496. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14497. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14498. mainCamera.SetDistance(3f, true);
  14499. keyFlg2 = true;
  14500. }
  14501. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14502. {
  14503. cameraIti = mainCamera.GetTargetPos();
  14504. cameraIti2 = mainCamera.GetPos();
  14505. cameraItiAngle = mainCamera.GetAroundAngle();
  14506. cameraItiDistance = mainCamera.GetDistance();
  14507. keyFlg2 = true;
  14508. }
  14509. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14510. {
  14511. mainCamera.SetTargetPos(cameraIti, true);
  14512. mainCamera.SetPos(cameraIti2);
  14513. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14514. mainCamera.SetDistance(cameraItiDistance, true);
  14515. keyFlg2 = true;
  14516. }
  14517. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14518. {
  14519. if (keyFlg2)
  14520. {
  14521. keyFlg2 = false;
  14522. }
  14523. else
  14524. {
  14525. effectIndex++;
  14526. if (effectIndex == 9)
  14527. {
  14528. kami.SetActive(false);
  14529. effectIndex = 0;
  14530. }
  14531. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14532. if (!isBlur)
  14533. {
  14534. component3.mode = Vignetting.AberrationMode.Simple;
  14535. component3.intensity = -3.98f;
  14536. component3.chromaticAberration = -0.75f;
  14537. component3.axialAberration = 1.18f;
  14538. component3.blurSpread = 4.19f;
  14539. component3.luminanceDependency = 0.494f;
  14540. component3.blurDistance = 1.71f;
  14541. component3.enabled = false;
  14542. }
  14543. if (kami) { }
  14544. if (effectIndex == 0)
  14545. {
  14546. component3.enabled = false;
  14547. }
  14548. if (effectIndex == 1)
  14549. {
  14550. component3.mode = Vignetting.AberrationMode.Simple;
  14551. component3.intensity = -1f;
  14552. component3.chromaticAberration = 0f;
  14553. component3.axialAberration = 0f;
  14554. component3.blurSpread = 5f;
  14555. component3.luminanceDependency = 0f;
  14556. component3.blurDistance = 0f;
  14557. component3.enabled = true;
  14558. }
  14559. if (effectIndex == 2)
  14560. {
  14561. component3.enabled = true;
  14562. }
  14563. if (effectIndex == 3)
  14564. {
  14565. component3.mode = Vignetting.AberrationMode.Simple;
  14566. component3.intensity = 9f;
  14567. component3.chromaticAberration = 0f;
  14568. component3.axialAberration = 0f;
  14569. component3.blurSpread = 5f;
  14570. component3.luminanceDependency = 0f;
  14571. component3.blurDistance = 0f;
  14572. component3.enabled = true;
  14573. }
  14574. if (effectIndex == 4)
  14575. {
  14576. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14577. kami = (GameObject)Instantiate(@object);
  14578. Vector3 localPosition = kami.transform.localPosition;
  14579. localPosition.y = 3.5f;
  14580. kami.transform.localPosition = localPosition;
  14581. }
  14582. if (effectIndex == 5)
  14583. {
  14584. component3.enabled = true;
  14585. component3.mode = Vignetting.AberrationMode.Simple;
  14586. component3.intensity = -2.5f;
  14587. component3.chromaticAberration = -0.3f;
  14588. component3.axialAberration = 0.5f;
  14589. component3.blurSpread = 4.5f;
  14590. component3.luminanceDependency = 0.2f;
  14591. component3.blurDistance = 0.8f;
  14592. component3.enabled = true;
  14593. }
  14594. if (effectIndex == 6)
  14595. {
  14596. kami.SetActive(false);
  14597. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14598. kami = (GameObject)Instantiate(@object);
  14599. Vector3 localPosition = kami.transform.localPosition;
  14600. localPosition.y = 3.5f;
  14601. kami.transform.localPosition = localPosition;
  14602. }
  14603. if (effectIndex == 7)
  14604. {
  14605. component3.enabled = true;
  14606. component3.mode = Vignetting.AberrationMode.Simple;
  14607. component3.intensity = -2.5f;
  14608. component3.chromaticAberration = -0.3f;
  14609. component3.axialAberration = 0.5f;
  14610. component3.blurSpread = 4.5f;
  14611. component3.luminanceDependency = 0.2f;
  14612. component3.blurDistance = 0.8f;
  14613. component3.enabled = true;
  14614. }
  14615. if (effectIndex == 8)
  14616. {
  14617. component3.mode = Vignetting.AberrationMode.Simple;
  14618. component3.intensity = 8f;
  14619. component3.chromaticAberration = 0f;
  14620. component3.axialAberration = 0f;
  14621. component3.blurSpread = 5f;
  14622. component3.luminanceDependency = 0f;
  14623. component3.blurDistance = 0f;
  14624. component3.enabled = true;
  14625. }
  14626. }
  14627. }
  14628. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14629. {
  14630. qFlg = false;
  14631. }
  14632. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14633. {
  14634. bool flag5 = false;
  14635. for (int k = 0; k < keyArray.Length; k++)
  14636. {
  14637. if (Input.GetKey(keyArray[k]))
  14638. {
  14639. flag5 = true;
  14640. break;
  14641. }
  14642. }
  14643. if (!getModKeyPressing(modKey.Shift))
  14644. {
  14645. if (!flag5)
  14646. {
  14647. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14648. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14649. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14650. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14651. {
  14652. Vector3 vector = softG;
  14653. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14654. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14655. softG = vector;
  14656. }
  14657. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14658. {
  14659. Vector3 vector = softG;
  14660. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14661. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14662. softG = vector;
  14663. }
  14664. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14665. {
  14666. Vector3 vector = softG;
  14667. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14668. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14669. softG = vector;
  14670. }
  14671. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14672. {
  14673. Vector3 vector = softG;
  14674. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14675. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14676. softG = vector;
  14677. }
  14678. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14679. {
  14680. Vector3 vector = softG;
  14681. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14682. softG = vector;
  14683. }
  14684. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14685. {
  14686. Vector3 vector = softG;
  14687. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14688. softG = vector;
  14689. }
  14690. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14691. {
  14692. Vector3 vector = softG;
  14693. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14694. softG = vector;
  14695. }
  14696. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14697. {
  14698. Vector3 vector = softG;
  14699. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14700. softG = vector;
  14701. }
  14702. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14703. {
  14704. Vector3 vector = softG;
  14705. vector.y += 6E-05f * speed;
  14706. softG = vector;
  14707. }
  14708. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14709. {
  14710. Vector3 vector = softG;
  14711. vector.y -= 6E-05f * speed;
  14712. softG = vector;
  14713. }
  14714. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14715. {
  14716. softG = new Vector3(0f, -0.003f, 0f);
  14717. }
  14718. for (int j = 0; j < maidCnt; j++)
  14719. {
  14720. Maid maid = maidArray[j];
  14721. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14722. {
  14723. if (maid.body0.goSlot[l].obj != null)
  14724. {
  14725. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14726. if (component2 != null && component2.enabled)
  14727. {
  14728. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14729. }
  14730. }
  14731. List<THair1> fieldValue3 =
  14732. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14733. for (int k = 0; k < fieldValue3.Count; k++)
  14734. {
  14735. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14736. }
  14737. }
  14738. }
  14739. }
  14740. }
  14741. else if (!flag5)
  14742. {
  14743. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14744. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14745. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14746. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14747. {
  14748. Vector3 vector = softG2;
  14749. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14750. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14751. softG2 = vector;
  14752. }
  14753. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14754. {
  14755. Vector3 vector = softG2;
  14756. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14757. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14758. softG2 = vector;
  14759. }
  14760. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14761. {
  14762. Vector3 vector = softG2;
  14763. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14764. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14765. softG2 = vector;
  14766. }
  14767. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14768. {
  14769. Vector3 vector = softG2;
  14770. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14771. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14772. softG2 = vector;
  14773. }
  14774. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14775. {
  14776. Vector3 vector = softG2;
  14777. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14778. softG2 = vector;
  14779. }
  14780. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14781. {
  14782. Vector3 vector = softG2;
  14783. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14784. softG2 = vector;
  14785. }
  14786. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14787. {
  14788. Vector3 vector = softG2;
  14789. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14790. softG2 = vector;
  14791. }
  14792. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14793. {
  14794. Vector3 vector = softG2;
  14795. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14796. softG2 = vector;
  14797. }
  14798. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14799. {
  14800. Vector3 vector = softG2;
  14801. vector.y += 2E-05f * speed;
  14802. softG2 = vector;
  14803. }
  14804. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14805. {
  14806. Vector3 vector = softG2;
  14807. vector.y -= 2E-05f * speed;
  14808. softG2 = vector;
  14809. }
  14810. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14811. {
  14812. softG2 = new Vector3(0f, -0.005f, 0f);
  14813. }
  14814. for (int j = 0; j < maidCnt; j++)
  14815. {
  14816. Maid maid = maidArray[j];
  14817. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14818. {
  14819. if (maid.body0.goSlot[l].obj != null)
  14820. {
  14821. DynamicSkirtBone fieldValue8 =
  14822. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14823. "m_SkirtBone");
  14824. if (fieldValue8 != null)
  14825. {
  14826. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14827. fieldValue8.UpdateParameters();
  14828. }
  14829. }
  14830. }
  14831. }
  14832. }
  14833. }
  14834. if (!isVR)
  14835. {
  14836. if (doguObject.Count > 0)
  14837. {
  14838. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14839. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14840. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14841. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14842. {
  14843. idoFlg2 = true;
  14844. doguObject[doguSelectIndex].transform.localScale =
  14845. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14846. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14847. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14848. }
  14849. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14850. {
  14851. idoFlg2 = true;
  14852. doguObject[doguSelectIndex].transform.localScale =
  14853. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14854. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14855. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14856. }
  14857. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14858. {
  14859. idoFlg2 = true;
  14860. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14861. }
  14862. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14863. {
  14864. doguObject[doguSelectIndex]
  14865. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14866. idoFlg2 = true;
  14867. }
  14868. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14869. {
  14870. doguObject[doguSelectIndex]
  14871. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14872. idoFlg2 = true;
  14873. }
  14874. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14875. && getModKeyPressing(modKey.Alt))
  14876. {
  14877. for (int k = 0; k < 10; k++)
  14878. {
  14879. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14880. Vector3.right,
  14881. -doguObject[doguSelectIndex]
  14882. .transform.rotation.eulerAngles.x);
  14883. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14884. Vector3.forward,
  14885. -doguObject[doguSelectIndex]
  14886. .transform.rotation.eulerAngles.z);
  14887. }
  14888. idoFlg2 = true;
  14889. Vector3 vector = Vector3.zero;
  14890. Vector3 zero3 = Vector3.zero;
  14891. zero3.x = -90f;
  14892. int num12 = doguIndex[doguSelectIndex];
  14893. switch (num12)
  14894. {
  14895. case 3:
  14896. vector.z = 0.5f;
  14897. zero3.z = 90f;
  14898. break;
  14899. case 4:
  14900. case 5:
  14901. case 7:
  14902. case 10:
  14903. case 11: break;
  14904. case 6:
  14905. vector.z = 0.6f;
  14906. zero3.x = 0f;
  14907. break;
  14908. case 8:
  14909. vector.z = 0.5f;
  14910. zero3.x = 0f;
  14911. break;
  14912. case 9:
  14913. vector.z = 0.32f;
  14914. zero3.z = 180f;
  14915. break;
  14916. case 12:
  14917. vector.z = 0.5f;
  14918. zero3.z = 180f;
  14919. break;
  14920. case 13:
  14921. vector.z = 0.7f;
  14922. zero3.z = 180f;
  14923. break;
  14924. default:
  14925. if (num12 != 16)
  14926. {
  14927. switch (num12)
  14928. {
  14929. case 23:
  14930. vector.z = 2.7f;
  14931. vector.x = 0.77f;
  14932. zero3.z = 90f;
  14933. break;
  14934. case 25:
  14935. vector.z = 0.5f;
  14936. vector.y = 0.9f;
  14937. zero3.z = 180f;
  14938. break;
  14939. case 26:
  14940. vector.z = 0.5f;
  14941. vector.y = 0.9f;
  14942. zero3.z = 180f;
  14943. break;
  14944. case 30:
  14945. vector.z = 0f;
  14946. zero3.z = 0f;
  14947. break;
  14948. case 31:
  14949. vector.z = -0.6f;
  14950. vector.y = 0.96f;
  14951. zero3.z = 180f;
  14952. break;
  14953. case 32:
  14954. vector.z = -0.6f;
  14955. vector.y = 0.96f;
  14956. zero3.z = 180f;
  14957. break;
  14958. case 33:
  14959. vector.z = -0.6f;
  14960. vector.y = 0.85f;
  14961. zero3.z = 180f;
  14962. break;
  14963. }
  14964. }
  14965. else
  14966. {
  14967. vector.z = -0.4f;
  14968. zero3.z = 180f;
  14969. }
  14970. break;
  14971. }
  14972. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14973. }
  14974. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14975. && Input.GetKey(KeyCode.J))
  14976. {
  14977. doguObject[doguSelectIndex]
  14978. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14979. new Vector3(vector3.x, 0f, vector3.z),
  14980. 0.3f);
  14981. doguObject[doguSelectIndex]
  14982. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14983. new Vector3(vector2.x, 0f, vector2.z),
  14984. 0.3f);
  14985. idoFlg2 = true;
  14986. }
  14987. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14988. && Input.GetKey(KeyCode.L))
  14989. {
  14990. doguObject[doguSelectIndex]
  14991. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14992. new Vector3(vector3.x, 0f, vector3.z),
  14993. 0.3f);
  14994. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14995. new Vector3(vector2.x, 0f, vector2.z),
  14996. -0.3f);
  14997. idoFlg2 = true;
  14998. }
  14999. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15000. && Input.GetKey(KeyCode.J))
  15001. {
  15002. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15003. new Vector3(vector3.x, 0f, vector3.z),
  15004. -0.3f);
  15005. doguObject[doguSelectIndex]
  15006. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15007. new Vector3(vector2.x, 0f, vector2.z),
  15008. 0.3f);
  15009. idoFlg2 = true;
  15010. }
  15011. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15012. && Input.GetKey(KeyCode.L))
  15013. {
  15014. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15015. new Vector3(vector3.x, 0f, vector3.z),
  15016. -0.3f);
  15017. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15018. new Vector3(vector2.x, 0f, vector2.z),
  15019. -0.3f);
  15020. idoFlg2 = true;
  15021. }
  15022. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15023. {
  15024. doguObject[doguSelectIndex]
  15025. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15026. new Vector3(vector3.x, 0f, vector3.z),
  15027. 0.4f);
  15028. idoFlg2 = true;
  15029. }
  15030. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15031. {
  15032. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15033. new Vector3(vector3.x, 0f, vector3.z),
  15034. -0.4f);
  15035. idoFlg2 = true;
  15036. }
  15037. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15038. {
  15039. doguObject[doguSelectIndex]
  15040. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15041. new Vector3(vector2.x, 0f, vector2.z),
  15042. 0.4f);
  15043. idoFlg2 = true;
  15044. }
  15045. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15046. {
  15047. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15048. new Vector3(vector2.x, 0f, vector2.z),
  15049. -0.4f);
  15050. idoFlg2 = true;
  15051. }
  15052. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15053. {
  15054. doguObject[doguSelectIndex].transform.localRotation =
  15055. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15056. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15057. idoFlg2 = true;
  15058. }
  15059. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15060. {
  15061. doguObject[doguSelectIndex].transform.localRotation =
  15062. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15063. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15064. idoFlg2 = true;
  15065. }
  15066. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15067. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15068. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15069. {
  15070. doguObject[doguSelectIndex].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.Quote) && getModKeyPressing(modKey.Shift))
  15077. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15078. {
  15079. doguObject[doguSelectIndex]
  15080. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15081. new Vector3(vector3.x, 0f, vector3.z),
  15082. 0.7f);
  15083. idoFlg2 = true;
  15084. }
  15085. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15086. && (Input.GetKey(KeyCode.Minus)
  15087. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15088. {
  15089. doguObject[doguSelectIndex]
  15090. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15091. new Vector3(vector2.x, 0f, vector2.z),
  15092. 0.7f);
  15093. idoFlg2 = true;
  15094. }
  15095. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15096. && (Input.GetKey(KeyCode.Quote)
  15097. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15098. {
  15099. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15100. new Vector3(vector2.x, 0f, vector2.z),
  15101. -0.7f);
  15102. idoFlg2 = true;
  15103. }
  15104. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15105. && Input.GetKey(KeyCode.J))
  15106. {
  15107. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15108. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15109. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15110. doguObject[doguSelectIndex].transform.localPosition = vector;
  15111. idoFlg2 = true;
  15112. }
  15113. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15114. && Input.GetKey(KeyCode.L))
  15115. {
  15116. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15117. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15118. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15119. doguObject[doguSelectIndex].transform.localPosition = vector;
  15120. idoFlg2 = true;
  15121. }
  15122. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15123. && Input.GetKey(KeyCode.J))
  15124. {
  15125. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15126. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15127. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15128. doguObject[doguSelectIndex].transform.localPosition = vector;
  15129. idoFlg2 = true;
  15130. }
  15131. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15132. && Input.GetKey(KeyCode.L))
  15133. {
  15134. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15135. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15136. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15137. doguObject[doguSelectIndex].transform.localPosition = vector;
  15138. idoFlg2 = true;
  15139. }
  15140. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15141. {
  15142. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15143. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15144. doguObject[doguSelectIndex].transform.localPosition = vector;
  15145. idoFlg2 = true;
  15146. }
  15147. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15148. {
  15149. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15150. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15151. doguObject[doguSelectIndex].transform.localPosition = vector;
  15152. idoFlg2 = true;
  15153. }
  15154. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15155. {
  15156. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15157. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15158. doguObject[doguSelectIndex].transform.localPosition = vector;
  15159. idoFlg2 = true;
  15160. }
  15161. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15162. {
  15163. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15164. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15165. doguObject[doguSelectIndex].transform.localPosition = vector;
  15166. idoFlg2 = true;
  15167. }
  15168. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15169. {
  15170. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15171. vector.y += 0.0075f * speed;
  15172. doguObject[doguSelectIndex].transform.localPosition = vector;
  15173. idoFlg2 = true;
  15174. }
  15175. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15176. {
  15177. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15178. vector.y -= 0.0075f * speed;
  15179. doguObject[doguSelectIndex].transform.localPosition = vector;
  15180. idoFlg2 = true;
  15181. }
  15182. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15183. {
  15184. idoFlg2 = true;
  15185. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15186. {
  15187. Destroy(doguObject[doguSelectIndex]);
  15188. doguObject.RemoveAt(doguSelectIndex);
  15189. }
  15190. doguIndex.RemoveAt(doguSelectIndex);
  15191. doguSelectIndex = 0;
  15192. }
  15193. }
  15194. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15195. {
  15196. idoFlg2 = true;
  15197. if (doguSelectIndex == doguObject.Count)
  15198. {
  15199. doguIndex.Add(0);
  15200. }
  15201. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15202. {
  15203. Destroy(doguObject[doguSelectIndex]);
  15204. doguObject.RemoveAt(doguSelectIndex);
  15205. }
  15206. else
  15207. {
  15208. doguIndex.Add(0);
  15209. doguSelectIndex = doguIndex.Count - 1;
  15210. }
  15211. List<int> list2;
  15212. int index;
  15213. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15214. if (doguIndex[doguSelectIndex] <= -1)
  15215. {
  15216. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15217. }
  15218. if (doguIndex[doguSelectIndex] > 0)
  15219. {
  15220. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15221. {
  15222. Object @object = null;
  15223. for (int j = 0; j < 5; j++)
  15224. {
  15225. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15226. if (@object != null)
  15227. {
  15228. break;
  15229. }
  15230. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15231. }
  15232. doguObject.Add(Instantiate(@object) as GameObject);
  15233. }
  15234. else
  15235. {
  15236. Material material = new Material(Shader.Find("Mirror"));
  15237. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15238. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15239. gameObject7.GetComponent<Renderer>().material = material;
  15240. gameObject7.AddComponent<MirrorReflection2>();
  15241. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15242. component5.m_TextureSize = 2048;
  15243. component5.m_ClipPlaneOffset = 0f;
  15244. gameObject7.GetComponent<Renderer>().enabled = true;
  15245. doguObject.Add(gameObject7);
  15246. }
  15247. Vector3 vector = Vector3.zero;
  15248. Vector3 zero3 = Vector3.zero;
  15249. zero3.x = -90f;
  15250. switch (doguIndex[doguSelectIndex])
  15251. {
  15252. case 1:
  15253. vector.z = -0.5f;
  15254. goto IL_344DC;
  15255. case 2:
  15256. vector.z = -0.5f;
  15257. goto IL_344DC;
  15258. case 3:
  15259. vector.z = 0.5f;
  15260. zero3.z = 90f;
  15261. goto IL_344DC;
  15262. case 4:
  15263. vector.z = 0.9f;
  15264. goto IL_344DC;
  15265. case 5:
  15266. vector.z = 0.9f;
  15267. goto IL_344DC;
  15268. case 6:
  15269. vector.z = 0.6f;
  15270. zero3.x = 0f;
  15271. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15272. goto IL_344DC;
  15273. case 7:
  15274. vector.z = 0.6f;
  15275. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15276. goto IL_344DC;
  15277. case 8:
  15278. vector.z = 0.5f;
  15279. zero3.x = 0f;
  15280. goto IL_344DC;
  15281. case 9:
  15282. vector.z = 0.32f;
  15283. zero3.z = 180f;
  15284. goto IL_344DC;
  15285. case 10:
  15286. vector.z = 0.6f;
  15287. goto IL_344DC;
  15288. case 11:
  15289. vector.z = 0.6f;
  15290. goto IL_344DC;
  15291. case 12:
  15292. vector.z = 0.5f;
  15293. zero3.z = 180f;
  15294. goto IL_344DC;
  15295. case 13:
  15296. vector.z = 0.7f;
  15297. zero3.z = 180f;
  15298. goto IL_344DC;
  15299. case 14:
  15300. vector.z = -0.4f;
  15301. goto IL_344DC;
  15302. case 15:
  15303. vector.z = -0.4f;
  15304. goto IL_344DC;
  15305. case 16:
  15306. vector.z = -0.4f;
  15307. zero3.z = 180f;
  15308. goto IL_344DC;
  15309. case 17:
  15310. vector.z = -0.4f;
  15311. goto IL_344DC;
  15312. case 18:
  15313. vector.z = -0.2f;
  15314. goto IL_344DC;
  15315. case 19:
  15316. vector.z = 0f;
  15317. goto IL_344DC;
  15318. case 20:
  15319. vector.z = 3.4f;
  15320. vector.x = -1f;
  15321. goto IL_344DC;
  15322. case 21:
  15323. vector.z = 3.4f;
  15324. vector.x = -1f;
  15325. goto IL_344DC;
  15326. case 22:
  15327. vector.z = 3.4f;
  15328. vector.y = 0.3f;
  15329. vector.x = -1f;
  15330. goto IL_344DC;
  15331. case 23:
  15332. vector.z = 2.7f;
  15333. vector.x = 0.77f;
  15334. zero3.z = 90f;
  15335. goto IL_344DC;
  15336. case 25:
  15337. vector.z = 0.5f;
  15338. vector.y = 0.9f;
  15339. zero3.z = 180f;
  15340. goto IL_344DC;
  15341. case 26:
  15342. vector.z = 0.5f;
  15343. vector.y = 0.9f;
  15344. zero3.z = 180f;
  15345. goto IL_344DC;
  15346. case 29:
  15347. vector.z = 0.5f;
  15348. vector.x = -1.05f;
  15349. goto IL_344DC;
  15350. case 30:
  15351. vector.z = -2.8f;
  15352. zero3.z = 0f;
  15353. zero3.x = 0f;
  15354. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15355. goto IL_344DC;
  15356. case 31:
  15357. vector.z = -0.6f;
  15358. vector.y = 0.96f;
  15359. zero3.z = 180f;
  15360. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15361. goto IL_344DC;
  15362. case 32:
  15363. vector.z = -0.6f;
  15364. vector.y = 0.96f;
  15365. zero3.z = 180f;
  15366. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15367. goto IL_344DC;
  15368. case 33:
  15369. vector.z = -0.6f;
  15370. vector.y = 0.85f;
  15371. zero3.z = 180f;
  15372. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15373. goto IL_344DC;
  15374. }
  15375. vector.z = 0.5f;
  15376. IL_344DC:
  15377. doguObject[doguSelectIndex].transform.localPosition = vector;
  15378. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15379. }
  15380. if (doguIndex[doguSelectIndex] == 0)
  15381. {
  15382. doguIndex.RemoveAt(doguSelectIndex);
  15383. }
  15384. }
  15385. else if (Input.GetKeyDown(KeyCode.W))
  15386. {
  15387. for (int k = 0; k < keyArray.Length; k++)
  15388. {
  15389. if (Input.GetKey(keyArray[k]))
  15390. {
  15391. wFlg = true;
  15392. break;
  15393. }
  15394. }
  15395. }
  15396. else if (Input.GetKeyUp(KeyCode.W))
  15397. {
  15398. if (wFlg)
  15399. {
  15400. wFlg = false;
  15401. }
  15402. else if (idoFlg2)
  15403. {
  15404. idoFlg2 = false;
  15405. }
  15406. else
  15407. {
  15408. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15409. {
  15410. Destroy(doguObject[doguSelectIndex]);
  15411. doguObject.RemoveAt(doguSelectIndex);
  15412. }
  15413. else
  15414. {
  15415. doguIndex.Add(0);
  15416. doguSelectIndex = doguIndex.Count - 1;
  15417. }
  15418. List<int> list2;
  15419. int index;
  15420. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15421. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15422. {
  15423. doguIndex[doguSelectIndex] = 0;
  15424. }
  15425. if (doguIndex[doguSelectIndex] > 0)
  15426. {
  15427. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15428. {
  15429. Object @object = null;
  15430. for (int j = 0; j < 5; j++)
  15431. {
  15432. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15433. if (@object != null)
  15434. {
  15435. break;
  15436. }
  15437. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15438. }
  15439. doguObject.Add(Instantiate(@object) as GameObject);
  15440. }
  15441. else
  15442. {
  15443. Material material = new Material(Shader.Find("Mirror"));
  15444. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15445. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15446. gameObject7.GetComponent<Renderer>().material = material;
  15447. gameObject7.AddComponent<MirrorReflection2>();
  15448. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15449. component5.m_TextureSize = 2048;
  15450. component5.m_ClipPlaneOffset = 0f;
  15451. gameObject7.GetComponent<Renderer>().enabled = true;
  15452. doguObject.Add(gameObject7);
  15453. }
  15454. Vector3 vector = Vector3.zero;
  15455. Vector3 zero3 = Vector3.zero;
  15456. zero3.x = -90f;
  15457. switch (doguIndex[doguSelectIndex])
  15458. {
  15459. case 1:
  15460. vector.z = -0.5f;
  15461. goto IL_34D66;
  15462. case 2:
  15463. vector.z = -0.5f;
  15464. goto IL_34D66;
  15465. case 3:
  15466. vector.z = 0.5f;
  15467. zero3.z = 90f;
  15468. goto IL_34D66;
  15469. case 4:
  15470. vector.z = 0.9f;
  15471. goto IL_34D66;
  15472. case 5:
  15473. vector.z = 0.9f;
  15474. goto IL_34D66;
  15475. case 6:
  15476. vector.z = 0.6f;
  15477. zero3.x = 0f;
  15478. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15479. goto IL_34D66;
  15480. case 7:
  15481. vector.z = 0.6f;
  15482. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15483. goto IL_34D66;
  15484. case 8:
  15485. vector.z = 0.5f;
  15486. zero3.x = 0f;
  15487. goto IL_34D66;
  15488. case 9:
  15489. vector.z = 0.32f;
  15490. zero3.z = 180f;
  15491. goto IL_34D66;
  15492. case 10:
  15493. vector.z = 0.6f;
  15494. goto IL_34D66;
  15495. case 11:
  15496. vector.z = 0.6f;
  15497. goto IL_34D66;
  15498. case 12:
  15499. vector.z = 0.5f;
  15500. zero3.z = 180f;
  15501. goto IL_34D66;
  15502. case 13:
  15503. vector.z = 0.7f;
  15504. zero3.z = 180f;
  15505. goto IL_34D66;
  15506. case 14:
  15507. vector.z = -0.4f;
  15508. goto IL_34D66;
  15509. case 15:
  15510. vector.z = -0.4f;
  15511. goto IL_34D66;
  15512. case 16:
  15513. vector.z = -0.4f;
  15514. zero3.z = 180f;
  15515. goto IL_34D66;
  15516. case 17:
  15517. vector.z = -0.4f;
  15518. goto IL_34D66;
  15519. case 18:
  15520. vector.z = -0.2f;
  15521. goto IL_34D66;
  15522. case 19:
  15523. vector.z = 0f;
  15524. goto IL_34D66;
  15525. case 20:
  15526. vector.z = 3.4f;
  15527. vector.x = -1f;
  15528. goto IL_34D66;
  15529. case 21:
  15530. vector.z = 3.4f;
  15531. vector.x = -1f;
  15532. goto IL_34D66;
  15533. case 22:
  15534. vector.z = 3.4f;
  15535. vector.y = 0.3f;
  15536. vector.x = -1f;
  15537. goto IL_34D66;
  15538. case 23:
  15539. vector.z = 2.7f;
  15540. vector.x = 0.77f;
  15541. zero3.z = 90f;
  15542. goto IL_34D66;
  15543. case 25:
  15544. vector.z = 0.5f;
  15545. vector.y = 0.9f;
  15546. zero3.z = 180f;
  15547. goto IL_34D66;
  15548. case 26:
  15549. vector.z = 0.5f;
  15550. vector.y = 0.9f;
  15551. zero3.z = 180f;
  15552. goto IL_34D66;
  15553. case 29:
  15554. vector.z = 0.5f;
  15555. vector.x = -1.05f;
  15556. goto IL_34D66;
  15557. case 30:
  15558. vector.z = -2.8f;
  15559. zero3.z = 0f;
  15560. zero3.x = 0f;
  15561. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15562. goto IL_34D66;
  15563. case 31:
  15564. vector.z = -0.6f;
  15565. vector.y = 0.96f;
  15566. zero3.z = 180f;
  15567. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15568. goto IL_34D66;
  15569. case 32:
  15570. vector.z = -0.6f;
  15571. vector.y = 0.96f;
  15572. zero3.z = 180f;
  15573. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15574. goto IL_34D66;
  15575. case 33:
  15576. vector.z = -0.6f;
  15577. vector.y = 0.85f;
  15578. zero3.z = 180f;
  15579. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15580. goto IL_34D66;
  15581. }
  15582. vector.z = 0.5f;
  15583. IL_34D66:;
  15584. }
  15585. if (doguIndex[doguSelectIndex] == 0)
  15586. {
  15587. doguIndex.RemoveAt(doguSelectIndex);
  15588. }
  15589. }
  15590. }
  15591. }
  15592. if (!isVR)
  15593. {
  15594. int i;
  15595. for (i = 0; i < 999; i++)
  15596. {
  15597. if (gDogu[i] != null)
  15598. {
  15599. gDogu[i].GetComponent<Renderer>().enabled = false;
  15600. gDogu[i].SetActive(false);
  15601. if (mDogu[i].del)
  15602. {
  15603. mDogu[i].del = false;
  15604. Destroy(doguBObject[i]);
  15605. doguBObject.RemoveAt(i);
  15606. }
  15607. else if (mDogu[i].count > 0)
  15608. {
  15609. mDogu[i].count--;
  15610. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15611. {
  15612. if (mDogu[i].count == 1)
  15613. {
  15614. doguBObject[i].SetActive(false);
  15615. }
  15616. if (mDogu[i].count == 0)
  15617. {
  15618. doguBObject[i].SetActive(true);
  15619. string name = doguBObject[i].name;
  15620. if (name != null)
  15621. {
  15622. if (!(name == "Particle/pLineY"))
  15623. {
  15624. if (!(name == "Particle/pLineP02"))
  15625. {
  15626. if (!(name == "Particle/pLine_act2"))
  15627. {
  15628. if (name == "Particle/pHeart01")
  15629. {
  15630. mDogu[i].count = 77;
  15631. }
  15632. }
  15633. else
  15634. {
  15635. mDogu[i].count = 90;
  15636. }
  15637. }
  15638. else
  15639. {
  15640. mDogu[i].count = 115;
  15641. }
  15642. }
  15643. else
  15644. {
  15645. mDogu[i].count = 180;
  15646. }
  15647. }
  15648. }
  15649. }
  15650. }
  15651. }
  15652. }
  15653. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15654. {
  15655. ikMode2 = 11;
  15656. }
  15657. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15658. {
  15659. ikMode2 = 12;
  15660. }
  15661. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15662. {
  15663. ikMode2 = 14;
  15664. }
  15665. else if (Input.GetKey(KeyCode.X))
  15666. {
  15667. ikMode2 = 9;
  15668. }
  15669. else if (Input.GetKey(KeyCode.Z))
  15670. {
  15671. ikMode2 = 10;
  15672. }
  15673. else if (Input.GetKey(KeyCode.C))
  15674. {
  15675. ikMode2 = 13;
  15676. }
  15677. else if (Input.GetKey(KeyCode.D))
  15678. {
  15679. ikMode2 = 15;
  15680. }
  15681. else
  15682. {
  15683. ikMode2 = 0;
  15684. }
  15685. if (gBg != null)
  15686. {
  15687. if (!isCube3)
  15688. {
  15689. gBg.GetComponent<Renderer>().enabled = false;
  15690. gBg.SetActive(false);
  15691. }
  15692. else
  15693. {
  15694. if (ikMode2 > 0 && ikMode2 != 15)
  15695. {
  15696. gBg.GetComponent<Renderer>().enabled = true;
  15697. gBg.SetActive(true);
  15698. }
  15699. else
  15700. {
  15701. gBg.GetComponent<Renderer>().enabled = false;
  15702. gBg.SetActive(false);
  15703. }
  15704. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15705. {
  15706. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15707. }
  15708. if (ikMode2 == 9 || ikMode2 == 14)
  15709. {
  15710. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15711. mBg.Update();
  15712. }
  15713. if (ikMode2 == 13)
  15714. {
  15715. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15716. mBg.Update();
  15717. }
  15718. if (ikMode2 == 13)
  15719. {
  15720. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15721. {
  15722. mBg.ido = 5;
  15723. mBg.reset = true;
  15724. }
  15725. else
  15726. {
  15727. gBg.transform.position = bg.position;
  15728. gBg.transform.eulerAngles = bg.eulerAngles;
  15729. mBg.maid = bgObject;
  15730. mBg.ido = 5;
  15731. }
  15732. }
  15733. else if (ikMode2 == 11)
  15734. {
  15735. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15736. {
  15737. mBg.ido = 3;
  15738. mBg.reset = true;
  15739. }
  15740. else
  15741. {
  15742. gBg.transform.position = bg.position;
  15743. gBg.transform.eulerAngles = bg.eulerAngles;
  15744. mBg.maid = bgObject;
  15745. mBg.ido = 3;
  15746. }
  15747. }
  15748. else if (ikMode2 == 12)
  15749. {
  15750. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15751. {
  15752. mBg.ido = 2;
  15753. mBg.reset = true;
  15754. }
  15755. else
  15756. {
  15757. gBg.transform.position = bg.position;
  15758. gBg.transform.eulerAngles = bg.eulerAngles;
  15759. mBg.maid = bgObject;
  15760. mBg.ido = 2;
  15761. }
  15762. }
  15763. else if (ikMode2 == 10)
  15764. {
  15765. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15766. {
  15767. mBg.ido = 1;
  15768. mBg.reset = true;
  15769. }
  15770. else
  15771. {
  15772. gBg.transform.position = bg.position;
  15773. gBg.transform.eulerAngles = bg.eulerAngles;
  15774. mBg.maid = bgObject;
  15775. mBg.ido = 1;
  15776. }
  15777. }
  15778. else if (ikMode2 == 9)
  15779. {
  15780. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15781. {
  15782. mBg.ido = 4;
  15783. mBg.reset = true;
  15784. }
  15785. else
  15786. {
  15787. gBg.transform.position = bg.position;
  15788. gBg.transform.eulerAngles = bg.eulerAngles;
  15789. mBg.maid = bgObject;
  15790. mBg.ido = 4;
  15791. }
  15792. }
  15793. else if (ikMode2 == 14)
  15794. {
  15795. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15796. {
  15797. mBg.ido = 6;
  15798. mBg.reset = true;
  15799. }
  15800. else
  15801. {
  15802. gBg.transform.position = bg.position;
  15803. gBg.transform.eulerAngles = bg.eulerAngles;
  15804. mBg.maid = bgObject;
  15805. mBg.ido = 6;
  15806. }
  15807. }
  15808. }
  15809. }
  15810. for (i = 0; i < lightIndex.Count; i++)
  15811. {
  15812. if (gLight[0] == null)
  15813. {
  15814. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15815. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15816. {
  15817. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15818. };
  15819. gLight[0].GetComponent<Renderer>().material = material2;
  15820. gLight[0].layer = 8;
  15821. gLight[0].GetComponent<Renderer>().enabled = false;
  15822. gLight[0].SetActive(false);
  15823. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15824. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15825. mLight[0].obj = gLight[0];
  15826. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15827. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15828. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15829. mLight[0].ido = 1;
  15830. mLight[0].isScale = false;
  15831. }
  15832. if (gLight[i] != null)
  15833. {
  15834. if (!isCube4)
  15835. {
  15836. gLight[i].GetComponent<Renderer>().enabled = false;
  15837. gLight[i].SetActive(false);
  15838. }
  15839. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15840. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15841. {
  15842. if (ikMode2 > 0 && ikMode2 != 15)
  15843. {
  15844. gLight[i].GetComponent<Renderer>().enabled = true;
  15845. gLight[i].SetActive(true);
  15846. }
  15847. else
  15848. {
  15849. gLight[i].GetComponent<Renderer>().enabled = false;
  15850. gLight[i].SetActive(false);
  15851. mLight[i].isAlt = false;
  15852. }
  15853. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15854. {
  15855. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15856. if (mLight[i].isAlt)
  15857. {
  15858. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15859. }
  15860. }
  15861. if (ikMode2 == 9 || ikMode2 == 14)
  15862. {
  15863. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15864. mLight[i].Update();
  15865. }
  15866. if (ikMode2 == 13)
  15867. {
  15868. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15869. mLight[i].Update();
  15870. }
  15871. if (ikMode2 == 13)
  15872. {
  15873. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15874. {
  15875. mLight[i].ido = 15;
  15876. mLight[i].reset = true;
  15877. }
  15878. else
  15879. {
  15880. if (lightList[i].transform.localScale.x == 1f)
  15881. {
  15882. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15883. }
  15884. lightRange[i] = lightList[i].transform.localScale.x;
  15885. gLight[i].transform.position = lightList[i].transform.position;
  15886. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15887. mLight[i].maid = lightList[i];
  15888. mLight[i].ido = 15;
  15889. }
  15890. }
  15891. else if (ikMode2 == 11)
  15892. {
  15893. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15894. {
  15895. mLight[i].ido = 3;
  15896. mLight[i].reset = true;
  15897. }
  15898. else
  15899. {
  15900. gLight[i].transform.position = lightList[i].transform.position;
  15901. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15902. lightX[i] = gLight[i].transform.eulerAngles.x;
  15903. lightY[i] = gLight[i].transform.eulerAngles.y;
  15904. mLight[i].maid = lightList[i];
  15905. mLight[i].ido = 3;
  15906. }
  15907. }
  15908. else if (ikMode2 == 12)
  15909. {
  15910. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15911. {
  15912. mLight[i].ido = 2;
  15913. mLight[i].reset = true;
  15914. }
  15915. else
  15916. {
  15917. gLight[i].transform.position = lightList[i].transform.position;
  15918. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15919. mLight[i].maid = lightList[i];
  15920. mLight[i].ido = 2;
  15921. }
  15922. }
  15923. else if (ikMode2 == 10)
  15924. {
  15925. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15926. {
  15927. mLight[i].ido = 1;
  15928. mLight[i].reset = true;
  15929. }
  15930. else
  15931. {
  15932. gLight[i].transform.position = lightList[i].transform.position;
  15933. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15934. mLight[i].maid = lightList[i];
  15935. mLight[i].maidArray = lightList.ToArray();
  15936. mLight[i].mArray = mLight.ToArray();
  15937. mLight[i].ido = 1;
  15938. }
  15939. }
  15940. else if (ikMode2 == 9)
  15941. {
  15942. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15943. {
  15944. mLight[i].ido = 4;
  15945. mLight[i].reset = true;
  15946. }
  15947. else
  15948. {
  15949. gLight[i].transform.position = lightList[i].transform.position;
  15950. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15951. lightX[i] = gLight[i].transform.eulerAngles.x;
  15952. lightY[i] = gLight[i].transform.eulerAngles.y;
  15953. mLight[i].maid = lightList[i];
  15954. mLight[i].ido = 4;
  15955. }
  15956. }
  15957. else if (ikMode2 == 14)
  15958. {
  15959. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15960. {
  15961. mLight[i].ido = 6;
  15962. mLight[i].reset = true;
  15963. }
  15964. else
  15965. {
  15966. gLight[i].transform.position = lightList[i].transform.position;
  15967. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15968. lightX[i] = gLight[i].transform.eulerAngles.x;
  15969. lightY[i] = gLight[i].transform.eulerAngles.y;
  15970. mLight[i].maid = lightList[i];
  15971. mLight[i].ido = 6;
  15972. }
  15973. }
  15974. }
  15975. }
  15976. }
  15977. for (i = 0; i < doguBObject.Count; i++)
  15978. {
  15979. if (!isCube2)
  15980. {
  15981. gDogu[i].GetComponent<Renderer>().enabled = false;
  15982. gDogu[i].SetActive(false);
  15983. }
  15984. else
  15985. {
  15986. if (ikMode2 > 0)
  15987. {
  15988. gDogu[i].GetComponent<Renderer>().enabled = true;
  15989. gDogu[i].SetActive(true);
  15990. }
  15991. else
  15992. {
  15993. gDogu[i].GetComponent<Renderer>().enabled = false;
  15994. gDogu[i].SetActive(false);
  15995. mDogu[i].isAlt = false;
  15996. }
  15997. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15998. {
  15999. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  16000. if (mDogu[i].isAlt)
  16001. {
  16002. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16003. }
  16004. }
  16005. if (ikMode2 == 9 || ikMode2 == 14)
  16006. {
  16007. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16008. mDogu[i].Update();
  16009. }
  16010. if (ikMode2 == 15)
  16011. {
  16012. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16013. }
  16014. if (ikMode2 == 13)
  16015. {
  16016. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16017. mDogu[i].Update();
  16018. }
  16019. if (ikMode2 == 13)
  16020. {
  16021. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16022. {
  16023. mDogu[i].ido = 5;
  16024. mDogu[i].reset = true;
  16025. }
  16026. else
  16027. {
  16028. gDogu[i].transform.position = doguBObject[i].transform.position;
  16029. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16030. mDogu[i].maid = doguBObject[i];
  16031. mDogu[i].ido = 5;
  16032. }
  16033. }
  16034. else if (ikMode2 == 11)
  16035. {
  16036. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16037. {
  16038. mDogu[i].ido = 3;
  16039. mDogu[i].reset = true;
  16040. }
  16041. else
  16042. {
  16043. gDogu[i].transform.position = doguBObject[i].transform.position;
  16044. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16045. mDogu[i].maid = doguBObject[i];
  16046. mDogu[i].ido = 3;
  16047. }
  16048. }
  16049. else if (ikMode2 == 12)
  16050. {
  16051. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16052. {
  16053. mDogu[i].ido = 2;
  16054. mDogu[i].reset = true;
  16055. }
  16056. else
  16057. {
  16058. gDogu[i].transform.position = doguBObject[i].transform.position;
  16059. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16060. mDogu[i].maid = doguBObject[i];
  16061. mDogu[i].ido = 2;
  16062. }
  16063. }
  16064. else if (ikMode2 == 10)
  16065. {
  16066. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16067. {
  16068. mDogu[i].ido = 1;
  16069. mDogu[i].reset = true;
  16070. }
  16071. else
  16072. {
  16073. gDogu[i].transform.position = doguBObject[i].transform.position;
  16074. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16075. mDogu[i].maid = doguBObject[i];
  16076. mDogu[i].maidArray = doguBObject.ToArray();
  16077. mDogu[i].mArray = mDogu.ToArray();
  16078. mDogu[i].ido = 1;
  16079. }
  16080. }
  16081. else if (ikMode2 == 9)
  16082. {
  16083. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16084. {
  16085. mDogu[i].ido = 4;
  16086. mDogu[i].reset = true;
  16087. }
  16088. else
  16089. {
  16090. gDogu[i].transform.position = doguBObject[i].transform.position;
  16091. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16092. mDogu[i].maid = doguBObject[i];
  16093. mDogu[i].ido = 4;
  16094. }
  16095. }
  16096. else if (ikMode2 == 14)
  16097. {
  16098. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16099. {
  16100. mDogu[i].ido = 6;
  16101. mDogu[i].reset = true;
  16102. }
  16103. else
  16104. {
  16105. gDogu[i].transform.position = doguBObject[i].transform.position;
  16106. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16107. mDogu[i].maid = doguBObject[i];
  16108. mDogu[i].ido = 6;
  16109. }
  16110. }
  16111. else if (ikMode2 == 15)
  16112. {
  16113. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16114. {
  16115. mDogu[i].ido = 7;
  16116. mDogu[i].reset = true;
  16117. }
  16118. else
  16119. {
  16120. gDogu[i].transform.position = doguBObject[i].transform.position;
  16121. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16122. mDogu[i].maid = doguBObject[i];
  16123. mDogu[i].ido = 7;
  16124. }
  16125. }
  16126. }
  16127. }
  16128. ikModeOld2 = ikMode2;
  16129. }
  16130. if (isVR)
  16131. {
  16132. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16133. {
  16134. if (!isVR2)
  16135. {
  16136. isVR2 = true;
  16137. Preferences["config"]["shift_f8"].Value = "true";
  16138. SaveConfig();
  16139. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16140. }
  16141. else
  16142. {
  16143. isVR2 = false;
  16144. Preferences["config"]["shift_f8"].Value = "false";
  16145. SaveConfig();
  16146. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16147. }
  16148. }
  16149. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16150. {
  16151. loadScene = 1;
  16152. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16153. }
  16154. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16155. {
  16156. loadScene = 2;
  16157. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16158. }
  16159. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16160. {
  16161. loadScene = 3;
  16162. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16163. }
  16164. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16165. {
  16166. loadScene = 4;
  16167. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16168. }
  16169. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16170. {
  16171. loadScene = 5;
  16172. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16173. }
  16174. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16175. {
  16176. loadScene = 6;
  16177. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16178. }
  16179. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16180. {
  16181. loadScene = 7;
  16182. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16183. }
  16184. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16185. {
  16186. loadScene = 8;
  16187. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16188. }
  16189. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16190. {
  16191. loadScene = 9;
  16192. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16193. }
  16194. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16195. {
  16196. loadScene = 10;
  16197. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16198. }
  16199. for (int j = 0; j < 7; j++)
  16200. {
  16201. if (!maidArray[j])
  16202. {
  16203. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16204. }
  16205. }
  16206. }
  16207. }
  16208. }
  16209. }
  16210. }