MultipleMaids.MaidUpdate.cs 916 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425
  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. gizmoFootL[i].Visible = false;
  4555. gizmoHandR[i].Visible = false;
  4556. gizmoHandL[i].Visible = false;
  4557. gizmoFootR[i].Visible = false;
  4558. }
  4559. else
  4560. {
  4561. bool fieldValue4 = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4562. bool fieldValue5 = GetFieldValue<GizmoRender, bool>(gizmoHandR[i], "is_drag_");
  4563. bool fieldValue6 = GetFieldValue<GizmoRender, bool>(gizmoFootL[i], "is_drag_");
  4564. bool fieldValue7 = GetFieldValue<GizmoRender, bool>(gizmoFootR[i], "is_drag_");
  4565. if (ikMode[i] == 3)
  4566. {
  4567. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4568. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4569. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4570. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4571. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4572. {
  4573. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4574. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4575. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4576. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4577. }
  4578. else
  4579. {
  4580. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4581. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4582. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4583. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4584. }
  4585. }
  4586. else if (ikMode[i] == 5)
  4587. {
  4588. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4589. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4590. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4591. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4592. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4593. {
  4594. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4595. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4596. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4597. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4598. flag13 = true;
  4599. }
  4600. else
  4601. {
  4602. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4603. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4604. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4605. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4606. }
  4607. }
  4608. else if (ikMode[i] == 8)
  4609. {
  4610. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4611. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4612. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4613. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4614. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4615. {
  4616. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4617. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4618. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4619. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4620. flag13 = true;
  4621. }
  4622. else
  4623. {
  4624. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4625. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4626. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4627. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4628. }
  4629. }
  4630. gizmoHandL[i].Visible = true;
  4631. gizmoHandR[i].Visible = true;
  4632. gizmoFootL[i].Visible = true;
  4633. gizmoFootR[i].Visible = true;
  4634. gHandL[i].SetActive(false);
  4635. gFootL[i].SetActive(false);
  4636. gHandR[i].SetActive(false);
  4637. gFootR[i].SetActive(false);
  4638. if (!isLock[i])
  4639. {
  4640. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4641. {
  4642. isStop[i] = true;
  4643. isLock[i] = true;
  4644. }
  4645. }
  4646. }
  4647. if (isChange[i])
  4648. {
  4649. isChange[i] = false;
  4650. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4651. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4652. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4653. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4654. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4655. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4656. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4657. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4658. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4659. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4660. gHandL[i].GetComponent<Renderer>().enabled = true;
  4661. gHandR[i].GetComponent<Renderer>().enabled = true;
  4662. gArmL[i].GetComponent<Renderer>().enabled = true;
  4663. gArmR[i].GetComponent<Renderer>().enabled = true;
  4664. gFootL[i].GetComponent<Renderer>().enabled = true;
  4665. gFootR[i].GetComponent<Renderer>().enabled = true;
  4666. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4667. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4668. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4669. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4670. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4671. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4672. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4673. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4674. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4675. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4676. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4677. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4678. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4679. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4680. }
  4681. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4682. {
  4683. mNeck[i].ido = 1;
  4684. mNeck[i].reset = true;
  4685. mSpine[i].ido = 1;
  4686. mSpine[i].reset = true;
  4687. mSpine0a[i].ido = 1;
  4688. mSpine0a[i].reset = true;
  4689. mSpine1a[i].ido = 1;
  4690. mSpine1a[i].reset = true;
  4691. mSpine1[i].ido = 1;
  4692. mSpine1[i].reset = true;
  4693. mPelvis[i].ido = 1;
  4694. mPelvis[i].reset = true;
  4695. }
  4696. else if (ikMode[i] == 0)
  4697. {
  4698. gNeck[i].SetActive(true);
  4699. gSpine[i].SetActive(true);
  4700. gSpine0a[i].SetActive(true);
  4701. gSpine1a[i].SetActive(true);
  4702. gSpine1[i].SetActive(true);
  4703. gPelvis[i].SetActive(true);
  4704. if (mNeck[i].isHead)
  4705. {
  4706. mNeck[i].isHead = false;
  4707. isLookn[i] = isLook[i];
  4708. isLook[i] = !isLook[i];
  4709. }
  4710. mNeck[i].maid = maid;
  4711. mNeck[i].head = Neck[i];
  4712. mNeck[i].no = i;
  4713. mNeck[i].ido = 1;
  4714. gNeck[i].transform.position = Neck[i].position;
  4715. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4716. mSpine[i].maid = maid;
  4717. mSpine[i].head = Spine2[i];
  4718. mSpine[i].no = i;
  4719. mSpine[i].ido = 1;
  4720. gSpine[i].transform.position = Spine2[i].position;
  4721. gSpine[i].transform.eulerAngles =
  4722. new Vector3(Spine2[i].localEulerAngles.z,
  4723. Spine2[i].localEulerAngles.y,
  4724. Spine2[i].localEulerAngles.x);
  4725. mSpine0a[i].maid = maid;
  4726. mSpine0a[i].head = Spine0a2[i];
  4727. mSpine0a[i].no = i;
  4728. mSpine0a[i].ido = 1;
  4729. gSpine0a[i].transform.position = Spine0a2[i].position;
  4730. gSpine0a[i].transform.eulerAngles =
  4731. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4732. Spine0a2[i].localEulerAngles.x,
  4733. Spine0a2[i].localEulerAngles.y);
  4734. mSpine1a[i].maid = maid;
  4735. mSpine1a[i].head = Spine1a2[i];
  4736. mSpine1a[i].no = i;
  4737. mSpine1a[i].ido = 1;
  4738. gSpine1a[i].transform.position = Spine1a2[i].position;
  4739. gSpine1a[i].transform.localEulerAngles =
  4740. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4741. Spine1a2[i].localEulerAngles.x,
  4742. Spine1a2[i].localEulerAngles.y);
  4743. mSpine1[i].maid = maid;
  4744. mSpine1[i].head = Spine12[i];
  4745. mSpine1[i].no = i;
  4746. mSpine1[i].ido = 1;
  4747. gSpine1[i].transform.position = Spine12[i].position;
  4748. gSpine1[i].transform.localEulerAngles =
  4749. new Vector3(-Spine12[i].localEulerAngles.z,
  4750. Spine12[i].localEulerAngles.x,
  4751. Spine12[i].localEulerAngles.y);
  4752. mPelvis[i].maid = maid;
  4753. mPelvis[i].head = Pelvis2[i];
  4754. mPelvis[i].no = i;
  4755. mPelvis[i].ido = 1;
  4756. gPelvis[i].transform.position = Pelvis2[i].position;
  4757. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4758. if (mNeck[i].isIdo)
  4759. {
  4760. mNeck[i].isIdo = false;
  4761. isLock[i] = true;
  4762. }
  4763. if (mSpine[i].isIdo)
  4764. {
  4765. mSpine[i].isIdo = false;
  4766. flag13 = true;
  4767. isLock[i] = true;
  4768. }
  4769. if (mSpine0a[i].isIdo)
  4770. {
  4771. mSpine0a[i].isIdo = false;
  4772. flag13 = true;
  4773. isLock[i] = true;
  4774. }
  4775. if (mSpine1a[i].isIdo)
  4776. {
  4777. mSpine1a[i].isIdo = false;
  4778. flag13 = true;
  4779. isLock[i] = true;
  4780. }
  4781. if (mSpine1[i].isIdo)
  4782. {
  4783. mSpine1[i].isIdo = false;
  4784. flag13 = true;
  4785. isLock[i] = true;
  4786. }
  4787. if (mPelvis[i].isIdo)
  4788. {
  4789. mPelvis[i].isIdo = false;
  4790. flag13 = true;
  4791. isLock[i] = true;
  4792. }
  4793. if (mClavicleL[i].isIdo)
  4794. {
  4795. mClavicleL[i].isIdo = false;
  4796. flag13 = true;
  4797. isLock[i] = true;
  4798. }
  4799. if (mClavicleR[i].isIdo)
  4800. {
  4801. mClavicleR[i].isIdo = false;
  4802. flag13 = true;
  4803. isLock[i] = true;
  4804. }
  4805. }
  4806. }
  4807. else if (isChange[i])
  4808. {
  4809. isChange[i] = false;
  4810. gHandL[i].GetComponent<Renderer>().enabled = false;
  4811. gArmL[i].GetComponent<Renderer>().enabled = false;
  4812. gFootL[i].GetComponent<Renderer>().enabled = false;
  4813. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4814. gHandR[i].GetComponent<Renderer>().enabled = false;
  4815. gArmR[i].GetComponent<Renderer>().enabled = false;
  4816. gFootR[i].GetComponent<Renderer>().enabled = false;
  4817. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4818. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4819. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4820. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4821. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4822. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4823. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4824. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4825. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4826. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4827. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4828. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4829. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4830. gNeck[i].SetActive(false);
  4831. gSpine[i].SetActive(false);
  4832. gSpine0a[i].SetActive(false);
  4833. gSpine1a[i].SetActive(false);
  4834. gSpine1[i].SetActive(false);
  4835. gPelvis[i].SetActive(false);
  4836. gizmoHandL[i].Visible = false;
  4837. gizmoHandR[i].Visible = false;
  4838. gizmoFootL[i].Visible = false;
  4839. gizmoFootR[i].Visible = false;
  4840. }
  4841. if (flag13)
  4842. {
  4843. mHandL[i].initFlg = false;
  4844. mHandR[i].initFlg = false;
  4845. mFootL[i].initFlg = false;
  4846. mFootR[i].initFlg = false;
  4847. }
  4848. }
  4849. ikModeOld[i] = ikMode[i];
  4850. bool flag14 = false;
  4851. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4852. {
  4853. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4854. {
  4855. for (int k = 0; k < 10; k++)
  4856. {
  4857. maid.transform.RotateAround(maid.transform.position,
  4858. Vector3.right,
  4859. -maid.transform.rotation.eulerAngles.x);
  4860. maid.transform.RotateAround(maid.transform.position,
  4861. Vector3.forward,
  4862. -maid.transform.rotation.eulerAngles.z);
  4863. }
  4864. flag14 = true;
  4865. }
  4866. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4867. {
  4868. maid.transform.RotateAround(maid.transform.position,
  4869. new Vector3(vector3.x, 0f, vector3.z),
  4870. 0.3f);
  4871. maid.transform.RotateAround(maid.transform.position,
  4872. new Vector3(vector2.x, 0f, vector2.z),
  4873. 0.3f);
  4874. flag14 = true;
  4875. }
  4876. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4877. {
  4878. maid.transform.RotateAround(maid.transform.position,
  4879. new Vector3(vector3.x, 0f, vector3.z),
  4880. 0.3f);
  4881. maid.transform.RotateAround(maid.transform.position,
  4882. new Vector3(vector2.x, 0f, vector2.z),
  4883. -0.3f);
  4884. flag14 = true;
  4885. }
  4886. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4887. {
  4888. maid.transform.RotateAround(maid.transform.position,
  4889. new Vector3(vector3.x, 0f, vector3.z),
  4890. -0.3f);
  4891. maid.transform.RotateAround(maid.transform.position,
  4892. new Vector3(vector2.x, 0f, vector2.z),
  4893. 0.3f);
  4894. flag14 = true;
  4895. }
  4896. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4897. {
  4898. maid.transform.RotateAround(maid.transform.position,
  4899. new Vector3(vector3.x, 0f, vector3.z),
  4900. -0.3f);
  4901. maid.transform.RotateAround(maid.transform.position,
  4902. new Vector3(vector2.x, 0f, vector2.z),
  4903. -0.3f);
  4904. flag14 = true;
  4905. }
  4906. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4907. {
  4908. maid.transform.RotateAround(maid.transform.position,
  4909. new Vector3(vector3.x, 0f, vector3.z),
  4910. 0.4f);
  4911. flag14 = true;
  4912. }
  4913. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4914. {
  4915. maid.transform.RotateAround(maid.transform.position,
  4916. new Vector3(vector3.x, 0f, vector3.z),
  4917. -0.4f);
  4918. flag14 = true;
  4919. }
  4920. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4921. {
  4922. maid.transform.RotateAround(maid.transform.position,
  4923. new Vector3(vector2.x, 0f, vector2.z),
  4924. 0.4f);
  4925. flag14 = true;
  4926. }
  4927. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4928. {
  4929. maid.transform.RotateAround(maid.transform.position,
  4930. new Vector3(vector2.x, 0f, vector2.z),
  4931. -0.4f);
  4932. flag14 = true;
  4933. }
  4934. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4935. {
  4936. maid.body0.transform.localRotation =
  4937. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4938. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  4939. flag14 = true;
  4940. }
  4941. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  4942. {
  4943. maid.body0.transform.localRotation =
  4944. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4945. * Quaternion.AngleAxis(1.5f, Vector3.up);
  4946. flag14 = true;
  4947. }
  4948. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  4949. {
  4950. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  4951. flag14 = true;
  4952. }
  4953. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  4954. {
  4955. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  4956. flag14 = true;
  4957. }
  4958. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4959. {
  4960. Vector3 vector = maid.transform.position;
  4961. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4962. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4963. maid.SetPos(vector);
  4964. flag14 = true;
  4965. }
  4966. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4967. {
  4968. Vector3 vector = maid.transform.position;
  4969. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4970. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4971. maid.SetPos(vector);
  4972. flag14 = true;
  4973. }
  4974. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4975. {
  4976. Vector3 vector = maid.transform.position;
  4977. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4978. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4979. maid.SetPos(vector);
  4980. flag14 = true;
  4981. }
  4982. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4983. {
  4984. Vector3 vector = maid.transform.position;
  4985. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4986. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4987. maid.SetPos(vector);
  4988. flag14 = true;
  4989. }
  4990. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  4991. {
  4992. Vector3 vector = maid.transform.position;
  4993. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4994. maid.SetPos(vector);
  4995. flag14 = true;
  4996. }
  4997. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  4998. {
  4999. Vector3 vector = maid.transform.position;
  5000. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5001. maid.SetPos(vector);
  5002. flag14 = true;
  5003. }
  5004. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5005. {
  5006. Vector3 vector = maid.transform.position;
  5007. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5008. maid.SetPos(vector);
  5009. flag14 = true;
  5010. }
  5011. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5012. {
  5013. Vector3 vector = maid.transform.position;
  5014. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5015. maid.SetPos(vector);
  5016. flag14 = true;
  5017. }
  5018. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5019. {
  5020. Vector3 vector = maid.transform.position;
  5021. vector.y += 0.0075f * speed;
  5022. maid.SetPos(vector);
  5023. flag14 = true;
  5024. }
  5025. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5026. {
  5027. Vector3 vector = maid.transform.position;
  5028. vector.y -= 0.0075f * speed;
  5029. maid.SetPos(vector);
  5030. flag14 = true;
  5031. }
  5032. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5033. {
  5034. maid.transform.localScale =
  5035. new Vector3(maid.transform.localScale.x * 1.005f,
  5036. maid.transform.localScale.y * 1.005f,
  5037. maid.transform.localScale.z * 1.005f);
  5038. flag14 = true;
  5039. }
  5040. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5041. {
  5042. maid.transform.localScale =
  5043. new Vector3(maid.transform.localScale.x * 0.995f,
  5044. maid.transform.localScale.y * 0.995f,
  5045. maid.transform.localScale.z * 0.995f);
  5046. flag14 = true;
  5047. }
  5048. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5049. {
  5050. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5051. flag14 = true;
  5052. }
  5053. }
  5054. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5055. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5056. && i == ikMaid)
  5057. {
  5058. if (Input.GetKey(KeyCode.I))
  5059. {
  5060. if (ikMode[i] == 0)
  5061. {
  5062. Vector3 vector5 = HandL.position;
  5063. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5064. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5065. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5066. }
  5067. else if (ikMode[i] == 2)
  5068. {
  5069. Vector3 vector5 = HandL.position;
  5070. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5071. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5072. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5073. }
  5074. else if (ikMode[i] == 3)
  5075. {
  5076. if (ikBui == 1 || ikBui == 2)
  5077. {
  5078. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5079. }
  5080. else
  5081. {
  5082. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5083. }
  5084. }
  5085. else if (ikMode[i] == 4)
  5086. {
  5087. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5088. }
  5089. else if (ikMode[i] == 8)
  5090. {
  5091. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5092. }
  5093. else if (ikMode[i] == 6)
  5094. {
  5095. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5096. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5097. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5098. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5099. }
  5100. else if (ikMode[i] == 7)
  5101. {
  5102. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5103. }
  5104. else if (ikMode[i] == 5)
  5105. {
  5106. Vector3 vector5 = ForearmL.position;
  5107. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5108. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5109. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5110. }
  5111. else
  5112. {
  5113. Vector3 vector5 = ForearmL.position;
  5114. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5115. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5116. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5117. }
  5118. isStop[i] = true;
  5119. isLock[i] = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.K))
  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.J))
  5185. {
  5186. if (ikMode[i] == 0)
  5187. {
  5188. Vector3 vector5 = HandL.position;
  5189. vector5 += new Vector3(vector3.x, 0f, vector3.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(vector3.x, 0f, vector3.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(vector2.x, 0f, vector2.z), 0.8f);
  5205. }
  5206. else
  5207. {
  5208. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5209. }
  5210. }
  5211. else if (ikMode[i] == 4)
  5212. {
  5213. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5214. }
  5215. else if (ikMode[i] == 8)
  5216. {
  5217. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5218. }
  5219. else if (ikMode[i] == 6)
  5220. {
  5221. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5222. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5223. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5224. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5225. }
  5226. else if (ikMode[i] == 7)
  5227. {
  5228. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5229. }
  5230. else if (ikMode[i] == 5)
  5231. {
  5232. Vector3 vector5 = ForearmL.position;
  5233. vector5 += new Vector3(vector3.x, 0f, vector3.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(vector3.x, 0f, vector3.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.L))
  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.U))
  5311. {
  5312. if (ikMode[i] == 3)
  5313. {
  5314. HandL.localRotation =
  5315. Quaternion.Euler(HandL.localEulerAngles)
  5316. * Quaternion.AngleAxis(1f, Vector3.right);
  5317. isStop[i] = true;
  5318. isLock[i] = true;
  5319. }
  5320. else if (ikMode[i] == 4)
  5321. {
  5322. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5323. isStop[i] = true;
  5324. isLock[i] = true;
  5325. }
  5326. else if (ikMode[i] == 8)
  5327. {
  5328. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5329. isStop[i] = true;
  5330. isLock[i] = true;
  5331. }
  5332. else if (ikMode[i] == 6)
  5333. {
  5334. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5335. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5336. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5337. isStop[i] = true;
  5338. isLock[i] = true;
  5339. }
  5340. else if (ikMode[i] == 7)
  5341. {
  5342. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5343. isStop[i] = true;
  5344. isLock[i] = true;
  5345. }
  5346. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5347. {
  5348. UpperArmL.localRotation =
  5349. Quaternion.Euler(UpperArmL.localEulerAngles)
  5350. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5351. isStop[i] = true;
  5352. isLock[i] = true;
  5353. }
  5354. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5355. {
  5356. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5357. isStop[i] = true;
  5358. isLock[i] = true;
  5359. }
  5360. }
  5361. else if (Input.GetKey(KeyCode.O))
  5362. {
  5363. if (ikMode[i] == 3)
  5364. {
  5365. HandL.localRotation =
  5366. Quaternion.Euler(HandL.localEulerAngles)
  5367. * Quaternion.AngleAxis(-1f, Vector3.right);
  5368. isStop[i] = true;
  5369. isLock[i] = true;
  5370. }
  5371. else if (ikMode[i] == 4)
  5372. {
  5373. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5374. isStop[i] = true;
  5375. isLock[i] = true;
  5376. }
  5377. else if (ikMode[i] == 8)
  5378. {
  5379. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (ikMode[i] == 6)
  5384. {
  5385. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5386. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5387. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5388. isStop[i] = true;
  5389. isLock[i] = true;
  5390. }
  5391. else if (ikMode[i] == 7)
  5392. {
  5393. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5394. isStop[i] = true;
  5395. isLock[i] = true;
  5396. }
  5397. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5398. {
  5399. UpperArmL.localRotation =
  5400. Quaternion.Euler(UpperArmL.localEulerAngles)
  5401. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5402. isStop[i] = true;
  5403. isLock[i] = true;
  5404. }
  5405. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5406. {
  5407. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5408. isStop[i] = true;
  5409. isLock[i] = true;
  5410. }
  5411. }
  5412. else if (Input.GetKey(KeyCode.Alpha0))
  5413. {
  5414. if (ikMode[i] == 0)
  5415. {
  5416. Vector3 vector5 = HandL.position;
  5417. vector5.y += 0.005f;
  5418. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5419. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5420. }
  5421. else if (ikMode[i] == 2)
  5422. {
  5423. Vector3 vector5 = HandL.position;
  5424. vector5.y += 0.005f;
  5425. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5426. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5427. }
  5428. else if (ikMode[i] == 5)
  5429. {
  5430. Vector3 vector5 = ForearmL.position;
  5431. vector5.y += 0.0035f;
  5432. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5433. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5434. }
  5435. else
  5436. {
  5437. Vector3 vector5 = ForearmL.position;
  5438. vector5.y += 0.0035f;
  5439. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5440. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5441. }
  5442. isStop[i] = true;
  5443. isLock[i] = true;
  5444. }
  5445. else if (Input.GetKey(KeyCode.P))
  5446. {
  5447. if (ikMode[i] == 0)
  5448. {
  5449. Vector3 vector5 = HandL.position;
  5450. vector5.y -= 0.005f;
  5451. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5452. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5453. }
  5454. else if (ikMode[i] == 2)
  5455. {
  5456. Vector3 vector5 = HandL.position;
  5457. vector5.y -= 0.005f;
  5458. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5459. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5460. }
  5461. else if (ikMode[i] == 5)
  5462. {
  5463. Vector3 vector5 = ForearmL.position;
  5464. vector5.y -= 0.0035f;
  5465. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5466. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5467. }
  5468. else
  5469. {
  5470. Vector3 vector5 = ForearmL.position;
  5471. vector5.y -= 0.0035f;
  5472. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5473. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5474. }
  5475. isStop[i] = true;
  5476. isLock[i] = true;
  5477. }
  5478. }
  5479. }
  5480. }
  5481. }
  5482. }
  5483. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5484. {
  5485. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5486. idoFlg[i] = true;
  5487. }
  5488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5489. {
  5490. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5491. idoFlg[i] = true;
  5492. }
  5493. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5494. {
  5495. if (!xFlg[i])
  5496. {
  5497. xFlg[i] = true;
  5498. zFlg[i] = false;
  5499. if (maid.status.personal.uniqueName == "Pride")
  5500. {
  5501. string text = "s0_";
  5502. Random random = new Random();
  5503. int num4 = random.Next(10000);
  5504. bool flag7 = false;
  5505. for (int k = 0; k < tunArray.Length; k++)
  5506. {
  5507. if (tunArray[k] == num4)
  5508. {
  5509. flag7 = true;
  5510. break;
  5511. }
  5512. }
  5513. if (!flag7)
  5514. {
  5515. text = text + "0" + num4.ToString() + ".ogg";
  5516. if (GameUty.FileSystem.IsExistentFile(text))
  5517. {
  5518. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5519. }
  5520. }
  5521. }
  5522. if (maid.status.personal.uniqueName == "Cool")
  5523. {
  5524. string text = "s1_";
  5525. Random random = new Random();
  5526. int num4 = random.Next(10000);
  5527. bool flag7 = false;
  5528. for (int k = 0; k < coolArray.Length; k++)
  5529. {
  5530. if (coolArray[k] == num4)
  5531. {
  5532. flag7 = true;
  5533. break;
  5534. }
  5535. }
  5536. if (!flag7)
  5537. {
  5538. text = text + "0" + num4.ToString() + ".ogg";
  5539. if (GameUty.FileSystem.IsExistentFile(text))
  5540. {
  5541. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5542. }
  5543. }
  5544. }
  5545. if (maid.status.personal.uniqueName == "Pure")
  5546. {
  5547. string text = "s2_";
  5548. Random random = new Random();
  5549. int num4 = random.Next(10000);
  5550. bool flag7 = false;
  5551. for (int k = 0; k < pureArray.Length; k++)
  5552. {
  5553. if (pureArray[k] == num4)
  5554. {
  5555. flag7 = true;
  5556. break;
  5557. }
  5558. }
  5559. if (!flag7)
  5560. {
  5561. text = text + "0" + num4.ToString() + ".ogg";
  5562. if (GameUty.FileSystem.IsExistentFile(text))
  5563. {
  5564. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5565. }
  5566. }
  5567. }
  5568. if (maid.status.personal.uniqueName == "Yandere")
  5569. {
  5570. string text = "s3_";
  5571. Random random = new Random();
  5572. int num4 = random.Next(10000);
  5573. bool flag7 = false;
  5574. for (int k = 0; k < yanArray.Length; k++)
  5575. {
  5576. if (yanArray[k] == num4)
  5577. {
  5578. flag7 = true;
  5579. break;
  5580. }
  5581. }
  5582. if (!flag7)
  5583. {
  5584. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5585. if (GameUty.FileSystem.IsExistentFile(text))
  5586. {
  5587. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5588. }
  5589. }
  5590. }
  5591. if (maid.status.personal.uniqueName == "Muku")
  5592. {
  5593. string text = "h0_";
  5594. Random random = new Random();
  5595. int num4 = random.Next(10000);
  5596. bool flag7 = false;
  5597. for (int k = 0; k < h0Array.Length; k++)
  5598. {
  5599. if (h0Array[k] == num4)
  5600. {
  5601. flag7 = true;
  5602. break;
  5603. }
  5604. }
  5605. if (flag7)
  5606. {
  5607. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5608. if (GameUty.FileSystem.IsExistentFile(text))
  5609. {
  5610. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5611. }
  5612. }
  5613. }
  5614. if (maid.status.personal.uniqueName == "Majime")
  5615. {
  5616. string text = "h1_";
  5617. Random random = new Random();
  5618. int num4 = random.Next(10000);
  5619. bool flag7 = false;
  5620. for (int k = 0; k < h1Array.Length; k++)
  5621. {
  5622. if (h1Array[k] == num4)
  5623. {
  5624. flag7 = true;
  5625. break;
  5626. }
  5627. }
  5628. if (flag7)
  5629. {
  5630. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5631. if (GameUty.FileSystem.IsExistentFile(text))
  5632. {
  5633. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5634. }
  5635. }
  5636. }
  5637. if (maid.status.personal.uniqueName == "Rindere")
  5638. {
  5639. string text = "h2_";
  5640. Random random = new Random();
  5641. int num4 = random.Next(10000);
  5642. bool flag7 = false;
  5643. for (int k = 0; k < h2Array.Length; k++)
  5644. {
  5645. if (h2Array[k] == num4)
  5646. {
  5647. flag7 = true;
  5648. break;
  5649. }
  5650. }
  5651. if (flag7)
  5652. {
  5653. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5654. if (GameUty.FileSystem.IsExistentFile(text))
  5655. {
  5656. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5657. }
  5658. }
  5659. }
  5660. }
  5661. else
  5662. {
  5663. xFlg[i] = false;
  5664. maid.AudioMan.Clear();
  5665. }
  5666. idoFlg[i] = true;
  5667. }
  5668. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5669. {
  5670. if (!zFlg[i])
  5671. {
  5672. zFlg[i] = true;
  5673. xFlg[i] = false;
  5674. string text = "";
  5675. if (maid.status.personal.uniqueName == "Pride")
  5676. {
  5677. text = "s0_";
  5678. Random random = new Random();
  5679. int num4 = random.Next(tunArray.Length);
  5680. object obj = text;
  5681. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5682. }
  5683. if (maid.status.personal.uniqueName == "Cool")
  5684. {
  5685. text = "s1_";
  5686. Random random = new Random();
  5687. int num4 = random.Next(coolArray.Length);
  5688. object obj = text;
  5689. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5690. }
  5691. if (maid.status.personal.uniqueName == "Pure")
  5692. {
  5693. text = "s2_";
  5694. Random random = new Random();
  5695. int num4 = random.Next(pureArray.Length);
  5696. object obj = text;
  5697. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5698. }
  5699. if (maid.status.personal.uniqueName == "Yandere")
  5700. {
  5701. text = "s3_";
  5702. Random random = new Random();
  5703. int num4 = random.Next(yanArray.Length);
  5704. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5705. }
  5706. if (maid.status.personal.uniqueName == "Muku")
  5707. {
  5708. text = "h0_";
  5709. Random random = new Random();
  5710. int num4 = random.Next(h0tArray.Length);
  5711. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5712. }
  5713. if (maid.status.personal.uniqueName == "Majime")
  5714. {
  5715. text = "h1_";
  5716. Random random = new Random();
  5717. int num4 = random.Next(h1tArray.Length);
  5718. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5719. }
  5720. if (maid.status.personal.uniqueName == "Rindere")
  5721. {
  5722. text = "h2_";
  5723. Random random = new Random();
  5724. int num4 = random.Next(h2tArray.Length);
  5725. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5726. }
  5727. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5728. }
  5729. else
  5730. {
  5731. zFlg[i] = false;
  5732. maid.AudioMan.Clear();
  5733. }
  5734. idoFlg[i] = true;
  5735. }
  5736. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5737. {
  5738. string text = "";
  5739. if (maid.status.personal.uniqueName == "Pride")
  5740. {
  5741. text = "s0_";
  5742. Random random = new Random();
  5743. int num4 = random.Next(tunArray.Length);
  5744. object obj = text;
  5745. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5746. }
  5747. if (maid.status.personal.uniqueName == "Cool")
  5748. {
  5749. text = "s1_";
  5750. Random random = new Random();
  5751. int num4 = random.Next(coolArray.Length);
  5752. object obj = text;
  5753. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5754. }
  5755. if (maid.status.personal.uniqueName == "Pure")
  5756. {
  5757. text = "s2_";
  5758. Random random = new Random();
  5759. int num4 = random.Next(pureArray.Length);
  5760. object obj = text;
  5761. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5762. }
  5763. if (maid.status.personal.uniqueName == "Yandere")
  5764. {
  5765. text = "s3_";
  5766. Random random = new Random();
  5767. int num4 = random.Next(yanArray.Length);
  5768. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5769. }
  5770. if (maid.status.personal.uniqueName == "Muku")
  5771. {
  5772. text = "h0_";
  5773. Random random = new Random();
  5774. int num4 = random.Next(h0tArray.Length);
  5775. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5776. }
  5777. if (maid.status.personal.uniqueName == "Majime")
  5778. {
  5779. text = "h1_";
  5780. Random random = new Random();
  5781. int num4 = random.Next(h1tArray.Length);
  5782. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5783. }
  5784. if (maid.status.personal.uniqueName == "Rindere")
  5785. {
  5786. text = "h2_";
  5787. Random random = new Random();
  5788. int num4 = random.Next(h2tArray.Length);
  5789. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5790. }
  5791. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5792. idoFlg[i] = true;
  5793. }
  5794. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5795. {
  5796. if (maid.status.personal.uniqueName == "Pride")
  5797. {
  5798. string text = "s0_";
  5799. Random random = new Random();
  5800. int num4 = random.Next(10000);
  5801. bool flag7 = false;
  5802. for (int k = 0; k < tunArray.Length; k++)
  5803. {
  5804. if (tunArray[k] == num4)
  5805. {
  5806. flag7 = true;
  5807. break;
  5808. }
  5809. }
  5810. if (!flag7)
  5811. {
  5812. text = text + "0" + num4.ToString() + ".ogg";
  5813. if (GameUty.FileSystem.IsExistentFile(text))
  5814. {
  5815. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5816. }
  5817. }
  5818. }
  5819. if (maid.status.personal.uniqueName == "Cool")
  5820. {
  5821. string text = "s1_";
  5822. Random random = new Random();
  5823. int num4 = random.Next(10000);
  5824. bool flag7 = false;
  5825. for (int k = 0; k < coolArray.Length; k++)
  5826. {
  5827. if (coolArray[k] == num4)
  5828. {
  5829. flag7 = true;
  5830. break;
  5831. }
  5832. }
  5833. if (!flag7)
  5834. {
  5835. text = text + "0" + num4.ToString() + ".ogg";
  5836. if (GameUty.FileSystem.IsExistentFile(text))
  5837. {
  5838. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5839. }
  5840. }
  5841. }
  5842. if (maid.status.personal.uniqueName == "Pure")
  5843. {
  5844. string text = "s2_";
  5845. Random random = new Random();
  5846. int num4 = random.Next(10000);
  5847. bool flag7 = false;
  5848. for (int k = 0; k < pureArray.Length; k++)
  5849. {
  5850. if (pureArray[k] == num4)
  5851. {
  5852. flag7 = true;
  5853. break;
  5854. }
  5855. }
  5856. if (!flag7)
  5857. {
  5858. text = text + "0" + num4.ToString() + ".ogg";
  5859. if (GameUty.FileSystem.IsExistentFile(text))
  5860. {
  5861. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5862. }
  5863. }
  5864. }
  5865. if (maid.status.personal.uniqueName == "Yandere")
  5866. {
  5867. string text = "s3_";
  5868. Random random = new Random();
  5869. int num4 = random.Next(10000);
  5870. bool flag7 = false;
  5871. for (int k = 0; k < yanArray.Length; k++)
  5872. {
  5873. if (yanArray[k] == num4)
  5874. {
  5875. flag7 = true;
  5876. break;
  5877. }
  5878. }
  5879. if (!flag7)
  5880. {
  5881. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5882. if (GameUty.FileSystem.IsExistentFile(text))
  5883. {
  5884. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5885. }
  5886. }
  5887. }
  5888. if (maid.status.personal.uniqueName == "Muku")
  5889. {
  5890. string text = "h0_";
  5891. Random random = new Random();
  5892. int num4 = random.Next(10000);
  5893. bool flag7 = false;
  5894. for (int k = 0; k < h0Array.Length; k++)
  5895. {
  5896. if (h0Array[k] == num4)
  5897. {
  5898. flag7 = true;
  5899. break;
  5900. }
  5901. }
  5902. if (flag7)
  5903. {
  5904. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5905. if (GameUty.FileSystem.IsExistentFile(text))
  5906. {
  5907. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5908. }
  5909. }
  5910. }
  5911. if (maid.status.personal.uniqueName == "Majime")
  5912. {
  5913. string text = "h1_";
  5914. Random random = new Random();
  5915. int num4 = random.Next(10000);
  5916. bool flag7 = false;
  5917. for (int k = 0; k < h1Array.Length; k++)
  5918. {
  5919. if (h1Array[k] == num4)
  5920. {
  5921. flag7 = true;
  5922. break;
  5923. }
  5924. }
  5925. if (flag7)
  5926. {
  5927. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5928. if (GameUty.FileSystem.IsExistentFile(text))
  5929. {
  5930. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5931. }
  5932. }
  5933. }
  5934. if (maid.status.personal.uniqueName == "Rindere")
  5935. {
  5936. string text = "h2_";
  5937. Random random = new Random();
  5938. int num4 = random.Next(10000);
  5939. bool flag7 = false;
  5940. for (int k = 0; k < h2Array.Length; k++)
  5941. {
  5942. if (h2Array[k] == num4)
  5943. {
  5944. flag7 = true;
  5945. break;
  5946. }
  5947. }
  5948. if (flag7)
  5949. {
  5950. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5951. if (GameUty.FileSystem.IsExistentFile(text))
  5952. {
  5953. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5954. }
  5955. }
  5956. }
  5957. idoFlg[i] = true;
  5958. }
  5959. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  5960. {
  5961. Vector3 vector = maid.transform.position;
  5962. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5963. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5964. maid.SetPos(vector);
  5965. idoFlg[i] = true;
  5966. }
  5967. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  5968. {
  5969. Vector3 vector = maid.transform.position;
  5970. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5971. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5972. maid.SetPos(vector);
  5973. idoFlg[i] = true;
  5974. }
  5975. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  5976. {
  5977. Vector3 vector = maid.transform.position;
  5978. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5979. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5980. maid.SetPos(vector);
  5981. idoFlg[i] = true;
  5982. }
  5983. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  5984. {
  5985. Vector3 vector = maid.transform.position;
  5986. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5987. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5988. maid.SetPos(vector);
  5989. idoFlg[i] = true;
  5990. }
  5991. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  5992. {
  5993. Vector3 vector = maid.transform.position;
  5994. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5995. maid.SetPos(vector);
  5996. idoFlg[i] = true;
  5997. }
  5998. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  5999. {
  6000. Vector3 vector = maid.transform.position;
  6001. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6002. maid.SetPos(vector);
  6003. idoFlg[i] = true;
  6004. }
  6005. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6006. {
  6007. Vector3 vector = maid.transform.position;
  6008. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6009. maid.SetPos(vector);
  6010. idoFlg[i] = true;
  6011. }
  6012. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6013. {
  6014. Vector3 vector = maid.transform.position;
  6015. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6016. maid.SetPos(vector);
  6017. idoFlg[i] = true;
  6018. }
  6019. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6020. {
  6021. Vector3 vector = maid.transform.position;
  6022. vector.y += 0.0075f * speed;
  6023. maid.SetPos(vector);
  6024. idoFlg[i] = true;
  6025. }
  6026. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6027. {
  6028. Vector3 vector = maid.transform.position;
  6029. vector.y -= 0.0075f * speed;
  6030. maid.SetPos(vector);
  6031. idoFlg[i] = true;
  6032. }
  6033. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6034. {
  6035. faceIndex[i]--;
  6036. if (faceIndex[i] <= -1)
  6037. {
  6038. faceIndex[i] = faceArray.Length - 1;
  6039. }
  6040. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6041. idoFlg[i] = true;
  6042. }
  6043. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6044. {
  6045. faceIndex[i]++;
  6046. if (faceIndex[i] == faceArray.Length)
  6047. {
  6048. faceIndex[i] = 0;
  6049. }
  6050. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6051. idoFlg[i] = true;
  6052. }
  6053. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6054. {
  6055. faceBlendIndex[i]++;
  6056. if (faceBlendIndex[i] == faceBlendArray.Length)
  6057. {
  6058. faceBlendIndex[i] = 0;
  6059. }
  6060. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6061. idoFlg[i] = true;
  6062. }
  6063. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6064. {
  6065. idoFlg[i] = true;
  6066. if (i >= 7)
  6067. {
  6068. idoFlg[i - 7] = true;
  6069. }
  6070. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6071. maid.transform.localScale.y * 1.005f,
  6072. maid.transform.localScale.z * 1.005f);
  6073. }
  6074. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6075. {
  6076. idoFlg[i] = true;
  6077. if (i >= 7)
  6078. {
  6079. idoFlg[i - 7] = true;
  6080. }
  6081. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6082. maid.transform.localScale.y * 0.995f,
  6083. maid.transform.localScale.z * 0.995f);
  6084. }
  6085. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6086. {
  6087. idoFlg[i] = true;
  6088. if (i >= 7)
  6089. {
  6090. idoFlg[i - 7] = true;
  6091. }
  6092. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6093. }
  6094. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6095. {
  6096. if (!isVR)
  6097. {
  6098. if (goSlot[(int)selectList[i]] != null)
  6099. {
  6100. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6101. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6102. {
  6103. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6104. }
  6105. }
  6106. }
  6107. maid.body0.SetMask(TBody.SlotID.wear, true);
  6108. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6109. maid.body0.SetMask(TBody.SlotID.bra, true);
  6110. maid.body0.SetMask(TBody.SlotID.panz, true);
  6111. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6112. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6113. isWear = true;
  6114. isSkirt = true;
  6115. isBra = true;
  6116. isPanz = true;
  6117. Random random = new Random();
  6118. int num4 = random.Next(2);
  6119. if (num4 == 1)
  6120. {
  6121. maid.body0.SetMask(TBody.SlotID.wear, false);
  6122. }
  6123. if (num4 == 1)
  6124. {
  6125. isWear = false;
  6126. }
  6127. num4 = random.Next(2);
  6128. if (num4 == 1)
  6129. {
  6130. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6131. }
  6132. if (num4 == 1)
  6133. {
  6134. isSkirt = false;
  6135. }
  6136. num4 = random.Next(2);
  6137. if (num4 == 1)
  6138. {
  6139. maid.body0.SetMask(TBody.SlotID.bra, false);
  6140. }
  6141. if (num4 == 1)
  6142. {
  6143. isBra = false;
  6144. }
  6145. num4 = random.Next(2);
  6146. if (num4 == 1)
  6147. {
  6148. maid.body0.SetMask(TBody.SlotID.panz, false);
  6149. }
  6150. if (num4 == 1)
  6151. {
  6152. isPanz = false;
  6153. }
  6154. num4 = random.Next(2);
  6155. if (num4 == 1)
  6156. {
  6157. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6158. }
  6159. num4 = random.Next(2);
  6160. if (num4 == 1)
  6161. {
  6162. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6163. }
  6164. hFlg = true;
  6165. idoFlg[i] = true;
  6166. if (i >= 7)
  6167. {
  6168. idoFlg[i - 7] = true;
  6169. }
  6170. }
  6171. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6172. {
  6173. poseIndex[i]--;
  6174. if (poseIndex[i] <= -1)
  6175. {
  6176. poseIndex[i] = poseArray.Length - 1;
  6177. }
  6178. if (maid && maid.Visible)
  6179. {
  6180. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6181. isStop[i] = false;
  6182. poseCount[i] = 20;
  6183. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6184. {
  6185. maid.body0.MuneYureL(0f);
  6186. maid.body0.MuneYureR(0f);
  6187. }
  6188. else
  6189. {
  6190. maid.body0.MuneYureL(1f);
  6191. maid.body0.MuneYureR(1f);
  6192. }
  6193. if (array[0].Contains("MultipleMaidsPose"))
  6194. {
  6195. string path = array[0].Split(new char[] { '/' })[1];
  6196. byte[] array2 = new byte[0];
  6197. try
  6198. {
  6199. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6200. {
  6201. array2 = new byte[fileStream.Length];
  6202. fileStream.Read(array2, 0, array2.Length);
  6203. }
  6204. }
  6205. catch { }
  6206. if (0 < array2.Length)
  6207. {
  6208. string text = Path.GetFileName(path);
  6209. long num5 = text.GetHashCode();
  6210. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6211. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6212. {
  6213. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6214. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6215. };
  6216. for (int m = 0; m < array3.Length; m++)
  6217. {
  6218. maid.SetAutoTwist(array3[m], true);
  6219. }
  6220. }
  6221. }
  6222. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6223. {
  6224. loadPose[i] = array[0];
  6225. }
  6226. else if (!array[0].StartsWith("dance_"))
  6227. {
  6228. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6229. }
  6230. else
  6231. {
  6232. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6233. {
  6234. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6235. }
  6236. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6237. }
  6238. if (array.Length > 1)
  6239. {
  6240. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6241. isStop[i] = true;
  6242. if (array.Length > 2)
  6243. {
  6244. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6245. isPoseIti[i] = true;
  6246. poseIti[i] = maidArray[i].transform.position;
  6247. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6248. }
  6249. }
  6250. }
  6251. idoFlg[i] = true;
  6252. if (i >= 7)
  6253. {
  6254. idoFlg[i - 7] = true;
  6255. }
  6256. }
  6257. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6258. {
  6259. int num7 = poseIndex[i];
  6260. for (int k = 0; k < groupList.Count; k++)
  6261. {
  6262. if (poseIndex[i] < (int)groupList[k])
  6263. {
  6264. poseIndex[i] = (int)groupList[k];
  6265. break;
  6266. }
  6267. }
  6268. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6269. {
  6270. poseIndex[i] = 0;
  6271. }
  6272. if (maid && maid.Visible)
  6273. {
  6274. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6275. isStop[i] = false;
  6276. poseCount[i] = 20;
  6277. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6278. {
  6279. maid.body0.MuneYureL(0f);
  6280. maid.body0.MuneYureR(0f);
  6281. }
  6282. else
  6283. {
  6284. maid.body0.MuneYureL(1f);
  6285. maid.body0.MuneYureR(1f);
  6286. }
  6287. if (array[0].Contains("MultipleMaidsPose"))
  6288. {
  6289. string path = array[0].Split(new char[] { '/' })[1];
  6290. byte[] array2 = new byte[0];
  6291. try
  6292. {
  6293. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6294. {
  6295. array2 = new byte[fileStream.Length];
  6296. fileStream.Read(array2, 0, array2.Length);
  6297. }
  6298. }
  6299. catch { }
  6300. if (0 < array2.Length)
  6301. {
  6302. string text = Path.GetFileName(path);
  6303. long num5 = text.GetHashCode();
  6304. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6305. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6306. {
  6307. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6308. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6309. };
  6310. for (int m = 0; m < array3.Length; m++)
  6311. {
  6312. maid.SetAutoTwist(array3[m], true);
  6313. }
  6314. }
  6315. }
  6316. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6317. {
  6318. loadPose[i] = array[0];
  6319. }
  6320. else if (!array[0].StartsWith("dance_"))
  6321. {
  6322. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6323. }
  6324. else
  6325. {
  6326. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6327. {
  6328. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6329. }
  6330. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6331. }
  6332. if (array.Length > 1)
  6333. {
  6334. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6335. isStop[i] = true;
  6336. if (array.Length > 2)
  6337. {
  6338. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6339. isPoseIti[i] = true;
  6340. poseIti[i] = maidArray[i].transform.position;
  6341. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6342. }
  6343. }
  6344. }
  6345. idoFlg[i] = true;
  6346. if (i >= 7)
  6347. {
  6348. idoFlg[i - 7] = true;
  6349. }
  6350. }
  6351. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6352. {
  6353. for (int k = 0; k < groupList.Count; k++)
  6354. {
  6355. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6356. {
  6357. if (poseIndex[i] == 0)
  6358. {
  6359. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6360. }
  6361. else
  6362. {
  6363. poseIndex[i] = 0;
  6364. }
  6365. break;
  6366. }
  6367. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6368. {
  6369. poseIndex[i] = (int)groupList[k - 1];
  6370. break;
  6371. }
  6372. }
  6373. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6374. {
  6375. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6376. }
  6377. if (maid && maid.Visible)
  6378. {
  6379. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6380. isStop[i] = false;
  6381. poseCount[i] = 20;
  6382. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6383. {
  6384. maid.body0.MuneYureL(0f);
  6385. maid.body0.MuneYureR(0f);
  6386. }
  6387. else
  6388. {
  6389. maid.body0.MuneYureL(1f);
  6390. maid.body0.MuneYureR(1f);
  6391. }
  6392. if (array[0].Contains("MultipleMaidsPose"))
  6393. {
  6394. string path = array[0].Split(new char[] { '/' })[1];
  6395. byte[] array2 = new byte[0];
  6396. try
  6397. {
  6398. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6399. {
  6400. array2 = new byte[fileStream.Length];
  6401. fileStream.Read(array2, 0, array2.Length);
  6402. }
  6403. }
  6404. catch { }
  6405. if (0 < array2.Length)
  6406. {
  6407. string text = Path.GetFileName(path);
  6408. long num5 = text.GetHashCode();
  6409. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6410. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6411. {
  6412. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6413. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6414. };
  6415. for (int m = 0; m < array3.Length; m++)
  6416. {
  6417. maid.SetAutoTwist(array3[m], true);
  6418. }
  6419. }
  6420. }
  6421. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6422. {
  6423. loadPose[i] = array[0];
  6424. }
  6425. else if (!array[0].StartsWith("dance_"))
  6426. {
  6427. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6428. }
  6429. else
  6430. {
  6431. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6432. {
  6433. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6434. }
  6435. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6436. }
  6437. if (array.Length > 1)
  6438. {
  6439. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6440. isStop[i] = true;
  6441. if (array.Length > 2)
  6442. {
  6443. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6444. isPoseIti[i] = true;
  6445. poseIti[i] = maidArray[i].transform.position;
  6446. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6447. }
  6448. }
  6449. }
  6450. idoFlg[i] = true;
  6451. if (i >= 7)
  6452. {
  6453. idoFlg[i - 7] = true;
  6454. }
  6455. }
  6456. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6457. {
  6458. headEyeIndex[i]++;
  6459. if (headEyeIndex[i] == headEyeArray.Length)
  6460. {
  6461. headEyeIndex[i] = 0;
  6462. }
  6463. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6464. maid.body0.boHeadToCam = true;
  6465. maid.body0.boEyeToCam = true;
  6466. if (headEyeIndex[i] == 0)
  6467. {
  6468. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6469. maid.body0.boHeadToCam = true;
  6470. maid.body0.boEyeToCam = true;
  6471. }
  6472. else
  6473. {
  6474. maid.body0.trsLookTarget = null;
  6475. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6476. if (headEyeIndex[i] == 1)
  6477. {
  6478. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6479. }
  6480. if (headEyeIndex[i] == 2)
  6481. {
  6482. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6483. }
  6484. if (headEyeIndex[i] == 3)
  6485. {
  6486. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6487. }
  6488. if (headEyeIndex[i] == 4)
  6489. {
  6490. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6491. }
  6492. if (headEyeIndex[i] == 5)
  6493. {
  6494. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6495. }
  6496. if (headEyeIndex[i] == 6)
  6497. {
  6498. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6499. }
  6500. if (headEyeIndex[i] == 7)
  6501. {
  6502. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6503. }
  6504. if (headEyeIndex[i] == 8)
  6505. {
  6506. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6507. }
  6508. if (headEyeIndex[i] == 9)
  6509. {
  6510. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  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.GetKey(KeyCode.Return))
  6520. {
  6521. idoFlg[i] = true;
  6522. if (i >= 7)
  6523. {
  6524. idoFlg[i - 7] = true;
  6525. }
  6526. }
  6527. else if (Input.GetKeyUp(key))
  6528. {
  6529. if (idoFlg[i])
  6530. {
  6531. idoFlg[i] = false;
  6532. }
  6533. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6534. {
  6535. if (!isLock[i])
  6536. {
  6537. poseIndex[i]++;
  6538. if (poseIndex[i] == poseArray.Length)
  6539. {
  6540. poseIndex[i] = 0;
  6541. }
  6542. if (maid && maid.Visible)
  6543. {
  6544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6545. isStop[i] = false;
  6546. poseCount[i] = 20;
  6547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6548. {
  6549. maid.body0.MuneYureL(0f);
  6550. maid.body0.MuneYureR(0f);
  6551. }
  6552. else
  6553. {
  6554. maid.body0.MuneYureL(1f);
  6555. maid.body0.MuneYureR(1f);
  6556. }
  6557. if (array[0].Contains("MultipleMaidsPose"))
  6558. {
  6559. string path = array[0].Split(new char[] { '/' })[1];
  6560. byte[] array2 = new byte[0];
  6561. try
  6562. {
  6563. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6564. {
  6565. array2 = new byte[fileStream.Length];
  6566. fileStream.Read(array2, 0, array2.Length);
  6567. }
  6568. }
  6569. catch { }
  6570. if (0 < array2.Length)
  6571. {
  6572. string text = Path.GetFileName(path);
  6573. long num5 = text.GetHashCode();
  6574. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6575. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6576. {
  6577. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6578. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6579. };
  6580. for (int m = 0; m < array3.Length; m++)
  6581. {
  6582. maid.SetAutoTwist(array3[m], true);
  6583. }
  6584. }
  6585. }
  6586. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6587. {
  6588. loadPose[i] = array[0];
  6589. }
  6590. else if (!array[0].StartsWith("dance_"))
  6591. {
  6592. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6593. }
  6594. else
  6595. {
  6596. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6597. {
  6598. maid.body0.LoadAnime(array[0] + ".anm",
  6599. GameUty.FileSystem,
  6600. array[0] + ".anm",
  6601. false,
  6602. false);
  6603. }
  6604. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6605. }
  6606. if (array.Length > 1)
  6607. {
  6608. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6609. isStop[i] = true;
  6610. if (array.Length > 2)
  6611. {
  6612. Transform transform2 =
  6613. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6614. isPoseIti[i] = true;
  6615. poseIti[i] = maidArray[i].transform.position;
  6616. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6617. }
  6618. }
  6619. }
  6620. }
  6621. }
  6622. }
  6623. goto IL_1688E;
  6624. }
  6625. }
  6626. if (Input.GetKeyDown(KeyCode.E)) { }
  6627. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6628. {
  6629. bGui = false;
  6630. }
  6631. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6632. {
  6633. sceneFlg = true;
  6634. faceFlg = false;
  6635. poseFlg = false;
  6636. kankyoFlg = false;
  6637. kankyo2Flg = false;
  6638. bGui = true;
  6639. for(int i = 0; i < 10; i++)
  6640. {
  6641. date[i] = "未保存";
  6642. ninzu[i] = "";
  6643. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6644. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6645. {
  6646. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6647. if (array4.Length >= 2)
  6648. {
  6649. string[] array5 = array4[0].Split(new char[] { ',' });
  6650. date[i] = array5[0];
  6651. ninzu[i] = array5[1] + "人";
  6652. }
  6653. }
  6654. }
  6655. }
  6656. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6657. {
  6658. bgmIndex--;
  6659. if (bgmIndex <= -1)
  6660. {
  6661. bgmIndex = bgmArray.Length - 1;
  6662. }
  6663. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6664. bgmCombo.selectedItemIndex = bgmIndex;
  6665. }
  6666. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6667. {
  6668. bgmIndex++;
  6669. if (bgmIndex == bgmArray.Length)
  6670. {
  6671. bgmIndex = 0;
  6672. }
  6673. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6674. bgmCombo.selectedItemIndex = bgmIndex;
  6675. }
  6676. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6677. {
  6678. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6679. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6680. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6681. if (isMessage)
  6682. {
  6683. isMessage = false;
  6684. messageWindowMgr.CloseMessageWindowPanel();
  6685. }
  6686. else if (!bGuiMessage)
  6687. {
  6688. bGuiMessage = true;
  6689. }
  6690. else
  6691. {
  6692. bGuiMessage = false;
  6693. isMessage = false;
  6694. messageWindowMgr.CloseMessageWindowPanel();
  6695. }
  6696. }
  6697. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6698. {
  6699. escFlg = true;
  6700. for (int j = 0; j < maidCnt; j++)
  6701. {
  6702. if (maidArray[j] && maidArray[j].Visible)
  6703. {
  6704. maidArray[j].StopKuchipakuPattern();
  6705. if (isDanceStart7V)
  6706. {
  6707. maidArray[j].SetPos(dancePos[j]);
  6708. maidArray[j].body0.transform.localRotation = danceRot[j];
  6709. }
  6710. if (isDanceStart8V)
  6711. {
  6712. maidArray[j].SetPos(dancePos[j]);
  6713. maidArray[j].body0.transform.localRotation = danceRot[j];
  6714. }
  6715. if (isDanceStart11V)
  6716. {
  6717. maidArray[j].SetPos(dancePos[j]);
  6718. maidArray[j].body0.transform.localRotation = danceRot[j];
  6719. }
  6720. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6721. || isDanceStart13K)
  6722. {
  6723. maidArray[j].SetPos(dancePos[j]);
  6724. maidArray[j].body0.transform.localRotation = danceRot[j];
  6725. int i = j;
  6726. if (!isVR)
  6727. {
  6728. delCount[i] = 20;
  6729. if (goSlot[(int)selectList[i]] != null)
  6730. {
  6731. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6732. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6733. {
  6734. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6735. }
  6736. }
  6737. }
  6738. Maid maid = maidArray[j];
  6739. maid.DelProp(MPN.handitem, true);
  6740. maid.DelProp(MPN.accvag, true);
  6741. maid.DelProp(MPN.accanl, true);
  6742. maid.DelProp(MPN.kousoku_upper, true);
  6743. maid.DelProp(MPN.kousoku_lower, true);
  6744. maid.AllProcPropSeqStart();
  6745. }
  6746. if (isDanceStart14V)
  6747. {
  6748. maidArray[j].SetPos(dancePos[j]);
  6749. maidArray[j].body0.transform.localRotation = danceRot[j];
  6750. }
  6751. if (isDanceStart15V)
  6752. {
  6753. maidArray[j].SetPos(dancePos[j]);
  6754. maidArray[j].body0.transform.localRotation = danceRot[j];
  6755. }
  6756. }
  6757. }
  6758. isDanceStart1F = false;
  6759. isDanceStart1K = false;
  6760. isDanceStart2F = false;
  6761. isDanceStart3F = false;
  6762. isDanceStart3K = false;
  6763. isDanceStart4F = false;
  6764. isDanceStart4K = false;
  6765. isDanceStart5F = false;
  6766. isDanceStart5K = false;
  6767. isDanceStart6F = false;
  6768. isDanceStart6K = false;
  6769. isDanceStart7F = false;
  6770. isDanceStart7V = false;
  6771. isDanceStart8F = false;
  6772. isDanceStart8V = false;
  6773. isDanceStart8P = false;
  6774. isDanceStart9F = false;
  6775. isDanceStart9K = false;
  6776. isDanceStart10F = false;
  6777. isDanceStart11F = false;
  6778. isDanceStart11V = false;
  6779. isDanceStart12F = false;
  6780. isDanceStart13F = false;
  6781. isDanceStart13K = false;
  6782. isDanceStart14F = false;
  6783. isDanceStart14V = false;
  6784. isDanceStart15F = false;
  6785. isDanceStart15V = false;
  6786. for (int j = 0; j < maidCnt; j++)
  6787. {
  6788. danceFace[j] = 0f;
  6789. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6790. maidArray[j].SetAutoTwistAll(true);
  6791. }
  6792. danceCheckIndex = 0;
  6793. for (int k = 0; k < danceCheck.Length; k++)
  6794. {
  6795. danceCheck[danceCheckIndex] = 1f;
  6796. }
  6797. isDance = false;
  6798. isDanceChu = false;
  6799. if (maidArray[1] && maidArray[1].Visible)
  6800. {
  6801. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6802. {
  6803. Vector3 vector = Vector3.zero;
  6804. vector.x = 0.6f;
  6805. maidArray[1].SetPos(vector);
  6806. if (maidArray[2] && maidArray[2].Visible)
  6807. {
  6808. vector.x = -0.6f;
  6809. maidArray[2].SetPos(vector);
  6810. }
  6811. if (maidArray[3] && maidArray[3].Visible)
  6812. {
  6813. vector.x = 1.2f;
  6814. maidArray[3].SetPos(vector);
  6815. }
  6816. if (maidArray[4] && maidArray[4].Visible)
  6817. {
  6818. vector.x = -1.2f;
  6819. maidArray[4].SetPos(vector);
  6820. }
  6821. if (maidArray[5] && maidArray[5].Visible)
  6822. {
  6823. vector.x = 1.8f;
  6824. maidArray[5].SetPos(vector);
  6825. }
  6826. if (maidArray[6] && maidArray[6].Visible)
  6827. {
  6828. vector.x = -1.8f;
  6829. maidArray[6].SetPos(vector);
  6830. }
  6831. if (maidArray[7] && maidArray[7].Visible)
  6832. {
  6833. vector.x = 2.4f;
  6834. maidArray[7].SetPos(vector);
  6835. }
  6836. if (maidArray[8] && maidArray[8].Visible)
  6837. {
  6838. vector.x = -2.4f;
  6839. maidArray[8].SetPos(vector);
  6840. }
  6841. if (maidArray[9] && maidArray[9].Visible)
  6842. {
  6843. vector.x = 3f;
  6844. maidArray[9].SetPos(vector);
  6845. }
  6846. if (maidArray[10] && maidArray[10].Visible)
  6847. {
  6848. vector.x = -3f;
  6849. maidArray[10].SetPos(vector);
  6850. }
  6851. if (maidArray[11] && maidArray[11].Visible)
  6852. {
  6853. vector.x = 3.6f;
  6854. maidArray[11].SetPos(vector);
  6855. }
  6856. if (maidArray[12] && maidArray[12].Visible)
  6857. {
  6858. vector.x = -3.6f;
  6859. maidArray[12].SetPos(vector);
  6860. }
  6861. if (maidArray[13] && maidArray[13].Visible)
  6862. {
  6863. vector.x = 4.2f;
  6864. maidArray[13].SetPos(vector);
  6865. }
  6866. }
  6867. }
  6868. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6869. }
  6870. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6871. {
  6872. if (isScript)
  6873. {
  6874. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6875. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6876. if (isPanel)
  6877. {
  6878. isPanel = false;
  6879. }
  6880. else
  6881. {
  6882. isPanel = true;
  6883. }
  6884. gameObject5.SetActive(isPanel);
  6885. }
  6886. else
  6887. {
  6888. bGui = !bGui;
  6889. }
  6890. }
  6891. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6892. {
  6893. keyFlg = true;
  6894. bgIndex--;
  6895. if (bgIndex <= -1)
  6896. {
  6897. bgIndex = bgArray.Length - 1;
  6898. }
  6899. if (!moveBg)
  6900. {
  6901. bg.localScale = new Vector3(1f, 1f, 1f);
  6902. if (bgArray[bgIndex].Length == 36)
  6903. {
  6904. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6905. }
  6906. else
  6907. {
  6908. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6909. }
  6910. bgCombo.selectedItemIndex = bgIndex;
  6911. if (bgArray[bgIndex] == "karaokeroom")
  6912. {
  6913. bg.transform.position = bgObject.transform.position;
  6914. Vector3 vector = Vector3.zero;
  6915. Vector3 zero3 = Vector3.zero;
  6916. zero3.y = 90f;
  6917. vector.z = 4f;
  6918. vector.x = 1f;
  6919. bg.transform.localPosition = vector;
  6920. bg.transform.localRotation = Quaternion.Euler(zero3);
  6921. }
  6922. }
  6923. }
  6924. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6925. {
  6926. keyFlg = true;
  6927. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6928. }
  6929. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6930. {
  6931. keyFlg = true;
  6932. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6933. }
  6934. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6935. {
  6936. keyFlg = true;
  6937. bg.localScale = new Vector3(1f, 1f, 1f);
  6938. }
  6939. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6940. {
  6941. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6942. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6943. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6944. Vector3 vector = bg.position;
  6945. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6946. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6947. bg.localPosition = vector;
  6948. if (Input.GetKey(KeyCode.Y))
  6949. {
  6950. keyFlg = true;
  6951. }
  6952. }
  6953. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  6954. {
  6955. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6956. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6957. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6958. Vector3 vector = bg.position;
  6959. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6960. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6961. bg.localPosition = vector;
  6962. if (Input.GetKey(KeyCode.Y))
  6963. {
  6964. keyFlg = true;
  6965. }
  6966. }
  6967. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  6968. {
  6969. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6970. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6971. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6972. Vector3 vector = bg.position;
  6973. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6974. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6975. bg.localPosition = vector;
  6976. if (Input.GetKey(KeyCode.Y))
  6977. {
  6978. keyFlg = true;
  6979. }
  6980. }
  6981. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  6982. {
  6983. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6984. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6985. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6986. Vector3 vector = bg.position;
  6987. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6988. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6989. bg.localPosition = vector;
  6990. if (Input.GetKey(KeyCode.Y))
  6991. {
  6992. keyFlg = true;
  6993. }
  6994. }
  6995. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  6996. {
  6997. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6998. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6999. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7000. Vector3 vector = bg.position;
  7001. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7002. bg.localPosition = vector;
  7003. if (Input.GetKey(KeyCode.Y))
  7004. {
  7005. keyFlg = true;
  7006. }
  7007. }
  7008. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7009. {
  7010. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7011. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7012. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7013. Vector3 vector = bg.position;
  7014. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7015. bg.localPosition = vector;
  7016. if (Input.GetKey(KeyCode.Y))
  7017. {
  7018. keyFlg = true;
  7019. }
  7020. }
  7021. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7022. {
  7023. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7024. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7025. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7026. Vector3 vector = bg.position;
  7027. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7028. bg.localPosition = vector;
  7029. if (Input.GetKey(KeyCode.Y))
  7030. {
  7031. keyFlg = true;
  7032. }
  7033. }
  7034. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7035. {
  7036. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7037. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7038. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7039. Vector3 vector = bg.position;
  7040. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7041. bg.localPosition = vector;
  7042. if (Input.GetKey(KeyCode.Y))
  7043. {
  7044. keyFlg = true;
  7045. }
  7046. }
  7047. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7048. {
  7049. Vector3 vector = bg.position;
  7050. vector.y -= 0.015f * speed;
  7051. bg.localPosition = vector;
  7052. if (Input.GetKey(KeyCode.Y))
  7053. {
  7054. keyFlg = true;
  7055. }
  7056. }
  7057. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7058. {
  7059. Vector3 vector = bg.position;
  7060. vector.y += 0.015f * speed;
  7061. bg.localPosition = vector;
  7062. if (Input.GetKey(KeyCode.Y))
  7063. {
  7064. keyFlg = true;
  7065. }
  7066. }
  7067. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7068. {
  7069. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7070. if (Input.GetKey(KeyCode.Y))
  7071. {
  7072. keyFlg = true;
  7073. }
  7074. }
  7075. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7076. {
  7077. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7078. if (Input.GetKey(KeyCode.Y))
  7079. {
  7080. keyFlg = true;
  7081. }
  7082. }
  7083. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7084. {
  7085. if (Input.GetKey(KeyCode.Y))
  7086. {
  7087. keyFlg = true;
  7088. }
  7089. }
  7090. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7091. {
  7092. if (keyFlg)
  7093. {
  7094. keyFlg = false;
  7095. }
  7096. else
  7097. {
  7098. bgIndex++;
  7099. if (bgIndex == bgArray.Length)
  7100. {
  7101. bgIndex = 0;
  7102. }
  7103. if (!moveBg)
  7104. {
  7105. bg.localScale = new Vector3(1f, 1f, 1f);
  7106. if (bgArray[bgIndex].Length == 36)
  7107. {
  7108. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7109. }
  7110. else
  7111. {
  7112. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7113. }
  7114. bgCombo.selectedItemIndex = bgIndex;
  7115. if (bgArray[bgIndex] == "karaokeroom")
  7116. {
  7117. bg.transform.position = bgObject.transform.position;
  7118. Vector3 vector = Vector3.zero;
  7119. Vector3 zero3 = Vector3.zero;
  7120. zero3.y = 90f;
  7121. vector.z = 4f;
  7122. vector.x = 1f;
  7123. bg.transform.localPosition = vector;
  7124. bg.transform.localRotation = Quaternion.Euler(zero3);
  7125. }
  7126. }
  7127. }
  7128. }
  7129. if (maidArray[0] != null && maidArray[0].Visible)
  7130. {
  7131. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7132. {
  7133. int[] array6 = new int[1];
  7134. int[] array7 = array6;
  7135. if (maidCnt == 2)
  7136. {
  7137. array7 = new int[] { 0, 1 };
  7138. }
  7139. if (maidCnt == 3)
  7140. {
  7141. array7 = new int[] { 0, 1, 2 };
  7142. }
  7143. if (maidCnt == 4)
  7144. {
  7145. array7 = new int[] { 0, 1, 2, 3 };
  7146. }
  7147. if (maidCnt == 5)
  7148. {
  7149. array7 = new int[] { 0, 1, 2, 3, 4 };
  7150. }
  7151. if (maidCnt == 6)
  7152. {
  7153. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7154. }
  7155. if (maidCnt == 7)
  7156. {
  7157. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7158. }
  7159. if (maidCnt == 8)
  7160. {
  7161. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7162. }
  7163. if (maidCnt == 9)
  7164. {
  7165. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7166. }
  7167. if (maidCnt == 10)
  7168. {
  7169. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7170. }
  7171. if (maidCnt == 11)
  7172. {
  7173. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7174. }
  7175. if (maidCnt == 12)
  7176. {
  7177. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7178. }
  7179. Random random = new Random();
  7180. int n = array7.Length;
  7181. while (n > 1)
  7182. {
  7183. n--;
  7184. int j = random.Next(n + 1);
  7185. int num8 = array7[j];
  7186. array7[j] = array7[n];
  7187. array7[n] = num8;
  7188. }
  7189. int[] array8 = new int[maidCnt];
  7190. Vector3[] array9 = new Vector3[maidCnt];
  7191. Vector3[] array10 = new Vector3[maidCnt];
  7192. int[] array11 = new int[maidCnt];
  7193. for (int i = 0; i < maidCnt; i++)
  7194. {
  7195. array8[array7[i]] = poseIndex[array7[i]];
  7196. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7197. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7198. array11[array7[i]] = headEyeIndex[array7[i]];
  7199. }
  7200. for (int i = 0; i < maidCnt; i++)
  7201. {
  7202. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7203. {
  7204. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7205. isStop[i] = false;
  7206. poseCount[i] = 20;
  7207. Maid maid = maidArray[i];
  7208. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7209. {
  7210. maid.body0.MuneYureL(0f);
  7211. maid.body0.MuneYureR(0f);
  7212. }
  7213. else
  7214. {
  7215. maid.body0.MuneYureL(1f);
  7216. maid.body0.MuneYureR(1f);
  7217. }
  7218. if (array12[0].Contains("MultipleMaidsPose"))
  7219. {
  7220. string path = array12[0].Split(new char[] { '/' })[1];
  7221. byte[] array2 = new byte[0];
  7222. try
  7223. {
  7224. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7225. {
  7226. array2 = new byte[fileStream.Length];
  7227. fileStream.Read(array2, 0, array2.Length);
  7228. }
  7229. }
  7230. catch { }
  7231. if (0 < array2.Length)
  7232. {
  7233. string text = Path.GetFileName(path);
  7234. long num5 = text.GetHashCode();
  7235. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7236. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7237. {
  7238. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7239. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7240. };
  7241. for (int m = 0; m < array3.Length; m++)
  7242. {
  7243. maid.SetAutoTwist(array3[m], true);
  7244. }
  7245. }
  7246. }
  7247. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7248. {
  7249. loadPose[i] = array12[0];
  7250. }
  7251. else if (!array12[0].StartsWith("dance_"))
  7252. {
  7253. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7254. }
  7255. else
  7256. {
  7257. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7258. {
  7259. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7260. GameUty.FileSystem,
  7261. array12[0] + ".anm",
  7262. false,
  7263. false);
  7264. }
  7265. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7266. }
  7267. if (array12.Length > 1)
  7268. {
  7269. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7270. float.Parse(array12[1]);
  7271. isStop[i] = true;
  7272. if (array12.Length > 2)
  7273. {
  7274. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7275. isPoseIti[i] = true;
  7276. poseIti[i] = maidArray[i].transform.position;
  7277. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7278. }
  7279. }
  7280. }
  7281. poseIndex[i] = array8[array7[i]];
  7282. maidArray[i].SetRot(array9[array7[i]]);
  7283. maidArray[i].SetPos(array10[array7[i]]);
  7284. headEyeIndex[i] = array11[array7[i]];
  7285. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7286. maidArray[i].body0.boHeadToCam = true;
  7287. maidArray[i].body0.boEyeToCam = true;
  7288. if (headEyeIndex[i] == 0)
  7289. {
  7290. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7291. maidArray[i].body0.boHeadToCam = true;
  7292. maidArray[i].body0.boEyeToCam = true;
  7293. }
  7294. else
  7295. {
  7296. maidArray[i].body0.trsLookTarget = null;
  7297. if (headEyeIndex[i] == 1)
  7298. {
  7299. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7300. }
  7301. if (headEyeIndex[i] == 2)
  7302. {
  7303. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7304. }
  7305. if (headEyeIndex[i] == 3)
  7306. {
  7307. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7308. }
  7309. if (headEyeIndex[i] == 4)
  7310. {
  7311. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7312. }
  7313. if (headEyeIndex[i] == 5)
  7314. {
  7315. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7316. }
  7317. if (headEyeIndex[i] == 6)
  7318. {
  7319. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7320. }
  7321. if (headEyeIndex[i] == 7)
  7322. {
  7323. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7324. }
  7325. if (headEyeIndex[i] == 8)
  7326. {
  7327. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7328. }
  7329. if (headEyeIndex[i] == 9)
  7330. {
  7331. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7332. }
  7333. }
  7334. }
  7335. }
  7336. else if (Input.GetKeyDown(KeyCode.Comma))
  7337. {
  7338. int[] array8 = new int[maidCnt];
  7339. Vector3[] array9 = new Vector3[maidCnt];
  7340. Vector3[] array10 = new Vector3[maidCnt];
  7341. int[] array11 = new int[maidCnt];
  7342. for (int i = 0; i < maidCnt; i++)
  7343. {
  7344. array8[i] = poseIndex[i];
  7345. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7346. array10[i] = maidArray[i].transform.position;
  7347. array11[i] = headEyeIndex[i];
  7348. }
  7349. for (int i = 0; i < maidCnt; i++)
  7350. {
  7351. if (i == 0)
  7352. {
  7353. if (!isLock[i])
  7354. {
  7355. if (maidArray[i] && maidArray[i].Visible)
  7356. {
  7357. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7358. isStop[i] = false;
  7359. poseCount[i] = 20;
  7360. Maid maid = maidArray[i];
  7361. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7362. {
  7363. maid.body0.MuneYureL(0f);
  7364. maid.body0.MuneYureR(0f);
  7365. }
  7366. else
  7367. {
  7368. maid.body0.MuneYureL(1f);
  7369. maid.body0.MuneYureR(1f);
  7370. }
  7371. if (array12[0].Contains("MultipleMaidsPose"))
  7372. {
  7373. string path = array12[0].Split(new char[] { '/' })[1];
  7374. byte[] array2 = new byte[0];
  7375. try
  7376. {
  7377. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7378. {
  7379. array2 = new byte[fileStream.Length];
  7380. fileStream.Read(array2, 0, array2.Length);
  7381. }
  7382. }
  7383. catch { }
  7384. if (0 < array2.Length)
  7385. {
  7386. string text = Path.GetFileName(path);
  7387. long num5 = text.GetHashCode();
  7388. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7389. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7390. {
  7391. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7392. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7393. };
  7394. for (int m = 0; m < array3.Length; m++)
  7395. {
  7396. maid.SetAutoTwist(array3[m], true);
  7397. }
  7398. }
  7399. }
  7400. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7401. {
  7402. loadPose[i] = array12[0];
  7403. }
  7404. else if (!array12[0].StartsWith("dance_"))
  7405. {
  7406. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7407. }
  7408. else
  7409. {
  7410. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7411. {
  7412. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7413. GameUty.FileSystem,
  7414. array12[0] + ".anm",
  7415. false,
  7416. false);
  7417. }
  7418. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7419. }
  7420. if (array12.Length > 1)
  7421. {
  7422. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7423. float.Parse(array12[1]);
  7424. isStop[i] = true;
  7425. if (array12.Length > 2)
  7426. {
  7427. Transform transform2 =
  7428. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7429. isPoseIti[i] = true;
  7430. poseIti[i] = maidArray[i].transform.position;
  7431. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7432. }
  7433. }
  7434. }
  7435. }
  7436. poseIndex[i] = array8[maidCnt - i - 1];
  7437. headEyeIndex[i] = array11[maidCnt - i - 1];
  7438. }
  7439. else
  7440. {
  7441. if (!isLock[i])
  7442. {
  7443. if (maidArray[i] && maidArray[i].Visible)
  7444. {
  7445. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7446. isStop[i] = false;
  7447. poseCount[i] = 20;
  7448. Maid maid = maidArray[i];
  7449. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7450. {
  7451. maid.body0.MuneYureL(0f);
  7452. maid.body0.MuneYureR(0f);
  7453. }
  7454. else
  7455. {
  7456. maid.body0.MuneYureL(1f);
  7457. maid.body0.MuneYureR(1f);
  7458. }
  7459. if (array12[0].Contains("MultipleMaidsPose"))
  7460. {
  7461. string path = array12[0].Split(new char[] { '/' })[1];
  7462. byte[] array2 = new byte[0];
  7463. try
  7464. {
  7465. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7466. {
  7467. array2 = new byte[fileStream.Length];
  7468. fileStream.Read(array2, 0, array2.Length);
  7469. }
  7470. }
  7471. catch { }
  7472. if (0 < array2.Length)
  7473. {
  7474. string text = Path.GetFileName(path);
  7475. long num5 = text.GetHashCode();
  7476. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7477. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7478. {
  7479. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7480. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7481. };
  7482. for (int m = 0; m < array3.Length; m++)
  7483. {
  7484. maid.SetAutoTwist(array3[m], true);
  7485. }
  7486. }
  7487. }
  7488. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7489. {
  7490. loadPose[i] = array12[0];
  7491. }
  7492. else if (!array12[0].StartsWith("dance_"))
  7493. {
  7494. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7495. }
  7496. else
  7497. {
  7498. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7499. {
  7500. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7501. GameUty.FileSystem,
  7502. array12[0] + ".anm",
  7503. false,
  7504. false);
  7505. }
  7506. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7507. }
  7508. if (array12.Length > 1)
  7509. {
  7510. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7511. float.Parse(array12[1]);
  7512. isStop[i] = true;
  7513. if (array12.Length > 2)
  7514. {
  7515. Transform transform2 =
  7516. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7517. isPoseIti[i] = true;
  7518. poseIti[i] = maidArray[i].transform.position;
  7519. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7520. }
  7521. }
  7522. }
  7523. }
  7524. poseIndex[i] = array8[i - 1];
  7525. headEyeIndex[i] = array11[i - 1];
  7526. }
  7527. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7528. maidArray[i].body0.boHeadToCam = true;
  7529. maidArray[i].body0.boEyeToCam = true;
  7530. if (headEyeIndex[i] == 0)
  7531. {
  7532. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7533. maidArray[i].body0.boHeadToCam = true;
  7534. maidArray[i].body0.boEyeToCam = true;
  7535. }
  7536. else
  7537. {
  7538. maidArray[i].body0.trsLookTarget = null;
  7539. if (headEyeIndex[i] == 1)
  7540. {
  7541. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7542. }
  7543. if (headEyeIndex[i] == 2)
  7544. {
  7545. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7546. }
  7547. if (headEyeIndex[i] == 3)
  7548. {
  7549. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7550. }
  7551. if (headEyeIndex[i] == 4)
  7552. {
  7553. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7554. }
  7555. if (headEyeIndex[i] == 5)
  7556. {
  7557. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7558. }
  7559. if (headEyeIndex[i] == 6)
  7560. {
  7561. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7562. }
  7563. if (headEyeIndex[i] == 7)
  7564. {
  7565. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7566. }
  7567. if (headEyeIndex[i] == 8)
  7568. {
  7569. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7570. }
  7571. if (headEyeIndex[i] == 9)
  7572. {
  7573. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7574. }
  7575. }
  7576. if (i == 0)
  7577. {
  7578. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7579. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7580. }
  7581. else
  7582. {
  7583. maidArray[i].SetRot(array9[i - 1]);
  7584. maidArray[i].SetPos(array10[i - 1]);
  7585. }
  7586. }
  7587. }
  7588. for (int i = 0; i < maidCnt; i++)
  7589. {
  7590. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7591. {
  7592. if (maidArray[i] && maidArray[i].Visible)
  7593. {
  7594. maidArray[i].body0.transform.localRotation =
  7595. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7596. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7597. }
  7598. }
  7599. else if (Input.GetKey(KeyCode.B))
  7600. {
  7601. if (maidArray[i] && maidArray[i].Visible)
  7602. {
  7603. maidArray[i].body0.transform.localRotation =
  7604. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7605. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7606. }
  7607. }
  7608. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7609. {
  7610. if (maidArray[1] && maidArray[1].Visible)
  7611. {
  7612. if (maidArray[0].transform.position == maidArray[1].transform.position
  7613. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7614. {
  7615. Vector3 vector = Vector3.zero;
  7616. vector.x = 0.6f;
  7617. maidArray[1].SetPos(vector);
  7618. if (maidArray[2] && maidArray[2].Visible)
  7619. {
  7620. vector.x = -0.6f;
  7621. maidArray[2].SetPos(vector);
  7622. }
  7623. if (maidArray[3] && maidArray[3].Visible)
  7624. {
  7625. vector.x = 1.2f;
  7626. maidArray[3].SetPos(vector);
  7627. }
  7628. if (maidArray[4] && maidArray[4].Visible)
  7629. {
  7630. vector.x = -1.2f;
  7631. maidArray[4].SetPos(vector);
  7632. }
  7633. if (maidArray[5] && maidArray[5].Visible)
  7634. {
  7635. vector.x = 1.8f;
  7636. maidArray[5].SetPos(vector);
  7637. }
  7638. if (maidArray[6] && maidArray[6].Visible)
  7639. {
  7640. vector.x = -1.8f;
  7641. maidArray[6].SetPos(vector);
  7642. }
  7643. if (maidArray[7] && maidArray[7].Visible)
  7644. {
  7645. vector.x = 2.4f;
  7646. maidArray[7].SetPos(vector);
  7647. }
  7648. if (maidArray[8] && maidArray[8].Visible)
  7649. {
  7650. vector.x = -2.4f;
  7651. maidArray[8].SetPos(vector);
  7652. }
  7653. if (maidArray[9] && maidArray[9].Visible)
  7654. {
  7655. vector.x = 3f;
  7656. maidArray[9].SetPos(vector);
  7657. }
  7658. if (maidArray[10] && maidArray[10].Visible)
  7659. {
  7660. vector.x = -3f;
  7661. maidArray[10].SetPos(vector);
  7662. }
  7663. if (maidArray[11] && maidArray[11].Visible)
  7664. {
  7665. vector.x = 3.6f;
  7666. maidArray[11].SetPos(vector);
  7667. }
  7668. if (maidArray[12] && maidArray[12].Visible)
  7669. {
  7670. vector.x = -3.6f;
  7671. maidArray[12].SetPos(vector);
  7672. }
  7673. if (maidArray[13] && maidArray[13].Visible)
  7674. {
  7675. vector.x = 4.2f;
  7676. maidArray[13].SetPos(vector);
  7677. }
  7678. }
  7679. }
  7680. for (int k = 0; k < groupList.Count; k++)
  7681. {
  7682. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7683. {
  7684. if (poseIndex[i] == 0)
  7685. {
  7686. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7687. }
  7688. else
  7689. {
  7690. poseIndex[i] = 0;
  7691. }
  7692. break;
  7693. }
  7694. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7695. {
  7696. poseIndex[i] = (int)groupList[k - 1];
  7697. break;
  7698. }
  7699. }
  7700. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7701. {
  7702. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7703. }
  7704. if (maidArray[i] && maidArray[i].Visible)
  7705. {
  7706. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7707. isStop[i] = false;
  7708. poseCount[i] = 20;
  7709. Maid maid = maidArray[i];
  7710. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7711. {
  7712. maid.body0.MuneYureL(0f);
  7713. maid.body0.MuneYureR(0f);
  7714. }
  7715. else
  7716. {
  7717. maid.body0.MuneYureL(1f);
  7718. maid.body0.MuneYureR(1f);
  7719. }
  7720. if (array[0].Contains("MultipleMaidsPose"))
  7721. {
  7722. string path = array[0].Split(new char[] { '/' })[1];
  7723. byte[] array2 = new byte[0];
  7724. try
  7725. {
  7726. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7727. {
  7728. array2 = new byte[fileStream.Length];
  7729. fileStream.Read(array2, 0, array2.Length);
  7730. }
  7731. }
  7732. catch { }
  7733. if (0 < array2.Length)
  7734. {
  7735. string text = Path.GetFileName(path);
  7736. long num5 = text.GetHashCode();
  7737. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7738. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7739. {
  7740. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7741. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7742. };
  7743. for (int m = 0; m < array3.Length; m++)
  7744. {
  7745. maid.SetAutoTwist(array3[m], true);
  7746. }
  7747. }
  7748. }
  7749. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7750. {
  7751. loadPose[i] = array[0];
  7752. }
  7753. else if (!array[0].StartsWith("dance_"))
  7754. {
  7755. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7756. }
  7757. else
  7758. {
  7759. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7760. {
  7761. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7762. GameUty.FileSystem,
  7763. array[0] + ".anm",
  7764. false,
  7765. false);
  7766. }
  7767. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7768. }
  7769. if (array.Length > 1)
  7770. {
  7771. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7772. isStop[i] = true;
  7773. if (array.Length > 2)
  7774. {
  7775. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7776. isPoseIti[i] = true;
  7777. poseIti[i] = maidArray[i].transform.position;
  7778. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7779. }
  7780. }
  7781. }
  7782. }
  7783. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7784. {
  7785. if (maidArray[1] && maidArray[1].Visible)
  7786. {
  7787. if (maidArray[0].transform.position == maidArray[1].transform.position
  7788. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7789. {
  7790. Vector3 vector = Vector3.zero;
  7791. vector.x = 0.6f;
  7792. maidArray[1].SetPos(vector);
  7793. if (maidArray[2] && maidArray[2].Visible)
  7794. {
  7795. vector.x = -0.6f;
  7796. maidArray[2].SetPos(vector);
  7797. }
  7798. if (maidArray[3] && maidArray[3].Visible)
  7799. {
  7800. vector.x = 1.2f;
  7801. maidArray[3].SetPos(vector);
  7802. }
  7803. if (maidArray[4] && maidArray[4].Visible)
  7804. {
  7805. vector.x = -1.2f;
  7806. maidArray[4].SetPos(vector);
  7807. }
  7808. if (maidArray[5] && maidArray[5].Visible)
  7809. {
  7810. vector.x = 1.8f;
  7811. maidArray[5].SetPos(vector);
  7812. }
  7813. if (maidArray[6] && maidArray[6].Visible)
  7814. {
  7815. vector.x = -1.8f;
  7816. maidArray[6].SetPos(vector);
  7817. }
  7818. if (maidArray[7] && maidArray[7].Visible)
  7819. {
  7820. vector.x = 2.4f;
  7821. maidArray[7].SetPos(vector);
  7822. }
  7823. if (maidArray[8] && maidArray[8].Visible)
  7824. {
  7825. vector.x = -2.4f;
  7826. maidArray[8].SetPos(vector);
  7827. }
  7828. if (maidArray[9] && maidArray[9].Visible)
  7829. {
  7830. vector.x = 3f;
  7831. maidArray[9].SetPos(vector);
  7832. }
  7833. if (maidArray[10] && maidArray[10].Visible)
  7834. {
  7835. vector.x = -3f;
  7836. maidArray[10].SetPos(vector);
  7837. }
  7838. if (maidArray[11] && maidArray[11].Visible)
  7839. {
  7840. vector.x = 3.6f;
  7841. maidArray[11].SetPos(vector);
  7842. }
  7843. if (maidArray[12] && maidArray[12].Visible)
  7844. {
  7845. vector.x = -3.6f;
  7846. maidArray[12].SetPos(vector);
  7847. }
  7848. if (maidArray[13] && maidArray[13].Visible)
  7849. {
  7850. vector.x = 4.2f;
  7851. maidArray[13].SetPos(vector);
  7852. }
  7853. }
  7854. }
  7855. int num7 = poseIndex[i];
  7856. for (int k = 0; k < groupList.Count; k++)
  7857. {
  7858. if (poseIndex[i] < (int)groupList[k])
  7859. {
  7860. poseIndex[i] = (int)groupList[k];
  7861. break;
  7862. }
  7863. }
  7864. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7865. {
  7866. poseIndex[i] = 0;
  7867. }
  7868. if (maidArray[i] && maidArray[i].Visible)
  7869. {
  7870. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7871. isStop[i] = false;
  7872. poseCount[i] = 20;
  7873. Maid maid = maidArray[i];
  7874. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7875. {
  7876. maid.body0.MuneYureL(0f);
  7877. maid.body0.MuneYureR(0f);
  7878. }
  7879. else
  7880. {
  7881. maid.body0.MuneYureL(1f);
  7882. maid.body0.MuneYureR(1f);
  7883. }
  7884. if (array[0].Contains("MultipleMaidsPose"))
  7885. {
  7886. string path = array[0].Split(new char[] { '/' })[1];
  7887. byte[] array2 = new byte[0];
  7888. try
  7889. {
  7890. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7891. {
  7892. array2 = new byte[fileStream.Length];
  7893. fileStream.Read(array2, 0, array2.Length);
  7894. }
  7895. }
  7896. catch { }
  7897. if (0 < array2.Length)
  7898. {
  7899. string text = Path.GetFileName(path);
  7900. long num5 = text.GetHashCode();
  7901. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7902. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7903. {
  7904. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7905. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7906. };
  7907. for (int m = 0; m < array3.Length; m++)
  7908. {
  7909. maid.SetAutoTwist(array3[m], true);
  7910. }
  7911. }
  7912. }
  7913. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7914. {
  7915. loadPose[i] = array[0];
  7916. }
  7917. else if (!array[0].StartsWith("dance_"))
  7918. {
  7919. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7920. }
  7921. else
  7922. {
  7923. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7924. {
  7925. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7926. GameUty.FileSystem,
  7927. array[0] + ".anm",
  7928. false,
  7929. false);
  7930. }
  7931. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7932. }
  7933. if (array.Length > 1)
  7934. {
  7935. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7936. isStop[i] = true;
  7937. if (array.Length > 2)
  7938. {
  7939. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7940. isPoseIti[i] = true;
  7941. poseIti[i] = maidArray[i].transform.position;
  7942. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7943. }
  7944. }
  7945. }
  7946. }
  7947. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  7948. {
  7949. if (maidArray[1] && maidArray[1].Visible)
  7950. {
  7951. if (maidArray[0].transform.position == maidArray[1].transform.position
  7952. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7953. {
  7954. Vector3 vector = Vector3.zero;
  7955. vector.x = 0.6f;
  7956. maidArray[1].SetPos(vector);
  7957. if (maidArray[2] && maidArray[2].Visible)
  7958. {
  7959. vector.x = -0.6f;
  7960. maidArray[2].SetPos(vector);
  7961. }
  7962. if (maidArray[3] && maidArray[3].Visible)
  7963. {
  7964. vector.x = 1.2f;
  7965. maidArray[3].SetPos(vector);
  7966. }
  7967. if (maidArray[4] && maidArray[4].Visible)
  7968. {
  7969. vector.x = -1.2f;
  7970. maidArray[4].SetPos(vector);
  7971. }
  7972. if (maidArray[5] && maidArray[5].Visible)
  7973. {
  7974. vector.x = 1.8f;
  7975. maidArray[5].SetPos(vector);
  7976. }
  7977. if (maidArray[6] && maidArray[6].Visible)
  7978. {
  7979. vector.x = -1.8f;
  7980. maidArray[6].SetPos(vector);
  7981. }
  7982. if (maidArray[7] && maidArray[7].Visible)
  7983. {
  7984. vector.x = 2.4f;
  7985. maidArray[7].SetPos(vector);
  7986. }
  7987. if (maidArray[8] && maidArray[8].Visible)
  7988. {
  7989. vector.x = -2.4f;
  7990. maidArray[8].SetPos(vector);
  7991. }
  7992. if (maidArray[9] && maidArray[9].Visible)
  7993. {
  7994. vector.x = 3f;
  7995. maidArray[9].SetPos(vector);
  7996. }
  7997. if (maidArray[10] && maidArray[10].Visible)
  7998. {
  7999. vector.x = -3f;
  8000. maidArray[10].SetPos(vector);
  8001. }
  8002. if (maidArray[11] && maidArray[11].Visible)
  8003. {
  8004. vector.x = 3.6f;
  8005. maidArray[11].SetPos(vector);
  8006. }
  8007. if (maidArray[12] && maidArray[12].Visible)
  8008. {
  8009. vector.x = -3.6f;
  8010. maidArray[12].SetPos(vector);
  8011. }
  8012. if (maidArray[13] && maidArray[13].Visible)
  8013. {
  8014. vector.x = 4.2f;
  8015. maidArray[13].SetPos(vector);
  8016. }
  8017. }
  8018. }
  8019. poseIndex[i]--;
  8020. if (poseIndex[i] <= -1)
  8021. {
  8022. poseIndex[i] = poseArray.Length - 1;
  8023. }
  8024. if (maidArray[i] && maidArray[i].Visible)
  8025. {
  8026. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8027. isStop[i] = false;
  8028. poseCount[i] = 20;
  8029. Maid maid = maidArray[i];
  8030. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8031. {
  8032. maid.body0.MuneYureL(0f);
  8033. maid.body0.MuneYureR(0f);
  8034. }
  8035. else
  8036. {
  8037. maid.body0.MuneYureL(1f);
  8038. maid.body0.MuneYureR(1f);
  8039. }
  8040. if (array[0].Contains("MultipleMaidsPose"))
  8041. {
  8042. string path = array[0].Split(new char[] { '/' })[1];
  8043. byte[] array2 = new byte[0];
  8044. try
  8045. {
  8046. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8047. {
  8048. array2 = new byte[fileStream.Length];
  8049. fileStream.Read(array2, 0, array2.Length);
  8050. }
  8051. }
  8052. catch { }
  8053. if (0 < array2.Length)
  8054. {
  8055. string text = Path.GetFileName(path);
  8056. long num5 = text.GetHashCode();
  8057. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8058. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8059. {
  8060. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8061. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8062. };
  8063. for (int m = 0; m < array3.Length; m++)
  8064. {
  8065. maid.SetAutoTwist(array3[m], true);
  8066. }
  8067. }
  8068. }
  8069. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8070. {
  8071. loadPose[i] = array[0];
  8072. }
  8073. else if (!array[0].StartsWith("dance_"))
  8074. {
  8075. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8076. }
  8077. else
  8078. {
  8079. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8080. {
  8081. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8082. GameUty.FileSystem,
  8083. array[0] + ".anm",
  8084. false,
  8085. false);
  8086. }
  8087. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8088. }
  8089. if (array.Length > 1)
  8090. {
  8091. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8092. isStop[i] = true;
  8093. if (array.Length > 2)
  8094. {
  8095. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8096. isPoseIti[i] = true;
  8097. poseIti[i] = maidArray[i].transform.position;
  8098. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8099. }
  8100. }
  8101. }
  8102. }
  8103. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8104. {
  8105. if (maidArray[1] && maidArray[1].Visible)
  8106. {
  8107. if (maidArray[0].transform.position == maidArray[1].transform.position
  8108. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8109. {
  8110. Vector3 vector = Vector3.zero;
  8111. vector.x = 0.6f;
  8112. maidArray[1].SetPos(vector);
  8113. if (maidArray[2] && maidArray[2].Visible)
  8114. {
  8115. vector.x = -0.6f;
  8116. maidArray[2].SetPos(vector);
  8117. }
  8118. if (maidArray[3] && maidArray[3].Visible)
  8119. {
  8120. vector.x = 1.2f;
  8121. maidArray[3].SetPos(vector);
  8122. }
  8123. if (maidArray[4] && maidArray[4].Visible)
  8124. {
  8125. vector.x = -1.2f;
  8126. maidArray[4].SetPos(vector);
  8127. }
  8128. if (maidArray[5] && maidArray[5].Visible)
  8129. {
  8130. vector.x = 1.8f;
  8131. maidArray[5].SetPos(vector);
  8132. }
  8133. if (maidArray[6] && maidArray[6].Visible)
  8134. {
  8135. vector.x = -1.8f;
  8136. maidArray[6].SetPos(vector);
  8137. }
  8138. if (maidArray[7] && maidArray[7].Visible)
  8139. {
  8140. vector.x = 2.4f;
  8141. maidArray[7].SetPos(vector);
  8142. }
  8143. if (maidArray[8] && maidArray[8].Visible)
  8144. {
  8145. vector.x = -2.4f;
  8146. maidArray[8].SetPos(vector);
  8147. }
  8148. if (maidArray[9] && maidArray[9].Visible)
  8149. {
  8150. vector.x = 3f;
  8151. maidArray[9].SetPos(vector);
  8152. }
  8153. if (maidArray[10] && maidArray[10].Visible)
  8154. {
  8155. vector.x = -3f;
  8156. maidArray[10].SetPos(vector);
  8157. }
  8158. if (maidArray[11] && maidArray[11].Visible)
  8159. {
  8160. vector.x = 3.6f;
  8161. maidArray[11].SetPos(vector);
  8162. }
  8163. if (maidArray[12] && maidArray[12].Visible)
  8164. {
  8165. vector.x = -3.6f;
  8166. maidArray[12].SetPos(vector);
  8167. }
  8168. if (maidArray[13] && maidArray[13].Visible)
  8169. {
  8170. vector.x = 4.2f;
  8171. maidArray[13].SetPos(vector);
  8172. }
  8173. }
  8174. }
  8175. poseIndex[i]++;
  8176. if (poseIndex[i] == poseArray.Length)
  8177. {
  8178. poseIndex[i] = 0;
  8179. }
  8180. if (maidArray[i] && maidArray[i].Visible)
  8181. {
  8182. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8183. isStop[i] = false;
  8184. poseCount[i] = 20;
  8185. Maid maid = maidArray[i];
  8186. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8187. {
  8188. maid.body0.MuneYureL(0f);
  8189. maid.body0.MuneYureR(0f);
  8190. }
  8191. else
  8192. {
  8193. maid.body0.MuneYureL(1f);
  8194. maid.body0.MuneYureR(1f);
  8195. }
  8196. if (array[0].Contains("MultipleMaidsPose"))
  8197. {
  8198. string path = array[0].Split(new char[] { '/' })[1];
  8199. byte[] array2 = new byte[0];
  8200. try
  8201. {
  8202. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8203. {
  8204. array2 = new byte[fileStream.Length];
  8205. fileStream.Read(array2, 0, array2.Length);
  8206. }
  8207. }
  8208. catch { }
  8209. if (0 < array2.Length)
  8210. {
  8211. string text = Path.GetFileName(path);
  8212. long num5 = text.GetHashCode();
  8213. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8214. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8215. {
  8216. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8217. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8218. };
  8219. for (int m = 0; m < array3.Length; m++)
  8220. {
  8221. maid.SetAutoTwist(array3[m], true);
  8222. }
  8223. }
  8224. }
  8225. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8226. {
  8227. loadPose[i] = array[0];
  8228. }
  8229. else if (!array[0].StartsWith("dance_"))
  8230. {
  8231. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8232. }
  8233. else
  8234. {
  8235. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8236. {
  8237. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8238. GameUty.FileSystem,
  8239. array[0] + ".anm",
  8240. false,
  8241. false);
  8242. }
  8243. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8244. }
  8245. if (array.Length > 1)
  8246. {
  8247. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8248. isStop[i] = true;
  8249. if (array.Length > 2)
  8250. {
  8251. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8252. isPoseIti[i] = true;
  8253. poseIti[i] = maidArray[i].transform.position;
  8254. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8255. }
  8256. }
  8257. }
  8258. }
  8259. }
  8260. }
  8261. if (isDanceChu)
  8262. {
  8263. for(int j = 0; j < maidCnt; j++)
  8264. {
  8265. if (maidArray[j] && maidArray[j].Visible)
  8266. {
  8267. string text2 = danceName[j];
  8268. float num = 0f;
  8269. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8270. || text2 == "dance_cm3d_004_kano_f1.anm")
  8271. {
  8272. num = 0.166666f;
  8273. }
  8274. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8275. {
  8276. num = -0.35f;
  8277. }
  8278. if (text2 != null)
  8279. {
  8280. if (danceCount > 0)
  8281. {
  8282. danceCount--;
  8283. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8284. }
  8285. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8286. {
  8287. danceCount = 20;
  8288. }
  8289. }
  8290. }
  8291. }
  8292. }
  8293. if (isDanceStart1)
  8294. {
  8295. for (int j = 0; j < maidCnt; j++)
  8296. {
  8297. if (maidArray[j] && maidArray[j].Visible)
  8298. {
  8299. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8300. if (!isShift)
  8301. {
  8302. if (j == 0)
  8303. {
  8304. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8305. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8306. danceName[j] = "dance_cm3d2_001_f1.anm";
  8307. }
  8308. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8309. {
  8310. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8311. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8312. danceName[j] = "dance_cm3d2_001_f2.anm";
  8313. }
  8314. else
  8315. {
  8316. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8317. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8318. danceName[j] = "dance_cm3d2_001_f3.anm";
  8319. }
  8320. }
  8321. else
  8322. {
  8323. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8324. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8325. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8326. }
  8327. }
  8328. }
  8329. isDanceStart1 = false;
  8330. isDanceStart1F = true;
  8331. isShift = false;
  8332. }
  8333. if (isDanceStart2)
  8334. {
  8335. for (int j = 0; j < maidCnt; j++)
  8336. {
  8337. if (maidArray[j] && maidArray[j].Visible)
  8338. {
  8339. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8340. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8341. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8342. danceName[j] = "dance_cm3d_001_f1.anm";
  8343. }
  8344. }
  8345. isDanceStart2 = false;
  8346. isDanceStart2F = true;
  8347. }
  8348. if (isDanceStart3)
  8349. {
  8350. for (int j = 0; j < maidCnt; j++)
  8351. {
  8352. if (maidArray[j] && maidArray[j].Visible)
  8353. {
  8354. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8355. if (!isShift)
  8356. {
  8357. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8358. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8359. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8360. }
  8361. else
  8362. {
  8363. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8364. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8365. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8366. }
  8367. }
  8368. }
  8369. isDanceStart3 = false;
  8370. isDanceStart3F = true;
  8371. isShift = false;
  8372. }
  8373. if (isDanceStart4)
  8374. {
  8375. for (int j = 0; j < maidCnt; j++)
  8376. {
  8377. if (maidArray[j] && maidArray[j].Visible)
  8378. {
  8379. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8380. if (!isShift)
  8381. {
  8382. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8383. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8384. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8385. }
  8386. else
  8387. {
  8388. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8389. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8390. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8391. }
  8392. }
  8393. }
  8394. isDanceStart4 = false;
  8395. isDanceStart4F = true;
  8396. isShift = false;
  8397. }
  8398. if (isDanceStart5)
  8399. {
  8400. for (int j = 0; j < maidCnt; j++)
  8401. {
  8402. if (maidArray[j] && maidArray[j].Visible)
  8403. {
  8404. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8405. if (!isShift)
  8406. {
  8407. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8408. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8409. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8410. }
  8411. else
  8412. {
  8413. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8414. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8415. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8416. }
  8417. }
  8418. }
  8419. isDanceStart5 = false;
  8420. isDanceStart5F = true;
  8421. isShift = false;
  8422. }
  8423. if (isDanceStart6)
  8424. {
  8425. for (int j = 0; j < maidCnt; j++)
  8426. {
  8427. if (maidArray[j] && maidArray[j].Visible)
  8428. {
  8429. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8430. if (!isShift)
  8431. {
  8432. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8433. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8434. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8435. }
  8436. else
  8437. {
  8438. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8439. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8440. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8441. }
  8442. }
  8443. }
  8444. isDanceStart6 = false;
  8445. isDanceStart6F = true;
  8446. isShift = false;
  8447. }
  8448. if (isDanceStart7)
  8449. {
  8450. for (int j = 0; j < maidCnt; j++)
  8451. {
  8452. if (maidArray[j] && maidArray[j].Visible)
  8453. {
  8454. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8455. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8456. {
  8457. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8458. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8459. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8460. }
  8461. else
  8462. {
  8463. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8464. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8465. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8466. }
  8467. }
  8468. }
  8469. isDanceStart7 = false;
  8470. isDanceStart7V = true;
  8471. isDanceStart7F = true;
  8472. }
  8473. if (isDanceStart8)
  8474. {
  8475. for (int j = 0; j < maidCnt; j++)
  8476. {
  8477. if (maidArray[j] && maidArray[j].Visible)
  8478. {
  8479. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8480. if (j == 0 || j == 4 || j == 8 || j == 12)
  8481. {
  8482. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8483. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8484. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8485. }
  8486. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8487. {
  8488. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8489. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8490. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8491. }
  8492. else if (j == 2 || j == 6 || j == 10)
  8493. {
  8494. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8495. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8496. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8497. }
  8498. else
  8499. {
  8500. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8501. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8502. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8503. }
  8504. }
  8505. }
  8506. isDanceStart8 = false;
  8507. isDanceStart8V = true;
  8508. isDanceStart8F = true;
  8509. }
  8510. if (isDanceStart9)
  8511. {
  8512. isDanceStart9Count++;
  8513. if (isShift)
  8514. {
  8515. for (int j = 0; j < maidCnt; j++)
  8516. {
  8517. if (maidArray[j] && maidArray[j].Visible)
  8518. {
  8519. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8520. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8521. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8522. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8523. }
  8524. }
  8525. isDanceStart9 = false;
  8526. isDanceStart9F = true;
  8527. isDanceStart9Count = 0;
  8528. isShift = false;
  8529. }
  8530. if (isDanceStart9Count == 10)
  8531. {
  8532. for (int j = 0; j < maidCnt; j++)
  8533. {
  8534. if (maidArray[j] && maidArray[j].Visible)
  8535. {
  8536. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8537. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8538. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8539. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8540. }
  8541. }
  8542. isDanceStart9 = false;
  8543. isDanceStart9F = true;
  8544. isDanceStart9Count = 0;
  8545. }
  8546. }
  8547. if (isDanceStart10)
  8548. {
  8549. for (int j = 0; j < maidCnt; j++)
  8550. {
  8551. if (maidArray[j] && maidArray[j].Visible)
  8552. {
  8553. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8554. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8555. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8556. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8557. }
  8558. }
  8559. isDanceStart10 = false;
  8560. isDanceStart10F = true;
  8561. }
  8562. if (isDanceStart11)
  8563. {
  8564. for (int j = 0; j < maidCnt; j++)
  8565. {
  8566. if (maidArray[j] && maidArray[j].Visible)
  8567. {
  8568. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8569. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8570. {
  8571. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8572. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8573. danceName[j] = nameA + danceNo2 + ".anm";
  8574. }
  8575. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8576. {
  8577. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8578. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8579. danceName[j] = nameA + danceNo3 + ".anm";
  8580. }
  8581. else
  8582. {
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8584. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8585. danceName[j] = nameA + danceNo1 + ".anm";
  8586. }
  8587. }
  8588. }
  8589. isDanceStart11 = false;
  8590. isDanceStart11V = true;
  8591. isDanceStart11F = true;
  8592. }
  8593. if (isDanceStart12)
  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_cm3d2_005_khg_f.anm");
  8601. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8602. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8603. }
  8604. }
  8605. isDanceStart12 = false;
  8606. isDanceStart12F = true;
  8607. }
  8608. if (isDanceStart13)
  8609. {
  8610. for (int j = 0; j < maidCnt; j++)
  8611. {
  8612. if (maidArray[j] && maidArray[j].Visible)
  8613. {
  8614. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8615. if (!isShift)
  8616. {
  8617. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8618. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8619. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8620. }
  8621. else
  8622. {
  8623. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8624. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8625. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8626. }
  8627. }
  8628. }
  8629. isDanceStart13 = false;
  8630. isDanceStart13F = true;
  8631. isShift = false;
  8632. }
  8633. if (isDanceStart14)
  8634. {
  8635. for (int j = 0; j < maidCnt; j++)
  8636. {
  8637. if (maidArray[j] && maidArray[j].Visible)
  8638. {
  8639. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8640. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8641. {
  8642. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8643. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8644. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8645. }
  8646. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8647. {
  8648. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8649. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8650. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8651. }
  8652. else
  8653. {
  8654. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8655. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8656. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8657. }
  8658. }
  8659. }
  8660. isDanceStart14 = false;
  8661. isDanceStart14V = true;
  8662. isDanceStart14F = true;
  8663. }
  8664. if (isDanceStart15)
  8665. {
  8666. isDanceStart15Count++;
  8667. }
  8668. if (isDanceStart15Count == 10)
  8669. {
  8670. for (int j = 0; j < maidCnt; j++)
  8671. {
  8672. if (maidArray[j] && maidArray[j].Visible)
  8673. {
  8674. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8675. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8676. {
  8677. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8678. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8679. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8680. }
  8681. else
  8682. {
  8683. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8684. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8685. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8686. }
  8687. }
  8688. }
  8689. isDanceStart15 = false;
  8690. isDanceStart15V = true;
  8691. isDanceStart15F = true;
  8692. isDanceStart15Count = 0;
  8693. }
  8694. if (isDance)
  8695. {
  8696. for (int j = 0; j < maidCnt; j++)
  8697. {
  8698. if (maidArray[j].Visible)
  8699. {
  8700. if (isDanceStart1F)
  8701. {
  8702. if (isDanceStart1K)
  8703. {
  8704. foreach (string text3 in dance1KArray)
  8705. {
  8706. string[] array = text3.Split(new char[] { ',' });
  8707. float num10 = float.Parse(array[0]);
  8708. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8709. {
  8710. danceFace[j] = num10;
  8711. FaceName[j] = FaceName2[j];
  8712. FaceName2[j] = array[1];
  8713. FaceName3[j] = array[2];
  8714. FaceTime[j] = 0.0166666675f;
  8715. break;
  8716. }
  8717. }
  8718. }
  8719. else if (j == 0)
  8720. {
  8721. foreach (string text3 in dance1Array)
  8722. {
  8723. string[] array = text3.Split(new char[] { ',' });
  8724. float num10 = float.Parse(array[0]);
  8725. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8726. {
  8727. danceFace[j] = num10;
  8728. FaceName[j] = FaceName2[j];
  8729. FaceName2[j] = array[1];
  8730. FaceName3[j] = array[2];
  8731. FaceTime[j] = 0.0166666675f;
  8732. break;
  8733. }
  8734. }
  8735. }
  8736. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8737. {
  8738. foreach (string text3 in dance1BArray)
  8739. {
  8740. string[] array = text3.Split(new char[] { ',' });
  8741. float num10 = float.Parse(array[0]);
  8742. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8743. {
  8744. danceFace[j] = num10;
  8745. FaceName[j] = FaceName2[j];
  8746. FaceName2[j] = array[1];
  8747. FaceName3[j] = array[2];
  8748. FaceTime[j] = 0.0166666675f;
  8749. break;
  8750. }
  8751. }
  8752. }
  8753. else
  8754. {
  8755. foreach (string text3 in dance1CArray)
  8756. {
  8757. string[] array = text3.Split(new char[] { ',' });
  8758. float num10 = float.Parse(array[0]);
  8759. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8760. {
  8761. danceFace[j] = num10;
  8762. FaceName[j] = FaceName2[j];
  8763. FaceName2[j] = array[1];
  8764. FaceName3[j] = array[2];
  8765. FaceTime[j] = 0.0166666675f;
  8766. break;
  8767. }
  8768. }
  8769. }
  8770. }
  8771. if (isDanceStart2F)
  8772. {
  8773. foreach (string text3 in dance2Array)
  8774. {
  8775. string[] array = text3.Split(new char[] { ',' });
  8776. float num10 = float.Parse(array[0]);
  8777. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8778. {
  8779. danceFace[j] = num10;
  8780. FaceName[j] = FaceName2[j];
  8781. FaceName2[j] = array[1];
  8782. FaceName3[j] = array[2];
  8783. FaceTime[j] = 0.0166666675f;
  8784. break;
  8785. }
  8786. }
  8787. }
  8788. if (isDanceStart3F)
  8789. {
  8790. if (isDanceStart3K)
  8791. {
  8792. foreach (string text3 in dance3KArray)
  8793. {
  8794. string[] array = text3.Split(new char[] { ',' });
  8795. float num10 = float.Parse(array[0]);
  8796. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8797. {
  8798. danceFace[j] = num10;
  8799. FaceName[j] = FaceName2[j];
  8800. FaceName2[j] = array[1];
  8801. FaceName3[j] = array[2];
  8802. FaceTime[j] = 0.0166666675f;
  8803. break;
  8804. }
  8805. }
  8806. }
  8807. else
  8808. {
  8809. foreach (string text3 in dance3Array)
  8810. {
  8811. string[] array = text3.Split(new char[] { ',' });
  8812. float num10 = float.Parse(array[0]);
  8813. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8814. {
  8815. danceFace[j] = num10;
  8816. FaceName[j] = FaceName2[j];
  8817. FaceName2[j] = array[1];
  8818. FaceName3[j] = array[2];
  8819. FaceTime[j] = 0.0166666675f;
  8820. break;
  8821. }
  8822. }
  8823. }
  8824. }
  8825. if (isDanceStart4F)
  8826. {
  8827. if (isDanceStart4K)
  8828. {
  8829. foreach (string text3 in dance4KArray)
  8830. {
  8831. string[] array = text3.Split(new char[] { ',' });
  8832. float num10 = float.Parse(array[0]);
  8833. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8834. {
  8835. danceFace[j] = num10;
  8836. FaceName[j] = FaceName2[j];
  8837. FaceName2[j] = array[1];
  8838. FaceName3[j] = array[2];
  8839. FaceTime[j] = 0.0166666675f;
  8840. break;
  8841. }
  8842. }
  8843. }
  8844. else
  8845. {
  8846. foreach (string text3 in dance4Array)
  8847. {
  8848. string[] array = text3.Split(new char[] { ',' });
  8849. float num10 = float.Parse(array[0]);
  8850. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8851. {
  8852. danceFace[j] = num10;
  8853. FaceName[j] = FaceName2[j];
  8854. FaceName2[j] = array[1];
  8855. FaceName3[j] = array[2];
  8856. FaceTime[j] = 0.0166666675f;
  8857. break;
  8858. }
  8859. }
  8860. }
  8861. }
  8862. if (isDanceStart5F)
  8863. {
  8864. if (isDanceStart5K)
  8865. {
  8866. foreach (string text3 in dance5KArray)
  8867. {
  8868. string[] array = text3.Split(new char[] { ',' });
  8869. float num10 = float.Parse(array[0]);
  8870. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8871. {
  8872. danceFace[j] = num10;
  8873. FaceName[j] = FaceName2[j];
  8874. FaceName2[j] = array[1];
  8875. FaceName3[j] = array[2];
  8876. FaceTime[j] = 0.0166666675f;
  8877. break;
  8878. }
  8879. }
  8880. }
  8881. else
  8882. {
  8883. foreach (string text3 in dance5Array)
  8884. {
  8885. string[] array = text3.Split(new char[] { ',' });
  8886. float num10 = float.Parse(array[0]);
  8887. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8888. {
  8889. danceFace[j] = num10;
  8890. FaceName[j] = FaceName2[j];
  8891. FaceName2[j] = array[1];
  8892. FaceName3[j] = array[2];
  8893. FaceTime[j] = 0.0166666675f;
  8894. break;
  8895. }
  8896. }
  8897. }
  8898. }
  8899. if (isDanceStart6F)
  8900. {
  8901. if (isDanceStart6K)
  8902. {
  8903. foreach (string text3 in dance6KArray)
  8904. {
  8905. string[] array = text3.Split(new char[] { ',' });
  8906. float num10 = float.Parse(array[0]);
  8907. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8908. {
  8909. danceFace[j] = num10;
  8910. FaceName[j] = FaceName2[j];
  8911. FaceName2[j] = array[1];
  8912. FaceName3[j] = array[2];
  8913. FaceTime[j] = 0.0166666675f;
  8914. break;
  8915. }
  8916. }
  8917. }
  8918. else
  8919. {
  8920. foreach (string text3 in dance6Array)
  8921. {
  8922. string[] array = text3.Split(new char[] { ',' });
  8923. float num10 = float.Parse(array[0]);
  8924. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8925. {
  8926. danceFace[j] = num10;
  8927. FaceName[j] = FaceName2[j];
  8928. FaceName2[j] = array[1];
  8929. FaceName3[j] = array[2];
  8930. FaceTime[j] = 0.0166666675f;
  8931. break;
  8932. }
  8933. }
  8934. }
  8935. }
  8936. if (isDanceStart7F)
  8937. {
  8938. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8939. {
  8940. foreach (string text3 in dance6BArray)
  8941. {
  8942. string[] array = text3.Split(new char[] { ',' });
  8943. float num10 = float.Parse(array[0]);
  8944. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8945. {
  8946. danceFace[j] = num10;
  8947. FaceName[j] = FaceName2[j];
  8948. FaceName2[j] = array[1];
  8949. FaceName3[j] = array[2];
  8950. FaceTime[j] = 0.0166666675f;
  8951. break;
  8952. }
  8953. }
  8954. }
  8955. else
  8956. {
  8957. foreach (string text3 in dance6Array)
  8958. {
  8959. string[] array = text3.Split(new char[] { ',' });
  8960. float num10 = float.Parse(array[0]);
  8961. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8962. {
  8963. danceFace[j] = num10;
  8964. FaceName[j] = FaceName2[j];
  8965. FaceName2[j] = array[1];
  8966. FaceName3[j] = array[2];
  8967. FaceTime[j] = 0.0166666675f;
  8968. break;
  8969. }
  8970. }
  8971. }
  8972. }
  8973. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  8974. {
  8975. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  8976. {
  8977. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  8978. }
  8979. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  8980. {
  8981. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  8982. 100f,
  8983. maidArray[j - 1].transform.position.z));
  8984. }
  8985. }
  8986. if (isDanceStart8F)
  8987. {
  8988. if (j == 1 || j == 5 || j == 9 || j == 13)
  8989. {
  8990. foreach (string text3 in dance6BArray)
  8991. {
  8992. string[] array = text3.Split(new char[] { ',' });
  8993. float num10 = float.Parse(array[0]);
  8994. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8995. {
  8996. danceFace[j] = num10;
  8997. FaceName[j] = FaceName2[j];
  8998. FaceName2[j] = array[1];
  8999. FaceName3[j] = array[2];
  9000. FaceTime[j] = 0.0166666675f;
  9001. break;
  9002. }
  9003. }
  9004. }
  9005. else if (j == 2 || j == 6 || j == 10)
  9006. {
  9007. foreach (string text3 in dance6CArray)
  9008. {
  9009. string[] array = text3.Split(new char[] { ',' });
  9010. float num10 = float.Parse(array[0]);
  9011. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9012. {
  9013. danceFace[j] = num10;
  9014. FaceName[j] = FaceName2[j];
  9015. FaceName2[j] = array[1];
  9016. FaceName3[j] = array[2];
  9017. FaceTime[j] = 0.0166666675f;
  9018. break;
  9019. }
  9020. }
  9021. }
  9022. else if (j == 3 || j == 9 || j == 11)
  9023. {
  9024. foreach (string text3 in dance6DArray)
  9025. {
  9026. string[] array = text3.Split(new char[] { ',' });
  9027. float num10 = float.Parse(array[0]);
  9028. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9029. {
  9030. danceFace[j] = num10;
  9031. FaceName[j] = FaceName2[j];
  9032. FaceName2[j] = array[1];
  9033. FaceName3[j] = array[2];
  9034. FaceTime[j] = 0.0166666675f;
  9035. break;
  9036. }
  9037. }
  9038. }
  9039. else
  9040. {
  9041. foreach (string text3 in dance6Array)
  9042. {
  9043. string[] array = text3.Split(new char[] { ',' });
  9044. float num10 = float.Parse(array[0]);
  9045. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9046. {
  9047. danceFace[j] = num10;
  9048. FaceName[j] = FaceName2[j];
  9049. FaceName2[j] = array[1];
  9050. FaceName3[j] = array[2];
  9051. FaceTime[j] = 0.0166666675f;
  9052. break;
  9053. }
  9054. }
  9055. }
  9056. }
  9057. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9058. {
  9059. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9060. {
  9061. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9062. }
  9063. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9064. {
  9065. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9066. 100f,
  9067. maidArray[j - 1].transform.position.z));
  9068. }
  9069. }
  9070. if (isDanceStart8V)
  9071. {
  9072. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9073. {
  9074. isDanceStart8P = true;
  9075. for (int num11 = 0; num11 < maidCnt; num11++)
  9076. {
  9077. if (maidArray[num11].Visible)
  9078. {
  9079. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9080. {
  9081. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9082. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9083. gameObject6.transform.position =
  9084. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9085. .position;
  9086. }
  9087. }
  9088. }
  9089. }
  9090. }
  9091. if (isDanceStart9F)
  9092. {
  9093. if (isDanceStart9K)
  9094. {
  9095. foreach (string text3 in dance9KArray)
  9096. {
  9097. string[] array = text3.Split(new char[] { ',' });
  9098. float num10 = float.Parse(array[0]);
  9099. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9100. {
  9101. danceFace[j] = num10;
  9102. FaceName[j] = FaceName2[j];
  9103. FaceName2[j] = array[1];
  9104. FaceName3[j] = array[2];
  9105. FaceTime[j] = 0.0166666675f;
  9106. break;
  9107. }
  9108. }
  9109. }
  9110. else
  9111. {
  9112. foreach (string text3 in dance7Array)
  9113. {
  9114. string[] array = text3.Split(new char[] { ',' });
  9115. float num10 = float.Parse(array[0]);
  9116. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9117. {
  9118. danceFace[j] = num10;
  9119. FaceName[j] = FaceName2[j];
  9120. FaceName2[j] = array[1];
  9121. FaceName3[j] = array[2];
  9122. FaceTime[j] = 0.0166666675f;
  9123. break;
  9124. }
  9125. }
  9126. }
  9127. }
  9128. if (isDanceStart10F)
  9129. {
  9130. foreach (string text3 in danceO1Array)
  9131. {
  9132. string[] array = text3.Split(new char[] { ',' });
  9133. float num10 = float.Parse(array[0]);
  9134. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9135. {
  9136. danceFace[j] = num10;
  9137. FaceName[j] = FaceName2[j];
  9138. FaceName2[j] = array[1];
  9139. FaceName3[j] = array[2];
  9140. FaceTime[j] = 0.0166666675f;
  9141. break;
  9142. }
  9143. }
  9144. }
  9145. if (isDanceStart11F)
  9146. {
  9147. string[] array14 = null;
  9148. string[] array12 = null;
  9149. string[] array15 = null;
  9150. if (isSS1)
  9151. {
  9152. array14 = danceO1Array;
  9153. array12 = danceO1CArray;
  9154. array15 = danceO1BArray;
  9155. }
  9156. if (isSS2)
  9157. {
  9158. array14 = danceO2Array;
  9159. array12 = danceO2BArray;
  9160. array15 = danceO2CArray;
  9161. }
  9162. if (isSS3)
  9163. {
  9164. array14 = danceO3CArray;
  9165. array12 = danceO3Array;
  9166. array15 = danceO3BArray;
  9167. }
  9168. if (isSS4)
  9169. {
  9170. array14 = danceO5BArray;
  9171. array12 = danceO5Array;
  9172. array15 = danceO5CArray;
  9173. }
  9174. if (isSS5)
  9175. {
  9176. array14 = danceO4Array;
  9177. array12 = danceO4BArray;
  9178. array15 = danceO4CArray;
  9179. }
  9180. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9181. {
  9182. foreach (string text3 in array12)
  9183. {
  9184. string[] array = text3.Split(new char[] { ',' });
  9185. float num10 = float.Parse(array[0]) - 0.03f;
  9186. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9187. {
  9188. danceFace[j] = num10;
  9189. FaceName[j] = FaceName2[j];
  9190. FaceName2[j] = array[1];
  9191. FaceName3[j] = array[2];
  9192. FaceTime[j] = 0.0166666675f;
  9193. break;
  9194. }
  9195. }
  9196. }
  9197. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9198. {
  9199. foreach (string text3 in array15)
  9200. {
  9201. string[] array = text3.Split(new char[] { ',' });
  9202. float num10 = float.Parse(array[0]) - 0.03f;
  9203. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9204. {
  9205. danceFace[j] = num10;
  9206. FaceName[j] = FaceName2[j];
  9207. FaceName2[j] = array[1];
  9208. FaceName3[j] = array[2];
  9209. FaceTime[j] = 0.0166666675f;
  9210. break;
  9211. }
  9212. }
  9213. }
  9214. else
  9215. {
  9216. foreach (string text3 in array14)
  9217. {
  9218. string[] array = text3.Split(new char[] { ',' });
  9219. float num10 = float.Parse(array[0]) - 0.03f;
  9220. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9221. {
  9222. danceFace[j] = num10;
  9223. FaceName[j] = FaceName2[j];
  9224. FaceName2[j] = array[1];
  9225. FaceName3[j] = array[2];
  9226. FaceTime[j] = 0.0166666675f;
  9227. break;
  9228. }
  9229. }
  9230. }
  9231. }
  9232. if (isDanceStart12F)
  9233. {
  9234. foreach (string text3 in dance12Array)
  9235. {
  9236. string[] array = text3.Split(new char[] { ',' });
  9237. float num10 = float.Parse(array[0]);
  9238. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9239. {
  9240. danceFace[j] = num10;
  9241. FaceName[j] = FaceName2[j];
  9242. FaceName2[j] = array[1];
  9243. FaceName3[j] = array[2];
  9244. FaceTime[j] = 0.0166666675f;
  9245. break;
  9246. }
  9247. }
  9248. }
  9249. if (isDanceStart13F)
  9250. {
  9251. if (!isDanceStart13K)
  9252. {
  9253. foreach (string text3 in dance13Array)
  9254. {
  9255. string[] array = text3.Split(new char[] { ',' });
  9256. float num10 = float.Parse(array[0]);
  9257. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9258. {
  9259. danceFace[j] = num10;
  9260. FaceName[j] = FaceName2[j];
  9261. FaceName2[j] = array[1];
  9262. FaceName3[j] = array[2];
  9263. FaceTime[j] = 0.0166666675f;
  9264. break;
  9265. }
  9266. }
  9267. }
  9268. }
  9269. if (isDanceStart14F)
  9270. {
  9271. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9272. {
  9273. foreach (string text3 in dance13BArray)
  9274. {
  9275. string[] array = text3.Split(new char[] { ',' });
  9276. float num10 = float.Parse(array[0]);
  9277. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9278. {
  9279. danceFace[j] = num10;
  9280. FaceName[j] = FaceName2[j];
  9281. FaceName2[j] = array[1];
  9282. FaceName3[j] = array[2];
  9283. FaceTime[j] = 0.0166666675f;
  9284. break;
  9285. }
  9286. }
  9287. }
  9288. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9289. {
  9290. foreach (string text3 in dance13CArray)
  9291. {
  9292. string[] array = text3.Split(new char[] { ',' });
  9293. float num10 = float.Parse(array[0]);
  9294. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9295. {
  9296. danceFace[j] = num10;
  9297. FaceName[j] = FaceName2[j];
  9298. FaceName2[j] = array[1];
  9299. FaceName3[j] = array[2];
  9300. FaceTime[j] = 0.0166666675f;
  9301. break;
  9302. }
  9303. }
  9304. }
  9305. else
  9306. {
  9307. foreach (string text3 in dance13Array)
  9308. {
  9309. string[] array = text3.Split(new char[] { ',' });
  9310. float num10 = float.Parse(array[0]);
  9311. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9312. {
  9313. danceFace[j] = num10;
  9314. FaceName[j] = FaceName2[j];
  9315. FaceName2[j] = array[1];
  9316. FaceName3[j] = array[2];
  9317. FaceTime[j] = 0.0166666675f;
  9318. break;
  9319. }
  9320. }
  9321. }
  9322. }
  9323. if (isDanceStart15F)
  9324. {
  9325. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9326. {
  9327. foreach (string text3 in dance15BArray)
  9328. {
  9329. string[] array = text3.Split(new char[] { ',' });
  9330. float num10 = float.Parse(array[0]);
  9331. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9332. {
  9333. danceFace[j] = num10;
  9334. FaceName[j] = FaceName2[j];
  9335. FaceName2[j] = array[1];
  9336. FaceName3[j] = array[2];
  9337. FaceTime[j] = 0.0166666675f;
  9338. break;
  9339. }
  9340. }
  9341. }
  9342. else
  9343. {
  9344. foreach (string text3 in dance15Array)
  9345. {
  9346. string[] array = text3.Split(new char[] { ',' });
  9347. float num10 = float.Parse(array[0]);
  9348. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9349. {
  9350. danceFace[j] = num10;
  9351. FaceName[j] = FaceName2[j];
  9352. FaceName2[j] = array[1];
  9353. FaceName3[j] = array[2];
  9354. FaceTime[j] = 0.0166666675f;
  9355. break;
  9356. }
  9357. }
  9358. }
  9359. }
  9360. if (!isFadeOut)
  9361. {
  9362. Maid maid = maidArray[j];
  9363. if (maid && maid.Visible)
  9364. {
  9365. if (maid.transform.position.y != 100f)
  9366. {
  9367. FaceTime[j] += Time.deltaTime;
  9368. if (FaceTime[j] < 1f)
  9369. {
  9370. TMorph morph = maid.body0.Face.morph;
  9371. maid.boMabataki = false;
  9372. maid.body0.Face.morph.EyeMabataki = 0f;
  9373. if (FaceName[j] != string.Empty)
  9374. {
  9375. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9376. }
  9377. if (FaceName2[j] != "")
  9378. {
  9379. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9380. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9381. }
  9382. if (FaceName3[j] != string.Empty)
  9383. {
  9384. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9385. }
  9386. maid.body0.Face.morph.FixBlendValues_Face();
  9387. }
  9388. else
  9389. {
  9390. FaceName[j] = FaceName2[j];
  9391. }
  9392. if (isHenkou)
  9393. {
  9394. TMorph morph = maid.body0.Face.morph;
  9395. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9396. maid.boMabataki = false;
  9397. if (isNamidaH)
  9398. {
  9399. fieldValue[(int)morph.hash["namida"]] = 1f;
  9400. }
  9401. else
  9402. {
  9403. fieldValue[(int)morph.hash["namida"]] = 0f;
  9404. }
  9405. if (isSekimenH)
  9406. {
  9407. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9408. }
  9409. else
  9410. {
  9411. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9412. }
  9413. if (isHohoH)
  9414. {
  9415. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9416. }
  9417. else
  9418. {
  9419. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9420. }
  9421. maid.body0.Face.morph.FixBlendValues_Face();
  9422. }
  9423. }
  9424. }
  9425. }
  9426. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9427. }
  9428. }
  9429. if (Input.GetKey(KeyCode.H) || isVR)
  9430. {
  9431. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9432. {
  9433. h2Flg = true;
  9434. isNamidaH = !isNamidaH;
  9435. isHenkou = true;
  9436. }
  9437. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9438. {
  9439. h2Flg = true;
  9440. isSekimenH = !isSekimenH;
  9441. isHenkou = true;
  9442. }
  9443. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9444. {
  9445. h2Flg = true;
  9446. isHohoH = !isHohoH;
  9447. isHenkou = true;
  9448. }
  9449. }
  9450. danceCheckIndex++;
  9451. if (danceCheckIndex == 10)
  9452. {
  9453. danceCheckIndex = 0;
  9454. }
  9455. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9456. isDanceChu = false;
  9457. for (int k = 0; k < danceCheck.Length; k++)
  9458. {
  9459. if (danceCheck[k] > 0f)
  9460. {
  9461. isDanceChu = true;
  9462. break;
  9463. }
  9464. }
  9465. if (!isDanceChu)
  9466. {
  9467. danceWait--;
  9468. if (danceWait > 0)
  9469. {
  9470. isDanceChu = true;
  9471. }
  9472. }
  9473. if (!isDanceChu)
  9474. {
  9475. for (int j = 0; j < maidCnt; j++)
  9476. {
  9477. if (maidArray[j] && maidArray[j].Visible)
  9478. {
  9479. maidArray[j].StopKuchipakuPattern();
  9480. if (isDanceStart7V)
  9481. {
  9482. maidArray[j].SetPos(dancePos[j]);
  9483. maidArray[j].body0.transform.localRotation = danceRot[j];
  9484. }
  9485. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9486. {
  9487. maidArray[j].SetPos(dancePos[j]);
  9488. maidArray[j].body0.transform.localRotation = danceRot[j];
  9489. }
  9490. if (isDanceStart11V)
  9491. {
  9492. maidArray[j].SetPos(dancePos[j]);
  9493. maidArray[j].body0.transform.localRotation = danceRot[j];
  9494. }
  9495. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9496. || isDanceStart13K)
  9497. {
  9498. maidArray[j].SetPos(dancePos[j]);
  9499. maidArray[j].body0.transform.localRotation = danceRot[j];
  9500. int i = j;
  9501. if (!isVR)
  9502. {
  9503. delCount[i] = 20;
  9504. if (goSlot[(int)selectList[i]] != null)
  9505. {
  9506. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9507. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9508. {
  9509. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9510. }
  9511. }
  9512. }
  9513. Maid maid = maidArray[j];
  9514. maid.DelProp(MPN.handitem, true);
  9515. maid.DelProp(MPN.accvag, true);
  9516. maid.DelProp(MPN.accanl, true);
  9517. maid.DelProp(MPN.kousoku_upper, true);
  9518. maid.DelProp(MPN.kousoku_lower, true);
  9519. maid.AllProcPropSeqStart();
  9520. isStop[i] = true;
  9521. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9522. isPoseIti[i] = true;
  9523. poseIti[i] = maidArray[i].transform.position;
  9524. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9525. }
  9526. if (isDanceStart14V)
  9527. {
  9528. maidArray[j].SetPos(dancePos[j]);
  9529. maidArray[j].body0.transform.localRotation = danceRot[j];
  9530. }
  9531. if (isDanceStart15V)
  9532. {
  9533. maidArray[j].SetPos(dancePos[j]);
  9534. maidArray[j].body0.transform.localRotation = danceRot[j];
  9535. }
  9536. }
  9537. }
  9538. isDanceStart1F = false;
  9539. isDanceStart1K = false;
  9540. isDanceStart2F = false;
  9541. isDanceStart3F = false;
  9542. isDanceStart3K = false;
  9543. isDanceStart4F = false;
  9544. isDanceStart4K = false;
  9545. isDanceStart5F = false;
  9546. isDanceStart5K = false;
  9547. isDanceStart6F = false;
  9548. isDanceStart6K = false;
  9549. isDanceStart7F = false;
  9550. isDanceStart7V = false;
  9551. isDanceStart8F = false;
  9552. isDanceStart8V = false;
  9553. isDanceStart8P = false;
  9554. isDanceStart9F = false;
  9555. isDanceStart9K = false;
  9556. isDanceStart10F = false;
  9557. isDanceStart11F = false;
  9558. isDanceStart11V = false;
  9559. isDanceStart12F = false;
  9560. isDanceStart13F = false;
  9561. isDanceStart13K = false;
  9562. isDanceStart14F = false;
  9563. isDanceStart14V = false;
  9564. isDanceStart15F = false;
  9565. isDanceStart15V = false;
  9566. for (int j = 0; j < maidCnt; j++)
  9567. {
  9568. danceFace[j] = 0f;
  9569. }
  9570. danceCheckIndex = 0;
  9571. for (int k = 0; k < danceCheck.Length; k++)
  9572. {
  9573. danceCheck[danceCheckIndex] = 1f;
  9574. }
  9575. isDance = false;
  9576. }
  9577. }
  9578. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9579. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9580. {
  9581. if (getModKeyPressing(modKey.Shift))
  9582. {
  9583. isShift = true;
  9584. }
  9585. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9586. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9587. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9588. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9589. if (!isShift)
  9590. {
  9591. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9592. }
  9593. for (int j = 0; j < maidCnt; j++)
  9594. {
  9595. string text5 = "dance_cm3d2_001_f1.anm";
  9596. switch (j)
  9597. {
  9598. case 1:
  9599. case 3:
  9600. case 5:
  9601. case 7:
  9602. case 9:
  9603. case 11:
  9604. case 13:
  9605. text5 = "dance_cm3d2_001_f2.anm";
  9606. break;
  9607. case 2:
  9608. case 4:
  9609. case 6:
  9610. case 8:
  9611. case 10:
  9612. case 12:
  9613. text5 = "dance_cm3d2_001_f3.anm";
  9614. break;
  9615. }
  9616. if (!isShift)
  9617. {
  9618. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9619. {
  9620. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9621. }
  9622. }
  9623. else
  9624. {
  9625. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9626. {
  9627. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9628. GameUty.FileSystem,
  9629. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9630. false,
  9631. false);
  9632. }
  9633. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9634. text4 = textAsset.text;
  9635. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9636. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9637. && !isDanceStart9K && !isDanceStart13K)
  9638. {
  9639. dancePos[j] = maidArray[j].transform.position;
  9640. danceRot[j] = maidArray[j].transform.localRotation;
  9641. }
  9642. }
  9643. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9644. }
  9645. if (!isShift)
  9646. {
  9647. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9648. sw = new Stopwatch();
  9649. sw.Start();
  9650. }
  9651. else if (getModKeyPressing(modKey.Ctrl))
  9652. {
  9653. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9654. }
  9655. else
  9656. {
  9657. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9658. }
  9659. for (int j = 0; j < maidCnt; j++)
  9660. {
  9661. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9662. Vector3 vector = Vector3.zero;
  9663. switch (j)
  9664. {
  9665. case 3:
  9666. vector.x = 1f;
  9667. break;
  9668. case 4:
  9669. vector.x = -1f;
  9670. break;
  9671. case 5:
  9672. vector.x = 2f;
  9673. break;
  9674. case 6:
  9675. vector.x = -2f;
  9676. break;
  9677. case 7:
  9678. vector.x = 3f;
  9679. break;
  9680. case 8:
  9681. vector.x = -3f;
  9682. break;
  9683. case 9:
  9684. vector.x = 4f;
  9685. break;
  9686. case 10:
  9687. vector.x = -4f;
  9688. break;
  9689. case 11:
  9690. vector.x = 5f;
  9691. break;
  9692. case 12:
  9693. vector.x = -5f;
  9694. break;
  9695. case 13:
  9696. vector.x = 6f;
  9697. break;
  9698. }
  9699. if (!isShift)
  9700. {
  9701. maidArray[j].SetPos(vector);
  9702. }
  9703. isStop[j] = false;
  9704. isLock[j] = false;
  9705. pHandL[j] = 0;
  9706. pHandR[j] = 0;
  9707. muneIKL[j] = false;
  9708. muneIKR[j] = false;
  9709. if (!isVR)
  9710. {
  9711. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9712. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9713. }
  9714. }
  9715. ikBui = 5;
  9716. isDanceStart1F = false;
  9717. isDanceStart2F = false;
  9718. isDanceStart3F = false;
  9719. isDanceStart4F = false;
  9720. isDanceStart5F = false;
  9721. isDanceStart6F = false;
  9722. isDanceStart7F = false;
  9723. isDanceStart8F = false;
  9724. isDanceStart9F = false;
  9725. isDanceStart10F = false;
  9726. isDanceStart11F = false;
  9727. isDanceStart12F = false;
  9728. isDanceStart13F = false;
  9729. isDanceStart14F = false;
  9730. isDanceStart15F = false;
  9731. for (int j = 0; j < maidCnt; j++)
  9732. {
  9733. danceFace[j] = 0f;
  9734. }
  9735. if (isDanceStart7V)
  9736. {
  9737. for (int j = 0; j < maidCnt; j++)
  9738. {
  9739. if (maidArray[j] && maidArray[j].Visible)
  9740. {
  9741. if (isDanceStart7V)
  9742. {
  9743. maidArray[j].SetPos(dancePos[j]);
  9744. maidArray[j].body0.transform.localRotation = danceRot[j];
  9745. }
  9746. }
  9747. }
  9748. isDanceStart7V = false;
  9749. }
  9750. if (isDanceStart8V)
  9751. {
  9752. for (int j = 0; j < maidCnt; j++)
  9753. {
  9754. if (maidArray[j] && maidArray[j].Visible)
  9755. {
  9756. if (isDanceStart8V)
  9757. {
  9758. maidArray[j].SetPos(dancePos[j]);
  9759. maidArray[j].body0.transform.localRotation = danceRot[j];
  9760. }
  9761. }
  9762. }
  9763. isDanceStart8V = false;
  9764. isDanceStart8P = false;
  9765. }
  9766. if (isDanceStart11V)
  9767. {
  9768. for (int j = 0; j < maidCnt; j++)
  9769. {
  9770. if (maidArray[j] && maidArray[j].Visible)
  9771. {
  9772. if (isDanceStart11V)
  9773. {
  9774. maidArray[j].SetPos(dancePos[j]);
  9775. maidArray[j].body0.transform.localRotation = danceRot[j];
  9776. }
  9777. }
  9778. }
  9779. isDanceStart11V = false;
  9780. }
  9781. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9782. || isDanceStart13K)
  9783. {
  9784. for (int j = 0; j < maidCnt; j++)
  9785. {
  9786. if (maidArray[j] && maidArray[j].Visible)
  9787. {
  9788. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9789. || isDanceStart13K)
  9790. {
  9791. maidArray[j].SetPos(dancePos[j]);
  9792. maidArray[j].body0.transform.localRotation = danceRot[j];
  9793. int i = j;
  9794. if (!isVR)
  9795. {
  9796. delCount[i] = 20;
  9797. if (goSlot[(int)selectList[i]] != null)
  9798. {
  9799. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9800. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9801. {
  9802. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9803. }
  9804. }
  9805. }
  9806. Maid maid = maidArray[j];
  9807. maid.DelProp(MPN.handitem, true);
  9808. maid.DelProp(MPN.accvag, true);
  9809. maid.DelProp(MPN.accanl, true);
  9810. maid.DelProp(MPN.kousoku_upper, true);
  9811. maid.DelProp(MPN.kousoku_lower, true);
  9812. maid.AllProcPropSeqStart();
  9813. }
  9814. }
  9815. }
  9816. isDanceStart1K = false;
  9817. isDanceStart3K = false;
  9818. isDanceStart4K = false;
  9819. isDanceStart5K = false;
  9820. isDanceStart6K = false;
  9821. isDanceStart9K = false;
  9822. isDanceStart13K = false;
  9823. }
  9824. if (isDanceStart14V)
  9825. {
  9826. for (int j = 0; j < maidCnt; j++)
  9827. {
  9828. if (maidArray[j] && maidArray[j].Visible)
  9829. {
  9830. if (isDanceStart14V)
  9831. {
  9832. maidArray[j].SetPos(dancePos[j]);
  9833. maidArray[j].body0.transform.localRotation = danceRot[j];
  9834. }
  9835. }
  9836. }
  9837. isDanceStart14V = false;
  9838. }
  9839. if (isDanceStart15V)
  9840. {
  9841. for (int j = 0; j < maidCnt; j++)
  9842. {
  9843. if (maidArray[j] && maidArray[j].Visible)
  9844. {
  9845. if (isDanceStart15V)
  9846. {
  9847. maidArray[j].SetPos(dancePos[j]);
  9848. maidArray[j].body0.transform.localRotation = danceRot[j];
  9849. }
  9850. }
  9851. }
  9852. isDanceStart15V = false;
  9853. }
  9854. if (isShift)
  9855. {
  9856. if (maidArray[1] && maidArray[1].Visible)
  9857. {
  9858. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9859. {
  9860. Vector3 vector = Vector3.zero;
  9861. vector.x = 0.6f;
  9862. maidArray[1].SetPos(vector);
  9863. if (maidArray[2] && maidArray[2].Visible)
  9864. {
  9865. vector.x = -0.6f;
  9866. maidArray[2].SetPos(vector);
  9867. }
  9868. if (maidArray[3] && maidArray[3].Visible)
  9869. {
  9870. vector.x = 1.2f;
  9871. maidArray[3].SetPos(vector);
  9872. }
  9873. if (maidArray[4] && maidArray[4].Visible)
  9874. {
  9875. vector.x = -1.2f;
  9876. maidArray[4].SetPos(vector);
  9877. }
  9878. if (maidArray[5] && maidArray[5].Visible)
  9879. {
  9880. vector.x = 1.8f;
  9881. maidArray[5].SetPos(vector);
  9882. }
  9883. if (maidArray[6] && maidArray[6].Visible)
  9884. {
  9885. vector.x = -1.8f;
  9886. maidArray[6].SetPos(vector);
  9887. }
  9888. if (maidArray[7] && maidArray[7].Visible)
  9889. {
  9890. vector.x = 2.4f;
  9891. maidArray[7].SetPos(vector);
  9892. }
  9893. if (maidArray[8] && maidArray[8].Visible)
  9894. {
  9895. vector.x = -2.4f;
  9896. maidArray[8].SetPos(vector);
  9897. }
  9898. if (maidArray[9] && maidArray[9].Visible)
  9899. {
  9900. vector.x = 3f;
  9901. maidArray[9].SetPos(vector);
  9902. }
  9903. if (maidArray[10] && maidArray[10].Visible)
  9904. {
  9905. vector.x = -3f;
  9906. maidArray[10].SetPos(vector);
  9907. }
  9908. if (maidArray[11] && maidArray[11].Visible)
  9909. {
  9910. vector.x = 3.6f;
  9911. maidArray[11].SetPos(vector);
  9912. }
  9913. if (maidArray[12] && maidArray[12].Visible)
  9914. {
  9915. vector.x = -3.6f;
  9916. maidArray[12].SetPos(vector);
  9917. }
  9918. if (maidArray[13] && maidArray[13].Visible)
  9919. {
  9920. vector.x = 4.2f;
  9921. maidArray[13].SetPos(vector);
  9922. }
  9923. }
  9924. }
  9925. isDanceStart1K = true;
  9926. for (int j = 0; j < maidCnt; j++)
  9927. {
  9928. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9929. maidArray[j].body0.transform.localRotation.y + 90f,
  9930. maidArray[j].body0.transform.localRotation.z));
  9931. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9932. maidArray[j].body0.transform.position.y,
  9933. maidArray[j].body0.transform.position.z + 4f));
  9934. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9935. int i = j;
  9936. Maid maid = maidArray[j];
  9937. if (!isVR)
  9938. {
  9939. delCount[i] = 20;
  9940. if (goSlot[(int)selectList[i]] != null)
  9941. {
  9942. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9943. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9944. {
  9945. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9946. }
  9947. }
  9948. }
  9949. string[] array = new string[2];
  9950. array = text2.Split(new char[] { ',' });
  9951. maid.DelProp(MPN.handitem, true);
  9952. maid.DelProp(MPN.accvag, true);
  9953. maid.DelProp(MPN.accanl, true);
  9954. maid.DelProp(MPN.kousoku_upper, true);
  9955. maid.DelProp(MPN.kousoku_lower, true);
  9956. if (array[0] != "")
  9957. {
  9958. maid.SetProp(array[0], array[1], 0, true, false);
  9959. }
  9960. maid.AllProcPropSeqStart();
  9961. }
  9962. }
  9963. isDance = true;
  9964. isDanceStart1 = true;
  9965. }
  9966. if (isF2)
  9967. {
  9968. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  9969. string text4 = textAsset.text;
  9970. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9971. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9972. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9973. for (int j = 0; j < maidCnt; j++)
  9974. {
  9975. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  9976. {
  9977. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  9978. GameUty.FileSystem,
  9979. "dance_cm3d_001_f1.anm",
  9980. false,
  9981. false);
  9982. }
  9983. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9984. }
  9985. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  9986. for (int j = 0; j < maidCnt; j++)
  9987. {
  9988. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9989. isStop[j] = false;
  9990. isLock[j] = false;
  9991. pHandL[j] = 0;
  9992. pHandR[j] = 0;
  9993. muneIKL[j] = false;
  9994. muneIKR[j] = false;
  9995. if (!isVR)
  9996. {
  9997. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9998. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9999. }
  10000. }
  10001. ikBui = 5;
  10002. isDanceStart1F = false;
  10003. isDanceStart2F = false;
  10004. isDanceStart3F = false;
  10005. isDanceStart4F = false;
  10006. isDanceStart5F = false;
  10007. isDanceStart6F = false;
  10008. isDanceStart7F = false;
  10009. isDanceStart8F = false;
  10010. isDanceStart9F = false;
  10011. isDanceStart10F = false;
  10012. isDanceStart11F = false;
  10013. isDanceStart12F = false;
  10014. isDanceStart13F = false;
  10015. isDanceStart14F = false;
  10016. isDanceStart15F = false;
  10017. for (int j = 0; j < maidCnt; j++)
  10018. {
  10019. danceFace[j] = 0f;
  10020. }
  10021. if (isDanceStart7V)
  10022. {
  10023. for (int j = 0; j < maidCnt; j++)
  10024. {
  10025. if (maidArray[j] && maidArray[j].Visible)
  10026. {
  10027. if (isDanceStart7V)
  10028. {
  10029. maidArray[j].SetPos(dancePos[j]);
  10030. maidArray[j].body0.transform.localRotation = danceRot[j];
  10031. }
  10032. }
  10033. }
  10034. isDanceStart7V = false;
  10035. }
  10036. if (isDanceStart8V)
  10037. {
  10038. for (int j = 0; j < maidCnt; j++)
  10039. {
  10040. if (maidArray[j] && maidArray[j].Visible)
  10041. {
  10042. if (isDanceStart8V)
  10043. {
  10044. maidArray[j].SetPos(dancePos[j]);
  10045. maidArray[j].body0.transform.localRotation = danceRot[j];
  10046. }
  10047. }
  10048. }
  10049. isDanceStart8V = false;
  10050. isDanceStart8P = false;
  10051. }
  10052. if (isDanceStart11V)
  10053. {
  10054. for (int j = 0; j < maidCnt; j++)
  10055. {
  10056. if (maidArray[j] && maidArray[j].Visible)
  10057. {
  10058. if (isDanceStart11V)
  10059. {
  10060. maidArray[j].SetPos(dancePos[j]);
  10061. maidArray[j].body0.transform.localRotation = danceRot[j];
  10062. }
  10063. }
  10064. }
  10065. isDanceStart11V = false;
  10066. }
  10067. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10068. || isDanceStart13K)
  10069. {
  10070. for (int j = 0; j < maidCnt; j++)
  10071. {
  10072. if (maidArray[j] && maidArray[j].Visible)
  10073. {
  10074. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10075. || isDanceStart13K)
  10076. {
  10077. maidArray[j].SetPos(dancePos[j]);
  10078. maidArray[j].body0.transform.localRotation = danceRot[j];
  10079. int i = j;
  10080. if (!isVR)
  10081. {
  10082. delCount[i] = 20;
  10083. if (goSlot[(int)selectList[i]] != null)
  10084. {
  10085. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10086. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10087. {
  10088. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10089. }
  10090. }
  10091. }
  10092. Maid maid = maidArray[j];
  10093. maid.DelProp(MPN.handitem, true);
  10094. maid.DelProp(MPN.accvag, true);
  10095. maid.DelProp(MPN.accanl, true);
  10096. maid.DelProp(MPN.kousoku_upper, true);
  10097. maid.DelProp(MPN.kousoku_lower, true);
  10098. maid.AllProcPropSeqStart();
  10099. }
  10100. }
  10101. }
  10102. isDanceStart1K = false;
  10103. isDanceStart3K = false;
  10104. isDanceStart4K = false;
  10105. isDanceStart5K = false;
  10106. isDanceStart6K = false;
  10107. isDanceStart9K = false;
  10108. isDanceStart13K = false;
  10109. }
  10110. if (isDanceStart14V)
  10111. {
  10112. for (int j = 0; j < maidCnt; j++)
  10113. {
  10114. if (maidArray[j] && maidArray[j].Visible)
  10115. {
  10116. if (isDanceStart14V)
  10117. {
  10118. maidArray[j].SetPos(dancePos[j]);
  10119. maidArray[j].body0.transform.localRotation = danceRot[j];
  10120. }
  10121. }
  10122. }
  10123. isDanceStart14V = false;
  10124. }
  10125. if (isDanceStart15V)
  10126. {
  10127. for (int j = 0; j < maidCnt; j++)
  10128. {
  10129. if (maidArray[j] && maidArray[j].Visible)
  10130. {
  10131. if (isDanceStart15V)
  10132. {
  10133. maidArray[j].SetPos(dancePos[j]);
  10134. maidArray[j].body0.transform.localRotation = danceRot[j];
  10135. }
  10136. }
  10137. }
  10138. isDanceStart15V = false;
  10139. }
  10140. if (maidArray[1] && maidArray[1].Visible)
  10141. {
  10142. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10143. {
  10144. Vector3 vector = Vector3.zero;
  10145. vector.x = 0.6f;
  10146. maidArray[1].SetPos(vector);
  10147. if (maidArray[2] && maidArray[2].Visible)
  10148. {
  10149. vector.x = -0.6f;
  10150. maidArray[2].SetPos(vector);
  10151. }
  10152. if (maidArray[3] && maidArray[3].Visible)
  10153. {
  10154. vector.x = 1.2f;
  10155. maidArray[3].SetPos(vector);
  10156. }
  10157. if (maidArray[4] && maidArray[4].Visible)
  10158. {
  10159. vector.x = -1.2f;
  10160. maidArray[4].SetPos(vector);
  10161. }
  10162. if (maidArray[5] && maidArray[5].Visible)
  10163. {
  10164. vector.x = 1.8f;
  10165. maidArray[5].SetPos(vector);
  10166. }
  10167. if (maidArray[6] && maidArray[6].Visible)
  10168. {
  10169. vector.x = -1.8f;
  10170. maidArray[6].SetPos(vector);
  10171. }
  10172. if (maidArray[7] && maidArray[7].Visible)
  10173. {
  10174. vector.x = 2.4f;
  10175. maidArray[7].SetPos(vector);
  10176. }
  10177. if (maidArray[8] && maidArray[8].Visible)
  10178. {
  10179. vector.x = -2.4f;
  10180. maidArray[8].SetPos(vector);
  10181. }
  10182. if (maidArray[9] && maidArray[9].Visible)
  10183. {
  10184. vector.x = 3f;
  10185. maidArray[9].SetPos(vector);
  10186. }
  10187. if (maidArray[10] && maidArray[10].Visible)
  10188. {
  10189. vector.x = -3f;
  10190. maidArray[10].SetPos(vector);
  10191. }
  10192. if (maidArray[11] && maidArray[11].Visible)
  10193. {
  10194. vector.x = 3.6f;
  10195. maidArray[11].SetPos(vector);
  10196. }
  10197. if (maidArray[12] && maidArray[12].Visible)
  10198. {
  10199. vector.x = -3.6f;
  10200. maidArray[12].SetPos(vector);
  10201. }
  10202. if (maidArray[13] && maidArray[13].Visible)
  10203. {
  10204. vector.x = 4.2f;
  10205. maidArray[13].SetPos(vector);
  10206. }
  10207. }
  10208. }
  10209. isDance = true;
  10210. isDanceStart2 = true;
  10211. isF2 = false;
  10212. }
  10213. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10214. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10215. {
  10216. GameMain.Instance.SoundMgr.StopBGM(0f);
  10217. isF2 = true;
  10218. }
  10219. if (isF3)
  10220. {
  10221. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10222. string text4 = textAsset.text;
  10223. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10224. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10225. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10226. for (int j = 0; j < maidCnt; j++)
  10227. {
  10228. if (!isShift)
  10229. {
  10230. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10231. {
  10232. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10233. GameUty.FileSystem,
  10234. "dance_cm3d_002_end_f1.anm",
  10235. false,
  10236. false);
  10237. }
  10238. }
  10239. else
  10240. {
  10241. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10242. {
  10243. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10244. GameUty.FileSystem,
  10245. "dance_cm3d2_kara_001_sl_f1.anm",
  10246. false,
  10247. false);
  10248. }
  10249. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10250. text4 = textAsset.text;
  10251. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10252. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10253. && !isDanceStart9K && !isDanceStart13K)
  10254. {
  10255. dancePos[j] = maidArray[j].transform.position;
  10256. danceRot[j] = maidArray[j].transform.localRotation;
  10257. }
  10258. }
  10259. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10260. }
  10261. if (!isShift)
  10262. {
  10263. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10264. }
  10265. else
  10266. {
  10267. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10268. }
  10269. for (int j = 0; j < maidCnt; j++)
  10270. {
  10271. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10272. isStop[j] = false;
  10273. isLock[j] = false;
  10274. pHandL[j] = 0;
  10275. pHandR[j] = 0;
  10276. muneIKL[j] = false;
  10277. muneIKR[j] = false;
  10278. if (!isVR)
  10279. {
  10280. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10281. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10282. }
  10283. }
  10284. ikBui = 5;
  10285. isDanceStart1F = false;
  10286. isDanceStart2F = false;
  10287. isDanceStart3F = false;
  10288. isDanceStart4F = false;
  10289. isDanceStart5F = false;
  10290. isDanceStart6F = false;
  10291. isDanceStart7F = false;
  10292. isDanceStart8F = false;
  10293. isDanceStart9F = false;
  10294. isDanceStart10F = false;
  10295. isDanceStart11F = false;
  10296. isDanceStart12F = false;
  10297. isDanceStart13F = false;
  10298. isDanceStart14F = false;
  10299. isDanceStart15F = false;
  10300. for (int j = 0; j < maidCnt; j++)
  10301. {
  10302. danceFace[j] = 0f;
  10303. }
  10304. if (isDanceStart7V)
  10305. {
  10306. for (int j = 0; j < maidCnt; j++)
  10307. {
  10308. if (maidArray[j] && maidArray[j].Visible)
  10309. {
  10310. if (isDanceStart7V)
  10311. {
  10312. maidArray[j].SetPos(dancePos[j]);
  10313. maidArray[j].body0.transform.localRotation = danceRot[j];
  10314. }
  10315. }
  10316. }
  10317. isDanceStart7V = false;
  10318. }
  10319. if (isDanceStart8V)
  10320. {
  10321. for (int j = 0; j < maidCnt; j++)
  10322. {
  10323. if (maidArray[j] && maidArray[j].Visible)
  10324. {
  10325. if (isDanceStart8V)
  10326. {
  10327. maidArray[j].SetPos(dancePos[j]);
  10328. maidArray[j].body0.transform.localRotation = danceRot[j];
  10329. }
  10330. }
  10331. }
  10332. isDanceStart8V = false;
  10333. isDanceStart8P = false;
  10334. }
  10335. if (isDanceStart11V)
  10336. {
  10337. for (int j = 0; j < maidCnt; j++)
  10338. {
  10339. if (maidArray[j] && maidArray[j].Visible)
  10340. {
  10341. if (isDanceStart11V)
  10342. {
  10343. maidArray[j].SetPos(dancePos[j]);
  10344. maidArray[j].body0.transform.localRotation = danceRot[j];
  10345. }
  10346. }
  10347. }
  10348. isDanceStart11V = false;
  10349. }
  10350. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10351. || isDanceStart13K)
  10352. {
  10353. for (int j = 0; j < maidCnt; j++)
  10354. {
  10355. if (maidArray[j] && maidArray[j].Visible)
  10356. {
  10357. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10358. || isDanceStart13K)
  10359. {
  10360. maidArray[j].SetPos(dancePos[j]);
  10361. maidArray[j].body0.transform.localRotation = danceRot[j];
  10362. int i = j;
  10363. if (!isVR)
  10364. {
  10365. delCount[i] = 20;
  10366. if (goSlot[(int)selectList[i]] != null)
  10367. {
  10368. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10369. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10370. {
  10371. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10372. }
  10373. }
  10374. }
  10375. Maid maid = maidArray[j];
  10376. maid.DelProp(MPN.handitem, true);
  10377. maid.DelProp(MPN.accvag, true);
  10378. maid.DelProp(MPN.accanl, true);
  10379. maid.DelProp(MPN.kousoku_upper, true);
  10380. maid.DelProp(MPN.kousoku_lower, true);
  10381. maid.AllProcPropSeqStart();
  10382. }
  10383. }
  10384. }
  10385. isDanceStart1K = false;
  10386. isDanceStart3K = false;
  10387. isDanceStart4K = false;
  10388. isDanceStart5K = false;
  10389. isDanceStart6K = false;
  10390. isDanceStart9K = false;
  10391. isDanceStart13K = false;
  10392. }
  10393. if (isDanceStart14V)
  10394. {
  10395. for (int j = 0; j < maidCnt; j++)
  10396. {
  10397. if (maidArray[j] && maidArray[j].Visible)
  10398. {
  10399. if (isDanceStart14V)
  10400. {
  10401. maidArray[j].SetPos(dancePos[j]);
  10402. maidArray[j].body0.transform.localRotation = danceRot[j];
  10403. }
  10404. }
  10405. }
  10406. isDanceStart14V = false;
  10407. }
  10408. if (isDanceStart15V)
  10409. {
  10410. for (int j = 0; j < maidCnt; j++)
  10411. {
  10412. if (maidArray[j] && maidArray[j].Visible)
  10413. {
  10414. if (isDanceStart15V)
  10415. {
  10416. maidArray[j].SetPos(dancePos[j]);
  10417. maidArray[j].body0.transform.localRotation = danceRot[j];
  10418. }
  10419. }
  10420. }
  10421. isDanceStart15V = false;
  10422. }
  10423. if (maidArray[1] && maidArray[1].Visible)
  10424. {
  10425. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10426. {
  10427. Vector3 vector = Vector3.zero;
  10428. vector.x = 0.6f;
  10429. maidArray[1].SetPos(vector);
  10430. if (maidArray[2] && maidArray[2].Visible)
  10431. {
  10432. vector.x = -0.6f;
  10433. maidArray[2].SetPos(vector);
  10434. }
  10435. if (maidArray[3] && maidArray[3].Visible)
  10436. {
  10437. vector.x = 1.2f;
  10438. maidArray[3].SetPos(vector);
  10439. }
  10440. if (maidArray[4] && maidArray[4].Visible)
  10441. {
  10442. vector.x = -1.2f;
  10443. maidArray[4].SetPos(vector);
  10444. }
  10445. if (maidArray[5] && maidArray[5].Visible)
  10446. {
  10447. vector.x = 1.8f;
  10448. maidArray[5].SetPos(vector);
  10449. }
  10450. if (maidArray[6] && maidArray[6].Visible)
  10451. {
  10452. vector.x = -1.8f;
  10453. maidArray[6].SetPos(vector);
  10454. }
  10455. if (maidArray[7] && maidArray[7].Visible)
  10456. {
  10457. vector.x = 2.4f;
  10458. maidArray[7].SetPos(vector);
  10459. }
  10460. if (maidArray[8] && maidArray[8].Visible)
  10461. {
  10462. vector.x = -2.4f;
  10463. maidArray[8].SetPos(vector);
  10464. }
  10465. if (maidArray[9] && maidArray[9].Visible)
  10466. {
  10467. vector.x = 3f;
  10468. maidArray[9].SetPos(vector);
  10469. }
  10470. if (maidArray[10] && maidArray[10].Visible)
  10471. {
  10472. vector.x = -3f;
  10473. maidArray[10].SetPos(vector);
  10474. }
  10475. if (maidArray[11] && maidArray[11].Visible)
  10476. {
  10477. vector.x = 3.6f;
  10478. maidArray[11].SetPos(vector);
  10479. }
  10480. if (maidArray[12] && maidArray[12].Visible)
  10481. {
  10482. vector.x = -3.6f;
  10483. maidArray[12].SetPos(vector);
  10484. }
  10485. if (maidArray[13] && maidArray[13].Visible)
  10486. {
  10487. vector.x = 4.2f;
  10488. maidArray[13].SetPos(vector);
  10489. }
  10490. }
  10491. }
  10492. if (isShift)
  10493. {
  10494. isDanceStart3K = true;
  10495. for (int j = 0; j < maidCnt; j++)
  10496. {
  10497. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10498. maidArray[j].body0.transform.localRotation.y + 90f,
  10499. maidArray[j].body0.transform.localRotation.z));
  10500. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10501. maidArray[j].body0.transform.position.y,
  10502. maidArray[j].body0.transform.position.z + 4f));
  10503. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10504. int i = j;
  10505. Maid maid = maidArray[j];
  10506. if (!isVR)
  10507. {
  10508. delCount[i] = 20;
  10509. if (goSlot[(int)selectList[i]] != null)
  10510. {
  10511. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10512. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10513. {
  10514. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10515. }
  10516. }
  10517. }
  10518. string[] array = new string[2];
  10519. array = text2.Split(new char[] { ',' });
  10520. maid.DelProp(MPN.handitem, true);
  10521. maid.DelProp(MPN.accvag, true);
  10522. maid.DelProp(MPN.accanl, true);
  10523. maid.DelProp(MPN.kousoku_upper, true);
  10524. maid.DelProp(MPN.kousoku_lower, true);
  10525. if (array[0] != "")
  10526. {
  10527. maid.SetProp(array[0], array[1], 0, true, false);
  10528. }
  10529. maid.AllProcPropSeqStart();
  10530. }
  10531. }
  10532. isDance = true;
  10533. isDanceStart3 = true;
  10534. isF3 = false;
  10535. }
  10536. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10537. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10538. {
  10539. GameMain.Instance.SoundMgr.StopBGM(0f);
  10540. isF3 = true;
  10541. if (getModKeyPressing(modKey.Shift))
  10542. {
  10543. isShift = true;
  10544. }
  10545. }
  10546. if (isSF1 || isSF2 || isSF3)
  10547. {
  10548. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10549. string text4 = textAsset.text;
  10550. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10551. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10552. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10553. for (int j = 0; j < maidCnt; j++)
  10554. {
  10555. if (!isShift)
  10556. {
  10557. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10558. {
  10559. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10560. GameUty.FileSystem,
  10561. "dance_cm3d2_002_smt_f.anm",
  10562. false,
  10563. false);
  10564. }
  10565. }
  10566. else
  10567. {
  10568. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10569. {
  10570. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10571. GameUty.FileSystem,
  10572. "dance_cm3d2_kara02_001_smt_f1.anm",
  10573. false,
  10574. false);
  10575. }
  10576. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10577. text4 = textAsset.text;
  10578. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10579. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10580. && !isDanceStart9K && !isDanceStart13K)
  10581. {
  10582. dancePos[j] = maidArray[j].transform.position;
  10583. danceRot[j] = maidArray[j].transform.localRotation;
  10584. }
  10585. }
  10586. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10587. }
  10588. if (!isShift)
  10589. {
  10590. if (isSF1)
  10591. {
  10592. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10593. }
  10594. if (isSF2)
  10595. {
  10596. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10597. }
  10598. if (isSF3)
  10599. {
  10600. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10601. }
  10602. }
  10603. else
  10604. {
  10605. if (isSF1)
  10606. {
  10607. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10608. }
  10609. if (isSF2)
  10610. {
  10611. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10612. }
  10613. if (isSF3)
  10614. {
  10615. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10616. }
  10617. }
  10618. for (int j = 0; j < maidCnt; j++)
  10619. {
  10620. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10621. isStop[j] = false;
  10622. isLock[j] = false;
  10623. pHandL[j] = 0;
  10624. pHandR[j] = 0;
  10625. muneIKL[j] = false;
  10626. muneIKR[j] = false;
  10627. if (!isVR)
  10628. {
  10629. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10630. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10631. }
  10632. }
  10633. ikBui = 5;
  10634. isDanceStart1F = false;
  10635. isDanceStart2F = false;
  10636. isDanceStart3F = false;
  10637. isDanceStart4F = false;
  10638. isDanceStart5F = false;
  10639. isDanceStart6F = false;
  10640. isDanceStart7F = false;
  10641. isDanceStart8F = false;
  10642. isDanceStart9F = false;
  10643. isDanceStart10F = false;
  10644. isDanceStart11F = false;
  10645. isDanceStart12F = false;
  10646. isDanceStart13F = false;
  10647. isDanceStart14F = false;
  10648. isDanceStart15F = false;
  10649. for (int j = 0; j < maidCnt; j++)
  10650. {
  10651. danceFace[j] = 0f;
  10652. }
  10653. if (isDanceStart7V)
  10654. {
  10655. for (int j = 0; j < maidCnt; j++)
  10656. {
  10657. if (maidArray[j] && maidArray[j].Visible)
  10658. {
  10659. if (isDanceStart7V)
  10660. {
  10661. maidArray[j].SetPos(dancePos[j]);
  10662. maidArray[j].body0.transform.localRotation = danceRot[j];
  10663. }
  10664. }
  10665. }
  10666. isDanceStart7V = false;
  10667. }
  10668. if (isDanceStart8V)
  10669. {
  10670. for (int j = 0; j < maidCnt; j++)
  10671. {
  10672. if (maidArray[j] && maidArray[j].Visible)
  10673. {
  10674. if (isDanceStart8V)
  10675. {
  10676. maidArray[j].SetPos(dancePos[j]);
  10677. maidArray[j].body0.transform.localRotation = danceRot[j];
  10678. }
  10679. }
  10680. }
  10681. isDanceStart8V = false;
  10682. isDanceStart8P = false;
  10683. }
  10684. if (isDanceStart11V)
  10685. {
  10686. for (int j = 0; j < maidCnt; j++)
  10687. {
  10688. if (maidArray[j] && maidArray[j].Visible)
  10689. {
  10690. if (isDanceStart11V)
  10691. {
  10692. maidArray[j].SetPos(dancePos[j]);
  10693. maidArray[j].body0.transform.localRotation = danceRot[j];
  10694. }
  10695. }
  10696. }
  10697. isDanceStart11V = false;
  10698. }
  10699. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10700. || isDanceStart13K)
  10701. {
  10702. for (int j = 0; j < maidCnt; j++)
  10703. {
  10704. if (maidArray[j] && maidArray[j].Visible)
  10705. {
  10706. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10707. || isDanceStart13K)
  10708. {
  10709. maidArray[j].SetPos(dancePos[j]);
  10710. maidArray[j].body0.transform.localRotation = danceRot[j];
  10711. int i = j;
  10712. if (!isVR)
  10713. {
  10714. delCount[i] = 20;
  10715. if (goSlot[(int)selectList[i]] != null)
  10716. {
  10717. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10718. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10719. {
  10720. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10721. }
  10722. }
  10723. }
  10724. Maid maid = maidArray[j];
  10725. maid.DelProp(MPN.handitem, true);
  10726. maid.DelProp(MPN.accvag, true);
  10727. maid.DelProp(MPN.accanl, true);
  10728. maid.DelProp(MPN.kousoku_upper, true);
  10729. maid.DelProp(MPN.kousoku_lower, true);
  10730. maid.AllProcPropSeqStart();
  10731. }
  10732. }
  10733. }
  10734. isDanceStart1K = false;
  10735. isDanceStart3K = false;
  10736. isDanceStart4K = false;
  10737. isDanceStart5K = false;
  10738. isDanceStart6K = false;
  10739. isDanceStart9K = false;
  10740. isDanceStart13K = false;
  10741. }
  10742. if (isDanceStart14V)
  10743. {
  10744. for (int j = 0; j < maidCnt; j++)
  10745. {
  10746. if (maidArray[j] && maidArray[j].Visible)
  10747. {
  10748. if (isDanceStart14V)
  10749. {
  10750. maidArray[j].SetPos(dancePos[j]);
  10751. maidArray[j].body0.transform.localRotation = danceRot[j];
  10752. }
  10753. }
  10754. }
  10755. isDanceStart14V = false;
  10756. }
  10757. if (isDanceStart15V)
  10758. {
  10759. for (int j = 0; j < maidCnt; j++)
  10760. {
  10761. if (maidArray[j] && maidArray[j].Visible)
  10762. {
  10763. if (isDanceStart15V)
  10764. {
  10765. maidArray[j].SetPos(dancePos[j]);
  10766. maidArray[j].body0.transform.localRotation = danceRot[j];
  10767. }
  10768. }
  10769. }
  10770. isDanceStart15V = false;
  10771. }
  10772. if (maidArray[1] && maidArray[1].Visible)
  10773. {
  10774. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10775. {
  10776. Vector3 vector = Vector3.zero;
  10777. vector.x = 0.6f;
  10778. maidArray[1].SetPos(vector);
  10779. if (maidArray[2] && maidArray[2].Visible)
  10780. {
  10781. vector.x = -0.6f;
  10782. maidArray[2].SetPos(vector);
  10783. }
  10784. if (maidArray[3] && maidArray[3].Visible)
  10785. {
  10786. vector.x = 1.2f;
  10787. maidArray[3].SetPos(vector);
  10788. }
  10789. if (maidArray[4] && maidArray[4].Visible)
  10790. {
  10791. vector.x = -1.2f;
  10792. maidArray[4].SetPos(vector);
  10793. }
  10794. if (maidArray[5] && maidArray[5].Visible)
  10795. {
  10796. vector.x = 1.8f;
  10797. maidArray[5].SetPos(vector);
  10798. }
  10799. if (maidArray[6] && maidArray[6].Visible)
  10800. {
  10801. vector.x = -1.8f;
  10802. maidArray[6].SetPos(vector);
  10803. }
  10804. if (maidArray[7] && maidArray[7].Visible)
  10805. {
  10806. vector.x = 2.4f;
  10807. maidArray[7].SetPos(vector);
  10808. }
  10809. if (maidArray[8] && maidArray[8].Visible)
  10810. {
  10811. vector.x = -2.4f;
  10812. maidArray[8].SetPos(vector);
  10813. }
  10814. if (maidArray[9] && maidArray[9].Visible)
  10815. {
  10816. vector.x = 3f;
  10817. maidArray[9].SetPos(vector);
  10818. }
  10819. if (maidArray[10] && maidArray[10].Visible)
  10820. {
  10821. vector.x = -3f;
  10822. maidArray[10].SetPos(vector);
  10823. }
  10824. if (maidArray[11] && maidArray[11].Visible)
  10825. {
  10826. vector.x = 3.6f;
  10827. maidArray[11].SetPos(vector);
  10828. }
  10829. if (maidArray[12] && maidArray[12].Visible)
  10830. {
  10831. vector.x = -3.6f;
  10832. maidArray[12].SetPos(vector);
  10833. }
  10834. if (maidArray[13] && maidArray[13].Visible)
  10835. {
  10836. vector.x = 4.2f;
  10837. maidArray[13].SetPos(vector);
  10838. }
  10839. }
  10840. }
  10841. if (isShift)
  10842. {
  10843. isDanceStart4K = true;
  10844. for (int j = 0; j < maidCnt; j++)
  10845. {
  10846. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10847. maidArray[j].body0.transform.localRotation.y + 90f,
  10848. maidArray[j].body0.transform.localRotation.z));
  10849. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10850. maidArray[j].body0.transform.position.y,
  10851. maidArray[j].body0.transform.position.z + 4f));
  10852. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10853. int i = j;
  10854. Maid maid = maidArray[j];
  10855. if (!isVR)
  10856. {
  10857. delCount[i] = 20;
  10858. if (goSlot[(int)selectList[i]] != null)
  10859. {
  10860. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10861. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10862. {
  10863. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10864. }
  10865. }
  10866. }
  10867. string[] array = new string[2];
  10868. array = text2.Split(new char[] { ',' });
  10869. maid.DelProp(MPN.handitem, true);
  10870. maid.DelProp(MPN.accvag, true);
  10871. maid.DelProp(MPN.accanl, true);
  10872. maid.DelProp(MPN.kousoku_upper, true);
  10873. maid.DelProp(MPN.kousoku_lower, true);
  10874. if (array[0] != "")
  10875. {
  10876. maid.SetProp(array[0], array[1], 0, true, false);
  10877. }
  10878. maid.AllProcPropSeqStart();
  10879. }
  10880. }
  10881. isDance = true;
  10882. isDanceStart4 = true;
  10883. isSF1 = false;
  10884. isSF2 = false;
  10885. isSF3 = false;
  10886. }
  10887. if (isHS1 || isHS2 || isHS3)
  10888. {
  10889. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10890. string text4 = textAsset.text;
  10891. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10892. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10893. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10894. for (int j = 0; j < maidCnt; j++)
  10895. {
  10896. if (!isShift)
  10897. {
  10898. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10899. {
  10900. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10901. GameUty.FileSystem,
  10902. "dance_cm3d2_003_hs_f1.anm",
  10903. false,
  10904. false);
  10905. }
  10906. }
  10907. else
  10908. {
  10909. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10910. {
  10911. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10912. GameUty.FileSystem,
  10913. "dance_cm3d2_kara02_003_hs_f1.anm",
  10914. false,
  10915. false);
  10916. }
  10917. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10918. text4 = textAsset.text;
  10919. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10920. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10921. && !isDanceStart9K && !isDanceStart13K)
  10922. {
  10923. dancePos[j] = maidArray[j].transform.position;
  10924. danceRot[j] = maidArray[j].transform.localRotation;
  10925. }
  10926. }
  10927. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10928. }
  10929. if (!isShift)
  10930. {
  10931. if (isHS1)
  10932. {
  10933. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10934. }
  10935. if (isHS2)
  10936. {
  10937. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10938. }
  10939. if (isHS3)
  10940. {
  10941. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10942. }
  10943. }
  10944. else
  10945. {
  10946. if (isHS1)
  10947. {
  10948. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  10949. }
  10950. if (isHS2)
  10951. {
  10952. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  10953. }
  10954. if (isHS3)
  10955. {
  10956. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  10957. }
  10958. }
  10959. for (int j = 0; j < maidCnt; j++)
  10960. {
  10961. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10962. isStop[j] = false;
  10963. isLock[j] = false;
  10964. pHandL[j] = 0;
  10965. pHandR[j] = 0;
  10966. muneIKL[j] = false;
  10967. muneIKR[j] = false;
  10968. if (!isVR)
  10969. {
  10970. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10971. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10972. }
  10973. }
  10974. ikBui = 5;
  10975. isDanceStart1F = false;
  10976. isDanceStart2F = false;
  10977. isDanceStart3F = false;
  10978. isDanceStart4F = false;
  10979. isDanceStart5F = false;
  10980. isDanceStart6F = false;
  10981. isDanceStart7F = false;
  10982. isDanceStart8F = false;
  10983. isDanceStart9F = false;
  10984. isDanceStart10F = false;
  10985. isDanceStart11F = false;
  10986. isDanceStart12F = false;
  10987. isDanceStart13F = false;
  10988. isDanceStart14F = false;
  10989. isDanceStart15F = false;
  10990. for (int j = 0; j < maidCnt; j++)
  10991. {
  10992. danceFace[j] = 0f;
  10993. }
  10994. if (isDanceStart7V)
  10995. {
  10996. for (int j = 0; j < maidCnt; j++)
  10997. {
  10998. if (maidArray[j] && maidArray[j].Visible)
  10999. {
  11000. if (isDanceStart7V)
  11001. {
  11002. maidArray[j].SetPos(dancePos[j]);
  11003. maidArray[j].body0.transform.localRotation = danceRot[j];
  11004. }
  11005. }
  11006. }
  11007. isDanceStart7V = false;
  11008. }
  11009. if (isDanceStart8V)
  11010. {
  11011. for (int j = 0; j < maidCnt; j++)
  11012. {
  11013. if (maidArray[j] && maidArray[j].Visible)
  11014. {
  11015. if (isDanceStart8V)
  11016. {
  11017. maidArray[j].SetPos(dancePos[j]);
  11018. maidArray[j].body0.transform.localRotation = danceRot[j];
  11019. }
  11020. }
  11021. }
  11022. isDanceStart8V = false;
  11023. isDanceStart8P = false;
  11024. }
  11025. if (isDanceStart11V)
  11026. {
  11027. for (int j = 0; j < maidCnt; j++)
  11028. {
  11029. if (maidArray[j] && maidArray[j].Visible)
  11030. {
  11031. if (isDanceStart11V)
  11032. {
  11033. maidArray[j].SetPos(dancePos[j]);
  11034. maidArray[j].body0.transform.localRotation = danceRot[j];
  11035. }
  11036. }
  11037. }
  11038. isDanceStart11V = false;
  11039. }
  11040. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11041. || isDanceStart13K)
  11042. {
  11043. for (int j = 0; j < maidCnt; j++)
  11044. {
  11045. if (maidArray[j] && maidArray[j].Visible)
  11046. {
  11047. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11048. || isDanceStart13K)
  11049. {
  11050. maidArray[j].SetPos(dancePos[j]);
  11051. maidArray[j].body0.transform.localRotation = danceRot[j];
  11052. int i = j;
  11053. if (!isVR)
  11054. {
  11055. delCount[i] = 20;
  11056. if (goSlot[(int)selectList[i]] != null)
  11057. {
  11058. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11059. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11060. {
  11061. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11062. }
  11063. }
  11064. }
  11065. Maid maid = maidArray[j];
  11066. maid.DelProp(MPN.handitem, true);
  11067. maid.DelProp(MPN.accvag, true);
  11068. maid.DelProp(MPN.accanl, true);
  11069. maid.DelProp(MPN.kousoku_upper, true);
  11070. maid.DelProp(MPN.kousoku_lower, true);
  11071. maid.AllProcPropSeqStart();
  11072. }
  11073. }
  11074. }
  11075. isDanceStart1K = false;
  11076. isDanceStart3K = false;
  11077. isDanceStart4K = false;
  11078. isDanceStart5K = false;
  11079. isDanceStart6K = false;
  11080. isDanceStart9K = false;
  11081. isDanceStart13K = false;
  11082. }
  11083. if (isDanceStart14V)
  11084. {
  11085. for (int j = 0; j < maidCnt; j++)
  11086. {
  11087. if (maidArray[j] && maidArray[j].Visible)
  11088. {
  11089. if (isDanceStart14V)
  11090. {
  11091. maidArray[j].SetPos(dancePos[j]);
  11092. maidArray[j].body0.transform.localRotation = danceRot[j];
  11093. }
  11094. }
  11095. }
  11096. isDanceStart14V = false;
  11097. }
  11098. if (isDanceStart15V)
  11099. {
  11100. for (int j = 0; j < maidCnt; j++)
  11101. {
  11102. if (maidArray[j] && maidArray[j].Visible)
  11103. {
  11104. if (isDanceStart15V)
  11105. {
  11106. maidArray[j].SetPos(dancePos[j]);
  11107. maidArray[j].body0.transform.localRotation = danceRot[j];
  11108. }
  11109. }
  11110. }
  11111. isDanceStart15V = false;
  11112. }
  11113. if (maidArray[1] && maidArray[1].Visible)
  11114. {
  11115. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11116. {
  11117. Vector3 vector = Vector3.zero;
  11118. vector.x = 0.6f;
  11119. maidArray[1].SetPos(vector);
  11120. if (maidArray[2] && maidArray[2].Visible)
  11121. {
  11122. vector.x = -0.6f;
  11123. maidArray[2].SetPos(vector);
  11124. }
  11125. if (maidArray[3] && maidArray[3].Visible)
  11126. {
  11127. vector.x = 1.2f;
  11128. maidArray[3].SetPos(vector);
  11129. }
  11130. if (maidArray[4] && maidArray[4].Visible)
  11131. {
  11132. vector.x = -1.2f;
  11133. maidArray[4].SetPos(vector);
  11134. }
  11135. if (maidArray[5] && maidArray[5].Visible)
  11136. {
  11137. vector.x = 1.8f;
  11138. maidArray[5].SetPos(vector);
  11139. }
  11140. if (maidArray[6] && maidArray[6].Visible)
  11141. {
  11142. vector.x = -1.8f;
  11143. maidArray[6].SetPos(vector);
  11144. }
  11145. if (maidArray[7] && maidArray[7].Visible)
  11146. {
  11147. vector.x = 2.4f;
  11148. maidArray[7].SetPos(vector);
  11149. }
  11150. if (maidArray[8] && maidArray[8].Visible)
  11151. {
  11152. vector.x = -2.4f;
  11153. maidArray[8].SetPos(vector);
  11154. }
  11155. if (maidArray[9] && maidArray[9].Visible)
  11156. {
  11157. vector.x = 3f;
  11158. maidArray[9].SetPos(vector);
  11159. }
  11160. if (maidArray[10] && maidArray[10].Visible)
  11161. {
  11162. vector.x = -3f;
  11163. maidArray[10].SetPos(vector);
  11164. }
  11165. if (maidArray[11] && maidArray[11].Visible)
  11166. {
  11167. vector.x = 3.6f;
  11168. maidArray[11].SetPos(vector);
  11169. }
  11170. if (maidArray[12] && maidArray[12].Visible)
  11171. {
  11172. vector.x = -3.6f;
  11173. maidArray[12].SetPos(vector);
  11174. }
  11175. if (maidArray[13] && maidArray[13].Visible)
  11176. {
  11177. vector.x = 4.2f;
  11178. maidArray[13].SetPos(vector);
  11179. }
  11180. }
  11181. }
  11182. if (isShift)
  11183. {
  11184. isDanceStart6K = true;
  11185. for (int j = 0; j < maidCnt; j++)
  11186. {
  11187. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11188. maidArray[j].body0.transform.localRotation.y + 90f,
  11189. maidArray[j].body0.transform.localRotation.z));
  11190. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11191. maidArray[j].body0.transform.position.y,
  11192. maidArray[j].body0.transform.position.z + 4f));
  11193. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11194. int i = j;
  11195. Maid maid = maidArray[j];
  11196. if (!isVR)
  11197. {
  11198. delCount[i] = 20;
  11199. if (goSlot[(int)selectList[i]] != null)
  11200. {
  11201. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11202. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11203. {
  11204. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11205. }
  11206. }
  11207. }
  11208. string[] array = new string[2];
  11209. array = text2.Split(new char[] { ',' });
  11210. maid.DelProp(MPN.handitem, true);
  11211. maid.DelProp(MPN.accvag, true);
  11212. maid.DelProp(MPN.accanl, true);
  11213. maid.DelProp(MPN.kousoku_upper, true);
  11214. maid.DelProp(MPN.kousoku_lower, true);
  11215. if (array[0] != "")
  11216. {
  11217. maid.SetProp(array[0], array[1], 0, true, false);
  11218. }
  11219. maid.AllProcPropSeqStart();
  11220. }
  11221. }
  11222. isDance = true;
  11223. isDanceStart6 = true;
  11224. isHS1 = false;
  11225. isHS2 = false;
  11226. isHS3 = false;
  11227. }
  11228. if (isHS4 || isHS5 || isHS6)
  11229. {
  11230. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11231. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11232. for (int j = 0; j < maidCnt; j++)
  11233. {
  11234. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11235. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11236. switch (j)
  11237. {
  11238. case 1:
  11239. case 3:
  11240. case 5:
  11241. case 7:
  11242. case 9:
  11243. case 11:
  11244. case 13:
  11245. text5 = "dance_cm3d2_003_hs_f2.anm";
  11246. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11247. break;
  11248. }
  11249. if (maidArray[j] && maidArray[j].Visible)
  11250. {
  11251. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11252. {
  11253. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11254. }
  11255. string text4 = textAsset.text;
  11256. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11257. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11258. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11259. }
  11260. }
  11261. if (isHS4)
  11262. {
  11263. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11264. }
  11265. if (isHS5)
  11266. {
  11267. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11268. }
  11269. if (isHS6)
  11270. {
  11271. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11272. }
  11273. ikBui = 5;
  11274. isDanceStart1F = false;
  11275. isDanceStart2F = false;
  11276. isDanceStart3F = false;
  11277. isDanceStart4F = false;
  11278. isDanceStart5F = false;
  11279. isDanceStart6F = false;
  11280. isDanceStart7F = false;
  11281. isDanceStart8F = false;
  11282. isDanceStart9F = false;
  11283. isDanceStart10F = false;
  11284. isDanceStart11F = false;
  11285. isDanceStart12F = false;
  11286. isDanceStart13F = false;
  11287. isDanceStart14F = false;
  11288. isDanceStart15F = false;
  11289. for (int j = 0; j < maidCnt; j++)
  11290. {
  11291. danceFace[j] = 0f;
  11292. }
  11293. if (isDanceStart7V)
  11294. {
  11295. for (int j = 0; j < maidCnt; j++)
  11296. {
  11297. if (maidArray[j] && maidArray[j].Visible)
  11298. {
  11299. if (isDanceStart7V)
  11300. {
  11301. maidArray[j].SetPos(dancePos[j]);
  11302. maidArray[j].body0.transform.localRotation = danceRot[j];
  11303. }
  11304. }
  11305. }
  11306. isDanceStart7V = false;
  11307. }
  11308. if (isDanceStart8V)
  11309. {
  11310. for (int j = 0; j < maidCnt; j++)
  11311. {
  11312. if (maidArray[j] && maidArray[j].Visible)
  11313. {
  11314. if (isDanceStart8V)
  11315. {
  11316. maidArray[j].SetPos(dancePos[j]);
  11317. maidArray[j].body0.transform.localRotation = danceRot[j];
  11318. }
  11319. }
  11320. }
  11321. isDanceStart8V = false;
  11322. isDanceStart8P = false;
  11323. }
  11324. if (isDanceStart11V)
  11325. {
  11326. for (int j = 0; j < maidCnt; j++)
  11327. {
  11328. if (maidArray[j] && maidArray[j].Visible)
  11329. {
  11330. if (isDanceStart11V)
  11331. {
  11332. maidArray[j].SetPos(dancePos[j]);
  11333. maidArray[j].body0.transform.localRotation = danceRot[j];
  11334. }
  11335. }
  11336. }
  11337. isDanceStart11V = false;
  11338. }
  11339. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11340. || isDanceStart13K)
  11341. {
  11342. for (int j = 0; j < maidCnt; j++)
  11343. {
  11344. if (maidArray[j] && maidArray[j].Visible)
  11345. {
  11346. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11347. || isDanceStart13K)
  11348. {
  11349. maidArray[j].SetPos(dancePos[j]);
  11350. maidArray[j].body0.transform.localRotation = danceRot[j];
  11351. int i = j;
  11352. if (!isVR)
  11353. {
  11354. delCount[i] = 20;
  11355. if (goSlot[(int)selectList[i]] != null)
  11356. {
  11357. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11358. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11359. {
  11360. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11361. }
  11362. }
  11363. }
  11364. Maid maid = maidArray[j];
  11365. maid.DelProp(MPN.handitem, true);
  11366. maid.DelProp(MPN.accvag, true);
  11367. maid.DelProp(MPN.accanl, true);
  11368. maid.DelProp(MPN.kousoku_upper, true);
  11369. maid.DelProp(MPN.kousoku_lower, true);
  11370. maid.AllProcPropSeqStart();
  11371. }
  11372. }
  11373. }
  11374. isDanceStart1K = false;
  11375. isDanceStart3K = false;
  11376. isDanceStart4K = false;
  11377. isDanceStart5K = false;
  11378. isDanceStart6K = false;
  11379. isDanceStart9K = false;
  11380. isDanceStart13K = false;
  11381. }
  11382. if (isDanceStart14V)
  11383. {
  11384. for (int j = 0; j < maidCnt; j++)
  11385. {
  11386. if (maidArray[j] && maidArray[j].Visible)
  11387. {
  11388. if (isDanceStart14V)
  11389. {
  11390. maidArray[j].SetPos(dancePos[j]);
  11391. maidArray[j].body0.transform.localRotation = danceRot[j];
  11392. }
  11393. }
  11394. }
  11395. isDanceStart14V = false;
  11396. }
  11397. if (isDanceStart15V)
  11398. {
  11399. for (int j = 0; j < maidCnt; j++)
  11400. {
  11401. if (maidArray[j] && maidArray[j].Visible)
  11402. {
  11403. if (isDanceStart15V)
  11404. {
  11405. maidArray[j].SetPos(dancePos[j]);
  11406. maidArray[j].body0.transform.localRotation = danceRot[j];
  11407. }
  11408. }
  11409. }
  11410. isDanceStart15V = false;
  11411. }
  11412. for (int j = 0; j < maidCnt; j++)
  11413. {
  11414. isStop[j] = false;
  11415. isLock[j] = false;
  11416. pHandL[j] = 0;
  11417. pHandR[j] = 0;
  11418. muneIKL[j] = false;
  11419. muneIKR[j] = false;
  11420. if (!isVR)
  11421. {
  11422. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11423. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11424. }
  11425. if (maidArray[j].transform.position.y != 100f)
  11426. {
  11427. dancePos[j] = maidArray[j].transform.position;
  11428. }
  11429. else
  11430. {
  11431. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11432. }
  11433. danceRot[j] = maidArray[j].transform.localRotation;
  11434. }
  11435. if (maidArray[1] && maidArray[1].Visible)
  11436. {
  11437. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11438. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11439. }
  11440. if (maidArray[3] && maidArray[3].Visible)
  11441. {
  11442. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11443. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11444. }
  11445. if (maidArray[5] && maidArray[5].Visible)
  11446. {
  11447. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11448. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11449. }
  11450. if (maidArray[7] && maidArray[7].Visible)
  11451. {
  11452. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11453. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11454. }
  11455. if (maidArray[9] && maidArray[9].Visible)
  11456. {
  11457. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11458. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11459. }
  11460. if (maidArray[11] && maidArray[11].Visible)
  11461. {
  11462. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11463. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11464. }
  11465. if (maidArray[13] && maidArray[13].Visible)
  11466. {
  11467. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11468. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11469. }
  11470. if (maidArray[2] && maidArray[2].Visible)
  11471. {
  11472. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11473. {
  11474. Vector3 vector = Vector3.zero;
  11475. vector.x = 0.6f;
  11476. maidArray[1].SetPos(vector);
  11477. if (maidArray[2] && maidArray[2].Visible)
  11478. {
  11479. vector.x = -0.6f;
  11480. maidArray[2].SetPos(vector);
  11481. }
  11482. if (maidArray[3] && maidArray[3].Visible)
  11483. {
  11484. vector.x = 1.2f;
  11485. maidArray[3].SetPos(vector);
  11486. }
  11487. if (maidArray[4] && maidArray[4].Visible)
  11488. {
  11489. vector.x = -1.2f;
  11490. maidArray[4].SetPos(vector);
  11491. }
  11492. if (maidArray[5] && maidArray[5].Visible)
  11493. {
  11494. vector.x = 1.8f;
  11495. maidArray[5].SetPos(vector);
  11496. }
  11497. if (maidArray[6] && maidArray[6].Visible)
  11498. {
  11499. vector.x = -1.8f;
  11500. maidArray[6].SetPos(vector);
  11501. }
  11502. if (maidArray[7] && maidArray[7].Visible)
  11503. {
  11504. vector.x = 2.4f;
  11505. maidArray[7].SetPos(vector);
  11506. }
  11507. if (maidArray[8] && maidArray[8].Visible)
  11508. {
  11509. vector.x = -2.4f;
  11510. maidArray[8].SetPos(vector);
  11511. }
  11512. if (maidArray[9] && maidArray[9].Visible)
  11513. {
  11514. vector.x = 3f;
  11515. maidArray[9].SetPos(vector);
  11516. }
  11517. if (maidArray[10] && maidArray[10].Visible)
  11518. {
  11519. vector.x = -3f;
  11520. maidArray[10].SetPos(vector);
  11521. }
  11522. if (maidArray[11] && maidArray[11].Visible)
  11523. {
  11524. vector.x = 3.6f;
  11525. maidArray[11].SetPos(vector);
  11526. }
  11527. if (maidArray[12] && maidArray[12].Visible)
  11528. {
  11529. vector.x = -3.6f;
  11530. maidArray[12].SetPos(vector);
  11531. }
  11532. if (maidArray[13] && maidArray[13].Visible)
  11533. {
  11534. vector.x = 4.2f;
  11535. maidArray[13].SetPos(vector);
  11536. }
  11537. }
  11538. }
  11539. isDance = true;
  11540. isDanceStart7 = true;
  11541. isHS4 = false;
  11542. isHS5 = false;
  11543. isHS6 = false;
  11544. }
  11545. if (isHS7 || isHS8 || isHS9)
  11546. {
  11547. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11548. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11549. for (int j = 0; j < maidCnt; j++)
  11550. {
  11551. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11552. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11553. switch (j)
  11554. {
  11555. case 1:
  11556. case 5:
  11557. case 9:
  11558. case 13:
  11559. text5 = "dance_cm3d2_003_hs_f2.anm";
  11560. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11561. break;
  11562. case 2:
  11563. case 6:
  11564. case 10:
  11565. text5 = "dance_cm3d2_003_hs_f3.anm";
  11566. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11567. break;
  11568. case 3:
  11569. case 7:
  11570. case 11:
  11571. text5 = "dance_cm3d2_003_hs_f4.anm";
  11572. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11573. break;
  11574. }
  11575. if (maidArray[j] && maidArray[j].Visible)
  11576. {
  11577. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11578. {
  11579. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11580. }
  11581. }
  11582. string text4 = textAsset.text;
  11583. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11584. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11585. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11586. }
  11587. if (isHS7)
  11588. {
  11589. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11590. }
  11591. if (isHS8)
  11592. {
  11593. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11594. }
  11595. if (isHS9)
  11596. {
  11597. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11598. }
  11599. ikBui = 5;
  11600. isDanceStart1F = false;
  11601. isDanceStart2F = false;
  11602. isDanceStart3F = false;
  11603. isDanceStart4F = false;
  11604. isDanceStart5F = false;
  11605. isDanceStart6F = false;
  11606. isDanceStart7F = false;
  11607. isDanceStart8F = false;
  11608. isDanceStart9F = false;
  11609. isDanceStart10F = false;
  11610. isDanceStart11F = false;
  11611. isDanceStart12F = false;
  11612. isDanceStart13F = false;
  11613. isDanceStart14F = false;
  11614. isDanceStart15F = false;
  11615. for (int j = 0; j < maidCnt; j++)
  11616. {
  11617. danceFace[j] = 0f;
  11618. }
  11619. if (isDanceStart8V)
  11620. {
  11621. for (int j = 0; j < maidCnt; j++)
  11622. {
  11623. if (maidArray[j] && maidArray[j].Visible)
  11624. {
  11625. if (isDanceStart8V)
  11626. {
  11627. maidArray[j].SetPos(dancePos[j]);
  11628. maidArray[j].body0.transform.localRotation = danceRot[j];
  11629. }
  11630. }
  11631. }
  11632. isDanceStart8V = false;
  11633. isDanceStart8P = false;
  11634. }
  11635. for (int j = 0; j < maidCnt; j++)
  11636. {
  11637. isStop[j] = false;
  11638. isLock[j] = false;
  11639. pHandL[j] = 0;
  11640. pHandR[j] = 0;
  11641. muneIKL[j] = false;
  11642. muneIKR[j] = false;
  11643. if (!isVR)
  11644. {
  11645. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11646. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11647. }
  11648. if (maidArray[j].transform.position.y != 100f)
  11649. {
  11650. dancePos[j] = maidArray[j].transform.position;
  11651. }
  11652. else
  11653. {
  11654. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11655. }
  11656. danceRot[j] = maidArray[j].transform.localRotation;
  11657. }
  11658. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11659. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11660. {
  11661. maidArray[0].SetPos(Vector3.zero);
  11662. maidArray[0].SetRot(Vector3.zero);
  11663. }
  11664. if (maidArray[1] && maidArray[1].Visible)
  11665. {
  11666. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11667. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11668. }
  11669. if (maidArray[2] && maidArray[2].Visible)
  11670. {
  11671. maidArray[2].SetPos(maidArray[0].transform.position);
  11672. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11673. }
  11674. if (maidArray[3] && maidArray[3].Visible)
  11675. {
  11676. maidArray[3].SetPos(maidArray[0].transform.position);
  11677. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11678. }
  11679. if (maidArray[5] && maidArray[5].Visible)
  11680. {
  11681. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11682. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11683. }
  11684. if (maidArray[6] && maidArray[6].Visible)
  11685. {
  11686. maidArray[6].SetPos(maidArray[4].transform.position);
  11687. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11688. }
  11689. if (maidArray[7] && maidArray[7].Visible)
  11690. {
  11691. maidArray[7].SetPos(maidArray[4].transform.position);
  11692. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11693. }
  11694. if (maidArray[9] && maidArray[9].Visible)
  11695. {
  11696. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11697. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11698. }
  11699. if (maidArray[10] && maidArray[10].Visible)
  11700. {
  11701. maidArray[10].SetPos(maidArray[8].transform.position);
  11702. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11703. }
  11704. if (maidArray[11] && maidArray[11].Visible)
  11705. {
  11706. maidArray[11].SetPos(maidArray[8].transform.position);
  11707. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11708. }
  11709. if (maidArray[13] && maidArray[13].Visible)
  11710. {
  11711. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11712. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11713. }
  11714. if (maidArray[4] && maidArray[4].Visible)
  11715. {
  11716. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11717. {
  11718. Vector3 vector = Vector3.zero;
  11719. vector.x = 0.6f;
  11720. maidArray[1].SetPos(vector);
  11721. if (maidArray[2] && maidArray[2].Visible)
  11722. {
  11723. vector.x = -0.6f;
  11724. maidArray[2].SetPos(vector);
  11725. }
  11726. if (maidArray[3] && maidArray[3].Visible)
  11727. {
  11728. vector.x = 1.2f;
  11729. maidArray[3].SetPos(vector);
  11730. }
  11731. if (maidArray[4] && maidArray[4].Visible)
  11732. {
  11733. vector.x = -1.2f;
  11734. maidArray[4].SetPos(vector);
  11735. }
  11736. if (maidArray[5] && maidArray[5].Visible)
  11737. {
  11738. vector.x = 1.8f;
  11739. maidArray[5].SetPos(vector);
  11740. }
  11741. if (maidArray[6] && maidArray[6].Visible)
  11742. {
  11743. vector.x = -1.8f;
  11744. maidArray[6].SetPos(vector);
  11745. }
  11746. if (maidArray[7] && maidArray[7].Visible)
  11747. {
  11748. vector.x = 2.4f;
  11749. maidArray[7].SetPos(vector);
  11750. }
  11751. if (maidArray[8] && maidArray[8].Visible)
  11752. {
  11753. vector.x = -2.4f;
  11754. maidArray[8].SetPos(vector);
  11755. }
  11756. if (maidArray[9] && maidArray[9].Visible)
  11757. {
  11758. vector.x = 3f;
  11759. maidArray[9].SetPos(vector);
  11760. }
  11761. if (maidArray[10] && maidArray[10].Visible)
  11762. {
  11763. vector.x = -3f;
  11764. maidArray[10].SetPos(vector);
  11765. }
  11766. if (maidArray[11] && maidArray[11].Visible)
  11767. {
  11768. vector.x = 3.6f;
  11769. maidArray[11].SetPos(vector);
  11770. }
  11771. if (maidArray[12] && maidArray[12].Visible)
  11772. {
  11773. vector.x = -3.6f;
  11774. maidArray[12].SetPos(vector);
  11775. }
  11776. if (maidArray[13] && maidArray[13].Visible)
  11777. {
  11778. vector.x = 4.2f;
  11779. maidArray[13].SetPos(vector);
  11780. }
  11781. }
  11782. }
  11783. isDance = true;
  11784. isDanceStart8 = true;
  11785. isHS7 = false;
  11786. isHS8 = false;
  11787. isHS9 = false;
  11788. }
  11789. if (isCF1)
  11790. {
  11791. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11792. string text4 = textAsset.text;
  11793. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11794. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11795. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11796. for (int j = 0; j < maidCnt; j++)
  11797. {
  11798. if (!isShift)
  11799. {
  11800. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11801. {
  11802. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11803. GameUty.FileSystem,
  11804. "dance_cm3d_003_sp2_f1.anm",
  11805. false,
  11806. false);
  11807. }
  11808. }
  11809. else
  11810. {
  11811. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11812. {
  11813. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11814. GameUty.FileSystem,
  11815. "dance_cm3d2_kara02_002_rty_f1.anm",
  11816. false,
  11817. false);
  11818. }
  11819. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11820. text4 = textAsset.text;
  11821. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11822. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11823. && !isDanceStart9K && !isDanceStart13K)
  11824. {
  11825. dancePos[j] = maidArray[j].transform.position;
  11826. danceRot[j] = maidArray[j].transform.localRotation;
  11827. }
  11828. }
  11829. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11830. }
  11831. if (!isShift)
  11832. {
  11833. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11834. }
  11835. else
  11836. {
  11837. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11838. }
  11839. for (int j = 0; j < maidCnt; j++)
  11840. {
  11841. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11842. isStop[j] = false;
  11843. isLock[j] = false;
  11844. pHandL[j] = 0;
  11845. pHandR[j] = 0;
  11846. muneIKL[j] = false;
  11847. muneIKR[j] = false;
  11848. if (!isVR)
  11849. {
  11850. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11851. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11852. }
  11853. }
  11854. ikBui = 5;
  11855. isDanceStart1F = false;
  11856. isDanceStart2F = false;
  11857. isDanceStart3F = false;
  11858. isDanceStart4F = false;
  11859. isDanceStart5F = false;
  11860. isDanceStart6F = false;
  11861. isDanceStart7F = false;
  11862. isDanceStart8F = false;
  11863. isDanceStart9F = false;
  11864. isDanceStart10F = false;
  11865. isDanceStart11F = false;
  11866. isDanceStart12F = false;
  11867. isDanceStart13F = false;
  11868. isDanceStart14F = false;
  11869. isDanceStart15F = false;
  11870. for (int j = 0; j < maidCnt; j++)
  11871. {
  11872. danceFace[j] = 0f;
  11873. }
  11874. if (isDanceStart7V)
  11875. {
  11876. for (int j = 0; j < maidCnt; j++)
  11877. {
  11878. if (maidArray[j] && maidArray[j].Visible)
  11879. {
  11880. if (isDanceStart7V)
  11881. {
  11882. maidArray[j].SetPos(dancePos[j]);
  11883. maidArray[j].body0.transform.localRotation = danceRot[j];
  11884. }
  11885. }
  11886. }
  11887. isDanceStart7V = false;
  11888. }
  11889. if (isDanceStart8V)
  11890. {
  11891. for (int j = 0; j < maidCnt; j++)
  11892. {
  11893. if (maidArray[j] && maidArray[j].Visible)
  11894. {
  11895. if (isDanceStart8V)
  11896. {
  11897. maidArray[j].SetPos(dancePos[j]);
  11898. maidArray[j].body0.transform.localRotation = danceRot[j];
  11899. }
  11900. }
  11901. }
  11902. isDanceStart8V = false;
  11903. isDanceStart8P = false;
  11904. }
  11905. if (isDanceStart11V)
  11906. {
  11907. for (int j = 0; j < maidCnt; j++)
  11908. {
  11909. if (maidArray[j] && maidArray[j].Visible)
  11910. {
  11911. if (isDanceStart11V)
  11912. {
  11913. maidArray[j].SetPos(dancePos[j]);
  11914. maidArray[j].body0.transform.localRotation = danceRot[j];
  11915. }
  11916. }
  11917. }
  11918. isDanceStart11V = false;
  11919. }
  11920. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11921. || isDanceStart13K)
  11922. {
  11923. for (int j = 0; j < maidCnt; j++)
  11924. {
  11925. if (maidArray[j] && maidArray[j].Visible)
  11926. {
  11927. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11928. || isDanceStart13K)
  11929. {
  11930. maidArray[j].SetPos(dancePos[j]);
  11931. maidArray[j].body0.transform.localRotation = danceRot[j];
  11932. int i = j;
  11933. if (!isVR)
  11934. {
  11935. delCount[i] = 20;
  11936. if (goSlot[(int)selectList[i]] != null)
  11937. {
  11938. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11939. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11940. {
  11941. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11942. }
  11943. }
  11944. }
  11945. Maid maid = maidArray[j];
  11946. maid.DelProp(MPN.handitem, true);
  11947. maid.DelProp(MPN.accvag, true);
  11948. maid.DelProp(MPN.accanl, true);
  11949. maid.DelProp(MPN.kousoku_upper, true);
  11950. maid.DelProp(MPN.kousoku_lower, true);
  11951. maid.AllProcPropSeqStart();
  11952. }
  11953. }
  11954. }
  11955. isDanceStart1K = false;
  11956. isDanceStart3K = false;
  11957. isDanceStart4K = false;
  11958. isDanceStart5K = false;
  11959. isDanceStart6K = false;
  11960. isDanceStart9K = false;
  11961. isDanceStart13K = false;
  11962. }
  11963. if (isDanceStart14V)
  11964. {
  11965. for (int j = 0; j < maidCnt; j++)
  11966. {
  11967. if (maidArray[j] && maidArray[j].Visible)
  11968. {
  11969. if (isDanceStart14V)
  11970. {
  11971. maidArray[j].SetPos(dancePos[j]);
  11972. maidArray[j].body0.transform.localRotation = danceRot[j];
  11973. }
  11974. }
  11975. }
  11976. isDanceStart14V = false;
  11977. }
  11978. if (isDanceStart15V)
  11979. {
  11980. for (int j = 0; j < maidCnt; j++)
  11981. {
  11982. if (maidArray[j] && maidArray[j].Visible)
  11983. {
  11984. if (isDanceStart15V)
  11985. {
  11986. maidArray[j].SetPos(dancePos[j]);
  11987. maidArray[j].body0.transform.localRotation = danceRot[j];
  11988. }
  11989. }
  11990. }
  11991. isDanceStart15V = false;
  11992. }
  11993. if (maidArray[1] && maidArray[1].Visible)
  11994. {
  11995. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11996. {
  11997. Vector3 vector = Vector3.zero;
  11998. vector.x = 0.6f;
  11999. maidArray[1].SetPos(vector);
  12000. if (maidArray[2] && maidArray[2].Visible)
  12001. {
  12002. vector.x = -0.6f;
  12003. maidArray[2].SetPos(vector);
  12004. }
  12005. if (maidArray[3] && maidArray[3].Visible)
  12006. {
  12007. vector.x = 1.2f;
  12008. maidArray[3].SetPos(vector);
  12009. }
  12010. if (maidArray[4] && maidArray[4].Visible)
  12011. {
  12012. vector.x = -1.2f;
  12013. maidArray[4].SetPos(vector);
  12014. }
  12015. if (maidArray[5] && maidArray[5].Visible)
  12016. {
  12017. vector.x = 1.8f;
  12018. maidArray[5].SetPos(vector);
  12019. }
  12020. if (maidArray[6] && maidArray[6].Visible)
  12021. {
  12022. vector.x = -1.8f;
  12023. maidArray[6].SetPos(vector);
  12024. }
  12025. if (maidArray[7] && maidArray[7].Visible)
  12026. {
  12027. vector.x = 2.4f;
  12028. maidArray[7].SetPos(vector);
  12029. }
  12030. if (maidArray[8] && maidArray[8].Visible)
  12031. {
  12032. vector.x = -2.4f;
  12033. maidArray[8].SetPos(vector);
  12034. }
  12035. if (maidArray[9] && maidArray[9].Visible)
  12036. {
  12037. vector.x = 3f;
  12038. maidArray[9].SetPos(vector);
  12039. }
  12040. if (maidArray[10] && maidArray[10].Visible)
  12041. {
  12042. vector.x = -3f;
  12043. maidArray[10].SetPos(vector);
  12044. }
  12045. if (maidArray[11] && maidArray[11].Visible)
  12046. {
  12047. vector.x = 3.6f;
  12048. maidArray[11].SetPos(vector);
  12049. }
  12050. if (maidArray[12] && maidArray[12].Visible)
  12051. {
  12052. vector.x = -3.6f;
  12053. maidArray[12].SetPos(vector);
  12054. }
  12055. if (maidArray[13] && maidArray[13].Visible)
  12056. {
  12057. vector.x = 4.2f;
  12058. maidArray[13].SetPos(vector);
  12059. }
  12060. }
  12061. }
  12062. if (isShift)
  12063. {
  12064. isDanceStart5K = true;
  12065. for (int j = 0; j < maidCnt; j++)
  12066. {
  12067. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12068. maidArray[j].body0.transform.localRotation.y + 90f,
  12069. maidArray[j].body0.transform.localRotation.z));
  12070. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12071. maidArray[j].body0.transform.position.y,
  12072. maidArray[j].body0.transform.position.z + 4f));
  12073. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12074. int i = j;
  12075. Maid maid = maidArray[j];
  12076. if (!isVR)
  12077. {
  12078. delCount[i] = 20;
  12079. if (goSlot[(int)selectList[i]] != null)
  12080. {
  12081. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12082. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12083. {
  12084. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12085. }
  12086. }
  12087. }
  12088. string[] array = new string[2];
  12089. array = text2.Split(new char[] { ',' });
  12090. maid.DelProp(MPN.handitem, true);
  12091. maid.DelProp(MPN.accvag, true);
  12092. maid.DelProp(MPN.accanl, true);
  12093. maid.DelProp(MPN.kousoku_upper, true);
  12094. maid.DelProp(MPN.kousoku_lower, true);
  12095. if (array[0] != "")
  12096. {
  12097. maid.SetProp(array[0], array[1], 0, true, false);
  12098. }
  12099. maid.AllProcPropSeqStart();
  12100. }
  12101. }
  12102. isDance = true;
  12103. isDanceStart5 = true;
  12104. isCF1 = false;
  12105. }
  12106. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12107. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12108. {
  12109. GameMain.Instance.SoundMgr.StopBGM(0f);
  12110. isCF1 = true;
  12111. if (getModKeyPressing(modKey.Shift))
  12112. {
  12113. isShift = true;
  12114. }
  12115. }
  12116. if (isKT1)
  12117. {
  12118. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12119. string text4 = textAsset.text;
  12120. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12121. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12122. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12123. for (int j = 0; j < maidCnt; j++)
  12124. {
  12125. if (!isShift)
  12126. {
  12127. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12128. {
  12129. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12130. GameUty.FileSystem,
  12131. "dance_cm3d_004_kano_f1.anm",
  12132. false,
  12133. false);
  12134. }
  12135. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12136. }
  12137. else
  12138. {
  12139. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12140. {
  12141. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12142. GameUty.FileSystem,
  12143. "dance_cm3d2_kara_002_cktc_f1.anm",
  12144. false,
  12145. false);
  12146. }
  12147. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12148. text4 = textAsset.text;
  12149. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12150. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12151. && !isDanceStart9K && !isDanceStart13K)
  12152. {
  12153. dancePos[j] = maidArray[j].transform.position;
  12154. danceRot[j] = maidArray[j].transform.localRotation;
  12155. }
  12156. }
  12157. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12158. }
  12159. if (!isShift)
  12160. {
  12161. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12162. }
  12163. else
  12164. {
  12165. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12166. }
  12167. for (int j = 0; j < maidCnt; j++)
  12168. {
  12169. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12170. isStop[j] = false;
  12171. isLock[j] = false;
  12172. pHandL[j] = 0;
  12173. pHandR[j] = 0;
  12174. muneIKL[j] = false;
  12175. muneIKR[j] = false;
  12176. if (!isVR)
  12177. {
  12178. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12179. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12180. }
  12181. }
  12182. ikBui = 5;
  12183. isDanceStart1F = false;
  12184. isDanceStart2F = false;
  12185. isDanceStart3F = false;
  12186. isDanceStart4F = false;
  12187. isDanceStart5F = false;
  12188. isDanceStart6F = false;
  12189. isDanceStart7F = false;
  12190. isDanceStart8F = false;
  12191. isDanceStart9F = false;
  12192. isDanceStart10F = false;
  12193. isDanceStart11F = false;
  12194. isDanceStart12F = false;
  12195. isDanceStart13F = false;
  12196. isDanceStart14F = false;
  12197. isDanceStart15F = false;
  12198. for (int j = 0; j < maidCnt; j++)
  12199. {
  12200. danceFace[j] = 0f;
  12201. }
  12202. if (isDanceStart7V)
  12203. {
  12204. for (int j = 0; j < maidCnt; j++)
  12205. {
  12206. if (maidArray[j] && maidArray[j].Visible)
  12207. {
  12208. if (isDanceStart7V)
  12209. {
  12210. maidArray[j].SetPos(dancePos[j]);
  12211. maidArray[j].body0.transform.localRotation = danceRot[j];
  12212. }
  12213. }
  12214. }
  12215. isDanceStart7V = false;
  12216. }
  12217. if (isDanceStart8V)
  12218. {
  12219. for (int j = 0; j < maidCnt; j++)
  12220. {
  12221. if (maidArray[j] && maidArray[j].Visible)
  12222. {
  12223. if (isDanceStart8V)
  12224. {
  12225. maidArray[j].SetPos(dancePos[j]);
  12226. maidArray[j].body0.transform.localRotation = danceRot[j];
  12227. }
  12228. }
  12229. }
  12230. isDanceStart8V = false;
  12231. isDanceStart8P = false;
  12232. }
  12233. if (isDanceStart11V)
  12234. {
  12235. for (int j = 0; j < maidCnt; j++)
  12236. {
  12237. if (maidArray[j] && maidArray[j].Visible)
  12238. {
  12239. if (isDanceStart11V)
  12240. {
  12241. maidArray[j].SetPos(dancePos[j]);
  12242. maidArray[j].body0.transform.localRotation = danceRot[j];
  12243. }
  12244. }
  12245. }
  12246. isDanceStart11V = false;
  12247. }
  12248. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12249. || isDanceStart13K)
  12250. {
  12251. for (int j = 0; j < maidCnt; j++)
  12252. {
  12253. if (maidArray[j] && maidArray[j].Visible)
  12254. {
  12255. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12256. || isDanceStart13K)
  12257. {
  12258. maidArray[j].SetPos(dancePos[j]);
  12259. maidArray[j].body0.transform.localRotation = danceRot[j];
  12260. int i = j;
  12261. if (!isVR)
  12262. {
  12263. delCount[i] = 20;
  12264. if (goSlot[(int)selectList[i]] != null)
  12265. {
  12266. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12267. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12268. {
  12269. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12270. }
  12271. }
  12272. }
  12273. Maid maid = maidArray[j];
  12274. maid.DelProp(MPN.handitem, true);
  12275. maid.DelProp(MPN.accvag, true);
  12276. maid.DelProp(MPN.accanl, true);
  12277. maid.DelProp(MPN.kousoku_upper, true);
  12278. maid.DelProp(MPN.kousoku_lower, true);
  12279. maid.AllProcPropSeqStart();
  12280. }
  12281. }
  12282. }
  12283. isDanceStart1K = false;
  12284. isDanceStart3K = false;
  12285. isDanceStart4K = false;
  12286. isDanceStart5K = false;
  12287. isDanceStart6K = false;
  12288. isDanceStart9K = false;
  12289. isDanceStart13K = false;
  12290. }
  12291. if (isDanceStart14V)
  12292. {
  12293. for (int j = 0; j < maidCnt; j++)
  12294. {
  12295. if (maidArray[j] && maidArray[j].Visible)
  12296. {
  12297. if (isDanceStart14V)
  12298. {
  12299. maidArray[j].SetPos(dancePos[j]);
  12300. maidArray[j].body0.transform.localRotation = danceRot[j];
  12301. }
  12302. }
  12303. }
  12304. isDanceStart14V = false;
  12305. }
  12306. if (isDanceStart15V)
  12307. {
  12308. for (int j = 0; j < maidCnt; j++)
  12309. {
  12310. if (maidArray[j] && maidArray[j].Visible)
  12311. {
  12312. if (isDanceStart15V)
  12313. {
  12314. maidArray[j].SetPos(dancePos[j]);
  12315. maidArray[j].body0.transform.localRotation = danceRot[j];
  12316. }
  12317. }
  12318. }
  12319. isDanceStart15V = false;
  12320. }
  12321. if (maidArray[1] && maidArray[1].Visible)
  12322. {
  12323. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12324. {
  12325. Vector3 vector = Vector3.zero;
  12326. vector.x = 0.6f;
  12327. maidArray[1].SetPos(vector);
  12328. if (maidArray[2] && maidArray[2].Visible)
  12329. {
  12330. vector.x = -0.6f;
  12331. maidArray[2].SetPos(vector);
  12332. }
  12333. if (maidArray[3] && maidArray[3].Visible)
  12334. {
  12335. vector.x = 1.2f;
  12336. maidArray[3].SetPos(vector);
  12337. }
  12338. if (maidArray[4] && maidArray[4].Visible)
  12339. {
  12340. vector.x = -1.2f;
  12341. maidArray[4].SetPos(vector);
  12342. }
  12343. if (maidArray[5] && maidArray[5].Visible)
  12344. {
  12345. vector.x = 1.8f;
  12346. maidArray[5].SetPos(vector);
  12347. }
  12348. if (maidArray[6] && maidArray[6].Visible)
  12349. {
  12350. vector.x = -1.8f;
  12351. maidArray[6].SetPos(vector);
  12352. }
  12353. if (maidArray[7] && maidArray[7].Visible)
  12354. {
  12355. vector.x = 2.4f;
  12356. maidArray[7].SetPos(vector);
  12357. }
  12358. if (maidArray[8] && maidArray[8].Visible)
  12359. {
  12360. vector.x = -2.4f;
  12361. maidArray[8].SetPos(vector);
  12362. }
  12363. if (maidArray[9] && maidArray[9].Visible)
  12364. {
  12365. vector.x = 3f;
  12366. maidArray[9].SetPos(vector);
  12367. }
  12368. if (maidArray[10] && maidArray[10].Visible)
  12369. {
  12370. vector.x = -3f;
  12371. maidArray[10].SetPos(vector);
  12372. }
  12373. if (maidArray[11] && maidArray[11].Visible)
  12374. {
  12375. vector.x = 3.6f;
  12376. maidArray[11].SetPos(vector);
  12377. }
  12378. if (maidArray[12] && maidArray[12].Visible)
  12379. {
  12380. vector.x = -3.6f;
  12381. maidArray[12].SetPos(vector);
  12382. }
  12383. if (maidArray[13] && maidArray[13].Visible)
  12384. {
  12385. vector.x = 4.2f;
  12386. maidArray[13].SetPos(vector);
  12387. }
  12388. }
  12389. }
  12390. if (maidArray[2] && maidArray[2].Visible)
  12391. {
  12392. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12393. {
  12394. Vector3 vector = Vector3.zero;
  12395. vector.x = 0.6f;
  12396. maidArray[1].SetPos(vector);
  12397. if (maidArray[2] && maidArray[2].Visible)
  12398. {
  12399. vector.x = -0.6f;
  12400. maidArray[2].SetPos(vector);
  12401. }
  12402. if (maidArray[3] && maidArray[3].Visible)
  12403. {
  12404. vector.x = 1.2f;
  12405. maidArray[3].SetPos(vector);
  12406. }
  12407. if (maidArray[4] && maidArray[4].Visible)
  12408. {
  12409. vector.x = -1.2f;
  12410. maidArray[4].SetPos(vector);
  12411. }
  12412. if (maidArray[5] && maidArray[5].Visible)
  12413. {
  12414. vector.x = 1.8f;
  12415. maidArray[5].SetPos(vector);
  12416. }
  12417. if (maidArray[6] && maidArray[6].Visible)
  12418. {
  12419. vector.x = -1.8f;
  12420. maidArray[6].SetPos(vector);
  12421. }
  12422. if (maidArray[7] && maidArray[7].Visible)
  12423. {
  12424. vector.x = 2.4f;
  12425. maidArray[7].SetPos(vector);
  12426. }
  12427. if (maidArray[8] && maidArray[8].Visible)
  12428. {
  12429. vector.x = -2.4f;
  12430. maidArray[8].SetPos(vector);
  12431. }
  12432. if (maidArray[9] && maidArray[9].Visible)
  12433. {
  12434. vector.x = 3f;
  12435. maidArray[9].SetPos(vector);
  12436. }
  12437. if (maidArray[10] && maidArray[10].Visible)
  12438. {
  12439. vector.x = -3f;
  12440. maidArray[10].SetPos(vector);
  12441. }
  12442. if (maidArray[11] && maidArray[11].Visible)
  12443. {
  12444. vector.x = 3.6f;
  12445. maidArray[11].SetPos(vector);
  12446. }
  12447. if (maidArray[12] && maidArray[12].Visible)
  12448. {
  12449. vector.x = -3.6f;
  12450. maidArray[12].SetPos(vector);
  12451. }
  12452. if (maidArray[13] && maidArray[13].Visible)
  12453. {
  12454. vector.x = 4.2f;
  12455. maidArray[13].SetPos(vector);
  12456. }
  12457. }
  12458. }
  12459. if (isShift)
  12460. {
  12461. isDanceStart9K = true;
  12462. for (int j = 0; j < maidCnt; j++)
  12463. {
  12464. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12465. maidArray[j].body0.transform.localRotation.y + 90f,
  12466. maidArray[j].body0.transform.localRotation.z));
  12467. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12468. maidArray[j].body0.transform.position.y,
  12469. maidArray[j].body0.transform.position.z + 4f));
  12470. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12471. int i = j;
  12472. Maid maid = maidArray[j];
  12473. if (!isVR)
  12474. {
  12475. delCount[i] = 20;
  12476. if (goSlot[(int)selectList[i]] != null)
  12477. {
  12478. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12479. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12480. {
  12481. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12482. }
  12483. }
  12484. }
  12485. string[] array = new string[2];
  12486. array = text2.Split(new char[] { ',' });
  12487. maid.DelProp(MPN.handitem, true);
  12488. maid.DelProp(MPN.accvag, true);
  12489. maid.DelProp(MPN.accanl, true);
  12490. maid.DelProp(MPN.kousoku_upper, true);
  12491. maid.DelProp(MPN.kousoku_lower, true);
  12492. if (array[0] != "")
  12493. {
  12494. maid.SetProp(array[0], array[1], 0, true, false);
  12495. }
  12496. maid.AllProcPropSeqStart();
  12497. }
  12498. }
  12499. isDance = true;
  12500. isDanceStart9 = true;
  12501. isKT1 = false;
  12502. }
  12503. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12504. {
  12505. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12506. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12507. if (isSS1)
  12508. {
  12509. nameK = "dance_BlD_m";
  12510. nameA = "dance_cm3d21_002_bid_f";
  12511. nameS = "bloomingdreaming_short";
  12512. danceNo1 = 1;
  12513. danceNo2 = 3;
  12514. danceNo3 = 2;
  12515. }
  12516. if (isSS2)
  12517. {
  12518. nameK = "dance_KAD_m";
  12519. nameA = "dance_cm3d21_003_kad_f";
  12520. nameS = "kiminiaijodelicious_short";
  12521. danceNo1 = 1;
  12522. danceNo2 = 2;
  12523. danceNo3 = 3;
  12524. }
  12525. if (isSS3)
  12526. {
  12527. nameK = "dance_LUM_m";
  12528. nameA = "dance_cm3d21_004_lm_f";
  12529. nameS = "luminousmoment_short";
  12530. danceNo1 = 3;
  12531. danceNo2 = 1;
  12532. danceNo3 = 2;
  12533. }
  12534. if (isSS4)
  12535. {
  12536. nameK = "dance_NmF_m";
  12537. nameA = "dance_cm3d21_001_nmf_f";
  12538. nameS = "nightmagicfire_short";
  12539. danceNo1 = 2;
  12540. danceNo2 = 1;
  12541. danceNo3 = 3;
  12542. }
  12543. if (isSS5)
  12544. {
  12545. nameK = "dance_MoE_m";
  12546. nameA = "dance_cm3d21_005_moe_f";
  12547. nameS = "melodyofempire_short";
  12548. danceNo1 = 1;
  12549. danceNo2 = 3;
  12550. danceNo3 = 2;
  12551. }
  12552. if (isSS6)
  12553. {
  12554. nameK = "dance_NmF_m";
  12555. nameA = "dance_cm3d21_kara_001_nmf_f";
  12556. nameS = "nightmagicfire_short";
  12557. danceNo1 = 1;
  12558. danceNo2 = 1;
  12559. danceNo3 = 1;
  12560. }
  12561. for (int j = 0; j < maidCnt; j++)
  12562. {
  12563. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12564. string text5 = nameA + danceNo1 + ".anm";
  12565. switch (j)
  12566. {
  12567. case 1:
  12568. case 4:
  12569. case 7:
  12570. case 10:
  12571. case 13:
  12572. text5 = nameA + danceNo2 + ".anm";
  12573. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12574. break;
  12575. case 2:
  12576. case 5:
  12577. case 8:
  12578. case 11:
  12579. text5 = nameA + danceNo3 + ".anm";
  12580. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12581. break;
  12582. }
  12583. if (maidArray[j] && maidArray[j].Visible)
  12584. {
  12585. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12586. {
  12587. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12588. }
  12589. string text4 = textAsset.text;
  12590. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12591. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12592. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12593. }
  12594. }
  12595. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12596. ikBui = 5;
  12597. isDanceStart1F = false;
  12598. isDanceStart2F = false;
  12599. isDanceStart3F = false;
  12600. isDanceStart4F = false;
  12601. isDanceStart5F = false;
  12602. isDanceStart6F = false;
  12603. isDanceStart7F = false;
  12604. isDanceStart8F = false;
  12605. isDanceStart9F = false;
  12606. isDanceStart10F = false;
  12607. isDanceStart11F = false;
  12608. isDanceStart12F = false;
  12609. isDanceStart13F = false;
  12610. isDanceStart14F = false;
  12611. isDanceStart15F = false;
  12612. for (int j = 0; j < maidCnt; j++)
  12613. {
  12614. danceFace[j] = 0f;
  12615. }
  12616. if (isDanceStart7V)
  12617. {
  12618. for (int j = 0; j < maidCnt; j++)
  12619. {
  12620. if (maidArray[j] && maidArray[j].Visible)
  12621. {
  12622. if (isDanceStart7V)
  12623. {
  12624. maidArray[j].SetPos(dancePos[j]);
  12625. maidArray[j].body0.transform.localRotation = danceRot[j];
  12626. }
  12627. }
  12628. }
  12629. isDanceStart7V = false;
  12630. }
  12631. if (isDanceStart8V)
  12632. {
  12633. for (int j = 0; j < maidCnt; j++)
  12634. {
  12635. if (maidArray[j] && maidArray[j].Visible)
  12636. {
  12637. if (isDanceStart8V)
  12638. {
  12639. maidArray[j].SetPos(dancePos[j]);
  12640. maidArray[j].body0.transform.localRotation = danceRot[j];
  12641. }
  12642. }
  12643. }
  12644. isDanceStart8V = false;
  12645. isDanceStart8P = false;
  12646. }
  12647. if (isDanceStart11V)
  12648. {
  12649. for (int j = 0; j < maidCnt; j++)
  12650. {
  12651. if (maidArray[j] && maidArray[j].Visible)
  12652. {
  12653. if (isDanceStart11V)
  12654. {
  12655. maidArray[j].SetPos(dancePos[j]);
  12656. maidArray[j].body0.transform.localRotation = danceRot[j];
  12657. }
  12658. }
  12659. }
  12660. isDanceStart11V = false;
  12661. }
  12662. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12663. || isDanceStart13K)
  12664. {
  12665. for (int j = 0; j < maidCnt; j++)
  12666. {
  12667. if (maidArray[j] && maidArray[j].Visible)
  12668. {
  12669. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12670. || isDanceStart13K)
  12671. {
  12672. maidArray[j].SetPos(dancePos[j]);
  12673. maidArray[j].body0.transform.localRotation = danceRot[j];
  12674. int i = j;
  12675. if (!isVR)
  12676. {
  12677. delCount[i] = 20;
  12678. if (goSlot[(int)selectList[i]] != null)
  12679. {
  12680. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12681. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12682. {
  12683. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12684. }
  12685. }
  12686. }
  12687. Maid maid = maidArray[j];
  12688. maid.DelProp(MPN.handitem, true);
  12689. maid.DelProp(MPN.accvag, true);
  12690. maid.DelProp(MPN.accanl, true);
  12691. maid.DelProp(MPN.kousoku_upper, true);
  12692. maid.DelProp(MPN.kousoku_lower, true);
  12693. maid.AllProcPropSeqStart();
  12694. }
  12695. }
  12696. }
  12697. isDanceStart1K = false;
  12698. isDanceStart3K = false;
  12699. isDanceStart4K = false;
  12700. isDanceStart5K = false;
  12701. isDanceStart6K = false;
  12702. isDanceStart9K = false;
  12703. isDanceStart13K = false;
  12704. }
  12705. if (isDanceStart14V)
  12706. {
  12707. for (int j = 0; j < maidCnt; j++)
  12708. {
  12709. if (maidArray[j] && maidArray[j].Visible)
  12710. {
  12711. if (isDanceStart14V)
  12712. {
  12713. maidArray[j].SetPos(dancePos[j]);
  12714. maidArray[j].body0.transform.localRotation = danceRot[j];
  12715. }
  12716. }
  12717. }
  12718. isDanceStart14V = false;
  12719. }
  12720. if (isDanceStart15V)
  12721. {
  12722. for (int j = 0; j < maidCnt; j++)
  12723. {
  12724. if (maidArray[j] && maidArray[j].Visible)
  12725. {
  12726. if (isDanceStart15V)
  12727. {
  12728. maidArray[j].SetPos(dancePos[j]);
  12729. maidArray[j].body0.transform.localRotation = danceRot[j];
  12730. }
  12731. }
  12732. }
  12733. isDanceStart15V = false;
  12734. }
  12735. for (int j = 0; j < maidCnt; j++)
  12736. {
  12737. isStop[j] = false;
  12738. isLock[j] = false;
  12739. pHandL[j] = 0;
  12740. pHandR[j] = 0;
  12741. muneIKL[j] = false;
  12742. muneIKR[j] = false;
  12743. if (!isVR)
  12744. {
  12745. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12746. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12747. }
  12748. if (maidArray[j].transform.position.y != 100f)
  12749. {
  12750. dancePos[j] = maidArray[j].transform.position;
  12751. }
  12752. else
  12753. {
  12754. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12755. }
  12756. danceRot[j] = maidArray[j].transform.localRotation;
  12757. }
  12758. if (maidArray[1] && maidArray[1].Visible)
  12759. {
  12760. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12761. maidArray[0].transform.position.y,
  12762. maidArray[0].transform.position.z));
  12763. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12764. }
  12765. if (maidArray[2] && maidArray[2].Visible)
  12766. {
  12767. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12768. maidArray[0].transform.position.y,
  12769. maidArray[0].transform.position.z));
  12770. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12771. }
  12772. if (maidArray[4] && maidArray[4].Visible)
  12773. {
  12774. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12775. maidArray[3].transform.position.y,
  12776. maidArray[3].transform.position.z));
  12777. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12778. }
  12779. if (maidArray[5] && maidArray[5].Visible)
  12780. {
  12781. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12782. maidArray[3].transform.position.y,
  12783. maidArray[3].transform.position.z));
  12784. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12785. }
  12786. if (maidArray[7] && maidArray[7].Visible)
  12787. {
  12788. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12789. maidArray[6].transform.position.y,
  12790. maidArray[6].transform.position.z));
  12791. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12792. }
  12793. if (maidArray[8] && maidArray[8].Visible)
  12794. {
  12795. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12796. maidArray[6].transform.position.y,
  12797. maidArray[6].transform.position.z));
  12798. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12799. }
  12800. if (maidArray[10] && maidArray[10].Visible)
  12801. {
  12802. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12803. maidArray[9].transform.position.y,
  12804. maidArray[9].transform.position.z));
  12805. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12806. }
  12807. if (maidArray[11] && maidArray[11].Visible)
  12808. {
  12809. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12810. maidArray[9].transform.position.y,
  12811. maidArray[9].transform.position.z));
  12812. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12813. }
  12814. if (maidArray[13] && maidArray[13].Visible)
  12815. {
  12816. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12817. maidArray[12].transform.position.y,
  12818. maidArray[12].transform.position.z));
  12819. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12820. }
  12821. isSS = false;
  12822. isDance = true;
  12823. isDanceStart11 = true;
  12824. }
  12825. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12826. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12827. {
  12828. GameMain.Instance.SoundMgr.StopBGM(0f);
  12829. isSS1 = true;
  12830. isSS2 = false;
  12831. isSS3 = false;
  12832. isSS4 = false;
  12833. isSS5 = false;
  12834. isSS6 = false;
  12835. isSS = true;
  12836. }
  12837. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12838. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12839. {
  12840. GameMain.Instance.SoundMgr.StopBGM(0f);
  12841. isSS1 = false;
  12842. isSS2 = true;
  12843. isSS3 = false;
  12844. isSS4 = false;
  12845. isSS5 = false;
  12846. isSS6 = false;
  12847. isSS = true;
  12848. }
  12849. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12850. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12851. {
  12852. GameMain.Instance.SoundMgr.StopBGM(0f);
  12853. isSS1 = false;
  12854. isSS2 = false;
  12855. isSS3 = true;
  12856. isSS4 = false;
  12857. isSS5 = false;
  12858. isSS6 = false;
  12859. isSS = true;
  12860. }
  12861. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12862. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12863. {
  12864. GameMain.Instance.SoundMgr.StopBGM(0f);
  12865. isSS1 = false;
  12866. isSS2 = false;
  12867. isSS3 = false;
  12868. isSS4 = true;
  12869. isSS5 = false;
  12870. isSS6 = false;
  12871. isSS = true;
  12872. }
  12873. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12874. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12875. {
  12876. GameMain.Instance.SoundMgr.StopBGM(0f);
  12877. isSS1 = false;
  12878. isSS2 = false;
  12879. isSS3 = false;
  12880. isSS4 = false;
  12881. isSS5 = true;
  12882. isSS6 = false;
  12883. isSS = true;
  12884. }
  12885. if (isKHG1 || isKHG2)
  12886. {
  12887. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12888. string text4 = textAsset.text;
  12889. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12890. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12891. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12892. for (int j = 0; j < maidCnt; j++)
  12893. {
  12894. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12895. {
  12896. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12897. GameUty.FileSystem,
  12898. "dance_cm3d2_005_khg_f.anm",
  12899. false,
  12900. false);
  12901. }
  12902. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12903. }
  12904. if (isKHG1)
  12905. {
  12906. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12907. }
  12908. if (isKHG2)
  12909. {
  12910. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12911. }
  12912. for (int j = 0; j < maidCnt; j++)
  12913. {
  12914. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12915. isStop[j] = false;
  12916. isLock[j] = false;
  12917. pHandL[j] = 0;
  12918. pHandR[j] = 0;
  12919. muneIKL[j] = false;
  12920. muneIKR[j] = false;
  12921. if (!isVR)
  12922. {
  12923. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12924. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12925. }
  12926. }
  12927. ikBui = 5;
  12928. isDanceStart1F = false;
  12929. isDanceStart2F = false;
  12930. isDanceStart3F = false;
  12931. isDanceStart4F = false;
  12932. isDanceStart5F = false;
  12933. isDanceStart6F = false;
  12934. isDanceStart7F = false;
  12935. isDanceStart8F = false;
  12936. isDanceStart9F = false;
  12937. isDanceStart10F = false;
  12938. isDanceStart11F = false;
  12939. isDanceStart12F = false;
  12940. isDanceStart13F = false;
  12941. isDanceStart14F = false;
  12942. isDanceStart15F = false;
  12943. for (int j = 0; j < maidCnt; j++)
  12944. {
  12945. danceFace[j] = 0f;
  12946. }
  12947. if (isDanceStart7V)
  12948. {
  12949. for (int j = 0; j < maidCnt; j++)
  12950. {
  12951. if (maidArray[j] && maidArray[j].Visible)
  12952. {
  12953. if (isDanceStart7V)
  12954. {
  12955. maidArray[j].SetPos(dancePos[j]);
  12956. maidArray[j].body0.transform.localRotation = danceRot[j];
  12957. }
  12958. }
  12959. }
  12960. isDanceStart7V = false;
  12961. }
  12962. if (isDanceStart8V)
  12963. {
  12964. for (int j = 0; j < maidCnt; j++)
  12965. {
  12966. if (maidArray[j] && maidArray[j].Visible)
  12967. {
  12968. if (isDanceStart8V)
  12969. {
  12970. maidArray[j].SetPos(dancePos[j]);
  12971. maidArray[j].body0.transform.localRotation = danceRot[j];
  12972. }
  12973. }
  12974. }
  12975. isDanceStart8V = false;
  12976. isDanceStart8P = false;
  12977. }
  12978. if (isDanceStart11V)
  12979. {
  12980. for (int j = 0; j < maidCnt; j++)
  12981. {
  12982. if (maidArray[j] && maidArray[j].Visible)
  12983. {
  12984. if (isDanceStart11V)
  12985. {
  12986. maidArray[j].SetPos(dancePos[j]);
  12987. maidArray[j].body0.transform.localRotation = danceRot[j];
  12988. }
  12989. }
  12990. }
  12991. isDanceStart11V = false;
  12992. }
  12993. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12994. || isDanceStart13K)
  12995. {
  12996. for (int j = 0; j < maidCnt; j++)
  12997. {
  12998. if (maidArray[j] && maidArray[j].Visible)
  12999. {
  13000. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13001. || isDanceStart13K)
  13002. {
  13003. maidArray[j].SetPos(dancePos[j]);
  13004. maidArray[j].body0.transform.localRotation = danceRot[j];
  13005. int i = j;
  13006. if (!isVR)
  13007. {
  13008. delCount[i] = 20;
  13009. if (goSlot[(int)selectList[i]] != null)
  13010. {
  13011. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13012. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13013. {
  13014. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13015. }
  13016. }
  13017. }
  13018. Maid maid = maidArray[j];
  13019. maid.DelProp(MPN.handitem, true);
  13020. maid.DelProp(MPN.accvag, true);
  13021. maid.DelProp(MPN.accanl, true);
  13022. maid.DelProp(MPN.kousoku_upper, true);
  13023. maid.DelProp(MPN.kousoku_lower, true);
  13024. maid.AllProcPropSeqStart();
  13025. }
  13026. }
  13027. }
  13028. isDanceStart1K = false;
  13029. isDanceStart3K = false;
  13030. isDanceStart4K = false;
  13031. isDanceStart5K = false;
  13032. isDanceStart6K = false;
  13033. isDanceStart9K = false;
  13034. isDanceStart13K = false;
  13035. }
  13036. if (isDanceStart14V)
  13037. {
  13038. for (int j = 0; j < maidCnt; j++)
  13039. {
  13040. if (maidArray[j] && maidArray[j].Visible)
  13041. {
  13042. if (isDanceStart14V)
  13043. {
  13044. maidArray[j].SetPos(dancePos[j]);
  13045. maidArray[j].body0.transform.localRotation = danceRot[j];
  13046. }
  13047. }
  13048. }
  13049. isDanceStart14V = false;
  13050. }
  13051. if (isDanceStart15V)
  13052. {
  13053. for (int j = 0; j < maidCnt; j++)
  13054. {
  13055. if (maidArray[j] && maidArray[j].Visible)
  13056. {
  13057. if (isDanceStart15V)
  13058. {
  13059. maidArray[j].SetPos(dancePos[j]);
  13060. maidArray[j].body0.transform.localRotation = danceRot[j];
  13061. }
  13062. }
  13063. }
  13064. isDanceStart15V = false;
  13065. }
  13066. if (maidArray[1] && maidArray[1].Visible)
  13067. {
  13068. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13069. {
  13070. Vector3 vector = Vector3.zero;
  13071. vector.x = 0.6f;
  13072. maidArray[1].SetPos(vector);
  13073. if (maidArray[2] && maidArray[2].Visible)
  13074. {
  13075. vector.x = -0.6f;
  13076. maidArray[2].SetPos(vector);
  13077. }
  13078. if (maidArray[3] && maidArray[3].Visible)
  13079. {
  13080. vector.x = 1.2f;
  13081. maidArray[3].SetPos(vector);
  13082. }
  13083. if (maidArray[4] && maidArray[4].Visible)
  13084. {
  13085. vector.x = -1.2f;
  13086. maidArray[4].SetPos(vector);
  13087. }
  13088. if (maidArray[5] && maidArray[5].Visible)
  13089. {
  13090. vector.x = 1.8f;
  13091. maidArray[5].SetPos(vector);
  13092. }
  13093. if (maidArray[6] && maidArray[6].Visible)
  13094. {
  13095. vector.x = -1.8f;
  13096. maidArray[6].SetPos(vector);
  13097. }
  13098. if (maidArray[7] && maidArray[7].Visible)
  13099. {
  13100. vector.x = 2.4f;
  13101. maidArray[7].SetPos(vector);
  13102. }
  13103. if (maidArray[8] && maidArray[8].Visible)
  13104. {
  13105. vector.x = -2.4f;
  13106. maidArray[8].SetPos(vector);
  13107. }
  13108. if (maidArray[9] && maidArray[9].Visible)
  13109. {
  13110. vector.x = 3f;
  13111. maidArray[9].SetPos(vector);
  13112. }
  13113. if (maidArray[10] && maidArray[10].Visible)
  13114. {
  13115. vector.x = -3f;
  13116. maidArray[10].SetPos(vector);
  13117. }
  13118. if (maidArray[11] && maidArray[11].Visible)
  13119. {
  13120. vector.x = 3.6f;
  13121. maidArray[11].SetPos(vector);
  13122. }
  13123. if (maidArray[12] && maidArray[12].Visible)
  13124. {
  13125. vector.x = -3.6f;
  13126. maidArray[12].SetPos(vector);
  13127. }
  13128. if (maidArray[13] && maidArray[13].Visible)
  13129. {
  13130. vector.x = 4.2f;
  13131. maidArray[13].SetPos(vector);
  13132. }
  13133. }
  13134. }
  13135. isDance = true;
  13136. isDanceStart12 = true;
  13137. isKHG1 = false;
  13138. isKHG2 = false;
  13139. }
  13140. if (isDanceStart13Count > 0)
  13141. {
  13142. isDanceStart13Count++;
  13143. }
  13144. if (isDanceStart13Count == 1)
  13145. {
  13146. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13147. isDanceStart13Count = 0;
  13148. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13149. string text4 = textAsset.text;
  13150. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13151. for (int j = 0; j < maidCnt; j++)
  13152. {
  13153. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13154. }
  13155. }
  13156. if ((isSN1 || isSN2 || isSN3) && isShift)
  13157. {
  13158. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13159. string text4 = textAsset.text;
  13160. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13161. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13162. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13163. for (int j = 0; j < maidCnt; j++)
  13164. {
  13165. if (!isShift)
  13166. {
  13167. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13168. {
  13169. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13170. GameUty.FileSystem,
  13171. "dance_cm3d2_006_ssn_f1.anm",
  13172. false,
  13173. false);
  13174. }
  13175. }
  13176. else
  13177. {
  13178. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13179. {
  13180. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13181. GameUty.FileSystem,
  13182. "dance_cm3d21_kara_001_nmf_f1.anm",
  13183. false,
  13184. false);
  13185. }
  13186. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13187. string text5 = nameA + danceNo1 + ".anm";
  13188. switch (j)
  13189. {
  13190. case 1:
  13191. case 4:
  13192. case 7:
  13193. case 10:
  13194. case 13:
  13195. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13196. break;
  13197. case 2:
  13198. case 5:
  13199. case 8:
  13200. case 11:
  13201. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13202. break;
  13203. }
  13204. text4 = textAsset.text;
  13205. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13206. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13207. && !isDanceStart9K && !isDanceStart13K)
  13208. {
  13209. dancePos[j] = maidArray[j].transform.position;
  13210. danceRot[j] = maidArray[j].transform.localRotation;
  13211. }
  13212. }
  13213. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13214. }
  13215. if (!isShift)
  13216. {
  13217. if (isSN1)
  13218. {
  13219. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13220. }
  13221. if (isSN2)
  13222. {
  13223. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13224. }
  13225. if (isSN3)
  13226. {
  13227. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13228. }
  13229. }
  13230. else
  13231. {
  13232. danceWait = 400;
  13233. isDanceStart13Count++;
  13234. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13235. }
  13236. for (int j = 0; j < maidCnt; j++)
  13237. {
  13238. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13239. isStop[j] = false;
  13240. isLock[j] = false;
  13241. pHandL[j] = 0;
  13242. pHandR[j] = 0;
  13243. muneIKL[j] = false;
  13244. muneIKR[j] = false;
  13245. if (!isVR)
  13246. {
  13247. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13248. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13249. }
  13250. }
  13251. ikBui = 5;
  13252. isDanceStart1F = false;
  13253. isDanceStart2F = false;
  13254. isDanceStart3F = false;
  13255. isDanceStart4F = false;
  13256. isDanceStart5F = false;
  13257. isDanceStart6F = false;
  13258. isDanceStart7F = false;
  13259. isDanceStart8F = false;
  13260. isDanceStart9F = false;
  13261. isDanceStart10F = false;
  13262. isDanceStart11F = false;
  13263. isDanceStart12F = false;
  13264. isDanceStart13F = false;
  13265. isDanceStart14F = false;
  13266. isDanceStart15F = false;
  13267. for (int j = 0; j < maidCnt; j++)
  13268. {
  13269. danceFace[j] = 0f;
  13270. }
  13271. if (isDanceStart7V)
  13272. {
  13273. for (int j = 0; j < maidCnt; j++)
  13274. {
  13275. if (maidArray[j] && maidArray[j].Visible)
  13276. {
  13277. if (isDanceStart7V)
  13278. {
  13279. maidArray[j].SetPos(dancePos[j]);
  13280. maidArray[j].body0.transform.localRotation = danceRot[j];
  13281. }
  13282. }
  13283. }
  13284. isDanceStart7V = false;
  13285. }
  13286. if (isDanceStart8V)
  13287. {
  13288. for (int j = 0; j < maidCnt; j++)
  13289. {
  13290. if (maidArray[j] && maidArray[j].Visible)
  13291. {
  13292. if (isDanceStart8V)
  13293. {
  13294. maidArray[j].SetPos(dancePos[j]);
  13295. maidArray[j].body0.transform.localRotation = danceRot[j];
  13296. }
  13297. }
  13298. }
  13299. isDanceStart8V = false;
  13300. isDanceStart8P = false;
  13301. }
  13302. if (isDanceStart11V)
  13303. {
  13304. for (int j = 0; j < maidCnt; j++)
  13305. {
  13306. if (maidArray[j] && maidArray[j].Visible)
  13307. {
  13308. if (isDanceStart11V)
  13309. {
  13310. maidArray[j].SetPos(dancePos[j]);
  13311. maidArray[j].body0.transform.localRotation = danceRot[j];
  13312. }
  13313. }
  13314. }
  13315. isDanceStart11V = false;
  13316. }
  13317. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13318. || isDanceStart13K)
  13319. {
  13320. for (int j = 0; j < maidCnt; j++)
  13321. {
  13322. if (maidArray[j] && maidArray[j].Visible)
  13323. {
  13324. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13325. || isDanceStart13K)
  13326. {
  13327. maidArray[j].SetPos(dancePos[j]);
  13328. maidArray[j].body0.transform.localRotation = danceRot[j];
  13329. int i = j;
  13330. if (!isVR)
  13331. {
  13332. delCount[i] = 20;
  13333. if (goSlot[(int)selectList[i]] != null)
  13334. {
  13335. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13336. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13337. {
  13338. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13339. }
  13340. }
  13341. }
  13342. Maid maid = maidArray[j];
  13343. maid.DelProp(MPN.handitem, true);
  13344. maid.DelProp(MPN.accvag, true);
  13345. maid.DelProp(MPN.accanl, true);
  13346. maid.DelProp(MPN.kousoku_upper, true);
  13347. maid.DelProp(MPN.kousoku_lower, true);
  13348. maid.AllProcPropSeqStart();
  13349. }
  13350. }
  13351. }
  13352. isDanceStart1K = false;
  13353. isDanceStart3K = false;
  13354. isDanceStart4K = false;
  13355. isDanceStart5K = false;
  13356. isDanceStart6K = false;
  13357. isDanceStart9K = false;
  13358. isDanceStart13K = false;
  13359. }
  13360. if (isDanceStart14V)
  13361. {
  13362. for (int j = 0; j < maidCnt; j++)
  13363. {
  13364. if (maidArray[j] && maidArray[j].Visible)
  13365. {
  13366. if (isDanceStart14V)
  13367. {
  13368. maidArray[j].SetPos(dancePos[j]);
  13369. maidArray[j].body0.transform.localRotation = danceRot[j];
  13370. }
  13371. }
  13372. }
  13373. isDanceStart14V = false;
  13374. }
  13375. if (isDanceStart15V)
  13376. {
  13377. for (int j = 0; j < maidCnt; j++)
  13378. {
  13379. if (maidArray[j] && maidArray[j].Visible)
  13380. {
  13381. if (isDanceStart15V)
  13382. {
  13383. maidArray[j].SetPos(dancePos[j]);
  13384. maidArray[j].body0.transform.localRotation = danceRot[j];
  13385. }
  13386. }
  13387. }
  13388. isDanceStart15V = false;
  13389. }
  13390. if (maidArray[1] && maidArray[1].Visible)
  13391. {
  13392. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13393. {
  13394. Vector3 vector = Vector3.zero;
  13395. vector.x = 0.6f;
  13396. maidArray[1].SetPos(vector);
  13397. if (maidArray[2] && maidArray[2].Visible)
  13398. {
  13399. vector.x = -0.6f;
  13400. maidArray[2].SetPos(vector);
  13401. }
  13402. if (maidArray[3] && maidArray[3].Visible)
  13403. {
  13404. vector.x = 1.2f;
  13405. maidArray[3].SetPos(vector);
  13406. }
  13407. if (maidArray[4] && maidArray[4].Visible)
  13408. {
  13409. vector.x = -1.2f;
  13410. maidArray[4].SetPos(vector);
  13411. }
  13412. if (maidArray[5] && maidArray[5].Visible)
  13413. {
  13414. vector.x = 1.8f;
  13415. maidArray[5].SetPos(vector);
  13416. }
  13417. if (maidArray[6] && maidArray[6].Visible)
  13418. {
  13419. vector.x = -1.8f;
  13420. maidArray[6].SetPos(vector);
  13421. }
  13422. if (maidArray[7] && maidArray[7].Visible)
  13423. {
  13424. vector.x = 2.4f;
  13425. maidArray[7].SetPos(vector);
  13426. }
  13427. if (maidArray[8] && maidArray[8].Visible)
  13428. {
  13429. vector.x = -2.4f;
  13430. maidArray[8].SetPos(vector);
  13431. }
  13432. if (maidArray[9] && maidArray[9].Visible)
  13433. {
  13434. vector.x = 3f;
  13435. maidArray[9].SetPos(vector);
  13436. }
  13437. if (maidArray[10] && maidArray[10].Visible)
  13438. {
  13439. vector.x = -3f;
  13440. maidArray[10].SetPos(vector);
  13441. }
  13442. if (maidArray[11] && maidArray[11].Visible)
  13443. {
  13444. vector.x = 3.6f;
  13445. maidArray[11].SetPos(vector);
  13446. }
  13447. if (maidArray[12] && maidArray[12].Visible)
  13448. {
  13449. vector.x = -3.6f;
  13450. maidArray[12].SetPos(vector);
  13451. }
  13452. if (maidArray[13] && maidArray[13].Visible)
  13453. {
  13454. vector.x = 4.2f;
  13455. maidArray[13].SetPos(vector);
  13456. }
  13457. }
  13458. }
  13459. if (isShift)
  13460. {
  13461. isDanceStart13K = true;
  13462. for (int j = 0; j < maidCnt; j++)
  13463. {
  13464. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13465. maidArray[j].body0.transform.localRotation.y + 90f,
  13466. maidArray[j].body0.transform.localRotation.z));
  13467. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13468. maidArray[j].body0.transform.position.y,
  13469. maidArray[j].body0.transform.position.z + 4f));
  13470. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13471. int i = j;
  13472. Maid maid = maidArray[j];
  13473. if (!isVR)
  13474. {
  13475. delCount[i] = 20;
  13476. if (goSlot[(int)selectList[i]] != null)
  13477. {
  13478. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13479. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13480. {
  13481. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13482. }
  13483. }
  13484. }
  13485. string[] array = new string[2];
  13486. array = text2.Split(new char[] { ',' });
  13487. maid.DelProp(MPN.handitem, true);
  13488. maid.DelProp(MPN.accvag, true);
  13489. maid.DelProp(MPN.accanl, true);
  13490. maid.DelProp(MPN.kousoku_upper, true);
  13491. maid.DelProp(MPN.kousoku_lower, true);
  13492. if (array[0] != "")
  13493. {
  13494. maid.SetProp(array[0], array[1], 0, true, false);
  13495. }
  13496. maid.AllProcPropSeqStart();
  13497. }
  13498. }
  13499. isDance = true;
  13500. isDanceStart13 = true;
  13501. isSN1 = false;
  13502. isSN2 = false;
  13503. isSN3 = false;
  13504. }
  13505. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13506. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13507. {
  13508. GameMain.Instance.SoundMgr.StopBGM(0f);
  13509. isSN1 = true;
  13510. hFlg = true;
  13511. if (getModKeyPressing(modKey.Shift))
  13512. {
  13513. isShift = true;
  13514. }
  13515. }
  13516. if (isSN4 || isSN5 || isSN6)
  13517. {
  13518. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13519. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13520. for (int j = 0; j < maidCnt; j++)
  13521. {
  13522. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13523. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13524. switch (j)
  13525. {
  13526. case 1:
  13527. case 4:
  13528. case 7:
  13529. case 10:
  13530. case 13:
  13531. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13532. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13533. break;
  13534. case 2:
  13535. case 5:
  13536. case 8:
  13537. case 11:
  13538. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13539. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13540. break;
  13541. }
  13542. if (maidArray[j] && maidArray[j].Visible)
  13543. {
  13544. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13545. {
  13546. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13547. }
  13548. string text4 = textAsset.text;
  13549. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13550. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13551. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13552. }
  13553. }
  13554. if (isSN4)
  13555. {
  13556. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13557. }
  13558. if (isSN5)
  13559. {
  13560. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13561. }
  13562. if (isSN6)
  13563. {
  13564. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13565. }
  13566. ikBui = 5;
  13567. isDanceStart1F = false;
  13568. isDanceStart2F = false;
  13569. isDanceStart3F = false;
  13570. isDanceStart4F = false;
  13571. isDanceStart5F = false;
  13572. isDanceStart6F = false;
  13573. isDanceStart7F = false;
  13574. isDanceStart8F = false;
  13575. isDanceStart9F = false;
  13576. isDanceStart10F = false;
  13577. isDanceStart11F = false;
  13578. isDanceStart12F = false;
  13579. isDanceStart13F = false;
  13580. isDanceStart14F = false;
  13581. isDanceStart15F = false;
  13582. for (int j = 0; j < maidCnt; j++)
  13583. {
  13584. danceFace[j] = 0f;
  13585. }
  13586. if (isDanceStart7V)
  13587. {
  13588. for (int j = 0; j < maidCnt; j++)
  13589. {
  13590. if (maidArray[j] && maidArray[j].Visible)
  13591. {
  13592. if (isDanceStart7V)
  13593. {
  13594. maidArray[j].SetPos(dancePos[j]);
  13595. maidArray[j].body0.transform.localRotation = danceRot[j];
  13596. }
  13597. }
  13598. }
  13599. isDanceStart7V = false;
  13600. }
  13601. if (isDanceStart8V)
  13602. {
  13603. for (int j = 0; j < maidCnt; j++)
  13604. {
  13605. if (maidArray[j] && maidArray[j].Visible)
  13606. {
  13607. if (isDanceStart8V)
  13608. {
  13609. maidArray[j].SetPos(dancePos[j]);
  13610. maidArray[j].body0.transform.localRotation = danceRot[j];
  13611. }
  13612. }
  13613. }
  13614. isDanceStart8V = false;
  13615. isDanceStart8P = false;
  13616. }
  13617. if (isDanceStart11V)
  13618. {
  13619. for (int j = 0; j < maidCnt; j++)
  13620. {
  13621. if (maidArray[j] && maidArray[j].Visible)
  13622. {
  13623. if (isDanceStart11V)
  13624. {
  13625. maidArray[j].SetPos(dancePos[j]);
  13626. maidArray[j].body0.transform.localRotation = danceRot[j];
  13627. }
  13628. }
  13629. }
  13630. isDanceStart11V = false;
  13631. }
  13632. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13633. || isDanceStart13K)
  13634. {
  13635. for (int j = 0; j < maidCnt; j++)
  13636. {
  13637. if (maidArray[j] && maidArray[j].Visible)
  13638. {
  13639. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13640. || isDanceStart13K)
  13641. {
  13642. maidArray[j].SetPos(dancePos[j]);
  13643. maidArray[j].body0.transform.localRotation = danceRot[j];
  13644. int i = j;
  13645. if (!isVR)
  13646. {
  13647. delCount[i] = 20;
  13648. if (goSlot[(int)selectList[i]] != null)
  13649. {
  13650. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13651. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13652. {
  13653. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13654. }
  13655. }
  13656. }
  13657. Maid maid = maidArray[j];
  13658. maid.DelProp(MPN.handitem, true);
  13659. maid.DelProp(MPN.accvag, true);
  13660. maid.DelProp(MPN.accanl, true);
  13661. maid.DelProp(MPN.kousoku_upper, true);
  13662. maid.DelProp(MPN.kousoku_lower, true);
  13663. maid.AllProcPropSeqStart();
  13664. }
  13665. }
  13666. }
  13667. isDanceStart1K = false;
  13668. isDanceStart3K = false;
  13669. isDanceStart4K = false;
  13670. isDanceStart5K = false;
  13671. isDanceStart6K = false;
  13672. isDanceStart9K = false;
  13673. isDanceStart13K = false;
  13674. }
  13675. if (isDanceStart14V)
  13676. {
  13677. for (int j = 0; j < maidCnt; j++)
  13678. {
  13679. if (maidArray[j] && maidArray[j].Visible)
  13680. {
  13681. if (isDanceStart14V)
  13682. {
  13683. maidArray[j].SetPos(dancePos[j]);
  13684. maidArray[j].body0.transform.localRotation = danceRot[j];
  13685. }
  13686. }
  13687. }
  13688. isDanceStart14V = false;
  13689. }
  13690. if (isDanceStart15V)
  13691. {
  13692. for (int j = 0; j < maidCnt; j++)
  13693. {
  13694. if (maidArray[j] && maidArray[j].Visible)
  13695. {
  13696. if (isDanceStart15V)
  13697. {
  13698. maidArray[j].SetPos(dancePos[j]);
  13699. maidArray[j].body0.transform.localRotation = danceRot[j];
  13700. }
  13701. }
  13702. }
  13703. isDanceStart15V = false;
  13704. }
  13705. for (int j = 0; j < maidCnt; j++)
  13706. {
  13707. isStop[j] = false;
  13708. isLock[j] = false;
  13709. pHandL[j] = 0;
  13710. pHandR[j] = 0;
  13711. muneIKL[j] = false;
  13712. muneIKR[j] = false;
  13713. if (!isVR)
  13714. {
  13715. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13716. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13717. }
  13718. if (maidArray[j].transform.position.y != 100f)
  13719. {
  13720. dancePos[j] = maidArray[j].transform.position;
  13721. }
  13722. else
  13723. {
  13724. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13725. }
  13726. danceRot[j] = maidArray[j].transform.localRotation;
  13727. }
  13728. if (maidArray[1] && maidArray[1].Visible)
  13729. {
  13730. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13731. maidArray[0].transform.position.y,
  13732. maidArray[0].transform.position.z));
  13733. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13734. }
  13735. if (maidArray[2] && maidArray[2].Visible)
  13736. {
  13737. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13738. maidArray[0].transform.position.y,
  13739. maidArray[0].transform.position.z));
  13740. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13741. }
  13742. if (maidArray[4] && maidArray[4].Visible)
  13743. {
  13744. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13745. maidArray[3].transform.position.y,
  13746. maidArray[3].transform.position.z));
  13747. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13748. }
  13749. if (maidArray[5] && maidArray[5].Visible)
  13750. {
  13751. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13752. maidArray[3].transform.position.y,
  13753. maidArray[3].transform.position.z));
  13754. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13755. }
  13756. if (maidArray[7] && maidArray[7].Visible)
  13757. {
  13758. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13759. maidArray[6].transform.position.y,
  13760. maidArray[6].transform.position.z));
  13761. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13762. }
  13763. if (maidArray[8] && maidArray[8].Visible)
  13764. {
  13765. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13766. maidArray[6].transform.position.y,
  13767. maidArray[6].transform.position.z));
  13768. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13769. }
  13770. if (maidArray[10] && maidArray[10].Visible)
  13771. {
  13772. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13773. maidArray[9].transform.position.y,
  13774. maidArray[9].transform.position.z));
  13775. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13776. }
  13777. if (maidArray[11] && maidArray[11].Visible)
  13778. {
  13779. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13780. maidArray[9].transform.position.y,
  13781. maidArray[9].transform.position.z));
  13782. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13783. }
  13784. if (maidArray[13] && maidArray[13].Visible)
  13785. {
  13786. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13787. maidArray[12].transform.position.y,
  13788. maidArray[12].transform.position.z));
  13789. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13790. }
  13791. isDance = true;
  13792. isDanceStart14 = true;
  13793. isSN4 = false;
  13794. isSN5 = false;
  13795. isSN6 = false;
  13796. }
  13797. if (isSD1)
  13798. {
  13799. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13800. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13801. for (int j = 0; j < maidCnt; j++)
  13802. {
  13803. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13804. string text5 = "dance_cmo_002_sd_f1.anm";
  13805. switch (j)
  13806. {
  13807. case 1:
  13808. case 3:
  13809. case 5:
  13810. case 7:
  13811. case 9:
  13812. case 11:
  13813. case 13:
  13814. text5 = "dance_cmo_002_sd_f2.anm";
  13815. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13816. break;
  13817. }
  13818. danceName[j] = text5;
  13819. if (maidArray[j] && maidArray[j].Visible)
  13820. {
  13821. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13822. {
  13823. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13824. }
  13825. string text4 = textAsset.text;
  13826. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13827. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13828. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13829. }
  13830. }
  13831. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13832. ikBui = 5;
  13833. isDanceStart1F = false;
  13834. isDanceStart2F = false;
  13835. isDanceStart3F = false;
  13836. isDanceStart4F = false;
  13837. isDanceStart5F = false;
  13838. isDanceStart6F = false;
  13839. isDanceStart7F = false;
  13840. isDanceStart8F = false;
  13841. isDanceStart9F = false;
  13842. isDanceStart10F = false;
  13843. isDanceStart11F = false;
  13844. isDanceStart12F = false;
  13845. isDanceStart13F = false;
  13846. isDanceStart14F = false;
  13847. isDanceStart15F = false;
  13848. for (int j = 0; j < maidCnt; j++)
  13849. {
  13850. danceFace[j] = 0f;
  13851. }
  13852. if (isDanceStart7V)
  13853. {
  13854. for (int j = 0; j < maidCnt; j++)
  13855. {
  13856. if (maidArray[j] && maidArray[j].Visible)
  13857. {
  13858. if (isDanceStart7V)
  13859. {
  13860. maidArray[j].SetPos(dancePos[j]);
  13861. maidArray[j].body0.transform.localRotation = danceRot[j];
  13862. }
  13863. }
  13864. }
  13865. isDanceStart7V = false;
  13866. }
  13867. if (isDanceStart8V)
  13868. {
  13869. for (int j = 0; j < maidCnt; j++)
  13870. {
  13871. if (maidArray[j] && maidArray[j].Visible)
  13872. {
  13873. if (isDanceStart8V)
  13874. {
  13875. maidArray[j].SetPos(dancePos[j]);
  13876. maidArray[j].body0.transform.localRotation = danceRot[j];
  13877. }
  13878. }
  13879. }
  13880. isDanceStart8V = false;
  13881. isDanceStart8P = false;
  13882. }
  13883. if (isDanceStart11V)
  13884. {
  13885. for (int j = 0; j < maidCnt; j++)
  13886. {
  13887. if (maidArray[j] && maidArray[j].Visible)
  13888. {
  13889. if (isDanceStart11V)
  13890. {
  13891. maidArray[j].SetPos(dancePos[j]);
  13892. maidArray[j].body0.transform.localRotation = danceRot[j];
  13893. }
  13894. }
  13895. }
  13896. isDanceStart11V = false;
  13897. }
  13898. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13899. || isDanceStart13K)
  13900. {
  13901. for (int j = 0; j < maidCnt; j++)
  13902. {
  13903. if (maidArray[j] && maidArray[j].Visible)
  13904. {
  13905. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13906. || isDanceStart13K)
  13907. {
  13908. maidArray[j].SetPos(dancePos[j]);
  13909. maidArray[j].body0.transform.localRotation = danceRot[j];
  13910. int i = j;
  13911. if (!isVR)
  13912. {
  13913. delCount[i] = 20;
  13914. if (goSlot[(int)selectList[i]] != null)
  13915. {
  13916. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13917. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13918. {
  13919. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13920. }
  13921. }
  13922. }
  13923. Maid maid = maidArray[j];
  13924. maid.DelProp(MPN.handitem, true);
  13925. maid.DelProp(MPN.accvag, true);
  13926. maid.DelProp(MPN.accanl, true);
  13927. maid.DelProp(MPN.kousoku_upper, true);
  13928. maid.DelProp(MPN.kousoku_lower, true);
  13929. maid.AllProcPropSeqStart();
  13930. }
  13931. }
  13932. }
  13933. isDanceStart1K = false;
  13934. isDanceStart3K = false;
  13935. isDanceStart4K = false;
  13936. isDanceStart5K = false;
  13937. isDanceStart6K = false;
  13938. isDanceStart9K = false;
  13939. isDanceStart13K = false;
  13940. }
  13941. if (isDanceStart14V)
  13942. {
  13943. for (int j = 0; j < maidCnt; j++)
  13944. {
  13945. if (maidArray[j] && maidArray[j].Visible)
  13946. {
  13947. if (isDanceStart14V)
  13948. {
  13949. maidArray[j].SetPos(dancePos[j]);
  13950. maidArray[j].body0.transform.localRotation = danceRot[j];
  13951. }
  13952. }
  13953. }
  13954. isDanceStart14V = false;
  13955. }
  13956. if (isDanceStart15V)
  13957. {
  13958. for (int j = 0; j < maidCnt; j++)
  13959. {
  13960. if (maidArray[j] && maidArray[j].Visible)
  13961. {
  13962. if (isDanceStart15V)
  13963. {
  13964. maidArray[j].SetPos(dancePos[j]);
  13965. maidArray[j].body0.transform.localRotation = danceRot[j];
  13966. }
  13967. }
  13968. }
  13969. isDanceStart15V = false;
  13970. }
  13971. for (int j = 0; j < maidCnt; j++)
  13972. {
  13973. isStop[j] = false;
  13974. isLock[j] = false;
  13975. pHandL[j] = 0;
  13976. pHandR[j] = 0;
  13977. muneIKL[j] = false;
  13978. muneIKR[j] = false;
  13979. if (!isVR)
  13980. {
  13981. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13982. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13983. }
  13984. if (maidArray[j].transform.position.y != 100f)
  13985. {
  13986. dancePos[j] = maidArray[j].transform.position;
  13987. }
  13988. else
  13989. {
  13990. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13991. }
  13992. danceRot[j] = maidArray[j].transform.localRotation;
  13993. }
  13994. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  13995. {
  13996. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  13997. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  13998. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  13999. maidArray[0].body0.transform.localRotation =
  14000. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14001. }
  14002. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14003. {
  14004. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14005. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14006. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14007. maidArray[2].body0.transform.localRotation =
  14008. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14009. }
  14010. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14011. {
  14012. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14013. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14014. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14015. maidArray[4].body0.transform.localRotation =
  14016. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14017. }
  14018. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14019. {
  14020. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14021. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14022. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14023. maidArray[6].body0.transform.localRotation =
  14024. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14025. }
  14026. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14027. {
  14028. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14029. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14030. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14031. maidArray[8].body0.transform.localRotation =
  14032. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14033. }
  14034. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14035. {
  14036. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14037. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14038. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14039. maidArray[10].body0.transform.localRotation =
  14040. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14041. }
  14042. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14043. {
  14044. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14045. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14046. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14047. maidArray[12].body0.transform.localRotation =
  14048. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14049. }
  14050. if (maidArray[1] && maidArray[1].Visible)
  14051. {
  14052. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14053. maidArray[0].transform.position.y,
  14054. maidArray[0].transform.position.z));
  14055. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14056. }
  14057. if (maidArray[3] && maidArray[3].Visible)
  14058. {
  14059. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14060. maidArray[2].transform.position.y,
  14061. maidArray[2].transform.position.z));
  14062. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14063. }
  14064. if (maidArray[5] && maidArray[5].Visible)
  14065. {
  14066. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14067. maidArray[4].transform.position.y,
  14068. maidArray[4].transform.position.z));
  14069. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14070. }
  14071. if (maidArray[7] && maidArray[7].Visible)
  14072. {
  14073. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14074. maidArray[6].transform.position.y,
  14075. maidArray[6].transform.position.z));
  14076. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14077. }
  14078. if (maidArray[9] && maidArray[9].Visible)
  14079. {
  14080. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14081. maidArray[8].transform.position.y,
  14082. maidArray[8].transform.position.z));
  14083. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14084. }
  14085. if (maidArray[11] && maidArray[11].Visible)
  14086. {
  14087. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14088. maidArray[10].transform.position.y,
  14089. maidArray[10].transform.position.z));
  14090. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14091. }
  14092. if (maidArray[13] && maidArray[13].Visible)
  14093. {
  14094. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14095. maidArray[12].transform.position.y,
  14096. maidArray[12].transform.position.z));
  14097. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14098. }
  14099. if (maidArray[2] && maidArray[2].Visible)
  14100. {
  14101. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14102. {
  14103. Vector3 vector = Vector3.zero;
  14104. vector.x = 0.6f;
  14105. maidArray[1].SetPos(vector);
  14106. if (maidArray[2] && maidArray[2].Visible)
  14107. {
  14108. vector.x = -0.6f;
  14109. maidArray[2].SetPos(vector);
  14110. }
  14111. if (maidArray[3] && maidArray[3].Visible)
  14112. {
  14113. vector.x = 1.2f;
  14114. maidArray[3].SetPos(vector);
  14115. }
  14116. if (maidArray[4] && maidArray[4].Visible)
  14117. {
  14118. vector.x = -1.2f;
  14119. maidArray[4].SetPos(vector);
  14120. }
  14121. if (maidArray[5] && maidArray[5].Visible)
  14122. {
  14123. vector.x = 1.8f;
  14124. maidArray[5].SetPos(vector);
  14125. }
  14126. if (maidArray[6] && maidArray[6].Visible)
  14127. {
  14128. vector.x = -1.8f;
  14129. maidArray[6].SetPos(vector);
  14130. }
  14131. if (maidArray[7] && maidArray[7].Visible)
  14132. {
  14133. vector.x = 2.4f;
  14134. maidArray[7].SetPos(vector);
  14135. }
  14136. if (maidArray[8] && maidArray[8].Visible)
  14137. {
  14138. vector.x = -2.4f;
  14139. maidArray[8].SetPos(vector);
  14140. }
  14141. if (maidArray[9] && maidArray[9].Visible)
  14142. {
  14143. vector.x = 3f;
  14144. maidArray[9].SetPos(vector);
  14145. }
  14146. if (maidArray[10] && maidArray[10].Visible)
  14147. {
  14148. vector.x = -3f;
  14149. maidArray[10].SetPos(vector);
  14150. }
  14151. if (maidArray[11] && maidArray[11].Visible)
  14152. {
  14153. vector.x = 3.6f;
  14154. maidArray[11].SetPos(vector);
  14155. }
  14156. if (maidArray[12] && maidArray[12].Visible)
  14157. {
  14158. vector.x = -3.6f;
  14159. maidArray[12].SetPos(vector);
  14160. }
  14161. if (maidArray[13] && maidArray[13].Visible)
  14162. {
  14163. vector.x = 4.2f;
  14164. maidArray[13].SetPos(vector);
  14165. }
  14166. }
  14167. }
  14168. isDance = true;
  14169. isDanceStart15 = true;
  14170. isSD1 = false;
  14171. }
  14172. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14173. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14174. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14175. || Input.GetKeyDown(KeyCode.Keypad0))
  14176. {
  14177. for (int j = 0; j < maidCnt; j++)
  14178. {
  14179. if (maidArray[j] && maidArray[j].Visible)
  14180. {
  14181. if (!isVR)
  14182. {
  14183. if (goSlot[(int)selectList[j]] != null)
  14184. {
  14185. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14186. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14187. {
  14188. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14189. }
  14190. }
  14191. }
  14192. }
  14193. }
  14194. }
  14195. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14196. {
  14197. if (h2Flg)
  14198. {
  14199. h2Flg = false;
  14200. }
  14201. else
  14202. {
  14203. string text4 = "";
  14204. if (wearIndex == 0)
  14205. {
  14206. text4 = "Underwear";
  14207. wearIndex = 1;
  14208. isWear = false;
  14209. isSkirt = false;
  14210. isBra = true;
  14211. isPanz = true;
  14212. isHeadset = false;
  14213. isGlove = false;
  14214. isStkg = true;
  14215. isShoes = false;
  14216. }
  14217. else if (wearIndex == 1)
  14218. {
  14219. text4 = "Nude";
  14220. wearIndex = 2;
  14221. isWear = false;
  14222. isSkirt = false;
  14223. isBra = false;
  14224. isPanz = false;
  14225. isHeadset = false;
  14226. isGlove = false;
  14227. isStkg = false;
  14228. isShoes = false;
  14229. }
  14230. else if (wearIndex == 2)
  14231. {
  14232. text4 = "None";
  14233. wearIndex = 0;
  14234. isWear = true;
  14235. isSkirt = true;
  14236. isBra = true;
  14237. isPanz = true;
  14238. isHeadset = true;
  14239. isGlove = true;
  14240. isStkg = true;
  14241. isShoes = true;
  14242. }
  14243. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14244. for (int j = 0; j < maidCnt; j++)
  14245. {
  14246. if (maidArray[j] && maidArray[j].Visible)
  14247. {
  14248. if (!isVR)
  14249. {
  14250. if (goSlot[(int)selectList[j]] != null)
  14251. {
  14252. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14253. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14254. {
  14255. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14256. }
  14257. }
  14258. }
  14259. maidArray[j].body0.SetMaskMode(maskMode);
  14260. }
  14261. }
  14262. }
  14263. }
  14264. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14265. {
  14266. saveScene = 9999;
  14267. saveScene2 = saveScene;
  14268. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14269. try
  14270. {
  14271. thum_byte_to_base64_ = string.Empty;
  14272. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14273. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14274. }
  14275. catch { }
  14276. }
  14277. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14278. {
  14279. loadScene = 9999;
  14280. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14281. }
  14282. if (isScreen)
  14283. {
  14284. isScreen = false;
  14285. bGui = isGui;
  14286. isGui = false;
  14287. if (!isMessage)
  14288. {
  14289. foreach (UICamera uicamera in ui_cam_hide_list_)
  14290. {
  14291. uicamera.GetComponent<Camera>().enabled = true;
  14292. }
  14293. ui_cam_hide_list_.Clear();
  14294. }
  14295. else
  14296. {
  14297. if (editUI != null)
  14298. {
  14299. editUI.SetActive(true);
  14300. }
  14301. if (GameMain.Instance.CMSystem.ViewFps)
  14302. {
  14303. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14304. childObject.SetActive(true);
  14305. }
  14306. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14307. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14308. childObject2.SetActive(true);
  14309. childObject3.SetActive(true);
  14310. }
  14311. for (int j = 0; j < maidCnt; j++)
  14312. {
  14313. if (maidArray[j] && maidArray[j].Visible)
  14314. {
  14315. isBone[j] = isBoneN[j];
  14316. if (isBone[j])
  14317. {
  14318. gNeck[j].SetActive(true);
  14319. gSpine[j].SetActive(true);
  14320. gSpine0a[j].SetActive(true);
  14321. gSpine1a[j].SetActive(true);
  14322. gSpine1[j].SetActive(true);
  14323. gPelvis[j].SetActive(true);
  14324. gHandL[j].SetActive(true);
  14325. gArmL[j].SetActive(true);
  14326. gFootL[j].SetActive(true);
  14327. gHizaL[j].SetActive(true);
  14328. gHandR[j].SetActive(true);
  14329. gArmR[j].SetActive(true);
  14330. gFootR[j].SetActive(true);
  14331. gHizaR[j].SetActive(true);
  14332. gClavicleL[j].SetActive(true);
  14333. gClavicleR[j].SetActive(true);
  14334. }
  14335. }
  14336. }
  14337. }
  14338. if (isScreen2)
  14339. {
  14340. isScreen = true;
  14341. isScreen2 = false;
  14342. }
  14343. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14344. && !Input.GetKey(KeyCode.Q))
  14345. {
  14346. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14347. {
  14348. isScreen = true;
  14349. for (int j = 0; j < maidCnt; j++)
  14350. {
  14351. if (maidArray[j] && maidArray[j].Visible)
  14352. {
  14353. if (isBone[j])
  14354. {
  14355. gNeck[j].SetActive(false);
  14356. gSpine[j].SetActive(false);
  14357. gSpine0a[j].SetActive(false);
  14358. gSpine1a[j].SetActive(false);
  14359. gSpine1[j].SetActive(false);
  14360. gPelvis[j].SetActive(false);
  14361. gHandL[j].SetActive(false);
  14362. gArmL[j].SetActive(false);
  14363. gFootL[j].SetActive(false);
  14364. gHizaL[j].SetActive(false);
  14365. gHandR[j].SetActive(false);
  14366. gArmR[j].SetActive(false);
  14367. gFootR[j].SetActive(false);
  14368. gHizaR[j].SetActive(false);
  14369. gClavicleL[j].SetActive(false);
  14370. gClavicleR[j].SetActive(false);
  14371. }
  14372. isBoneN[j] = isBone[j];
  14373. isBone[j] = false;
  14374. }
  14375. }
  14376. if (!isMessage)
  14377. {
  14378. ui_cam_hide_list_.Clear();
  14379. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14380. foreach (UICamera uicamera2 in array16)
  14381. {
  14382. if (uicamera2.GetComponent<Camera>().enabled)
  14383. {
  14384. uicamera2.GetComponent<Camera>().enabled = false;
  14385. ui_cam_hide_list_.Add(uicamera2);
  14386. }
  14387. }
  14388. }
  14389. else
  14390. {
  14391. editUI = GameObject.Find("/UI Root/Camera");
  14392. if (editUI != null)
  14393. {
  14394. editUI.SetActive(false);
  14395. }
  14396. if (GameMain.Instance.CMSystem.ViewFps)
  14397. {
  14398. GameObject childObject =
  14399. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14400. childObject.SetActive(false);
  14401. }
  14402. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14403. GameObject childObject3 =
  14404. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14405. childObject2.SetActive(false);
  14406. childObject3.SetActive(false);
  14407. }
  14408. isGui = bGui;
  14409. bGui = false;
  14410. GameMain.Instance.MainCamera.ScreenShot(false);
  14411. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14412. }
  14413. }
  14414. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14415. {
  14416. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14417. keyFlg2 = true;
  14418. }
  14419. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14420. {
  14421. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14422. keyFlg2 = true;
  14423. }
  14424. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14425. {
  14426. mainCameraTransform.eulerAngles =
  14427. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14428. keyFlg2 = true;
  14429. }
  14430. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14431. {
  14432. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14433. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14434. mainCamera.SetDistance(3f, true);
  14435. keyFlg2 = true;
  14436. }
  14437. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14438. {
  14439. cameraIti = mainCamera.GetTargetPos();
  14440. cameraIti2 = mainCamera.GetPos();
  14441. cameraItiAngle = mainCamera.GetAroundAngle();
  14442. cameraItiDistance = mainCamera.GetDistance();
  14443. keyFlg2 = true;
  14444. }
  14445. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14446. {
  14447. mainCamera.SetTargetPos(cameraIti, true);
  14448. mainCamera.SetPos(cameraIti2);
  14449. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14450. mainCamera.SetDistance(cameraItiDistance, true);
  14451. keyFlg2 = true;
  14452. }
  14453. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14454. {
  14455. if (keyFlg2)
  14456. {
  14457. keyFlg2 = false;
  14458. }
  14459. else
  14460. {
  14461. effectIndex++;
  14462. if (effectIndex == 9)
  14463. {
  14464. kami.SetActive(false);
  14465. effectIndex = 0;
  14466. }
  14467. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14468. if (!isBlur)
  14469. {
  14470. component3.mode = Vignetting.AberrationMode.Simple;
  14471. component3.intensity = -3.98f;
  14472. component3.chromaticAberration = -0.75f;
  14473. component3.axialAberration = 1.18f;
  14474. component3.blurSpread = 4.19f;
  14475. component3.luminanceDependency = 0.494f;
  14476. component3.blurDistance = 1.71f;
  14477. component3.enabled = false;
  14478. }
  14479. if (kami) { }
  14480. if (effectIndex == 0)
  14481. {
  14482. component3.enabled = false;
  14483. }
  14484. if (effectIndex == 1)
  14485. {
  14486. component3.mode = Vignetting.AberrationMode.Simple;
  14487. component3.intensity = -1f;
  14488. component3.chromaticAberration = 0f;
  14489. component3.axialAberration = 0f;
  14490. component3.blurSpread = 5f;
  14491. component3.luminanceDependency = 0f;
  14492. component3.blurDistance = 0f;
  14493. component3.enabled = true;
  14494. }
  14495. if (effectIndex == 2)
  14496. {
  14497. component3.enabled = true;
  14498. }
  14499. if (effectIndex == 3)
  14500. {
  14501. component3.mode = Vignetting.AberrationMode.Simple;
  14502. component3.intensity = 9f;
  14503. component3.chromaticAberration = 0f;
  14504. component3.axialAberration = 0f;
  14505. component3.blurSpread = 5f;
  14506. component3.luminanceDependency = 0f;
  14507. component3.blurDistance = 0f;
  14508. component3.enabled = true;
  14509. }
  14510. if (effectIndex == 4)
  14511. {
  14512. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14513. kami = (GameObject)Instantiate(@object);
  14514. Vector3 localPosition = kami.transform.localPosition;
  14515. localPosition.y = 3.5f;
  14516. kami.transform.localPosition = localPosition;
  14517. }
  14518. if (effectIndex == 5)
  14519. {
  14520. component3.enabled = true;
  14521. component3.mode = Vignetting.AberrationMode.Simple;
  14522. component3.intensity = -2.5f;
  14523. component3.chromaticAberration = -0.3f;
  14524. component3.axialAberration = 0.5f;
  14525. component3.blurSpread = 4.5f;
  14526. component3.luminanceDependency = 0.2f;
  14527. component3.blurDistance = 0.8f;
  14528. component3.enabled = true;
  14529. }
  14530. if (effectIndex == 6)
  14531. {
  14532. kami.SetActive(false);
  14533. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14534. kami = (GameObject)Instantiate(@object);
  14535. Vector3 localPosition = kami.transform.localPosition;
  14536. localPosition.y = 3.5f;
  14537. kami.transform.localPosition = localPosition;
  14538. }
  14539. if (effectIndex == 7)
  14540. {
  14541. component3.enabled = true;
  14542. component3.mode = Vignetting.AberrationMode.Simple;
  14543. component3.intensity = -2.5f;
  14544. component3.chromaticAberration = -0.3f;
  14545. component3.axialAberration = 0.5f;
  14546. component3.blurSpread = 4.5f;
  14547. component3.luminanceDependency = 0.2f;
  14548. component3.blurDistance = 0.8f;
  14549. component3.enabled = true;
  14550. }
  14551. if (effectIndex == 8)
  14552. {
  14553. component3.mode = Vignetting.AberrationMode.Simple;
  14554. component3.intensity = 8f;
  14555. component3.chromaticAberration = 0f;
  14556. component3.axialAberration = 0f;
  14557. component3.blurSpread = 5f;
  14558. component3.luminanceDependency = 0f;
  14559. component3.blurDistance = 0f;
  14560. component3.enabled = true;
  14561. }
  14562. }
  14563. }
  14564. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14565. {
  14566. qFlg = false;
  14567. }
  14568. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14569. {
  14570. bool flag5 = false;
  14571. for (int k = 0; k < keyArray.Length; k++)
  14572. {
  14573. if (Input.GetKey(keyArray[k]))
  14574. {
  14575. flag5 = true;
  14576. break;
  14577. }
  14578. }
  14579. if (!getModKeyPressing(modKey.Shift))
  14580. {
  14581. if (!flag5)
  14582. {
  14583. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14584. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14585. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14586. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14587. {
  14588. Vector3 vector = softG;
  14589. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14590. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14591. softG = vector;
  14592. }
  14593. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14594. {
  14595. Vector3 vector = softG;
  14596. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14597. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14598. softG = vector;
  14599. }
  14600. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14601. {
  14602. Vector3 vector = softG;
  14603. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14604. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14605. softG = vector;
  14606. }
  14607. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14608. {
  14609. Vector3 vector = softG;
  14610. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14611. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14612. softG = vector;
  14613. }
  14614. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14615. {
  14616. Vector3 vector = softG;
  14617. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14618. softG = vector;
  14619. }
  14620. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14621. {
  14622. Vector3 vector = softG;
  14623. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14624. softG = vector;
  14625. }
  14626. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14627. {
  14628. Vector3 vector = softG;
  14629. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14630. softG = vector;
  14631. }
  14632. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14633. {
  14634. Vector3 vector = softG;
  14635. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14636. softG = vector;
  14637. }
  14638. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14639. {
  14640. Vector3 vector = softG;
  14641. vector.y += 6E-05f * speed;
  14642. softG = vector;
  14643. }
  14644. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14645. {
  14646. Vector3 vector = softG;
  14647. vector.y -= 6E-05f * speed;
  14648. softG = vector;
  14649. }
  14650. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14651. {
  14652. softG = new Vector3(0f, -0.003f, 0f);
  14653. }
  14654. for (int j = 0; j < maidCnt; j++)
  14655. {
  14656. Maid maid = maidArray[j];
  14657. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14658. {
  14659. if (maid.body0.goSlot[l].obj != null)
  14660. {
  14661. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14662. if (component2 != null && component2.enabled)
  14663. {
  14664. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14665. }
  14666. }
  14667. List<THair1> fieldValue3 =
  14668. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14669. for (int k = 0; k < fieldValue3.Count; k++)
  14670. {
  14671. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14672. }
  14673. }
  14674. }
  14675. }
  14676. }
  14677. else if (!flag5)
  14678. {
  14679. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14680. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14681. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14682. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14683. {
  14684. Vector3 vector = softG2;
  14685. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14686. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14687. softG2 = vector;
  14688. }
  14689. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14690. {
  14691. Vector3 vector = softG2;
  14692. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14693. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14694. softG2 = vector;
  14695. }
  14696. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14697. {
  14698. Vector3 vector = softG2;
  14699. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14700. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14701. softG2 = vector;
  14702. }
  14703. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14704. {
  14705. Vector3 vector = softG2;
  14706. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14707. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14708. softG2 = vector;
  14709. }
  14710. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14711. {
  14712. Vector3 vector = softG2;
  14713. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14714. softG2 = vector;
  14715. }
  14716. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14717. {
  14718. Vector3 vector = softG2;
  14719. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14720. softG2 = vector;
  14721. }
  14722. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14723. {
  14724. Vector3 vector = softG2;
  14725. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14726. softG2 = vector;
  14727. }
  14728. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14729. {
  14730. Vector3 vector = softG2;
  14731. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14732. softG2 = vector;
  14733. }
  14734. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14735. {
  14736. Vector3 vector = softG2;
  14737. vector.y += 2E-05f * speed;
  14738. softG2 = vector;
  14739. }
  14740. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14741. {
  14742. Vector3 vector = softG2;
  14743. vector.y -= 2E-05f * speed;
  14744. softG2 = vector;
  14745. }
  14746. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14747. {
  14748. softG2 = new Vector3(0f, -0.005f, 0f);
  14749. }
  14750. for (int j = 0; j < maidCnt; j++)
  14751. {
  14752. Maid maid = maidArray[j];
  14753. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14754. {
  14755. if (maid.body0.goSlot[l].obj != null)
  14756. {
  14757. DynamicSkirtBone fieldValue8 =
  14758. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14759. "m_SkirtBone");
  14760. if (fieldValue8 != null)
  14761. {
  14762. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14763. fieldValue8.UpdateParameters();
  14764. }
  14765. }
  14766. }
  14767. }
  14768. }
  14769. }
  14770. if (!isVR)
  14771. {
  14772. if (doguObject.Count > 0)
  14773. {
  14774. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14775. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14776. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14777. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14778. {
  14779. idoFlg2 = true;
  14780. doguObject[doguSelectIndex].transform.localScale =
  14781. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14782. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14783. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14784. }
  14785. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14786. {
  14787. idoFlg2 = true;
  14788. doguObject[doguSelectIndex].transform.localScale =
  14789. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14790. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14791. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14792. }
  14793. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14794. {
  14795. idoFlg2 = true;
  14796. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14797. }
  14798. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14799. {
  14800. doguObject[doguSelectIndex]
  14801. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14802. idoFlg2 = true;
  14803. }
  14804. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14805. {
  14806. doguObject[doguSelectIndex]
  14807. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14808. idoFlg2 = true;
  14809. }
  14810. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14811. && getModKeyPressing(modKey.Alt))
  14812. {
  14813. for (int k = 0; k < 10; k++)
  14814. {
  14815. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14816. Vector3.right,
  14817. -doguObject[doguSelectIndex]
  14818. .transform.rotation.eulerAngles.x);
  14819. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14820. Vector3.forward,
  14821. -doguObject[doguSelectIndex]
  14822. .transform.rotation.eulerAngles.z);
  14823. }
  14824. idoFlg2 = true;
  14825. Vector3 vector = Vector3.zero;
  14826. Vector3 zero3 = Vector3.zero;
  14827. zero3.x = -90f;
  14828. int num12 = doguIndex[doguSelectIndex];
  14829. switch (num12)
  14830. {
  14831. case 3:
  14832. vector.z = 0.5f;
  14833. zero3.z = 90f;
  14834. break;
  14835. case 4:
  14836. case 5:
  14837. case 7:
  14838. case 10:
  14839. case 11: break;
  14840. case 6:
  14841. vector.z = 0.6f;
  14842. zero3.x = 0f;
  14843. break;
  14844. case 8:
  14845. vector.z = 0.5f;
  14846. zero3.x = 0f;
  14847. break;
  14848. case 9:
  14849. vector.z = 0.32f;
  14850. zero3.z = 180f;
  14851. break;
  14852. case 12:
  14853. vector.z = 0.5f;
  14854. zero3.z = 180f;
  14855. break;
  14856. case 13:
  14857. vector.z = 0.7f;
  14858. zero3.z = 180f;
  14859. break;
  14860. default:
  14861. if (num12 != 16)
  14862. {
  14863. switch (num12)
  14864. {
  14865. case 23:
  14866. vector.z = 2.7f;
  14867. vector.x = 0.77f;
  14868. zero3.z = 90f;
  14869. break;
  14870. case 25:
  14871. vector.z = 0.5f;
  14872. vector.y = 0.9f;
  14873. zero3.z = 180f;
  14874. break;
  14875. case 26:
  14876. vector.z = 0.5f;
  14877. vector.y = 0.9f;
  14878. zero3.z = 180f;
  14879. break;
  14880. case 30:
  14881. vector.z = 0f;
  14882. zero3.z = 0f;
  14883. break;
  14884. case 31:
  14885. vector.z = -0.6f;
  14886. vector.y = 0.96f;
  14887. zero3.z = 180f;
  14888. break;
  14889. case 32:
  14890. vector.z = -0.6f;
  14891. vector.y = 0.96f;
  14892. zero3.z = 180f;
  14893. break;
  14894. case 33:
  14895. vector.z = -0.6f;
  14896. vector.y = 0.85f;
  14897. zero3.z = 180f;
  14898. break;
  14899. }
  14900. }
  14901. else
  14902. {
  14903. vector.z = -0.4f;
  14904. zero3.z = 180f;
  14905. }
  14906. break;
  14907. }
  14908. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14909. }
  14910. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14911. && Input.GetKey(KeyCode.J))
  14912. {
  14913. doguObject[doguSelectIndex]
  14914. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14915. new Vector3(vector3.x, 0f, vector3.z),
  14916. 0.3f);
  14917. doguObject[doguSelectIndex]
  14918. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14919. new Vector3(vector2.x, 0f, vector2.z),
  14920. 0.3f);
  14921. idoFlg2 = true;
  14922. }
  14923. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14924. && Input.GetKey(KeyCode.L))
  14925. {
  14926. doguObject[doguSelectIndex]
  14927. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14928. new Vector3(vector3.x, 0f, vector3.z),
  14929. 0.3f);
  14930. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14931. new Vector3(vector2.x, 0f, vector2.z),
  14932. -0.3f);
  14933. idoFlg2 = true;
  14934. }
  14935. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14936. && Input.GetKey(KeyCode.J))
  14937. {
  14938. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14939. new Vector3(vector3.x, 0f, vector3.z),
  14940. -0.3f);
  14941. doguObject[doguSelectIndex]
  14942. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14943. new Vector3(vector2.x, 0f, vector2.z),
  14944. 0.3f);
  14945. idoFlg2 = true;
  14946. }
  14947. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14948. && Input.GetKey(KeyCode.L))
  14949. {
  14950. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14951. new Vector3(vector3.x, 0f, vector3.z),
  14952. -0.3f);
  14953. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14954. new Vector3(vector2.x, 0f, vector2.z),
  14955. -0.3f);
  14956. idoFlg2 = true;
  14957. }
  14958. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  14959. {
  14960. doguObject[doguSelectIndex]
  14961. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14962. new Vector3(vector3.x, 0f, vector3.z),
  14963. 0.4f);
  14964. idoFlg2 = true;
  14965. }
  14966. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  14967. {
  14968. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14969. new Vector3(vector3.x, 0f, vector3.z),
  14970. -0.4f);
  14971. idoFlg2 = true;
  14972. }
  14973. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  14974. {
  14975. doguObject[doguSelectIndex]
  14976. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14977. new Vector3(vector2.x, 0f, vector2.z),
  14978. 0.4f);
  14979. idoFlg2 = true;
  14980. }
  14981. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  14982. {
  14983. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14984. new Vector3(vector2.x, 0f, vector2.z),
  14985. -0.4f);
  14986. idoFlg2 = true;
  14987. }
  14988. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  14989. {
  14990. doguObject[doguSelectIndex].transform.localRotation =
  14991. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  14992. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  14993. idoFlg2 = true;
  14994. }
  14995. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  14996. {
  14997. doguObject[doguSelectIndex].transform.localRotation =
  14998. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  14999. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15000. idoFlg2 = true;
  15001. }
  15002. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15003. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15004. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15005. {
  15006. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15007. new Vector3(vector3.x, 0f, vector3.z),
  15008. -0.7f);
  15009. idoFlg2 = true;
  15010. }
  15011. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15012. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15013. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15014. {
  15015. doguObject[doguSelectIndex]
  15016. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15017. new Vector3(vector3.x, 0f, vector3.z),
  15018. 0.7f);
  15019. idoFlg2 = true;
  15020. }
  15021. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15022. && (Input.GetKey(KeyCode.Minus)
  15023. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15024. {
  15025. doguObject[doguSelectIndex]
  15026. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15027. new Vector3(vector2.x, 0f, vector2.z),
  15028. 0.7f);
  15029. idoFlg2 = true;
  15030. }
  15031. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15032. && (Input.GetKey(KeyCode.Quote)
  15033. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15034. {
  15035. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15036. new Vector3(vector2.x, 0f, vector2.z),
  15037. -0.7f);
  15038. idoFlg2 = true;
  15039. }
  15040. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15041. && Input.GetKey(KeyCode.J))
  15042. {
  15043. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15044. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15045. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15046. doguObject[doguSelectIndex].transform.localPosition = vector;
  15047. idoFlg2 = true;
  15048. }
  15049. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15050. && Input.GetKey(KeyCode.L))
  15051. {
  15052. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15053. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15054. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15055. doguObject[doguSelectIndex].transform.localPosition = vector;
  15056. idoFlg2 = true;
  15057. }
  15058. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15059. && Input.GetKey(KeyCode.J))
  15060. {
  15061. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15062. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15063. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15064. doguObject[doguSelectIndex].transform.localPosition = vector;
  15065. idoFlg2 = true;
  15066. }
  15067. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15068. && Input.GetKey(KeyCode.L))
  15069. {
  15070. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15071. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15072. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15073. doguObject[doguSelectIndex].transform.localPosition = vector;
  15074. idoFlg2 = true;
  15075. }
  15076. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15077. {
  15078. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15079. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15080. doguObject[doguSelectIndex].transform.localPosition = vector;
  15081. idoFlg2 = true;
  15082. }
  15083. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15084. {
  15085. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15086. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15087. doguObject[doguSelectIndex].transform.localPosition = vector;
  15088. idoFlg2 = true;
  15089. }
  15090. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15091. {
  15092. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15093. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15094. doguObject[doguSelectIndex].transform.localPosition = vector;
  15095. idoFlg2 = true;
  15096. }
  15097. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15098. {
  15099. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15100. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15101. doguObject[doguSelectIndex].transform.localPosition = vector;
  15102. idoFlg2 = true;
  15103. }
  15104. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15105. {
  15106. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15107. vector.y += 0.0075f * speed;
  15108. doguObject[doguSelectIndex].transform.localPosition = vector;
  15109. idoFlg2 = true;
  15110. }
  15111. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15112. {
  15113. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15114. vector.y -= 0.0075f * speed;
  15115. doguObject[doguSelectIndex].transform.localPosition = vector;
  15116. idoFlg2 = true;
  15117. }
  15118. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15119. {
  15120. idoFlg2 = true;
  15121. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15122. {
  15123. Destroy(doguObject[doguSelectIndex]);
  15124. doguObject.RemoveAt(doguSelectIndex);
  15125. }
  15126. doguIndex.RemoveAt(doguSelectIndex);
  15127. doguSelectIndex = 0;
  15128. }
  15129. }
  15130. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15131. {
  15132. idoFlg2 = true;
  15133. if (doguSelectIndex == doguObject.Count)
  15134. {
  15135. doguIndex.Add(0);
  15136. }
  15137. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15138. {
  15139. Destroy(doguObject[doguSelectIndex]);
  15140. doguObject.RemoveAt(doguSelectIndex);
  15141. }
  15142. else
  15143. {
  15144. doguIndex.Add(0);
  15145. doguSelectIndex = doguIndex.Count - 1;
  15146. }
  15147. List<int> list2;
  15148. int index;
  15149. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15150. if (doguIndex[doguSelectIndex] <= -1)
  15151. {
  15152. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15153. }
  15154. if (doguIndex[doguSelectIndex] > 0)
  15155. {
  15156. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15157. {
  15158. Object @object = null;
  15159. for (int j = 0; j < 5; j++)
  15160. {
  15161. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15162. if (@object != null)
  15163. {
  15164. break;
  15165. }
  15166. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15167. }
  15168. doguObject.Add(Instantiate(@object) as GameObject);
  15169. }
  15170. else
  15171. {
  15172. Material material = new Material(Shader.Find("Mirror"));
  15173. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15174. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15175. gameObject7.GetComponent<Renderer>().material = material;
  15176. gameObject7.AddComponent<MirrorReflection2>();
  15177. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15178. component5.m_TextureSize = 2048;
  15179. component5.m_ClipPlaneOffset = 0f;
  15180. gameObject7.GetComponent<Renderer>().enabled = true;
  15181. doguObject.Add(gameObject7);
  15182. }
  15183. Vector3 vector = Vector3.zero;
  15184. Vector3 zero3 = Vector3.zero;
  15185. zero3.x = -90f;
  15186. switch (doguIndex[doguSelectIndex])
  15187. {
  15188. case 1:
  15189. vector.z = -0.5f;
  15190. goto IL_344DC;
  15191. case 2:
  15192. vector.z = -0.5f;
  15193. goto IL_344DC;
  15194. case 3:
  15195. vector.z = 0.5f;
  15196. zero3.z = 90f;
  15197. goto IL_344DC;
  15198. case 4:
  15199. vector.z = 0.9f;
  15200. goto IL_344DC;
  15201. case 5:
  15202. vector.z = 0.9f;
  15203. goto IL_344DC;
  15204. case 6:
  15205. vector.z = 0.6f;
  15206. zero3.x = 0f;
  15207. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15208. goto IL_344DC;
  15209. case 7:
  15210. vector.z = 0.6f;
  15211. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15212. goto IL_344DC;
  15213. case 8:
  15214. vector.z = 0.5f;
  15215. zero3.x = 0f;
  15216. goto IL_344DC;
  15217. case 9:
  15218. vector.z = 0.32f;
  15219. zero3.z = 180f;
  15220. goto IL_344DC;
  15221. case 10:
  15222. vector.z = 0.6f;
  15223. goto IL_344DC;
  15224. case 11:
  15225. vector.z = 0.6f;
  15226. goto IL_344DC;
  15227. case 12:
  15228. vector.z = 0.5f;
  15229. zero3.z = 180f;
  15230. goto IL_344DC;
  15231. case 13:
  15232. vector.z = 0.7f;
  15233. zero3.z = 180f;
  15234. goto IL_344DC;
  15235. case 14:
  15236. vector.z = -0.4f;
  15237. goto IL_344DC;
  15238. case 15:
  15239. vector.z = -0.4f;
  15240. goto IL_344DC;
  15241. case 16:
  15242. vector.z = -0.4f;
  15243. zero3.z = 180f;
  15244. goto IL_344DC;
  15245. case 17:
  15246. vector.z = -0.4f;
  15247. goto IL_344DC;
  15248. case 18:
  15249. vector.z = -0.2f;
  15250. goto IL_344DC;
  15251. case 19:
  15252. vector.z = 0f;
  15253. goto IL_344DC;
  15254. case 20:
  15255. vector.z = 3.4f;
  15256. vector.x = -1f;
  15257. goto IL_344DC;
  15258. case 21:
  15259. vector.z = 3.4f;
  15260. vector.x = -1f;
  15261. goto IL_344DC;
  15262. case 22:
  15263. vector.z = 3.4f;
  15264. vector.y = 0.3f;
  15265. vector.x = -1f;
  15266. goto IL_344DC;
  15267. case 23:
  15268. vector.z = 2.7f;
  15269. vector.x = 0.77f;
  15270. zero3.z = 90f;
  15271. goto IL_344DC;
  15272. case 25:
  15273. vector.z = 0.5f;
  15274. vector.y = 0.9f;
  15275. zero3.z = 180f;
  15276. goto IL_344DC;
  15277. case 26:
  15278. vector.z = 0.5f;
  15279. vector.y = 0.9f;
  15280. zero3.z = 180f;
  15281. goto IL_344DC;
  15282. case 29:
  15283. vector.z = 0.5f;
  15284. vector.x = -1.05f;
  15285. goto IL_344DC;
  15286. case 30:
  15287. vector.z = -2.8f;
  15288. zero3.z = 0f;
  15289. zero3.x = 0f;
  15290. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15291. goto IL_344DC;
  15292. case 31:
  15293. vector.z = -0.6f;
  15294. vector.y = 0.96f;
  15295. zero3.z = 180f;
  15296. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15297. goto IL_344DC;
  15298. case 32:
  15299. vector.z = -0.6f;
  15300. vector.y = 0.96f;
  15301. zero3.z = 180f;
  15302. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15303. goto IL_344DC;
  15304. case 33:
  15305. vector.z = -0.6f;
  15306. vector.y = 0.85f;
  15307. zero3.z = 180f;
  15308. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15309. goto IL_344DC;
  15310. }
  15311. vector.z = 0.5f;
  15312. IL_344DC:
  15313. doguObject[doguSelectIndex].transform.localPosition = vector;
  15314. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15315. }
  15316. if (doguIndex[doguSelectIndex] == 0)
  15317. {
  15318. doguIndex.RemoveAt(doguSelectIndex);
  15319. }
  15320. }
  15321. else if (Input.GetKeyDown(KeyCode.W))
  15322. {
  15323. for (int k = 0; k < keyArray.Length; k++)
  15324. {
  15325. if (Input.GetKey(keyArray[k]))
  15326. {
  15327. wFlg = true;
  15328. break;
  15329. }
  15330. }
  15331. }
  15332. else if (Input.GetKeyUp(KeyCode.W))
  15333. {
  15334. if (wFlg)
  15335. {
  15336. wFlg = false;
  15337. }
  15338. else if (idoFlg2)
  15339. {
  15340. idoFlg2 = false;
  15341. }
  15342. else
  15343. {
  15344. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15345. {
  15346. Destroy(doguObject[doguSelectIndex]);
  15347. doguObject.RemoveAt(doguSelectIndex);
  15348. }
  15349. else
  15350. {
  15351. doguIndex.Add(0);
  15352. doguSelectIndex = doguIndex.Count - 1;
  15353. }
  15354. List<int> list2;
  15355. int index;
  15356. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15357. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15358. {
  15359. doguIndex[doguSelectIndex] = 0;
  15360. }
  15361. if (doguIndex[doguSelectIndex] > 0)
  15362. {
  15363. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15364. {
  15365. Object @object = null;
  15366. for (int j = 0; j < 5; j++)
  15367. {
  15368. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15369. if (@object != null)
  15370. {
  15371. break;
  15372. }
  15373. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15374. }
  15375. doguObject.Add(Instantiate(@object) as GameObject);
  15376. }
  15377. else
  15378. {
  15379. Material material = new Material(Shader.Find("Mirror"));
  15380. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15381. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15382. gameObject7.GetComponent<Renderer>().material = material;
  15383. gameObject7.AddComponent<MirrorReflection2>();
  15384. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15385. component5.m_TextureSize = 2048;
  15386. component5.m_ClipPlaneOffset = 0f;
  15387. gameObject7.GetComponent<Renderer>().enabled = true;
  15388. doguObject.Add(gameObject7);
  15389. }
  15390. Vector3 vector = Vector3.zero;
  15391. Vector3 zero3 = Vector3.zero;
  15392. zero3.x = -90f;
  15393. switch (doguIndex[doguSelectIndex])
  15394. {
  15395. case 1:
  15396. vector.z = -0.5f;
  15397. goto IL_34D66;
  15398. case 2:
  15399. vector.z = -0.5f;
  15400. goto IL_34D66;
  15401. case 3:
  15402. vector.z = 0.5f;
  15403. zero3.z = 90f;
  15404. goto IL_34D66;
  15405. case 4:
  15406. vector.z = 0.9f;
  15407. goto IL_34D66;
  15408. case 5:
  15409. vector.z = 0.9f;
  15410. goto IL_34D66;
  15411. case 6:
  15412. vector.z = 0.6f;
  15413. zero3.x = 0f;
  15414. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15415. goto IL_34D66;
  15416. case 7:
  15417. vector.z = 0.6f;
  15418. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15419. goto IL_34D66;
  15420. case 8:
  15421. vector.z = 0.5f;
  15422. zero3.x = 0f;
  15423. goto IL_34D66;
  15424. case 9:
  15425. vector.z = 0.32f;
  15426. zero3.z = 180f;
  15427. goto IL_34D66;
  15428. case 10:
  15429. vector.z = 0.6f;
  15430. goto IL_34D66;
  15431. case 11:
  15432. vector.z = 0.6f;
  15433. goto IL_34D66;
  15434. case 12:
  15435. vector.z = 0.5f;
  15436. zero3.z = 180f;
  15437. goto IL_34D66;
  15438. case 13:
  15439. vector.z = 0.7f;
  15440. zero3.z = 180f;
  15441. goto IL_34D66;
  15442. case 14:
  15443. vector.z = -0.4f;
  15444. goto IL_34D66;
  15445. case 15:
  15446. vector.z = -0.4f;
  15447. goto IL_34D66;
  15448. case 16:
  15449. vector.z = -0.4f;
  15450. zero3.z = 180f;
  15451. goto IL_34D66;
  15452. case 17:
  15453. vector.z = -0.4f;
  15454. goto IL_34D66;
  15455. case 18:
  15456. vector.z = -0.2f;
  15457. goto IL_34D66;
  15458. case 19:
  15459. vector.z = 0f;
  15460. goto IL_34D66;
  15461. case 20:
  15462. vector.z = 3.4f;
  15463. vector.x = -1f;
  15464. goto IL_34D66;
  15465. case 21:
  15466. vector.z = 3.4f;
  15467. vector.x = -1f;
  15468. goto IL_34D66;
  15469. case 22:
  15470. vector.z = 3.4f;
  15471. vector.y = 0.3f;
  15472. vector.x = -1f;
  15473. goto IL_34D66;
  15474. case 23:
  15475. vector.z = 2.7f;
  15476. vector.x = 0.77f;
  15477. zero3.z = 90f;
  15478. goto IL_34D66;
  15479. case 25:
  15480. vector.z = 0.5f;
  15481. vector.y = 0.9f;
  15482. zero3.z = 180f;
  15483. goto IL_34D66;
  15484. case 26:
  15485. vector.z = 0.5f;
  15486. vector.y = 0.9f;
  15487. zero3.z = 180f;
  15488. goto IL_34D66;
  15489. case 29:
  15490. vector.z = 0.5f;
  15491. vector.x = -1.05f;
  15492. goto IL_34D66;
  15493. case 30:
  15494. vector.z = -2.8f;
  15495. zero3.z = 0f;
  15496. zero3.x = 0f;
  15497. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15498. goto IL_34D66;
  15499. case 31:
  15500. vector.z = -0.6f;
  15501. vector.y = 0.96f;
  15502. zero3.z = 180f;
  15503. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15504. goto IL_34D66;
  15505. case 32:
  15506. vector.z = -0.6f;
  15507. vector.y = 0.96f;
  15508. zero3.z = 180f;
  15509. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15510. goto IL_34D66;
  15511. case 33:
  15512. vector.z = -0.6f;
  15513. vector.y = 0.85f;
  15514. zero3.z = 180f;
  15515. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15516. goto IL_34D66;
  15517. }
  15518. vector.z = 0.5f;
  15519. IL_34D66:;
  15520. }
  15521. if (doguIndex[doguSelectIndex] == 0)
  15522. {
  15523. doguIndex.RemoveAt(doguSelectIndex);
  15524. }
  15525. }
  15526. }
  15527. }
  15528. if (!isVR)
  15529. {
  15530. int i;
  15531. for (i = 0; i < 999; i++)
  15532. {
  15533. if (gDogu[i] != null)
  15534. {
  15535. gDogu[i].GetComponent<Renderer>().enabled = false;
  15536. gDogu[i].SetActive(false);
  15537. if (mDogu[i].del)
  15538. {
  15539. mDogu[i].del = false;
  15540. Destroy(doguBObject[i]);
  15541. doguBObject.RemoveAt(i);
  15542. }
  15543. else if (mDogu[i].count > 0)
  15544. {
  15545. mDogu[i].count--;
  15546. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15547. {
  15548. if (mDogu[i].count == 1)
  15549. {
  15550. doguBObject[i].SetActive(false);
  15551. }
  15552. if (mDogu[i].count == 0)
  15553. {
  15554. doguBObject[i].SetActive(true);
  15555. string name = doguBObject[i].name;
  15556. if (name != null)
  15557. {
  15558. if (!(name == "Particle/pLineY"))
  15559. {
  15560. if (!(name == "Particle/pLineP02"))
  15561. {
  15562. if (!(name == "Particle/pLine_act2"))
  15563. {
  15564. if (name == "Particle/pHeart01")
  15565. {
  15566. mDogu[i].count = 77;
  15567. }
  15568. }
  15569. else
  15570. {
  15571. mDogu[i].count = 90;
  15572. }
  15573. }
  15574. else
  15575. {
  15576. mDogu[i].count = 115;
  15577. }
  15578. }
  15579. else
  15580. {
  15581. mDogu[i].count = 180;
  15582. }
  15583. }
  15584. }
  15585. }
  15586. }
  15587. }
  15588. }
  15589. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15590. {
  15591. ikMode2 = 11;
  15592. }
  15593. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15594. {
  15595. ikMode2 = 12;
  15596. }
  15597. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15598. {
  15599. ikMode2 = 14;
  15600. }
  15601. else if (Input.GetKey(KeyCode.X))
  15602. {
  15603. ikMode2 = 9;
  15604. }
  15605. else if (Input.GetKey(KeyCode.Z))
  15606. {
  15607. ikMode2 = 10;
  15608. }
  15609. else if (Input.GetKey(KeyCode.C))
  15610. {
  15611. ikMode2 = 13;
  15612. }
  15613. else if (Input.GetKey(KeyCode.D))
  15614. {
  15615. ikMode2 = 15;
  15616. }
  15617. else
  15618. {
  15619. ikMode2 = 0;
  15620. }
  15621. if (gBg != null)
  15622. {
  15623. if (!isCube3)
  15624. {
  15625. gBg.GetComponent<Renderer>().enabled = false;
  15626. gBg.SetActive(false);
  15627. }
  15628. else
  15629. {
  15630. if (ikMode2 > 0 && ikMode2 != 15)
  15631. {
  15632. gBg.GetComponent<Renderer>().enabled = true;
  15633. gBg.SetActive(true);
  15634. }
  15635. else
  15636. {
  15637. gBg.GetComponent<Renderer>().enabled = false;
  15638. gBg.SetActive(false);
  15639. }
  15640. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15641. {
  15642. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15643. }
  15644. if (ikMode2 == 9 || ikMode2 == 14)
  15645. {
  15646. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15647. mBg.Update();
  15648. }
  15649. if (ikMode2 == 13)
  15650. {
  15651. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15652. mBg.Update();
  15653. }
  15654. if (ikMode2 == 13)
  15655. {
  15656. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15657. {
  15658. mBg.ido = 5;
  15659. mBg.reset = true;
  15660. }
  15661. else
  15662. {
  15663. gBg.transform.position = bg.position;
  15664. gBg.transform.eulerAngles = bg.eulerAngles;
  15665. mBg.maid = bgObject;
  15666. mBg.ido = 5;
  15667. }
  15668. }
  15669. else if (ikMode2 == 11)
  15670. {
  15671. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15672. {
  15673. mBg.ido = 3;
  15674. mBg.reset = true;
  15675. }
  15676. else
  15677. {
  15678. gBg.transform.position = bg.position;
  15679. gBg.transform.eulerAngles = bg.eulerAngles;
  15680. mBg.maid = bgObject;
  15681. mBg.ido = 3;
  15682. }
  15683. }
  15684. else if (ikMode2 == 12)
  15685. {
  15686. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15687. {
  15688. mBg.ido = 2;
  15689. mBg.reset = true;
  15690. }
  15691. else
  15692. {
  15693. gBg.transform.position = bg.position;
  15694. gBg.transform.eulerAngles = bg.eulerAngles;
  15695. mBg.maid = bgObject;
  15696. mBg.ido = 2;
  15697. }
  15698. }
  15699. else if (ikMode2 == 10)
  15700. {
  15701. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15702. {
  15703. mBg.ido = 1;
  15704. mBg.reset = true;
  15705. }
  15706. else
  15707. {
  15708. gBg.transform.position = bg.position;
  15709. gBg.transform.eulerAngles = bg.eulerAngles;
  15710. mBg.maid = bgObject;
  15711. mBg.ido = 1;
  15712. }
  15713. }
  15714. else if (ikMode2 == 9)
  15715. {
  15716. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15717. {
  15718. mBg.ido = 4;
  15719. mBg.reset = true;
  15720. }
  15721. else
  15722. {
  15723. gBg.transform.position = bg.position;
  15724. gBg.transform.eulerAngles = bg.eulerAngles;
  15725. mBg.maid = bgObject;
  15726. mBg.ido = 4;
  15727. }
  15728. }
  15729. else if (ikMode2 == 14)
  15730. {
  15731. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15732. {
  15733. mBg.ido = 6;
  15734. mBg.reset = true;
  15735. }
  15736. else
  15737. {
  15738. gBg.transform.position = bg.position;
  15739. gBg.transform.eulerAngles = bg.eulerAngles;
  15740. mBg.maid = bgObject;
  15741. mBg.ido = 6;
  15742. }
  15743. }
  15744. }
  15745. }
  15746. for (i = 0; i < lightIndex.Count; i++)
  15747. {
  15748. if (gLight[0] == null)
  15749. {
  15750. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15751. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15752. {
  15753. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15754. };
  15755. gLight[0].GetComponent<Renderer>().material = material2;
  15756. gLight[0].layer = 8;
  15757. gLight[0].GetComponent<Renderer>().enabled = false;
  15758. gLight[0].SetActive(false);
  15759. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15760. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15761. mLight[0].obj = gLight[0];
  15762. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15763. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15764. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15765. mLight[0].ido = 1;
  15766. mLight[0].isScale = false;
  15767. }
  15768. if (gLight[i] != null)
  15769. {
  15770. if (!isCube4)
  15771. {
  15772. gLight[i].GetComponent<Renderer>().enabled = false;
  15773. gLight[i].SetActive(false);
  15774. }
  15775. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15776. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15777. {
  15778. if (ikMode2 > 0 && ikMode2 != 15)
  15779. {
  15780. gLight[i].GetComponent<Renderer>().enabled = true;
  15781. gLight[i].SetActive(true);
  15782. }
  15783. else
  15784. {
  15785. gLight[i].GetComponent<Renderer>().enabled = false;
  15786. gLight[i].SetActive(false);
  15787. mLight[i].isAlt = false;
  15788. }
  15789. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15790. {
  15791. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15792. if (mLight[i].isAlt)
  15793. {
  15794. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15795. }
  15796. }
  15797. if (ikMode2 == 9 || ikMode2 == 14)
  15798. {
  15799. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15800. mLight[i].Update();
  15801. }
  15802. if (ikMode2 == 13)
  15803. {
  15804. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15805. mLight[i].Update();
  15806. }
  15807. if (ikMode2 == 13)
  15808. {
  15809. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15810. {
  15811. mLight[i].ido = 15;
  15812. mLight[i].reset = true;
  15813. }
  15814. else
  15815. {
  15816. if (lightList[i].transform.localScale.x == 1f)
  15817. {
  15818. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15819. }
  15820. lightRange[i] = lightList[i].transform.localScale.x;
  15821. gLight[i].transform.position = lightList[i].transform.position;
  15822. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15823. mLight[i].maid = lightList[i];
  15824. mLight[i].ido = 15;
  15825. }
  15826. }
  15827. else if (ikMode2 == 11)
  15828. {
  15829. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15830. {
  15831. mLight[i].ido = 3;
  15832. mLight[i].reset = true;
  15833. }
  15834. else
  15835. {
  15836. gLight[i].transform.position = lightList[i].transform.position;
  15837. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15838. lightX[i] = gLight[i].transform.eulerAngles.x;
  15839. lightY[i] = gLight[i].transform.eulerAngles.y;
  15840. mLight[i].maid = lightList[i];
  15841. mLight[i].ido = 3;
  15842. }
  15843. }
  15844. else if (ikMode2 == 12)
  15845. {
  15846. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15847. {
  15848. mLight[i].ido = 2;
  15849. mLight[i].reset = true;
  15850. }
  15851. else
  15852. {
  15853. gLight[i].transform.position = lightList[i].transform.position;
  15854. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15855. mLight[i].maid = lightList[i];
  15856. mLight[i].ido = 2;
  15857. }
  15858. }
  15859. else if (ikMode2 == 10)
  15860. {
  15861. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15862. {
  15863. mLight[i].ido = 1;
  15864. mLight[i].reset = true;
  15865. }
  15866. else
  15867. {
  15868. gLight[i].transform.position = lightList[i].transform.position;
  15869. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15870. mLight[i].maid = lightList[i];
  15871. mLight[i].maidArray = lightList.ToArray();
  15872. mLight[i].mArray = mLight.ToArray();
  15873. mLight[i].ido = 1;
  15874. }
  15875. }
  15876. else if (ikMode2 == 9)
  15877. {
  15878. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15879. {
  15880. mLight[i].ido = 4;
  15881. mLight[i].reset = true;
  15882. }
  15883. else
  15884. {
  15885. gLight[i].transform.position = lightList[i].transform.position;
  15886. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15887. lightX[i] = gLight[i].transform.eulerAngles.x;
  15888. lightY[i] = gLight[i].transform.eulerAngles.y;
  15889. mLight[i].maid = lightList[i];
  15890. mLight[i].ido = 4;
  15891. }
  15892. }
  15893. else if (ikMode2 == 14)
  15894. {
  15895. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15896. {
  15897. mLight[i].ido = 6;
  15898. mLight[i].reset = true;
  15899. }
  15900. else
  15901. {
  15902. gLight[i].transform.position = lightList[i].transform.position;
  15903. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15904. lightX[i] = gLight[i].transform.eulerAngles.x;
  15905. lightY[i] = gLight[i].transform.eulerAngles.y;
  15906. mLight[i].maid = lightList[i];
  15907. mLight[i].ido = 6;
  15908. }
  15909. }
  15910. }
  15911. }
  15912. }
  15913. for (i = 0; i < doguBObject.Count; i++)
  15914. {
  15915. if (!isCube2)
  15916. {
  15917. gDogu[i].GetComponent<Renderer>().enabled = false;
  15918. gDogu[i].SetActive(false);
  15919. }
  15920. else
  15921. {
  15922. if (ikMode2 > 0)
  15923. {
  15924. gDogu[i].GetComponent<Renderer>().enabled = true;
  15925. gDogu[i].SetActive(true);
  15926. }
  15927. else
  15928. {
  15929. gDogu[i].GetComponent<Renderer>().enabled = false;
  15930. gDogu[i].SetActive(false);
  15931. mDogu[i].isAlt = false;
  15932. }
  15933. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15934. {
  15935. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15936. if (mDogu[i].isAlt)
  15937. {
  15938. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15939. }
  15940. }
  15941. if (ikMode2 == 9 || ikMode2 == 14)
  15942. {
  15943. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15944. mDogu[i].Update();
  15945. }
  15946. if (ikMode2 == 15)
  15947. {
  15948. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  15949. }
  15950. if (ikMode2 == 13)
  15951. {
  15952. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15953. mDogu[i].Update();
  15954. }
  15955. if (ikMode2 == 13)
  15956. {
  15957. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  15958. {
  15959. mDogu[i].ido = 5;
  15960. mDogu[i].reset = true;
  15961. }
  15962. else
  15963. {
  15964. gDogu[i].transform.position = doguBObject[i].transform.position;
  15965. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15966. mDogu[i].maid = doguBObject[i];
  15967. mDogu[i].ido = 5;
  15968. }
  15969. }
  15970. else if (ikMode2 == 11)
  15971. {
  15972. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  15973. {
  15974. mDogu[i].ido = 3;
  15975. mDogu[i].reset = true;
  15976. }
  15977. else
  15978. {
  15979. gDogu[i].transform.position = doguBObject[i].transform.position;
  15980. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15981. mDogu[i].maid = doguBObject[i];
  15982. mDogu[i].ido = 3;
  15983. }
  15984. }
  15985. else if (ikMode2 == 12)
  15986. {
  15987. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  15988. {
  15989. mDogu[i].ido = 2;
  15990. mDogu[i].reset = true;
  15991. }
  15992. else
  15993. {
  15994. gDogu[i].transform.position = doguBObject[i].transform.position;
  15995. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15996. mDogu[i].maid = doguBObject[i];
  15997. mDogu[i].ido = 2;
  15998. }
  15999. }
  16000. else if (ikMode2 == 10)
  16001. {
  16002. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16003. {
  16004. mDogu[i].ido = 1;
  16005. mDogu[i].reset = true;
  16006. }
  16007. else
  16008. {
  16009. gDogu[i].transform.position = doguBObject[i].transform.position;
  16010. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16011. mDogu[i].maid = doguBObject[i];
  16012. mDogu[i].maidArray = doguBObject.ToArray();
  16013. mDogu[i].mArray = mDogu.ToArray();
  16014. mDogu[i].ido = 1;
  16015. }
  16016. }
  16017. else if (ikMode2 == 9)
  16018. {
  16019. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16020. {
  16021. mDogu[i].ido = 4;
  16022. mDogu[i].reset = true;
  16023. }
  16024. else
  16025. {
  16026. gDogu[i].transform.position = doguBObject[i].transform.position;
  16027. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16028. mDogu[i].maid = doguBObject[i];
  16029. mDogu[i].ido = 4;
  16030. }
  16031. }
  16032. else if (ikMode2 == 14)
  16033. {
  16034. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16035. {
  16036. mDogu[i].ido = 6;
  16037. mDogu[i].reset = true;
  16038. }
  16039. else
  16040. {
  16041. gDogu[i].transform.position = doguBObject[i].transform.position;
  16042. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16043. mDogu[i].maid = doguBObject[i];
  16044. mDogu[i].ido = 6;
  16045. }
  16046. }
  16047. else if (ikMode2 == 15)
  16048. {
  16049. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16050. {
  16051. mDogu[i].ido = 7;
  16052. mDogu[i].reset = true;
  16053. }
  16054. else
  16055. {
  16056. gDogu[i].transform.position = doguBObject[i].transform.position;
  16057. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16058. mDogu[i].maid = doguBObject[i];
  16059. mDogu[i].ido = 7;
  16060. }
  16061. }
  16062. }
  16063. }
  16064. ikModeOld2 = ikMode2;
  16065. }
  16066. if (isVR)
  16067. {
  16068. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16069. {
  16070. if (!isVR2)
  16071. {
  16072. isVR2 = true;
  16073. Preferences["config"]["shift_f8"].Value = "true";
  16074. SaveConfig();
  16075. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16076. }
  16077. else
  16078. {
  16079. isVR2 = false;
  16080. Preferences["config"]["shift_f8"].Value = "false";
  16081. SaveConfig();
  16082. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16083. }
  16084. }
  16085. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16086. {
  16087. loadScene = 1;
  16088. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16089. }
  16090. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16091. {
  16092. loadScene = 2;
  16093. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16094. }
  16095. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16096. {
  16097. loadScene = 3;
  16098. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16099. }
  16100. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16101. {
  16102. loadScene = 4;
  16103. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16104. }
  16105. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16106. {
  16107. loadScene = 5;
  16108. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16109. }
  16110. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16111. {
  16112. loadScene = 6;
  16113. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16114. }
  16115. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16116. {
  16117. loadScene = 7;
  16118. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16119. }
  16120. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16121. {
  16122. loadScene = 8;
  16123. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16124. }
  16125. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16126. {
  16127. loadScene = 9;
  16128. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16129. }
  16130. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16131. {
  16132. loadScene = 10;
  16133. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16134. }
  16135. for (int j = 0; j < 7; j++)
  16136. {
  16137. if (!maidArray[j])
  16138. {
  16139. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16140. }
  16141. }
  16142. }
  16143. }
  16144. }
  16145. }
  16146. }