MultipleMaids.MaidUpdate.cs 921 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505
  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. for (int i = 0; i < 10; i++)
  6703. {
  6704. date[i] = "未保存";
  6705. ninzu[i] = "";
  6706. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6707. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6708. {
  6709. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6710. if (array4.Length >= 2)
  6711. {
  6712. string[] array5 = array4[0].Split(new char[] { ',' });
  6713. date[i] = array5[0];
  6714. ninzu[i] = array5[1] + "人";
  6715. }
  6716. }
  6717. }
  6718. }
  6719. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6720. {
  6721. bgmIndex--;
  6722. if (bgmIndex <= -1)
  6723. {
  6724. bgmIndex = bgmArray.Length - 1;
  6725. }
  6726. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6727. bgmCombo.selectedItemIndex = bgmIndex;
  6728. }
  6729. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6730. {
  6731. bgmIndex++;
  6732. if (bgmIndex == bgmArray.Length)
  6733. {
  6734. bgmIndex = 0;
  6735. }
  6736. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6737. bgmCombo.selectedItemIndex = bgmIndex;
  6738. }
  6739. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6740. {
  6741. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6742. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6743. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6744. if (isMessage)
  6745. {
  6746. isMessage = false;
  6747. messageWindowMgr.CloseMessageWindowPanel();
  6748. }
  6749. else if (!bGuiMessage)
  6750. {
  6751. bGuiMessage = true;
  6752. }
  6753. else
  6754. {
  6755. bGuiMessage = false;
  6756. isMessage = false;
  6757. messageWindowMgr.CloseMessageWindowPanel();
  6758. }
  6759. }
  6760. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6761. {
  6762. escFlg = true;
  6763. for (int j = 0; j < maidCnt; j++)
  6764. {
  6765. if (maidArray[j] && maidArray[j].Visible)
  6766. {
  6767. maidArray[j].StopKuchipakuPattern();
  6768. if (isDanceStart7V)
  6769. {
  6770. maidArray[j].SetPos(dancePos[j]);
  6771. maidArray[j].body0.transform.localRotation = danceRot[j];
  6772. }
  6773. if (isDanceStart8V)
  6774. {
  6775. maidArray[j].SetPos(dancePos[j]);
  6776. maidArray[j].body0.transform.localRotation = danceRot[j];
  6777. }
  6778. if (isDanceStart11V)
  6779. {
  6780. maidArray[j].SetPos(dancePos[j]);
  6781. maidArray[j].body0.transform.localRotation = danceRot[j];
  6782. }
  6783. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6784. || isDanceStart13K)
  6785. {
  6786. maidArray[j].SetPos(dancePos[j]);
  6787. maidArray[j].body0.transform.localRotation = danceRot[j];
  6788. int i = j;
  6789. if (!isVR)
  6790. {
  6791. delCount[i] = 20;
  6792. if (goSlot[(int)selectList[i]] != null)
  6793. {
  6794. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6795. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6796. {
  6797. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6798. }
  6799. }
  6800. }
  6801. Maid maid = maidArray[j];
  6802. maid.DelProp(MPN.handitem, true);
  6803. maid.DelProp(MPN.accvag, true);
  6804. maid.DelProp(MPN.accanl, true);
  6805. maid.DelProp(MPN.kousoku_upper, true);
  6806. maid.DelProp(MPN.kousoku_lower, true);
  6807. maid.AllProcPropSeqStart();
  6808. }
  6809. if (isDanceStart14V)
  6810. {
  6811. maidArray[j].SetPos(dancePos[j]);
  6812. maidArray[j].body0.transform.localRotation = danceRot[j];
  6813. }
  6814. if (isDanceStart15V)
  6815. {
  6816. maidArray[j].SetPos(dancePos[j]);
  6817. maidArray[j].body0.transform.localRotation = danceRot[j];
  6818. }
  6819. }
  6820. }
  6821. isDanceStart1F = false;
  6822. isDanceStart1K = false;
  6823. isDanceStart2F = false;
  6824. isDanceStart3F = false;
  6825. isDanceStart3K = false;
  6826. isDanceStart4F = false;
  6827. isDanceStart4K = false;
  6828. isDanceStart5F = false;
  6829. isDanceStart5K = false;
  6830. isDanceStart6F = false;
  6831. isDanceStart6K = false;
  6832. isDanceStart7F = false;
  6833. isDanceStart7V = false;
  6834. isDanceStart8F = false;
  6835. isDanceStart8V = false;
  6836. isDanceStart8P = false;
  6837. isDanceStart9F = false;
  6838. isDanceStart9K = false;
  6839. isDanceStart10F = false;
  6840. isDanceStart11F = false;
  6841. isDanceStart11V = false;
  6842. isDanceStart12F = false;
  6843. isDanceStart13F = false;
  6844. isDanceStart13K = false;
  6845. isDanceStart14F = false;
  6846. isDanceStart14V = false;
  6847. isDanceStart15F = false;
  6848. isDanceStart15V = false;
  6849. for (int j = 0; j < maidCnt; j++)
  6850. {
  6851. danceFace[j] = 0f;
  6852. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6853. maidArray[j].SetAutoTwistAll(true);
  6854. }
  6855. danceCheckIndex = 0;
  6856. for (int k = 0; k < danceCheck.Length; k++)
  6857. {
  6858. danceCheck[danceCheckIndex] = 1f;
  6859. }
  6860. isDance = false;
  6861. isDanceChu = false;
  6862. if (maidArray[1] && maidArray[1].Visible)
  6863. {
  6864. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6865. {
  6866. Vector3 vector = Vector3.zero;
  6867. vector.x = 0.6f;
  6868. maidArray[1].SetPos(vector);
  6869. if (maidArray[2] && maidArray[2].Visible)
  6870. {
  6871. vector.x = -0.6f;
  6872. maidArray[2].SetPos(vector);
  6873. }
  6874. if (maidArray[3] && maidArray[3].Visible)
  6875. {
  6876. vector.x = 1.2f;
  6877. maidArray[3].SetPos(vector);
  6878. }
  6879. if (maidArray[4] && maidArray[4].Visible)
  6880. {
  6881. vector.x = -1.2f;
  6882. maidArray[4].SetPos(vector);
  6883. }
  6884. if (maidArray[5] && maidArray[5].Visible)
  6885. {
  6886. vector.x = 1.8f;
  6887. maidArray[5].SetPos(vector);
  6888. }
  6889. if (maidArray[6] && maidArray[6].Visible)
  6890. {
  6891. vector.x = -1.8f;
  6892. maidArray[6].SetPos(vector);
  6893. }
  6894. if (maidArray[7] && maidArray[7].Visible)
  6895. {
  6896. vector.x = 2.4f;
  6897. maidArray[7].SetPos(vector);
  6898. }
  6899. if (maidArray[8] && maidArray[8].Visible)
  6900. {
  6901. vector.x = -2.4f;
  6902. maidArray[8].SetPos(vector);
  6903. }
  6904. if (maidArray[9] && maidArray[9].Visible)
  6905. {
  6906. vector.x = 3f;
  6907. maidArray[9].SetPos(vector);
  6908. }
  6909. if (maidArray[10] && maidArray[10].Visible)
  6910. {
  6911. vector.x = -3f;
  6912. maidArray[10].SetPos(vector);
  6913. }
  6914. if (maidArray[11] && maidArray[11].Visible)
  6915. {
  6916. vector.x = 3.6f;
  6917. maidArray[11].SetPos(vector);
  6918. }
  6919. if (maidArray[12] && maidArray[12].Visible)
  6920. {
  6921. vector.x = -3.6f;
  6922. maidArray[12].SetPos(vector);
  6923. }
  6924. if (maidArray[13] && maidArray[13].Visible)
  6925. {
  6926. vector.x = 4.2f;
  6927. maidArray[13].SetPos(vector);
  6928. }
  6929. }
  6930. }
  6931. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6932. }
  6933. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6934. {
  6935. if (isScript)
  6936. {
  6937. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6938. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6939. if (isPanel)
  6940. {
  6941. isPanel = false;
  6942. }
  6943. else
  6944. {
  6945. isPanel = true;
  6946. }
  6947. gameObject5.SetActive(isPanel);
  6948. }
  6949. else
  6950. {
  6951. bGui = !bGui;
  6952. }
  6953. }
  6954. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6955. {
  6956. keyFlg = true;
  6957. bgIndex--;
  6958. if (bgIndex <= -1)
  6959. {
  6960. bgIndex = bgArray.Length - 1;
  6961. }
  6962. if (!moveBg)
  6963. {
  6964. bg.localScale = new Vector3(1f, 1f, 1f);
  6965. if (bgArray[bgIndex].Length == 36)
  6966. {
  6967. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6968. }
  6969. else
  6970. {
  6971. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6972. }
  6973. bgCombo.selectedItemIndex = bgIndex;
  6974. if (bgArray[bgIndex] == "karaokeroom")
  6975. {
  6976. bg.transform.position = bgObject.transform.position;
  6977. Vector3 vector = Vector3.zero;
  6978. Vector3 zero3 = Vector3.zero;
  6979. zero3.y = 90f;
  6980. vector.z = 4f;
  6981. vector.x = 1f;
  6982. bg.transform.localPosition = vector;
  6983. bg.transform.localRotation = Quaternion.Euler(zero3);
  6984. }
  6985. }
  6986. }
  6987. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6988. {
  6989. keyFlg = true;
  6990. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6991. }
  6992. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6993. {
  6994. keyFlg = true;
  6995. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6996. }
  6997. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6998. {
  6999. keyFlg = true;
  7000. bg.localScale = new Vector3(1f, 1f, 1f);
  7001. }
  7002. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7003. {
  7004. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7005. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7006. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7007. Vector3 vector = bg.position;
  7008. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7009. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7010. bg.localPosition = vector;
  7011. if (Input.GetKey(KeyCode.Y))
  7012. {
  7013. keyFlg = true;
  7014. }
  7015. }
  7016. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7017. {
  7018. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7019. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7020. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7021. Vector3 vector = bg.position;
  7022. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7023. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7024. bg.localPosition = vector;
  7025. if (Input.GetKey(KeyCode.Y))
  7026. {
  7027. keyFlg = true;
  7028. }
  7029. }
  7030. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7031. {
  7032. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7033. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7034. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7035. Vector3 vector = bg.position;
  7036. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7037. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7038. bg.localPosition = vector;
  7039. if (Input.GetKey(KeyCode.Y))
  7040. {
  7041. keyFlg = true;
  7042. }
  7043. }
  7044. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7045. {
  7046. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7047. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7048. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7049. Vector3 vector = bg.position;
  7050. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7052. bg.localPosition = vector;
  7053. if (Input.GetKey(KeyCode.Y))
  7054. {
  7055. keyFlg = true;
  7056. }
  7057. }
  7058. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7059. {
  7060. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7061. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7062. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7063. Vector3 vector = bg.position;
  7064. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7065. bg.localPosition = vector;
  7066. if (Input.GetKey(KeyCode.Y))
  7067. {
  7068. keyFlg = true;
  7069. }
  7070. }
  7071. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7072. {
  7073. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7074. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7075. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7076. Vector3 vector = bg.position;
  7077. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7078. bg.localPosition = vector;
  7079. if (Input.GetKey(KeyCode.Y))
  7080. {
  7081. keyFlg = true;
  7082. }
  7083. }
  7084. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7085. {
  7086. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7087. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7088. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7089. Vector3 vector = bg.position;
  7090. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7091. bg.localPosition = vector;
  7092. if (Input.GetKey(KeyCode.Y))
  7093. {
  7094. keyFlg = true;
  7095. }
  7096. }
  7097. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7098. {
  7099. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7100. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7101. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7102. Vector3 vector = bg.position;
  7103. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7104. bg.localPosition = vector;
  7105. if (Input.GetKey(KeyCode.Y))
  7106. {
  7107. keyFlg = true;
  7108. }
  7109. }
  7110. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7111. {
  7112. Vector3 vector = bg.position;
  7113. vector.y -= 0.015f * speed;
  7114. bg.localPosition = vector;
  7115. if (Input.GetKey(KeyCode.Y))
  7116. {
  7117. keyFlg = true;
  7118. }
  7119. }
  7120. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7121. {
  7122. Vector3 vector = bg.position;
  7123. vector.y += 0.015f * speed;
  7124. bg.localPosition = vector;
  7125. if (Input.GetKey(KeyCode.Y))
  7126. {
  7127. keyFlg = true;
  7128. }
  7129. }
  7130. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7131. {
  7132. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7133. if (Input.GetKey(KeyCode.Y))
  7134. {
  7135. keyFlg = true;
  7136. }
  7137. }
  7138. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7139. {
  7140. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7141. if (Input.GetKey(KeyCode.Y))
  7142. {
  7143. keyFlg = true;
  7144. }
  7145. }
  7146. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7147. {
  7148. if (Input.GetKey(KeyCode.Y))
  7149. {
  7150. keyFlg = true;
  7151. }
  7152. }
  7153. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7154. {
  7155. if (keyFlg)
  7156. {
  7157. keyFlg = false;
  7158. }
  7159. else
  7160. {
  7161. bgIndex++;
  7162. if (bgIndex == bgArray.Length)
  7163. {
  7164. bgIndex = 0;
  7165. }
  7166. if (!moveBg)
  7167. {
  7168. bg.localScale = new Vector3(1f, 1f, 1f);
  7169. if (bgArray[bgIndex].Length == 36)
  7170. {
  7171. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7172. }
  7173. else
  7174. {
  7175. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7176. }
  7177. bgCombo.selectedItemIndex = bgIndex;
  7178. if (bgArray[bgIndex] == "karaokeroom")
  7179. {
  7180. bg.transform.position = bgObject.transform.position;
  7181. Vector3 vector = Vector3.zero;
  7182. Vector3 zero3 = Vector3.zero;
  7183. zero3.y = 90f;
  7184. vector.z = 4f;
  7185. vector.x = 1f;
  7186. bg.transform.localPosition = vector;
  7187. bg.transform.localRotation = Quaternion.Euler(zero3);
  7188. }
  7189. }
  7190. }
  7191. }
  7192. if (maidArray[0] != null && maidArray[0].Visible)
  7193. {
  7194. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7195. {
  7196. int[] array6 = new int[1];
  7197. int[] array7 = array6;
  7198. if (maidCnt == 2)
  7199. {
  7200. array7 = new int[] { 0, 1 };
  7201. }
  7202. if (maidCnt == 3)
  7203. {
  7204. array7 = new int[] { 0, 1, 2 };
  7205. }
  7206. if (maidCnt == 4)
  7207. {
  7208. array7 = new int[] { 0, 1, 2, 3 };
  7209. }
  7210. if (maidCnt == 5)
  7211. {
  7212. array7 = new int[] { 0, 1, 2, 3, 4 };
  7213. }
  7214. if (maidCnt == 6)
  7215. {
  7216. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7217. }
  7218. if (maidCnt == 7)
  7219. {
  7220. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7221. }
  7222. if (maidCnt == 8)
  7223. {
  7224. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7225. }
  7226. if (maidCnt == 9)
  7227. {
  7228. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7229. }
  7230. if (maidCnt == 10)
  7231. {
  7232. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7233. }
  7234. if (maidCnt == 11)
  7235. {
  7236. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7237. }
  7238. if (maidCnt == 12)
  7239. {
  7240. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7241. }
  7242. Random random = new Random();
  7243. int n = array7.Length;
  7244. while (n > 1)
  7245. {
  7246. n--;
  7247. int j = random.Next(n + 1);
  7248. int num8 = array7[j];
  7249. array7[j] = array7[n];
  7250. array7[n] = num8;
  7251. }
  7252. int[] array8 = new int[maidCnt];
  7253. Vector3[] array9 = new Vector3[maidCnt];
  7254. Vector3[] array10 = new Vector3[maidCnt];
  7255. int[] array11 = new int[maidCnt];
  7256. for (int i = 0; i < maidCnt; i++)
  7257. {
  7258. array8[array7[i]] = poseIndex[array7[i]];
  7259. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7260. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7261. array11[array7[i]] = headEyeIndex[array7[i]];
  7262. }
  7263. for (int i = 0; i < maidCnt; i++)
  7264. {
  7265. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7266. {
  7267. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7268. isStop[i] = false;
  7269. poseCount[i] = 20;
  7270. Maid maid = maidArray[i];
  7271. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7272. {
  7273. maid.body0.MuneYureL(0f);
  7274. maid.body0.MuneYureR(0f);
  7275. }
  7276. else
  7277. {
  7278. maid.body0.MuneYureL(1f);
  7279. maid.body0.MuneYureR(1f);
  7280. }
  7281. if (array12[0].Contains("MultipleMaidsPose"))
  7282. {
  7283. string path = array12[0].Split(new char[] { '/' })[1];
  7284. byte[] array2 = new byte[0];
  7285. try
  7286. {
  7287. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7288. {
  7289. array2 = new byte[fileStream.Length];
  7290. fileStream.Read(array2, 0, array2.Length);
  7291. }
  7292. }
  7293. catch { }
  7294. if (0 < array2.Length)
  7295. {
  7296. string text = Path.GetFileName(path);
  7297. long num5 = text.GetHashCode();
  7298. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7299. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7300. {
  7301. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7302. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7303. };
  7304. for (int m = 0; m < array3.Length; m++)
  7305. {
  7306. maid.SetAutoTwist(array3[m], true);
  7307. }
  7308. }
  7309. }
  7310. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7311. {
  7312. loadPose[i] = array12[0];
  7313. }
  7314. else if (!array12[0].StartsWith("dance_"))
  7315. {
  7316. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7317. }
  7318. else
  7319. {
  7320. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7321. {
  7322. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7323. GameUty.FileSystem,
  7324. array12[0] + ".anm",
  7325. false,
  7326. false);
  7327. }
  7328. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7329. }
  7330. if (array12.Length > 1)
  7331. {
  7332. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7333. float.Parse(array12[1]);
  7334. isStop[i] = true;
  7335. if (array12.Length > 2)
  7336. {
  7337. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7338. isPoseIti[i] = true;
  7339. poseIti[i] = maidArray[i].transform.position;
  7340. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7341. }
  7342. }
  7343. }
  7344. poseIndex[i] = array8[array7[i]];
  7345. maidArray[i].SetRot(array9[array7[i]]);
  7346. maidArray[i].SetPos(array10[array7[i]]);
  7347. headEyeIndex[i] = array11[array7[i]];
  7348. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7349. maidArray[i].body0.boHeadToCam = true;
  7350. maidArray[i].body0.boEyeToCam = true;
  7351. if (headEyeIndex[i] == 0)
  7352. {
  7353. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7354. maidArray[i].body0.boHeadToCam = true;
  7355. maidArray[i].body0.boEyeToCam = true;
  7356. }
  7357. else
  7358. {
  7359. maidArray[i].body0.trsLookTarget = null;
  7360. if (headEyeIndex[i] == 1)
  7361. {
  7362. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7363. }
  7364. if (headEyeIndex[i] == 2)
  7365. {
  7366. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7367. }
  7368. if (headEyeIndex[i] == 3)
  7369. {
  7370. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7371. }
  7372. if (headEyeIndex[i] == 4)
  7373. {
  7374. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7375. }
  7376. if (headEyeIndex[i] == 5)
  7377. {
  7378. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7379. }
  7380. if (headEyeIndex[i] == 6)
  7381. {
  7382. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7383. }
  7384. if (headEyeIndex[i] == 7)
  7385. {
  7386. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7387. }
  7388. if (headEyeIndex[i] == 8)
  7389. {
  7390. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7391. }
  7392. if (headEyeIndex[i] == 9)
  7393. {
  7394. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7395. }
  7396. }
  7397. }
  7398. }
  7399. else if (Input.GetKeyDown(KeyCode.Comma))
  7400. {
  7401. int[] array8 = new int[maidCnt];
  7402. Vector3[] array9 = new Vector3[maidCnt];
  7403. Vector3[] array10 = new Vector3[maidCnt];
  7404. int[] array11 = new int[maidCnt];
  7405. for (int i = 0; i < maidCnt; i++)
  7406. {
  7407. array8[i] = poseIndex[i];
  7408. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7409. array10[i] = maidArray[i].transform.position;
  7410. array11[i] = headEyeIndex[i];
  7411. }
  7412. for (int i = 0; i < maidCnt; i++)
  7413. {
  7414. if (i == 0)
  7415. {
  7416. if (!isLock[i])
  7417. {
  7418. if (maidArray[i] && maidArray[i].Visible)
  7419. {
  7420. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7421. isStop[i] = false;
  7422. poseCount[i] = 20;
  7423. Maid maid = maidArray[i];
  7424. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7425. {
  7426. maid.body0.MuneYureL(0f);
  7427. maid.body0.MuneYureR(0f);
  7428. }
  7429. else
  7430. {
  7431. maid.body0.MuneYureL(1f);
  7432. maid.body0.MuneYureR(1f);
  7433. }
  7434. if (array12[0].Contains("MultipleMaidsPose"))
  7435. {
  7436. string path = array12[0].Split(new char[] { '/' })[1];
  7437. byte[] array2 = new byte[0];
  7438. try
  7439. {
  7440. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7441. {
  7442. array2 = new byte[fileStream.Length];
  7443. fileStream.Read(array2, 0, array2.Length);
  7444. }
  7445. }
  7446. catch { }
  7447. if (0 < array2.Length)
  7448. {
  7449. string text = Path.GetFileName(path);
  7450. long num5 = text.GetHashCode();
  7451. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7452. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7453. {
  7454. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7455. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7456. };
  7457. for (int m = 0; m < array3.Length; m++)
  7458. {
  7459. maid.SetAutoTwist(array3[m], true);
  7460. }
  7461. }
  7462. }
  7463. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7464. {
  7465. loadPose[i] = array12[0];
  7466. }
  7467. else if (!array12[0].StartsWith("dance_"))
  7468. {
  7469. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7470. }
  7471. else
  7472. {
  7473. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7474. {
  7475. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7476. GameUty.FileSystem,
  7477. array12[0] + ".anm",
  7478. false,
  7479. false);
  7480. }
  7481. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7482. }
  7483. if (array12.Length > 1)
  7484. {
  7485. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7486. float.Parse(array12[1]);
  7487. isStop[i] = true;
  7488. if (array12.Length > 2)
  7489. {
  7490. Transform transform2 =
  7491. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7492. isPoseIti[i] = true;
  7493. poseIti[i] = maidArray[i].transform.position;
  7494. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7495. }
  7496. }
  7497. }
  7498. }
  7499. poseIndex[i] = array8[maidCnt - i - 1];
  7500. headEyeIndex[i] = array11[maidCnt - i - 1];
  7501. }
  7502. else
  7503. {
  7504. if (!isLock[i])
  7505. {
  7506. if (maidArray[i] && maidArray[i].Visible)
  7507. {
  7508. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7509. isStop[i] = false;
  7510. poseCount[i] = 20;
  7511. Maid maid = maidArray[i];
  7512. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7513. {
  7514. maid.body0.MuneYureL(0f);
  7515. maid.body0.MuneYureR(0f);
  7516. }
  7517. else
  7518. {
  7519. maid.body0.MuneYureL(1f);
  7520. maid.body0.MuneYureR(1f);
  7521. }
  7522. if (array12[0].Contains("MultipleMaidsPose"))
  7523. {
  7524. string path = array12[0].Split(new char[] { '/' })[1];
  7525. byte[] array2 = new byte[0];
  7526. try
  7527. {
  7528. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7529. {
  7530. array2 = new byte[fileStream.Length];
  7531. fileStream.Read(array2, 0, array2.Length);
  7532. }
  7533. }
  7534. catch { }
  7535. if (0 < array2.Length)
  7536. {
  7537. string text = Path.GetFileName(path);
  7538. long num5 = text.GetHashCode();
  7539. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7540. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7541. {
  7542. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7543. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7544. };
  7545. for (int m = 0; m < array3.Length; m++)
  7546. {
  7547. maid.SetAutoTwist(array3[m], true);
  7548. }
  7549. }
  7550. }
  7551. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7552. {
  7553. loadPose[i] = array12[0];
  7554. }
  7555. else if (!array12[0].StartsWith("dance_"))
  7556. {
  7557. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7558. }
  7559. else
  7560. {
  7561. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7562. {
  7563. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7564. GameUty.FileSystem,
  7565. array12[0] + ".anm",
  7566. false,
  7567. false);
  7568. }
  7569. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7570. }
  7571. if (array12.Length > 1)
  7572. {
  7573. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7574. float.Parse(array12[1]);
  7575. isStop[i] = true;
  7576. if (array12.Length > 2)
  7577. {
  7578. Transform transform2 =
  7579. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7580. isPoseIti[i] = true;
  7581. poseIti[i] = maidArray[i].transform.position;
  7582. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7583. }
  7584. }
  7585. }
  7586. }
  7587. poseIndex[i] = array8[i - 1];
  7588. headEyeIndex[i] = array11[i - 1];
  7589. }
  7590. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7591. maidArray[i].body0.boHeadToCam = true;
  7592. maidArray[i].body0.boEyeToCam = true;
  7593. if (headEyeIndex[i] == 0)
  7594. {
  7595. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7596. maidArray[i].body0.boHeadToCam = true;
  7597. maidArray[i].body0.boEyeToCam = true;
  7598. }
  7599. else
  7600. {
  7601. maidArray[i].body0.trsLookTarget = null;
  7602. if (headEyeIndex[i] == 1)
  7603. {
  7604. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7605. }
  7606. if (headEyeIndex[i] == 2)
  7607. {
  7608. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7609. }
  7610. if (headEyeIndex[i] == 3)
  7611. {
  7612. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7613. }
  7614. if (headEyeIndex[i] == 4)
  7615. {
  7616. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7617. }
  7618. if (headEyeIndex[i] == 5)
  7619. {
  7620. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7621. }
  7622. if (headEyeIndex[i] == 6)
  7623. {
  7624. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7625. }
  7626. if (headEyeIndex[i] == 7)
  7627. {
  7628. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7629. }
  7630. if (headEyeIndex[i] == 8)
  7631. {
  7632. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7633. }
  7634. if (headEyeIndex[i] == 9)
  7635. {
  7636. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7637. }
  7638. }
  7639. if (i == 0)
  7640. {
  7641. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7642. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7643. }
  7644. else
  7645. {
  7646. maidArray[i].SetRot(array9[i - 1]);
  7647. maidArray[i].SetPos(array10[i - 1]);
  7648. }
  7649. }
  7650. }
  7651. for (int i = 0; i < maidCnt; i++)
  7652. {
  7653. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7654. {
  7655. if (maidArray[i] && maidArray[i].Visible)
  7656. {
  7657. maidArray[i].body0.transform.localRotation =
  7658. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7659. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7660. }
  7661. }
  7662. else if (Input.GetKey(KeyCode.B))
  7663. {
  7664. if (maidArray[i] && maidArray[i].Visible)
  7665. {
  7666. maidArray[i].body0.transform.localRotation =
  7667. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7668. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7669. }
  7670. }
  7671. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7672. {
  7673. if (maidArray[1] && maidArray[1].Visible)
  7674. {
  7675. if (maidArray[0].transform.position == maidArray[1].transform.position
  7676. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7677. {
  7678. Vector3 vector = Vector3.zero;
  7679. vector.x = 0.6f;
  7680. maidArray[1].SetPos(vector);
  7681. if (maidArray[2] && maidArray[2].Visible)
  7682. {
  7683. vector.x = -0.6f;
  7684. maidArray[2].SetPos(vector);
  7685. }
  7686. if (maidArray[3] && maidArray[3].Visible)
  7687. {
  7688. vector.x = 1.2f;
  7689. maidArray[3].SetPos(vector);
  7690. }
  7691. if (maidArray[4] && maidArray[4].Visible)
  7692. {
  7693. vector.x = -1.2f;
  7694. maidArray[4].SetPos(vector);
  7695. }
  7696. if (maidArray[5] && maidArray[5].Visible)
  7697. {
  7698. vector.x = 1.8f;
  7699. maidArray[5].SetPos(vector);
  7700. }
  7701. if (maidArray[6] && maidArray[6].Visible)
  7702. {
  7703. vector.x = -1.8f;
  7704. maidArray[6].SetPos(vector);
  7705. }
  7706. if (maidArray[7] && maidArray[7].Visible)
  7707. {
  7708. vector.x = 2.4f;
  7709. maidArray[7].SetPos(vector);
  7710. }
  7711. if (maidArray[8] && maidArray[8].Visible)
  7712. {
  7713. vector.x = -2.4f;
  7714. maidArray[8].SetPos(vector);
  7715. }
  7716. if (maidArray[9] && maidArray[9].Visible)
  7717. {
  7718. vector.x = 3f;
  7719. maidArray[9].SetPos(vector);
  7720. }
  7721. if (maidArray[10] && maidArray[10].Visible)
  7722. {
  7723. vector.x = -3f;
  7724. maidArray[10].SetPos(vector);
  7725. }
  7726. if (maidArray[11] && maidArray[11].Visible)
  7727. {
  7728. vector.x = 3.6f;
  7729. maidArray[11].SetPos(vector);
  7730. }
  7731. if (maidArray[12] && maidArray[12].Visible)
  7732. {
  7733. vector.x = -3.6f;
  7734. maidArray[12].SetPos(vector);
  7735. }
  7736. if (maidArray[13] && maidArray[13].Visible)
  7737. {
  7738. vector.x = 4.2f;
  7739. maidArray[13].SetPos(vector);
  7740. }
  7741. }
  7742. }
  7743. for (int k = 0; k < groupList.Count; k++)
  7744. {
  7745. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7746. {
  7747. if (poseIndex[i] == 0)
  7748. {
  7749. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7750. }
  7751. else
  7752. {
  7753. poseIndex[i] = 0;
  7754. }
  7755. break;
  7756. }
  7757. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7758. {
  7759. poseIndex[i] = (int)groupList[k - 1];
  7760. break;
  7761. }
  7762. }
  7763. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7764. {
  7765. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7766. }
  7767. if (maidArray[i] && maidArray[i].Visible)
  7768. {
  7769. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7770. isStop[i] = false;
  7771. poseCount[i] = 20;
  7772. Maid maid = maidArray[i];
  7773. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7774. {
  7775. maid.body0.MuneYureL(0f);
  7776. maid.body0.MuneYureR(0f);
  7777. }
  7778. else
  7779. {
  7780. maid.body0.MuneYureL(1f);
  7781. maid.body0.MuneYureR(1f);
  7782. }
  7783. if (array[0].Contains("MultipleMaidsPose"))
  7784. {
  7785. string path = array[0].Split(new char[] { '/' })[1];
  7786. byte[] array2 = new byte[0];
  7787. try
  7788. {
  7789. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7790. {
  7791. array2 = new byte[fileStream.Length];
  7792. fileStream.Read(array2, 0, array2.Length);
  7793. }
  7794. }
  7795. catch { }
  7796. if (0 < array2.Length)
  7797. {
  7798. string text = Path.GetFileName(path);
  7799. long num5 = text.GetHashCode();
  7800. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7801. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7802. {
  7803. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7804. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7805. };
  7806. for (int m = 0; m < array3.Length; m++)
  7807. {
  7808. maid.SetAutoTwist(array3[m], true);
  7809. }
  7810. }
  7811. }
  7812. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7813. {
  7814. loadPose[i] = array[0];
  7815. }
  7816. else if (!array[0].StartsWith("dance_"))
  7817. {
  7818. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7819. }
  7820. else
  7821. {
  7822. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7823. {
  7824. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7825. GameUty.FileSystem,
  7826. array[0] + ".anm",
  7827. false,
  7828. false);
  7829. }
  7830. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7831. }
  7832. if (array.Length > 1)
  7833. {
  7834. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7835. isStop[i] = true;
  7836. if (array.Length > 2)
  7837. {
  7838. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7839. isPoseIti[i] = true;
  7840. poseIti[i] = maidArray[i].transform.position;
  7841. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7842. }
  7843. }
  7844. }
  7845. }
  7846. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7847. {
  7848. if (maidArray[1] && maidArray[1].Visible)
  7849. {
  7850. if (maidArray[0].transform.position == maidArray[1].transform.position
  7851. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7852. {
  7853. Vector3 vector = Vector3.zero;
  7854. vector.x = 0.6f;
  7855. maidArray[1].SetPos(vector);
  7856. if (maidArray[2] && maidArray[2].Visible)
  7857. {
  7858. vector.x = -0.6f;
  7859. maidArray[2].SetPos(vector);
  7860. }
  7861. if (maidArray[3] && maidArray[3].Visible)
  7862. {
  7863. vector.x = 1.2f;
  7864. maidArray[3].SetPos(vector);
  7865. }
  7866. if (maidArray[4] && maidArray[4].Visible)
  7867. {
  7868. vector.x = -1.2f;
  7869. maidArray[4].SetPos(vector);
  7870. }
  7871. if (maidArray[5] && maidArray[5].Visible)
  7872. {
  7873. vector.x = 1.8f;
  7874. maidArray[5].SetPos(vector);
  7875. }
  7876. if (maidArray[6] && maidArray[6].Visible)
  7877. {
  7878. vector.x = -1.8f;
  7879. maidArray[6].SetPos(vector);
  7880. }
  7881. if (maidArray[7] && maidArray[7].Visible)
  7882. {
  7883. vector.x = 2.4f;
  7884. maidArray[7].SetPos(vector);
  7885. }
  7886. if (maidArray[8] && maidArray[8].Visible)
  7887. {
  7888. vector.x = -2.4f;
  7889. maidArray[8].SetPos(vector);
  7890. }
  7891. if (maidArray[9] && maidArray[9].Visible)
  7892. {
  7893. vector.x = 3f;
  7894. maidArray[9].SetPos(vector);
  7895. }
  7896. if (maidArray[10] && maidArray[10].Visible)
  7897. {
  7898. vector.x = -3f;
  7899. maidArray[10].SetPos(vector);
  7900. }
  7901. if (maidArray[11] && maidArray[11].Visible)
  7902. {
  7903. vector.x = 3.6f;
  7904. maidArray[11].SetPos(vector);
  7905. }
  7906. if (maidArray[12] && maidArray[12].Visible)
  7907. {
  7908. vector.x = -3.6f;
  7909. maidArray[12].SetPos(vector);
  7910. }
  7911. if (maidArray[13] && maidArray[13].Visible)
  7912. {
  7913. vector.x = 4.2f;
  7914. maidArray[13].SetPos(vector);
  7915. }
  7916. }
  7917. }
  7918. int num7 = poseIndex[i];
  7919. for (int k = 0; k < groupList.Count; k++)
  7920. {
  7921. if (poseIndex[i] < (int)groupList[k])
  7922. {
  7923. poseIndex[i] = (int)groupList[k];
  7924. break;
  7925. }
  7926. }
  7927. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7928. {
  7929. poseIndex[i] = 0;
  7930. }
  7931. if (maidArray[i] && maidArray[i].Visible)
  7932. {
  7933. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7934. isStop[i] = false;
  7935. poseCount[i] = 20;
  7936. Maid maid = maidArray[i];
  7937. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7938. {
  7939. maid.body0.MuneYureL(0f);
  7940. maid.body0.MuneYureR(0f);
  7941. }
  7942. else
  7943. {
  7944. maid.body0.MuneYureL(1f);
  7945. maid.body0.MuneYureR(1f);
  7946. }
  7947. if (array[0].Contains("MultipleMaidsPose"))
  7948. {
  7949. string path = array[0].Split(new char[] { '/' })[1];
  7950. byte[] array2 = new byte[0];
  7951. try
  7952. {
  7953. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7954. {
  7955. array2 = new byte[fileStream.Length];
  7956. fileStream.Read(array2, 0, array2.Length);
  7957. }
  7958. }
  7959. catch { }
  7960. if (0 < array2.Length)
  7961. {
  7962. string text = Path.GetFileName(path);
  7963. long num5 = text.GetHashCode();
  7964. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7965. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7966. {
  7967. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7968. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7969. };
  7970. for (int m = 0; m < array3.Length; m++)
  7971. {
  7972. maid.SetAutoTwist(array3[m], true);
  7973. }
  7974. }
  7975. }
  7976. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7977. {
  7978. loadPose[i] = array[0];
  7979. }
  7980. else if (!array[0].StartsWith("dance_"))
  7981. {
  7982. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7983. }
  7984. else
  7985. {
  7986. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7987. {
  7988. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7989. GameUty.FileSystem,
  7990. array[0] + ".anm",
  7991. false,
  7992. false);
  7993. }
  7994. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7995. }
  7996. if (array.Length > 1)
  7997. {
  7998. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7999. isStop[i] = true;
  8000. if (array.Length > 2)
  8001. {
  8002. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8003. isPoseIti[i] = true;
  8004. poseIti[i] = maidArray[i].transform.position;
  8005. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8006. }
  8007. }
  8008. }
  8009. }
  8010. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8011. {
  8012. if (maidArray[1] && maidArray[1].Visible)
  8013. {
  8014. if (maidArray[0].transform.position == maidArray[1].transform.position
  8015. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8016. {
  8017. Vector3 vector = Vector3.zero;
  8018. vector.x = 0.6f;
  8019. maidArray[1].SetPos(vector);
  8020. if (maidArray[2] && maidArray[2].Visible)
  8021. {
  8022. vector.x = -0.6f;
  8023. maidArray[2].SetPos(vector);
  8024. }
  8025. if (maidArray[3] && maidArray[3].Visible)
  8026. {
  8027. vector.x = 1.2f;
  8028. maidArray[3].SetPos(vector);
  8029. }
  8030. if (maidArray[4] && maidArray[4].Visible)
  8031. {
  8032. vector.x = -1.2f;
  8033. maidArray[4].SetPos(vector);
  8034. }
  8035. if (maidArray[5] && maidArray[5].Visible)
  8036. {
  8037. vector.x = 1.8f;
  8038. maidArray[5].SetPos(vector);
  8039. }
  8040. if (maidArray[6] && maidArray[6].Visible)
  8041. {
  8042. vector.x = -1.8f;
  8043. maidArray[6].SetPos(vector);
  8044. }
  8045. if (maidArray[7] && maidArray[7].Visible)
  8046. {
  8047. vector.x = 2.4f;
  8048. maidArray[7].SetPos(vector);
  8049. }
  8050. if (maidArray[8] && maidArray[8].Visible)
  8051. {
  8052. vector.x = -2.4f;
  8053. maidArray[8].SetPos(vector);
  8054. }
  8055. if (maidArray[9] && maidArray[9].Visible)
  8056. {
  8057. vector.x = 3f;
  8058. maidArray[9].SetPos(vector);
  8059. }
  8060. if (maidArray[10] && maidArray[10].Visible)
  8061. {
  8062. vector.x = -3f;
  8063. maidArray[10].SetPos(vector);
  8064. }
  8065. if (maidArray[11] && maidArray[11].Visible)
  8066. {
  8067. vector.x = 3.6f;
  8068. maidArray[11].SetPos(vector);
  8069. }
  8070. if (maidArray[12] && maidArray[12].Visible)
  8071. {
  8072. vector.x = -3.6f;
  8073. maidArray[12].SetPos(vector);
  8074. }
  8075. if (maidArray[13] && maidArray[13].Visible)
  8076. {
  8077. vector.x = 4.2f;
  8078. maidArray[13].SetPos(vector);
  8079. }
  8080. }
  8081. }
  8082. poseIndex[i]--;
  8083. if (poseIndex[i] <= -1)
  8084. {
  8085. poseIndex[i] = poseArray.Length - 1;
  8086. }
  8087. if (maidArray[i] && maidArray[i].Visible)
  8088. {
  8089. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8090. isStop[i] = false;
  8091. poseCount[i] = 20;
  8092. Maid maid = maidArray[i];
  8093. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8094. {
  8095. maid.body0.MuneYureL(0f);
  8096. maid.body0.MuneYureR(0f);
  8097. }
  8098. else
  8099. {
  8100. maid.body0.MuneYureL(1f);
  8101. maid.body0.MuneYureR(1f);
  8102. }
  8103. if (array[0].Contains("MultipleMaidsPose"))
  8104. {
  8105. string path = array[0].Split(new char[] { '/' })[1];
  8106. byte[] array2 = new byte[0];
  8107. try
  8108. {
  8109. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8110. {
  8111. array2 = new byte[fileStream.Length];
  8112. fileStream.Read(array2, 0, array2.Length);
  8113. }
  8114. }
  8115. catch { }
  8116. if (0 < array2.Length)
  8117. {
  8118. string text = Path.GetFileName(path);
  8119. long num5 = text.GetHashCode();
  8120. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8121. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8122. {
  8123. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8124. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8125. };
  8126. for (int m = 0; m < array3.Length; m++)
  8127. {
  8128. maid.SetAutoTwist(array3[m], true);
  8129. }
  8130. }
  8131. }
  8132. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8133. {
  8134. loadPose[i] = array[0];
  8135. }
  8136. else if (!array[0].StartsWith("dance_"))
  8137. {
  8138. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8139. }
  8140. else
  8141. {
  8142. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8143. {
  8144. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8145. GameUty.FileSystem,
  8146. array[0] + ".anm",
  8147. false,
  8148. false);
  8149. }
  8150. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8151. }
  8152. if (array.Length > 1)
  8153. {
  8154. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8155. isStop[i] = true;
  8156. if (array.Length > 2)
  8157. {
  8158. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8159. isPoseIti[i] = true;
  8160. poseIti[i] = maidArray[i].transform.position;
  8161. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8162. }
  8163. }
  8164. }
  8165. }
  8166. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8167. {
  8168. if (maidArray[1] && maidArray[1].Visible)
  8169. {
  8170. if (maidArray[0].transform.position == maidArray[1].transform.position
  8171. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8172. {
  8173. Vector3 vector = Vector3.zero;
  8174. vector.x = 0.6f;
  8175. maidArray[1].SetPos(vector);
  8176. if (maidArray[2] && maidArray[2].Visible)
  8177. {
  8178. vector.x = -0.6f;
  8179. maidArray[2].SetPos(vector);
  8180. }
  8181. if (maidArray[3] && maidArray[3].Visible)
  8182. {
  8183. vector.x = 1.2f;
  8184. maidArray[3].SetPos(vector);
  8185. }
  8186. if (maidArray[4] && maidArray[4].Visible)
  8187. {
  8188. vector.x = -1.2f;
  8189. maidArray[4].SetPos(vector);
  8190. }
  8191. if (maidArray[5] && maidArray[5].Visible)
  8192. {
  8193. vector.x = 1.8f;
  8194. maidArray[5].SetPos(vector);
  8195. }
  8196. if (maidArray[6] && maidArray[6].Visible)
  8197. {
  8198. vector.x = -1.8f;
  8199. maidArray[6].SetPos(vector);
  8200. }
  8201. if (maidArray[7] && maidArray[7].Visible)
  8202. {
  8203. vector.x = 2.4f;
  8204. maidArray[7].SetPos(vector);
  8205. }
  8206. if (maidArray[8] && maidArray[8].Visible)
  8207. {
  8208. vector.x = -2.4f;
  8209. maidArray[8].SetPos(vector);
  8210. }
  8211. if (maidArray[9] && maidArray[9].Visible)
  8212. {
  8213. vector.x = 3f;
  8214. maidArray[9].SetPos(vector);
  8215. }
  8216. if (maidArray[10] && maidArray[10].Visible)
  8217. {
  8218. vector.x = -3f;
  8219. maidArray[10].SetPos(vector);
  8220. }
  8221. if (maidArray[11] && maidArray[11].Visible)
  8222. {
  8223. vector.x = 3.6f;
  8224. maidArray[11].SetPos(vector);
  8225. }
  8226. if (maidArray[12] && maidArray[12].Visible)
  8227. {
  8228. vector.x = -3.6f;
  8229. maidArray[12].SetPos(vector);
  8230. }
  8231. if (maidArray[13] && maidArray[13].Visible)
  8232. {
  8233. vector.x = 4.2f;
  8234. maidArray[13].SetPos(vector);
  8235. }
  8236. }
  8237. }
  8238. poseIndex[i]++;
  8239. if (poseIndex[i] == poseArray.Length)
  8240. {
  8241. poseIndex[i] = 0;
  8242. }
  8243. if (maidArray[i] && maidArray[i].Visible)
  8244. {
  8245. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8246. isStop[i] = false;
  8247. poseCount[i] = 20;
  8248. Maid maid = maidArray[i];
  8249. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8250. {
  8251. maid.body0.MuneYureL(0f);
  8252. maid.body0.MuneYureR(0f);
  8253. }
  8254. else
  8255. {
  8256. maid.body0.MuneYureL(1f);
  8257. maid.body0.MuneYureR(1f);
  8258. }
  8259. if (array[0].Contains("MultipleMaidsPose"))
  8260. {
  8261. string path = array[0].Split(new char[] { '/' })[1];
  8262. byte[] array2 = new byte[0];
  8263. try
  8264. {
  8265. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8266. {
  8267. array2 = new byte[fileStream.Length];
  8268. fileStream.Read(array2, 0, array2.Length);
  8269. }
  8270. }
  8271. catch { }
  8272. if (0 < array2.Length)
  8273. {
  8274. string text = Path.GetFileName(path);
  8275. long num5 = text.GetHashCode();
  8276. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8277. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8278. {
  8279. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8280. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8281. };
  8282. for (int m = 0; m < array3.Length; m++)
  8283. {
  8284. maid.SetAutoTwist(array3[m], true);
  8285. }
  8286. }
  8287. }
  8288. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8289. {
  8290. loadPose[i] = array[0];
  8291. }
  8292. else if (!array[0].StartsWith("dance_"))
  8293. {
  8294. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8295. }
  8296. else
  8297. {
  8298. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8299. {
  8300. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8301. GameUty.FileSystem,
  8302. array[0] + ".anm",
  8303. false,
  8304. false);
  8305. }
  8306. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8307. }
  8308. if (array.Length > 1)
  8309. {
  8310. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8311. isStop[i] = true;
  8312. if (array.Length > 2)
  8313. {
  8314. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8315. isPoseIti[i] = true;
  8316. poseIti[i] = maidArray[i].transform.position;
  8317. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8318. }
  8319. }
  8320. }
  8321. }
  8322. }
  8323. }
  8324. if (isDanceChu)
  8325. {
  8326. for (int j = 0; j < maidCnt; j++)
  8327. {
  8328. if (maidArray[j] && maidArray[j].Visible)
  8329. {
  8330. string text2 = danceName[j];
  8331. float num = 0f;
  8332. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8333. || text2 == "dance_cm3d_004_kano_f1.anm")
  8334. {
  8335. num = 0.166666f;
  8336. }
  8337. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8338. {
  8339. num = -0.35f;
  8340. }
  8341. if (text2 != null)
  8342. {
  8343. if (danceCount > 0)
  8344. {
  8345. danceCount--;
  8346. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8347. }
  8348. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8349. {
  8350. danceCount = 20;
  8351. }
  8352. }
  8353. }
  8354. }
  8355. }
  8356. if (isDanceStart1)
  8357. {
  8358. for (int j = 0; j < maidCnt; j++)
  8359. {
  8360. if (maidArray[j] && maidArray[j].Visible)
  8361. {
  8362. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8363. if (!isShift)
  8364. {
  8365. if (j == 0)
  8366. {
  8367. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8368. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8369. danceName[j] = "dance_cm3d2_001_f1.anm";
  8370. }
  8371. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8372. {
  8373. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8374. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8375. danceName[j] = "dance_cm3d2_001_f2.anm";
  8376. }
  8377. else
  8378. {
  8379. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8380. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8381. danceName[j] = "dance_cm3d2_001_f3.anm";
  8382. }
  8383. }
  8384. else
  8385. {
  8386. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8387. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8388. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8389. }
  8390. }
  8391. }
  8392. isDanceStart1 = false;
  8393. isDanceStart1F = true;
  8394. isShift = false;
  8395. }
  8396. if (isDanceStart2)
  8397. {
  8398. for (int j = 0; j < maidCnt; j++)
  8399. {
  8400. if (maidArray[j] && maidArray[j].Visible)
  8401. {
  8402. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8403. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8404. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8405. danceName[j] = "dance_cm3d_001_f1.anm";
  8406. }
  8407. }
  8408. isDanceStart2 = false;
  8409. isDanceStart2F = true;
  8410. }
  8411. if (isDanceStart3)
  8412. {
  8413. for (int j = 0; j < maidCnt; j++)
  8414. {
  8415. if (maidArray[j] && maidArray[j].Visible)
  8416. {
  8417. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8418. if (!isShift)
  8419. {
  8420. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8421. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8422. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8423. }
  8424. else
  8425. {
  8426. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8427. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8428. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8429. }
  8430. }
  8431. }
  8432. isDanceStart3 = false;
  8433. isDanceStart3F = true;
  8434. isShift = false;
  8435. }
  8436. if (isDanceStart4)
  8437. {
  8438. for (int j = 0; j < maidCnt; j++)
  8439. {
  8440. if (maidArray[j] && maidArray[j].Visible)
  8441. {
  8442. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8443. if (!isShift)
  8444. {
  8445. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8446. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8447. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8448. }
  8449. else
  8450. {
  8451. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8453. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8454. }
  8455. }
  8456. }
  8457. isDanceStart4 = false;
  8458. isDanceStart4F = true;
  8459. isShift = false;
  8460. }
  8461. if (isDanceStart5)
  8462. {
  8463. for (int j = 0; j < maidCnt; j++)
  8464. {
  8465. if (maidArray[j] && maidArray[j].Visible)
  8466. {
  8467. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8468. if (!isShift)
  8469. {
  8470. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8471. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8472. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8473. }
  8474. else
  8475. {
  8476. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8478. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8479. }
  8480. }
  8481. }
  8482. isDanceStart5 = false;
  8483. isDanceStart5F = true;
  8484. isShift = false;
  8485. }
  8486. if (isDanceStart6)
  8487. {
  8488. for (int j = 0; j < maidCnt; j++)
  8489. {
  8490. if (maidArray[j] && maidArray[j].Visible)
  8491. {
  8492. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8493. if (!isShift)
  8494. {
  8495. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8496. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8497. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8498. }
  8499. else
  8500. {
  8501. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8503. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8504. }
  8505. }
  8506. }
  8507. isDanceStart6 = false;
  8508. isDanceStart6F = true;
  8509. isShift = false;
  8510. }
  8511. if (isDanceStart7)
  8512. {
  8513. for (int j = 0; j < maidCnt; j++)
  8514. {
  8515. if (maidArray[j] && maidArray[j].Visible)
  8516. {
  8517. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8518. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8519. {
  8520. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8521. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8522. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8523. }
  8524. else
  8525. {
  8526. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8528. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8529. }
  8530. }
  8531. }
  8532. isDanceStart7 = false;
  8533. isDanceStart7V = true;
  8534. isDanceStart7F = true;
  8535. }
  8536. if (isDanceStart8)
  8537. {
  8538. for (int j = 0; j < maidCnt; j++)
  8539. {
  8540. if (maidArray[j] && maidArray[j].Visible)
  8541. {
  8542. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8543. if (j == 0 || j == 4 || j == 8 || j == 12)
  8544. {
  8545. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8546. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8547. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8548. }
  8549. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8550. {
  8551. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8552. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8553. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8554. }
  8555. else if (j == 2 || j == 6 || j == 10)
  8556. {
  8557. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8558. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8559. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8560. }
  8561. else
  8562. {
  8563. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8564. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8565. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8566. }
  8567. }
  8568. }
  8569. isDanceStart8 = false;
  8570. isDanceStart8V = true;
  8571. isDanceStart8F = true;
  8572. }
  8573. if (isDanceStart9)
  8574. {
  8575. isDanceStart9Count++;
  8576. if (isShift)
  8577. {
  8578. for (int j = 0; j < maidCnt; j++)
  8579. {
  8580. if (maidArray[j] && maidArray[j].Visible)
  8581. {
  8582. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8584. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8585. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8586. }
  8587. }
  8588. isDanceStart9 = false;
  8589. isDanceStart9F = true;
  8590. isDanceStart9Count = 0;
  8591. isShift = false;
  8592. }
  8593. if (isDanceStart9Count == 10)
  8594. {
  8595. for (int j = 0; j < maidCnt; j++)
  8596. {
  8597. if (maidArray[j] && maidArray[j].Visible)
  8598. {
  8599. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8600. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8601. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8602. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8603. }
  8604. }
  8605. isDanceStart9 = false;
  8606. isDanceStart9F = true;
  8607. isDanceStart9Count = 0;
  8608. }
  8609. }
  8610. if (isDanceStart10)
  8611. {
  8612. for (int j = 0; j < maidCnt; j++)
  8613. {
  8614. if (maidArray[j] && maidArray[j].Visible)
  8615. {
  8616. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8617. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8618. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8619. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8620. }
  8621. }
  8622. isDanceStart10 = false;
  8623. isDanceStart10F = true;
  8624. }
  8625. if (isDanceStart11)
  8626. {
  8627. for (int j = 0; j < maidCnt; j++)
  8628. {
  8629. if (maidArray[j] && maidArray[j].Visible)
  8630. {
  8631. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8632. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8633. {
  8634. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8635. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8636. danceName[j] = nameA + danceNo2 + ".anm";
  8637. }
  8638. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8639. {
  8640. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8641. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8642. danceName[j] = nameA + danceNo3 + ".anm";
  8643. }
  8644. else
  8645. {
  8646. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8647. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8648. danceName[j] = nameA + danceNo1 + ".anm";
  8649. }
  8650. }
  8651. }
  8652. isDanceStart11 = false;
  8653. isDanceStart11V = true;
  8654. isDanceStart11F = true;
  8655. }
  8656. if (isDanceStart12)
  8657. {
  8658. for (int j = 0; j < maidCnt; j++)
  8659. {
  8660. if (maidArray[j] && maidArray[j].Visible)
  8661. {
  8662. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8663. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8664. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8665. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8666. }
  8667. }
  8668. isDanceStart12 = false;
  8669. isDanceStart12F = true;
  8670. }
  8671. if (isDanceStart13)
  8672. {
  8673. for (int j = 0; j < maidCnt; j++)
  8674. {
  8675. if (maidArray[j] && maidArray[j].Visible)
  8676. {
  8677. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8678. if (!isShift)
  8679. {
  8680. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8681. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8682. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8683. }
  8684. else
  8685. {
  8686. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8687. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8688. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8689. }
  8690. }
  8691. }
  8692. isDanceStart13 = false;
  8693. isDanceStart13F = true;
  8694. isShift = false;
  8695. }
  8696. if (isDanceStart14)
  8697. {
  8698. for (int j = 0; j < maidCnt; j++)
  8699. {
  8700. if (maidArray[j] && maidArray[j].Visible)
  8701. {
  8702. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8703. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8704. {
  8705. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8706. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8707. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8708. }
  8709. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8710. {
  8711. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8712. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8713. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8714. }
  8715. else
  8716. {
  8717. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8718. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8719. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8720. }
  8721. }
  8722. }
  8723. isDanceStart14 = false;
  8724. isDanceStart14V = true;
  8725. isDanceStart14F = true;
  8726. }
  8727. if (isDanceStart15)
  8728. {
  8729. isDanceStart15Count++;
  8730. }
  8731. if (isDanceStart15Count == 10)
  8732. {
  8733. for (int j = 0; j < maidCnt; j++)
  8734. {
  8735. if (maidArray[j] && maidArray[j].Visible)
  8736. {
  8737. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8738. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8739. {
  8740. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8741. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8742. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8743. }
  8744. else
  8745. {
  8746. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8747. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8748. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8749. }
  8750. }
  8751. }
  8752. isDanceStart15 = false;
  8753. isDanceStart15V = true;
  8754. isDanceStart15F = true;
  8755. isDanceStart15Count = 0;
  8756. }
  8757. if (isDance)
  8758. {
  8759. for (int j = 0; j < maidCnt; j++)
  8760. {
  8761. if (maidArray[j].Visible)
  8762. {
  8763. if (isDanceStart1F)
  8764. {
  8765. if (isDanceStart1K)
  8766. {
  8767. foreach (string text3 in dance1KArray)
  8768. {
  8769. string[] array = text3.Split(new char[] { ',' });
  8770. float num10 = float.Parse(array[0]);
  8771. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8772. {
  8773. danceFace[j] = num10;
  8774. FaceName[j] = FaceName2[j];
  8775. FaceName2[j] = array[1];
  8776. FaceName3[j] = array[2];
  8777. FaceTime[j] = 0.0166666675f;
  8778. break;
  8779. }
  8780. }
  8781. }
  8782. else if (j == 0)
  8783. {
  8784. foreach (string text3 in dance1Array)
  8785. {
  8786. string[] array = text3.Split(new char[] { ',' });
  8787. float num10 = float.Parse(array[0]);
  8788. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8789. {
  8790. danceFace[j] = num10;
  8791. FaceName[j] = FaceName2[j];
  8792. FaceName2[j] = array[1];
  8793. FaceName3[j] = array[2];
  8794. FaceTime[j] = 0.0166666675f;
  8795. break;
  8796. }
  8797. }
  8798. }
  8799. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8800. {
  8801. foreach (string text3 in dance1BArray)
  8802. {
  8803. string[] array = text3.Split(new char[] { ',' });
  8804. float num10 = float.Parse(array[0]);
  8805. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8806. {
  8807. danceFace[j] = num10;
  8808. FaceName[j] = FaceName2[j];
  8809. FaceName2[j] = array[1];
  8810. FaceName3[j] = array[2];
  8811. FaceTime[j] = 0.0166666675f;
  8812. break;
  8813. }
  8814. }
  8815. }
  8816. else
  8817. {
  8818. foreach (string text3 in dance1CArray)
  8819. {
  8820. string[] array = text3.Split(new char[] { ',' });
  8821. float num10 = float.Parse(array[0]);
  8822. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8823. {
  8824. danceFace[j] = num10;
  8825. FaceName[j] = FaceName2[j];
  8826. FaceName2[j] = array[1];
  8827. FaceName3[j] = array[2];
  8828. FaceTime[j] = 0.0166666675f;
  8829. break;
  8830. }
  8831. }
  8832. }
  8833. }
  8834. if (isDanceStart2F)
  8835. {
  8836. foreach (string text3 in dance2Array)
  8837. {
  8838. string[] array = text3.Split(new char[] { ',' });
  8839. float num10 = float.Parse(array[0]);
  8840. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8841. {
  8842. danceFace[j] = num10;
  8843. FaceName[j] = FaceName2[j];
  8844. FaceName2[j] = array[1];
  8845. FaceName3[j] = array[2];
  8846. FaceTime[j] = 0.0166666675f;
  8847. break;
  8848. }
  8849. }
  8850. }
  8851. if (isDanceStart3F)
  8852. {
  8853. if (isDanceStart3K)
  8854. {
  8855. foreach (string text3 in dance3KArray)
  8856. {
  8857. string[] array = text3.Split(new char[] { ',' });
  8858. float num10 = float.Parse(array[0]);
  8859. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8860. {
  8861. danceFace[j] = num10;
  8862. FaceName[j] = FaceName2[j];
  8863. FaceName2[j] = array[1];
  8864. FaceName3[j] = array[2];
  8865. FaceTime[j] = 0.0166666675f;
  8866. break;
  8867. }
  8868. }
  8869. }
  8870. else
  8871. {
  8872. foreach (string text3 in dance3Array)
  8873. {
  8874. string[] array = text3.Split(new char[] { ',' });
  8875. float num10 = float.Parse(array[0]);
  8876. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8877. {
  8878. danceFace[j] = num10;
  8879. FaceName[j] = FaceName2[j];
  8880. FaceName2[j] = array[1];
  8881. FaceName3[j] = array[2];
  8882. FaceTime[j] = 0.0166666675f;
  8883. break;
  8884. }
  8885. }
  8886. }
  8887. }
  8888. if (isDanceStart4F)
  8889. {
  8890. if (isDanceStart4K)
  8891. {
  8892. foreach (string text3 in dance4KArray)
  8893. {
  8894. string[] array = text3.Split(new char[] { ',' });
  8895. float num10 = float.Parse(array[0]);
  8896. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8897. {
  8898. danceFace[j] = num10;
  8899. FaceName[j] = FaceName2[j];
  8900. FaceName2[j] = array[1];
  8901. FaceName3[j] = array[2];
  8902. FaceTime[j] = 0.0166666675f;
  8903. break;
  8904. }
  8905. }
  8906. }
  8907. else
  8908. {
  8909. foreach (string text3 in dance4Array)
  8910. {
  8911. string[] array = text3.Split(new char[] { ',' });
  8912. float num10 = float.Parse(array[0]);
  8913. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8914. {
  8915. danceFace[j] = num10;
  8916. FaceName[j] = FaceName2[j];
  8917. FaceName2[j] = array[1];
  8918. FaceName3[j] = array[2];
  8919. FaceTime[j] = 0.0166666675f;
  8920. break;
  8921. }
  8922. }
  8923. }
  8924. }
  8925. if (isDanceStart5F)
  8926. {
  8927. if (isDanceStart5K)
  8928. {
  8929. foreach (string text3 in dance5KArray)
  8930. {
  8931. string[] array = text3.Split(new char[] { ',' });
  8932. float num10 = float.Parse(array[0]);
  8933. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8934. {
  8935. danceFace[j] = num10;
  8936. FaceName[j] = FaceName2[j];
  8937. FaceName2[j] = array[1];
  8938. FaceName3[j] = array[2];
  8939. FaceTime[j] = 0.0166666675f;
  8940. break;
  8941. }
  8942. }
  8943. }
  8944. else
  8945. {
  8946. foreach (string text3 in dance5Array)
  8947. {
  8948. string[] array = text3.Split(new char[] { ',' });
  8949. float num10 = float.Parse(array[0]);
  8950. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8951. {
  8952. danceFace[j] = num10;
  8953. FaceName[j] = FaceName2[j];
  8954. FaceName2[j] = array[1];
  8955. FaceName3[j] = array[2];
  8956. FaceTime[j] = 0.0166666675f;
  8957. break;
  8958. }
  8959. }
  8960. }
  8961. }
  8962. if (isDanceStart6F)
  8963. {
  8964. if (isDanceStart6K)
  8965. {
  8966. foreach (string text3 in dance6KArray)
  8967. {
  8968. string[] array = text3.Split(new char[] { ',' });
  8969. float num10 = float.Parse(array[0]);
  8970. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8971. {
  8972. danceFace[j] = num10;
  8973. FaceName[j] = FaceName2[j];
  8974. FaceName2[j] = array[1];
  8975. FaceName3[j] = array[2];
  8976. FaceTime[j] = 0.0166666675f;
  8977. break;
  8978. }
  8979. }
  8980. }
  8981. else
  8982. {
  8983. foreach (string text3 in dance6Array)
  8984. {
  8985. string[] array = text3.Split(new char[] { ',' });
  8986. float num10 = float.Parse(array[0]);
  8987. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8988. {
  8989. danceFace[j] = num10;
  8990. FaceName[j] = FaceName2[j];
  8991. FaceName2[j] = array[1];
  8992. FaceName3[j] = array[2];
  8993. FaceTime[j] = 0.0166666675f;
  8994. break;
  8995. }
  8996. }
  8997. }
  8998. }
  8999. if (isDanceStart7F)
  9000. {
  9001. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9002. {
  9003. foreach (string text3 in dance6BArray)
  9004. {
  9005. string[] array = text3.Split(new char[] { ',' });
  9006. float num10 = float.Parse(array[0]);
  9007. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9008. {
  9009. danceFace[j] = num10;
  9010. FaceName[j] = FaceName2[j];
  9011. FaceName2[j] = array[1];
  9012. FaceName3[j] = array[2];
  9013. FaceTime[j] = 0.0166666675f;
  9014. break;
  9015. }
  9016. }
  9017. }
  9018. else
  9019. {
  9020. foreach (string text3 in dance6Array)
  9021. {
  9022. string[] array = text3.Split(new char[] { ',' });
  9023. float num10 = float.Parse(array[0]);
  9024. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9025. {
  9026. danceFace[j] = num10;
  9027. FaceName[j] = FaceName2[j];
  9028. FaceName2[j] = array[1];
  9029. FaceName3[j] = array[2];
  9030. FaceTime[j] = 0.0166666675f;
  9031. break;
  9032. }
  9033. }
  9034. }
  9035. }
  9036. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9037. {
  9038. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9039. {
  9040. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9041. }
  9042. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9043. {
  9044. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9045. 100f,
  9046. maidArray[j - 1].transform.position.z));
  9047. }
  9048. }
  9049. if (isDanceStart8F)
  9050. {
  9051. if (j == 1 || j == 5 || j == 9 || j == 13)
  9052. {
  9053. foreach (string text3 in dance6BArray)
  9054. {
  9055. string[] array = text3.Split(new char[] { ',' });
  9056. float num10 = float.Parse(array[0]);
  9057. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9058. {
  9059. danceFace[j] = num10;
  9060. FaceName[j] = FaceName2[j];
  9061. FaceName2[j] = array[1];
  9062. FaceName3[j] = array[2];
  9063. FaceTime[j] = 0.0166666675f;
  9064. break;
  9065. }
  9066. }
  9067. }
  9068. else if (j == 2 || j == 6 || j == 10)
  9069. {
  9070. foreach (string text3 in dance6CArray)
  9071. {
  9072. string[] array = text3.Split(new char[] { ',' });
  9073. float num10 = float.Parse(array[0]);
  9074. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9075. {
  9076. danceFace[j] = num10;
  9077. FaceName[j] = FaceName2[j];
  9078. FaceName2[j] = array[1];
  9079. FaceName3[j] = array[2];
  9080. FaceTime[j] = 0.0166666675f;
  9081. break;
  9082. }
  9083. }
  9084. }
  9085. else if (j == 3 || j == 9 || j == 11)
  9086. {
  9087. foreach (string text3 in dance6DArray)
  9088. {
  9089. string[] array = text3.Split(new char[] { ',' });
  9090. float num10 = float.Parse(array[0]);
  9091. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9092. {
  9093. danceFace[j] = num10;
  9094. FaceName[j] = FaceName2[j];
  9095. FaceName2[j] = array[1];
  9096. FaceName3[j] = array[2];
  9097. FaceTime[j] = 0.0166666675f;
  9098. break;
  9099. }
  9100. }
  9101. }
  9102. else
  9103. {
  9104. foreach (string text3 in dance6Array)
  9105. {
  9106. string[] array = text3.Split(new char[] { ',' });
  9107. float num10 = float.Parse(array[0]);
  9108. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9109. {
  9110. danceFace[j] = num10;
  9111. FaceName[j] = FaceName2[j];
  9112. FaceName2[j] = array[1];
  9113. FaceName3[j] = array[2];
  9114. FaceTime[j] = 0.0166666675f;
  9115. break;
  9116. }
  9117. }
  9118. }
  9119. }
  9120. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9121. {
  9122. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9123. {
  9124. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9125. }
  9126. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9127. {
  9128. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9129. 100f,
  9130. maidArray[j - 1].transform.position.z));
  9131. }
  9132. }
  9133. if (isDanceStart8V)
  9134. {
  9135. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9136. {
  9137. isDanceStart8P = true;
  9138. for (int num11 = 0; num11 < maidCnt; num11++)
  9139. {
  9140. if (maidArray[num11].Visible)
  9141. {
  9142. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9143. {
  9144. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9145. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9146. gameObject6.transform.position =
  9147. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9148. .position;
  9149. }
  9150. }
  9151. }
  9152. }
  9153. }
  9154. if (isDanceStart9F)
  9155. {
  9156. if (isDanceStart9K)
  9157. {
  9158. foreach (string text3 in dance9KArray)
  9159. {
  9160. string[] array = text3.Split(new char[] { ',' });
  9161. float num10 = float.Parse(array[0]);
  9162. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9163. {
  9164. danceFace[j] = num10;
  9165. FaceName[j] = FaceName2[j];
  9166. FaceName2[j] = array[1];
  9167. FaceName3[j] = array[2];
  9168. FaceTime[j] = 0.0166666675f;
  9169. break;
  9170. }
  9171. }
  9172. }
  9173. else
  9174. {
  9175. foreach (string text3 in dance7Array)
  9176. {
  9177. string[] array = text3.Split(new char[] { ',' });
  9178. float num10 = float.Parse(array[0]);
  9179. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9180. {
  9181. danceFace[j] = num10;
  9182. FaceName[j] = FaceName2[j];
  9183. FaceName2[j] = array[1];
  9184. FaceName3[j] = array[2];
  9185. FaceTime[j] = 0.0166666675f;
  9186. break;
  9187. }
  9188. }
  9189. }
  9190. }
  9191. if (isDanceStart10F)
  9192. {
  9193. foreach (string text3 in danceO1Array)
  9194. {
  9195. string[] array = text3.Split(new char[] { ',' });
  9196. float num10 = float.Parse(array[0]);
  9197. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9198. {
  9199. danceFace[j] = num10;
  9200. FaceName[j] = FaceName2[j];
  9201. FaceName2[j] = array[1];
  9202. FaceName3[j] = array[2];
  9203. FaceTime[j] = 0.0166666675f;
  9204. break;
  9205. }
  9206. }
  9207. }
  9208. if (isDanceStart11F)
  9209. {
  9210. string[] array14 = null;
  9211. string[] array12 = null;
  9212. string[] array15 = null;
  9213. if (isSS1)
  9214. {
  9215. array14 = danceO1Array;
  9216. array12 = danceO1CArray;
  9217. array15 = danceO1BArray;
  9218. }
  9219. if (isSS2)
  9220. {
  9221. array14 = danceO2Array;
  9222. array12 = danceO2BArray;
  9223. array15 = danceO2CArray;
  9224. }
  9225. if (isSS3)
  9226. {
  9227. array14 = danceO3CArray;
  9228. array12 = danceO3Array;
  9229. array15 = danceO3BArray;
  9230. }
  9231. if (isSS4)
  9232. {
  9233. array14 = danceO5BArray;
  9234. array12 = danceO5Array;
  9235. array15 = danceO5CArray;
  9236. }
  9237. if (isSS5)
  9238. {
  9239. array14 = danceO4Array;
  9240. array12 = danceO4BArray;
  9241. array15 = danceO4CArray;
  9242. }
  9243. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9244. {
  9245. foreach (string text3 in array12)
  9246. {
  9247. string[] array = text3.Split(new char[] { ',' });
  9248. float num10 = float.Parse(array[0]) - 0.03f;
  9249. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9250. {
  9251. danceFace[j] = num10;
  9252. FaceName[j] = FaceName2[j];
  9253. FaceName2[j] = array[1];
  9254. FaceName3[j] = array[2];
  9255. FaceTime[j] = 0.0166666675f;
  9256. break;
  9257. }
  9258. }
  9259. }
  9260. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9261. {
  9262. foreach (string text3 in array15)
  9263. {
  9264. string[] array = text3.Split(new char[] { ',' });
  9265. float num10 = float.Parse(array[0]) - 0.03f;
  9266. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9267. {
  9268. danceFace[j] = num10;
  9269. FaceName[j] = FaceName2[j];
  9270. FaceName2[j] = array[1];
  9271. FaceName3[j] = array[2];
  9272. FaceTime[j] = 0.0166666675f;
  9273. break;
  9274. }
  9275. }
  9276. }
  9277. else
  9278. {
  9279. foreach (string text3 in array14)
  9280. {
  9281. string[] array = text3.Split(new char[] { ',' });
  9282. float num10 = float.Parse(array[0]) - 0.03f;
  9283. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9284. {
  9285. danceFace[j] = num10;
  9286. FaceName[j] = FaceName2[j];
  9287. FaceName2[j] = array[1];
  9288. FaceName3[j] = array[2];
  9289. FaceTime[j] = 0.0166666675f;
  9290. break;
  9291. }
  9292. }
  9293. }
  9294. }
  9295. if (isDanceStart12F)
  9296. {
  9297. foreach (string text3 in dance12Array)
  9298. {
  9299. string[] array = text3.Split(new char[] { ',' });
  9300. float num10 = float.Parse(array[0]);
  9301. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9302. {
  9303. danceFace[j] = num10;
  9304. FaceName[j] = FaceName2[j];
  9305. FaceName2[j] = array[1];
  9306. FaceName3[j] = array[2];
  9307. FaceTime[j] = 0.0166666675f;
  9308. break;
  9309. }
  9310. }
  9311. }
  9312. if (isDanceStart13F)
  9313. {
  9314. if (!isDanceStart13K)
  9315. {
  9316. foreach (string text3 in dance13Array)
  9317. {
  9318. string[] array = text3.Split(new char[] { ',' });
  9319. float num10 = float.Parse(array[0]);
  9320. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9321. {
  9322. danceFace[j] = num10;
  9323. FaceName[j] = FaceName2[j];
  9324. FaceName2[j] = array[1];
  9325. FaceName3[j] = array[2];
  9326. FaceTime[j] = 0.0166666675f;
  9327. break;
  9328. }
  9329. }
  9330. }
  9331. }
  9332. if (isDanceStart14F)
  9333. {
  9334. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9335. {
  9336. foreach (string text3 in dance13BArray)
  9337. {
  9338. string[] array = text3.Split(new char[] { ',' });
  9339. float num10 = float.Parse(array[0]);
  9340. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9341. {
  9342. danceFace[j] = num10;
  9343. FaceName[j] = FaceName2[j];
  9344. FaceName2[j] = array[1];
  9345. FaceName3[j] = array[2];
  9346. FaceTime[j] = 0.0166666675f;
  9347. break;
  9348. }
  9349. }
  9350. }
  9351. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9352. {
  9353. foreach (string text3 in dance13CArray)
  9354. {
  9355. string[] array = text3.Split(new char[] { ',' });
  9356. float num10 = float.Parse(array[0]);
  9357. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9358. {
  9359. danceFace[j] = num10;
  9360. FaceName[j] = FaceName2[j];
  9361. FaceName2[j] = array[1];
  9362. FaceName3[j] = array[2];
  9363. FaceTime[j] = 0.0166666675f;
  9364. break;
  9365. }
  9366. }
  9367. }
  9368. else
  9369. {
  9370. foreach (string text3 in dance13Array)
  9371. {
  9372. string[] array = text3.Split(new char[] { ',' });
  9373. float num10 = float.Parse(array[0]);
  9374. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9375. {
  9376. danceFace[j] = num10;
  9377. FaceName[j] = FaceName2[j];
  9378. FaceName2[j] = array[1];
  9379. FaceName3[j] = array[2];
  9380. FaceTime[j] = 0.0166666675f;
  9381. break;
  9382. }
  9383. }
  9384. }
  9385. }
  9386. if (isDanceStart15F)
  9387. {
  9388. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9389. {
  9390. foreach (string text3 in dance15BArray)
  9391. {
  9392. string[] array = text3.Split(new char[] { ',' });
  9393. float num10 = float.Parse(array[0]);
  9394. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9395. {
  9396. danceFace[j] = num10;
  9397. FaceName[j] = FaceName2[j];
  9398. FaceName2[j] = array[1];
  9399. FaceName3[j] = array[2];
  9400. FaceTime[j] = 0.0166666675f;
  9401. break;
  9402. }
  9403. }
  9404. }
  9405. else
  9406. {
  9407. foreach (string text3 in dance15Array)
  9408. {
  9409. string[] array = text3.Split(new char[] { ',' });
  9410. float num10 = float.Parse(array[0]);
  9411. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9412. {
  9413. danceFace[j] = num10;
  9414. FaceName[j] = FaceName2[j];
  9415. FaceName2[j] = array[1];
  9416. FaceName3[j] = array[2];
  9417. FaceTime[j] = 0.0166666675f;
  9418. break;
  9419. }
  9420. }
  9421. }
  9422. }
  9423. if (!isFadeOut)
  9424. {
  9425. Maid maid = maidArray[j];
  9426. if (maid && maid.Visible)
  9427. {
  9428. if (maid.transform.position.y != 100f)
  9429. {
  9430. FaceTime[j] += Time.deltaTime;
  9431. if (FaceTime[j] < 1f)
  9432. {
  9433. TMorph morph = maid.body0.Face.morph;
  9434. maid.boMabataki = false;
  9435. maid.body0.Face.morph.EyeMabataki = 0f;
  9436. if (FaceName[j] != string.Empty)
  9437. {
  9438. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9439. }
  9440. if (FaceName2[j] != "")
  9441. {
  9442. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9443. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9444. }
  9445. if (FaceName3[j] != string.Empty)
  9446. {
  9447. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9448. }
  9449. maid.body0.Face.morph.FixBlendValues_Face();
  9450. }
  9451. else
  9452. {
  9453. FaceName[j] = FaceName2[j];
  9454. }
  9455. if (isHenkou)
  9456. {
  9457. TMorph morph = maid.body0.Face.morph;
  9458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9459. maid.boMabataki = false;
  9460. if (isNamidaH)
  9461. {
  9462. fieldValue[(int)morph.hash["namida"]] = 1f;
  9463. }
  9464. else
  9465. {
  9466. fieldValue[(int)morph.hash["namida"]] = 0f;
  9467. }
  9468. if (isSekimenH)
  9469. {
  9470. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9471. }
  9472. else
  9473. {
  9474. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9475. }
  9476. if (isHohoH)
  9477. {
  9478. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9479. }
  9480. else
  9481. {
  9482. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9483. }
  9484. maid.body0.Face.morph.FixBlendValues_Face();
  9485. }
  9486. }
  9487. }
  9488. }
  9489. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9490. }
  9491. }
  9492. if (Input.GetKey(KeyCode.H) || isVR)
  9493. {
  9494. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9495. {
  9496. h2Flg = true;
  9497. isNamidaH = !isNamidaH;
  9498. isHenkou = true;
  9499. }
  9500. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9501. {
  9502. h2Flg = true;
  9503. isSekimenH = !isSekimenH;
  9504. isHenkou = true;
  9505. }
  9506. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9507. {
  9508. h2Flg = true;
  9509. isHohoH = !isHohoH;
  9510. isHenkou = true;
  9511. }
  9512. }
  9513. danceCheckIndex++;
  9514. if (danceCheckIndex == 10)
  9515. {
  9516. danceCheckIndex = 0;
  9517. }
  9518. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9519. isDanceChu = false;
  9520. for (int k = 0; k < danceCheck.Length; k++)
  9521. {
  9522. if (danceCheck[k] > 0f)
  9523. {
  9524. isDanceChu = true;
  9525. break;
  9526. }
  9527. }
  9528. if (!isDanceChu)
  9529. {
  9530. danceWait--;
  9531. if (danceWait > 0)
  9532. {
  9533. isDanceChu = true;
  9534. }
  9535. }
  9536. if (!isDanceChu)
  9537. {
  9538. for (int j = 0; j < maidCnt; j++)
  9539. {
  9540. if (maidArray[j] && maidArray[j].Visible)
  9541. {
  9542. maidArray[j].StopKuchipakuPattern();
  9543. if (isDanceStart7V)
  9544. {
  9545. maidArray[j].SetPos(dancePos[j]);
  9546. maidArray[j].body0.transform.localRotation = danceRot[j];
  9547. }
  9548. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9549. {
  9550. maidArray[j].SetPos(dancePos[j]);
  9551. maidArray[j].body0.transform.localRotation = danceRot[j];
  9552. }
  9553. if (isDanceStart11V)
  9554. {
  9555. maidArray[j].SetPos(dancePos[j]);
  9556. maidArray[j].body0.transform.localRotation = danceRot[j];
  9557. }
  9558. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9559. || isDanceStart13K)
  9560. {
  9561. maidArray[j].SetPos(dancePos[j]);
  9562. maidArray[j].body0.transform.localRotation = danceRot[j];
  9563. int i = j;
  9564. if (!isVR)
  9565. {
  9566. delCount[i] = 20;
  9567. if (goSlot[(int)selectList[i]] != null)
  9568. {
  9569. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9570. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9571. {
  9572. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9573. }
  9574. }
  9575. }
  9576. Maid maid = maidArray[j];
  9577. maid.DelProp(MPN.handitem, true);
  9578. maid.DelProp(MPN.accvag, true);
  9579. maid.DelProp(MPN.accanl, true);
  9580. maid.DelProp(MPN.kousoku_upper, true);
  9581. maid.DelProp(MPN.kousoku_lower, true);
  9582. maid.AllProcPropSeqStart();
  9583. isStop[i] = true;
  9584. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9585. isPoseIti[i] = true;
  9586. poseIti[i] = maidArray[i].transform.position;
  9587. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9588. }
  9589. if (isDanceStart14V)
  9590. {
  9591. maidArray[j].SetPos(dancePos[j]);
  9592. maidArray[j].body0.transform.localRotation = danceRot[j];
  9593. }
  9594. if (isDanceStart15V)
  9595. {
  9596. maidArray[j].SetPos(dancePos[j]);
  9597. maidArray[j].body0.transform.localRotation = danceRot[j];
  9598. }
  9599. }
  9600. }
  9601. isDanceStart1F = false;
  9602. isDanceStart1K = false;
  9603. isDanceStart2F = false;
  9604. isDanceStart3F = false;
  9605. isDanceStart3K = false;
  9606. isDanceStart4F = false;
  9607. isDanceStart4K = false;
  9608. isDanceStart5F = false;
  9609. isDanceStart5K = false;
  9610. isDanceStart6F = false;
  9611. isDanceStart6K = false;
  9612. isDanceStart7F = false;
  9613. isDanceStart7V = false;
  9614. isDanceStart8F = false;
  9615. isDanceStart8V = false;
  9616. isDanceStart8P = false;
  9617. isDanceStart9F = false;
  9618. isDanceStart9K = false;
  9619. isDanceStart10F = false;
  9620. isDanceStart11F = false;
  9621. isDanceStart11V = false;
  9622. isDanceStart12F = false;
  9623. isDanceStart13F = false;
  9624. isDanceStart13K = false;
  9625. isDanceStart14F = false;
  9626. isDanceStart14V = false;
  9627. isDanceStart15F = false;
  9628. isDanceStart15V = false;
  9629. for (int j = 0; j < maidCnt; j++)
  9630. {
  9631. danceFace[j] = 0f;
  9632. }
  9633. danceCheckIndex = 0;
  9634. for (int k = 0; k < danceCheck.Length; k++)
  9635. {
  9636. danceCheck[danceCheckIndex] = 1f;
  9637. }
  9638. isDance = false;
  9639. }
  9640. }
  9641. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9642. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9643. {
  9644. if (getModKeyPressing(modKey.Shift))
  9645. {
  9646. isShift = true;
  9647. }
  9648. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9649. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9650. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9651. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9652. if (!isShift)
  9653. {
  9654. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9655. }
  9656. for (int j = 0; j < maidCnt; j++)
  9657. {
  9658. string text5 = "dance_cm3d2_001_f1.anm";
  9659. switch (j)
  9660. {
  9661. case 1:
  9662. case 3:
  9663. case 5:
  9664. case 7:
  9665. case 9:
  9666. case 11:
  9667. case 13:
  9668. text5 = "dance_cm3d2_001_f2.anm";
  9669. break;
  9670. case 2:
  9671. case 4:
  9672. case 6:
  9673. case 8:
  9674. case 10:
  9675. case 12:
  9676. text5 = "dance_cm3d2_001_f3.anm";
  9677. break;
  9678. }
  9679. if (!isShift)
  9680. {
  9681. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9682. {
  9683. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9684. }
  9685. }
  9686. else
  9687. {
  9688. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9689. {
  9690. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9691. GameUty.FileSystem,
  9692. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9693. false,
  9694. false);
  9695. }
  9696. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9697. text4 = textAsset.text;
  9698. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9699. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9700. && !isDanceStart9K && !isDanceStart13K)
  9701. {
  9702. dancePos[j] = maidArray[j].transform.position;
  9703. danceRot[j] = maidArray[j].transform.localRotation;
  9704. }
  9705. }
  9706. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9707. }
  9708. if (!isShift)
  9709. {
  9710. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9711. sw = new Stopwatch();
  9712. sw.Start();
  9713. }
  9714. else if (getModKeyPressing(modKey.Ctrl))
  9715. {
  9716. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9717. }
  9718. else
  9719. {
  9720. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9721. }
  9722. for (int j = 0; j < maidCnt; j++)
  9723. {
  9724. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9725. Vector3 vector = Vector3.zero;
  9726. switch (j)
  9727. {
  9728. case 3:
  9729. vector.x = 1f;
  9730. break;
  9731. case 4:
  9732. vector.x = -1f;
  9733. break;
  9734. case 5:
  9735. vector.x = 2f;
  9736. break;
  9737. case 6:
  9738. vector.x = -2f;
  9739. break;
  9740. case 7:
  9741. vector.x = 3f;
  9742. break;
  9743. case 8:
  9744. vector.x = -3f;
  9745. break;
  9746. case 9:
  9747. vector.x = 4f;
  9748. break;
  9749. case 10:
  9750. vector.x = -4f;
  9751. break;
  9752. case 11:
  9753. vector.x = 5f;
  9754. break;
  9755. case 12:
  9756. vector.x = -5f;
  9757. break;
  9758. case 13:
  9759. vector.x = 6f;
  9760. break;
  9761. }
  9762. if (!isShift)
  9763. {
  9764. maidArray[j].SetPos(vector);
  9765. }
  9766. isStop[j] = false;
  9767. isLock[j] = false;
  9768. pHandL[j] = 0;
  9769. pHandR[j] = 0;
  9770. muneIKL[j] = false;
  9771. muneIKR[j] = false;
  9772. if (!isVR)
  9773. {
  9774. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9775. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9776. }
  9777. }
  9778. ikBui = 5;
  9779. isDanceStart1F = false;
  9780. isDanceStart2F = false;
  9781. isDanceStart3F = false;
  9782. isDanceStart4F = false;
  9783. isDanceStart5F = false;
  9784. isDanceStart6F = false;
  9785. isDanceStart7F = false;
  9786. isDanceStart8F = false;
  9787. isDanceStart9F = false;
  9788. isDanceStart10F = false;
  9789. isDanceStart11F = false;
  9790. isDanceStart12F = false;
  9791. isDanceStart13F = false;
  9792. isDanceStart14F = false;
  9793. isDanceStart15F = false;
  9794. for (int j = 0; j < maidCnt; j++)
  9795. {
  9796. danceFace[j] = 0f;
  9797. }
  9798. if (isDanceStart7V)
  9799. {
  9800. for (int j = 0; j < maidCnt; j++)
  9801. {
  9802. if (maidArray[j] && maidArray[j].Visible)
  9803. {
  9804. if (isDanceStart7V)
  9805. {
  9806. maidArray[j].SetPos(dancePos[j]);
  9807. maidArray[j].body0.transform.localRotation = danceRot[j];
  9808. }
  9809. }
  9810. }
  9811. isDanceStart7V = false;
  9812. }
  9813. if (isDanceStart8V)
  9814. {
  9815. for (int j = 0; j < maidCnt; j++)
  9816. {
  9817. if (maidArray[j] && maidArray[j].Visible)
  9818. {
  9819. if (isDanceStart8V)
  9820. {
  9821. maidArray[j].SetPos(dancePos[j]);
  9822. maidArray[j].body0.transform.localRotation = danceRot[j];
  9823. }
  9824. }
  9825. }
  9826. isDanceStart8V = false;
  9827. isDanceStart8P = false;
  9828. }
  9829. if (isDanceStart11V)
  9830. {
  9831. for (int j = 0; j < maidCnt; j++)
  9832. {
  9833. if (maidArray[j] && maidArray[j].Visible)
  9834. {
  9835. if (isDanceStart11V)
  9836. {
  9837. maidArray[j].SetPos(dancePos[j]);
  9838. maidArray[j].body0.transform.localRotation = danceRot[j];
  9839. }
  9840. }
  9841. }
  9842. isDanceStart11V = false;
  9843. }
  9844. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9845. || isDanceStart13K)
  9846. {
  9847. for (int j = 0; j < maidCnt; j++)
  9848. {
  9849. if (maidArray[j] && maidArray[j].Visible)
  9850. {
  9851. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9852. || isDanceStart13K)
  9853. {
  9854. maidArray[j].SetPos(dancePos[j]);
  9855. maidArray[j].body0.transform.localRotation = danceRot[j];
  9856. int i = j;
  9857. if (!isVR)
  9858. {
  9859. delCount[i] = 20;
  9860. if (goSlot[(int)selectList[i]] != null)
  9861. {
  9862. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9863. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9864. {
  9865. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9866. }
  9867. }
  9868. }
  9869. Maid maid = maidArray[j];
  9870. maid.DelProp(MPN.handitem, true);
  9871. maid.DelProp(MPN.accvag, true);
  9872. maid.DelProp(MPN.accanl, true);
  9873. maid.DelProp(MPN.kousoku_upper, true);
  9874. maid.DelProp(MPN.kousoku_lower, true);
  9875. maid.AllProcPropSeqStart();
  9876. }
  9877. }
  9878. }
  9879. isDanceStart1K = false;
  9880. isDanceStart3K = false;
  9881. isDanceStart4K = false;
  9882. isDanceStart5K = false;
  9883. isDanceStart6K = false;
  9884. isDanceStart9K = false;
  9885. isDanceStart13K = false;
  9886. }
  9887. if (isDanceStart14V)
  9888. {
  9889. for (int j = 0; j < maidCnt; j++)
  9890. {
  9891. if (maidArray[j] && maidArray[j].Visible)
  9892. {
  9893. if (isDanceStart14V)
  9894. {
  9895. maidArray[j].SetPos(dancePos[j]);
  9896. maidArray[j].body0.transform.localRotation = danceRot[j];
  9897. }
  9898. }
  9899. }
  9900. isDanceStart14V = false;
  9901. }
  9902. if (isDanceStart15V)
  9903. {
  9904. for (int j = 0; j < maidCnt; j++)
  9905. {
  9906. if (maidArray[j] && maidArray[j].Visible)
  9907. {
  9908. if (isDanceStart15V)
  9909. {
  9910. maidArray[j].SetPos(dancePos[j]);
  9911. maidArray[j].body0.transform.localRotation = danceRot[j];
  9912. }
  9913. }
  9914. }
  9915. isDanceStart15V = false;
  9916. }
  9917. if (isShift)
  9918. {
  9919. if (maidArray[1] && maidArray[1].Visible)
  9920. {
  9921. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9922. {
  9923. Vector3 vector = Vector3.zero;
  9924. vector.x = 0.6f;
  9925. maidArray[1].SetPos(vector);
  9926. if (maidArray[2] && maidArray[2].Visible)
  9927. {
  9928. vector.x = -0.6f;
  9929. maidArray[2].SetPos(vector);
  9930. }
  9931. if (maidArray[3] && maidArray[3].Visible)
  9932. {
  9933. vector.x = 1.2f;
  9934. maidArray[3].SetPos(vector);
  9935. }
  9936. if (maidArray[4] && maidArray[4].Visible)
  9937. {
  9938. vector.x = -1.2f;
  9939. maidArray[4].SetPos(vector);
  9940. }
  9941. if (maidArray[5] && maidArray[5].Visible)
  9942. {
  9943. vector.x = 1.8f;
  9944. maidArray[5].SetPos(vector);
  9945. }
  9946. if (maidArray[6] && maidArray[6].Visible)
  9947. {
  9948. vector.x = -1.8f;
  9949. maidArray[6].SetPos(vector);
  9950. }
  9951. if (maidArray[7] && maidArray[7].Visible)
  9952. {
  9953. vector.x = 2.4f;
  9954. maidArray[7].SetPos(vector);
  9955. }
  9956. if (maidArray[8] && maidArray[8].Visible)
  9957. {
  9958. vector.x = -2.4f;
  9959. maidArray[8].SetPos(vector);
  9960. }
  9961. if (maidArray[9] && maidArray[9].Visible)
  9962. {
  9963. vector.x = 3f;
  9964. maidArray[9].SetPos(vector);
  9965. }
  9966. if (maidArray[10] && maidArray[10].Visible)
  9967. {
  9968. vector.x = -3f;
  9969. maidArray[10].SetPos(vector);
  9970. }
  9971. if (maidArray[11] && maidArray[11].Visible)
  9972. {
  9973. vector.x = 3.6f;
  9974. maidArray[11].SetPos(vector);
  9975. }
  9976. if (maidArray[12] && maidArray[12].Visible)
  9977. {
  9978. vector.x = -3.6f;
  9979. maidArray[12].SetPos(vector);
  9980. }
  9981. if (maidArray[13] && maidArray[13].Visible)
  9982. {
  9983. vector.x = 4.2f;
  9984. maidArray[13].SetPos(vector);
  9985. }
  9986. }
  9987. }
  9988. isDanceStart1K = true;
  9989. for (int j = 0; j < maidCnt; j++)
  9990. {
  9991. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9992. maidArray[j].body0.transform.localRotation.y + 90f,
  9993. maidArray[j].body0.transform.localRotation.z));
  9994. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9995. maidArray[j].body0.transform.position.y,
  9996. maidArray[j].body0.transform.position.z + 4f));
  9997. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9998. int i = j;
  9999. Maid maid = maidArray[j];
  10000. if (!isVR)
  10001. {
  10002. delCount[i] = 20;
  10003. if (goSlot[(int)selectList[i]] != null)
  10004. {
  10005. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10006. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10007. {
  10008. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10009. }
  10010. }
  10011. }
  10012. string[] array = new string[2];
  10013. array = text2.Split(new char[] { ',' });
  10014. maid.DelProp(MPN.handitem, true);
  10015. maid.DelProp(MPN.accvag, true);
  10016. maid.DelProp(MPN.accanl, true);
  10017. maid.DelProp(MPN.kousoku_upper, true);
  10018. maid.DelProp(MPN.kousoku_lower, true);
  10019. if (array[0] != "")
  10020. {
  10021. maid.SetProp(array[0], array[1], 0, true, false);
  10022. }
  10023. maid.AllProcPropSeqStart();
  10024. }
  10025. }
  10026. isDance = true;
  10027. isDanceStart1 = true;
  10028. }
  10029. if (isF2)
  10030. {
  10031. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10032. string text4 = textAsset.text;
  10033. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10034. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10035. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10036. for (int j = 0; j < maidCnt; j++)
  10037. {
  10038. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10039. {
  10040. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10041. GameUty.FileSystem,
  10042. "dance_cm3d_001_f1.anm",
  10043. false,
  10044. false);
  10045. }
  10046. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10047. }
  10048. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10049. for (int j = 0; j < maidCnt; j++)
  10050. {
  10051. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10052. isStop[j] = false;
  10053. isLock[j] = false;
  10054. pHandL[j] = 0;
  10055. pHandR[j] = 0;
  10056. muneIKL[j] = false;
  10057. muneIKR[j] = false;
  10058. if (!isVR)
  10059. {
  10060. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10061. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10062. }
  10063. }
  10064. ikBui = 5;
  10065. isDanceStart1F = false;
  10066. isDanceStart2F = false;
  10067. isDanceStart3F = false;
  10068. isDanceStart4F = false;
  10069. isDanceStart5F = false;
  10070. isDanceStart6F = false;
  10071. isDanceStart7F = false;
  10072. isDanceStart8F = false;
  10073. isDanceStart9F = false;
  10074. isDanceStart10F = false;
  10075. isDanceStart11F = false;
  10076. isDanceStart12F = false;
  10077. isDanceStart13F = false;
  10078. isDanceStart14F = false;
  10079. isDanceStart15F = false;
  10080. for (int j = 0; j < maidCnt; j++)
  10081. {
  10082. danceFace[j] = 0f;
  10083. }
  10084. if (isDanceStart7V)
  10085. {
  10086. for (int j = 0; j < maidCnt; j++)
  10087. {
  10088. if (maidArray[j] && maidArray[j].Visible)
  10089. {
  10090. if (isDanceStart7V)
  10091. {
  10092. maidArray[j].SetPos(dancePos[j]);
  10093. maidArray[j].body0.transform.localRotation = danceRot[j];
  10094. }
  10095. }
  10096. }
  10097. isDanceStart7V = false;
  10098. }
  10099. if (isDanceStart8V)
  10100. {
  10101. for (int j = 0; j < maidCnt; j++)
  10102. {
  10103. if (maidArray[j] && maidArray[j].Visible)
  10104. {
  10105. if (isDanceStart8V)
  10106. {
  10107. maidArray[j].SetPos(dancePos[j]);
  10108. maidArray[j].body0.transform.localRotation = danceRot[j];
  10109. }
  10110. }
  10111. }
  10112. isDanceStart8V = false;
  10113. isDanceStart8P = false;
  10114. }
  10115. if (isDanceStart11V)
  10116. {
  10117. for (int j = 0; j < maidCnt; j++)
  10118. {
  10119. if (maidArray[j] && maidArray[j].Visible)
  10120. {
  10121. if (isDanceStart11V)
  10122. {
  10123. maidArray[j].SetPos(dancePos[j]);
  10124. maidArray[j].body0.transform.localRotation = danceRot[j];
  10125. }
  10126. }
  10127. }
  10128. isDanceStart11V = false;
  10129. }
  10130. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10131. || isDanceStart13K)
  10132. {
  10133. for (int j = 0; j < maidCnt; j++)
  10134. {
  10135. if (maidArray[j] && maidArray[j].Visible)
  10136. {
  10137. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10138. || isDanceStart13K)
  10139. {
  10140. maidArray[j].SetPos(dancePos[j]);
  10141. maidArray[j].body0.transform.localRotation = danceRot[j];
  10142. int i = j;
  10143. if (!isVR)
  10144. {
  10145. delCount[i] = 20;
  10146. if (goSlot[(int)selectList[i]] != null)
  10147. {
  10148. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10149. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10150. {
  10151. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10152. }
  10153. }
  10154. }
  10155. Maid maid = maidArray[j];
  10156. maid.DelProp(MPN.handitem, true);
  10157. maid.DelProp(MPN.accvag, true);
  10158. maid.DelProp(MPN.accanl, true);
  10159. maid.DelProp(MPN.kousoku_upper, true);
  10160. maid.DelProp(MPN.kousoku_lower, true);
  10161. maid.AllProcPropSeqStart();
  10162. }
  10163. }
  10164. }
  10165. isDanceStart1K = false;
  10166. isDanceStart3K = false;
  10167. isDanceStart4K = false;
  10168. isDanceStart5K = false;
  10169. isDanceStart6K = false;
  10170. isDanceStart9K = false;
  10171. isDanceStart13K = false;
  10172. }
  10173. if (isDanceStart14V)
  10174. {
  10175. for (int j = 0; j < maidCnt; j++)
  10176. {
  10177. if (maidArray[j] && maidArray[j].Visible)
  10178. {
  10179. if (isDanceStart14V)
  10180. {
  10181. maidArray[j].SetPos(dancePos[j]);
  10182. maidArray[j].body0.transform.localRotation = danceRot[j];
  10183. }
  10184. }
  10185. }
  10186. isDanceStart14V = false;
  10187. }
  10188. if (isDanceStart15V)
  10189. {
  10190. for (int j = 0; j < maidCnt; j++)
  10191. {
  10192. if (maidArray[j] && maidArray[j].Visible)
  10193. {
  10194. if (isDanceStart15V)
  10195. {
  10196. maidArray[j].SetPos(dancePos[j]);
  10197. maidArray[j].body0.transform.localRotation = danceRot[j];
  10198. }
  10199. }
  10200. }
  10201. isDanceStart15V = false;
  10202. }
  10203. if (maidArray[1] && maidArray[1].Visible)
  10204. {
  10205. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10206. {
  10207. Vector3 vector = Vector3.zero;
  10208. vector.x = 0.6f;
  10209. maidArray[1].SetPos(vector);
  10210. if (maidArray[2] && maidArray[2].Visible)
  10211. {
  10212. vector.x = -0.6f;
  10213. maidArray[2].SetPos(vector);
  10214. }
  10215. if (maidArray[3] && maidArray[3].Visible)
  10216. {
  10217. vector.x = 1.2f;
  10218. maidArray[3].SetPos(vector);
  10219. }
  10220. if (maidArray[4] && maidArray[4].Visible)
  10221. {
  10222. vector.x = -1.2f;
  10223. maidArray[4].SetPos(vector);
  10224. }
  10225. if (maidArray[5] && maidArray[5].Visible)
  10226. {
  10227. vector.x = 1.8f;
  10228. maidArray[5].SetPos(vector);
  10229. }
  10230. if (maidArray[6] && maidArray[6].Visible)
  10231. {
  10232. vector.x = -1.8f;
  10233. maidArray[6].SetPos(vector);
  10234. }
  10235. if (maidArray[7] && maidArray[7].Visible)
  10236. {
  10237. vector.x = 2.4f;
  10238. maidArray[7].SetPos(vector);
  10239. }
  10240. if (maidArray[8] && maidArray[8].Visible)
  10241. {
  10242. vector.x = -2.4f;
  10243. maidArray[8].SetPos(vector);
  10244. }
  10245. if (maidArray[9] && maidArray[9].Visible)
  10246. {
  10247. vector.x = 3f;
  10248. maidArray[9].SetPos(vector);
  10249. }
  10250. if (maidArray[10] && maidArray[10].Visible)
  10251. {
  10252. vector.x = -3f;
  10253. maidArray[10].SetPos(vector);
  10254. }
  10255. if (maidArray[11] && maidArray[11].Visible)
  10256. {
  10257. vector.x = 3.6f;
  10258. maidArray[11].SetPos(vector);
  10259. }
  10260. if (maidArray[12] && maidArray[12].Visible)
  10261. {
  10262. vector.x = -3.6f;
  10263. maidArray[12].SetPos(vector);
  10264. }
  10265. if (maidArray[13] && maidArray[13].Visible)
  10266. {
  10267. vector.x = 4.2f;
  10268. maidArray[13].SetPos(vector);
  10269. }
  10270. }
  10271. }
  10272. isDance = true;
  10273. isDanceStart2 = true;
  10274. isF2 = false;
  10275. }
  10276. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10277. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10278. {
  10279. GameMain.Instance.SoundMgr.StopBGM(0f);
  10280. isF2 = true;
  10281. }
  10282. if (isF3)
  10283. {
  10284. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10285. string text4 = textAsset.text;
  10286. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10287. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10288. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10289. for (int j = 0; j < maidCnt; j++)
  10290. {
  10291. if (!isShift)
  10292. {
  10293. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10294. {
  10295. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10296. GameUty.FileSystem,
  10297. "dance_cm3d_002_end_f1.anm",
  10298. false,
  10299. false);
  10300. }
  10301. }
  10302. else
  10303. {
  10304. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10305. {
  10306. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10307. GameUty.FileSystem,
  10308. "dance_cm3d2_kara_001_sl_f1.anm",
  10309. false,
  10310. false);
  10311. }
  10312. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10313. text4 = textAsset.text;
  10314. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10315. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10316. && !isDanceStart9K && !isDanceStart13K)
  10317. {
  10318. dancePos[j] = maidArray[j].transform.position;
  10319. danceRot[j] = maidArray[j].transform.localRotation;
  10320. }
  10321. }
  10322. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10323. }
  10324. if (!isShift)
  10325. {
  10326. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10327. }
  10328. else
  10329. {
  10330. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10331. }
  10332. for (int j = 0; j < maidCnt; j++)
  10333. {
  10334. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10335. isStop[j] = false;
  10336. isLock[j] = false;
  10337. pHandL[j] = 0;
  10338. pHandR[j] = 0;
  10339. muneIKL[j] = false;
  10340. muneIKR[j] = false;
  10341. if (!isVR)
  10342. {
  10343. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10344. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10345. }
  10346. }
  10347. ikBui = 5;
  10348. isDanceStart1F = false;
  10349. isDanceStart2F = false;
  10350. isDanceStart3F = false;
  10351. isDanceStart4F = false;
  10352. isDanceStart5F = false;
  10353. isDanceStart6F = false;
  10354. isDanceStart7F = false;
  10355. isDanceStart8F = false;
  10356. isDanceStart9F = false;
  10357. isDanceStart10F = false;
  10358. isDanceStart11F = false;
  10359. isDanceStart12F = false;
  10360. isDanceStart13F = false;
  10361. isDanceStart14F = false;
  10362. isDanceStart15F = false;
  10363. for (int j = 0; j < maidCnt; j++)
  10364. {
  10365. danceFace[j] = 0f;
  10366. }
  10367. if (isDanceStart7V)
  10368. {
  10369. for (int j = 0; j < maidCnt; j++)
  10370. {
  10371. if (maidArray[j] && maidArray[j].Visible)
  10372. {
  10373. if (isDanceStart7V)
  10374. {
  10375. maidArray[j].SetPos(dancePos[j]);
  10376. maidArray[j].body0.transform.localRotation = danceRot[j];
  10377. }
  10378. }
  10379. }
  10380. isDanceStart7V = false;
  10381. }
  10382. if (isDanceStart8V)
  10383. {
  10384. for (int j = 0; j < maidCnt; j++)
  10385. {
  10386. if (maidArray[j] && maidArray[j].Visible)
  10387. {
  10388. if (isDanceStart8V)
  10389. {
  10390. maidArray[j].SetPos(dancePos[j]);
  10391. maidArray[j].body0.transform.localRotation = danceRot[j];
  10392. }
  10393. }
  10394. }
  10395. isDanceStart8V = false;
  10396. isDanceStart8P = false;
  10397. }
  10398. if (isDanceStart11V)
  10399. {
  10400. for (int j = 0; j < maidCnt; j++)
  10401. {
  10402. if (maidArray[j] && maidArray[j].Visible)
  10403. {
  10404. if (isDanceStart11V)
  10405. {
  10406. maidArray[j].SetPos(dancePos[j]);
  10407. maidArray[j].body0.transform.localRotation = danceRot[j];
  10408. }
  10409. }
  10410. }
  10411. isDanceStart11V = false;
  10412. }
  10413. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10414. || isDanceStart13K)
  10415. {
  10416. for (int j = 0; j < maidCnt; j++)
  10417. {
  10418. if (maidArray[j] && maidArray[j].Visible)
  10419. {
  10420. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10421. || isDanceStart13K)
  10422. {
  10423. maidArray[j].SetPos(dancePos[j]);
  10424. maidArray[j].body0.transform.localRotation = danceRot[j];
  10425. int i = j;
  10426. if (!isVR)
  10427. {
  10428. delCount[i] = 20;
  10429. if (goSlot[(int)selectList[i]] != null)
  10430. {
  10431. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10432. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10433. {
  10434. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10435. }
  10436. }
  10437. }
  10438. Maid maid = maidArray[j];
  10439. maid.DelProp(MPN.handitem, true);
  10440. maid.DelProp(MPN.accvag, true);
  10441. maid.DelProp(MPN.accanl, true);
  10442. maid.DelProp(MPN.kousoku_upper, true);
  10443. maid.DelProp(MPN.kousoku_lower, true);
  10444. maid.AllProcPropSeqStart();
  10445. }
  10446. }
  10447. }
  10448. isDanceStart1K = false;
  10449. isDanceStart3K = false;
  10450. isDanceStart4K = false;
  10451. isDanceStart5K = false;
  10452. isDanceStart6K = false;
  10453. isDanceStart9K = false;
  10454. isDanceStart13K = false;
  10455. }
  10456. if (isDanceStart14V)
  10457. {
  10458. for (int j = 0; j < maidCnt; j++)
  10459. {
  10460. if (maidArray[j] && maidArray[j].Visible)
  10461. {
  10462. if (isDanceStart14V)
  10463. {
  10464. maidArray[j].SetPos(dancePos[j]);
  10465. maidArray[j].body0.transform.localRotation = danceRot[j];
  10466. }
  10467. }
  10468. }
  10469. isDanceStart14V = false;
  10470. }
  10471. if (isDanceStart15V)
  10472. {
  10473. for (int j = 0; j < maidCnt; j++)
  10474. {
  10475. if (maidArray[j] && maidArray[j].Visible)
  10476. {
  10477. if (isDanceStart15V)
  10478. {
  10479. maidArray[j].SetPos(dancePos[j]);
  10480. maidArray[j].body0.transform.localRotation = danceRot[j];
  10481. }
  10482. }
  10483. }
  10484. isDanceStart15V = false;
  10485. }
  10486. if (maidArray[1] && maidArray[1].Visible)
  10487. {
  10488. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10489. {
  10490. Vector3 vector = Vector3.zero;
  10491. vector.x = 0.6f;
  10492. maidArray[1].SetPos(vector);
  10493. if (maidArray[2] && maidArray[2].Visible)
  10494. {
  10495. vector.x = -0.6f;
  10496. maidArray[2].SetPos(vector);
  10497. }
  10498. if (maidArray[3] && maidArray[3].Visible)
  10499. {
  10500. vector.x = 1.2f;
  10501. maidArray[3].SetPos(vector);
  10502. }
  10503. if (maidArray[4] && maidArray[4].Visible)
  10504. {
  10505. vector.x = -1.2f;
  10506. maidArray[4].SetPos(vector);
  10507. }
  10508. if (maidArray[5] && maidArray[5].Visible)
  10509. {
  10510. vector.x = 1.8f;
  10511. maidArray[5].SetPos(vector);
  10512. }
  10513. if (maidArray[6] && maidArray[6].Visible)
  10514. {
  10515. vector.x = -1.8f;
  10516. maidArray[6].SetPos(vector);
  10517. }
  10518. if (maidArray[7] && maidArray[7].Visible)
  10519. {
  10520. vector.x = 2.4f;
  10521. maidArray[7].SetPos(vector);
  10522. }
  10523. if (maidArray[8] && maidArray[8].Visible)
  10524. {
  10525. vector.x = -2.4f;
  10526. maidArray[8].SetPos(vector);
  10527. }
  10528. if (maidArray[9] && maidArray[9].Visible)
  10529. {
  10530. vector.x = 3f;
  10531. maidArray[9].SetPos(vector);
  10532. }
  10533. if (maidArray[10] && maidArray[10].Visible)
  10534. {
  10535. vector.x = -3f;
  10536. maidArray[10].SetPos(vector);
  10537. }
  10538. if (maidArray[11] && maidArray[11].Visible)
  10539. {
  10540. vector.x = 3.6f;
  10541. maidArray[11].SetPos(vector);
  10542. }
  10543. if (maidArray[12] && maidArray[12].Visible)
  10544. {
  10545. vector.x = -3.6f;
  10546. maidArray[12].SetPos(vector);
  10547. }
  10548. if (maidArray[13] && maidArray[13].Visible)
  10549. {
  10550. vector.x = 4.2f;
  10551. maidArray[13].SetPos(vector);
  10552. }
  10553. }
  10554. }
  10555. if (isShift)
  10556. {
  10557. isDanceStart3K = true;
  10558. for (int j = 0; j < maidCnt; j++)
  10559. {
  10560. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10561. maidArray[j].body0.transform.localRotation.y + 90f,
  10562. maidArray[j].body0.transform.localRotation.z));
  10563. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10564. maidArray[j].body0.transform.position.y,
  10565. maidArray[j].body0.transform.position.z + 4f));
  10566. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10567. int i = j;
  10568. Maid maid = maidArray[j];
  10569. if (!isVR)
  10570. {
  10571. delCount[i] = 20;
  10572. if (goSlot[(int)selectList[i]] != null)
  10573. {
  10574. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10575. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10576. {
  10577. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10578. }
  10579. }
  10580. }
  10581. string[] array = new string[2];
  10582. array = text2.Split(new char[] { ',' });
  10583. maid.DelProp(MPN.handitem, true);
  10584. maid.DelProp(MPN.accvag, true);
  10585. maid.DelProp(MPN.accanl, true);
  10586. maid.DelProp(MPN.kousoku_upper, true);
  10587. maid.DelProp(MPN.kousoku_lower, true);
  10588. if (array[0] != "")
  10589. {
  10590. maid.SetProp(array[0], array[1], 0, true, false);
  10591. }
  10592. maid.AllProcPropSeqStart();
  10593. }
  10594. }
  10595. isDance = true;
  10596. isDanceStart3 = true;
  10597. isF3 = false;
  10598. }
  10599. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10600. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10601. {
  10602. GameMain.Instance.SoundMgr.StopBGM(0f);
  10603. isF3 = true;
  10604. if (getModKeyPressing(modKey.Shift))
  10605. {
  10606. isShift = true;
  10607. }
  10608. }
  10609. if (isSF1 || isSF2 || isSF3)
  10610. {
  10611. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10612. string text4 = textAsset.text;
  10613. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10614. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10615. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10616. for (int j = 0; j < maidCnt; j++)
  10617. {
  10618. if (!isShift)
  10619. {
  10620. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10621. {
  10622. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10623. GameUty.FileSystem,
  10624. "dance_cm3d2_002_smt_f.anm",
  10625. false,
  10626. false);
  10627. }
  10628. }
  10629. else
  10630. {
  10631. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10632. {
  10633. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10634. GameUty.FileSystem,
  10635. "dance_cm3d2_kara02_001_smt_f1.anm",
  10636. false,
  10637. false);
  10638. }
  10639. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10640. text4 = textAsset.text;
  10641. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10642. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10643. && !isDanceStart9K && !isDanceStart13K)
  10644. {
  10645. dancePos[j] = maidArray[j].transform.position;
  10646. danceRot[j] = maidArray[j].transform.localRotation;
  10647. }
  10648. }
  10649. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10650. }
  10651. if (!isShift)
  10652. {
  10653. if (isSF1)
  10654. {
  10655. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10656. }
  10657. if (isSF2)
  10658. {
  10659. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10660. }
  10661. if (isSF3)
  10662. {
  10663. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10664. }
  10665. }
  10666. else
  10667. {
  10668. if (isSF1)
  10669. {
  10670. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10671. }
  10672. if (isSF2)
  10673. {
  10674. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10675. }
  10676. if (isSF3)
  10677. {
  10678. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10679. }
  10680. }
  10681. for (int j = 0; j < maidCnt; j++)
  10682. {
  10683. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10684. isStop[j] = false;
  10685. isLock[j] = false;
  10686. pHandL[j] = 0;
  10687. pHandR[j] = 0;
  10688. muneIKL[j] = false;
  10689. muneIKR[j] = false;
  10690. if (!isVR)
  10691. {
  10692. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10693. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10694. }
  10695. }
  10696. ikBui = 5;
  10697. isDanceStart1F = false;
  10698. isDanceStart2F = false;
  10699. isDanceStart3F = false;
  10700. isDanceStart4F = false;
  10701. isDanceStart5F = false;
  10702. isDanceStart6F = false;
  10703. isDanceStart7F = false;
  10704. isDanceStart8F = false;
  10705. isDanceStart9F = false;
  10706. isDanceStart10F = false;
  10707. isDanceStart11F = false;
  10708. isDanceStart12F = false;
  10709. isDanceStart13F = false;
  10710. isDanceStart14F = false;
  10711. isDanceStart15F = false;
  10712. for (int j = 0; j < maidCnt; j++)
  10713. {
  10714. danceFace[j] = 0f;
  10715. }
  10716. if (isDanceStart7V)
  10717. {
  10718. for (int j = 0; j < maidCnt; j++)
  10719. {
  10720. if (maidArray[j] && maidArray[j].Visible)
  10721. {
  10722. if (isDanceStart7V)
  10723. {
  10724. maidArray[j].SetPos(dancePos[j]);
  10725. maidArray[j].body0.transform.localRotation = danceRot[j];
  10726. }
  10727. }
  10728. }
  10729. isDanceStart7V = false;
  10730. }
  10731. if (isDanceStart8V)
  10732. {
  10733. for (int j = 0; j < maidCnt; j++)
  10734. {
  10735. if (maidArray[j] && maidArray[j].Visible)
  10736. {
  10737. if (isDanceStart8V)
  10738. {
  10739. maidArray[j].SetPos(dancePos[j]);
  10740. maidArray[j].body0.transform.localRotation = danceRot[j];
  10741. }
  10742. }
  10743. }
  10744. isDanceStart8V = false;
  10745. isDanceStart8P = false;
  10746. }
  10747. if (isDanceStart11V)
  10748. {
  10749. for (int j = 0; j < maidCnt; j++)
  10750. {
  10751. if (maidArray[j] && maidArray[j].Visible)
  10752. {
  10753. if (isDanceStart11V)
  10754. {
  10755. maidArray[j].SetPos(dancePos[j]);
  10756. maidArray[j].body0.transform.localRotation = danceRot[j];
  10757. }
  10758. }
  10759. }
  10760. isDanceStart11V = false;
  10761. }
  10762. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10763. || isDanceStart13K)
  10764. {
  10765. for (int j = 0; j < maidCnt; j++)
  10766. {
  10767. if (maidArray[j] && maidArray[j].Visible)
  10768. {
  10769. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10770. || isDanceStart13K)
  10771. {
  10772. maidArray[j].SetPos(dancePos[j]);
  10773. maidArray[j].body0.transform.localRotation = danceRot[j];
  10774. int i = j;
  10775. if (!isVR)
  10776. {
  10777. delCount[i] = 20;
  10778. if (goSlot[(int)selectList[i]] != null)
  10779. {
  10780. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10781. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10782. {
  10783. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10784. }
  10785. }
  10786. }
  10787. Maid maid = maidArray[j];
  10788. maid.DelProp(MPN.handitem, true);
  10789. maid.DelProp(MPN.accvag, true);
  10790. maid.DelProp(MPN.accanl, true);
  10791. maid.DelProp(MPN.kousoku_upper, true);
  10792. maid.DelProp(MPN.kousoku_lower, true);
  10793. maid.AllProcPropSeqStart();
  10794. }
  10795. }
  10796. }
  10797. isDanceStart1K = false;
  10798. isDanceStart3K = false;
  10799. isDanceStart4K = false;
  10800. isDanceStart5K = false;
  10801. isDanceStart6K = false;
  10802. isDanceStart9K = false;
  10803. isDanceStart13K = false;
  10804. }
  10805. if (isDanceStart14V)
  10806. {
  10807. for (int j = 0; j < maidCnt; j++)
  10808. {
  10809. if (maidArray[j] && maidArray[j].Visible)
  10810. {
  10811. if (isDanceStart14V)
  10812. {
  10813. maidArray[j].SetPos(dancePos[j]);
  10814. maidArray[j].body0.transform.localRotation = danceRot[j];
  10815. }
  10816. }
  10817. }
  10818. isDanceStart14V = false;
  10819. }
  10820. if (isDanceStart15V)
  10821. {
  10822. for (int j = 0; j < maidCnt; j++)
  10823. {
  10824. if (maidArray[j] && maidArray[j].Visible)
  10825. {
  10826. if (isDanceStart15V)
  10827. {
  10828. maidArray[j].SetPos(dancePos[j]);
  10829. maidArray[j].body0.transform.localRotation = danceRot[j];
  10830. }
  10831. }
  10832. }
  10833. isDanceStart15V = false;
  10834. }
  10835. if (maidArray[1] && maidArray[1].Visible)
  10836. {
  10837. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10838. {
  10839. Vector3 vector = Vector3.zero;
  10840. vector.x = 0.6f;
  10841. maidArray[1].SetPos(vector);
  10842. if (maidArray[2] && maidArray[2].Visible)
  10843. {
  10844. vector.x = -0.6f;
  10845. maidArray[2].SetPos(vector);
  10846. }
  10847. if (maidArray[3] && maidArray[3].Visible)
  10848. {
  10849. vector.x = 1.2f;
  10850. maidArray[3].SetPos(vector);
  10851. }
  10852. if (maidArray[4] && maidArray[4].Visible)
  10853. {
  10854. vector.x = -1.2f;
  10855. maidArray[4].SetPos(vector);
  10856. }
  10857. if (maidArray[5] && maidArray[5].Visible)
  10858. {
  10859. vector.x = 1.8f;
  10860. maidArray[5].SetPos(vector);
  10861. }
  10862. if (maidArray[6] && maidArray[6].Visible)
  10863. {
  10864. vector.x = -1.8f;
  10865. maidArray[6].SetPos(vector);
  10866. }
  10867. if (maidArray[7] && maidArray[7].Visible)
  10868. {
  10869. vector.x = 2.4f;
  10870. maidArray[7].SetPos(vector);
  10871. }
  10872. if (maidArray[8] && maidArray[8].Visible)
  10873. {
  10874. vector.x = -2.4f;
  10875. maidArray[8].SetPos(vector);
  10876. }
  10877. if (maidArray[9] && maidArray[9].Visible)
  10878. {
  10879. vector.x = 3f;
  10880. maidArray[9].SetPos(vector);
  10881. }
  10882. if (maidArray[10] && maidArray[10].Visible)
  10883. {
  10884. vector.x = -3f;
  10885. maidArray[10].SetPos(vector);
  10886. }
  10887. if (maidArray[11] && maidArray[11].Visible)
  10888. {
  10889. vector.x = 3.6f;
  10890. maidArray[11].SetPos(vector);
  10891. }
  10892. if (maidArray[12] && maidArray[12].Visible)
  10893. {
  10894. vector.x = -3.6f;
  10895. maidArray[12].SetPos(vector);
  10896. }
  10897. if (maidArray[13] && maidArray[13].Visible)
  10898. {
  10899. vector.x = 4.2f;
  10900. maidArray[13].SetPos(vector);
  10901. }
  10902. }
  10903. }
  10904. if (isShift)
  10905. {
  10906. isDanceStart4K = true;
  10907. for (int j = 0; j < maidCnt; j++)
  10908. {
  10909. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10910. maidArray[j].body0.transform.localRotation.y + 90f,
  10911. maidArray[j].body0.transform.localRotation.z));
  10912. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10913. maidArray[j].body0.transform.position.y,
  10914. maidArray[j].body0.transform.position.z + 4f));
  10915. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10916. int i = j;
  10917. Maid maid = maidArray[j];
  10918. if (!isVR)
  10919. {
  10920. delCount[i] = 20;
  10921. if (goSlot[(int)selectList[i]] != null)
  10922. {
  10923. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10924. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10925. {
  10926. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10927. }
  10928. }
  10929. }
  10930. string[] array = new string[2];
  10931. array = text2.Split(new char[] { ',' });
  10932. maid.DelProp(MPN.handitem, true);
  10933. maid.DelProp(MPN.accvag, true);
  10934. maid.DelProp(MPN.accanl, true);
  10935. maid.DelProp(MPN.kousoku_upper, true);
  10936. maid.DelProp(MPN.kousoku_lower, true);
  10937. if (array[0] != "")
  10938. {
  10939. maid.SetProp(array[0], array[1], 0, true, false);
  10940. }
  10941. maid.AllProcPropSeqStart();
  10942. }
  10943. }
  10944. isDance = true;
  10945. isDanceStart4 = true;
  10946. isSF1 = false;
  10947. isSF2 = false;
  10948. isSF3 = false;
  10949. }
  10950. if (isHS1 || isHS2 || isHS3)
  10951. {
  10952. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10953. string text4 = textAsset.text;
  10954. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10955. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10956. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10957. for (int j = 0; j < maidCnt; j++)
  10958. {
  10959. if (!isShift)
  10960. {
  10961. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10962. {
  10963. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10964. GameUty.FileSystem,
  10965. "dance_cm3d2_003_hs_f1.anm",
  10966. false,
  10967. false);
  10968. }
  10969. }
  10970. else
  10971. {
  10972. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10973. {
  10974. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10975. GameUty.FileSystem,
  10976. "dance_cm3d2_kara02_003_hs_f1.anm",
  10977. false,
  10978. false);
  10979. }
  10980. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10981. text4 = textAsset.text;
  10982. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10983. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10984. && !isDanceStart9K && !isDanceStart13K)
  10985. {
  10986. dancePos[j] = maidArray[j].transform.position;
  10987. danceRot[j] = maidArray[j].transform.localRotation;
  10988. }
  10989. }
  10990. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10991. }
  10992. if (!isShift)
  10993. {
  10994. if (isHS1)
  10995. {
  10996. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10997. }
  10998. if (isHS2)
  10999. {
  11000. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11001. }
  11002. if (isHS3)
  11003. {
  11004. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11005. }
  11006. }
  11007. else
  11008. {
  11009. if (isHS1)
  11010. {
  11011. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11012. }
  11013. if (isHS2)
  11014. {
  11015. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11016. }
  11017. if (isHS3)
  11018. {
  11019. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11020. }
  11021. }
  11022. for (int j = 0; j < maidCnt; j++)
  11023. {
  11024. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11025. isStop[j] = false;
  11026. isLock[j] = false;
  11027. pHandL[j] = 0;
  11028. pHandR[j] = 0;
  11029. muneIKL[j] = false;
  11030. muneIKR[j] = false;
  11031. if (!isVR)
  11032. {
  11033. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11034. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11035. }
  11036. }
  11037. ikBui = 5;
  11038. isDanceStart1F = false;
  11039. isDanceStart2F = false;
  11040. isDanceStart3F = false;
  11041. isDanceStart4F = false;
  11042. isDanceStart5F = false;
  11043. isDanceStart6F = false;
  11044. isDanceStart7F = false;
  11045. isDanceStart8F = false;
  11046. isDanceStart9F = false;
  11047. isDanceStart10F = false;
  11048. isDanceStart11F = false;
  11049. isDanceStart12F = false;
  11050. isDanceStart13F = false;
  11051. isDanceStart14F = false;
  11052. isDanceStart15F = false;
  11053. for (int j = 0; j < maidCnt; j++)
  11054. {
  11055. danceFace[j] = 0f;
  11056. }
  11057. if (isDanceStart7V)
  11058. {
  11059. for (int j = 0; j < maidCnt; j++)
  11060. {
  11061. if (maidArray[j] && maidArray[j].Visible)
  11062. {
  11063. if (isDanceStart7V)
  11064. {
  11065. maidArray[j].SetPos(dancePos[j]);
  11066. maidArray[j].body0.transform.localRotation = danceRot[j];
  11067. }
  11068. }
  11069. }
  11070. isDanceStart7V = false;
  11071. }
  11072. if (isDanceStart8V)
  11073. {
  11074. for (int j = 0; j < maidCnt; j++)
  11075. {
  11076. if (maidArray[j] && maidArray[j].Visible)
  11077. {
  11078. if (isDanceStart8V)
  11079. {
  11080. maidArray[j].SetPos(dancePos[j]);
  11081. maidArray[j].body0.transform.localRotation = danceRot[j];
  11082. }
  11083. }
  11084. }
  11085. isDanceStart8V = false;
  11086. isDanceStart8P = false;
  11087. }
  11088. if (isDanceStart11V)
  11089. {
  11090. for (int j = 0; j < maidCnt; j++)
  11091. {
  11092. if (maidArray[j] && maidArray[j].Visible)
  11093. {
  11094. if (isDanceStart11V)
  11095. {
  11096. maidArray[j].SetPos(dancePos[j]);
  11097. maidArray[j].body0.transform.localRotation = danceRot[j];
  11098. }
  11099. }
  11100. }
  11101. isDanceStart11V = false;
  11102. }
  11103. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11104. || isDanceStart13K)
  11105. {
  11106. for (int j = 0; j < maidCnt; j++)
  11107. {
  11108. if (maidArray[j] && maidArray[j].Visible)
  11109. {
  11110. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11111. || isDanceStart13K)
  11112. {
  11113. maidArray[j].SetPos(dancePos[j]);
  11114. maidArray[j].body0.transform.localRotation = danceRot[j];
  11115. int i = j;
  11116. if (!isVR)
  11117. {
  11118. delCount[i] = 20;
  11119. if (goSlot[(int)selectList[i]] != null)
  11120. {
  11121. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11122. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11123. {
  11124. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11125. }
  11126. }
  11127. }
  11128. Maid maid = maidArray[j];
  11129. maid.DelProp(MPN.handitem, true);
  11130. maid.DelProp(MPN.accvag, true);
  11131. maid.DelProp(MPN.accanl, true);
  11132. maid.DelProp(MPN.kousoku_upper, true);
  11133. maid.DelProp(MPN.kousoku_lower, true);
  11134. maid.AllProcPropSeqStart();
  11135. }
  11136. }
  11137. }
  11138. isDanceStart1K = false;
  11139. isDanceStart3K = false;
  11140. isDanceStart4K = false;
  11141. isDanceStart5K = false;
  11142. isDanceStart6K = false;
  11143. isDanceStart9K = false;
  11144. isDanceStart13K = false;
  11145. }
  11146. if (isDanceStart14V)
  11147. {
  11148. for (int j = 0; j < maidCnt; j++)
  11149. {
  11150. if (maidArray[j] && maidArray[j].Visible)
  11151. {
  11152. if (isDanceStart14V)
  11153. {
  11154. maidArray[j].SetPos(dancePos[j]);
  11155. maidArray[j].body0.transform.localRotation = danceRot[j];
  11156. }
  11157. }
  11158. }
  11159. isDanceStart14V = false;
  11160. }
  11161. if (isDanceStart15V)
  11162. {
  11163. for (int j = 0; j < maidCnt; j++)
  11164. {
  11165. if (maidArray[j] && maidArray[j].Visible)
  11166. {
  11167. if (isDanceStart15V)
  11168. {
  11169. maidArray[j].SetPos(dancePos[j]);
  11170. maidArray[j].body0.transform.localRotation = danceRot[j];
  11171. }
  11172. }
  11173. }
  11174. isDanceStart15V = false;
  11175. }
  11176. if (maidArray[1] && maidArray[1].Visible)
  11177. {
  11178. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11179. {
  11180. Vector3 vector = Vector3.zero;
  11181. vector.x = 0.6f;
  11182. maidArray[1].SetPos(vector);
  11183. if (maidArray[2] && maidArray[2].Visible)
  11184. {
  11185. vector.x = -0.6f;
  11186. maidArray[2].SetPos(vector);
  11187. }
  11188. if (maidArray[3] && maidArray[3].Visible)
  11189. {
  11190. vector.x = 1.2f;
  11191. maidArray[3].SetPos(vector);
  11192. }
  11193. if (maidArray[4] && maidArray[4].Visible)
  11194. {
  11195. vector.x = -1.2f;
  11196. maidArray[4].SetPos(vector);
  11197. }
  11198. if (maidArray[5] && maidArray[5].Visible)
  11199. {
  11200. vector.x = 1.8f;
  11201. maidArray[5].SetPos(vector);
  11202. }
  11203. if (maidArray[6] && maidArray[6].Visible)
  11204. {
  11205. vector.x = -1.8f;
  11206. maidArray[6].SetPos(vector);
  11207. }
  11208. if (maidArray[7] && maidArray[7].Visible)
  11209. {
  11210. vector.x = 2.4f;
  11211. maidArray[7].SetPos(vector);
  11212. }
  11213. if (maidArray[8] && maidArray[8].Visible)
  11214. {
  11215. vector.x = -2.4f;
  11216. maidArray[8].SetPos(vector);
  11217. }
  11218. if (maidArray[9] && maidArray[9].Visible)
  11219. {
  11220. vector.x = 3f;
  11221. maidArray[9].SetPos(vector);
  11222. }
  11223. if (maidArray[10] && maidArray[10].Visible)
  11224. {
  11225. vector.x = -3f;
  11226. maidArray[10].SetPos(vector);
  11227. }
  11228. if (maidArray[11] && maidArray[11].Visible)
  11229. {
  11230. vector.x = 3.6f;
  11231. maidArray[11].SetPos(vector);
  11232. }
  11233. if (maidArray[12] && maidArray[12].Visible)
  11234. {
  11235. vector.x = -3.6f;
  11236. maidArray[12].SetPos(vector);
  11237. }
  11238. if (maidArray[13] && maidArray[13].Visible)
  11239. {
  11240. vector.x = 4.2f;
  11241. maidArray[13].SetPos(vector);
  11242. }
  11243. }
  11244. }
  11245. if (isShift)
  11246. {
  11247. isDanceStart6K = true;
  11248. for (int j = 0; j < maidCnt; j++)
  11249. {
  11250. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11251. maidArray[j].body0.transform.localRotation.y + 90f,
  11252. maidArray[j].body0.transform.localRotation.z));
  11253. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11254. maidArray[j].body0.transform.position.y,
  11255. maidArray[j].body0.transform.position.z + 4f));
  11256. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11257. int i = j;
  11258. Maid maid = maidArray[j];
  11259. if (!isVR)
  11260. {
  11261. delCount[i] = 20;
  11262. if (goSlot[(int)selectList[i]] != null)
  11263. {
  11264. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11265. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11266. {
  11267. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11268. }
  11269. }
  11270. }
  11271. string[] array = new string[2];
  11272. array = text2.Split(new char[] { ',' });
  11273. maid.DelProp(MPN.handitem, true);
  11274. maid.DelProp(MPN.accvag, true);
  11275. maid.DelProp(MPN.accanl, true);
  11276. maid.DelProp(MPN.kousoku_upper, true);
  11277. maid.DelProp(MPN.kousoku_lower, true);
  11278. if (array[0] != "")
  11279. {
  11280. maid.SetProp(array[0], array[1], 0, true, false);
  11281. }
  11282. maid.AllProcPropSeqStart();
  11283. }
  11284. }
  11285. isDance = true;
  11286. isDanceStart6 = true;
  11287. isHS1 = false;
  11288. isHS2 = false;
  11289. isHS3 = false;
  11290. }
  11291. if (isHS4 || isHS5 || isHS6)
  11292. {
  11293. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11294. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11295. for (int j = 0; j < maidCnt; j++)
  11296. {
  11297. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11298. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11299. switch (j)
  11300. {
  11301. case 1:
  11302. case 3:
  11303. case 5:
  11304. case 7:
  11305. case 9:
  11306. case 11:
  11307. case 13:
  11308. text5 = "dance_cm3d2_003_hs_f2.anm";
  11309. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11310. break;
  11311. }
  11312. if (maidArray[j] && maidArray[j].Visible)
  11313. {
  11314. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11315. {
  11316. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11317. }
  11318. string text4 = textAsset.text;
  11319. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11320. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11321. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11322. }
  11323. }
  11324. if (isHS4)
  11325. {
  11326. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11327. }
  11328. if (isHS5)
  11329. {
  11330. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11331. }
  11332. if (isHS6)
  11333. {
  11334. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11335. }
  11336. ikBui = 5;
  11337. isDanceStart1F = false;
  11338. isDanceStart2F = false;
  11339. isDanceStart3F = false;
  11340. isDanceStart4F = false;
  11341. isDanceStart5F = false;
  11342. isDanceStart6F = false;
  11343. isDanceStart7F = false;
  11344. isDanceStart8F = false;
  11345. isDanceStart9F = false;
  11346. isDanceStart10F = false;
  11347. isDanceStart11F = false;
  11348. isDanceStart12F = false;
  11349. isDanceStart13F = false;
  11350. isDanceStart14F = false;
  11351. isDanceStart15F = false;
  11352. for (int j = 0; j < maidCnt; j++)
  11353. {
  11354. danceFace[j] = 0f;
  11355. }
  11356. if (isDanceStart7V)
  11357. {
  11358. for (int j = 0; j < maidCnt; j++)
  11359. {
  11360. if (maidArray[j] && maidArray[j].Visible)
  11361. {
  11362. if (isDanceStart7V)
  11363. {
  11364. maidArray[j].SetPos(dancePos[j]);
  11365. maidArray[j].body0.transform.localRotation = danceRot[j];
  11366. }
  11367. }
  11368. }
  11369. isDanceStart7V = false;
  11370. }
  11371. if (isDanceStart8V)
  11372. {
  11373. for (int j = 0; j < maidCnt; j++)
  11374. {
  11375. if (maidArray[j] && maidArray[j].Visible)
  11376. {
  11377. if (isDanceStart8V)
  11378. {
  11379. maidArray[j].SetPos(dancePos[j]);
  11380. maidArray[j].body0.transform.localRotation = danceRot[j];
  11381. }
  11382. }
  11383. }
  11384. isDanceStart8V = false;
  11385. isDanceStart8P = false;
  11386. }
  11387. if (isDanceStart11V)
  11388. {
  11389. for (int j = 0; j < maidCnt; j++)
  11390. {
  11391. if (maidArray[j] && maidArray[j].Visible)
  11392. {
  11393. if (isDanceStart11V)
  11394. {
  11395. maidArray[j].SetPos(dancePos[j]);
  11396. maidArray[j].body0.transform.localRotation = danceRot[j];
  11397. }
  11398. }
  11399. }
  11400. isDanceStart11V = false;
  11401. }
  11402. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11403. || isDanceStart13K)
  11404. {
  11405. for (int j = 0; j < maidCnt; j++)
  11406. {
  11407. if (maidArray[j] && maidArray[j].Visible)
  11408. {
  11409. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11410. || isDanceStart13K)
  11411. {
  11412. maidArray[j].SetPos(dancePos[j]);
  11413. maidArray[j].body0.transform.localRotation = danceRot[j];
  11414. int i = j;
  11415. if (!isVR)
  11416. {
  11417. delCount[i] = 20;
  11418. if (goSlot[(int)selectList[i]] != null)
  11419. {
  11420. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11421. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11422. {
  11423. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11424. }
  11425. }
  11426. }
  11427. Maid maid = maidArray[j];
  11428. maid.DelProp(MPN.handitem, true);
  11429. maid.DelProp(MPN.accvag, true);
  11430. maid.DelProp(MPN.accanl, true);
  11431. maid.DelProp(MPN.kousoku_upper, true);
  11432. maid.DelProp(MPN.kousoku_lower, true);
  11433. maid.AllProcPropSeqStart();
  11434. }
  11435. }
  11436. }
  11437. isDanceStart1K = false;
  11438. isDanceStart3K = false;
  11439. isDanceStart4K = false;
  11440. isDanceStart5K = false;
  11441. isDanceStart6K = false;
  11442. isDanceStart9K = false;
  11443. isDanceStart13K = false;
  11444. }
  11445. if (isDanceStart14V)
  11446. {
  11447. for (int j = 0; j < maidCnt; j++)
  11448. {
  11449. if (maidArray[j] && maidArray[j].Visible)
  11450. {
  11451. if (isDanceStart14V)
  11452. {
  11453. maidArray[j].SetPos(dancePos[j]);
  11454. maidArray[j].body0.transform.localRotation = danceRot[j];
  11455. }
  11456. }
  11457. }
  11458. isDanceStart14V = false;
  11459. }
  11460. if (isDanceStart15V)
  11461. {
  11462. for (int j = 0; j < maidCnt; j++)
  11463. {
  11464. if (maidArray[j] && maidArray[j].Visible)
  11465. {
  11466. if (isDanceStart15V)
  11467. {
  11468. maidArray[j].SetPos(dancePos[j]);
  11469. maidArray[j].body0.transform.localRotation = danceRot[j];
  11470. }
  11471. }
  11472. }
  11473. isDanceStart15V = false;
  11474. }
  11475. for (int j = 0; j < maidCnt; j++)
  11476. {
  11477. isStop[j] = false;
  11478. isLock[j] = false;
  11479. pHandL[j] = 0;
  11480. pHandR[j] = 0;
  11481. muneIKL[j] = false;
  11482. muneIKR[j] = false;
  11483. if (!isVR)
  11484. {
  11485. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11486. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11487. }
  11488. if (maidArray[j].transform.position.y != 100f)
  11489. {
  11490. dancePos[j] = maidArray[j].transform.position;
  11491. }
  11492. else
  11493. {
  11494. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11495. }
  11496. danceRot[j] = maidArray[j].transform.localRotation;
  11497. }
  11498. if (maidArray[1] && maidArray[1].Visible)
  11499. {
  11500. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11501. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11502. }
  11503. if (maidArray[3] && maidArray[3].Visible)
  11504. {
  11505. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11506. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11507. }
  11508. if (maidArray[5] && maidArray[5].Visible)
  11509. {
  11510. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11511. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11512. }
  11513. if (maidArray[7] && maidArray[7].Visible)
  11514. {
  11515. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11516. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11517. }
  11518. if (maidArray[9] && maidArray[9].Visible)
  11519. {
  11520. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11521. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11522. }
  11523. if (maidArray[11] && maidArray[11].Visible)
  11524. {
  11525. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11526. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11527. }
  11528. if (maidArray[13] && maidArray[13].Visible)
  11529. {
  11530. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11531. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11532. }
  11533. if (maidArray[2] && maidArray[2].Visible)
  11534. {
  11535. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11536. {
  11537. Vector3 vector = Vector3.zero;
  11538. vector.x = 0.6f;
  11539. maidArray[1].SetPos(vector);
  11540. if (maidArray[2] && maidArray[2].Visible)
  11541. {
  11542. vector.x = -0.6f;
  11543. maidArray[2].SetPos(vector);
  11544. }
  11545. if (maidArray[3] && maidArray[3].Visible)
  11546. {
  11547. vector.x = 1.2f;
  11548. maidArray[3].SetPos(vector);
  11549. }
  11550. if (maidArray[4] && maidArray[4].Visible)
  11551. {
  11552. vector.x = -1.2f;
  11553. maidArray[4].SetPos(vector);
  11554. }
  11555. if (maidArray[5] && maidArray[5].Visible)
  11556. {
  11557. vector.x = 1.8f;
  11558. maidArray[5].SetPos(vector);
  11559. }
  11560. if (maidArray[6] && maidArray[6].Visible)
  11561. {
  11562. vector.x = -1.8f;
  11563. maidArray[6].SetPos(vector);
  11564. }
  11565. if (maidArray[7] && maidArray[7].Visible)
  11566. {
  11567. vector.x = 2.4f;
  11568. maidArray[7].SetPos(vector);
  11569. }
  11570. if (maidArray[8] && maidArray[8].Visible)
  11571. {
  11572. vector.x = -2.4f;
  11573. maidArray[8].SetPos(vector);
  11574. }
  11575. if (maidArray[9] && maidArray[9].Visible)
  11576. {
  11577. vector.x = 3f;
  11578. maidArray[9].SetPos(vector);
  11579. }
  11580. if (maidArray[10] && maidArray[10].Visible)
  11581. {
  11582. vector.x = -3f;
  11583. maidArray[10].SetPos(vector);
  11584. }
  11585. if (maidArray[11] && maidArray[11].Visible)
  11586. {
  11587. vector.x = 3.6f;
  11588. maidArray[11].SetPos(vector);
  11589. }
  11590. if (maidArray[12] && maidArray[12].Visible)
  11591. {
  11592. vector.x = -3.6f;
  11593. maidArray[12].SetPos(vector);
  11594. }
  11595. if (maidArray[13] && maidArray[13].Visible)
  11596. {
  11597. vector.x = 4.2f;
  11598. maidArray[13].SetPos(vector);
  11599. }
  11600. }
  11601. }
  11602. isDance = true;
  11603. isDanceStart7 = true;
  11604. isHS4 = false;
  11605. isHS5 = false;
  11606. isHS6 = false;
  11607. }
  11608. if (isHS7 || isHS8 || isHS9)
  11609. {
  11610. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11611. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11612. for (int j = 0; j < maidCnt; j++)
  11613. {
  11614. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11615. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11616. switch (j)
  11617. {
  11618. case 1:
  11619. case 5:
  11620. case 9:
  11621. case 13:
  11622. text5 = "dance_cm3d2_003_hs_f2.anm";
  11623. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11624. break;
  11625. case 2:
  11626. case 6:
  11627. case 10:
  11628. text5 = "dance_cm3d2_003_hs_f3.anm";
  11629. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11630. break;
  11631. case 3:
  11632. case 7:
  11633. case 11:
  11634. text5 = "dance_cm3d2_003_hs_f4.anm";
  11635. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11636. break;
  11637. }
  11638. if (maidArray[j] && maidArray[j].Visible)
  11639. {
  11640. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11641. {
  11642. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11643. }
  11644. }
  11645. string text4 = textAsset.text;
  11646. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11647. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11648. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11649. }
  11650. if (isHS7)
  11651. {
  11652. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11653. }
  11654. if (isHS8)
  11655. {
  11656. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11657. }
  11658. if (isHS9)
  11659. {
  11660. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11661. }
  11662. ikBui = 5;
  11663. isDanceStart1F = false;
  11664. isDanceStart2F = false;
  11665. isDanceStart3F = false;
  11666. isDanceStart4F = false;
  11667. isDanceStart5F = false;
  11668. isDanceStart6F = false;
  11669. isDanceStart7F = false;
  11670. isDanceStart8F = false;
  11671. isDanceStart9F = false;
  11672. isDanceStart10F = false;
  11673. isDanceStart11F = false;
  11674. isDanceStart12F = false;
  11675. isDanceStart13F = false;
  11676. isDanceStart14F = false;
  11677. isDanceStart15F = false;
  11678. for (int j = 0; j < maidCnt; j++)
  11679. {
  11680. danceFace[j] = 0f;
  11681. }
  11682. if (isDanceStart8V)
  11683. {
  11684. for (int j = 0; j < maidCnt; j++)
  11685. {
  11686. if (maidArray[j] && maidArray[j].Visible)
  11687. {
  11688. if (isDanceStart8V)
  11689. {
  11690. maidArray[j].SetPos(dancePos[j]);
  11691. maidArray[j].body0.transform.localRotation = danceRot[j];
  11692. }
  11693. }
  11694. }
  11695. isDanceStart8V = false;
  11696. isDanceStart8P = false;
  11697. }
  11698. for (int j = 0; j < maidCnt; j++)
  11699. {
  11700. isStop[j] = false;
  11701. isLock[j] = false;
  11702. pHandL[j] = 0;
  11703. pHandR[j] = 0;
  11704. muneIKL[j] = false;
  11705. muneIKR[j] = false;
  11706. if (!isVR)
  11707. {
  11708. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11709. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11710. }
  11711. if (maidArray[j].transform.position.y != 100f)
  11712. {
  11713. dancePos[j] = maidArray[j].transform.position;
  11714. }
  11715. else
  11716. {
  11717. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11718. }
  11719. danceRot[j] = maidArray[j].transform.localRotation;
  11720. }
  11721. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11722. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11723. {
  11724. maidArray[0].SetPos(Vector3.zero);
  11725. maidArray[0].SetRot(Vector3.zero);
  11726. }
  11727. if (maidArray[1] && maidArray[1].Visible)
  11728. {
  11729. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11730. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11731. }
  11732. if (maidArray[2] && maidArray[2].Visible)
  11733. {
  11734. maidArray[2].SetPos(maidArray[0].transform.position);
  11735. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11736. }
  11737. if (maidArray[3] && maidArray[3].Visible)
  11738. {
  11739. maidArray[3].SetPos(maidArray[0].transform.position);
  11740. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11741. }
  11742. if (maidArray[5] && maidArray[5].Visible)
  11743. {
  11744. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11745. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11746. }
  11747. if (maidArray[6] && maidArray[6].Visible)
  11748. {
  11749. maidArray[6].SetPos(maidArray[4].transform.position);
  11750. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11751. }
  11752. if (maidArray[7] && maidArray[7].Visible)
  11753. {
  11754. maidArray[7].SetPos(maidArray[4].transform.position);
  11755. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11756. }
  11757. if (maidArray[9] && maidArray[9].Visible)
  11758. {
  11759. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11760. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11761. }
  11762. if (maidArray[10] && maidArray[10].Visible)
  11763. {
  11764. maidArray[10].SetPos(maidArray[8].transform.position);
  11765. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11766. }
  11767. if (maidArray[11] && maidArray[11].Visible)
  11768. {
  11769. maidArray[11].SetPos(maidArray[8].transform.position);
  11770. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11771. }
  11772. if (maidArray[13] && maidArray[13].Visible)
  11773. {
  11774. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11775. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11776. }
  11777. if (maidArray[4] && maidArray[4].Visible)
  11778. {
  11779. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11780. {
  11781. Vector3 vector = Vector3.zero;
  11782. vector.x = 0.6f;
  11783. maidArray[1].SetPos(vector);
  11784. if (maidArray[2] && maidArray[2].Visible)
  11785. {
  11786. vector.x = -0.6f;
  11787. maidArray[2].SetPos(vector);
  11788. }
  11789. if (maidArray[3] && maidArray[3].Visible)
  11790. {
  11791. vector.x = 1.2f;
  11792. maidArray[3].SetPos(vector);
  11793. }
  11794. if (maidArray[4] && maidArray[4].Visible)
  11795. {
  11796. vector.x = -1.2f;
  11797. maidArray[4].SetPos(vector);
  11798. }
  11799. if (maidArray[5] && maidArray[5].Visible)
  11800. {
  11801. vector.x = 1.8f;
  11802. maidArray[5].SetPos(vector);
  11803. }
  11804. if (maidArray[6] && maidArray[6].Visible)
  11805. {
  11806. vector.x = -1.8f;
  11807. maidArray[6].SetPos(vector);
  11808. }
  11809. if (maidArray[7] && maidArray[7].Visible)
  11810. {
  11811. vector.x = 2.4f;
  11812. maidArray[7].SetPos(vector);
  11813. }
  11814. if (maidArray[8] && maidArray[8].Visible)
  11815. {
  11816. vector.x = -2.4f;
  11817. maidArray[8].SetPos(vector);
  11818. }
  11819. if (maidArray[9] && maidArray[9].Visible)
  11820. {
  11821. vector.x = 3f;
  11822. maidArray[9].SetPos(vector);
  11823. }
  11824. if (maidArray[10] && maidArray[10].Visible)
  11825. {
  11826. vector.x = -3f;
  11827. maidArray[10].SetPos(vector);
  11828. }
  11829. if (maidArray[11] && maidArray[11].Visible)
  11830. {
  11831. vector.x = 3.6f;
  11832. maidArray[11].SetPos(vector);
  11833. }
  11834. if (maidArray[12] && maidArray[12].Visible)
  11835. {
  11836. vector.x = -3.6f;
  11837. maidArray[12].SetPos(vector);
  11838. }
  11839. if (maidArray[13] && maidArray[13].Visible)
  11840. {
  11841. vector.x = 4.2f;
  11842. maidArray[13].SetPos(vector);
  11843. }
  11844. }
  11845. }
  11846. isDance = true;
  11847. isDanceStart8 = true;
  11848. isHS7 = false;
  11849. isHS8 = false;
  11850. isHS9 = false;
  11851. }
  11852. if (isCF1)
  11853. {
  11854. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11855. string text4 = textAsset.text;
  11856. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11857. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11858. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11859. for (int j = 0; j < maidCnt; j++)
  11860. {
  11861. if (!isShift)
  11862. {
  11863. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11864. {
  11865. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11866. GameUty.FileSystem,
  11867. "dance_cm3d_003_sp2_f1.anm",
  11868. false,
  11869. false);
  11870. }
  11871. }
  11872. else
  11873. {
  11874. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11875. {
  11876. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11877. GameUty.FileSystem,
  11878. "dance_cm3d2_kara02_002_rty_f1.anm",
  11879. false,
  11880. false);
  11881. }
  11882. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11883. text4 = textAsset.text;
  11884. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11885. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11886. && !isDanceStart9K && !isDanceStart13K)
  11887. {
  11888. dancePos[j] = maidArray[j].transform.position;
  11889. danceRot[j] = maidArray[j].transform.localRotation;
  11890. }
  11891. }
  11892. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11893. }
  11894. if (!isShift)
  11895. {
  11896. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11897. }
  11898. else
  11899. {
  11900. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11901. }
  11902. for (int j = 0; j < maidCnt; j++)
  11903. {
  11904. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11905. isStop[j] = false;
  11906. isLock[j] = false;
  11907. pHandL[j] = 0;
  11908. pHandR[j] = 0;
  11909. muneIKL[j] = false;
  11910. muneIKR[j] = false;
  11911. if (!isVR)
  11912. {
  11913. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11914. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11915. }
  11916. }
  11917. ikBui = 5;
  11918. isDanceStart1F = false;
  11919. isDanceStart2F = false;
  11920. isDanceStart3F = false;
  11921. isDanceStart4F = false;
  11922. isDanceStart5F = false;
  11923. isDanceStart6F = false;
  11924. isDanceStart7F = false;
  11925. isDanceStart8F = false;
  11926. isDanceStart9F = false;
  11927. isDanceStart10F = false;
  11928. isDanceStart11F = false;
  11929. isDanceStart12F = false;
  11930. isDanceStart13F = false;
  11931. isDanceStart14F = false;
  11932. isDanceStart15F = false;
  11933. for (int j = 0; j < maidCnt; j++)
  11934. {
  11935. danceFace[j] = 0f;
  11936. }
  11937. if (isDanceStart7V)
  11938. {
  11939. for (int j = 0; j < maidCnt; j++)
  11940. {
  11941. if (maidArray[j] && maidArray[j].Visible)
  11942. {
  11943. if (isDanceStart7V)
  11944. {
  11945. maidArray[j].SetPos(dancePos[j]);
  11946. maidArray[j].body0.transform.localRotation = danceRot[j];
  11947. }
  11948. }
  11949. }
  11950. isDanceStart7V = false;
  11951. }
  11952. if (isDanceStart8V)
  11953. {
  11954. for (int j = 0; j < maidCnt; j++)
  11955. {
  11956. if (maidArray[j] && maidArray[j].Visible)
  11957. {
  11958. if (isDanceStart8V)
  11959. {
  11960. maidArray[j].SetPos(dancePos[j]);
  11961. maidArray[j].body0.transform.localRotation = danceRot[j];
  11962. }
  11963. }
  11964. }
  11965. isDanceStart8V = false;
  11966. isDanceStart8P = false;
  11967. }
  11968. if (isDanceStart11V)
  11969. {
  11970. for (int j = 0; j < maidCnt; j++)
  11971. {
  11972. if (maidArray[j] && maidArray[j].Visible)
  11973. {
  11974. if (isDanceStart11V)
  11975. {
  11976. maidArray[j].SetPos(dancePos[j]);
  11977. maidArray[j].body0.transform.localRotation = danceRot[j];
  11978. }
  11979. }
  11980. }
  11981. isDanceStart11V = false;
  11982. }
  11983. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11984. || isDanceStart13K)
  11985. {
  11986. for (int j = 0; j < maidCnt; j++)
  11987. {
  11988. if (maidArray[j] && maidArray[j].Visible)
  11989. {
  11990. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11991. || isDanceStart13K)
  11992. {
  11993. maidArray[j].SetPos(dancePos[j]);
  11994. maidArray[j].body0.transform.localRotation = danceRot[j];
  11995. int i = j;
  11996. if (!isVR)
  11997. {
  11998. delCount[i] = 20;
  11999. if (goSlot[(int)selectList[i]] != null)
  12000. {
  12001. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12002. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12003. {
  12004. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12005. }
  12006. }
  12007. }
  12008. Maid maid = maidArray[j];
  12009. maid.DelProp(MPN.handitem, true);
  12010. maid.DelProp(MPN.accvag, true);
  12011. maid.DelProp(MPN.accanl, true);
  12012. maid.DelProp(MPN.kousoku_upper, true);
  12013. maid.DelProp(MPN.kousoku_lower, true);
  12014. maid.AllProcPropSeqStart();
  12015. }
  12016. }
  12017. }
  12018. isDanceStart1K = false;
  12019. isDanceStart3K = false;
  12020. isDanceStart4K = false;
  12021. isDanceStart5K = false;
  12022. isDanceStart6K = false;
  12023. isDanceStart9K = false;
  12024. isDanceStart13K = false;
  12025. }
  12026. if (isDanceStart14V)
  12027. {
  12028. for (int j = 0; j < maidCnt; j++)
  12029. {
  12030. if (maidArray[j] && maidArray[j].Visible)
  12031. {
  12032. if (isDanceStart14V)
  12033. {
  12034. maidArray[j].SetPos(dancePos[j]);
  12035. maidArray[j].body0.transform.localRotation = danceRot[j];
  12036. }
  12037. }
  12038. }
  12039. isDanceStart14V = false;
  12040. }
  12041. if (isDanceStart15V)
  12042. {
  12043. for (int j = 0; j < maidCnt; j++)
  12044. {
  12045. if (maidArray[j] && maidArray[j].Visible)
  12046. {
  12047. if (isDanceStart15V)
  12048. {
  12049. maidArray[j].SetPos(dancePos[j]);
  12050. maidArray[j].body0.transform.localRotation = danceRot[j];
  12051. }
  12052. }
  12053. }
  12054. isDanceStart15V = false;
  12055. }
  12056. if (maidArray[1] && maidArray[1].Visible)
  12057. {
  12058. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12059. {
  12060. Vector3 vector = Vector3.zero;
  12061. vector.x = 0.6f;
  12062. maidArray[1].SetPos(vector);
  12063. if (maidArray[2] && maidArray[2].Visible)
  12064. {
  12065. vector.x = -0.6f;
  12066. maidArray[2].SetPos(vector);
  12067. }
  12068. if (maidArray[3] && maidArray[3].Visible)
  12069. {
  12070. vector.x = 1.2f;
  12071. maidArray[3].SetPos(vector);
  12072. }
  12073. if (maidArray[4] && maidArray[4].Visible)
  12074. {
  12075. vector.x = -1.2f;
  12076. maidArray[4].SetPos(vector);
  12077. }
  12078. if (maidArray[5] && maidArray[5].Visible)
  12079. {
  12080. vector.x = 1.8f;
  12081. maidArray[5].SetPos(vector);
  12082. }
  12083. if (maidArray[6] && maidArray[6].Visible)
  12084. {
  12085. vector.x = -1.8f;
  12086. maidArray[6].SetPos(vector);
  12087. }
  12088. if (maidArray[7] && maidArray[7].Visible)
  12089. {
  12090. vector.x = 2.4f;
  12091. maidArray[7].SetPos(vector);
  12092. }
  12093. if (maidArray[8] && maidArray[8].Visible)
  12094. {
  12095. vector.x = -2.4f;
  12096. maidArray[8].SetPos(vector);
  12097. }
  12098. if (maidArray[9] && maidArray[9].Visible)
  12099. {
  12100. vector.x = 3f;
  12101. maidArray[9].SetPos(vector);
  12102. }
  12103. if (maidArray[10] && maidArray[10].Visible)
  12104. {
  12105. vector.x = -3f;
  12106. maidArray[10].SetPos(vector);
  12107. }
  12108. if (maidArray[11] && maidArray[11].Visible)
  12109. {
  12110. vector.x = 3.6f;
  12111. maidArray[11].SetPos(vector);
  12112. }
  12113. if (maidArray[12] && maidArray[12].Visible)
  12114. {
  12115. vector.x = -3.6f;
  12116. maidArray[12].SetPos(vector);
  12117. }
  12118. if (maidArray[13] && maidArray[13].Visible)
  12119. {
  12120. vector.x = 4.2f;
  12121. maidArray[13].SetPos(vector);
  12122. }
  12123. }
  12124. }
  12125. if (isShift)
  12126. {
  12127. isDanceStart5K = true;
  12128. for (int j = 0; j < maidCnt; j++)
  12129. {
  12130. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12131. maidArray[j].body0.transform.localRotation.y + 90f,
  12132. maidArray[j].body0.transform.localRotation.z));
  12133. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12134. maidArray[j].body0.transform.position.y,
  12135. maidArray[j].body0.transform.position.z + 4f));
  12136. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12137. int i = j;
  12138. Maid maid = maidArray[j];
  12139. if (!isVR)
  12140. {
  12141. delCount[i] = 20;
  12142. if (goSlot[(int)selectList[i]] != null)
  12143. {
  12144. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12145. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12146. {
  12147. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12148. }
  12149. }
  12150. }
  12151. string[] array = new string[2];
  12152. array = text2.Split(new char[] { ',' });
  12153. maid.DelProp(MPN.handitem, true);
  12154. maid.DelProp(MPN.accvag, true);
  12155. maid.DelProp(MPN.accanl, true);
  12156. maid.DelProp(MPN.kousoku_upper, true);
  12157. maid.DelProp(MPN.kousoku_lower, true);
  12158. if (array[0] != "")
  12159. {
  12160. maid.SetProp(array[0], array[1], 0, true, false);
  12161. }
  12162. maid.AllProcPropSeqStart();
  12163. }
  12164. }
  12165. isDance = true;
  12166. isDanceStart5 = true;
  12167. isCF1 = false;
  12168. }
  12169. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12170. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12171. {
  12172. GameMain.Instance.SoundMgr.StopBGM(0f);
  12173. isCF1 = true;
  12174. if (getModKeyPressing(modKey.Shift))
  12175. {
  12176. isShift = true;
  12177. }
  12178. }
  12179. if (isKT1)
  12180. {
  12181. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12182. string text4 = textAsset.text;
  12183. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12184. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12185. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12186. for (int j = 0; j < maidCnt; j++)
  12187. {
  12188. if (!isShift)
  12189. {
  12190. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12191. {
  12192. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12193. GameUty.FileSystem,
  12194. "dance_cm3d_004_kano_f1.anm",
  12195. false,
  12196. false);
  12197. }
  12198. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12199. }
  12200. else
  12201. {
  12202. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12203. {
  12204. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12205. GameUty.FileSystem,
  12206. "dance_cm3d2_kara_002_cktc_f1.anm",
  12207. false,
  12208. false);
  12209. }
  12210. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12211. text4 = textAsset.text;
  12212. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12213. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12214. && !isDanceStart9K && !isDanceStart13K)
  12215. {
  12216. dancePos[j] = maidArray[j].transform.position;
  12217. danceRot[j] = maidArray[j].transform.localRotation;
  12218. }
  12219. }
  12220. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12221. }
  12222. if (!isShift)
  12223. {
  12224. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12225. }
  12226. else
  12227. {
  12228. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12229. }
  12230. for (int j = 0; j < maidCnt; j++)
  12231. {
  12232. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12233. isStop[j] = false;
  12234. isLock[j] = false;
  12235. pHandL[j] = 0;
  12236. pHandR[j] = 0;
  12237. muneIKL[j] = false;
  12238. muneIKR[j] = false;
  12239. if (!isVR)
  12240. {
  12241. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12242. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12243. }
  12244. }
  12245. ikBui = 5;
  12246. isDanceStart1F = false;
  12247. isDanceStart2F = false;
  12248. isDanceStart3F = false;
  12249. isDanceStart4F = false;
  12250. isDanceStart5F = false;
  12251. isDanceStart6F = false;
  12252. isDanceStart7F = false;
  12253. isDanceStart8F = false;
  12254. isDanceStart9F = false;
  12255. isDanceStart10F = false;
  12256. isDanceStart11F = false;
  12257. isDanceStart12F = false;
  12258. isDanceStart13F = false;
  12259. isDanceStart14F = false;
  12260. isDanceStart15F = false;
  12261. for (int j = 0; j < maidCnt; j++)
  12262. {
  12263. danceFace[j] = 0f;
  12264. }
  12265. if (isDanceStart7V)
  12266. {
  12267. for (int j = 0; j < maidCnt; j++)
  12268. {
  12269. if (maidArray[j] && maidArray[j].Visible)
  12270. {
  12271. if (isDanceStart7V)
  12272. {
  12273. maidArray[j].SetPos(dancePos[j]);
  12274. maidArray[j].body0.transform.localRotation = danceRot[j];
  12275. }
  12276. }
  12277. }
  12278. isDanceStart7V = false;
  12279. }
  12280. if (isDanceStart8V)
  12281. {
  12282. for (int j = 0; j < maidCnt; j++)
  12283. {
  12284. if (maidArray[j] && maidArray[j].Visible)
  12285. {
  12286. if (isDanceStart8V)
  12287. {
  12288. maidArray[j].SetPos(dancePos[j]);
  12289. maidArray[j].body0.transform.localRotation = danceRot[j];
  12290. }
  12291. }
  12292. }
  12293. isDanceStart8V = false;
  12294. isDanceStart8P = false;
  12295. }
  12296. if (isDanceStart11V)
  12297. {
  12298. for (int j = 0; j < maidCnt; j++)
  12299. {
  12300. if (maidArray[j] && maidArray[j].Visible)
  12301. {
  12302. if (isDanceStart11V)
  12303. {
  12304. maidArray[j].SetPos(dancePos[j]);
  12305. maidArray[j].body0.transform.localRotation = danceRot[j];
  12306. }
  12307. }
  12308. }
  12309. isDanceStart11V = false;
  12310. }
  12311. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12312. || isDanceStart13K)
  12313. {
  12314. for (int j = 0; j < maidCnt; j++)
  12315. {
  12316. if (maidArray[j] && maidArray[j].Visible)
  12317. {
  12318. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12319. || isDanceStart13K)
  12320. {
  12321. maidArray[j].SetPos(dancePos[j]);
  12322. maidArray[j].body0.transform.localRotation = danceRot[j];
  12323. int i = j;
  12324. if (!isVR)
  12325. {
  12326. delCount[i] = 20;
  12327. if (goSlot[(int)selectList[i]] != null)
  12328. {
  12329. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12330. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12331. {
  12332. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12333. }
  12334. }
  12335. }
  12336. Maid maid = maidArray[j];
  12337. maid.DelProp(MPN.handitem, true);
  12338. maid.DelProp(MPN.accvag, true);
  12339. maid.DelProp(MPN.accanl, true);
  12340. maid.DelProp(MPN.kousoku_upper, true);
  12341. maid.DelProp(MPN.kousoku_lower, true);
  12342. maid.AllProcPropSeqStart();
  12343. }
  12344. }
  12345. }
  12346. isDanceStart1K = false;
  12347. isDanceStart3K = false;
  12348. isDanceStart4K = false;
  12349. isDanceStart5K = false;
  12350. isDanceStart6K = false;
  12351. isDanceStart9K = false;
  12352. isDanceStart13K = false;
  12353. }
  12354. if (isDanceStart14V)
  12355. {
  12356. for (int j = 0; j < maidCnt; j++)
  12357. {
  12358. if (maidArray[j] && maidArray[j].Visible)
  12359. {
  12360. if (isDanceStart14V)
  12361. {
  12362. maidArray[j].SetPos(dancePos[j]);
  12363. maidArray[j].body0.transform.localRotation = danceRot[j];
  12364. }
  12365. }
  12366. }
  12367. isDanceStart14V = false;
  12368. }
  12369. if (isDanceStart15V)
  12370. {
  12371. for (int j = 0; j < maidCnt; j++)
  12372. {
  12373. if (maidArray[j] && maidArray[j].Visible)
  12374. {
  12375. if (isDanceStart15V)
  12376. {
  12377. maidArray[j].SetPos(dancePos[j]);
  12378. maidArray[j].body0.transform.localRotation = danceRot[j];
  12379. }
  12380. }
  12381. }
  12382. isDanceStart15V = false;
  12383. }
  12384. if (maidArray[1] && maidArray[1].Visible)
  12385. {
  12386. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12387. {
  12388. Vector3 vector = Vector3.zero;
  12389. vector.x = 0.6f;
  12390. maidArray[1].SetPos(vector);
  12391. if (maidArray[2] && maidArray[2].Visible)
  12392. {
  12393. vector.x = -0.6f;
  12394. maidArray[2].SetPos(vector);
  12395. }
  12396. if (maidArray[3] && maidArray[3].Visible)
  12397. {
  12398. vector.x = 1.2f;
  12399. maidArray[3].SetPos(vector);
  12400. }
  12401. if (maidArray[4] && maidArray[4].Visible)
  12402. {
  12403. vector.x = -1.2f;
  12404. maidArray[4].SetPos(vector);
  12405. }
  12406. if (maidArray[5] && maidArray[5].Visible)
  12407. {
  12408. vector.x = 1.8f;
  12409. maidArray[5].SetPos(vector);
  12410. }
  12411. if (maidArray[6] && maidArray[6].Visible)
  12412. {
  12413. vector.x = -1.8f;
  12414. maidArray[6].SetPos(vector);
  12415. }
  12416. if (maidArray[7] && maidArray[7].Visible)
  12417. {
  12418. vector.x = 2.4f;
  12419. maidArray[7].SetPos(vector);
  12420. }
  12421. if (maidArray[8] && maidArray[8].Visible)
  12422. {
  12423. vector.x = -2.4f;
  12424. maidArray[8].SetPos(vector);
  12425. }
  12426. if (maidArray[9] && maidArray[9].Visible)
  12427. {
  12428. vector.x = 3f;
  12429. maidArray[9].SetPos(vector);
  12430. }
  12431. if (maidArray[10] && maidArray[10].Visible)
  12432. {
  12433. vector.x = -3f;
  12434. maidArray[10].SetPos(vector);
  12435. }
  12436. if (maidArray[11] && maidArray[11].Visible)
  12437. {
  12438. vector.x = 3.6f;
  12439. maidArray[11].SetPos(vector);
  12440. }
  12441. if (maidArray[12] && maidArray[12].Visible)
  12442. {
  12443. vector.x = -3.6f;
  12444. maidArray[12].SetPos(vector);
  12445. }
  12446. if (maidArray[13] && maidArray[13].Visible)
  12447. {
  12448. vector.x = 4.2f;
  12449. maidArray[13].SetPos(vector);
  12450. }
  12451. }
  12452. }
  12453. if (maidArray[2] && maidArray[2].Visible)
  12454. {
  12455. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12456. {
  12457. Vector3 vector = Vector3.zero;
  12458. vector.x = 0.6f;
  12459. maidArray[1].SetPos(vector);
  12460. if (maidArray[2] && maidArray[2].Visible)
  12461. {
  12462. vector.x = -0.6f;
  12463. maidArray[2].SetPos(vector);
  12464. }
  12465. if (maidArray[3] && maidArray[3].Visible)
  12466. {
  12467. vector.x = 1.2f;
  12468. maidArray[3].SetPos(vector);
  12469. }
  12470. if (maidArray[4] && maidArray[4].Visible)
  12471. {
  12472. vector.x = -1.2f;
  12473. maidArray[4].SetPos(vector);
  12474. }
  12475. if (maidArray[5] && maidArray[5].Visible)
  12476. {
  12477. vector.x = 1.8f;
  12478. maidArray[5].SetPos(vector);
  12479. }
  12480. if (maidArray[6] && maidArray[6].Visible)
  12481. {
  12482. vector.x = -1.8f;
  12483. maidArray[6].SetPos(vector);
  12484. }
  12485. if (maidArray[7] && maidArray[7].Visible)
  12486. {
  12487. vector.x = 2.4f;
  12488. maidArray[7].SetPos(vector);
  12489. }
  12490. if (maidArray[8] && maidArray[8].Visible)
  12491. {
  12492. vector.x = -2.4f;
  12493. maidArray[8].SetPos(vector);
  12494. }
  12495. if (maidArray[9] && maidArray[9].Visible)
  12496. {
  12497. vector.x = 3f;
  12498. maidArray[9].SetPos(vector);
  12499. }
  12500. if (maidArray[10] && maidArray[10].Visible)
  12501. {
  12502. vector.x = -3f;
  12503. maidArray[10].SetPos(vector);
  12504. }
  12505. if (maidArray[11] && maidArray[11].Visible)
  12506. {
  12507. vector.x = 3.6f;
  12508. maidArray[11].SetPos(vector);
  12509. }
  12510. if (maidArray[12] && maidArray[12].Visible)
  12511. {
  12512. vector.x = -3.6f;
  12513. maidArray[12].SetPos(vector);
  12514. }
  12515. if (maidArray[13] && maidArray[13].Visible)
  12516. {
  12517. vector.x = 4.2f;
  12518. maidArray[13].SetPos(vector);
  12519. }
  12520. }
  12521. }
  12522. if (isShift)
  12523. {
  12524. isDanceStart9K = true;
  12525. for (int j = 0; j < maidCnt; j++)
  12526. {
  12527. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12528. maidArray[j].body0.transform.localRotation.y + 90f,
  12529. maidArray[j].body0.transform.localRotation.z));
  12530. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12531. maidArray[j].body0.transform.position.y,
  12532. maidArray[j].body0.transform.position.z + 4f));
  12533. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12534. int i = j;
  12535. Maid maid = maidArray[j];
  12536. if (!isVR)
  12537. {
  12538. delCount[i] = 20;
  12539. if (goSlot[(int)selectList[i]] != null)
  12540. {
  12541. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12542. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12543. {
  12544. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12545. }
  12546. }
  12547. }
  12548. string[] array = new string[2];
  12549. array = text2.Split(new char[] { ',' });
  12550. maid.DelProp(MPN.handitem, true);
  12551. maid.DelProp(MPN.accvag, true);
  12552. maid.DelProp(MPN.accanl, true);
  12553. maid.DelProp(MPN.kousoku_upper, true);
  12554. maid.DelProp(MPN.kousoku_lower, true);
  12555. if (array[0] != "")
  12556. {
  12557. maid.SetProp(array[0], array[1], 0, true, false);
  12558. }
  12559. maid.AllProcPropSeqStart();
  12560. }
  12561. }
  12562. isDance = true;
  12563. isDanceStart9 = true;
  12564. isKT1 = false;
  12565. }
  12566. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12567. {
  12568. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12569. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12570. if (isSS1)
  12571. {
  12572. nameK = "dance_BlD_m";
  12573. nameA = "dance_cm3d21_002_bid_f";
  12574. nameS = "bloomingdreaming_short";
  12575. danceNo1 = 1;
  12576. danceNo2 = 3;
  12577. danceNo3 = 2;
  12578. }
  12579. if (isSS2)
  12580. {
  12581. nameK = "dance_KAD_m";
  12582. nameA = "dance_cm3d21_003_kad_f";
  12583. nameS = "kiminiaijodelicious_short";
  12584. danceNo1 = 1;
  12585. danceNo2 = 2;
  12586. danceNo3 = 3;
  12587. }
  12588. if (isSS3)
  12589. {
  12590. nameK = "dance_LUM_m";
  12591. nameA = "dance_cm3d21_004_lm_f";
  12592. nameS = "luminousmoment_short";
  12593. danceNo1 = 3;
  12594. danceNo2 = 1;
  12595. danceNo3 = 2;
  12596. }
  12597. if (isSS4)
  12598. {
  12599. nameK = "dance_NmF_m";
  12600. nameA = "dance_cm3d21_001_nmf_f";
  12601. nameS = "nightmagicfire_short";
  12602. danceNo1 = 2;
  12603. danceNo2 = 1;
  12604. danceNo3 = 3;
  12605. }
  12606. if (isSS5)
  12607. {
  12608. nameK = "dance_MoE_m";
  12609. nameA = "dance_cm3d21_005_moe_f";
  12610. nameS = "melodyofempire_short";
  12611. danceNo1 = 1;
  12612. danceNo2 = 3;
  12613. danceNo3 = 2;
  12614. }
  12615. if (isSS6)
  12616. {
  12617. nameK = "dance_NmF_m";
  12618. nameA = "dance_cm3d21_kara_001_nmf_f";
  12619. nameS = "nightmagicfire_short";
  12620. danceNo1 = 1;
  12621. danceNo2 = 1;
  12622. danceNo3 = 1;
  12623. }
  12624. for (int j = 0; j < maidCnt; j++)
  12625. {
  12626. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12627. string text5 = nameA + danceNo1 + ".anm";
  12628. switch (j)
  12629. {
  12630. case 1:
  12631. case 4:
  12632. case 7:
  12633. case 10:
  12634. case 13:
  12635. text5 = nameA + danceNo2 + ".anm";
  12636. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12637. break;
  12638. case 2:
  12639. case 5:
  12640. case 8:
  12641. case 11:
  12642. text5 = nameA + danceNo3 + ".anm";
  12643. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12644. break;
  12645. }
  12646. if (maidArray[j] && maidArray[j].Visible)
  12647. {
  12648. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12649. {
  12650. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12651. }
  12652. string text4 = textAsset.text;
  12653. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12654. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12655. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12656. }
  12657. }
  12658. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12659. ikBui = 5;
  12660. isDanceStart1F = false;
  12661. isDanceStart2F = false;
  12662. isDanceStart3F = false;
  12663. isDanceStart4F = false;
  12664. isDanceStart5F = false;
  12665. isDanceStart6F = false;
  12666. isDanceStart7F = false;
  12667. isDanceStart8F = false;
  12668. isDanceStart9F = false;
  12669. isDanceStart10F = false;
  12670. isDanceStart11F = false;
  12671. isDanceStart12F = false;
  12672. isDanceStart13F = false;
  12673. isDanceStart14F = false;
  12674. isDanceStart15F = false;
  12675. for (int j = 0; j < maidCnt; j++)
  12676. {
  12677. danceFace[j] = 0f;
  12678. }
  12679. if (isDanceStart7V)
  12680. {
  12681. for (int j = 0; j < maidCnt; j++)
  12682. {
  12683. if (maidArray[j] && maidArray[j].Visible)
  12684. {
  12685. if (isDanceStart7V)
  12686. {
  12687. maidArray[j].SetPos(dancePos[j]);
  12688. maidArray[j].body0.transform.localRotation = danceRot[j];
  12689. }
  12690. }
  12691. }
  12692. isDanceStart7V = false;
  12693. }
  12694. if (isDanceStart8V)
  12695. {
  12696. for (int j = 0; j < maidCnt; j++)
  12697. {
  12698. if (maidArray[j] && maidArray[j].Visible)
  12699. {
  12700. if (isDanceStart8V)
  12701. {
  12702. maidArray[j].SetPos(dancePos[j]);
  12703. maidArray[j].body0.transform.localRotation = danceRot[j];
  12704. }
  12705. }
  12706. }
  12707. isDanceStart8V = false;
  12708. isDanceStart8P = false;
  12709. }
  12710. if (isDanceStart11V)
  12711. {
  12712. for (int j = 0; j < maidCnt; j++)
  12713. {
  12714. if (maidArray[j] && maidArray[j].Visible)
  12715. {
  12716. if (isDanceStart11V)
  12717. {
  12718. maidArray[j].SetPos(dancePos[j]);
  12719. maidArray[j].body0.transform.localRotation = danceRot[j];
  12720. }
  12721. }
  12722. }
  12723. isDanceStart11V = false;
  12724. }
  12725. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12726. || isDanceStart13K)
  12727. {
  12728. for (int j = 0; j < maidCnt; j++)
  12729. {
  12730. if (maidArray[j] && maidArray[j].Visible)
  12731. {
  12732. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12733. || isDanceStart13K)
  12734. {
  12735. maidArray[j].SetPos(dancePos[j]);
  12736. maidArray[j].body0.transform.localRotation = danceRot[j];
  12737. int i = j;
  12738. if (!isVR)
  12739. {
  12740. delCount[i] = 20;
  12741. if (goSlot[(int)selectList[i]] != null)
  12742. {
  12743. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12744. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12745. {
  12746. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12747. }
  12748. }
  12749. }
  12750. Maid maid = maidArray[j];
  12751. maid.DelProp(MPN.handitem, true);
  12752. maid.DelProp(MPN.accvag, true);
  12753. maid.DelProp(MPN.accanl, true);
  12754. maid.DelProp(MPN.kousoku_upper, true);
  12755. maid.DelProp(MPN.kousoku_lower, true);
  12756. maid.AllProcPropSeqStart();
  12757. }
  12758. }
  12759. }
  12760. isDanceStart1K = false;
  12761. isDanceStart3K = false;
  12762. isDanceStart4K = false;
  12763. isDanceStart5K = false;
  12764. isDanceStart6K = false;
  12765. isDanceStart9K = false;
  12766. isDanceStart13K = false;
  12767. }
  12768. if (isDanceStart14V)
  12769. {
  12770. for (int j = 0; j < maidCnt; j++)
  12771. {
  12772. if (maidArray[j] && maidArray[j].Visible)
  12773. {
  12774. if (isDanceStart14V)
  12775. {
  12776. maidArray[j].SetPos(dancePos[j]);
  12777. maidArray[j].body0.transform.localRotation = danceRot[j];
  12778. }
  12779. }
  12780. }
  12781. isDanceStart14V = false;
  12782. }
  12783. if (isDanceStart15V)
  12784. {
  12785. for (int j = 0; j < maidCnt; j++)
  12786. {
  12787. if (maidArray[j] && maidArray[j].Visible)
  12788. {
  12789. if (isDanceStart15V)
  12790. {
  12791. maidArray[j].SetPos(dancePos[j]);
  12792. maidArray[j].body0.transform.localRotation = danceRot[j];
  12793. }
  12794. }
  12795. }
  12796. isDanceStart15V = false;
  12797. }
  12798. for (int j = 0; j < maidCnt; j++)
  12799. {
  12800. isStop[j] = false;
  12801. isLock[j] = false;
  12802. pHandL[j] = 0;
  12803. pHandR[j] = 0;
  12804. muneIKL[j] = false;
  12805. muneIKR[j] = false;
  12806. if (!isVR)
  12807. {
  12808. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12809. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12810. }
  12811. if (maidArray[j].transform.position.y != 100f)
  12812. {
  12813. dancePos[j] = maidArray[j].transform.position;
  12814. }
  12815. else
  12816. {
  12817. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12818. }
  12819. danceRot[j] = maidArray[j].transform.localRotation;
  12820. }
  12821. if (maidArray[1] && maidArray[1].Visible)
  12822. {
  12823. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12824. maidArray[0].transform.position.y,
  12825. maidArray[0].transform.position.z));
  12826. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12827. }
  12828. if (maidArray[2] && maidArray[2].Visible)
  12829. {
  12830. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12831. maidArray[0].transform.position.y,
  12832. maidArray[0].transform.position.z));
  12833. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12834. }
  12835. if (maidArray[4] && maidArray[4].Visible)
  12836. {
  12837. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12838. maidArray[3].transform.position.y,
  12839. maidArray[3].transform.position.z));
  12840. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12841. }
  12842. if (maidArray[5] && maidArray[5].Visible)
  12843. {
  12844. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12845. maidArray[3].transform.position.y,
  12846. maidArray[3].transform.position.z));
  12847. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12848. }
  12849. if (maidArray[7] && maidArray[7].Visible)
  12850. {
  12851. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12852. maidArray[6].transform.position.y,
  12853. maidArray[6].transform.position.z));
  12854. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12855. }
  12856. if (maidArray[8] && maidArray[8].Visible)
  12857. {
  12858. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12859. maidArray[6].transform.position.y,
  12860. maidArray[6].transform.position.z));
  12861. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12862. }
  12863. if (maidArray[10] && maidArray[10].Visible)
  12864. {
  12865. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12866. maidArray[9].transform.position.y,
  12867. maidArray[9].transform.position.z));
  12868. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12869. }
  12870. if (maidArray[11] && maidArray[11].Visible)
  12871. {
  12872. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12873. maidArray[9].transform.position.y,
  12874. maidArray[9].transform.position.z));
  12875. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12876. }
  12877. if (maidArray[13] && maidArray[13].Visible)
  12878. {
  12879. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12880. maidArray[12].transform.position.y,
  12881. maidArray[12].transform.position.z));
  12882. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12883. }
  12884. isSS = false;
  12885. isDance = true;
  12886. isDanceStart11 = true;
  12887. }
  12888. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12889. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12890. {
  12891. GameMain.Instance.SoundMgr.StopBGM(0f);
  12892. isSS1 = true;
  12893. isSS2 = false;
  12894. isSS3 = false;
  12895. isSS4 = false;
  12896. isSS5 = false;
  12897. isSS6 = false;
  12898. isSS = true;
  12899. }
  12900. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12901. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12902. {
  12903. GameMain.Instance.SoundMgr.StopBGM(0f);
  12904. isSS1 = false;
  12905. isSS2 = true;
  12906. isSS3 = false;
  12907. isSS4 = false;
  12908. isSS5 = false;
  12909. isSS6 = false;
  12910. isSS = true;
  12911. }
  12912. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12913. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12914. {
  12915. GameMain.Instance.SoundMgr.StopBGM(0f);
  12916. isSS1 = false;
  12917. isSS2 = false;
  12918. isSS3 = true;
  12919. isSS4 = false;
  12920. isSS5 = false;
  12921. isSS6 = false;
  12922. isSS = true;
  12923. }
  12924. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12925. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12926. {
  12927. GameMain.Instance.SoundMgr.StopBGM(0f);
  12928. isSS1 = false;
  12929. isSS2 = false;
  12930. isSS3 = false;
  12931. isSS4 = true;
  12932. isSS5 = false;
  12933. isSS6 = false;
  12934. isSS = true;
  12935. }
  12936. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12937. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12938. {
  12939. GameMain.Instance.SoundMgr.StopBGM(0f);
  12940. isSS1 = false;
  12941. isSS2 = false;
  12942. isSS3 = false;
  12943. isSS4 = false;
  12944. isSS5 = true;
  12945. isSS6 = false;
  12946. isSS = true;
  12947. }
  12948. if (isKHG1 || isKHG2)
  12949. {
  12950. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12951. string text4 = textAsset.text;
  12952. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12953. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12954. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12955. for (int j = 0; j < maidCnt; j++)
  12956. {
  12957. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12958. {
  12959. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12960. GameUty.FileSystem,
  12961. "dance_cm3d2_005_khg_f.anm",
  12962. false,
  12963. false);
  12964. }
  12965. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12966. }
  12967. if (isKHG1)
  12968. {
  12969. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12970. }
  12971. if (isKHG2)
  12972. {
  12973. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12974. }
  12975. for (int j = 0; j < maidCnt; j++)
  12976. {
  12977. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12978. isStop[j] = false;
  12979. isLock[j] = false;
  12980. pHandL[j] = 0;
  12981. pHandR[j] = 0;
  12982. muneIKL[j] = false;
  12983. muneIKR[j] = false;
  12984. if (!isVR)
  12985. {
  12986. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12987. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12988. }
  12989. }
  12990. ikBui = 5;
  12991. isDanceStart1F = false;
  12992. isDanceStart2F = false;
  12993. isDanceStart3F = false;
  12994. isDanceStart4F = false;
  12995. isDanceStart5F = false;
  12996. isDanceStart6F = false;
  12997. isDanceStart7F = false;
  12998. isDanceStart8F = false;
  12999. isDanceStart9F = false;
  13000. isDanceStart10F = false;
  13001. isDanceStart11F = false;
  13002. isDanceStart12F = false;
  13003. isDanceStart13F = false;
  13004. isDanceStart14F = false;
  13005. isDanceStart15F = false;
  13006. for (int j = 0; j < maidCnt; j++)
  13007. {
  13008. danceFace[j] = 0f;
  13009. }
  13010. if (isDanceStart7V)
  13011. {
  13012. for (int j = 0; j < maidCnt; j++)
  13013. {
  13014. if (maidArray[j] && maidArray[j].Visible)
  13015. {
  13016. if (isDanceStart7V)
  13017. {
  13018. maidArray[j].SetPos(dancePos[j]);
  13019. maidArray[j].body0.transform.localRotation = danceRot[j];
  13020. }
  13021. }
  13022. }
  13023. isDanceStart7V = false;
  13024. }
  13025. if (isDanceStart8V)
  13026. {
  13027. for (int j = 0; j < maidCnt; j++)
  13028. {
  13029. if (maidArray[j] && maidArray[j].Visible)
  13030. {
  13031. if (isDanceStart8V)
  13032. {
  13033. maidArray[j].SetPos(dancePos[j]);
  13034. maidArray[j].body0.transform.localRotation = danceRot[j];
  13035. }
  13036. }
  13037. }
  13038. isDanceStart8V = false;
  13039. isDanceStart8P = false;
  13040. }
  13041. if (isDanceStart11V)
  13042. {
  13043. for (int j = 0; j < maidCnt; j++)
  13044. {
  13045. if (maidArray[j] && maidArray[j].Visible)
  13046. {
  13047. if (isDanceStart11V)
  13048. {
  13049. maidArray[j].SetPos(dancePos[j]);
  13050. maidArray[j].body0.transform.localRotation = danceRot[j];
  13051. }
  13052. }
  13053. }
  13054. isDanceStart11V = false;
  13055. }
  13056. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13057. || isDanceStart13K)
  13058. {
  13059. for (int j = 0; j < maidCnt; j++)
  13060. {
  13061. if (maidArray[j] && maidArray[j].Visible)
  13062. {
  13063. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13064. || isDanceStart13K)
  13065. {
  13066. maidArray[j].SetPos(dancePos[j]);
  13067. maidArray[j].body0.transform.localRotation = danceRot[j];
  13068. int i = j;
  13069. if (!isVR)
  13070. {
  13071. delCount[i] = 20;
  13072. if (goSlot[(int)selectList[i]] != null)
  13073. {
  13074. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13075. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13076. {
  13077. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13078. }
  13079. }
  13080. }
  13081. Maid maid = maidArray[j];
  13082. maid.DelProp(MPN.handitem, true);
  13083. maid.DelProp(MPN.accvag, true);
  13084. maid.DelProp(MPN.accanl, true);
  13085. maid.DelProp(MPN.kousoku_upper, true);
  13086. maid.DelProp(MPN.kousoku_lower, true);
  13087. maid.AllProcPropSeqStart();
  13088. }
  13089. }
  13090. }
  13091. isDanceStart1K = false;
  13092. isDanceStart3K = false;
  13093. isDanceStart4K = false;
  13094. isDanceStart5K = false;
  13095. isDanceStart6K = false;
  13096. isDanceStart9K = false;
  13097. isDanceStart13K = false;
  13098. }
  13099. if (isDanceStart14V)
  13100. {
  13101. for (int j = 0; j < maidCnt; j++)
  13102. {
  13103. if (maidArray[j] && maidArray[j].Visible)
  13104. {
  13105. if (isDanceStart14V)
  13106. {
  13107. maidArray[j].SetPos(dancePos[j]);
  13108. maidArray[j].body0.transform.localRotation = danceRot[j];
  13109. }
  13110. }
  13111. }
  13112. isDanceStart14V = false;
  13113. }
  13114. if (isDanceStart15V)
  13115. {
  13116. for (int j = 0; j < maidCnt; j++)
  13117. {
  13118. if (maidArray[j] && maidArray[j].Visible)
  13119. {
  13120. if (isDanceStart15V)
  13121. {
  13122. maidArray[j].SetPos(dancePos[j]);
  13123. maidArray[j].body0.transform.localRotation = danceRot[j];
  13124. }
  13125. }
  13126. }
  13127. isDanceStart15V = false;
  13128. }
  13129. if (maidArray[1] && maidArray[1].Visible)
  13130. {
  13131. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13132. {
  13133. Vector3 vector = Vector3.zero;
  13134. vector.x = 0.6f;
  13135. maidArray[1].SetPos(vector);
  13136. if (maidArray[2] && maidArray[2].Visible)
  13137. {
  13138. vector.x = -0.6f;
  13139. maidArray[2].SetPos(vector);
  13140. }
  13141. if (maidArray[3] && maidArray[3].Visible)
  13142. {
  13143. vector.x = 1.2f;
  13144. maidArray[3].SetPos(vector);
  13145. }
  13146. if (maidArray[4] && maidArray[4].Visible)
  13147. {
  13148. vector.x = -1.2f;
  13149. maidArray[4].SetPos(vector);
  13150. }
  13151. if (maidArray[5] && maidArray[5].Visible)
  13152. {
  13153. vector.x = 1.8f;
  13154. maidArray[5].SetPos(vector);
  13155. }
  13156. if (maidArray[6] && maidArray[6].Visible)
  13157. {
  13158. vector.x = -1.8f;
  13159. maidArray[6].SetPos(vector);
  13160. }
  13161. if (maidArray[7] && maidArray[7].Visible)
  13162. {
  13163. vector.x = 2.4f;
  13164. maidArray[7].SetPos(vector);
  13165. }
  13166. if (maidArray[8] && maidArray[8].Visible)
  13167. {
  13168. vector.x = -2.4f;
  13169. maidArray[8].SetPos(vector);
  13170. }
  13171. if (maidArray[9] && maidArray[9].Visible)
  13172. {
  13173. vector.x = 3f;
  13174. maidArray[9].SetPos(vector);
  13175. }
  13176. if (maidArray[10] && maidArray[10].Visible)
  13177. {
  13178. vector.x = -3f;
  13179. maidArray[10].SetPos(vector);
  13180. }
  13181. if (maidArray[11] && maidArray[11].Visible)
  13182. {
  13183. vector.x = 3.6f;
  13184. maidArray[11].SetPos(vector);
  13185. }
  13186. if (maidArray[12] && maidArray[12].Visible)
  13187. {
  13188. vector.x = -3.6f;
  13189. maidArray[12].SetPos(vector);
  13190. }
  13191. if (maidArray[13] && maidArray[13].Visible)
  13192. {
  13193. vector.x = 4.2f;
  13194. maidArray[13].SetPos(vector);
  13195. }
  13196. }
  13197. }
  13198. isDance = true;
  13199. isDanceStart12 = true;
  13200. isKHG1 = false;
  13201. isKHG2 = false;
  13202. }
  13203. if (isDanceStart13Count > 0)
  13204. {
  13205. isDanceStart13Count++;
  13206. }
  13207. if (isDanceStart13Count == 1)
  13208. {
  13209. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13210. isDanceStart13Count = 0;
  13211. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13212. string text4 = textAsset.text;
  13213. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13214. for (int j = 0; j < maidCnt; j++)
  13215. {
  13216. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13217. }
  13218. }
  13219. if ((isSN1 || isSN2 || isSN3) && isShift)
  13220. {
  13221. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13222. string text4 = textAsset.text;
  13223. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13224. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13225. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13226. for (int j = 0; j < maidCnt; j++)
  13227. {
  13228. if (!isShift)
  13229. {
  13230. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13231. {
  13232. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13233. GameUty.FileSystem,
  13234. "dance_cm3d2_006_ssn_f1.anm",
  13235. false,
  13236. false);
  13237. }
  13238. }
  13239. else
  13240. {
  13241. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13242. {
  13243. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13244. GameUty.FileSystem,
  13245. "dance_cm3d21_kara_001_nmf_f1.anm",
  13246. false,
  13247. false);
  13248. }
  13249. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13250. string text5 = nameA + danceNo1 + ".anm";
  13251. switch (j)
  13252. {
  13253. case 1:
  13254. case 4:
  13255. case 7:
  13256. case 10:
  13257. case 13:
  13258. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13259. break;
  13260. case 2:
  13261. case 5:
  13262. case 8:
  13263. case 11:
  13264. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13265. break;
  13266. }
  13267. text4 = textAsset.text;
  13268. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13269. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13270. && !isDanceStart9K && !isDanceStart13K)
  13271. {
  13272. dancePos[j] = maidArray[j].transform.position;
  13273. danceRot[j] = maidArray[j].transform.localRotation;
  13274. }
  13275. }
  13276. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13277. }
  13278. if (!isShift)
  13279. {
  13280. if (isSN1)
  13281. {
  13282. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13283. }
  13284. if (isSN2)
  13285. {
  13286. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13287. }
  13288. if (isSN3)
  13289. {
  13290. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13291. }
  13292. }
  13293. else
  13294. {
  13295. danceWait = 400;
  13296. isDanceStart13Count++;
  13297. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13298. }
  13299. for (int j = 0; j < maidCnt; j++)
  13300. {
  13301. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13302. isStop[j] = false;
  13303. isLock[j] = false;
  13304. pHandL[j] = 0;
  13305. pHandR[j] = 0;
  13306. muneIKL[j] = false;
  13307. muneIKR[j] = false;
  13308. if (!isVR)
  13309. {
  13310. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13311. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13312. }
  13313. }
  13314. ikBui = 5;
  13315. isDanceStart1F = false;
  13316. isDanceStart2F = false;
  13317. isDanceStart3F = false;
  13318. isDanceStart4F = false;
  13319. isDanceStart5F = false;
  13320. isDanceStart6F = false;
  13321. isDanceStart7F = false;
  13322. isDanceStart8F = false;
  13323. isDanceStart9F = false;
  13324. isDanceStart10F = false;
  13325. isDanceStart11F = false;
  13326. isDanceStart12F = false;
  13327. isDanceStart13F = false;
  13328. isDanceStart14F = false;
  13329. isDanceStart15F = false;
  13330. for (int j = 0; j < maidCnt; j++)
  13331. {
  13332. danceFace[j] = 0f;
  13333. }
  13334. if (isDanceStart7V)
  13335. {
  13336. for (int j = 0; j < maidCnt; j++)
  13337. {
  13338. if (maidArray[j] && maidArray[j].Visible)
  13339. {
  13340. if (isDanceStart7V)
  13341. {
  13342. maidArray[j].SetPos(dancePos[j]);
  13343. maidArray[j].body0.transform.localRotation = danceRot[j];
  13344. }
  13345. }
  13346. }
  13347. isDanceStart7V = false;
  13348. }
  13349. if (isDanceStart8V)
  13350. {
  13351. for (int j = 0; j < maidCnt; j++)
  13352. {
  13353. if (maidArray[j] && maidArray[j].Visible)
  13354. {
  13355. if (isDanceStart8V)
  13356. {
  13357. maidArray[j].SetPos(dancePos[j]);
  13358. maidArray[j].body0.transform.localRotation = danceRot[j];
  13359. }
  13360. }
  13361. }
  13362. isDanceStart8V = false;
  13363. isDanceStart8P = false;
  13364. }
  13365. if (isDanceStart11V)
  13366. {
  13367. for (int j = 0; j < maidCnt; j++)
  13368. {
  13369. if (maidArray[j] && maidArray[j].Visible)
  13370. {
  13371. if (isDanceStart11V)
  13372. {
  13373. maidArray[j].SetPos(dancePos[j]);
  13374. maidArray[j].body0.transform.localRotation = danceRot[j];
  13375. }
  13376. }
  13377. }
  13378. isDanceStart11V = false;
  13379. }
  13380. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13381. || isDanceStart13K)
  13382. {
  13383. for (int j = 0; j < maidCnt; j++)
  13384. {
  13385. if (maidArray[j] && maidArray[j].Visible)
  13386. {
  13387. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13388. || isDanceStart13K)
  13389. {
  13390. maidArray[j].SetPos(dancePos[j]);
  13391. maidArray[j].body0.transform.localRotation = danceRot[j];
  13392. int i = j;
  13393. if (!isVR)
  13394. {
  13395. delCount[i] = 20;
  13396. if (goSlot[(int)selectList[i]] != null)
  13397. {
  13398. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13399. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13400. {
  13401. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13402. }
  13403. }
  13404. }
  13405. Maid maid = maidArray[j];
  13406. maid.DelProp(MPN.handitem, true);
  13407. maid.DelProp(MPN.accvag, true);
  13408. maid.DelProp(MPN.accanl, true);
  13409. maid.DelProp(MPN.kousoku_upper, true);
  13410. maid.DelProp(MPN.kousoku_lower, true);
  13411. maid.AllProcPropSeqStart();
  13412. }
  13413. }
  13414. }
  13415. isDanceStart1K = false;
  13416. isDanceStart3K = false;
  13417. isDanceStart4K = false;
  13418. isDanceStart5K = false;
  13419. isDanceStart6K = false;
  13420. isDanceStart9K = false;
  13421. isDanceStart13K = false;
  13422. }
  13423. if (isDanceStart14V)
  13424. {
  13425. for (int j = 0; j < maidCnt; j++)
  13426. {
  13427. if (maidArray[j] && maidArray[j].Visible)
  13428. {
  13429. if (isDanceStart14V)
  13430. {
  13431. maidArray[j].SetPos(dancePos[j]);
  13432. maidArray[j].body0.transform.localRotation = danceRot[j];
  13433. }
  13434. }
  13435. }
  13436. isDanceStart14V = false;
  13437. }
  13438. if (isDanceStart15V)
  13439. {
  13440. for (int j = 0; j < maidCnt; j++)
  13441. {
  13442. if (maidArray[j] && maidArray[j].Visible)
  13443. {
  13444. if (isDanceStart15V)
  13445. {
  13446. maidArray[j].SetPos(dancePos[j]);
  13447. maidArray[j].body0.transform.localRotation = danceRot[j];
  13448. }
  13449. }
  13450. }
  13451. isDanceStart15V = false;
  13452. }
  13453. if (maidArray[1] && maidArray[1].Visible)
  13454. {
  13455. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13456. {
  13457. Vector3 vector = Vector3.zero;
  13458. vector.x = 0.6f;
  13459. maidArray[1].SetPos(vector);
  13460. if (maidArray[2] && maidArray[2].Visible)
  13461. {
  13462. vector.x = -0.6f;
  13463. maidArray[2].SetPos(vector);
  13464. }
  13465. if (maidArray[3] && maidArray[3].Visible)
  13466. {
  13467. vector.x = 1.2f;
  13468. maidArray[3].SetPos(vector);
  13469. }
  13470. if (maidArray[4] && maidArray[4].Visible)
  13471. {
  13472. vector.x = -1.2f;
  13473. maidArray[4].SetPos(vector);
  13474. }
  13475. if (maidArray[5] && maidArray[5].Visible)
  13476. {
  13477. vector.x = 1.8f;
  13478. maidArray[5].SetPos(vector);
  13479. }
  13480. if (maidArray[6] && maidArray[6].Visible)
  13481. {
  13482. vector.x = -1.8f;
  13483. maidArray[6].SetPos(vector);
  13484. }
  13485. if (maidArray[7] && maidArray[7].Visible)
  13486. {
  13487. vector.x = 2.4f;
  13488. maidArray[7].SetPos(vector);
  13489. }
  13490. if (maidArray[8] && maidArray[8].Visible)
  13491. {
  13492. vector.x = -2.4f;
  13493. maidArray[8].SetPos(vector);
  13494. }
  13495. if (maidArray[9] && maidArray[9].Visible)
  13496. {
  13497. vector.x = 3f;
  13498. maidArray[9].SetPos(vector);
  13499. }
  13500. if (maidArray[10] && maidArray[10].Visible)
  13501. {
  13502. vector.x = -3f;
  13503. maidArray[10].SetPos(vector);
  13504. }
  13505. if (maidArray[11] && maidArray[11].Visible)
  13506. {
  13507. vector.x = 3.6f;
  13508. maidArray[11].SetPos(vector);
  13509. }
  13510. if (maidArray[12] && maidArray[12].Visible)
  13511. {
  13512. vector.x = -3.6f;
  13513. maidArray[12].SetPos(vector);
  13514. }
  13515. if (maidArray[13] && maidArray[13].Visible)
  13516. {
  13517. vector.x = 4.2f;
  13518. maidArray[13].SetPos(vector);
  13519. }
  13520. }
  13521. }
  13522. if (isShift)
  13523. {
  13524. isDanceStart13K = true;
  13525. for (int j = 0; j < maidCnt; j++)
  13526. {
  13527. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13528. maidArray[j].body0.transform.localRotation.y + 90f,
  13529. maidArray[j].body0.transform.localRotation.z));
  13530. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13531. maidArray[j].body0.transform.position.y,
  13532. maidArray[j].body0.transform.position.z + 4f));
  13533. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13534. int i = j;
  13535. Maid maid = maidArray[j];
  13536. if (!isVR)
  13537. {
  13538. delCount[i] = 20;
  13539. if (goSlot[(int)selectList[i]] != null)
  13540. {
  13541. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13542. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13543. {
  13544. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13545. }
  13546. }
  13547. }
  13548. string[] array = new string[2];
  13549. array = text2.Split(new char[] { ',' });
  13550. maid.DelProp(MPN.handitem, true);
  13551. maid.DelProp(MPN.accvag, true);
  13552. maid.DelProp(MPN.accanl, true);
  13553. maid.DelProp(MPN.kousoku_upper, true);
  13554. maid.DelProp(MPN.kousoku_lower, true);
  13555. if (array[0] != "")
  13556. {
  13557. maid.SetProp(array[0], array[1], 0, true, false);
  13558. }
  13559. maid.AllProcPropSeqStart();
  13560. }
  13561. }
  13562. isDance = true;
  13563. isDanceStart13 = true;
  13564. isSN1 = false;
  13565. isSN2 = false;
  13566. isSN3 = false;
  13567. }
  13568. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13569. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13570. {
  13571. GameMain.Instance.SoundMgr.StopBGM(0f);
  13572. isSN1 = true;
  13573. hFlg = true;
  13574. if (getModKeyPressing(modKey.Shift))
  13575. {
  13576. isShift = true;
  13577. }
  13578. }
  13579. if (isSN4 || isSN5 || isSN6)
  13580. {
  13581. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13582. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13583. for (int j = 0; j < maidCnt; j++)
  13584. {
  13585. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13586. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13587. switch (j)
  13588. {
  13589. case 1:
  13590. case 4:
  13591. case 7:
  13592. case 10:
  13593. case 13:
  13594. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13595. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13596. break;
  13597. case 2:
  13598. case 5:
  13599. case 8:
  13600. case 11:
  13601. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13602. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13603. break;
  13604. }
  13605. if (maidArray[j] && maidArray[j].Visible)
  13606. {
  13607. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13608. {
  13609. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13610. }
  13611. string text4 = textAsset.text;
  13612. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13613. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13614. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13615. }
  13616. }
  13617. if (isSN4)
  13618. {
  13619. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13620. }
  13621. if (isSN5)
  13622. {
  13623. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13624. }
  13625. if (isSN6)
  13626. {
  13627. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13628. }
  13629. ikBui = 5;
  13630. isDanceStart1F = false;
  13631. isDanceStart2F = false;
  13632. isDanceStart3F = false;
  13633. isDanceStart4F = false;
  13634. isDanceStart5F = false;
  13635. isDanceStart6F = false;
  13636. isDanceStart7F = false;
  13637. isDanceStart8F = false;
  13638. isDanceStart9F = false;
  13639. isDanceStart10F = false;
  13640. isDanceStart11F = false;
  13641. isDanceStart12F = false;
  13642. isDanceStart13F = false;
  13643. isDanceStart14F = false;
  13644. isDanceStart15F = false;
  13645. for (int j = 0; j < maidCnt; j++)
  13646. {
  13647. danceFace[j] = 0f;
  13648. }
  13649. if (isDanceStart7V)
  13650. {
  13651. for (int j = 0; j < maidCnt; j++)
  13652. {
  13653. if (maidArray[j] && maidArray[j].Visible)
  13654. {
  13655. if (isDanceStart7V)
  13656. {
  13657. maidArray[j].SetPos(dancePos[j]);
  13658. maidArray[j].body0.transform.localRotation = danceRot[j];
  13659. }
  13660. }
  13661. }
  13662. isDanceStart7V = false;
  13663. }
  13664. if (isDanceStart8V)
  13665. {
  13666. for (int j = 0; j < maidCnt; j++)
  13667. {
  13668. if (maidArray[j] && maidArray[j].Visible)
  13669. {
  13670. if (isDanceStart8V)
  13671. {
  13672. maidArray[j].SetPos(dancePos[j]);
  13673. maidArray[j].body0.transform.localRotation = danceRot[j];
  13674. }
  13675. }
  13676. }
  13677. isDanceStart8V = false;
  13678. isDanceStart8P = false;
  13679. }
  13680. if (isDanceStart11V)
  13681. {
  13682. for (int j = 0; j < maidCnt; j++)
  13683. {
  13684. if (maidArray[j] && maidArray[j].Visible)
  13685. {
  13686. if (isDanceStart11V)
  13687. {
  13688. maidArray[j].SetPos(dancePos[j]);
  13689. maidArray[j].body0.transform.localRotation = danceRot[j];
  13690. }
  13691. }
  13692. }
  13693. isDanceStart11V = false;
  13694. }
  13695. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13696. || isDanceStart13K)
  13697. {
  13698. for (int j = 0; j < maidCnt; j++)
  13699. {
  13700. if (maidArray[j] && maidArray[j].Visible)
  13701. {
  13702. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13703. || isDanceStart13K)
  13704. {
  13705. maidArray[j].SetPos(dancePos[j]);
  13706. maidArray[j].body0.transform.localRotation = danceRot[j];
  13707. int i = j;
  13708. if (!isVR)
  13709. {
  13710. delCount[i] = 20;
  13711. if (goSlot[(int)selectList[i]] != null)
  13712. {
  13713. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13714. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13715. {
  13716. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13717. }
  13718. }
  13719. }
  13720. Maid maid = maidArray[j];
  13721. maid.DelProp(MPN.handitem, true);
  13722. maid.DelProp(MPN.accvag, true);
  13723. maid.DelProp(MPN.accanl, true);
  13724. maid.DelProp(MPN.kousoku_upper, true);
  13725. maid.DelProp(MPN.kousoku_lower, true);
  13726. maid.AllProcPropSeqStart();
  13727. }
  13728. }
  13729. }
  13730. isDanceStart1K = false;
  13731. isDanceStart3K = false;
  13732. isDanceStart4K = false;
  13733. isDanceStart5K = false;
  13734. isDanceStart6K = false;
  13735. isDanceStart9K = false;
  13736. isDanceStart13K = false;
  13737. }
  13738. if (isDanceStart14V)
  13739. {
  13740. for (int j = 0; j < maidCnt; j++)
  13741. {
  13742. if (maidArray[j] && maidArray[j].Visible)
  13743. {
  13744. if (isDanceStart14V)
  13745. {
  13746. maidArray[j].SetPos(dancePos[j]);
  13747. maidArray[j].body0.transform.localRotation = danceRot[j];
  13748. }
  13749. }
  13750. }
  13751. isDanceStart14V = false;
  13752. }
  13753. if (isDanceStart15V)
  13754. {
  13755. for (int j = 0; j < maidCnt; j++)
  13756. {
  13757. if (maidArray[j] && maidArray[j].Visible)
  13758. {
  13759. if (isDanceStart15V)
  13760. {
  13761. maidArray[j].SetPos(dancePos[j]);
  13762. maidArray[j].body0.transform.localRotation = danceRot[j];
  13763. }
  13764. }
  13765. }
  13766. isDanceStart15V = false;
  13767. }
  13768. for (int j = 0; j < maidCnt; j++)
  13769. {
  13770. isStop[j] = false;
  13771. isLock[j] = false;
  13772. pHandL[j] = 0;
  13773. pHandR[j] = 0;
  13774. muneIKL[j] = false;
  13775. muneIKR[j] = false;
  13776. if (!isVR)
  13777. {
  13778. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13779. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13780. }
  13781. if (maidArray[j].transform.position.y != 100f)
  13782. {
  13783. dancePos[j] = maidArray[j].transform.position;
  13784. }
  13785. else
  13786. {
  13787. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13788. }
  13789. danceRot[j] = maidArray[j].transform.localRotation;
  13790. }
  13791. if (maidArray[1] && maidArray[1].Visible)
  13792. {
  13793. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13794. maidArray[0].transform.position.y,
  13795. maidArray[0].transform.position.z));
  13796. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13797. }
  13798. if (maidArray[2] && maidArray[2].Visible)
  13799. {
  13800. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13801. maidArray[0].transform.position.y,
  13802. maidArray[0].transform.position.z));
  13803. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13804. }
  13805. if (maidArray[4] && maidArray[4].Visible)
  13806. {
  13807. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13808. maidArray[3].transform.position.y,
  13809. maidArray[3].transform.position.z));
  13810. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13811. }
  13812. if (maidArray[5] && maidArray[5].Visible)
  13813. {
  13814. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13815. maidArray[3].transform.position.y,
  13816. maidArray[3].transform.position.z));
  13817. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13818. }
  13819. if (maidArray[7] && maidArray[7].Visible)
  13820. {
  13821. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13822. maidArray[6].transform.position.y,
  13823. maidArray[6].transform.position.z));
  13824. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13825. }
  13826. if (maidArray[8] && maidArray[8].Visible)
  13827. {
  13828. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13829. maidArray[6].transform.position.y,
  13830. maidArray[6].transform.position.z));
  13831. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13832. }
  13833. if (maidArray[10] && maidArray[10].Visible)
  13834. {
  13835. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13836. maidArray[9].transform.position.y,
  13837. maidArray[9].transform.position.z));
  13838. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13839. }
  13840. if (maidArray[11] && maidArray[11].Visible)
  13841. {
  13842. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13843. maidArray[9].transform.position.y,
  13844. maidArray[9].transform.position.z));
  13845. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13846. }
  13847. if (maidArray[13] && maidArray[13].Visible)
  13848. {
  13849. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13850. maidArray[12].transform.position.y,
  13851. maidArray[12].transform.position.z));
  13852. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13853. }
  13854. isDance = true;
  13855. isDanceStart14 = true;
  13856. isSN4 = false;
  13857. isSN5 = false;
  13858. isSN6 = false;
  13859. }
  13860. if (isSD1)
  13861. {
  13862. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13863. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13864. for (int j = 0; j < maidCnt; j++)
  13865. {
  13866. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13867. string text5 = "dance_cmo_002_sd_f1.anm";
  13868. switch (j)
  13869. {
  13870. case 1:
  13871. case 3:
  13872. case 5:
  13873. case 7:
  13874. case 9:
  13875. case 11:
  13876. case 13:
  13877. text5 = "dance_cmo_002_sd_f2.anm";
  13878. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13879. break;
  13880. }
  13881. danceName[j] = text5;
  13882. if (maidArray[j] && maidArray[j].Visible)
  13883. {
  13884. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13885. {
  13886. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13887. }
  13888. string text4 = textAsset.text;
  13889. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13890. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13891. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13892. }
  13893. }
  13894. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13895. ikBui = 5;
  13896. isDanceStart1F = false;
  13897. isDanceStart2F = false;
  13898. isDanceStart3F = false;
  13899. isDanceStart4F = false;
  13900. isDanceStart5F = false;
  13901. isDanceStart6F = false;
  13902. isDanceStart7F = false;
  13903. isDanceStart8F = false;
  13904. isDanceStart9F = false;
  13905. isDanceStart10F = false;
  13906. isDanceStart11F = false;
  13907. isDanceStart12F = false;
  13908. isDanceStart13F = false;
  13909. isDanceStart14F = false;
  13910. isDanceStart15F = false;
  13911. for (int j = 0; j < maidCnt; j++)
  13912. {
  13913. danceFace[j] = 0f;
  13914. }
  13915. if (isDanceStart7V)
  13916. {
  13917. for (int j = 0; j < maidCnt; j++)
  13918. {
  13919. if (maidArray[j] && maidArray[j].Visible)
  13920. {
  13921. if (isDanceStart7V)
  13922. {
  13923. maidArray[j].SetPos(dancePos[j]);
  13924. maidArray[j].body0.transform.localRotation = danceRot[j];
  13925. }
  13926. }
  13927. }
  13928. isDanceStart7V = false;
  13929. }
  13930. if (isDanceStart8V)
  13931. {
  13932. for (int j = 0; j < maidCnt; j++)
  13933. {
  13934. if (maidArray[j] && maidArray[j].Visible)
  13935. {
  13936. if (isDanceStart8V)
  13937. {
  13938. maidArray[j].SetPos(dancePos[j]);
  13939. maidArray[j].body0.transform.localRotation = danceRot[j];
  13940. }
  13941. }
  13942. }
  13943. isDanceStart8V = false;
  13944. isDanceStart8P = false;
  13945. }
  13946. if (isDanceStart11V)
  13947. {
  13948. for (int j = 0; j < maidCnt; j++)
  13949. {
  13950. if (maidArray[j] && maidArray[j].Visible)
  13951. {
  13952. if (isDanceStart11V)
  13953. {
  13954. maidArray[j].SetPos(dancePos[j]);
  13955. maidArray[j].body0.transform.localRotation = danceRot[j];
  13956. }
  13957. }
  13958. }
  13959. isDanceStart11V = false;
  13960. }
  13961. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13962. || isDanceStart13K)
  13963. {
  13964. for (int j = 0; j < maidCnt; j++)
  13965. {
  13966. if (maidArray[j] && maidArray[j].Visible)
  13967. {
  13968. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13969. || isDanceStart13K)
  13970. {
  13971. maidArray[j].SetPos(dancePos[j]);
  13972. maidArray[j].body0.transform.localRotation = danceRot[j];
  13973. int i = j;
  13974. if (!isVR)
  13975. {
  13976. delCount[i] = 20;
  13977. if (goSlot[(int)selectList[i]] != null)
  13978. {
  13979. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13980. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13981. {
  13982. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13983. }
  13984. }
  13985. }
  13986. Maid maid = maidArray[j];
  13987. maid.DelProp(MPN.handitem, true);
  13988. maid.DelProp(MPN.accvag, true);
  13989. maid.DelProp(MPN.accanl, true);
  13990. maid.DelProp(MPN.kousoku_upper, true);
  13991. maid.DelProp(MPN.kousoku_lower, true);
  13992. maid.AllProcPropSeqStart();
  13993. }
  13994. }
  13995. }
  13996. isDanceStart1K = false;
  13997. isDanceStart3K = false;
  13998. isDanceStart4K = false;
  13999. isDanceStart5K = false;
  14000. isDanceStart6K = false;
  14001. isDanceStart9K = false;
  14002. isDanceStart13K = false;
  14003. }
  14004. if (isDanceStart14V)
  14005. {
  14006. for (int j = 0; j < maidCnt; j++)
  14007. {
  14008. if (maidArray[j] && maidArray[j].Visible)
  14009. {
  14010. if (isDanceStart14V)
  14011. {
  14012. maidArray[j].SetPos(dancePos[j]);
  14013. maidArray[j].body0.transform.localRotation = danceRot[j];
  14014. }
  14015. }
  14016. }
  14017. isDanceStart14V = false;
  14018. }
  14019. if (isDanceStart15V)
  14020. {
  14021. for (int j = 0; j < maidCnt; j++)
  14022. {
  14023. if (maidArray[j] && maidArray[j].Visible)
  14024. {
  14025. if (isDanceStart15V)
  14026. {
  14027. maidArray[j].SetPos(dancePos[j]);
  14028. maidArray[j].body0.transform.localRotation = danceRot[j];
  14029. }
  14030. }
  14031. }
  14032. isDanceStart15V = false;
  14033. }
  14034. for (int j = 0; j < maidCnt; j++)
  14035. {
  14036. isStop[j] = false;
  14037. isLock[j] = false;
  14038. pHandL[j] = 0;
  14039. pHandR[j] = 0;
  14040. muneIKL[j] = false;
  14041. muneIKR[j] = false;
  14042. if (!isVR)
  14043. {
  14044. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14045. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14046. }
  14047. if (maidArray[j].transform.position.y != 100f)
  14048. {
  14049. dancePos[j] = maidArray[j].transform.position;
  14050. }
  14051. else
  14052. {
  14053. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14054. }
  14055. danceRot[j] = maidArray[j].transform.localRotation;
  14056. }
  14057. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14058. {
  14059. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14060. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14061. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14062. maidArray[0].body0.transform.localRotation =
  14063. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14064. }
  14065. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14066. {
  14067. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14068. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14069. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14070. maidArray[2].body0.transform.localRotation =
  14071. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14072. }
  14073. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14074. {
  14075. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14076. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14077. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14078. maidArray[4].body0.transform.localRotation =
  14079. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14080. }
  14081. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14082. {
  14083. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14084. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14085. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14086. maidArray[6].body0.transform.localRotation =
  14087. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14088. }
  14089. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14090. {
  14091. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14092. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14093. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14094. maidArray[8].body0.transform.localRotation =
  14095. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14096. }
  14097. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14098. {
  14099. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14100. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14101. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14102. maidArray[10].body0.transform.localRotation =
  14103. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14104. }
  14105. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14106. {
  14107. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14108. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14109. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14110. maidArray[12].body0.transform.localRotation =
  14111. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14112. }
  14113. if (maidArray[1] && maidArray[1].Visible)
  14114. {
  14115. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14116. maidArray[0].transform.position.y,
  14117. maidArray[0].transform.position.z));
  14118. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14119. }
  14120. if (maidArray[3] && maidArray[3].Visible)
  14121. {
  14122. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14123. maidArray[2].transform.position.y,
  14124. maidArray[2].transform.position.z));
  14125. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14126. }
  14127. if (maidArray[5] && maidArray[5].Visible)
  14128. {
  14129. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14130. maidArray[4].transform.position.y,
  14131. maidArray[4].transform.position.z));
  14132. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14133. }
  14134. if (maidArray[7] && maidArray[7].Visible)
  14135. {
  14136. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14137. maidArray[6].transform.position.y,
  14138. maidArray[6].transform.position.z));
  14139. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14140. }
  14141. if (maidArray[9] && maidArray[9].Visible)
  14142. {
  14143. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14144. maidArray[8].transform.position.y,
  14145. maidArray[8].transform.position.z));
  14146. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14147. }
  14148. if (maidArray[11] && maidArray[11].Visible)
  14149. {
  14150. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14151. maidArray[10].transform.position.y,
  14152. maidArray[10].transform.position.z));
  14153. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14154. }
  14155. if (maidArray[13] && maidArray[13].Visible)
  14156. {
  14157. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14158. maidArray[12].transform.position.y,
  14159. maidArray[12].transform.position.z));
  14160. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14161. }
  14162. if (maidArray[2] && maidArray[2].Visible)
  14163. {
  14164. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14165. {
  14166. Vector3 vector = Vector3.zero;
  14167. vector.x = 0.6f;
  14168. maidArray[1].SetPos(vector);
  14169. if (maidArray[2] && maidArray[2].Visible)
  14170. {
  14171. vector.x = -0.6f;
  14172. maidArray[2].SetPos(vector);
  14173. }
  14174. if (maidArray[3] && maidArray[3].Visible)
  14175. {
  14176. vector.x = 1.2f;
  14177. maidArray[3].SetPos(vector);
  14178. }
  14179. if (maidArray[4] && maidArray[4].Visible)
  14180. {
  14181. vector.x = -1.2f;
  14182. maidArray[4].SetPos(vector);
  14183. }
  14184. if (maidArray[5] && maidArray[5].Visible)
  14185. {
  14186. vector.x = 1.8f;
  14187. maidArray[5].SetPos(vector);
  14188. }
  14189. if (maidArray[6] && maidArray[6].Visible)
  14190. {
  14191. vector.x = -1.8f;
  14192. maidArray[6].SetPos(vector);
  14193. }
  14194. if (maidArray[7] && maidArray[7].Visible)
  14195. {
  14196. vector.x = 2.4f;
  14197. maidArray[7].SetPos(vector);
  14198. }
  14199. if (maidArray[8] && maidArray[8].Visible)
  14200. {
  14201. vector.x = -2.4f;
  14202. maidArray[8].SetPos(vector);
  14203. }
  14204. if (maidArray[9] && maidArray[9].Visible)
  14205. {
  14206. vector.x = 3f;
  14207. maidArray[9].SetPos(vector);
  14208. }
  14209. if (maidArray[10] && maidArray[10].Visible)
  14210. {
  14211. vector.x = -3f;
  14212. maidArray[10].SetPos(vector);
  14213. }
  14214. if (maidArray[11] && maidArray[11].Visible)
  14215. {
  14216. vector.x = 3.6f;
  14217. maidArray[11].SetPos(vector);
  14218. }
  14219. if (maidArray[12] && maidArray[12].Visible)
  14220. {
  14221. vector.x = -3.6f;
  14222. maidArray[12].SetPos(vector);
  14223. }
  14224. if (maidArray[13] && maidArray[13].Visible)
  14225. {
  14226. vector.x = 4.2f;
  14227. maidArray[13].SetPos(vector);
  14228. }
  14229. }
  14230. }
  14231. isDance = true;
  14232. isDanceStart15 = true;
  14233. isSD1 = false;
  14234. }
  14235. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14236. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14237. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14238. || Input.GetKeyDown(KeyCode.Keypad0))
  14239. {
  14240. for (int j = 0; j < maidCnt; j++)
  14241. {
  14242. if (maidArray[j] && maidArray[j].Visible)
  14243. {
  14244. if (!isVR)
  14245. {
  14246. if (goSlot[(int)selectList[j]] != null)
  14247. {
  14248. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14249. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14250. {
  14251. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14252. }
  14253. }
  14254. }
  14255. }
  14256. }
  14257. }
  14258. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14259. {
  14260. if (h2Flg)
  14261. {
  14262. h2Flg = false;
  14263. }
  14264. else
  14265. {
  14266. string text4 = "";
  14267. if (wearIndex == 0)
  14268. {
  14269. text4 = "Underwear";
  14270. wearIndex = 1;
  14271. isWear = false;
  14272. isSkirt = false;
  14273. isBra = true;
  14274. isPanz = true;
  14275. isHeadset = false;
  14276. isGlove = false;
  14277. isStkg = true;
  14278. isShoes = false;
  14279. }
  14280. else if (wearIndex == 1)
  14281. {
  14282. text4 = "Nude";
  14283. wearIndex = 2;
  14284. isWear = false;
  14285. isSkirt = false;
  14286. isBra = false;
  14287. isPanz = false;
  14288. isHeadset = false;
  14289. isGlove = false;
  14290. isStkg = false;
  14291. isShoes = false;
  14292. }
  14293. else if (wearIndex == 2)
  14294. {
  14295. text4 = "None";
  14296. wearIndex = 0;
  14297. isWear = true;
  14298. isSkirt = true;
  14299. isBra = true;
  14300. isPanz = true;
  14301. isHeadset = true;
  14302. isGlove = true;
  14303. isStkg = true;
  14304. isShoes = true;
  14305. }
  14306. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14307. for (int j = 0; j < maidCnt; j++)
  14308. {
  14309. if (maidArray[j] && maidArray[j].Visible)
  14310. {
  14311. if (!isVR)
  14312. {
  14313. if (goSlot[(int)selectList[j]] != null)
  14314. {
  14315. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14316. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14317. {
  14318. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14319. }
  14320. }
  14321. }
  14322. maidArray[j].body0.SetMaskMode(maskMode);
  14323. }
  14324. }
  14325. }
  14326. }
  14327. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14328. {
  14329. saveScene = 9999;
  14330. saveScene2 = saveScene;
  14331. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14332. try
  14333. {
  14334. thum_byte_to_base64_ = string.Empty;
  14335. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14336. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14337. }
  14338. catch { }
  14339. }
  14340. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14341. {
  14342. loadScene = 9999;
  14343. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14344. }
  14345. if (isScreen)
  14346. {
  14347. isScreen = false;
  14348. bGui = isGui;
  14349. isGui = false;
  14350. if (!isMessage)
  14351. {
  14352. foreach (UICamera uicamera in ui_cam_hide_list_)
  14353. {
  14354. uicamera.GetComponent<Camera>().enabled = true;
  14355. }
  14356. ui_cam_hide_list_.Clear();
  14357. }
  14358. else
  14359. {
  14360. if (editUI != null)
  14361. {
  14362. editUI.SetActive(true);
  14363. }
  14364. if (GameMain.Instance.CMSystem.ViewFps)
  14365. {
  14366. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14367. childObject.SetActive(true);
  14368. }
  14369. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14370. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14371. childObject2.SetActive(true);
  14372. childObject3.SetActive(true);
  14373. }
  14374. for (int j = 0; j < maidCnt; j++)
  14375. {
  14376. if (maidArray[j] && maidArray[j].Visible)
  14377. {
  14378. isBone[j] = isBoneN[j];
  14379. if (isBone[j])
  14380. {
  14381. gNeck[j].SetActive(true);
  14382. gSpine[j].SetActive(true);
  14383. gSpine0a[j].SetActive(true);
  14384. gSpine1a[j].SetActive(true);
  14385. gSpine1[j].SetActive(true);
  14386. gPelvis[j].SetActive(true);
  14387. gHandL[j].SetActive(true);
  14388. gArmL[j].SetActive(true);
  14389. gFootL[j].SetActive(true);
  14390. gHizaL[j].SetActive(true);
  14391. gHandR[j].SetActive(true);
  14392. gArmR[j].SetActive(true);
  14393. gFootR[j].SetActive(true);
  14394. gHizaR[j].SetActive(true);
  14395. gClavicleL[j].SetActive(true);
  14396. gClavicleR[j].SetActive(true);
  14397. }
  14398. }
  14399. }
  14400. }
  14401. if (isScreen2)
  14402. {
  14403. isScreen = true;
  14404. isScreen2 = false;
  14405. }
  14406. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14407. && !Input.GetKey(KeyCode.Q))
  14408. {
  14409. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14410. {
  14411. isScreen = true;
  14412. for (int j = 0; j < maidCnt; j++)
  14413. {
  14414. if (maidArray[j] && maidArray[j].Visible)
  14415. {
  14416. if (isBone[j])
  14417. {
  14418. gNeck[j].SetActive(false);
  14419. gSpine[j].SetActive(false);
  14420. gSpine0a[j].SetActive(false);
  14421. gSpine1a[j].SetActive(false);
  14422. gSpine1[j].SetActive(false);
  14423. gPelvis[j].SetActive(false);
  14424. gHandL[j].SetActive(false);
  14425. gArmL[j].SetActive(false);
  14426. gFootL[j].SetActive(false);
  14427. gHizaL[j].SetActive(false);
  14428. gHandR[j].SetActive(false);
  14429. gArmR[j].SetActive(false);
  14430. gFootR[j].SetActive(false);
  14431. gHizaR[j].SetActive(false);
  14432. gClavicleL[j].SetActive(false);
  14433. gClavicleR[j].SetActive(false);
  14434. }
  14435. isBoneN[j] = isBone[j];
  14436. isBone[j] = false;
  14437. }
  14438. }
  14439. if (!isMessage)
  14440. {
  14441. ui_cam_hide_list_.Clear();
  14442. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14443. foreach (UICamera uicamera2 in array16)
  14444. {
  14445. if (uicamera2.GetComponent<Camera>().enabled)
  14446. {
  14447. uicamera2.GetComponent<Camera>().enabled = false;
  14448. ui_cam_hide_list_.Add(uicamera2);
  14449. }
  14450. }
  14451. }
  14452. else
  14453. {
  14454. editUI = GameObject.Find("/UI Root/Camera");
  14455. if (editUI != null)
  14456. {
  14457. editUI.SetActive(false);
  14458. }
  14459. if (GameMain.Instance.CMSystem.ViewFps)
  14460. {
  14461. GameObject childObject =
  14462. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14463. childObject.SetActive(false);
  14464. }
  14465. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14466. GameObject childObject3 =
  14467. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14468. childObject2.SetActive(false);
  14469. childObject3.SetActive(false);
  14470. }
  14471. isGui = bGui;
  14472. bGui = false;
  14473. GameMain.Instance.MainCamera.ScreenShot(false);
  14474. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14475. }
  14476. }
  14477. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14478. {
  14479. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14480. keyFlg2 = true;
  14481. }
  14482. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14483. {
  14484. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14485. keyFlg2 = true;
  14486. }
  14487. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14488. {
  14489. mainCameraTransform.eulerAngles =
  14490. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14491. keyFlg2 = true;
  14492. }
  14493. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14494. {
  14495. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14496. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14497. mainCamera.SetDistance(3f, true);
  14498. keyFlg2 = true;
  14499. }
  14500. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14501. {
  14502. cameraIti = mainCamera.GetTargetPos();
  14503. cameraIti2 = mainCamera.GetPos();
  14504. cameraItiAngle = mainCamera.GetAroundAngle();
  14505. cameraItiDistance = mainCamera.GetDistance();
  14506. keyFlg2 = true;
  14507. }
  14508. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14509. {
  14510. mainCamera.SetTargetPos(cameraIti, true);
  14511. mainCamera.SetPos(cameraIti2);
  14512. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14513. mainCamera.SetDistance(cameraItiDistance, true);
  14514. keyFlg2 = true;
  14515. }
  14516. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14517. {
  14518. if (keyFlg2)
  14519. {
  14520. keyFlg2 = false;
  14521. }
  14522. else
  14523. {
  14524. effectIndex++;
  14525. if (effectIndex == 9)
  14526. {
  14527. kami.SetActive(false);
  14528. effectIndex = 0;
  14529. }
  14530. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14531. if (!isBlur)
  14532. {
  14533. component3.mode = Vignetting.AberrationMode.Simple;
  14534. component3.intensity = -3.98f;
  14535. component3.chromaticAberration = -0.75f;
  14536. component3.axialAberration = 1.18f;
  14537. component3.blurSpread = 4.19f;
  14538. component3.luminanceDependency = 0.494f;
  14539. component3.blurDistance = 1.71f;
  14540. component3.enabled = false;
  14541. }
  14542. if (kami) { }
  14543. if (effectIndex == 0)
  14544. {
  14545. component3.enabled = false;
  14546. }
  14547. if (effectIndex == 1)
  14548. {
  14549. component3.mode = Vignetting.AberrationMode.Simple;
  14550. component3.intensity = -1f;
  14551. component3.chromaticAberration = 0f;
  14552. component3.axialAberration = 0f;
  14553. component3.blurSpread = 5f;
  14554. component3.luminanceDependency = 0f;
  14555. component3.blurDistance = 0f;
  14556. component3.enabled = true;
  14557. }
  14558. if (effectIndex == 2)
  14559. {
  14560. component3.enabled = true;
  14561. }
  14562. if (effectIndex == 3)
  14563. {
  14564. component3.mode = Vignetting.AberrationMode.Simple;
  14565. component3.intensity = 9f;
  14566. component3.chromaticAberration = 0f;
  14567. component3.axialAberration = 0f;
  14568. component3.blurSpread = 5f;
  14569. component3.luminanceDependency = 0f;
  14570. component3.blurDistance = 0f;
  14571. component3.enabled = true;
  14572. }
  14573. if (effectIndex == 4)
  14574. {
  14575. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14576. kami = (GameObject)Instantiate(@object);
  14577. Vector3 localPosition = kami.transform.localPosition;
  14578. localPosition.y = 3.5f;
  14579. kami.transform.localPosition = localPosition;
  14580. }
  14581. if (effectIndex == 5)
  14582. {
  14583. component3.enabled = true;
  14584. component3.mode = Vignetting.AberrationMode.Simple;
  14585. component3.intensity = -2.5f;
  14586. component3.chromaticAberration = -0.3f;
  14587. component3.axialAberration = 0.5f;
  14588. component3.blurSpread = 4.5f;
  14589. component3.luminanceDependency = 0.2f;
  14590. component3.blurDistance = 0.8f;
  14591. component3.enabled = true;
  14592. }
  14593. if (effectIndex == 6)
  14594. {
  14595. kami.SetActive(false);
  14596. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14597. kami = (GameObject)Instantiate(@object);
  14598. Vector3 localPosition = kami.transform.localPosition;
  14599. localPosition.y = 3.5f;
  14600. kami.transform.localPosition = localPosition;
  14601. }
  14602. if (effectIndex == 7)
  14603. {
  14604. component3.enabled = true;
  14605. component3.mode = Vignetting.AberrationMode.Simple;
  14606. component3.intensity = -2.5f;
  14607. component3.chromaticAberration = -0.3f;
  14608. component3.axialAberration = 0.5f;
  14609. component3.blurSpread = 4.5f;
  14610. component3.luminanceDependency = 0.2f;
  14611. component3.blurDistance = 0.8f;
  14612. component3.enabled = true;
  14613. }
  14614. if (effectIndex == 8)
  14615. {
  14616. component3.mode = Vignetting.AberrationMode.Simple;
  14617. component3.intensity = 8f;
  14618. component3.chromaticAberration = 0f;
  14619. component3.axialAberration = 0f;
  14620. component3.blurSpread = 5f;
  14621. component3.luminanceDependency = 0f;
  14622. component3.blurDistance = 0f;
  14623. component3.enabled = true;
  14624. }
  14625. }
  14626. }
  14627. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14628. {
  14629. qFlg = false;
  14630. }
  14631. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14632. {
  14633. bool flag5 = false;
  14634. for (int k = 0; k < keyArray.Length; k++)
  14635. {
  14636. if (Input.GetKey(keyArray[k]))
  14637. {
  14638. flag5 = true;
  14639. break;
  14640. }
  14641. }
  14642. if (!getModKeyPressing(modKey.Shift))
  14643. {
  14644. if (!flag5)
  14645. {
  14646. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14647. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14648. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14649. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14650. {
  14651. Vector3 vector = softG;
  14652. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14653. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14654. softG = vector;
  14655. }
  14656. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14657. {
  14658. Vector3 vector = softG;
  14659. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14660. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14661. softG = vector;
  14662. }
  14663. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14664. {
  14665. Vector3 vector = softG;
  14666. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14667. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14668. softG = vector;
  14669. }
  14670. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14671. {
  14672. Vector3 vector = softG;
  14673. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14674. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14675. softG = vector;
  14676. }
  14677. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14678. {
  14679. Vector3 vector = softG;
  14680. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14681. softG = vector;
  14682. }
  14683. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14684. {
  14685. Vector3 vector = softG;
  14686. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14687. softG = vector;
  14688. }
  14689. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14690. {
  14691. Vector3 vector = softG;
  14692. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14693. softG = vector;
  14694. }
  14695. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14696. {
  14697. Vector3 vector = softG;
  14698. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14699. softG = vector;
  14700. }
  14701. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14702. {
  14703. Vector3 vector = softG;
  14704. vector.y += 6E-05f * speed;
  14705. softG = vector;
  14706. }
  14707. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14708. {
  14709. Vector3 vector = softG;
  14710. vector.y -= 6E-05f * speed;
  14711. softG = vector;
  14712. }
  14713. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14714. {
  14715. softG = new Vector3(0f, -0.003f, 0f);
  14716. }
  14717. for (int j = 0; j < maidCnt; j++)
  14718. {
  14719. Maid maid = maidArray[j];
  14720. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14721. {
  14722. if (maid.body0.goSlot[l].obj != null)
  14723. {
  14724. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14725. if (component2 != null && component2.enabled)
  14726. {
  14727. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14728. }
  14729. }
  14730. List<THair1> fieldValue3 =
  14731. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14732. for (int k = 0; k < fieldValue3.Count; k++)
  14733. {
  14734. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14735. }
  14736. }
  14737. }
  14738. }
  14739. }
  14740. else if (!flag5)
  14741. {
  14742. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14743. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14744. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14745. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14746. {
  14747. Vector3 vector = softG2;
  14748. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14749. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14750. softG2 = vector;
  14751. }
  14752. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14753. {
  14754. Vector3 vector = softG2;
  14755. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14756. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14757. softG2 = vector;
  14758. }
  14759. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14760. {
  14761. Vector3 vector = softG2;
  14762. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14763. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14764. softG2 = vector;
  14765. }
  14766. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14767. {
  14768. Vector3 vector = softG2;
  14769. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14770. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14771. softG2 = vector;
  14772. }
  14773. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14774. {
  14775. Vector3 vector = softG2;
  14776. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14777. softG2 = vector;
  14778. }
  14779. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14780. {
  14781. Vector3 vector = softG2;
  14782. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14783. softG2 = vector;
  14784. }
  14785. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14786. {
  14787. Vector3 vector = softG2;
  14788. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14789. softG2 = vector;
  14790. }
  14791. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14792. {
  14793. Vector3 vector = softG2;
  14794. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14795. softG2 = vector;
  14796. }
  14797. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14798. {
  14799. Vector3 vector = softG2;
  14800. vector.y += 2E-05f * speed;
  14801. softG2 = vector;
  14802. }
  14803. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14804. {
  14805. Vector3 vector = softG2;
  14806. vector.y -= 2E-05f * speed;
  14807. softG2 = vector;
  14808. }
  14809. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14810. {
  14811. softG2 = new Vector3(0f, -0.005f, 0f);
  14812. }
  14813. for (int j = 0; j < maidCnt; j++)
  14814. {
  14815. Maid maid = maidArray[j];
  14816. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14817. {
  14818. if (maid.body0.goSlot[l].obj != null)
  14819. {
  14820. DynamicSkirtBone fieldValue8 =
  14821. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14822. "m_SkirtBone");
  14823. if (fieldValue8 != null)
  14824. {
  14825. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14826. fieldValue8.UpdateParameters();
  14827. }
  14828. }
  14829. }
  14830. }
  14831. }
  14832. }
  14833. if (!isVR)
  14834. {
  14835. if (doguObject.Count > 0)
  14836. {
  14837. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14838. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14839. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14840. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14841. {
  14842. idoFlg2 = true;
  14843. doguObject[doguSelectIndex].transform.localScale =
  14844. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14845. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14846. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14847. }
  14848. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14849. {
  14850. idoFlg2 = true;
  14851. doguObject[doguSelectIndex].transform.localScale =
  14852. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14853. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14854. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14855. }
  14856. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14857. {
  14858. idoFlg2 = true;
  14859. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14860. }
  14861. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14862. {
  14863. doguObject[doguSelectIndex]
  14864. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14865. idoFlg2 = true;
  14866. }
  14867. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14868. {
  14869. doguObject[doguSelectIndex]
  14870. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14871. idoFlg2 = true;
  14872. }
  14873. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14874. && getModKeyPressing(modKey.Alt))
  14875. {
  14876. for (int k = 0; k < 10; k++)
  14877. {
  14878. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14879. Vector3.right,
  14880. -doguObject[doguSelectIndex]
  14881. .transform.rotation.eulerAngles.x);
  14882. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14883. Vector3.forward,
  14884. -doguObject[doguSelectIndex]
  14885. .transform.rotation.eulerAngles.z);
  14886. }
  14887. idoFlg2 = true;
  14888. Vector3 vector = Vector3.zero;
  14889. Vector3 zero3 = Vector3.zero;
  14890. zero3.x = -90f;
  14891. int num12 = doguIndex[doguSelectIndex];
  14892. switch (num12)
  14893. {
  14894. case 3:
  14895. vector.z = 0.5f;
  14896. zero3.z = 90f;
  14897. break;
  14898. case 4:
  14899. case 5:
  14900. case 7:
  14901. case 10:
  14902. case 11: break;
  14903. case 6:
  14904. vector.z = 0.6f;
  14905. zero3.x = 0f;
  14906. break;
  14907. case 8:
  14908. vector.z = 0.5f;
  14909. zero3.x = 0f;
  14910. break;
  14911. case 9:
  14912. vector.z = 0.32f;
  14913. zero3.z = 180f;
  14914. break;
  14915. case 12:
  14916. vector.z = 0.5f;
  14917. zero3.z = 180f;
  14918. break;
  14919. case 13:
  14920. vector.z = 0.7f;
  14921. zero3.z = 180f;
  14922. break;
  14923. default:
  14924. if (num12 != 16)
  14925. {
  14926. switch (num12)
  14927. {
  14928. case 23:
  14929. vector.z = 2.7f;
  14930. vector.x = 0.77f;
  14931. zero3.z = 90f;
  14932. break;
  14933. case 25:
  14934. vector.z = 0.5f;
  14935. vector.y = 0.9f;
  14936. zero3.z = 180f;
  14937. break;
  14938. case 26:
  14939. vector.z = 0.5f;
  14940. vector.y = 0.9f;
  14941. zero3.z = 180f;
  14942. break;
  14943. case 30:
  14944. vector.z = 0f;
  14945. zero3.z = 0f;
  14946. break;
  14947. case 31:
  14948. vector.z = -0.6f;
  14949. vector.y = 0.96f;
  14950. zero3.z = 180f;
  14951. break;
  14952. case 32:
  14953. vector.z = -0.6f;
  14954. vector.y = 0.96f;
  14955. zero3.z = 180f;
  14956. break;
  14957. case 33:
  14958. vector.z = -0.6f;
  14959. vector.y = 0.85f;
  14960. zero3.z = 180f;
  14961. break;
  14962. }
  14963. }
  14964. else
  14965. {
  14966. vector.z = -0.4f;
  14967. zero3.z = 180f;
  14968. }
  14969. break;
  14970. }
  14971. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14972. }
  14973. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14974. && Input.GetKey(KeyCode.J))
  14975. {
  14976. doguObject[doguSelectIndex]
  14977. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14978. new Vector3(vector3.x, 0f, vector3.z),
  14979. 0.3f);
  14980. doguObject[doguSelectIndex]
  14981. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14982. new Vector3(vector2.x, 0f, vector2.z),
  14983. 0.3f);
  14984. idoFlg2 = true;
  14985. }
  14986. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14987. && Input.GetKey(KeyCode.L))
  14988. {
  14989. doguObject[doguSelectIndex]
  14990. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14991. new Vector3(vector3.x, 0f, vector3.z),
  14992. 0.3f);
  14993. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14994. new Vector3(vector2.x, 0f, vector2.z),
  14995. -0.3f);
  14996. idoFlg2 = true;
  14997. }
  14998. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14999. && Input.GetKey(KeyCode.J))
  15000. {
  15001. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15002. new Vector3(vector3.x, 0f, vector3.z),
  15003. -0.3f);
  15004. doguObject[doguSelectIndex]
  15005. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15006. new Vector3(vector2.x, 0f, vector2.z),
  15007. 0.3f);
  15008. idoFlg2 = true;
  15009. }
  15010. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15011. && Input.GetKey(KeyCode.L))
  15012. {
  15013. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15014. new Vector3(vector3.x, 0f, vector3.z),
  15015. -0.3f);
  15016. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15017. new Vector3(vector2.x, 0f, vector2.z),
  15018. -0.3f);
  15019. idoFlg2 = true;
  15020. }
  15021. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15022. {
  15023. doguObject[doguSelectIndex]
  15024. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15025. new Vector3(vector3.x, 0f, vector3.z),
  15026. 0.4f);
  15027. idoFlg2 = true;
  15028. }
  15029. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15030. {
  15031. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15032. new Vector3(vector3.x, 0f, vector3.z),
  15033. -0.4f);
  15034. idoFlg2 = true;
  15035. }
  15036. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15037. {
  15038. doguObject[doguSelectIndex]
  15039. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15040. new Vector3(vector2.x, 0f, vector2.z),
  15041. 0.4f);
  15042. idoFlg2 = true;
  15043. }
  15044. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15045. {
  15046. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15047. new Vector3(vector2.x, 0f, vector2.z),
  15048. -0.4f);
  15049. idoFlg2 = true;
  15050. }
  15051. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15052. {
  15053. doguObject[doguSelectIndex].transform.localRotation =
  15054. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15055. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15056. idoFlg2 = true;
  15057. }
  15058. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15059. {
  15060. doguObject[doguSelectIndex].transform.localRotation =
  15061. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15062. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15063. idoFlg2 = true;
  15064. }
  15065. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15066. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15067. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15068. {
  15069. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15070. new Vector3(vector3.x, 0f, vector3.z),
  15071. -0.7f);
  15072. idoFlg2 = true;
  15073. }
  15074. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15075. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15076. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15077. {
  15078. doguObject[doguSelectIndex]
  15079. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15080. new Vector3(vector3.x, 0f, vector3.z),
  15081. 0.7f);
  15082. idoFlg2 = true;
  15083. }
  15084. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15085. && (Input.GetKey(KeyCode.Minus)
  15086. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15087. {
  15088. doguObject[doguSelectIndex]
  15089. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15090. new Vector3(vector2.x, 0f, vector2.z),
  15091. 0.7f);
  15092. idoFlg2 = true;
  15093. }
  15094. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15095. && (Input.GetKey(KeyCode.Quote)
  15096. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15097. {
  15098. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15099. new Vector3(vector2.x, 0f, vector2.z),
  15100. -0.7f);
  15101. idoFlg2 = true;
  15102. }
  15103. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15104. && Input.GetKey(KeyCode.J))
  15105. {
  15106. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15107. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15108. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15109. doguObject[doguSelectIndex].transform.localPosition = vector;
  15110. idoFlg2 = true;
  15111. }
  15112. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15113. && Input.GetKey(KeyCode.L))
  15114. {
  15115. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15116. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15117. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15118. doguObject[doguSelectIndex].transform.localPosition = vector;
  15119. idoFlg2 = true;
  15120. }
  15121. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15122. && Input.GetKey(KeyCode.J))
  15123. {
  15124. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15125. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15126. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15127. doguObject[doguSelectIndex].transform.localPosition = vector;
  15128. idoFlg2 = true;
  15129. }
  15130. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15131. && Input.GetKey(KeyCode.L))
  15132. {
  15133. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15134. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15135. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15136. doguObject[doguSelectIndex].transform.localPosition = vector;
  15137. idoFlg2 = true;
  15138. }
  15139. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15140. {
  15141. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15142. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15143. doguObject[doguSelectIndex].transform.localPosition = vector;
  15144. idoFlg2 = true;
  15145. }
  15146. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15147. {
  15148. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15149. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15150. doguObject[doguSelectIndex].transform.localPosition = vector;
  15151. idoFlg2 = true;
  15152. }
  15153. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15154. {
  15155. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15156. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15157. doguObject[doguSelectIndex].transform.localPosition = vector;
  15158. idoFlg2 = true;
  15159. }
  15160. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15161. {
  15162. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15163. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15164. doguObject[doguSelectIndex].transform.localPosition = vector;
  15165. idoFlg2 = true;
  15166. }
  15167. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15168. {
  15169. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15170. vector.y += 0.0075f * speed;
  15171. doguObject[doguSelectIndex].transform.localPosition = vector;
  15172. idoFlg2 = true;
  15173. }
  15174. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15175. {
  15176. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15177. vector.y -= 0.0075f * speed;
  15178. doguObject[doguSelectIndex].transform.localPosition = vector;
  15179. idoFlg2 = true;
  15180. }
  15181. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15182. {
  15183. idoFlg2 = true;
  15184. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15185. {
  15186. Destroy(doguObject[doguSelectIndex]);
  15187. doguObject.RemoveAt(doguSelectIndex);
  15188. }
  15189. doguIndex.RemoveAt(doguSelectIndex);
  15190. doguSelectIndex = 0;
  15191. }
  15192. }
  15193. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15194. {
  15195. idoFlg2 = true;
  15196. if (doguSelectIndex == doguObject.Count)
  15197. {
  15198. doguIndex.Add(0);
  15199. }
  15200. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15201. {
  15202. Destroy(doguObject[doguSelectIndex]);
  15203. doguObject.RemoveAt(doguSelectIndex);
  15204. }
  15205. else
  15206. {
  15207. doguIndex.Add(0);
  15208. doguSelectIndex = doguIndex.Count - 1;
  15209. }
  15210. List<int> list2;
  15211. int index;
  15212. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15213. if (doguIndex[doguSelectIndex] <= -1)
  15214. {
  15215. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15216. }
  15217. if (doguIndex[doguSelectIndex] > 0)
  15218. {
  15219. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15220. {
  15221. Object @object = null;
  15222. for (int j = 0; j < 5; j++)
  15223. {
  15224. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15225. if (@object != null)
  15226. {
  15227. break;
  15228. }
  15229. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15230. }
  15231. doguObject.Add(Instantiate(@object) as GameObject);
  15232. }
  15233. else
  15234. {
  15235. Material material = new Material(Shader.Find("Mirror"));
  15236. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15237. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15238. gameObject7.GetComponent<Renderer>().material = material;
  15239. gameObject7.AddComponent<MirrorReflection2>();
  15240. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15241. component5.m_TextureSize = 2048;
  15242. component5.m_ClipPlaneOffset = 0f;
  15243. gameObject7.GetComponent<Renderer>().enabled = true;
  15244. doguObject.Add(gameObject7);
  15245. }
  15246. Vector3 vector = Vector3.zero;
  15247. Vector3 zero3 = Vector3.zero;
  15248. zero3.x = -90f;
  15249. switch (doguIndex[doguSelectIndex])
  15250. {
  15251. case 1:
  15252. vector.z = -0.5f;
  15253. goto IL_344DC;
  15254. case 2:
  15255. vector.z = -0.5f;
  15256. goto IL_344DC;
  15257. case 3:
  15258. vector.z = 0.5f;
  15259. zero3.z = 90f;
  15260. goto IL_344DC;
  15261. case 4:
  15262. vector.z = 0.9f;
  15263. goto IL_344DC;
  15264. case 5:
  15265. vector.z = 0.9f;
  15266. goto IL_344DC;
  15267. case 6:
  15268. vector.z = 0.6f;
  15269. zero3.x = 0f;
  15270. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15271. goto IL_344DC;
  15272. case 7:
  15273. vector.z = 0.6f;
  15274. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15275. goto IL_344DC;
  15276. case 8:
  15277. vector.z = 0.5f;
  15278. zero3.x = 0f;
  15279. goto IL_344DC;
  15280. case 9:
  15281. vector.z = 0.32f;
  15282. zero3.z = 180f;
  15283. goto IL_344DC;
  15284. case 10:
  15285. vector.z = 0.6f;
  15286. goto IL_344DC;
  15287. case 11:
  15288. vector.z = 0.6f;
  15289. goto IL_344DC;
  15290. case 12:
  15291. vector.z = 0.5f;
  15292. zero3.z = 180f;
  15293. goto IL_344DC;
  15294. case 13:
  15295. vector.z = 0.7f;
  15296. zero3.z = 180f;
  15297. goto IL_344DC;
  15298. case 14:
  15299. vector.z = -0.4f;
  15300. goto IL_344DC;
  15301. case 15:
  15302. vector.z = -0.4f;
  15303. goto IL_344DC;
  15304. case 16:
  15305. vector.z = -0.4f;
  15306. zero3.z = 180f;
  15307. goto IL_344DC;
  15308. case 17:
  15309. vector.z = -0.4f;
  15310. goto IL_344DC;
  15311. case 18:
  15312. vector.z = -0.2f;
  15313. goto IL_344DC;
  15314. case 19:
  15315. vector.z = 0f;
  15316. goto IL_344DC;
  15317. case 20:
  15318. vector.z = 3.4f;
  15319. vector.x = -1f;
  15320. goto IL_344DC;
  15321. case 21:
  15322. vector.z = 3.4f;
  15323. vector.x = -1f;
  15324. goto IL_344DC;
  15325. case 22:
  15326. vector.z = 3.4f;
  15327. vector.y = 0.3f;
  15328. vector.x = -1f;
  15329. goto IL_344DC;
  15330. case 23:
  15331. vector.z = 2.7f;
  15332. vector.x = 0.77f;
  15333. zero3.z = 90f;
  15334. goto IL_344DC;
  15335. case 25:
  15336. vector.z = 0.5f;
  15337. vector.y = 0.9f;
  15338. zero3.z = 180f;
  15339. goto IL_344DC;
  15340. case 26:
  15341. vector.z = 0.5f;
  15342. vector.y = 0.9f;
  15343. zero3.z = 180f;
  15344. goto IL_344DC;
  15345. case 29:
  15346. vector.z = 0.5f;
  15347. vector.x = -1.05f;
  15348. goto IL_344DC;
  15349. case 30:
  15350. vector.z = -2.8f;
  15351. zero3.z = 0f;
  15352. zero3.x = 0f;
  15353. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15354. goto IL_344DC;
  15355. case 31:
  15356. vector.z = -0.6f;
  15357. vector.y = 0.96f;
  15358. zero3.z = 180f;
  15359. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15360. goto IL_344DC;
  15361. case 32:
  15362. vector.z = -0.6f;
  15363. vector.y = 0.96f;
  15364. zero3.z = 180f;
  15365. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15366. goto IL_344DC;
  15367. case 33:
  15368. vector.z = -0.6f;
  15369. vector.y = 0.85f;
  15370. zero3.z = 180f;
  15371. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15372. goto IL_344DC;
  15373. }
  15374. vector.z = 0.5f;
  15375. IL_344DC:
  15376. doguObject[doguSelectIndex].transform.localPosition = vector;
  15377. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15378. }
  15379. if (doguIndex[doguSelectIndex] == 0)
  15380. {
  15381. doguIndex.RemoveAt(doguSelectIndex);
  15382. }
  15383. }
  15384. else if (Input.GetKeyDown(KeyCode.W))
  15385. {
  15386. for (int k = 0; k < keyArray.Length; k++)
  15387. {
  15388. if (Input.GetKey(keyArray[k]))
  15389. {
  15390. wFlg = true;
  15391. break;
  15392. }
  15393. }
  15394. }
  15395. else if (Input.GetKeyUp(KeyCode.W))
  15396. {
  15397. if (wFlg)
  15398. {
  15399. wFlg = false;
  15400. }
  15401. else if (idoFlg2)
  15402. {
  15403. idoFlg2 = false;
  15404. }
  15405. else
  15406. {
  15407. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15408. {
  15409. Destroy(doguObject[doguSelectIndex]);
  15410. doguObject.RemoveAt(doguSelectIndex);
  15411. }
  15412. else
  15413. {
  15414. doguIndex.Add(0);
  15415. doguSelectIndex = doguIndex.Count - 1;
  15416. }
  15417. List<int> list2;
  15418. int index;
  15419. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15420. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15421. {
  15422. doguIndex[doguSelectIndex] = 0;
  15423. }
  15424. if (doguIndex[doguSelectIndex] > 0)
  15425. {
  15426. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15427. {
  15428. Object @object = null;
  15429. for (int j = 0; j < 5; j++)
  15430. {
  15431. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15432. if (@object != null)
  15433. {
  15434. break;
  15435. }
  15436. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15437. }
  15438. doguObject.Add(Instantiate(@object) as GameObject);
  15439. }
  15440. else
  15441. {
  15442. Material material = new Material(Shader.Find("Mirror"));
  15443. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15444. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15445. gameObject7.GetComponent<Renderer>().material = material;
  15446. gameObject7.AddComponent<MirrorReflection2>();
  15447. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15448. component5.m_TextureSize = 2048;
  15449. component5.m_ClipPlaneOffset = 0f;
  15450. gameObject7.GetComponent<Renderer>().enabled = true;
  15451. doguObject.Add(gameObject7);
  15452. }
  15453. Vector3 vector = Vector3.zero;
  15454. Vector3 zero3 = Vector3.zero;
  15455. zero3.x = -90f;
  15456. switch (doguIndex[doguSelectIndex])
  15457. {
  15458. case 1:
  15459. vector.z = -0.5f;
  15460. goto IL_34D66;
  15461. case 2:
  15462. vector.z = -0.5f;
  15463. goto IL_34D66;
  15464. case 3:
  15465. vector.z = 0.5f;
  15466. zero3.z = 90f;
  15467. goto IL_34D66;
  15468. case 4:
  15469. vector.z = 0.9f;
  15470. goto IL_34D66;
  15471. case 5:
  15472. vector.z = 0.9f;
  15473. goto IL_34D66;
  15474. case 6:
  15475. vector.z = 0.6f;
  15476. zero3.x = 0f;
  15477. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15478. goto IL_34D66;
  15479. case 7:
  15480. vector.z = 0.6f;
  15481. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15482. goto IL_34D66;
  15483. case 8:
  15484. vector.z = 0.5f;
  15485. zero3.x = 0f;
  15486. goto IL_34D66;
  15487. case 9:
  15488. vector.z = 0.32f;
  15489. zero3.z = 180f;
  15490. goto IL_34D66;
  15491. case 10:
  15492. vector.z = 0.6f;
  15493. goto IL_34D66;
  15494. case 11:
  15495. vector.z = 0.6f;
  15496. goto IL_34D66;
  15497. case 12:
  15498. vector.z = 0.5f;
  15499. zero3.z = 180f;
  15500. goto IL_34D66;
  15501. case 13:
  15502. vector.z = 0.7f;
  15503. zero3.z = 180f;
  15504. goto IL_34D66;
  15505. case 14:
  15506. vector.z = -0.4f;
  15507. goto IL_34D66;
  15508. case 15:
  15509. vector.z = -0.4f;
  15510. goto IL_34D66;
  15511. case 16:
  15512. vector.z = -0.4f;
  15513. zero3.z = 180f;
  15514. goto IL_34D66;
  15515. case 17:
  15516. vector.z = -0.4f;
  15517. goto IL_34D66;
  15518. case 18:
  15519. vector.z = -0.2f;
  15520. goto IL_34D66;
  15521. case 19:
  15522. vector.z = 0f;
  15523. goto IL_34D66;
  15524. case 20:
  15525. vector.z = 3.4f;
  15526. vector.x = -1f;
  15527. goto IL_34D66;
  15528. case 21:
  15529. vector.z = 3.4f;
  15530. vector.x = -1f;
  15531. goto IL_34D66;
  15532. case 22:
  15533. vector.z = 3.4f;
  15534. vector.y = 0.3f;
  15535. vector.x = -1f;
  15536. goto IL_34D66;
  15537. case 23:
  15538. vector.z = 2.7f;
  15539. vector.x = 0.77f;
  15540. zero3.z = 90f;
  15541. goto IL_34D66;
  15542. case 25:
  15543. vector.z = 0.5f;
  15544. vector.y = 0.9f;
  15545. zero3.z = 180f;
  15546. goto IL_34D66;
  15547. case 26:
  15548. vector.z = 0.5f;
  15549. vector.y = 0.9f;
  15550. zero3.z = 180f;
  15551. goto IL_34D66;
  15552. case 29:
  15553. vector.z = 0.5f;
  15554. vector.x = -1.05f;
  15555. goto IL_34D66;
  15556. case 30:
  15557. vector.z = -2.8f;
  15558. zero3.z = 0f;
  15559. zero3.x = 0f;
  15560. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15561. goto IL_34D66;
  15562. case 31:
  15563. vector.z = -0.6f;
  15564. vector.y = 0.96f;
  15565. zero3.z = 180f;
  15566. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15567. goto IL_34D66;
  15568. case 32:
  15569. vector.z = -0.6f;
  15570. vector.y = 0.96f;
  15571. zero3.z = 180f;
  15572. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15573. goto IL_34D66;
  15574. case 33:
  15575. vector.z = -0.6f;
  15576. vector.y = 0.85f;
  15577. zero3.z = 180f;
  15578. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15579. goto IL_34D66;
  15580. }
  15581. vector.z = 0.5f;
  15582. IL_34D66:;
  15583. }
  15584. if (doguIndex[doguSelectIndex] == 0)
  15585. {
  15586. doguIndex.RemoveAt(doguSelectIndex);
  15587. }
  15588. }
  15589. }
  15590. }
  15591. if (!isVR)
  15592. {
  15593. int i;
  15594. for (i = 0; i < 999; i++)
  15595. {
  15596. if (gDogu[i] != null)
  15597. {
  15598. gDogu[i].GetComponent<Renderer>().enabled = false;
  15599. gDogu[i].SetActive(false);
  15600. if (mDogu[i].del)
  15601. {
  15602. mDogu[i].del = false;
  15603. Destroy(doguBObject[i]);
  15604. doguBObject.RemoveAt(i);
  15605. }
  15606. else if (mDogu[i].count > 0)
  15607. {
  15608. mDogu[i].count--;
  15609. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15610. {
  15611. if (mDogu[i].count == 1)
  15612. {
  15613. doguBObject[i].SetActive(false);
  15614. }
  15615. if (mDogu[i].count == 0)
  15616. {
  15617. doguBObject[i].SetActive(true);
  15618. string name = doguBObject[i].name;
  15619. if (name != null)
  15620. {
  15621. if (!(name == "Particle/pLineY"))
  15622. {
  15623. if (!(name == "Particle/pLineP02"))
  15624. {
  15625. if (!(name == "Particle/pLine_act2"))
  15626. {
  15627. if (name == "Particle/pHeart01")
  15628. {
  15629. mDogu[i].count = 77;
  15630. }
  15631. }
  15632. else
  15633. {
  15634. mDogu[i].count = 90;
  15635. }
  15636. }
  15637. else
  15638. {
  15639. mDogu[i].count = 115;
  15640. }
  15641. }
  15642. else
  15643. {
  15644. mDogu[i].count = 180;
  15645. }
  15646. }
  15647. }
  15648. }
  15649. }
  15650. }
  15651. }
  15652. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15653. {
  15654. ikMode2 = 11;
  15655. }
  15656. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15657. {
  15658. ikMode2 = 12;
  15659. }
  15660. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15661. {
  15662. ikMode2 = 14;
  15663. }
  15664. else if (Input.GetKey(KeyCode.X))
  15665. {
  15666. ikMode2 = 9;
  15667. }
  15668. else if (Input.GetKey(KeyCode.Z))
  15669. {
  15670. ikMode2 = 10;
  15671. }
  15672. else if (Input.GetKey(KeyCode.C))
  15673. {
  15674. ikMode2 = 13;
  15675. }
  15676. else if (Input.GetKey(KeyCode.D))
  15677. {
  15678. ikMode2 = 15;
  15679. }
  15680. else
  15681. {
  15682. ikMode2 = 0;
  15683. }
  15684. if (gBg != null)
  15685. {
  15686. if (!isCube3)
  15687. {
  15688. gBg.GetComponent<Renderer>().enabled = false;
  15689. gBg.SetActive(false);
  15690. }
  15691. else
  15692. {
  15693. if (ikMode2 > 0 && ikMode2 != 15)
  15694. {
  15695. gBg.GetComponent<Renderer>().enabled = true;
  15696. gBg.SetActive(true);
  15697. }
  15698. else
  15699. {
  15700. gBg.GetComponent<Renderer>().enabled = false;
  15701. gBg.SetActive(false);
  15702. }
  15703. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15704. {
  15705. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15706. }
  15707. if (ikMode2 == 9 || ikMode2 == 14)
  15708. {
  15709. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15710. mBg.Update();
  15711. }
  15712. if (ikMode2 == 13)
  15713. {
  15714. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15715. mBg.Update();
  15716. }
  15717. if (ikMode2 == 13)
  15718. {
  15719. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15720. {
  15721. mBg.ido = 5;
  15722. mBg.reset = true;
  15723. }
  15724. else
  15725. {
  15726. gBg.transform.position = bg.position;
  15727. gBg.transform.eulerAngles = bg.eulerAngles;
  15728. mBg.maid = bgObject;
  15729. mBg.ido = 5;
  15730. }
  15731. }
  15732. else if (ikMode2 == 11)
  15733. {
  15734. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15735. {
  15736. mBg.ido = 3;
  15737. mBg.reset = true;
  15738. }
  15739. else
  15740. {
  15741. gBg.transform.position = bg.position;
  15742. gBg.transform.eulerAngles = bg.eulerAngles;
  15743. mBg.maid = bgObject;
  15744. mBg.ido = 3;
  15745. }
  15746. }
  15747. else if (ikMode2 == 12)
  15748. {
  15749. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15750. {
  15751. mBg.ido = 2;
  15752. mBg.reset = true;
  15753. }
  15754. else
  15755. {
  15756. gBg.transform.position = bg.position;
  15757. gBg.transform.eulerAngles = bg.eulerAngles;
  15758. mBg.maid = bgObject;
  15759. mBg.ido = 2;
  15760. }
  15761. }
  15762. else if (ikMode2 == 10)
  15763. {
  15764. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15765. {
  15766. mBg.ido = 1;
  15767. mBg.reset = true;
  15768. }
  15769. else
  15770. {
  15771. gBg.transform.position = bg.position;
  15772. gBg.transform.eulerAngles = bg.eulerAngles;
  15773. mBg.maid = bgObject;
  15774. mBg.ido = 1;
  15775. }
  15776. }
  15777. else if (ikMode2 == 9)
  15778. {
  15779. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15780. {
  15781. mBg.ido = 4;
  15782. mBg.reset = true;
  15783. }
  15784. else
  15785. {
  15786. gBg.transform.position = bg.position;
  15787. gBg.transform.eulerAngles = bg.eulerAngles;
  15788. mBg.maid = bgObject;
  15789. mBg.ido = 4;
  15790. }
  15791. }
  15792. else if (ikMode2 == 14)
  15793. {
  15794. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15795. {
  15796. mBg.ido = 6;
  15797. mBg.reset = true;
  15798. }
  15799. else
  15800. {
  15801. gBg.transform.position = bg.position;
  15802. gBg.transform.eulerAngles = bg.eulerAngles;
  15803. mBg.maid = bgObject;
  15804. mBg.ido = 6;
  15805. }
  15806. }
  15807. }
  15808. }
  15809. for (i = 0; i < lightIndex.Count; i++)
  15810. {
  15811. if (gLight[0] == null)
  15812. {
  15813. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15814. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15815. {
  15816. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15817. };
  15818. gLight[0].GetComponent<Renderer>().material = material2;
  15819. gLight[0].layer = 8;
  15820. gLight[0].GetComponent<Renderer>().enabled = false;
  15821. gLight[0].SetActive(false);
  15822. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15823. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15824. mLight[0].obj = gLight[0];
  15825. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15826. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15827. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15828. mLight[0].ido = 1;
  15829. mLight[0].isScale = false;
  15830. }
  15831. if (gLight[i] != null)
  15832. {
  15833. if (!isCube4)
  15834. {
  15835. gLight[i].GetComponent<Renderer>().enabled = false;
  15836. gLight[i].SetActive(false);
  15837. }
  15838. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15839. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15840. {
  15841. if (ikMode2 > 0 && ikMode2 != 15)
  15842. {
  15843. gLight[i].GetComponent<Renderer>().enabled = true;
  15844. gLight[i].SetActive(true);
  15845. }
  15846. else
  15847. {
  15848. gLight[i].GetComponent<Renderer>().enabled = false;
  15849. gLight[i].SetActive(false);
  15850. mLight[i].isAlt = false;
  15851. }
  15852. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15853. {
  15854. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15855. if (mLight[i].isAlt)
  15856. {
  15857. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15858. }
  15859. }
  15860. if (ikMode2 == 9 || ikMode2 == 14)
  15861. {
  15862. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15863. mLight[i].Update();
  15864. }
  15865. if (ikMode2 == 13)
  15866. {
  15867. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15868. mLight[i].Update();
  15869. }
  15870. if (ikMode2 == 13)
  15871. {
  15872. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15873. {
  15874. mLight[i].ido = 15;
  15875. mLight[i].reset = true;
  15876. }
  15877. else
  15878. {
  15879. if (lightList[i].transform.localScale.x == 1f)
  15880. {
  15881. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15882. }
  15883. lightRange[i] = lightList[i].transform.localScale.x;
  15884. gLight[i].transform.position = lightList[i].transform.position;
  15885. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15886. mLight[i].maid = lightList[i];
  15887. mLight[i].ido = 15;
  15888. }
  15889. }
  15890. else if (ikMode2 == 11)
  15891. {
  15892. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15893. {
  15894. mLight[i].ido = 3;
  15895. mLight[i].reset = true;
  15896. }
  15897. else
  15898. {
  15899. gLight[i].transform.position = lightList[i].transform.position;
  15900. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15901. lightX[i] = gLight[i].transform.eulerAngles.x;
  15902. lightY[i] = gLight[i].transform.eulerAngles.y;
  15903. mLight[i].maid = lightList[i];
  15904. mLight[i].ido = 3;
  15905. }
  15906. }
  15907. else if (ikMode2 == 12)
  15908. {
  15909. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15910. {
  15911. mLight[i].ido = 2;
  15912. mLight[i].reset = true;
  15913. }
  15914. else
  15915. {
  15916. gLight[i].transform.position = lightList[i].transform.position;
  15917. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15918. mLight[i].maid = lightList[i];
  15919. mLight[i].ido = 2;
  15920. }
  15921. }
  15922. else if (ikMode2 == 10)
  15923. {
  15924. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15925. {
  15926. mLight[i].ido = 1;
  15927. mLight[i].reset = true;
  15928. }
  15929. else
  15930. {
  15931. gLight[i].transform.position = lightList[i].transform.position;
  15932. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15933. mLight[i].maid = lightList[i];
  15934. mLight[i].maidArray = lightList.ToArray();
  15935. mLight[i].mArray = mLight.ToArray();
  15936. mLight[i].ido = 1;
  15937. }
  15938. }
  15939. else if (ikMode2 == 9)
  15940. {
  15941. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15942. {
  15943. mLight[i].ido = 4;
  15944. mLight[i].reset = true;
  15945. }
  15946. else
  15947. {
  15948. gLight[i].transform.position = lightList[i].transform.position;
  15949. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15950. lightX[i] = gLight[i].transform.eulerAngles.x;
  15951. lightY[i] = gLight[i].transform.eulerAngles.y;
  15952. mLight[i].maid = lightList[i];
  15953. mLight[i].ido = 4;
  15954. }
  15955. }
  15956. else if (ikMode2 == 14)
  15957. {
  15958. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15959. {
  15960. mLight[i].ido = 6;
  15961. mLight[i].reset = true;
  15962. }
  15963. else
  15964. {
  15965. gLight[i].transform.position = lightList[i].transform.position;
  15966. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15967. lightX[i] = gLight[i].transform.eulerAngles.x;
  15968. lightY[i] = gLight[i].transform.eulerAngles.y;
  15969. mLight[i].maid = lightList[i];
  15970. mLight[i].ido = 6;
  15971. }
  15972. }
  15973. }
  15974. }
  15975. }
  15976. for (i = 0; i < doguBObject.Count; i++)
  15977. {
  15978. if (!isCube2)
  15979. {
  15980. gDogu[i].GetComponent<Renderer>().enabled = false;
  15981. gDogu[i].SetActive(false);
  15982. }
  15983. else
  15984. {
  15985. if (ikMode2 > 0)
  15986. {
  15987. gDogu[i].GetComponent<Renderer>().enabled = true;
  15988. gDogu[i].SetActive(true);
  15989. }
  15990. else
  15991. {
  15992. gDogu[i].GetComponent<Renderer>().enabled = false;
  15993. gDogu[i].SetActive(false);
  15994. mDogu[i].isAlt = false;
  15995. }
  15996. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15997. {
  15998. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15999. if (mDogu[i].isAlt)
  16000. {
  16001. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16002. }
  16003. }
  16004. if (ikMode2 == 9 || ikMode2 == 14)
  16005. {
  16006. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16007. mDogu[i].Update();
  16008. }
  16009. if (ikMode2 == 15)
  16010. {
  16011. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16012. }
  16013. if (ikMode2 == 13)
  16014. {
  16015. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16016. mDogu[i].Update();
  16017. }
  16018. if (ikMode2 == 13)
  16019. {
  16020. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16021. {
  16022. mDogu[i].ido = 5;
  16023. mDogu[i].reset = true;
  16024. }
  16025. else
  16026. {
  16027. gDogu[i].transform.position = doguBObject[i].transform.position;
  16028. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16029. mDogu[i].maid = doguBObject[i];
  16030. mDogu[i].ido = 5;
  16031. }
  16032. }
  16033. else if (ikMode2 == 11)
  16034. {
  16035. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16036. {
  16037. mDogu[i].ido = 3;
  16038. mDogu[i].reset = true;
  16039. }
  16040. else
  16041. {
  16042. gDogu[i].transform.position = doguBObject[i].transform.position;
  16043. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16044. mDogu[i].maid = doguBObject[i];
  16045. mDogu[i].ido = 3;
  16046. }
  16047. }
  16048. else if (ikMode2 == 12)
  16049. {
  16050. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16051. {
  16052. mDogu[i].ido = 2;
  16053. mDogu[i].reset = true;
  16054. }
  16055. else
  16056. {
  16057. gDogu[i].transform.position = doguBObject[i].transform.position;
  16058. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16059. mDogu[i].maid = doguBObject[i];
  16060. mDogu[i].ido = 2;
  16061. }
  16062. }
  16063. else if (ikMode2 == 10)
  16064. {
  16065. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16066. {
  16067. mDogu[i].ido = 1;
  16068. mDogu[i].reset = true;
  16069. }
  16070. else
  16071. {
  16072. gDogu[i].transform.position = doguBObject[i].transform.position;
  16073. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16074. mDogu[i].maid = doguBObject[i];
  16075. mDogu[i].maidArray = doguBObject.ToArray();
  16076. mDogu[i].mArray = mDogu.ToArray();
  16077. mDogu[i].ido = 1;
  16078. }
  16079. }
  16080. else if (ikMode2 == 9)
  16081. {
  16082. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16083. {
  16084. mDogu[i].ido = 4;
  16085. mDogu[i].reset = true;
  16086. }
  16087. else
  16088. {
  16089. gDogu[i].transform.position = doguBObject[i].transform.position;
  16090. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16091. mDogu[i].maid = doguBObject[i];
  16092. mDogu[i].ido = 4;
  16093. }
  16094. }
  16095. else if (ikMode2 == 14)
  16096. {
  16097. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16098. {
  16099. mDogu[i].ido = 6;
  16100. mDogu[i].reset = true;
  16101. }
  16102. else
  16103. {
  16104. gDogu[i].transform.position = doguBObject[i].transform.position;
  16105. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16106. mDogu[i].maid = doguBObject[i];
  16107. mDogu[i].ido = 6;
  16108. }
  16109. }
  16110. else if (ikMode2 == 15)
  16111. {
  16112. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16113. {
  16114. mDogu[i].ido = 7;
  16115. mDogu[i].reset = true;
  16116. }
  16117. else
  16118. {
  16119. gDogu[i].transform.position = doguBObject[i].transform.position;
  16120. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16121. mDogu[i].maid = doguBObject[i];
  16122. mDogu[i].ido = 7;
  16123. }
  16124. }
  16125. }
  16126. }
  16127. ikModeOld2 = ikMode2;
  16128. }
  16129. if (isVR)
  16130. {
  16131. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16132. {
  16133. if (!isVR2)
  16134. {
  16135. isVR2 = true;
  16136. Preferences["config"]["shift_f8"].Value = "true";
  16137. SaveConfig();
  16138. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16139. }
  16140. else
  16141. {
  16142. isVR2 = false;
  16143. Preferences["config"]["shift_f8"].Value = "false";
  16144. SaveConfig();
  16145. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16146. }
  16147. }
  16148. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16149. {
  16150. loadScene = 1;
  16151. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16152. }
  16153. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16154. {
  16155. loadScene = 2;
  16156. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16157. }
  16158. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16159. {
  16160. loadScene = 3;
  16161. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16162. }
  16163. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16164. {
  16165. loadScene = 4;
  16166. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16167. }
  16168. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16169. {
  16170. loadScene = 5;
  16171. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16172. }
  16173. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16174. {
  16175. loadScene = 6;
  16176. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16177. }
  16178. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16179. {
  16180. loadScene = 7;
  16181. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16182. }
  16183. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16184. {
  16185. loadScene = 8;
  16186. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16187. }
  16188. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16189. {
  16190. loadScene = 9;
  16191. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16192. }
  16193. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16194. {
  16195. loadScene = 10;
  16196. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16197. }
  16198. for (int j = 0; j < 7; j++)
  16199. {
  16200. if (!maidArray[j])
  16201. {
  16202. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16203. }
  16204. }
  16205. }
  16206. }
  16207. }
  16208. }
  16209. }