MultipleMaids.MaidUpdate.cs 921 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. float num2 = 2f;
  661. if (Application.unityVersion.StartsWith("4"))
  662. {
  663. num2 = 1f;
  664. }
  665. GameObject gameObject3 = new GameObject("Light");
  666. gameObject3.AddComponent<Light>();
  667. lightList.Add(gameObject3);
  668. lightColorR.Add(1f);
  669. lightColorG.Add(1f);
  670. lightColorB.Add(1f);
  671. lightIndex.Add(0);
  672. lightX.Add(40f);
  673. lightY.Add(180f);
  674. lightAkarusa.Add(num2);
  675. lightKage.Add(0.098f);
  676. lightRange.Add(50f);
  677. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  678. gameObject3.GetComponent<Light>().intensity = num2;
  679. gameObject3.GetComponent<Light>().spotAngle = 50f;
  680. gameObject3.GetComponent<Light>().range = 10f;
  681. gameObject3.GetComponent<Light>().type = LightType.Directional;
  682. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  683. gameObject3.GetComponent<Light>().cullingMask = 256;
  684. }
  685. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  686. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  687. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  688. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  689. {
  690. float axis = Input.GetAxis("Mouse ScrollWheel");
  691. if (axis > 0f)
  692. {
  693. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  694. if (mainCamera.GetDistance() < 0.1f)
  695. {
  696. mainCamera.SetDistance(0.1f, true);
  697. }
  698. }
  699. else if (axis < 0f)
  700. {
  701. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  702. if (mainCamera.GetDistance() > 25f)
  703. {
  704. mainCamera.SetDistance(25f, true);
  705. }
  706. }
  707. }
  708. for (int j = 0; j < maxMaidCnt; j++)
  709. {
  710. if (maidArray[j] && maidArray[j].Visible)
  711. {
  712. maidCnt++;
  713. }
  714. }
  715. if (maidArray[0] != null && maidArray[0].Visible)
  716. {
  717. if (getModKeyPressing(modKey.Shift))
  718. {
  719. speed = 5f * Time.deltaTime * 60f;
  720. }
  721. else
  722. {
  723. speed = 1f * Time.deltaTime * 60f;
  724. }
  725. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  726. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  727. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  728. if (!isVR || isVR2)
  729. {
  730. if (!isVR)
  731. {
  732. if (isBloom)
  733. {
  734. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  735. fieldValue2.enabled = true;
  736. fieldValue2.bloomIntensity = bloom1;
  737. fieldValue2.bloomBlurIterations = (int)bloom2;
  738. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  739. if (isBloomA)
  740. {
  741. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  742. }
  743. else
  744. {
  745. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  746. }
  747. isBloom2 = true;
  748. }
  749. else if (isBloom2)
  750. {
  751. isBloom2 = false;
  752. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  753. fieldValue2.enabled = true;
  754. fieldValue2.bloomIntensity = 2.85f;
  755. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  756. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  757. fieldValue2.bloomBlurIterations = 3;
  758. }
  759. if (isDepth)
  760. {
  761. depth_field_.enabled = true;
  762. depth_field_.focalLength = depth1;
  763. depth_field_.focalSize = depth2;
  764. depth_field_.aperture = depth3;
  765. depth_field_.maxBlurSize = depth4;
  766. if (isDepthA)
  767. {
  768. depth_field_.visualizeFocus = true;
  769. }
  770. else
  771. {
  772. depth_field_.visualizeFocus = false;
  773. }
  774. }
  775. else
  776. {
  777. if (depth_field_ == null)
  778. {
  779. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  780. if (depth_field_.dofHdrShader == null)
  781. {
  782. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  783. }
  784. if (depth_field_.dx11BokehShader == null)
  785. {
  786. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  787. }
  788. if (depth_field_.dx11BokehTexture == null)
  789. {
  790. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  791. }
  792. }
  793. depth_field_.enabled = false;
  794. }
  795. if (isFog)
  796. {
  797. if (fog_.fogShader == null)
  798. {
  799. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  800. }
  801. fog_.enabled = true;
  802. fog_.startDistance = fog1;
  803. fog_.globalDensity = fog2;
  804. fog_.heightScale = fog3;
  805. fog_.height = fog4;
  806. fog_.globalFogColor.r = fog5;
  807. fog_.globalFogColor.g = fog6;
  808. fog_.globalFogColor.b = fog7;
  809. }
  810. else
  811. {
  812. if (fog_ == null)
  813. {
  814. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  815. }
  816. fog_.enabled = false;
  817. }
  818. if (isSepia != isSepian)
  819. {
  820. isSepia = isSepian;
  821. if (isSepia)
  822. {
  823. if (sepia_tone_.shader == null)
  824. {
  825. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  826. }
  827. sepia_tone_.enabled = true;
  828. }
  829. else
  830. {
  831. if (sepia_tone_ == null)
  832. {
  833. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  834. }
  835. sepia_tone_.enabled = false;
  836. }
  837. }
  838. if (bokashi > 0f)
  839. {
  840. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  841. component.enabled = true;
  842. component.blurSize = bokashi / 10f;
  843. component.blurIterations = 0;
  844. component.downsample = 0;
  845. if (bokashi > 3f)
  846. {
  847. component.blurSize -= 0.3f;
  848. component.blurIterations = 1;
  849. component.downsample = 1;
  850. }
  851. }
  852. else
  853. {
  854. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  855. component.enabled = false;
  856. }
  857. if (kamiyure > 0f)
  858. {
  859. for (int j = 0; j < maidCnt; j++)
  860. {
  861. Maid maid = maidArray[j];
  862. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  863. {
  864. if (maid.body0.goSlot[l].obj != null)
  865. {
  866. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  867. if (component2 != null && component2.enabled)
  868. {
  869. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  870. }
  871. }
  872. List<THair1> fieldValue3 =
  873. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  874. for (int k = 0; k < fieldValue3.Count; k++)
  875. {
  876. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  877. }
  878. }
  879. }
  880. }
  881. if (isBlur)
  882. {
  883. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  884. component3.mode = Vignetting.AberrationMode.Simple;
  885. component3.intensity = blur1;
  886. component3.chromaticAberration = blur4;
  887. component3.blur = blur2;
  888. component3.blurSpread = blur3;
  889. component3.enabled = true;
  890. isBlur2 = true;
  891. }
  892. else if (isBlur2)
  893. {
  894. isBlur2 = false;
  895. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  896. component3.mode = Vignetting.AberrationMode.Simple;
  897. component3.intensity = -3.98f;
  898. component3.chromaticAberration = -0.75f;
  899. component3.axialAberration = 1.18f;
  900. component3.blurSpread = 4.19f;
  901. component3.luminanceDependency = 0.494f;
  902. component3.blurDistance = 1.71f;
  903. component3.enabled = false;
  904. }
  905. }
  906. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  907. {
  908. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  909. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  910. }
  911. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  912. {
  913. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. }
  919. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  920. {
  921. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  922. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  923. }
  924. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  925. {
  926. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  927. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  928. }
  929. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  930. {
  931. GameMain.Instance.MainLight.Reset();
  932. GameMain.Instance.MainLight.SetIntensity(0.95f);
  933. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  934. lightIndex[0] = 0;
  935. lightColorR[0] = 1f;
  936. lightColorG[0] = 1f;
  937. lightColorB[0] = 1f;
  938. lightX[0] = 40f;
  939. lightY[0] = 180f;
  940. lightAkarusa[0] = 0.95f;
  941. lightKage[0] = 0.098f;
  942. lightRange[0] = 50f;
  943. bgObject.SetActive(true);
  944. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  945. isIdx1 = false;
  946. isIdx2 = false;
  947. isIdx3 = false;
  948. isIdx4 = false;
  949. }
  950. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  951. {
  952. List<float> list;
  953. (list = lightColorR)[0] = list[0] + 0.01f;
  954. if (lightColorR[0] > 1f)
  955. {
  956. lightColorR[0] = 1f;
  957. }
  958. if (lightIndex[0] != 3)
  959. {
  960. GameMain.Instance.MainLight.GetComponent<Light>().color =
  961. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  962. }
  963. else
  964. {
  965. mainCamera.GetComponent<Camera>().backgroundColor =
  966. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  967. }
  968. }
  969. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  970. {
  971. List<float> list;
  972. (list = lightColorG)[0] = list[0] + 0.01f;
  973. if (lightColorG[0] > 1f)
  974. {
  975. lightColorG[0] = 1f;
  976. }
  977. if (lightIndex[0] != 3)
  978. {
  979. GameMain.Instance.MainLight.GetComponent<Light>().color =
  980. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  981. }
  982. else
  983. {
  984. mainCamera.GetComponent<Camera>().backgroundColor =
  985. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  986. }
  987. }
  988. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  989. {
  990. List<float> list;
  991. (list = lightColorB)[0] = list[0] + 0.01f;
  992. if (lightColorB[0] > 1f)
  993. {
  994. lightColorB[0] = 1f;
  995. }
  996. if (lightIndex[0] != 3)
  997. {
  998. GameMain.Instance.MainLight.GetComponent<Light>().color =
  999. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1000. }
  1001. else
  1002. {
  1003. mainCamera.GetComponent<Camera>().backgroundColor =
  1004. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1005. }
  1006. }
  1007. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1008. {
  1009. List<float> list;
  1010. (list = lightColorR)[0] = list[0] - 0.01f;
  1011. if (lightColorR[0] < 0f)
  1012. {
  1013. lightColorR[0] = 0f;
  1014. }
  1015. if (lightIndex[0] != 3)
  1016. {
  1017. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1018. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1019. }
  1020. else
  1021. {
  1022. mainCamera.GetComponent<Camera>().backgroundColor =
  1023. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1024. }
  1025. }
  1026. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1027. {
  1028. List<float> list;
  1029. (list = lightColorG)[0] = list[0] - 0.01f;
  1030. if (lightColorG[0] < 0f)
  1031. {
  1032. lightColorG[0] = 0f;
  1033. }
  1034. if (lightIndex[0] != 3)
  1035. {
  1036. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1037. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1038. }
  1039. else
  1040. {
  1041. mainCamera.GetComponent<Camera>().backgroundColor =
  1042. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1043. }
  1044. }
  1045. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1046. {
  1047. List<float> list;
  1048. (list = lightColorB)[0] = list[0] - 0.01f;
  1049. if (lightColorB[0] < 0f)
  1050. {
  1051. lightColorB[0] = 0f;
  1052. }
  1053. if (lightIndex[0] != 3)
  1054. {
  1055. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1056. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1057. }
  1058. else
  1059. {
  1060. mainCamera.GetComponent<Camera>().backgroundColor =
  1061. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1062. }
  1063. }
  1064. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1065. {
  1066. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1067. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1068. }
  1069. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1070. {
  1071. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1072. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1073. }
  1074. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1075. {
  1076. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1077. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1078. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1079. }
  1080. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1081. {
  1082. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1083. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1084. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1085. }
  1086. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1087. {
  1088. List<int> list2;
  1089. (list2 = lightIndex)[0] = list2[0] + 1;
  1090. if (lightIndex[0] == 4)
  1091. {
  1092. lightIndex[0] = 0;
  1093. }
  1094. lightColorR[0] = 1f;
  1095. lightColorG[0] = 1f;
  1096. lightColorB[0] = 1f;
  1097. lightX[0] = 40f;
  1098. lightY[0] = 180f;
  1099. lightAkarusa[0] = 0.95f;
  1100. lightKage[0] = 0.098f;
  1101. lightRange[0] = 50f;
  1102. GameMain.Instance.MainLight.Reset();
  1103. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1104. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1105. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1106. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1107. if (lightIndex[0] == 0)
  1108. {
  1109. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1110. bgObject.SetActive(true);
  1111. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1112. }
  1113. else if (lightIndex[0] == 1)
  1114. {
  1115. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1116. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1117. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1118. }
  1119. else if (lightIndex[0] == 2)
  1120. {
  1121. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1122. }
  1123. else if (lightIndex[0] == 3)
  1124. {
  1125. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1126. mainCamera.GetComponent<Camera>().backgroundColor =
  1127. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1128. bgObject.SetActive(false);
  1129. }
  1130. isIdx1 = false;
  1131. isIdx2 = false;
  1132. isIdx3 = false;
  1133. isIdx4 = false;
  1134. }
  1135. }
  1136. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1137. {
  1138. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1139. }
  1140. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1141. {
  1142. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1143. {
  1144. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1145. }
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1148. {
  1149. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1150. }
  1151. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1152. {
  1153. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1154. }
  1155. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1156. {
  1157. GameMain.Instance.MainLight.Reset();
  1158. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1159. }
  1160. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1161. {
  1162. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1163. }
  1164. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1165. {
  1166. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1167. }
  1168. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1169. {
  1170. if (lightIndex[0] == 1)
  1171. {
  1172. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1173. }
  1174. else
  1175. {
  1176. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1177. }
  1178. }
  1179. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1180. {
  1181. if (lightIndex[0] == 1)
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1184. }
  1185. else
  1186. {
  1187. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1188. }
  1189. }
  1190. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1191. {
  1192. List<int> list2;
  1193. (list2 = lightIndex)[0] = list2[0] + 1;
  1194. if (lightIndex[0] == 3)
  1195. {
  1196. lightIndex[0] = 0;
  1197. }
  1198. GameMain.Instance.MainLight.Reset();
  1199. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1200. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1201. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1202. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1203. if (lightIndex[0] == 0)
  1204. {
  1205. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1206. }
  1207. else if (lightIndex[0] == 1)
  1208. {
  1209. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1210. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1211. }
  1212. else if (lightIndex[0] == 2)
  1213. {
  1214. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1215. }
  1216. }
  1217. int i;
  1218. for (i = 0; i < lightList.Count; i++)
  1219. {
  1220. if (i > 0)
  1221. {
  1222. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1223. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1224. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1225. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1226. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1227. {
  1228. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1229. }
  1230. }
  1231. else
  1232. {
  1233. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1234. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1235. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1236. {
  1237. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1238. }
  1239. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1240. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1241. if (lightIndex[i] != 3)
  1242. {
  1243. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1244. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1245. }
  1246. else
  1247. {
  1248. mainCamera.GetComponent<Camera>().backgroundColor =
  1249. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1250. }
  1251. }
  1252. }
  1253. bool flag3 = false;
  1254. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1255. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1256. {
  1257. for (i = 0; i < maidCnt; i++)
  1258. {
  1259. if (goSlot[(int)selectList[i]] != null)
  1260. {
  1261. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1262. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1263. {
  1264. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1265. }
  1266. }
  1267. }
  1268. }
  1269. for (int j = 0; j < maidCnt; j++)
  1270. {
  1271. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1272. {
  1273. bool flag4 = shodaiFlg[(int)selectList[j]];
  1274. shodaiFlg[(int)selectList[j]] = false;
  1275. try
  1276. {
  1277. TMorph morph = maidArray[j].body0.Face.morph;
  1278. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1279. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1280. }
  1281. catch
  1282. {
  1283. shodaiFlg[(int)selectList[j]] = true;
  1284. }
  1285. if (shodaiFlg[(int)selectList[j]] != flag4)
  1286. {
  1287. if (!isVR)
  1288. {
  1289. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1290. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1291. }
  1292. }
  1293. }
  1294. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1295. {
  1296. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1297. }
  1298. if (sceneLevel == 5)
  1299. {
  1300. if (editSelectMaid == maidArray[j])
  1301. {
  1302. flag3 = true;
  1303. }
  1304. }
  1305. Maid maid = maidArray[j];
  1306. }
  1307. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1308. {
  1309. isEditNo = 0;
  1310. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1311. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1312. }
  1313. i = 0;
  1314. while (i < maidCnt)
  1315. {
  1316. Transform transform = maidArray[i].transform;
  1317. Maid maid = maidArray[i];
  1318. if (cafeFlg[i])
  1319. {
  1320. cafeCount[i]++;
  1321. if (cafeCount[i] > 1)
  1322. {
  1323. maid.DelProp(MPN.handitem, true);
  1324. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1325. maid.AllProcPropSeqStart();
  1326. cafeFlg[i] = false;
  1327. cafeCount[i] = 0;
  1328. }
  1329. }
  1330. KeyCode key;
  1331. if (i >= 14)
  1332. {
  1333. bool flag5 = false;
  1334. bool flag6 = false;
  1335. for (int k = 0; k < keyArray.Length; k++)
  1336. {
  1337. if (Input.GetKey(keyArray[k]))
  1338. {
  1339. flag5 = true;
  1340. break;
  1341. }
  1342. if (Input.GetKeyUp(keyArray[k]))
  1343. {
  1344. flag6 = true;
  1345. break;
  1346. }
  1347. }
  1348. key = keyArray[6];
  1349. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1350. {
  1351. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1352. {
  1353. goto IL_49FE;
  1354. }
  1355. idoFlg[i - 7] = false;
  1356. }
  1357. }
  1358. else if (i >= 7)
  1359. {
  1360. bool flag5 = false;
  1361. bool flag6 = false;
  1362. for (int k = 0; k < keyArray.Length; k++)
  1363. {
  1364. if (Input.GetKey(keyArray[k]))
  1365. {
  1366. flag5 = true;
  1367. break;
  1368. }
  1369. if (Input.GetKeyUp(keyArray[k]))
  1370. {
  1371. flag6 = true;
  1372. break;
  1373. }
  1374. }
  1375. key = keyArray[i - 7];
  1376. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1377. {
  1378. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1379. {
  1380. goto IL_49FE;
  1381. }
  1382. idoFlg[i - 7] = false;
  1383. }
  1384. }
  1385. else
  1386. {
  1387. bool flag5 = false;
  1388. for (int k = 0; k < keyArray.Length; k++)
  1389. {
  1390. if (Input.GetKey(keyArray[k]))
  1391. {
  1392. flag5 = true;
  1393. break;
  1394. }
  1395. }
  1396. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1397. {
  1398. key = keyArray[i];
  1399. goto IL_49FE;
  1400. }
  1401. }
  1402. IL_1688E:
  1403. i++;
  1404. continue;
  1405. IL_49FE:
  1406. if (xFlg[i])
  1407. {
  1408. if (!maid.AudioMan.audiosource.isPlaying)
  1409. {
  1410. if (maid.status.personal.uniqueName == "Pride")
  1411. {
  1412. string text = "s0_";
  1413. Random random = new Random();
  1414. int num4 = random.Next(10000);
  1415. bool flag7 = false;
  1416. for (int k = 0; k < tunArray.Length; k++)
  1417. {
  1418. if (tunArray[k] == num4)
  1419. {
  1420. flag7 = true;
  1421. break;
  1422. }
  1423. }
  1424. if (!flag7)
  1425. {
  1426. text = text + "0" + num4.ToString() + ".ogg";
  1427. if (GameUty.FileSystem.IsExistentFile(text))
  1428. {
  1429. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1430. }
  1431. }
  1432. }
  1433. if (maid.status.personal.uniqueName == "Cool")
  1434. {
  1435. string text = "s1_";
  1436. Random random = new Random();
  1437. int num4 = random.Next(10000);
  1438. bool flag7 = false;
  1439. for (int k = 0; k < coolArray.Length; k++)
  1440. {
  1441. if (coolArray[k] == num4)
  1442. {
  1443. flag7 = true;
  1444. break;
  1445. }
  1446. }
  1447. if (!flag7)
  1448. {
  1449. text = text + "0" + num4.ToString() + ".ogg";
  1450. if (GameUty.FileSystem.IsExistentFile(text))
  1451. {
  1452. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1453. }
  1454. }
  1455. }
  1456. if (maid.status.personal.uniqueName == "Pure")
  1457. {
  1458. string text = "s2_";
  1459. Random random = new Random();
  1460. int num4 = random.Next(10000);
  1461. bool flag7 = false;
  1462. for (int k = 0; k < pureArray.Length; k++)
  1463. {
  1464. if (pureArray[k] == num4)
  1465. {
  1466. flag7 = true;
  1467. break;
  1468. }
  1469. }
  1470. if (!flag7)
  1471. {
  1472. text = text + "0" + num4.ToString() + ".ogg";
  1473. if (GameUty.FileSystem.IsExistentFile(text))
  1474. {
  1475. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1476. }
  1477. }
  1478. }
  1479. if (maid.status.personal.uniqueName == "Yandere")
  1480. {
  1481. string text = "s3_";
  1482. Random random = new Random();
  1483. int num4 = random.Next(10000);
  1484. bool flag7 = false;
  1485. for (int k = 0; k < yanArray.Length; k++)
  1486. {
  1487. if (yanArray[k] == num4)
  1488. {
  1489. flag7 = true;
  1490. break;
  1491. }
  1492. }
  1493. if (!flag7)
  1494. {
  1495. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1496. if (GameUty.FileSystem.IsExistentFile(text))
  1497. {
  1498. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1499. }
  1500. }
  1501. }
  1502. if (maid.status.personal.uniqueName == "Muku")
  1503. {
  1504. string text = "h0_";
  1505. Random random = new Random();
  1506. int num4 = random.Next(10000);
  1507. bool flag7 = false;
  1508. for (int k = 0; k < h0Array.Length; k++)
  1509. {
  1510. if (h0Array[k] == num4)
  1511. {
  1512. flag7 = true;
  1513. break;
  1514. }
  1515. }
  1516. if (flag7)
  1517. {
  1518. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1519. if (GameUty.FileSystem.IsExistentFile(text))
  1520. {
  1521. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1522. }
  1523. }
  1524. }
  1525. if (maid.status.personal.uniqueName == "Majime")
  1526. {
  1527. string text = "h1_";
  1528. Random random = new Random();
  1529. int num4 = random.Next(10000);
  1530. bool flag7 = false;
  1531. for (int k = 0; k < h1Array.Length; k++)
  1532. {
  1533. if (h1Array[k] == num4)
  1534. {
  1535. flag7 = true;
  1536. break;
  1537. }
  1538. }
  1539. if (flag7)
  1540. {
  1541. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1542. if (GameUty.FileSystem.IsExistentFile(text))
  1543. {
  1544. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1545. }
  1546. }
  1547. }
  1548. if (maid.status.personal.uniqueName == "Rindere")
  1549. {
  1550. string text = "h2_";
  1551. Random random = new Random();
  1552. int num4 = random.Next(10000);
  1553. bool flag7 = false;
  1554. for (int k = 0; k < h2Array.Length; k++)
  1555. {
  1556. if (h2Array[k] == num4)
  1557. {
  1558. flag7 = true;
  1559. break;
  1560. }
  1561. }
  1562. if (flag7)
  1563. {
  1564. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1565. if (GameUty.FileSystem.IsExistentFile(text))
  1566. {
  1567. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1568. }
  1569. }
  1570. }
  1571. }
  1572. }
  1573. if (zFlg[i])
  1574. {
  1575. if (!maid.AudioMan.audiosource.isPlaying)
  1576. {
  1577. string text = "";
  1578. if (maid.status.personal.uniqueName == "Pride")
  1579. {
  1580. text = "s0_";
  1581. Random random = new Random();
  1582. int num4 = random.Next(tunArray.Length);
  1583. object obj = text;
  1584. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1585. }
  1586. if (maid.status.personal.uniqueName == "Cool")
  1587. {
  1588. text = "s1_";
  1589. Random random = new Random();
  1590. int num4 = random.Next(coolArray.Length);
  1591. object obj = text;
  1592. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1593. }
  1594. if (maid.status.personal.uniqueName == "Pure")
  1595. {
  1596. text = "s2_";
  1597. Random random = new Random();
  1598. int num4 = random.Next(pureArray.Length);
  1599. object obj = text;
  1600. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1601. }
  1602. if (maid.status.personal.uniqueName == "Yandere")
  1603. {
  1604. text = "s3_";
  1605. Random random = new Random();
  1606. int num4 = random.Next(yanArray.Length);
  1607. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1608. }
  1609. if (maid.status.personal.uniqueName == "Muku")
  1610. {
  1611. text = "h0_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(h0tArray.Length);
  1614. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Majime")
  1617. {
  1618. text = "h1_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h1tArray.Length);
  1621. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Rindere")
  1624. {
  1625. text = "h2_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h2tArray.Length);
  1628. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1629. }
  1630. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1631. }
  1632. }
  1633. if (!isVR || isVR2)
  1634. {
  1635. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1636. {
  1637. ikMaid = i;
  1638. isIK[i] = true;
  1639. ikBui = 1;
  1640. ikMode[i] = 0;
  1641. SetIK(maid, i);
  1642. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1643. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1644. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1645. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1646. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1647. idoFlg[i] = true;
  1648. if (i >= 7)
  1649. {
  1650. idoFlg[i - 7] = true;
  1651. }
  1652. qFlg = true;
  1653. }
  1654. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1655. {
  1656. ikMaid = i;
  1657. isIK[i] = true;
  1658. ikBui = 2;
  1659. ikMode[i] = 0;
  1660. SetIK(maid, i);
  1661. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1662. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1663. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1664. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1665. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1666. idoFlg[i] = true;
  1667. if (i >= 7)
  1668. {
  1669. idoFlg[i - 7] = true;
  1670. }
  1671. }
  1672. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1673. {
  1674. ikMaid = i;
  1675. isIK[i] = true;
  1676. ikBui = 3;
  1677. ikMode[i] = 0;
  1678. SetIK(maid, i);
  1679. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1680. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1681. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1682. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1683. idoFlg[i] = true;
  1684. if (i >= 7)
  1685. {
  1686. idoFlg[i - 7] = true;
  1687. }
  1688. }
  1689. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1690. {
  1691. ikMaid = i;
  1692. isIK[i] = true;
  1693. ikBui = 4;
  1694. ikMode[i] = 0;
  1695. SetIK(maid, i);
  1696. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1697. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1698. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1699. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1700. idoFlg[i] = true;
  1701. if (i >= 7)
  1702. {
  1703. idoFlg[i - 7] = true;
  1704. }
  1705. sFlg = true;
  1706. }
  1707. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1708. {
  1709. maid.body0.transform.localRotation =
  1710. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1711. if (i >= 7)
  1712. {
  1713. idoFlg[i - 7] = true;
  1714. }
  1715. idoFlg[i] = true;
  1716. }
  1717. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1718. {
  1719. maid.body0.transform.localRotation =
  1720. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1721. if (i >= 7)
  1722. {
  1723. idoFlg[i - 7] = true;
  1724. }
  1725. idoFlg[i] = true;
  1726. }
  1727. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1728. {
  1729. bGui = true;
  1730. isPoseInit = true;
  1731. isGuiInit = true;
  1732. poseFlg = true;
  1733. faceFlg = false;
  1734. sceneFlg = false;
  1735. kankyoFlg = false;
  1736. kankyo2Flg = false;
  1737. fFlg = true;
  1738. for (int k = 0; k < maidCnt; k++)
  1739. {
  1740. if (maid == maidArray[k])
  1741. {
  1742. selectMaidIndex = k;
  1743. }
  1744. }
  1745. copyIndex = 0;
  1746. if (i >= 7)
  1747. {
  1748. idoFlg[i - 7] = true;
  1749. }
  1750. idoFlg[i] = true;
  1751. }
  1752. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1753. {
  1754. bGui = true;
  1755. isFaceInit = true;
  1756. isGuiInit = true;
  1757. faceFlg = true;
  1758. poseFlg = false;
  1759. sceneFlg = false;
  1760. kankyoFlg = false;
  1761. kankyo2Flg = false;
  1762. maid.boMabataki = false;
  1763. for (int k = 0; k < maidCnt; k++)
  1764. {
  1765. if (maid == maidArray[k])
  1766. {
  1767. selectMaidIndex = k;
  1768. }
  1769. }
  1770. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1771. if (i >= 7)
  1772. {
  1773. idoFlg[i - 7] = true;
  1774. }
  1775. idoFlg[i] = true;
  1776. }
  1777. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1778. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1779. {
  1780. if (!xFlg[i])
  1781. {
  1782. xFlg[i] = true;
  1783. zFlg[i] = false;
  1784. if (maid.status.personal.uniqueName == "Pride")
  1785. {
  1786. string text = "s0_";
  1787. Random random = new Random();
  1788. int num4 = random.Next(10000);
  1789. bool flag7 = false;
  1790. for (int k = 0; k < tunArray.Length; k++)
  1791. {
  1792. if (tunArray[k] == num4)
  1793. {
  1794. flag7 = true;
  1795. break;
  1796. }
  1797. }
  1798. if (!flag7)
  1799. {
  1800. text = text + "0" + num4.ToString() + ".ogg";
  1801. if (GameUty.FileSystem.IsExistentFile(text))
  1802. {
  1803. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1804. }
  1805. }
  1806. }
  1807. if (maid.status.personal.uniqueName == "Cool")
  1808. {
  1809. string text = "s1_";
  1810. Random random = new Random();
  1811. int num4 = random.Next(10000);
  1812. bool flag7 = false;
  1813. for (int k = 0; k < coolArray.Length; k++)
  1814. {
  1815. if (coolArray[k] == num4)
  1816. {
  1817. flag7 = true;
  1818. break;
  1819. }
  1820. }
  1821. if (!flag7)
  1822. {
  1823. text = text + "0" + num4.ToString() + ".ogg";
  1824. if (GameUty.FileSystem.IsExistentFile(text))
  1825. {
  1826. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1827. }
  1828. }
  1829. }
  1830. if (maid.status.personal.uniqueName == "Pure")
  1831. {
  1832. string text = "s2_";
  1833. Random random = new Random();
  1834. int num4 = random.Next(10000);
  1835. bool flag7 = false;
  1836. for (int k = 0; k < pureArray.Length; k++)
  1837. {
  1838. if (pureArray[k] == num4)
  1839. {
  1840. flag7 = true;
  1841. break;
  1842. }
  1843. }
  1844. if (!flag7)
  1845. {
  1846. text = text + "0" + num4.ToString() + ".ogg";
  1847. if (GameUty.FileSystem.IsExistentFile(text))
  1848. {
  1849. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1850. }
  1851. }
  1852. }
  1853. if (maid.status.personal.uniqueName == "Yandere")
  1854. {
  1855. string text = "s3_";
  1856. Random random = new Random();
  1857. int num4 = random.Next(10000);
  1858. bool flag7 = false;
  1859. for (int k = 0; k < yanArray.Length; k++)
  1860. {
  1861. if (yanArray[k] == num4)
  1862. {
  1863. flag7 = true;
  1864. break;
  1865. }
  1866. }
  1867. if (!flag7)
  1868. {
  1869. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1870. if (GameUty.FileSystem.IsExistentFile(text))
  1871. {
  1872. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1873. }
  1874. }
  1875. }
  1876. if (maid.status.personal.uniqueName == "Muku")
  1877. {
  1878. string text = "h0_";
  1879. Random random = new Random();
  1880. int num4 = random.Next(10000);
  1881. bool flag7 = false;
  1882. for (int k = 0; k < h0Array.Length; k++)
  1883. {
  1884. if (h0Array[k] == num4)
  1885. {
  1886. flag7 = true;
  1887. break;
  1888. }
  1889. }
  1890. if (flag7)
  1891. {
  1892. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1893. if (GameUty.FileSystem.IsExistentFile(text))
  1894. {
  1895. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1896. }
  1897. }
  1898. }
  1899. if (maid.status.personal.uniqueName == "Majime")
  1900. {
  1901. string text = "h1_";
  1902. Random random = new Random();
  1903. int num4 = random.Next(10000);
  1904. bool flag7 = false;
  1905. for (int k = 0; k < h1Array.Length; k++)
  1906. {
  1907. if (h1Array[k] == num4)
  1908. {
  1909. flag7 = true;
  1910. break;
  1911. }
  1912. }
  1913. if (flag7)
  1914. {
  1915. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1916. if (GameUty.FileSystem.IsExistentFile(text))
  1917. {
  1918. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1919. }
  1920. }
  1921. }
  1922. if (maid.status.personal.uniqueName == "Rindere")
  1923. {
  1924. string text = "h2_";
  1925. Random random = new Random();
  1926. int num4 = random.Next(10000);
  1927. bool flag7 = false;
  1928. for (int k = 0; k < h2Array.Length; k++)
  1929. {
  1930. if (h2Array[k] == num4)
  1931. {
  1932. flag7 = true;
  1933. break;
  1934. }
  1935. }
  1936. if (flag7)
  1937. {
  1938. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1939. if (GameUty.FileSystem.IsExistentFile(text))
  1940. {
  1941. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1942. }
  1943. }
  1944. }
  1945. }
  1946. else
  1947. {
  1948. xFlg[i] = false;
  1949. maid.AudioMan.Clear();
  1950. }
  1951. idoFlg[i] = true;
  1952. if (i >= 7)
  1953. {
  1954. idoFlg[i - 7] = true;
  1955. }
  1956. }
  1957. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1958. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1959. {
  1960. if (!zFlg[i])
  1961. {
  1962. zFlg[i] = true;
  1963. xFlg[i] = false;
  1964. string text = "";
  1965. if (maid.status.personal.uniqueName == "Pride")
  1966. {
  1967. text = "s0_";
  1968. Random random = new Random();
  1969. int num4 = random.Next(tunArray.Length);
  1970. object obj = text;
  1971. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1972. }
  1973. if (maid.status.personal.uniqueName == "Cool")
  1974. {
  1975. text = "s1_";
  1976. Random random = new Random();
  1977. int num4 = random.Next(coolArray.Length);
  1978. object obj = text;
  1979. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1980. }
  1981. if (maid.status.personal.uniqueName == "Pure")
  1982. {
  1983. text = "s2_";
  1984. Random random = new Random();
  1985. int num4 = random.Next(pureArray.Length);
  1986. object obj = text;
  1987. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1988. }
  1989. if (maid.status.personal.uniqueName == "Yandere")
  1990. {
  1991. text = "s3_";
  1992. Random random = new Random();
  1993. int num4 = random.Next(yanArray.Length);
  1994. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1995. }
  1996. if (maid.status.personal.uniqueName == "Muku")
  1997. {
  1998. text = "h0_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(h0tArray.Length);
  2001. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Majime")
  2004. {
  2005. text = "h1_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h1tArray.Length);
  2008. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Rindere")
  2011. {
  2012. text = "h2_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h2tArray.Length);
  2015. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2016. }
  2017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2018. }
  2019. else
  2020. {
  2021. zFlg[i] = false;
  2022. maid.AudioMan.Clear();
  2023. }
  2024. idoFlg[i] = true;
  2025. if (i >= 7)
  2026. {
  2027. idoFlg[i - 7] = true;
  2028. }
  2029. }
  2030. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2031. {
  2032. string text = "";
  2033. if (maid.status.personal.uniqueName == "Pride")
  2034. {
  2035. text = "s0_";
  2036. Random random = new Random();
  2037. int num4 = random.Next(tunArray.Length);
  2038. object obj = text;
  2039. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2040. }
  2041. if (maid.status.personal.uniqueName == "Cool")
  2042. {
  2043. text = "s1_";
  2044. Random random = new Random();
  2045. int num4 = random.Next(coolArray.Length);
  2046. object obj = text;
  2047. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2048. }
  2049. if (maid.status.personal.uniqueName == "Pure")
  2050. {
  2051. text = "s2_";
  2052. Random random = new Random();
  2053. int num4 = random.Next(pureArray.Length);
  2054. object obj = text;
  2055. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2056. }
  2057. if (maid.status.personal.uniqueName == "Yandere")
  2058. {
  2059. text = "s3_";
  2060. Random random = new Random();
  2061. int num4 = random.Next(yanArray.Length);
  2062. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2063. }
  2064. if (maid.status.personal.uniqueName == "Muku")
  2065. {
  2066. text = "h0_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(h0tArray.Length);
  2069. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Majime")
  2072. {
  2073. text = "h1_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h1tArray.Length);
  2076. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Rindere")
  2079. {
  2080. text = "h2_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h2tArray.Length);
  2083. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2084. }
  2085. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2086. idoFlg[i] = true;
  2087. if (i >= 7)
  2088. {
  2089. idoFlg[i - 7] = true;
  2090. }
  2091. }
  2092. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2093. {
  2094. if (maid.status.personal.uniqueName == "Pride")
  2095. {
  2096. string text = "s0_";
  2097. Random random = new Random();
  2098. int num4 = random.Next(10000);
  2099. bool flag7 = false;
  2100. for (int k = 0; k < tunArray.Length; k++)
  2101. {
  2102. if (tunArray[k] == num4)
  2103. {
  2104. flag7 = true;
  2105. break;
  2106. }
  2107. }
  2108. if (!flag7)
  2109. {
  2110. text = text + "0" + num4.ToString() + ".ogg";
  2111. if (GameUty.FileSystem.IsExistentFile(text))
  2112. {
  2113. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2114. }
  2115. }
  2116. }
  2117. if (maid.status.personal.uniqueName == "Cool")
  2118. {
  2119. string text = "s1_";
  2120. Random random = new Random();
  2121. int num4 = random.Next(10000);
  2122. bool flag7 = false;
  2123. for (int k = 0; k < coolArray.Length; k++)
  2124. {
  2125. if (coolArray[k] == num4)
  2126. {
  2127. flag7 = true;
  2128. break;
  2129. }
  2130. }
  2131. if (!flag7)
  2132. {
  2133. text = text + "0" + num4.ToString() + ".ogg";
  2134. if (GameUty.FileSystem.IsExistentFile(text))
  2135. {
  2136. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2137. }
  2138. }
  2139. }
  2140. if (maid.status.personal.uniqueName == "Pure")
  2141. {
  2142. string text = "s2_";
  2143. Random random = new Random();
  2144. int num4 = random.Next(10000);
  2145. bool flag7 = false;
  2146. for (int k = 0; k < pureArray.Length; k++)
  2147. {
  2148. if (pureArray[k] == num4)
  2149. {
  2150. flag7 = true;
  2151. break;
  2152. }
  2153. }
  2154. if (!flag7)
  2155. {
  2156. text = text + "0" + num4.ToString() + ".ogg";
  2157. if (GameUty.FileSystem.IsExistentFile(text))
  2158. {
  2159. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2160. }
  2161. }
  2162. }
  2163. if (maid.status.personal.uniqueName == "Yandere")
  2164. {
  2165. string text = "s3_";
  2166. Random random = new Random();
  2167. int num4 = random.Next(10000);
  2168. bool flag7 = false;
  2169. for (int k = 0; k < yanArray.Length; k++)
  2170. {
  2171. if (yanArray[k] == num4)
  2172. {
  2173. flag7 = true;
  2174. break;
  2175. }
  2176. }
  2177. if (!flag7)
  2178. {
  2179. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2180. if (GameUty.FileSystem.IsExistentFile(text))
  2181. {
  2182. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2183. }
  2184. }
  2185. }
  2186. if (maid.status.personal.uniqueName == "Muku")
  2187. {
  2188. string text = "h0_";
  2189. Random random = new Random();
  2190. int num4 = random.Next(10000);
  2191. bool flag7 = false;
  2192. for (int k = 0; k < h0Array.Length; k++)
  2193. {
  2194. if (h0Array[k] == num4)
  2195. {
  2196. flag7 = true;
  2197. break;
  2198. }
  2199. }
  2200. if (flag7)
  2201. {
  2202. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2203. if (GameUty.FileSystem.IsExistentFile(text))
  2204. {
  2205. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2206. }
  2207. }
  2208. }
  2209. if (maid.status.personal.uniqueName == "Majime")
  2210. {
  2211. string text = "h1_";
  2212. Random random = new Random();
  2213. int num4 = random.Next(10000);
  2214. bool flag7 = false;
  2215. for (int k = 0; k < h1Array.Length; k++)
  2216. {
  2217. if (h1Array[k] == num4)
  2218. {
  2219. flag7 = true;
  2220. break;
  2221. }
  2222. }
  2223. if (flag7)
  2224. {
  2225. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2226. if (GameUty.FileSystem.IsExistentFile(text))
  2227. {
  2228. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2229. }
  2230. }
  2231. }
  2232. if (maid.status.personal.uniqueName == "Rindere")
  2233. {
  2234. string text = "h2_";
  2235. Random random = new Random();
  2236. int num4 = random.Next(10000);
  2237. bool flag7 = false;
  2238. for (int k = 0; k < h2Array.Length; k++)
  2239. {
  2240. if (h2Array[k] == num4)
  2241. {
  2242. flag7 = true;
  2243. break;
  2244. }
  2245. }
  2246. if (flag7)
  2247. {
  2248. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2249. if (GameUty.FileSystem.IsExistentFile(text))
  2250. {
  2251. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2252. }
  2253. }
  2254. }
  2255. idoFlg[i] = true;
  2256. if (i >= 7)
  2257. {
  2258. idoFlg[i - 7] = true;
  2259. }
  2260. }
  2261. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2262. {
  2263. delCount[i] = 20;
  2264. if (goSlot[(int)selectList[i]] != null)
  2265. {
  2266. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2267. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2268. {
  2269. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2270. }
  2271. }
  2272. itemIndex[i]++;
  2273. if (itemIndex[i] == itemArray.Length - 1)
  2274. {
  2275. itemIndex[i] = 0;
  2276. }
  2277. string[] array = new string[2];
  2278. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2279. if (itemIndex[i] > 13)
  2280. {
  2281. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2282. }
  2283. maid.DelProp(MPN.handitem, true);
  2284. maid.DelProp(MPN.accvag, true);
  2285. maid.DelProp(MPN.accanl, true);
  2286. bool flag8 = false;
  2287. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2288. {
  2289. flag8 = true;
  2290. }
  2291. if (!flag8)
  2292. {
  2293. maid.DelProp(MPN.kousoku_upper, true);
  2294. maid.DelProp(MPN.kousoku_lower, true);
  2295. }
  2296. if (array[0] != "")
  2297. {
  2298. maid.SetProp(array[0], array[1], 0, true, false);
  2299. }
  2300. if (itemIndex[i] == 13)
  2301. {
  2302. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2303. maid.SetProp(array[0], array[1], 0, true, false);
  2304. }
  2305. if (itemIndex[i] == 23)
  2306. {
  2307. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2308. maid.SetProp(array[0], array[1], 0, true, false);
  2309. cafeFlg[i] = true;
  2310. }
  2311. maid.AllProcPropSeqStart();
  2312. idoFlg[i] = true;
  2313. if (i >= 7)
  2314. {
  2315. idoFlg[i - 7] = true;
  2316. }
  2317. mFlg = true;
  2318. }
  2319. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2320. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2321. {
  2322. for (int k = 0; k < 10; k++)
  2323. {
  2324. maid.transform.RotateAround(maid.transform.position,
  2325. Vector3.right,
  2326. -maid.transform.rotation.eulerAngles.x);
  2327. maid.transform.RotateAround(maid.transform.position,
  2328. Vector3.forward,
  2329. -maid.transform.rotation.eulerAngles.z);
  2330. }
  2331. idoFlg[i] = true;
  2332. atFlg = true;
  2333. if (i >= 7)
  2334. {
  2335. idoFlg[i - 7] = true;
  2336. }
  2337. }
  2338. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2339. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2340. {
  2341. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2342. idoFlg[i] = true;
  2343. if (i >= 7)
  2344. {
  2345. idoFlg[i - 7] = true;
  2346. }
  2347. }
  2348. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2349. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2350. {
  2351. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2352. idoFlg[i] = true;
  2353. if (i >= 7)
  2354. {
  2355. idoFlg[i - 7] = true;
  2356. }
  2357. }
  2358. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2359. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2360. {
  2361. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2362. idoFlg[i] = true;
  2363. if (i >= 7)
  2364. {
  2365. idoFlg[i - 7] = true;
  2366. }
  2367. }
  2368. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2369. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2370. {
  2371. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2372. idoFlg[i] = true;
  2373. if (i >= 7)
  2374. {
  2375. idoFlg[i - 7] = true;
  2376. }
  2377. }
  2378. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2379. {
  2380. Vector3 vector = maid.transform.position;
  2381. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2382. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2383. maid.SetPos(vector);
  2384. idoFlg[i] = true;
  2385. if (i >= 7)
  2386. {
  2387. idoFlg[i - 7] = true;
  2388. }
  2389. }
  2390. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2391. {
  2392. Vector3 vector = maid.transform.position;
  2393. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2394. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2395. maid.SetPos(vector);
  2396. idoFlg[i] = true;
  2397. if (i >= 7)
  2398. {
  2399. idoFlg[i - 7] = true;
  2400. }
  2401. }
  2402. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2403. {
  2404. Vector3 vector = maid.transform.position;
  2405. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2406. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2407. maid.SetPos(vector);
  2408. idoFlg[i] = true;
  2409. if (i >= 7)
  2410. {
  2411. idoFlg[i - 7] = true;
  2412. }
  2413. }
  2414. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2415. {
  2416. Vector3 vector = maid.transform.position;
  2417. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2418. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2419. maid.SetPos(vector);
  2420. idoFlg[i] = true;
  2421. if (i >= 7)
  2422. {
  2423. idoFlg[i - 7] = true;
  2424. }
  2425. }
  2426. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2427. {
  2428. Vector3 vector = maid.transform.position;
  2429. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2430. maid.SetPos(vector);
  2431. idoFlg[i] = true;
  2432. if (i >= 7)
  2433. {
  2434. idoFlg[i - 7] = true;
  2435. }
  2436. }
  2437. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2438. {
  2439. Vector3 vector = maid.transform.position;
  2440. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2441. maid.SetPos(vector);
  2442. idoFlg[i] = true;
  2443. if (i >= 7)
  2444. {
  2445. idoFlg[i - 7] = true;
  2446. }
  2447. }
  2448. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2449. {
  2450. Vector3 vector = maid.transform.position;
  2451. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2452. maid.SetPos(vector);
  2453. idoFlg[i] = true;
  2454. if (i >= 7)
  2455. {
  2456. idoFlg[i - 7] = true;
  2457. }
  2458. }
  2459. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2460. {
  2461. Vector3 vector = maid.transform.position;
  2462. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2463. maid.SetPos(vector);
  2464. idoFlg[i] = true;
  2465. if (i >= 7)
  2466. {
  2467. idoFlg[i - 7] = true;
  2468. }
  2469. }
  2470. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2471. {
  2472. Vector3 vector = maid.transform.position;
  2473. vector.y += 0.0075f * speed;
  2474. maid.SetPos(vector);
  2475. idoFlg[i] = true;
  2476. if (i >= 7)
  2477. {
  2478. idoFlg[i - 7] = true;
  2479. }
  2480. }
  2481. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2482. {
  2483. Vector3 vector = maid.transform.position;
  2484. vector.y -= 0.0075f * speed;
  2485. maid.SetPos(vector);
  2486. idoFlg[i] = true;
  2487. if (i >= 7)
  2488. {
  2489. idoFlg[i - 7] = true;
  2490. }
  2491. }
  2492. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2493. && getModKeyPressing(modKey.Shift))
  2494. {
  2495. faceIndex[i]--;
  2496. if (faceIndex[i] <= -1)
  2497. {
  2498. faceIndex[i] = faceArray.Length - 1;
  2499. }
  2500. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2501. idoFlg[i] = true;
  2502. if (i >= 7)
  2503. {
  2504. idoFlg[i - 7] = true;
  2505. }
  2506. }
  2507. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2508. {
  2509. faceIndex[i]++;
  2510. if (faceIndex[i] == faceArray.Length)
  2511. {
  2512. faceIndex[i] = 0;
  2513. }
  2514. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2515. idoFlg[i] = true;
  2516. if (i >= 7)
  2517. {
  2518. idoFlg[i - 7] = true;
  2519. }
  2520. }
  2521. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2522. {
  2523. faceBlendIndex[i]++;
  2524. if (faceBlendIndex[i] == faceBlendArray.Length)
  2525. {
  2526. faceBlendIndex[i] = 0;
  2527. }
  2528. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2529. idoFlg[i] = true;
  2530. if (i >= 7)
  2531. {
  2532. idoFlg[i - 7] = true;
  2533. }
  2534. }
  2535. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2536. {
  2537. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2538. isStop[i] = false;
  2539. poseCount[i] = 20;
  2540. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2541. {
  2542. maid.body0.MuneYureL(0f);
  2543. maid.body0.MuneYureR(0f);
  2544. }
  2545. else
  2546. {
  2547. maid.body0.MuneYureL(1f);
  2548. maid.body0.MuneYureR(1f);
  2549. maid.body0.jbMuneL.enabled = true;
  2550. maid.body0.jbMuneR.enabled = true;
  2551. }
  2552. if (array[0].Contains("MultipleMaidsPose"))
  2553. {
  2554. string path = array[0].Split(new char[] { '/' })[1];
  2555. byte[] array2 = new byte[0];
  2556. try
  2557. {
  2558. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2559. {
  2560. array2 = new byte[fileStream.Length];
  2561. fileStream.Read(array2, 0, array2.Length);
  2562. }
  2563. }
  2564. catch { }
  2565. if (0 < array2.Length)
  2566. {
  2567. string text = Path.GetFileName(path);
  2568. long num5 = text.GetHashCode();
  2569. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2570. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2571. {
  2572. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2573. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2574. };
  2575. for (int m = 0; m < array3.Length; m++)
  2576. {
  2577. maid.SetAutoTwist(array3[m], true);
  2578. }
  2579. }
  2580. }
  2581. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2582. {
  2583. loadPose[i] = array[0];
  2584. }
  2585. else if (!array[0].StartsWith("dance_"))
  2586. {
  2587. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2588. }
  2589. else
  2590. {
  2591. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2592. {
  2593. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2594. GameUty.FileSystem,
  2595. array[0] + ".anm",
  2596. false,
  2597. false);
  2598. }
  2599. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2600. }
  2601. if (array.Length > 1)
  2602. {
  2603. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2604. isStop[i] = true;
  2605. if (array.Length > 2)
  2606. {
  2607. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2608. isPoseIti[i] = true;
  2609. poseIti[i] = maidArray[i].transform.position;
  2610. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2611. }
  2612. }
  2613. isLock[i] = false;
  2614. idoFlg[i] = true;
  2615. mHandL[i].initFlg = false;
  2616. mHandR[i].initFlg = false;
  2617. mFootL[i].initFlg = false;
  2618. mFootR[i].initFlg = false;
  2619. pHandL[i] = 0;
  2620. pHandR[i] = 0;
  2621. muneIKL[i] = false;
  2622. muneIKR[i] = false;
  2623. if (!isVR)
  2624. {
  2625. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2626. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2627. }
  2628. if (i >= 7)
  2629. {
  2630. idoFlg[i - 7] = true;
  2631. }
  2632. }
  2633. else if (maid.body0.isLoadedBody)
  2634. {
  2635. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2636. {
  2637. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2638. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2639. }
  2640. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2641. {
  2642. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2643. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2644. }
  2645. if (!HandL1[i])
  2646. {
  2647. SetIKInit(i);
  2648. SetIK(maid, i);
  2649. ikBui = 5;
  2650. }
  2651. else
  2652. {
  2653. bool flag5 = false;
  2654. for (int k = 0; k < keyArray.Length; k++)
  2655. {
  2656. if (Input.GetKey(keyArray[k]))
  2657. {
  2658. flag5 = true;
  2659. break;
  2660. }
  2661. }
  2662. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2663. || Input.GetKey(KeyCode.Y))
  2664. {
  2665. flag5 = true;
  2666. }
  2667. if (!flag5)
  2668. {
  2669. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2670. && getModKeyPressing(modKey.Shift))
  2671. {
  2672. ikMode[i] = 15;
  2673. }
  2674. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2675. {
  2676. ikMode[i] = 5;
  2677. }
  2678. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2679. {
  2680. ikMode[i] = 6;
  2681. }
  2682. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2683. {
  2684. ikMode[i] = 7;
  2685. }
  2686. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2687. {
  2688. ikMode[i] = 11;
  2689. }
  2690. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2691. {
  2692. ikMode[i] = 12;
  2693. }
  2694. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2695. {
  2696. ikMode[i] = 14;
  2697. }
  2698. else if (getModKeyPressing(modKey.Shift))
  2699. {
  2700. ikMode[i] = 1;
  2701. }
  2702. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2703. {
  2704. ikMode[i] = 8;
  2705. }
  2706. else if (getModKeyPressing(modKey.Ctrl))
  2707. {
  2708. ikMode[i] = 2;
  2709. }
  2710. else if (getModKeyPressing(modKey.Alt))
  2711. {
  2712. ikMode[i] = 3;
  2713. }
  2714. else if (Input.GetKey(KeyCode.Space))
  2715. {
  2716. ikMode[i] = 4;
  2717. }
  2718. else if (Input.GetKey(KeyCode.X))
  2719. {
  2720. ikMode[i] = 9;
  2721. }
  2722. else if (Input.GetKey(KeyCode.Z))
  2723. {
  2724. ikMode[i] = 10;
  2725. }
  2726. else if (Input.GetKey(KeyCode.C))
  2727. {
  2728. ikMode[i] = 13;
  2729. }
  2730. else if (Input.GetKey(KeyCode.A))
  2731. {
  2732. ikMode[i] = 16;
  2733. }
  2734. else
  2735. {
  2736. ikMode[i] = 0;
  2737. }
  2738. if (!isIK[i])
  2739. {
  2740. if (ikMode[i] < 9)
  2741. {
  2742. ikMode[i] = 0;
  2743. }
  2744. }
  2745. bool flag9 = false;
  2746. bool flag10 = false;
  2747. bool flag11 = false;
  2748. bool flag12 = false;
  2749. if (gFinger[i, 0])
  2750. {
  2751. for (int j = 0; j < 15; j++)
  2752. {
  2753. if (mFinger[i, j].isStop)
  2754. {
  2755. flag9 = true;
  2756. }
  2757. }
  2758. for (int j = 15; j < 30; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag10 = true;
  2763. }
  2764. }
  2765. for (int j = 0; j < 6; j++)
  2766. {
  2767. if (mFinger2[i, j].isStop)
  2768. {
  2769. flag11 = true;
  2770. }
  2771. }
  2772. for (int j = 6; j < 12; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag12 = true;
  2777. }
  2778. }
  2779. }
  2780. if (gMaid[i] != null)
  2781. {
  2782. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2783. {
  2784. gMaid[i].SetActive(true);
  2785. if (isCube)
  2786. {
  2787. gMaidC[i].SetActive(true);
  2788. }
  2789. }
  2790. else
  2791. {
  2792. gMaid[i].SetActive(false);
  2793. gMaidC[i].SetActive(false);
  2794. }
  2795. }
  2796. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2797. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2798. {
  2799. ikBui = 1;
  2800. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2801. {
  2802. ikMaid = i;
  2803. }
  2804. if (ikMaid == i)
  2805. {
  2806. SetIK(maid, i);
  2807. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2808. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2809. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2810. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2811. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2812. }
  2813. if (Input.GetKeyDown(KeyCode.Q))
  2814. {
  2815. qFlg = true;
  2816. }
  2817. }
  2818. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2819. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2820. {
  2821. ikBui = 2;
  2822. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2823. {
  2824. ikMaid = i;
  2825. }
  2826. if (ikMaid == i)
  2827. {
  2828. SetIK(maid, i);
  2829. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2830. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2831. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2832. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2833. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2834. }
  2835. if (Input.GetKeyDown(KeyCode.W))
  2836. {
  2837. wFlg = true;
  2838. }
  2839. }
  2840. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2841. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2842. {
  2843. ikBui = 3;
  2844. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2845. {
  2846. ikMaid = i;
  2847. }
  2848. if (ikMaid == i)
  2849. {
  2850. SetIK(maid, i);
  2851. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2852. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2853. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2854. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2855. }
  2856. }
  2857. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2858. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2859. {
  2860. ikBui = 4;
  2861. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2862. {
  2863. ikMaid = i;
  2864. }
  2865. if (ikMaid == i)
  2866. {
  2867. SetIK(maid, i);
  2868. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2869. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2870. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2871. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2872. }
  2873. if (Input.GetKeyDown(KeyCode.S))
  2874. {
  2875. sFlg = true;
  2876. }
  2877. }
  2878. mHandR[i].isSelect = false;
  2879. mArmR[i].isSelect = false;
  2880. mHandL[i].isSelect = false;
  2881. mArmL[i].isSelect = false;
  2882. mFootR[i].isSelect = false;
  2883. mHizaR[i].isSelect = false;
  2884. mFootL[i].isSelect = false;
  2885. mHizaL[i].isSelect = false;
  2886. mClavicleL[i].isSelect = false;
  2887. mClavicleR[i].isSelect = false;
  2888. if (ikMode[i] == 16)
  2889. {
  2890. if (!gHead2[i])
  2891. {
  2892. SetIKInit6(i);
  2893. }
  2894. if (mHead2[i].isClick)
  2895. {
  2896. mHead2[i].isClick = false;
  2897. bGui = true;
  2898. isFaceInit = true;
  2899. // isGuiInit = true;
  2900. faceFlg = true;
  2901. poseFlg = false;
  2902. sceneFlg = false;
  2903. kankyoFlg = false;
  2904. kankyo2Flg = false;
  2905. maid.boMabataki = false;
  2906. selectMaidIndex = mHead2[i].no;
  2907. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2908. }
  2909. if (mMaid2[i].isClick)
  2910. {
  2911. mMaid2[i].isClick = false;
  2912. bGui = true;
  2913. isPoseInit = true;
  2914. // isGuiInit = true;
  2915. poseFlg = true;
  2916. faceFlg = false;
  2917. sceneFlg = false;
  2918. kankyoFlg = false;
  2919. kankyo2Flg = false;
  2920. selectMaidIndex = mMaid2[i].no;
  2921. copyIndex = 0;
  2922. }
  2923. gHead2[i].transform.position =
  2924. new Vector3(Head2[i].position.x,
  2925. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2926. Head2[i].position.z);
  2927. gHead2[i].transform.eulerAngles =
  2928. new Vector3(Head2[i].transform.eulerAngles.x,
  2929. Head2[i].transform.eulerAngles.y,
  2930. Head2[i].transform.eulerAngles.z + 90f);
  2931. mHead2[i].no = i;
  2932. mHead2[i].maid = maid;
  2933. mHead2[i].ido = 1;
  2934. gMaid2[i].transform.position =
  2935. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2936. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2937. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2938. gMaid2[i].transform.eulerAngles =
  2939. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2940. Spine0a2[i].transform.eulerAngles.y,
  2941. Spine0a2[i].transform.eulerAngles.z + 90f);
  2942. mMaid2[i].no = i;
  2943. mMaid2[i].maid = maid;
  2944. mMaid2[i].ido = 2;
  2945. gArmL[i].SetActive(false);
  2946. gFootL[i].SetActive(false);
  2947. gHizaL[i].SetActive(false);
  2948. gHandR[i].SetActive(false);
  2949. gArmR[i].SetActive(false);
  2950. gFootR[i].SetActive(false);
  2951. gHizaR[i].SetActive(false);
  2952. gClavicleL[i].SetActive(false);
  2953. gClavicleR[i].SetActive(false);
  2954. gNeck[i].SetActive(false);
  2955. gSpine[i].SetActive(false);
  2956. gSpine0a[i].SetActive(false);
  2957. gSpine1a[i].SetActive(false);
  2958. gSpine1[i].SetActive(false);
  2959. gPelvis[i].SetActive(false);
  2960. }
  2961. else if (ikMode[i] == 8)
  2962. {
  2963. if (ikModeOld[i] == 15 && gIKHandL[i])
  2964. {
  2965. mIKHandL[i].ido = 1;
  2966. mIKHandL[i].reset = true;
  2967. mIKHandR[i].ido = 1;
  2968. mIKHandR[i].reset = true;
  2969. }
  2970. else if (ikModeOld[i] == 3 && gHead[i])
  2971. {
  2972. mHead[i].ido = 7;
  2973. mHead[i].reset = true;
  2974. }
  2975. else
  2976. {
  2977. if (!gIKHandL[i])
  2978. {
  2979. SetIKInit5(i);
  2980. }
  2981. gIKHandL[i].transform.position = IKHandL[i].position;
  2982. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2983. mIKHandL[i].maid = maid;
  2984. mIKHandL[i].HandL = IKHandL[i];
  2985. mIKHandL[i].ido = 1;
  2986. gIKHandR[i].transform.position = IKHandR[i].position;
  2987. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2988. mIKHandR[i].maid = maid;
  2989. mIKHandR[i].HandL = IKHandR[i];
  2990. mIKHandR[i].ido = 1;
  2991. if (!gIKMuneL[i])
  2992. {
  2993. SetIKInit7(i);
  2994. }
  2995. if (!gHead[i])
  2996. {
  2997. SetIKInit4(i);
  2998. }
  2999. mIKMuneL[i].maid = maid;
  3000. mIKMuneL[i].HandL = IKMuneLSub[i];
  3001. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3002. mIKMuneL[i].ForearmL = IKMuneL[i];
  3003. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3004. mIKMuneR[i].maid = maid;
  3005. mIKMuneR[i].HandL = IKMuneRSub[i];
  3006. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3007. mIKMuneR[i].ForearmL = IKMuneR[i];
  3008. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3009. gHead[i].transform.position =
  3010. new Vector3(Head2[i].position.x,
  3011. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3012. Head2[i].position.z);
  3013. gHead[i].transform.eulerAngles =
  3014. new Vector3(Head2[i].transform.eulerAngles.x,
  3015. Head2[i].transform.eulerAngles.y,
  3016. Head2[i].transform.eulerAngles.z + 90f);
  3017. mHead[i].head = Head1[i];
  3018. mHead[i].maid = maid;
  3019. mHead[i].ido = 7;
  3020. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3021. gHead[i].SetActive(true);
  3022. if (mHead[i].isClick)
  3023. {
  3024. mHead[i].isClick = false;
  3025. mHead[i].isClick2 = false;
  3026. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3027. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3028. }
  3029. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3030. {
  3031. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3032. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3033. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3034. IKMuneLSub[i].localEulerAngles.y,
  3035. IKMuneLSub[i].localEulerAngles.z);
  3036. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3037. IKMuneL[i].localEulerAngles.y,
  3038. IKMuneL[i].localEulerAngles.z);
  3039. muneIKL[i] = true;
  3040. isStop[i] = true;
  3041. isLock[i] = true;
  3042. mIKMuneL[i].isMouseDrag = false;
  3043. }
  3044. if (mIKMuneL[i].isMouseDown)
  3045. {
  3046. maid.body0.MuneYureL(0f);
  3047. maid.body0.MuneYureR(0f);
  3048. maid.body0.jbMuneL.enabled = false;
  3049. maid.body0.jbMuneR.enabled = false;
  3050. muneIKL[i] = false;
  3051. mIKMuneL[i].isMouseUp = false;
  3052. }
  3053. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3054. {
  3055. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3056. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3057. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3058. IKMuneRSub[i].localEulerAngles.y,
  3059. IKMuneRSub[i].localEulerAngles.z);
  3060. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3061. IKMuneR[i].localEulerAngles.y,
  3062. IKMuneR[i].localEulerAngles.z);
  3063. muneIKR[i] = true;
  3064. isStop[i] = true;
  3065. isLock[i] = true;
  3066. mIKMuneR[i].isMouseDrag = false;
  3067. }
  3068. if (mIKMuneR[i].isMouseDown)
  3069. {
  3070. maid.body0.MuneYureL(0f);
  3071. maid.body0.MuneYureR(0f);
  3072. maid.body0.jbMuneL.enabled = false;
  3073. maid.body0.jbMuneR.enabled = false;
  3074. muneIKR[i] = false;
  3075. mIKMuneL[i].isMouseUp = false;
  3076. }
  3077. if (mHead[i].isStop)
  3078. {
  3079. isStop[i] = true;
  3080. isLock[i] = true;
  3081. mHead[i].isStop = false;
  3082. }
  3083. gJotai[i].SetActive(false);
  3084. gKahuku[i].SetActive(false);
  3085. gHandL[i].SetActive(false);
  3086. gArmL[i].SetActive(false);
  3087. gFootL[i].SetActive(false);
  3088. gHizaL[i].SetActive(false);
  3089. gHandR[i].SetActive(false);
  3090. gArmR[i].SetActive(false);
  3091. gFootR[i].SetActive(false);
  3092. gHizaR[i].SetActive(false);
  3093. gClavicleL[i].SetActive(false);
  3094. gClavicleR[i].SetActive(false);
  3095. gNeck[i].SetActive(false);
  3096. gSpine[i].SetActive(false);
  3097. gSpine0a[i].SetActive(false);
  3098. gSpine1a[i].SetActive(false);
  3099. gSpine1[i].SetActive(false);
  3100. gPelvis[i].SetActive(false);
  3101. }
  3102. }
  3103. else if (ikMode[i] == 15)
  3104. {
  3105. if (ikModeOld[i] == 8 && gIKHandL[i])
  3106. {
  3107. mIKHandL[i].ido = 2;
  3108. mIKHandL[i].reset = true;
  3109. mIKHandR[i].ido = 2;
  3110. mIKHandR[i].reset = true;
  3111. }
  3112. else
  3113. {
  3114. if (!gIKHandL[i])
  3115. {
  3116. SetIKInit5(i);
  3117. }
  3118. gIKHandL[i].transform.position = IKHandL[i].position;
  3119. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3120. mIKHandL[i].maid = maid;
  3121. mIKHandL[i].HandL = IKHandL[i];
  3122. mIKHandL[i].ido = 2;
  3123. gIKHandR[i].transform.position = IKHandR[i].position;
  3124. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3125. mIKHandR[i].maid = maid;
  3126. mIKHandR[i].HandL = IKHandR[i];
  3127. mIKHandR[i].ido = 2;
  3128. Destroy(gHead[i]);
  3129. Destroy(gJotai[i]);
  3130. Destroy(gKahuku[i]);
  3131. gHandL[i].SetActive(false);
  3132. gArmL[i].SetActive(false);
  3133. gFootL[i].SetActive(false);
  3134. gHizaL[i].SetActive(false);
  3135. gHandR[i].SetActive(false);
  3136. gArmR[i].SetActive(false);
  3137. gFootR[i].SetActive(false);
  3138. gHizaR[i].SetActive(false);
  3139. gClavicleL[i].SetActive(false);
  3140. gClavicleR[i].SetActive(false);
  3141. gNeck[i].SetActive(false);
  3142. gSpine[i].SetActive(false);
  3143. gSpine0a[i].SetActive(false);
  3144. gSpine1a[i].SetActive(false);
  3145. gSpine1[i].SetActive(false);
  3146. gPelvis[i].SetActive(false);
  3147. }
  3148. }
  3149. else if (ikMode[i] == 1)
  3150. {
  3151. mHandL[i].ido = 10;
  3152. mHandR[i].ido = 10;
  3153. mFootL[i].ido = 10;
  3154. mFootR[i].ido = 10;
  3155. if (ikModeOld[i] == 0 && gNeck[i])
  3156. {
  3157. if (isBone[i])
  3158. {
  3159. mNeck[i].ido = 4;
  3160. mNeck[i].reset = true;
  3161. mSpine[i].ido = 4;
  3162. mSpine[i].reset = true;
  3163. mSpine0a[i].ido = 4;
  3164. mSpine0a[i].reset = true;
  3165. mSpine1a[i].ido = 4;
  3166. mSpine1a[i].reset = true;
  3167. mSpine1[i].ido = 4;
  3168. mSpine1[i].reset = true;
  3169. mPelvis[i].ido = 4;
  3170. mPelvis[i].reset = true;
  3171. mHizaL[i].ido = 5;
  3172. mHizaL[i].reset = true;
  3173. mHizaR[i].ido = 5;
  3174. mHizaR[i].reset = true;
  3175. }
  3176. }
  3177. else
  3178. {
  3179. gArmL[i].SetActive(false);
  3180. gArmR[i].SetActive(false);
  3181. if (!isBone[i])
  3182. {
  3183. gHizaL[i].SetActive(false);
  3184. gHizaR[i].SetActive(false);
  3185. }
  3186. gClavicleL[i].SetActive(false);
  3187. gClavicleR[i].SetActive(false);
  3188. if (isBone[i])
  3189. {
  3190. mNeck[i].maid = maid;
  3191. mNeck[i].head = Neck[i];
  3192. mNeck[i].no = i;
  3193. mNeck[i].ido = 4;
  3194. gNeck[i].transform.position = Neck[i].position;
  3195. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3196. if (mNeck[i].isHead)
  3197. {
  3198. mNeck[i].isHead = false;
  3199. isLookn[i] = isLook[i];
  3200. isLook[i] = !isLook[i];
  3201. }
  3202. mSpine[i].maid = maid;
  3203. mSpine[i].head = Spine2[i];
  3204. mSpine[i].no = i;
  3205. mSpine[i].ido = 4;
  3206. gSpine[i].transform.position = Spine2[i].position;
  3207. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3208. mSpine0a[i].maid = maid;
  3209. mSpine0a[i].head = Spine0a2[i];
  3210. mSpine0a[i].no = i;
  3211. mSpine0a[i].ido = 4;
  3212. gSpine0a[i].transform.position = Spine0a2[i].position;
  3213. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3214. mSpine1a[i].maid = maid;
  3215. mSpine1a[i].head = Spine1a2[i];
  3216. mSpine1a[i].no = i;
  3217. mSpine1a[i].ido = 4;
  3218. gSpine1a[i].transform.position = Spine1a2[i].position;
  3219. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3220. mSpine1[i].maid = maid;
  3221. mSpine1[i].head = Spine12[i];
  3222. mSpine1[i].no = i;
  3223. mSpine1[i].ido = 4;
  3224. gSpine1[i].transform.position = Spine12[i].position;
  3225. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3226. mPelvis[i].maid = maid;
  3227. mPelvis[i].head = Pelvis2[i];
  3228. mPelvis[i].no = i;
  3229. mPelvis[i].ido = 8;
  3230. gPelvis[i].transform.position = Pelvis2[i].position;
  3231. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3232. mHizaL[i].ido = 5;
  3233. mHizaR[i].ido = 5;
  3234. }
  3235. }
  3236. }
  3237. else if (ikMode[i] == 2)
  3238. {
  3239. if (ikModeOld[i] == 0 && gPelvis[i])
  3240. {
  3241. mPelvis[i].ido = 9;
  3242. mPelvis[i].reset = true;
  3243. }
  3244. else
  3245. {
  3246. gArmL[i].SetActive(false);
  3247. gHizaL[i].SetActive(false);
  3248. gArmR[i].SetActive(false);
  3249. gHizaR[i].SetActive(false);
  3250. gClavicleL[i].SetActive(false);
  3251. gClavicleR[i].SetActive(false);
  3252. gNeck[i].SetActive(false);
  3253. gSpine[i].SetActive(false);
  3254. gSpine0a[i].SetActive(false);
  3255. gSpine1a[i].SetActive(false);
  3256. gSpine1[i].SetActive(false);
  3257. mPelvis[i].maid = maid;
  3258. mPelvis[i].head = Pelvis2[i];
  3259. mPelvis[i].no = i;
  3260. mPelvis[i].ido = 9;
  3261. gPelvis[i].transform.position = Pelvis2[i].position;
  3262. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3263. }
  3264. }
  3265. else if (ikMode[i] == 3)
  3266. {
  3267. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3268. {
  3269. mHead[i].ido = 1;
  3270. mHead[i].reset = true;
  3271. mJotai[i].ido = 2;
  3272. mJotai[i].reset = true;
  3273. mKahuku[i].ido = 3;
  3274. mKahuku[i].reset = true;
  3275. mHandL[i].ido = 1;
  3276. mHandR[i].ido = 1;
  3277. mFootL[i].ido = 3;
  3278. mFootR[i].ido = 3;
  3279. mHizaL[i].ido = 5;
  3280. mHizaR[i].ido = 5;
  3281. mHandL[i].reset = true;
  3282. mHandR[i].reset = true;
  3283. mFootL[i].reset = true;
  3284. mFootR[i].reset = true;
  3285. mHizaL[i].reset = true;
  3286. mHizaR[i].reset = true;
  3287. }
  3288. else if (ikModeOld[i] == 0)
  3289. {
  3290. mHandL[i].ido = 1;
  3291. mHandR[i].ido = 1;
  3292. mFootL[i].ido = 3;
  3293. mFootR[i].ido = 3;
  3294. mHizaL[i].ido = 5;
  3295. mHizaR[i].ido = 5;
  3296. mHandL[i].reset = true;
  3297. mHandR[i].reset = true;
  3298. mFootL[i].reset = true;
  3299. mFootR[i].reset = true;
  3300. mHizaL[i].reset = true;
  3301. mHizaR[i].reset = true;
  3302. }
  3303. else
  3304. {
  3305. if (!gHead[i])
  3306. {
  3307. SetIKInit4(i);
  3308. }
  3309. if (mHead[i].isHead)
  3310. {
  3311. mHead[i].isHead = false;
  3312. isLookn[i] = isLook[i];
  3313. isLook[i] = !isLook[i];
  3314. }
  3315. gHead[i].transform.position =
  3316. new Vector3(Head2[i].position.x,
  3317. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3318. Head2[i].position.z);
  3319. gHead[i].transform.eulerAngles =
  3320. new Vector3(Head2[i].transform.eulerAngles.x,
  3321. Head2[i].transform.eulerAngles.y,
  3322. Head2[i].transform.eulerAngles.z + 90f);
  3323. mHead[i].head = Head1[i];
  3324. mHead[i].maid = maid;
  3325. mHead[i].no = i;
  3326. mHead[i].ido = 1;
  3327. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3328. Transform transform3 =
  3329. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3330. Transform transform4 =
  3331. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3332. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3333. Transform transform6 =
  3334. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3335. gJotai[i].transform.position =
  3336. new Vector3(transform3.position.x,
  3337. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3338. transform3.position.z);
  3339. gJotai[i].transform.eulerAngles =
  3340. new Vector3(transform3.transform.eulerAngles.x,
  3341. transform3.transform.eulerAngles.y,
  3342. transform3.transform.eulerAngles.z + 90f);
  3343. mJotai[i].Spine0a = spine0a;
  3344. mJotai[i].Spine1 = transform3;
  3345. mJotai[i].Spine1a = transform4;
  3346. mJotai[i].Spine = transform5;
  3347. mJotai[i].maid = maid;
  3348. mJotai[i].ido = 2;
  3349. gKahuku[i].transform.position =
  3350. new Vector3(transform6.position.x,
  3351. (transform6.position.y + transform5.position.y) / 2f,
  3352. transform6.position.z);
  3353. gKahuku[i].transform.eulerAngles =
  3354. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3355. transform6.transform.eulerAngles.y + 90f,
  3356. transform6.transform.eulerAngles.z);
  3357. mKahuku[i].Pelvis = transform6;
  3358. mKahuku[i].maid = maid;
  3359. mKahuku[i].ido = 3;
  3360. mHandL[i].ido = 1;
  3361. mHandR[i].ido = 1;
  3362. mFootL[i].ido = 3;
  3363. mFootR[i].ido = 3;
  3364. mHizaL[i].ido = 5;
  3365. mHizaR[i].ido = 5;
  3366. gJotai[i].SetActive(true);
  3367. gKahuku[i].SetActive(true);
  3368. gHandL[i].SetActive(true);
  3369. gArmL[i].SetActive(false);
  3370. gFootL[i].SetActive(true);
  3371. gHizaL[i].SetActive(true);
  3372. gHandR[i].SetActive(true);
  3373. gArmR[i].SetActive(false);
  3374. gFootR[i].SetActive(true);
  3375. gHizaR[i].SetActive(true);
  3376. Destroy(gIKHandL[i]);
  3377. Destroy(gIKHandR[i]);
  3378. Destroy(gIKMuneL[i]);
  3379. Destroy(gIKMuneR[i]);
  3380. if (isBone[i])
  3381. {
  3382. gHizaL[i].SetActive(false);
  3383. gHizaR[i].SetActive(false);
  3384. gHead[i].SetActive(false);
  3385. gJotai[i].SetActive(false);
  3386. gKahuku[i].SetActive(false);
  3387. }
  3388. else
  3389. {
  3390. gHizaL[i].SetActive(true);
  3391. gHizaR[i].SetActive(true);
  3392. gHead[i].SetActive(true);
  3393. gJotai[i].SetActive(true);
  3394. gKahuku[i].SetActive(true);
  3395. }
  3396. gClavicleL[i].SetActive(false);
  3397. gClavicleR[i].SetActive(false);
  3398. gNeck[i].SetActive(false);
  3399. gSpine[i].SetActive(false);
  3400. gSpine0a[i].SetActive(false);
  3401. gSpine1a[i].SetActive(false);
  3402. gSpine1[i].SetActive(false);
  3403. gPelvis[i].SetActive(false);
  3404. if (mHead[i].isStop)
  3405. {
  3406. isStop[i] = true;
  3407. isLock[i] = true;
  3408. mHead[i].isStop = false;
  3409. }
  3410. if (mJotai[i].isStop)
  3411. {
  3412. isStop[i] = true;
  3413. isLock[i] = true;
  3414. mJotai[i].isStop = false;
  3415. }
  3416. if (mKahuku[i].isStop)
  3417. {
  3418. isStop[i] = true;
  3419. isLock[i] = true;
  3420. mKahuku[i].isStop = false;
  3421. }
  3422. if (mKahuku[i].isSelect)
  3423. {
  3424. mKahuku[i].isSelect = false;
  3425. if (ikMaid != i)
  3426. {
  3427. ikMaid = i;
  3428. ikBui = 5;
  3429. SetIK(maid, i);
  3430. }
  3431. }
  3432. if (mJotai[i].isSelect)
  3433. {
  3434. mJotai[i].isSelect = false;
  3435. if (ikMaid != i)
  3436. {
  3437. ikMaid = i;
  3438. ikBui = 5;
  3439. SetIK(maid, i);
  3440. }
  3441. }
  3442. if (mKahuku[i].isSelect)
  3443. {
  3444. mKahuku[i].isSelect = false;
  3445. if (ikMaid != i)
  3446. {
  3447. ikMaid = i;
  3448. ikBui = 5;
  3449. SetIK(maid, i);
  3450. }
  3451. }
  3452. }
  3453. }
  3454. else if (ikMode[i] == 5)
  3455. {
  3456. if (ikModeOld[i] == 3 && gHead[i])
  3457. {
  3458. mHead[i].ido = 4;
  3459. mHead[i].reset = true;
  3460. mJotai[i].ido = 5;
  3461. mJotai[i].reset = true;
  3462. mKahuku[i].ido = 6;
  3463. mKahuku[i].reset = true;
  3464. mHandL[i].ido = 2;
  3465. mHandR[i].ido = 2;
  3466. mFootL[i].ido = 4;
  3467. mFootR[i].ido = 4;
  3468. mHizaL[i].ido = 5;
  3469. mHizaR[i].ido = 5;
  3470. mHandL[i].reset = true;
  3471. mHandR[i].reset = true;
  3472. mFootL[i].reset = true;
  3473. mFootR[i].reset = true;
  3474. mHizaL[i].reset = true;
  3475. mHizaR[i].reset = true;
  3476. }
  3477. else if (ikModeOld[i] == 0)
  3478. {
  3479. mHandL[i].ido = 2;
  3480. mHandR[i].ido = 2;
  3481. mFootL[i].ido = 4;
  3482. mFootR[i].ido = 4;
  3483. mHizaL[i].ido = 5;
  3484. mHizaR[i].ido = 5;
  3485. mHandL[i].reset = true;
  3486. mHandR[i].reset = true;
  3487. mFootL[i].reset = true;
  3488. mFootR[i].reset = true;
  3489. mHizaL[i].reset = true;
  3490. mHizaR[i].reset = true;
  3491. }
  3492. else
  3493. {
  3494. if (!gHead[i])
  3495. {
  3496. SetIKInit4(i);
  3497. }
  3498. if (mHead[i].isHead)
  3499. {
  3500. mHead[i].isHead = false;
  3501. isLookn[i] = isLook[i];
  3502. isLook[i] = !isLook[i];
  3503. }
  3504. gHead[i].transform.position =
  3505. new Vector3(Head2[i].position.x,
  3506. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3507. Head2[i].position.z);
  3508. gHead[i].transform.eulerAngles =
  3509. new Vector3(Head2[i].transform.eulerAngles.x,
  3510. Head2[i].transform.eulerAngles.y,
  3511. Head2[i].transform.eulerAngles.z + 90f);
  3512. mHead[i].head = Head1[i];
  3513. mHead[i].maid = maid;
  3514. mHead[i].ido = 4;
  3515. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3516. Transform transform3 =
  3517. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3518. Transform transform4 =
  3519. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3520. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3521. Transform transform6 =
  3522. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3523. gJotai[i].transform.position =
  3524. new Vector3(transform3.position.x,
  3525. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3526. transform3.position.z);
  3527. gJotai[i].transform.eulerAngles =
  3528. new Vector3(transform3.transform.eulerAngles.x,
  3529. transform3.transform.eulerAngles.y,
  3530. transform3.transform.eulerAngles.z + 90f);
  3531. mJotai[i].Spine0a = spine0a;
  3532. mJotai[i].Spine1 = transform3;
  3533. mJotai[i].Spine1a = transform4;
  3534. mJotai[i].Spine = transform5;
  3535. mJotai[i].maid = maid;
  3536. mJotai[i].ido = 5;
  3537. gKahuku[i].transform.position =
  3538. new Vector3(transform6.position.x,
  3539. (transform6.position.y + transform5.position.y) / 2f,
  3540. transform6.position.z);
  3541. gKahuku[i].transform.eulerAngles =
  3542. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3543. transform6.transform.eulerAngles.y + 90f,
  3544. transform6.transform.eulerAngles.z);
  3545. mKahuku[i].Pelvis = transform6;
  3546. mKahuku[i].maid = maid;
  3547. mKahuku[i].ido = 6;
  3548. mHandL[i].ido = 2;
  3549. mHandR[i].ido = 2;
  3550. mFootL[i].ido = 4;
  3551. mFootR[i].ido = 4;
  3552. mHizaL[i].ido = 5;
  3553. mHizaR[i].ido = 5;
  3554. gArmL[i].SetActive(false);
  3555. gArmR[i].SetActive(false);
  3556. gClavicleL[i].SetActive(false);
  3557. gClavicleR[i].SetActive(false);
  3558. gNeck[i].SetActive(false);
  3559. gSpine[i].SetActive(false);
  3560. gSpine0a[i].SetActive(false);
  3561. gSpine1a[i].SetActive(false);
  3562. gSpine1[i].SetActive(false);
  3563. gPelvis[i].SetActive(false);
  3564. if (isBone[i])
  3565. {
  3566. gHizaL[i].SetActive(false);
  3567. gHizaR[i].SetActive(false);
  3568. gHead[i].SetActive(false);
  3569. gJotai[i].SetActive(false);
  3570. gKahuku[i].SetActive(false);
  3571. }
  3572. else
  3573. {
  3574. gHizaL[i].SetActive(true);
  3575. gHizaR[i].SetActive(true);
  3576. gHead[i].SetActive(true);
  3577. gJotai[i].SetActive(true);
  3578. gKahuku[i].SetActive(true);
  3579. }
  3580. if (mHead[i].isStop)
  3581. {
  3582. isStop[i] = true;
  3583. isLock[i] = true;
  3584. mHead[i].isStop = false;
  3585. }
  3586. if (mJotai[i].isStop)
  3587. {
  3588. isStop[i] = true;
  3589. isLock[i] = true;
  3590. mJotai[i].isStop = false;
  3591. }
  3592. if (mKahuku[i].isStop)
  3593. {
  3594. isStop[i] = true;
  3595. isLock[i] = true;
  3596. mKahuku[i].isStop = false;
  3597. }
  3598. if (mHead[i].isSelect)
  3599. {
  3600. mHead[i].isSelect = false;
  3601. if (ikMaid != i)
  3602. {
  3603. ikMaid = i;
  3604. ikBui = 5;
  3605. SetIK(maid, i);
  3606. }
  3607. }
  3608. if (mJotai[i].isSelect)
  3609. {
  3610. mJotai[i].isSelect = false;
  3611. if (ikMaid != i)
  3612. {
  3613. ikMaid = i;
  3614. ikBui = 5;
  3615. SetIK(maid, i);
  3616. }
  3617. }
  3618. if (mKahuku[i].isSelect)
  3619. {
  3620. mKahuku[i].isSelect = false;
  3621. if (ikMaid != i)
  3622. {
  3623. ikMaid = i;
  3624. ikBui = 5;
  3625. SetIK(maid, i);
  3626. }
  3627. }
  3628. }
  3629. }
  3630. else if (ikMode[i] == 13)
  3631. {
  3632. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3633. {
  3634. mMaid[i].ido = 5;
  3635. mMaid[i].reset = true;
  3636. mMaidC[i].ido = 5;
  3637. mMaidC[i].reset = true;
  3638. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3639. }
  3640. else
  3641. {
  3642. if (!gMaid[i])
  3643. {
  3644. SetIKInit3(i);
  3645. }
  3646. gMaid[i].transform.position =
  3647. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3648. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3649. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3650. gMaid[i].transform.eulerAngles =
  3651. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3652. Spine0a2[i].transform.eulerAngles.y,
  3653. Spine0a2[i].transform.eulerAngles.z + 90f);
  3654. mMaid[i].maid = maid;
  3655. mMaid[i].ido = 5;
  3656. gMaidC[i].transform.position = maid.transform.position;
  3657. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3658. mMaidC[i].maid = maid;
  3659. mMaidC[i].ido = 5;
  3660. if (isCube)
  3661. {
  3662. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3663. gMaidC[i].SetActive(true);
  3664. }
  3665. else
  3666. {
  3667. gMaidC[i].SetActive(false);
  3668. }
  3669. gHandL[i].SetActive(false);
  3670. gArmL[i].SetActive(false);
  3671. gFootL[i].SetActive(false);
  3672. gHizaL[i].SetActive(false);
  3673. gHandR[i].SetActive(false);
  3674. gArmR[i].SetActive(false);
  3675. gFootR[i].SetActive(false);
  3676. gHizaR[i].SetActive(false);
  3677. gClavicleL[i].SetActive(false);
  3678. gClavicleR[i].SetActive(false);
  3679. gNeck[i].SetActive(false);
  3680. gSpine[i].SetActive(false);
  3681. gSpine0a[i].SetActive(false);
  3682. gSpine1a[i].SetActive(false);
  3683. gSpine1[i].SetActive(false);
  3684. gPelvis[i].SetActive(false);
  3685. }
  3686. if (mMaid[i].isSelect)
  3687. {
  3688. mMaid[i].isSelect = false;
  3689. if (ikMaid != i)
  3690. {
  3691. ikMaid = i;
  3692. ikBui = 5;
  3693. SetIK(maid, i);
  3694. }
  3695. }
  3696. }
  3697. else if (ikMode[i] == 11)
  3698. {
  3699. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3700. {
  3701. mMaid[i].ido = 3;
  3702. mMaid[i].reset = true;
  3703. mMaidC[i].ido = 3;
  3704. mMaidC[i].reset = true;
  3705. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3706. }
  3707. else
  3708. {
  3709. if (!gMaid[i])
  3710. {
  3711. SetIKInit3(i);
  3712. }
  3713. gMaid[i].transform.position =
  3714. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3715. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3716. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3717. gMaid[i].transform.eulerAngles =
  3718. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3719. Spine0a2[i].transform.eulerAngles.y,
  3720. Spine0a2[i].transform.eulerAngles.z + 90f);
  3721. mMaid[i].maid = maid;
  3722. mMaid[i].ido = 3;
  3723. gMaidC[i].transform.position = maid.transform.position;
  3724. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3725. mMaidC[i].maid = maid;
  3726. mMaidC[i].ido = 3;
  3727. if (isCube)
  3728. {
  3729. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3730. gMaidC[i].SetActive(true);
  3731. }
  3732. else
  3733. {
  3734. gMaidC[i].SetActive(false);
  3735. }
  3736. gHandL[i].SetActive(false);
  3737. gArmL[i].SetActive(false);
  3738. gFootL[i].SetActive(false);
  3739. gHizaL[i].SetActive(false);
  3740. gHandR[i].SetActive(false);
  3741. gArmR[i].SetActive(false);
  3742. gFootR[i].SetActive(false);
  3743. gHizaR[i].SetActive(false);
  3744. gClavicleL[i].SetActive(false);
  3745. gClavicleR[i].SetActive(false);
  3746. gNeck[i].SetActive(false);
  3747. gSpine[i].SetActive(false);
  3748. gSpine0a[i].SetActive(false);
  3749. gSpine1a[i].SetActive(false);
  3750. gSpine1[i].SetActive(false);
  3751. gPelvis[i].SetActive(false);
  3752. }
  3753. if (mMaid[i].isSelect)
  3754. {
  3755. mMaid[i].isSelect = false;
  3756. if (ikMaid != i)
  3757. {
  3758. ikMaid = i;
  3759. ikBui = 5;
  3760. SetIK(maid, i);
  3761. }
  3762. }
  3763. }
  3764. else if (ikMode[i] == 12)
  3765. {
  3766. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3767. {
  3768. mMaid[i].ido = 2;
  3769. mMaid[i].reset = true;
  3770. mMaidC[i].ido = 2;
  3771. mMaidC[i].reset = true;
  3772. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3773. }
  3774. else
  3775. {
  3776. if (!gMaid[i])
  3777. {
  3778. SetIKInit3(i);
  3779. }
  3780. gMaid[i].transform.position =
  3781. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3782. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3783. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3784. gMaid[i].transform.eulerAngles =
  3785. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3786. Spine0a2[i].transform.eulerAngles.y,
  3787. Spine0a2[i].transform.eulerAngles.z + 90f);
  3788. mMaid[i].maid = maid;
  3789. mMaid[i].ido = 2;
  3790. gMaidC[i].transform.position = maid.transform.position;
  3791. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3792. mMaidC[i].maid = maid;
  3793. mMaidC[i].ido = 2;
  3794. if (isCube)
  3795. {
  3796. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3797. gMaidC[i].SetActive(true);
  3798. }
  3799. else
  3800. {
  3801. gMaidC[i].SetActive(false);
  3802. }
  3803. gHandL[i].SetActive(false);
  3804. gArmL[i].SetActive(false);
  3805. gFootL[i].SetActive(false);
  3806. gHizaL[i].SetActive(false);
  3807. gHandR[i].SetActive(false);
  3808. gArmR[i].SetActive(false);
  3809. gFootR[i].SetActive(false);
  3810. gHizaR[i].SetActive(false);
  3811. gClavicleL[i].SetActive(false);
  3812. gClavicleR[i].SetActive(false);
  3813. gNeck[i].SetActive(false);
  3814. gSpine[i].SetActive(false);
  3815. gSpine0a[i].SetActive(false);
  3816. gSpine1a[i].SetActive(false);
  3817. gSpine1[i].SetActive(false);
  3818. gPelvis[i].SetActive(false);
  3819. }
  3820. if (mMaid[i].isSelect)
  3821. {
  3822. mMaid[i].isSelect = false;
  3823. if (ikMaid != i)
  3824. {
  3825. ikMaid = i;
  3826. ikBui = 5;
  3827. SetIK(maid, i);
  3828. }
  3829. }
  3830. }
  3831. else if (ikMode[i] == 10)
  3832. {
  3833. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3834. {
  3835. mMaid[i].ido = 1;
  3836. mMaid[i].reset = true;
  3837. mMaidC[i].ido = 1;
  3838. mMaidC[i].reset = true;
  3839. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3840. }
  3841. else
  3842. {
  3843. if (!gMaid[i])
  3844. {
  3845. SetIKInit3(i);
  3846. }
  3847. gMaid[i].transform.position =
  3848. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3849. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3850. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3851. gMaid[i].transform.eulerAngles =
  3852. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3853. Spine0a2[i].transform.eulerAngles.y,
  3854. Spine0a2[i].transform.eulerAngles.z + 90f);
  3855. mMaid[i].maid = maid;
  3856. mMaid[i].ido = 1;
  3857. gMaidC[i].transform.position = maid.transform.position;
  3858. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3859. mMaidC[i].maid = maid;
  3860. mMaidC[i].ido = 1;
  3861. if (isCube)
  3862. {
  3863. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3864. gMaidC[i].SetActive(true);
  3865. }
  3866. else
  3867. {
  3868. gMaidC[i].SetActive(false);
  3869. }
  3870. gHandL[i].SetActive(false);
  3871. gArmL[i].SetActive(false);
  3872. gFootL[i].SetActive(false);
  3873. gHizaL[i].SetActive(false);
  3874. gHandR[i].SetActive(false);
  3875. gArmR[i].SetActive(false);
  3876. gFootR[i].SetActive(false);
  3877. gHizaR[i].SetActive(false);
  3878. gClavicleL[i].SetActive(false);
  3879. gClavicleR[i].SetActive(false);
  3880. gNeck[i].SetActive(false);
  3881. gSpine[i].SetActive(false);
  3882. gSpine0a[i].SetActive(false);
  3883. gSpine1a[i].SetActive(false);
  3884. gSpine1[i].SetActive(false);
  3885. gPelvis[i].SetActive(false);
  3886. }
  3887. if (mMaid[i].isSelect)
  3888. {
  3889. mMaid[i].isSelect = false;
  3890. if (ikMaid != i)
  3891. {
  3892. ikMaid = i;
  3893. ikBui = 5;
  3894. SetIK(maid, i);
  3895. }
  3896. }
  3897. }
  3898. else if (ikMode[i] == 9)
  3899. {
  3900. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3901. {
  3902. mMaid[i].ido = 4;
  3903. mMaid[i].reset = true;
  3904. mMaidC[i].ido = 4;
  3905. mMaidC[i].reset = true;
  3906. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3907. }
  3908. else
  3909. {
  3910. if (!gMaid[i])
  3911. {
  3912. SetIKInit3(i);
  3913. }
  3914. gMaid[i].transform.position =
  3915. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3916. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3917. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3918. gMaid[i].transform.eulerAngles =
  3919. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3920. Spine0a2[i].transform.eulerAngles.y,
  3921. Spine0a2[i].transform.eulerAngles.z + 90f);
  3922. mMaid[i].maid = maid;
  3923. mMaid[i].ido = 4;
  3924. gMaidC[i].transform.position = maid.transform.position;
  3925. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3926. mMaidC[i].maid = maid;
  3927. mMaidC[i].ido = 4;
  3928. if (isCube)
  3929. {
  3930. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3931. gMaidC[i].SetActive(true);
  3932. }
  3933. else
  3934. {
  3935. gMaidC[i].SetActive(false);
  3936. }
  3937. gHandL[i].SetActive(false);
  3938. gArmL[i].SetActive(false);
  3939. gFootL[i].SetActive(false);
  3940. gHizaL[i].SetActive(false);
  3941. gHandR[i].SetActive(false);
  3942. gArmR[i].SetActive(false);
  3943. gFootR[i].SetActive(false);
  3944. gHizaR[i].SetActive(false);
  3945. gClavicleL[i].SetActive(false);
  3946. gClavicleR[i].SetActive(false);
  3947. gNeck[i].SetActive(false);
  3948. gSpine[i].SetActive(false);
  3949. gSpine0a[i].SetActive(false);
  3950. gSpine1a[i].SetActive(false);
  3951. gSpine1[i].SetActive(false);
  3952. gPelvis[i].SetActive(false);
  3953. }
  3954. if (mMaid[i].isSelect)
  3955. {
  3956. mMaid[i].isSelect = false;
  3957. if (ikMaid != i)
  3958. {
  3959. ikMaid = i;
  3960. ikBui = 5;
  3961. SetIK(maid, i);
  3962. }
  3963. }
  3964. }
  3965. else if (ikMode[i] == 14)
  3966. {
  3967. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3968. {
  3969. mMaid[i].ido = 6;
  3970. mMaid[i].reset = true;
  3971. mMaidC[i].ido = 6;
  3972. mMaidC[i].reset = true;
  3973. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3974. }
  3975. else
  3976. {
  3977. if (!gMaid[i])
  3978. {
  3979. SetIKInit3(i);
  3980. }
  3981. gMaid[i].transform.position =
  3982. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3983. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3984. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3985. gMaid[i].transform.eulerAngles =
  3986. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3987. Spine0a2[i].transform.eulerAngles.y,
  3988. Spine0a2[i].transform.eulerAngles.z + 90f);
  3989. mMaid[i].maid = maid;
  3990. mMaid[i].ido = 6;
  3991. gMaidC[i].transform.position = maid.transform.position;
  3992. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3993. mMaidC[i].maid = maid;
  3994. mMaidC[i].ido = 6;
  3995. if (isCube)
  3996. {
  3997. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3998. gMaidC[i].SetActive(true);
  3999. }
  4000. else
  4001. {
  4002. gMaidC[i].SetActive(false);
  4003. }
  4004. gHandL[i].SetActive(false);
  4005. gArmL[i].SetActive(false);
  4006. gFootL[i].SetActive(false);
  4007. gHizaL[i].SetActive(false);
  4008. gHandR[i].SetActive(false);
  4009. gArmR[i].SetActive(false);
  4010. gFootR[i].SetActive(false);
  4011. gHizaR[i].SetActive(false);
  4012. gClavicleL[i].SetActive(false);
  4013. gClavicleR[i].SetActive(false);
  4014. gNeck[i].SetActive(false);
  4015. gSpine[i].SetActive(false);
  4016. gSpine0a[i].SetActive(false);
  4017. gSpine1a[i].SetActive(false);
  4018. gSpine1[i].SetActive(false);
  4019. gPelvis[i].SetActive(false);
  4020. }
  4021. if (mMaid[i].isSelect)
  4022. {
  4023. mMaid[i].isSelect = false;
  4024. if (ikMaid != i)
  4025. {
  4026. ikMaid = i;
  4027. ikBui = 5;
  4028. SetIK(maid, i);
  4029. }
  4030. }
  4031. }
  4032. else if (ikMode[i] == 6)
  4033. {
  4034. if (!gFinger[i, 0])
  4035. {
  4036. SetIKInit2(i);
  4037. }
  4038. Destroy(gMaid[i]);
  4039. Destroy(gMaidC[i]);
  4040. Destroy(gHead[i]);
  4041. Destroy(gJotai[i]);
  4042. Destroy(gKahuku[i]);
  4043. gHandL[i].SetActive(false);
  4044. gArmL[i].SetActive(false);
  4045. gFootL[i].SetActive(false);
  4046. gHizaL[i].SetActive(false);
  4047. gHandR[i].SetActive(false);
  4048. gArmR[i].SetActive(false);
  4049. gFootR[i].SetActive(false);
  4050. gHizaR[i].SetActive(false);
  4051. gClavicleL[i].SetActive(false);
  4052. gClavicleR[i].SetActive(false);
  4053. gNeck[i].SetActive(false);
  4054. gSpine[i].SetActive(false);
  4055. gSpine0a[i].SetActive(false);
  4056. gSpine1a[i].SetActive(false);
  4057. gSpine1[i].SetActive(false);
  4058. gPelvis[i].SetActive(false);
  4059. for (int j = 0; j < 10; j++)
  4060. {
  4061. mFinger[i, j * 3 + 2].maid = maid;
  4062. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4063. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4064. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4065. mFinger[i, j * 3 + 2].ido = 12;
  4066. if (j == 0 || j == 5)
  4067. {
  4068. mFinger[i, j * 3 + 2].ido = 15;
  4069. }
  4070. mFinger[i, j * 3 + 1].maid = maid;
  4071. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4073. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4074. mFinger[i, j * 3 + 1].ido = 11;
  4075. if (j == 0 || j == 5)
  4076. {
  4077. mFinger[i, j * 3 + 1].ido = 14;
  4078. }
  4079. mFinger[i, j * 3].maid = maid;
  4080. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4082. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4083. mFinger[i, j * 3].ido = 13;
  4084. if (j == 0 || j == 5)
  4085. {
  4086. mFinger[i, j * 3].ido = 0;
  4087. }
  4088. gFinger[i, j * 3 + 2].SetActive(false);
  4089. gFinger[i, j * 3 + 1].SetActive(false);
  4090. gFinger[i, j * 3].SetActive(true);
  4091. gFinger[i, j * 3].SetActive(true);
  4092. mFinger[i, j * 3].ido = 16;
  4093. if (ikModeOld[i] != 6)
  4094. {
  4095. mFinger[i, j * 3].reset = true;
  4096. }
  4097. gFinger[i, j * 3 + 2].transform.position =
  4098. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4099. + Finger[i, j * 4 + 2].position) / 3f;
  4100. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4101. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4102. if (mFinger[i, j * 3 + 2].isStop)
  4103. {
  4104. isStop[i] = true;
  4105. isLock[i] = true;
  4106. mFinger[i, j * 3 + 2].isStop = false;
  4107. }
  4108. if (mFinger[i, j * 3 + 1].isStop)
  4109. {
  4110. isStop[i] = true;
  4111. isLock[i] = true;
  4112. mFinger[i, j * 3 + 1].isStop = false;
  4113. }
  4114. if (mFinger[i, j * 3].isStop)
  4115. {
  4116. isStop[i] = true;
  4117. isLock[i] = true;
  4118. mFinger[i, j * 3].isStop = false;
  4119. }
  4120. }
  4121. for (int j = 0; j < 6; j++)
  4122. {
  4123. mFinger2[i, j * 2 + 1].maid = maid;
  4124. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4125. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4126. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4127. mFinger2[i, j * 2 + 1].ido = 0;
  4128. mFinger2[i, j * 2].maid = maid;
  4129. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4130. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4131. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4132. mFinger2[i, j * 2].ido = 0;
  4133. gFinger2[i, j * 2 + 1].SetActive(false);
  4134. gFinger2[i, j * 2].SetActive(false);
  4135. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4136. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4137. if (mFinger2[i, j * 2 + 1].isStop)
  4138. {
  4139. isStop[i] = true;
  4140. isLock[i] = true;
  4141. mFinger2[i, j * 2 + 1].isStop = false;
  4142. }
  4143. if (mFinger2[i, j * 2].isStop)
  4144. {
  4145. isStop[i] = true;
  4146. isLock[i] = true;
  4147. mFinger2[i, j * 2].isStop = false;
  4148. }
  4149. }
  4150. }
  4151. else if (ikMode[i] == 4)
  4152. {
  4153. if (!gFinger[i, 0])
  4154. {
  4155. SetIKInit2(i);
  4156. }
  4157. Destroy(gMaid[i]);
  4158. Destroy(gMaidC[i]);
  4159. Destroy(gHead[i]);
  4160. Destroy(gJotai[i]);
  4161. Destroy(gKahuku[i]);
  4162. gHandL[i].SetActive(false);
  4163. gArmL[i].SetActive(false);
  4164. gFootL[i].SetActive(false);
  4165. gHizaL[i].SetActive(false);
  4166. gHandR[i].SetActive(false);
  4167. gArmR[i].SetActive(false);
  4168. gFootR[i].SetActive(false);
  4169. gHizaR[i].SetActive(false);
  4170. gClavicleL[i].SetActive(false);
  4171. gClavicleR[i].SetActive(false);
  4172. gNeck[i].SetActive(false);
  4173. gSpine[i].SetActive(false);
  4174. gSpine0a[i].SetActive(false);
  4175. gSpine1a[i].SetActive(false);
  4176. gSpine1[i].SetActive(false);
  4177. gPelvis[i].SetActive(false);
  4178. for (int j = 0; j < 10; j++)
  4179. {
  4180. mFinger[i, j * 3 + 2].maid = maid;
  4181. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4182. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4183. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4184. mFinger[i, j * 3 + 2].ido = 12;
  4185. mFinger[i, j * 3 + 2].onFlg = true;
  4186. if (j == 0 || j == 5)
  4187. {
  4188. mFinger[i, j * 3 + 2].ido = 15;
  4189. }
  4190. mFinger[i, j * 3 + 1].maid = maid;
  4191. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4192. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4193. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4194. mFinger[i, j * 3 + 1].ido = 11;
  4195. mFinger[i, j * 3 + 1].onFlg = true;
  4196. if (j == 0 || j == 5)
  4197. {
  4198. mFinger[i, j * 3 + 1].ido = 14;
  4199. }
  4200. mFinger[i, j * 3].maid = maid;
  4201. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4202. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4203. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4204. mFinger[i, j * 3].ido = 13;
  4205. mFinger[i, j * 3].onFlg = true;
  4206. if (j == 0 || j == 5)
  4207. {
  4208. mFinger[i, j * 3].ido = 0;
  4209. }
  4210. if (ikModeOld[i] != 4)
  4211. {
  4212. mFinger[i, j * 3].reset = true;
  4213. }
  4214. gFinger[i, j * 3 + 2].SetActive(true);
  4215. gFinger[i, j * 3 + 1].SetActive(true);
  4216. gFinger[i, j * 3].SetActive(true);
  4217. gFinger[i, j * 3 + 2].transform.position =
  4218. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4219. + Finger[i, j * 4 + 2].position) / 3f;
  4220. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4221. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4222. if (mFinger[i, j * 3 + 2].isStop)
  4223. {
  4224. isStop[i] = true;
  4225. isLock[i] = true;
  4226. mFinger[i, j * 3 + 2].isStop = false;
  4227. }
  4228. if (mFinger[i, j * 3 + 1].isStop)
  4229. {
  4230. isStop[i] = true;
  4231. isLock[i] = true;
  4232. mFinger[i, j * 3 + 1].isStop = false;
  4233. }
  4234. if (mFinger[i, j * 3].isStop)
  4235. {
  4236. isStop[i] = true;
  4237. isLock[i] = true;
  4238. mFinger[i, j * 3].isStop = false;
  4239. }
  4240. }
  4241. for (int j = 0; j < 6; j++)
  4242. {
  4243. mFinger2[i, j * 2 + 1].maid = maid;
  4244. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4245. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4246. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4247. mFinger2[i, j * 2 + 1].ido = 17;
  4248. mFinger2[i, j * 2].maid = maid;
  4249. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4250. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4251. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4252. mFinger2[i, j * 2].ido = 0;
  4253. gFinger2[i, j * 2 + 1].SetActive(true);
  4254. gFinger2[i, j * 2].SetActive(true);
  4255. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4256. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4257. if (mFinger2[i, j * 2 + 1].isStop)
  4258. {
  4259. isStop[i] = true;
  4260. isLock[i] = true;
  4261. mFinger2[i, j * 2 + 1].isStop = false;
  4262. }
  4263. if (mFinger2[i, j * 2].isStop)
  4264. {
  4265. isStop[i] = true;
  4266. isLock[i] = true;
  4267. mFinger2[i, j * 2].isStop = false;
  4268. }
  4269. }
  4270. }
  4271. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4272. {
  4273. mHandL[i].ido = 0;
  4274. mHandR[i].ido = 0;
  4275. mFootL[i].ido = 0;
  4276. mFootR[i].ido = 0;
  4277. mHizaL[i].ido = 0;
  4278. mHizaR[i].ido = 0;
  4279. mHandL[i].reset = true;
  4280. mHandR[i].reset = true;
  4281. mFootL[i].reset = true;
  4282. mFootR[i].reset = true;
  4283. mHizaL[i].reset = true;
  4284. mHizaR[i].reset = true;
  4285. }
  4286. else
  4287. {
  4288. if (gFinger[i, 0])
  4289. {
  4290. for (int j = 0; j < 30; j++)
  4291. {
  4292. gFinger[i, j].SetActive(false);
  4293. }
  4294. for (int j = 0; j < 12; j++)
  4295. {
  4296. gFinger2[i, j].SetActive(false);
  4297. }
  4298. }
  4299. Destroy(gHead[i]);
  4300. Destroy(gJotai[i]);
  4301. Destroy(gKahuku[i]);
  4302. Destroy(gIKHandL[i]);
  4303. Destroy(gIKHandR[i]);
  4304. Destroy(gIKMuneL[i]);
  4305. Destroy(gIKMuneR[i]);
  4306. Destroy(gHead2[i]);
  4307. Destroy(gMaid2[i]);
  4308. gHandL[i].SetActive(true);
  4309. gArmL[i].SetActive(true);
  4310. gFootL[i].SetActive(true);
  4311. gHizaL[i].SetActive(true);
  4312. gHandR[i].SetActive(true);
  4313. gArmR[i].SetActive(true);
  4314. gFootR[i].SetActive(true);
  4315. gHizaR[i].SetActive(true);
  4316. mHandL[i].ido = 0;
  4317. mHandR[i].ido = 0;
  4318. mFootL[i].ido = 0;
  4319. mFootR[i].ido = 0;
  4320. gClavicleL[i].SetActive(true);
  4321. gClavicleR[i].SetActive(true);
  4322. }
  4323. if (!isIK[i])
  4324. {
  4325. gHandL[i].SetActive(false);
  4326. gArmL[i].SetActive(false);
  4327. gFootL[i].SetActive(false);
  4328. gHizaL[i].SetActive(false);
  4329. gHandR[i].SetActive(false);
  4330. gArmR[i].SetActive(false);
  4331. gFootR[i].SetActive(false);
  4332. gHizaR[i].SetActive(false);
  4333. gClavicleL[i].SetActive(false);
  4334. gClavicleR[i].SetActive(false);
  4335. gNeck[i].SetActive(false);
  4336. gSpine[i].SetActive(false);
  4337. gSpine0a[i].SetActive(false);
  4338. gSpine1a[i].SetActive(false);
  4339. gSpine1[i].SetActive(false);
  4340. gPelvis[i].SetActive(false);
  4341. }
  4342. if (isIK[i])
  4343. {
  4344. mHandL[i].maid = maid;
  4345. mHandL[i].HandL = HandL1[i];
  4346. if (ikMode[i] == 2)
  4347. {
  4348. mHandL[i].UpperArmL = ForearmL1[i];
  4349. }
  4350. else
  4351. {
  4352. mHandL[i].UpperArmL = UpperArmL1[i];
  4353. if (ikModeOld[i] == 2 && isLock[i])
  4354. {
  4355. mHandL[i].OnMouseDown();
  4356. mHandL[i].isSelect = false;
  4357. }
  4358. }
  4359. mHandL[i].ForearmL = ForearmL1[i];
  4360. mArmL[i].maid = maid;
  4361. mArmL[i].HandL = ForearmL1[i];
  4362. mArmL[i].UpperArmL = UpperArmL1[i];
  4363. mArmL[i].ForearmL = UpperArmL1[i];
  4364. mArmL[i].onFlg = true;
  4365. if (mArmL[i].onFlg2)
  4366. {
  4367. mArmL[i].onFlg2 = false;
  4368. mHandL[i].initFlg = false;
  4369. }
  4370. if (ikMode[i] == 2)
  4371. {
  4372. mHandL[i].initFlg = false;
  4373. mHandR[i].initFlg = false;
  4374. mFootL[i].initFlg = false;
  4375. mFootR[i].initFlg = false;
  4376. mHandL[i].onFlg = true;
  4377. mHandR[i].onFlg = true;
  4378. mFootL[i].onFlg = true;
  4379. mFootR[i].onFlg = true;
  4380. }
  4381. else
  4382. {
  4383. mHandL[i].onFlg = false;
  4384. mHandR[i].onFlg = false;
  4385. mFootL[i].onFlg = false;
  4386. mFootR[i].onFlg = false;
  4387. }
  4388. gHandL[i].transform.position = HandL1[i].position;
  4389. gArmL[i].transform.position = ForearmL1[i].position;
  4390. mClavicleL[i].maid = maid;
  4391. mClavicleL[i].HandL = UpperArmL1[i];
  4392. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4393. mClavicleL[i].ForearmL = ClavicleL1[i];
  4394. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4395. if (mHandL[i].isStop)
  4396. {
  4397. isStop[i] = true;
  4398. isLock[i] = true;
  4399. mHandL[i].isStop = false;
  4400. }
  4401. if (mArmL[i].isStop)
  4402. {
  4403. isStop[i] = true;
  4404. isLock[i] = true;
  4405. mArmL[i].isStop = false;
  4406. }
  4407. if (mClavicleL[i].isStop)
  4408. {
  4409. isStop[i] = true;
  4410. isLock[i] = true;
  4411. mClavicleL[i].isStop = false;
  4412. }
  4413. mHandR[i].maid = maid;
  4414. mHandR[i].HandL = HandR1[i];
  4415. if (ikMode[i] == 2)
  4416. {
  4417. mHandR[i].UpperArmL = ForearmR1[i];
  4418. }
  4419. else
  4420. {
  4421. mHandR[i].UpperArmL = UpperArmR1[i];
  4422. if (ikModeOld[i] == 2 && isLock[i])
  4423. {
  4424. mHandR[i].OnMouseDown();
  4425. mHandR[i].isSelect = false;
  4426. }
  4427. }
  4428. mHandR[i].ForearmL = ForearmR1[i];
  4429. mArmR[i].maid = maid;
  4430. mArmR[i].HandL = ForearmR1[i];
  4431. mArmR[i].UpperArmL = UpperArmR1[i];
  4432. mArmR[i].ForearmL = UpperArmR1[i];
  4433. mArmR[i].onFlg = true;
  4434. if (mArmR[i].onFlg2)
  4435. {
  4436. mArmR[i].onFlg2 = false;
  4437. mHandR[i].initFlg = false;
  4438. }
  4439. gHandR[i].transform.position = HandR1[i].position;
  4440. gArmR[i].transform.position = ForearmR1[i].position;
  4441. mClavicleR[i].maid = maid;
  4442. mClavicleR[i].HandL = UpperArmR1[i];
  4443. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4444. mClavicleR[i].ForearmL = ClavicleR1[i];
  4445. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4446. if (mHandR[i].isStop)
  4447. {
  4448. isStop[i] = true;
  4449. isLock[i] = true;
  4450. mHandR[i].isStop = false;
  4451. }
  4452. if (mArmR[i].isStop)
  4453. {
  4454. isStop[i] = true;
  4455. isLock[i] = true;
  4456. mArmR[i].isStop = false;
  4457. }
  4458. if (mClavicleL[i].isStop)
  4459. {
  4460. isStop[i] = true;
  4461. isLock[i] = true;
  4462. mClavicleL[i].isStop = false;
  4463. }
  4464. mFootL[i].maid = maid;
  4465. mFootL[i].HandL = HandL2[i];
  4466. if (ikMode[i] == 2)
  4467. {
  4468. mFootL[i].UpperArmL = ForearmL2[i];
  4469. }
  4470. else
  4471. {
  4472. mFootL[i].UpperArmL = UpperArmL2[i];
  4473. if (ikModeOld[i] == 2 && isLock[i])
  4474. {
  4475. mFootL[i].OnMouseDown();
  4476. mFootL[i].isSelect = false;
  4477. }
  4478. }
  4479. mFootL[i].ForearmL = ForearmL2[i];
  4480. mHizaL[i].maid = maid;
  4481. mHizaL[i].HandL = ForearmL2[i];
  4482. mHizaL[i].UpperArmL = UpperArmL2[i];
  4483. mHizaL[i].ForearmL = UpperArmL2[i];
  4484. mHizaL[i].onFlg = true;
  4485. if (mHizaL[i].onFlg2)
  4486. {
  4487. mHizaL[i].onFlg2 = false;
  4488. mFootL[i].initFlg = false;
  4489. }
  4490. gFootL[i].transform.position = HandL2[i].position;
  4491. gHizaL[i].transform.position = ForearmL2[i].position;
  4492. if (mFootL[i].isStop)
  4493. {
  4494. isStop[i] = true;
  4495. isLock[i] = true;
  4496. mFootL[i].isStop = false;
  4497. }
  4498. if (mHizaL[i].isStop)
  4499. {
  4500. isStop[i] = true;
  4501. isLock[i] = true;
  4502. mHizaL[i].isStop = false;
  4503. }
  4504. mFootR[i].maid = maid;
  4505. mFootR[i].HandL = HandR2[i];
  4506. if (ikMode[i] == 2)
  4507. {
  4508. mFootR[i].UpperArmL = ForearmR2[i];
  4509. }
  4510. else
  4511. {
  4512. mFootR[i].UpperArmL = UpperArmR2[i];
  4513. if (ikModeOld[i] == 2 && isLock[i])
  4514. {
  4515. mFootR[i].OnMouseDown();
  4516. mFootR[i].isSelect = false;
  4517. }
  4518. }
  4519. mFootR[i].ForearmL = ForearmR2[i];
  4520. mHizaR[i].maid = maid;
  4521. mHizaR[i].HandL = ForearmR2[i];
  4522. mHizaR[i].UpperArmL = UpperArmR2[i];
  4523. mHizaR[i].ForearmL = UpperArmR2[i];
  4524. mHizaR[i].onFlg = true;
  4525. if (mHizaR[i].onFlg2)
  4526. {
  4527. mHizaR[i].onFlg2 = false;
  4528. mFootR[i].initFlg = false;
  4529. }
  4530. gFootR[i].transform.position = HandR2[i].position;
  4531. gHizaR[i].transform.position = ForearmR2[i].position;
  4532. if (mFootR[i].isStop)
  4533. {
  4534. isStop[i] = true;
  4535. isLock[i] = true;
  4536. mFootR[i].isStop = false;
  4537. }
  4538. if (mHizaR[i].isStop)
  4539. {
  4540. isStop[i] = true;
  4541. isLock[i] = true;
  4542. mHizaR[i].isStop = false;
  4543. }
  4544. bool flag13 = false;
  4545. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4546. || ikModeOld[i] == 14)
  4547. {
  4548. flag13 = true;
  4549. }
  4550. if (isBone[i])
  4551. {
  4552. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4553. || isChange[i])
  4554. {
  4555. float gizmoSizeSpine = 0.2f;
  4556. gizmoNeck[i].Visible = false;
  4557. gizmoFootL[i].Visible = false;
  4558. gizmoHandR[i].Visible = false;
  4559. gizmoHandL[i].Visible = false;
  4560. gizmoFootR[i].Visible = false;
  4561. gizmoPelvis[i].Visible = false;
  4562. if (ikMode[i] == 2 || ikMode[i] == 1)
  4563. {
  4564. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4565. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4566. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4567. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4568. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4569. if (ikMode[i] == 2)
  4570. {
  4571. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4572. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4573. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4574. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4575. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4576. if (isDragging)
  4577. {
  4578. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4579. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4580. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4581. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4582. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4583. }
  4584. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4585. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4586. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4587. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4588. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4589. gizmoNeck[i].Visible = true;
  4590. gizmoHandL[i].Visible = true;
  4591. gizmoHandR[i].Visible = true;
  4592. gizmoFootL[i].Visible = true;
  4593. gizmoFootR[i].Visible = true;
  4594. gNeck[i].SetActive(false);
  4595. gSpine[i].SetActive(false);
  4596. gSpine0a[i].SetActive(false);
  4597. gSpine1[i].SetActive(false);
  4598. gSpine1a[i].SetActive(false);
  4599. }
  4600. else
  4601. {
  4602. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4603. if (isDragging)
  4604. {
  4605. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4606. }
  4607. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4608. gizmoPelvis[i].Visible = true;
  4609. gPelvis[i].SetActive(false);
  4610. }
  4611. if (!isLock[i])
  4612. {
  4613. if (isDragging)
  4614. {
  4615. isStop[i] = true;
  4616. isLock[i] = true;
  4617. }
  4618. }
  4619. }
  4620. }
  4621. else
  4622. {
  4623. float gizmoSizeLimb = 0.25f;
  4624. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4625. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4626. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4627. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4628. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4629. if (ikMode[i] == 3)
  4630. {
  4631. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4632. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4633. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4634. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4635. if (isDragging)
  4636. {
  4637. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4638. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4639. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4640. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4641. }
  4642. else
  4643. {
  4644. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4645. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4646. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4647. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4648. }
  4649. }
  4650. else if (ikMode[i] == 5)
  4651. {
  4652. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4653. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4654. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4655. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4656. if (isDragging)
  4657. {
  4658. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4659. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4660. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4661. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4662. flag13 = true;
  4663. }
  4664. else
  4665. {
  4666. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4667. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4668. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4669. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4670. }
  4671. }
  4672. else if (ikMode[i] == 8)
  4673. {
  4674. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4675. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4676. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4677. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4678. if (isDragging)
  4679. {
  4680. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4681. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4682. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4683. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4684. flag13 = true;
  4685. }
  4686. else
  4687. {
  4688. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4689. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4690. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4691. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4692. }
  4693. }
  4694. gizmoHandL[i].Visible = true;
  4695. gizmoHandR[i].Visible = true;
  4696. gizmoFootL[i].Visible = true;
  4697. gizmoFootR[i].Visible = true;
  4698. gHandL[i].SetActive(false);
  4699. gFootL[i].SetActive(false);
  4700. gHandR[i].SetActive(false);
  4701. gFootR[i].SetActive(false);
  4702. if (!isLock[i])
  4703. {
  4704. if (isDragging)
  4705. {
  4706. isStop[i] = true;
  4707. isLock[i] = true;
  4708. }
  4709. }
  4710. }
  4711. if (isChange[i])
  4712. {
  4713. isChange[i] = false;
  4714. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4715. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4716. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4717. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4718. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4719. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4720. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4721. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gHandL[i].GetComponent<Renderer>().enabled = true;
  4725. gHandR[i].GetComponent<Renderer>().enabled = true;
  4726. gArmL[i].GetComponent<Renderer>().enabled = true;
  4727. gArmR[i].GetComponent<Renderer>().enabled = true;
  4728. gFootL[i].GetComponent<Renderer>().enabled = true;
  4729. gFootR[i].GetComponent<Renderer>().enabled = true;
  4730. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4731. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4732. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4733. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4734. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4735. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4736. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4737. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4738. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4739. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4740. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4741. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4742. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4743. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4744. }
  4745. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4746. {
  4747. mNeck[i].ido = 1;
  4748. mNeck[i].reset = true;
  4749. mSpine[i].ido = 1;
  4750. mSpine[i].reset = true;
  4751. mSpine0a[i].ido = 1;
  4752. mSpine0a[i].reset = true;
  4753. mSpine1a[i].ido = 1;
  4754. mSpine1a[i].reset = true;
  4755. mSpine1[i].ido = 1;
  4756. mSpine1[i].reset = true;
  4757. mPelvis[i].ido = 1;
  4758. mPelvis[i].reset = true;
  4759. }
  4760. else if (ikMode[i] == 0)
  4761. {
  4762. gNeck[i].SetActive(true);
  4763. gSpine[i].SetActive(true);
  4764. gSpine0a[i].SetActive(true);
  4765. gSpine1a[i].SetActive(true);
  4766. gSpine1[i].SetActive(true);
  4767. gPelvis[i].SetActive(true);
  4768. if (mNeck[i].isHead)
  4769. {
  4770. mNeck[i].isHead = false;
  4771. isLookn[i] = isLook[i];
  4772. isLook[i] = !isLook[i];
  4773. }
  4774. mNeck[i].maid = maid;
  4775. mNeck[i].head = Neck[i];
  4776. mNeck[i].no = i;
  4777. mNeck[i].ido = 1;
  4778. gNeck[i].transform.position = Neck[i].position;
  4779. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4780. mSpine[i].maid = maid;
  4781. mSpine[i].head = Spine2[i];
  4782. mSpine[i].no = i;
  4783. mSpine[i].ido = 1;
  4784. gSpine[i].transform.position = Spine2[i].position;
  4785. gSpine[i].transform.eulerAngles =
  4786. new Vector3(Spine2[i].localEulerAngles.z,
  4787. Spine2[i].localEulerAngles.y,
  4788. Spine2[i].localEulerAngles.x);
  4789. mSpine0a[i].maid = maid;
  4790. mSpine0a[i].head = Spine0a2[i];
  4791. mSpine0a[i].no = i;
  4792. mSpine0a[i].ido = 1;
  4793. gSpine0a[i].transform.position = Spine0a2[i].position;
  4794. gSpine0a[i].transform.eulerAngles =
  4795. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4796. Spine0a2[i].localEulerAngles.x,
  4797. Spine0a2[i].localEulerAngles.y);
  4798. mSpine1a[i].maid = maid;
  4799. mSpine1a[i].head = Spine1a2[i];
  4800. mSpine1a[i].no = i;
  4801. mSpine1a[i].ido = 1;
  4802. gSpine1a[i].transform.position = Spine1a2[i].position;
  4803. gSpine1a[i].transform.localEulerAngles =
  4804. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4805. Spine1a2[i].localEulerAngles.x,
  4806. Spine1a2[i].localEulerAngles.y);
  4807. mSpine1[i].maid = maid;
  4808. mSpine1[i].head = Spine12[i];
  4809. mSpine1[i].no = i;
  4810. mSpine1[i].ido = 1;
  4811. gSpine1[i].transform.position = Spine12[i].position;
  4812. gSpine1[i].transform.localEulerAngles =
  4813. new Vector3(-Spine12[i].localEulerAngles.z,
  4814. Spine12[i].localEulerAngles.x,
  4815. Spine12[i].localEulerAngles.y);
  4816. mPelvis[i].maid = maid;
  4817. mPelvis[i].head = Pelvis2[i];
  4818. mPelvis[i].no = i;
  4819. mPelvis[i].ido = 1;
  4820. gPelvis[i].transform.position = Pelvis2[i].position;
  4821. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4822. if (mNeck[i].isIdo)
  4823. {
  4824. mNeck[i].isIdo = false;
  4825. isLock[i] = true;
  4826. }
  4827. if (mSpine[i].isIdo)
  4828. {
  4829. mSpine[i].isIdo = false;
  4830. flag13 = true;
  4831. isLock[i] = true;
  4832. }
  4833. if (mSpine0a[i].isIdo)
  4834. {
  4835. mSpine0a[i].isIdo = false;
  4836. flag13 = true;
  4837. isLock[i] = true;
  4838. }
  4839. if (mSpine1a[i].isIdo)
  4840. {
  4841. mSpine1a[i].isIdo = false;
  4842. flag13 = true;
  4843. isLock[i] = true;
  4844. }
  4845. if (mSpine1[i].isIdo)
  4846. {
  4847. mSpine1[i].isIdo = false;
  4848. flag13 = true;
  4849. isLock[i] = true;
  4850. }
  4851. if (mPelvis[i].isIdo)
  4852. {
  4853. mPelvis[i].isIdo = false;
  4854. flag13 = true;
  4855. isLock[i] = true;
  4856. }
  4857. if (mClavicleL[i].isIdo)
  4858. {
  4859. mClavicleL[i].isIdo = false;
  4860. flag13 = true;
  4861. isLock[i] = true;
  4862. }
  4863. if (mClavicleR[i].isIdo)
  4864. {
  4865. mClavicleR[i].isIdo = false;
  4866. flag13 = true;
  4867. isLock[i] = true;
  4868. }
  4869. }
  4870. }
  4871. else if (isChange[i])
  4872. {
  4873. isChange[i] = false;
  4874. gHandL[i].GetComponent<Renderer>().enabled = false;
  4875. gArmL[i].GetComponent<Renderer>().enabled = false;
  4876. gFootL[i].GetComponent<Renderer>().enabled = false;
  4877. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4878. gHandR[i].GetComponent<Renderer>().enabled = false;
  4879. gArmR[i].GetComponent<Renderer>().enabled = false;
  4880. gFootR[i].GetComponent<Renderer>().enabled = false;
  4881. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4882. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4883. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4884. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4885. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4886. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4887. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4888. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4889. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4890. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4891. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4892. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4893. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4894. gNeck[i].SetActive(false);
  4895. gSpine[i].SetActive(false);
  4896. gSpine0a[i].SetActive(false);
  4897. gSpine1a[i].SetActive(false);
  4898. gSpine1[i].SetActive(false);
  4899. gPelvis[i].SetActive(false);
  4900. gizmoHandL[i].Visible = false;
  4901. gizmoHandR[i].Visible = false;
  4902. gizmoFootL[i].Visible = false;
  4903. gizmoFootR[i].Visible = false;
  4904. }
  4905. if (flag13)
  4906. {
  4907. mHandL[i].initFlg = false;
  4908. mHandR[i].initFlg = false;
  4909. mFootL[i].initFlg = false;
  4910. mFootR[i].initFlg = false;
  4911. }
  4912. }
  4913. ikModeOld[i] = ikMode[i];
  4914. bool flag14 = false;
  4915. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4916. {
  4917. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4918. {
  4919. for (int k = 0; k < 10; k++)
  4920. {
  4921. maid.transform.RotateAround(maid.transform.position,
  4922. Vector3.right,
  4923. -maid.transform.rotation.eulerAngles.x);
  4924. maid.transform.RotateAround(maid.transform.position,
  4925. Vector3.forward,
  4926. -maid.transform.rotation.eulerAngles.z);
  4927. }
  4928. flag14 = true;
  4929. }
  4930. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4931. {
  4932. maid.transform.RotateAround(maid.transform.position,
  4933. new Vector3(vector3.x, 0f, vector3.z),
  4934. 0.3f);
  4935. maid.transform.RotateAround(maid.transform.position,
  4936. new Vector3(vector2.x, 0f, vector2.z),
  4937. 0.3f);
  4938. flag14 = true;
  4939. }
  4940. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4941. {
  4942. maid.transform.RotateAround(maid.transform.position,
  4943. new Vector3(vector3.x, 0f, vector3.z),
  4944. 0.3f);
  4945. maid.transform.RotateAround(maid.transform.position,
  4946. new Vector3(vector2.x, 0f, vector2.z),
  4947. -0.3f);
  4948. flag14 = true;
  4949. }
  4950. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4951. {
  4952. maid.transform.RotateAround(maid.transform.position,
  4953. new Vector3(vector3.x, 0f, vector3.z),
  4954. -0.3f);
  4955. maid.transform.RotateAround(maid.transform.position,
  4956. new Vector3(vector2.x, 0f, vector2.z),
  4957. 0.3f);
  4958. flag14 = true;
  4959. }
  4960. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4961. {
  4962. maid.transform.RotateAround(maid.transform.position,
  4963. new Vector3(vector3.x, 0f, vector3.z),
  4964. -0.3f);
  4965. maid.transform.RotateAround(maid.transform.position,
  4966. new Vector3(vector2.x, 0f, vector2.z),
  4967. -0.3f);
  4968. flag14 = true;
  4969. }
  4970. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4971. {
  4972. maid.transform.RotateAround(maid.transform.position,
  4973. new Vector3(vector3.x, 0f, vector3.z),
  4974. 0.4f);
  4975. flag14 = true;
  4976. }
  4977. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4978. {
  4979. maid.transform.RotateAround(maid.transform.position,
  4980. new Vector3(vector3.x, 0f, vector3.z),
  4981. -0.4f);
  4982. flag14 = true;
  4983. }
  4984. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4985. {
  4986. maid.transform.RotateAround(maid.transform.position,
  4987. new Vector3(vector2.x, 0f, vector2.z),
  4988. 0.4f);
  4989. flag14 = true;
  4990. }
  4991. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4992. {
  4993. maid.transform.RotateAround(maid.transform.position,
  4994. new Vector3(vector2.x, 0f, vector2.z),
  4995. -0.4f);
  4996. flag14 = true;
  4997. }
  4998. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4999. {
  5000. maid.body0.transform.localRotation =
  5001. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5002. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5003. flag14 = true;
  5004. }
  5005. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5006. {
  5007. maid.body0.transform.localRotation =
  5008. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5009. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5010. flag14 = true;
  5011. }
  5012. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5013. {
  5014. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5015. flag14 = true;
  5016. }
  5017. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5018. {
  5019. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5020. flag14 = true;
  5021. }
  5022. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5023. {
  5024. Vector3 vector = maid.transform.position;
  5025. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5026. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5027. maid.SetPos(vector);
  5028. flag14 = true;
  5029. }
  5030. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5031. {
  5032. Vector3 vector = maid.transform.position;
  5033. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5034. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5035. maid.SetPos(vector);
  5036. flag14 = true;
  5037. }
  5038. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5039. {
  5040. Vector3 vector = maid.transform.position;
  5041. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5042. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5043. maid.SetPos(vector);
  5044. flag14 = true;
  5045. }
  5046. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5047. {
  5048. Vector3 vector = maid.transform.position;
  5049. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5050. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5051. maid.SetPos(vector);
  5052. flag14 = true;
  5053. }
  5054. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5055. {
  5056. Vector3 vector = maid.transform.position;
  5057. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5058. maid.SetPos(vector);
  5059. flag14 = true;
  5060. }
  5061. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5062. {
  5063. Vector3 vector = maid.transform.position;
  5064. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5065. maid.SetPos(vector);
  5066. flag14 = true;
  5067. }
  5068. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5069. {
  5070. Vector3 vector = maid.transform.position;
  5071. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5072. maid.SetPos(vector);
  5073. flag14 = true;
  5074. }
  5075. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5076. {
  5077. Vector3 vector = maid.transform.position;
  5078. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5079. maid.SetPos(vector);
  5080. flag14 = true;
  5081. }
  5082. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5083. {
  5084. Vector3 vector = maid.transform.position;
  5085. vector.y += 0.0075f * speed;
  5086. maid.SetPos(vector);
  5087. flag14 = true;
  5088. }
  5089. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5090. {
  5091. Vector3 vector = maid.transform.position;
  5092. vector.y -= 0.0075f * speed;
  5093. maid.SetPos(vector);
  5094. flag14 = true;
  5095. }
  5096. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5097. {
  5098. maid.transform.localScale =
  5099. new Vector3(maid.transform.localScale.x * 1.005f,
  5100. maid.transform.localScale.y * 1.005f,
  5101. maid.transform.localScale.z * 1.005f);
  5102. flag14 = true;
  5103. }
  5104. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5105. {
  5106. maid.transform.localScale =
  5107. new Vector3(maid.transform.localScale.x * 0.995f,
  5108. maid.transform.localScale.y * 0.995f,
  5109. maid.transform.localScale.z * 0.995f);
  5110. flag14 = true;
  5111. }
  5112. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5113. {
  5114. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5115. flag14 = true;
  5116. }
  5117. }
  5118. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5119. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5120. && i == ikMaid)
  5121. {
  5122. if (Input.GetKey(KeyCode.I))
  5123. {
  5124. if (ikMode[i] == 0)
  5125. {
  5126. Vector3 vector5 = HandL.position;
  5127. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5128. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5129. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5130. }
  5131. else if (ikMode[i] == 2)
  5132. {
  5133. Vector3 vector5 = HandL.position;
  5134. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5135. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5136. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5137. }
  5138. else if (ikMode[i] == 3)
  5139. {
  5140. if (ikBui == 1 || ikBui == 2)
  5141. {
  5142. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5143. }
  5144. else
  5145. {
  5146. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5147. }
  5148. }
  5149. else if (ikMode[i] == 4)
  5150. {
  5151. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5152. }
  5153. else if (ikMode[i] == 8)
  5154. {
  5155. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5156. }
  5157. else if (ikMode[i] == 6)
  5158. {
  5159. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5160. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5161. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5162. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5163. }
  5164. else if (ikMode[i] == 7)
  5165. {
  5166. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5167. }
  5168. else if (ikMode[i] == 5)
  5169. {
  5170. Vector3 vector5 = ForearmL.position;
  5171. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5172. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5173. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5174. }
  5175. else
  5176. {
  5177. Vector3 vector5 = ForearmL.position;
  5178. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5179. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5180. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5181. }
  5182. isStop[i] = true;
  5183. isLock[i] = true;
  5184. }
  5185. else if (Input.GetKey(KeyCode.K))
  5186. {
  5187. if (ikMode[i] == 0)
  5188. {
  5189. Vector3 vector5 = HandL.position;
  5190. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5191. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5192. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5193. }
  5194. else if (ikMode[i] == 2)
  5195. {
  5196. Vector3 vector5 = HandL.position;
  5197. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5198. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5199. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5200. }
  5201. else if (ikMode[i] == 3)
  5202. {
  5203. if (ikBui == 1 || ikBui == 2)
  5204. {
  5205. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5206. }
  5207. else
  5208. {
  5209. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5210. }
  5211. }
  5212. else if (ikMode[i] == 4)
  5213. {
  5214. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5215. }
  5216. else if (ikMode[i] == 8)
  5217. {
  5218. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5219. }
  5220. else if (ikMode[i] == 6)
  5221. {
  5222. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5223. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5224. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5225. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5226. }
  5227. else if (ikMode[i] == 7)
  5228. {
  5229. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5230. }
  5231. else if (ikMode[i] == 5)
  5232. {
  5233. Vector3 vector5 = ForearmL.position;
  5234. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5235. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5236. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5237. }
  5238. else
  5239. {
  5240. Vector3 vector5 = ForearmL.position;
  5241. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5242. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5243. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5244. }
  5245. isStop[i] = true;
  5246. isLock[i] = true;
  5247. }
  5248. else if (Input.GetKey(KeyCode.J))
  5249. {
  5250. if (ikMode[i] == 0)
  5251. {
  5252. Vector3 vector5 = HandL.position;
  5253. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5254. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5255. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5256. }
  5257. else if (ikMode[i] == 2)
  5258. {
  5259. Vector3 vector5 = HandL.position;
  5260. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5261. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5262. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5263. }
  5264. else if (ikMode[i] == 3)
  5265. {
  5266. if (ikBui == 1 || ikBui == 2)
  5267. {
  5268. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5269. }
  5270. else
  5271. {
  5272. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5273. }
  5274. }
  5275. else if (ikMode[i] == 4)
  5276. {
  5277. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5278. }
  5279. else if (ikMode[i] == 8)
  5280. {
  5281. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5282. }
  5283. else if (ikMode[i] == 6)
  5284. {
  5285. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5286. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5287. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5288. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5289. }
  5290. else if (ikMode[i] == 7)
  5291. {
  5292. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5293. }
  5294. else if (ikMode[i] == 5)
  5295. {
  5296. Vector3 vector5 = ForearmL.position;
  5297. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5298. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5299. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5300. }
  5301. else
  5302. {
  5303. Vector3 vector5 = ForearmL.position;
  5304. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5305. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5306. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5307. }
  5308. isStop[i] = true;
  5309. isLock[i] = true;
  5310. }
  5311. else if (Input.GetKey(KeyCode.L))
  5312. {
  5313. if (ikMode[i] == 0)
  5314. {
  5315. Vector3 vector5 = HandL.position;
  5316. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5317. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5318. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5319. }
  5320. else if (ikMode[i] == 2)
  5321. {
  5322. Vector3 vector5 = HandL.position;
  5323. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5324. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5325. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5326. }
  5327. else if (ikMode[i] == 3)
  5328. {
  5329. if (ikBui == 1 || ikBui == 2)
  5330. {
  5331. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5332. }
  5333. else
  5334. {
  5335. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5336. }
  5337. }
  5338. else if (ikMode[i] == 4)
  5339. {
  5340. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5341. }
  5342. else if (ikMode[i] == 8)
  5343. {
  5344. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5345. }
  5346. else if (ikMode[i] == 6)
  5347. {
  5348. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5349. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5350. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5351. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5352. }
  5353. else if (ikMode[i] == 7)
  5354. {
  5355. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5356. }
  5357. else if (ikMode[i] == 5)
  5358. {
  5359. Vector3 vector5 = ForearmL.position;
  5360. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5361. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5362. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5363. }
  5364. else
  5365. {
  5366. Vector3 vector5 = ForearmL.position;
  5367. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5368. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5369. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5370. }
  5371. isStop[i] = true;
  5372. isLock[i] = true;
  5373. }
  5374. else if (Input.GetKey(KeyCode.U))
  5375. {
  5376. if (ikMode[i] == 3)
  5377. {
  5378. HandL.localRotation =
  5379. Quaternion.Euler(HandL.localEulerAngles)
  5380. * Quaternion.AngleAxis(1f, Vector3.right);
  5381. isStop[i] = true;
  5382. isLock[i] = true;
  5383. }
  5384. else if (ikMode[i] == 4)
  5385. {
  5386. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5387. isStop[i] = true;
  5388. isLock[i] = true;
  5389. }
  5390. else if (ikMode[i] == 8)
  5391. {
  5392. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5393. isStop[i] = true;
  5394. isLock[i] = true;
  5395. }
  5396. else if (ikMode[i] == 6)
  5397. {
  5398. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5399. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5400. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5401. isStop[i] = true;
  5402. isLock[i] = true;
  5403. }
  5404. else if (ikMode[i] == 7)
  5405. {
  5406. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5407. isStop[i] = true;
  5408. isLock[i] = true;
  5409. }
  5410. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5411. {
  5412. UpperArmL.localRotation =
  5413. Quaternion.Euler(UpperArmL.localEulerAngles)
  5414. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5415. isStop[i] = true;
  5416. isLock[i] = true;
  5417. }
  5418. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5419. {
  5420. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5421. isStop[i] = true;
  5422. isLock[i] = true;
  5423. }
  5424. }
  5425. else if (Input.GetKey(KeyCode.O))
  5426. {
  5427. if (ikMode[i] == 3)
  5428. {
  5429. HandL.localRotation =
  5430. Quaternion.Euler(HandL.localEulerAngles)
  5431. * Quaternion.AngleAxis(-1f, Vector3.right);
  5432. isStop[i] = true;
  5433. isLock[i] = true;
  5434. }
  5435. else if (ikMode[i] == 4)
  5436. {
  5437. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5438. isStop[i] = true;
  5439. isLock[i] = true;
  5440. }
  5441. else if (ikMode[i] == 8)
  5442. {
  5443. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5444. isStop[i] = true;
  5445. isLock[i] = true;
  5446. }
  5447. else if (ikMode[i] == 6)
  5448. {
  5449. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5450. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5451. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5452. isStop[i] = true;
  5453. isLock[i] = true;
  5454. }
  5455. else if (ikMode[i] == 7)
  5456. {
  5457. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5458. isStop[i] = true;
  5459. isLock[i] = true;
  5460. }
  5461. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5462. {
  5463. UpperArmL.localRotation =
  5464. Quaternion.Euler(UpperArmL.localEulerAngles)
  5465. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5466. isStop[i] = true;
  5467. isLock[i] = true;
  5468. }
  5469. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5470. {
  5471. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5472. isStop[i] = true;
  5473. isLock[i] = true;
  5474. }
  5475. }
  5476. else if (Input.GetKey(KeyCode.Alpha0))
  5477. {
  5478. if (ikMode[i] == 0)
  5479. {
  5480. Vector3 vector5 = HandL.position;
  5481. vector5.y += 0.005f;
  5482. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5483. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5484. }
  5485. else if (ikMode[i] == 2)
  5486. {
  5487. Vector3 vector5 = HandL.position;
  5488. vector5.y += 0.005f;
  5489. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5490. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5491. }
  5492. else if (ikMode[i] == 5)
  5493. {
  5494. Vector3 vector5 = ForearmL.position;
  5495. vector5.y += 0.0035f;
  5496. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5497. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5498. }
  5499. else
  5500. {
  5501. Vector3 vector5 = ForearmL.position;
  5502. vector5.y += 0.0035f;
  5503. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5504. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5505. }
  5506. isStop[i] = true;
  5507. isLock[i] = true;
  5508. }
  5509. else if (Input.GetKey(KeyCode.P))
  5510. {
  5511. if (ikMode[i] == 0)
  5512. {
  5513. Vector3 vector5 = HandL.position;
  5514. vector5.y -= 0.005f;
  5515. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5516. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5517. }
  5518. else if (ikMode[i] == 2)
  5519. {
  5520. Vector3 vector5 = HandL.position;
  5521. vector5.y -= 0.005f;
  5522. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5523. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5524. }
  5525. else if (ikMode[i] == 5)
  5526. {
  5527. Vector3 vector5 = ForearmL.position;
  5528. vector5.y -= 0.0035f;
  5529. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5530. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5531. }
  5532. else
  5533. {
  5534. Vector3 vector5 = ForearmL.position;
  5535. vector5.y -= 0.0035f;
  5536. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5537. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5538. }
  5539. isStop[i] = true;
  5540. isLock[i] = true;
  5541. }
  5542. }
  5543. }
  5544. }
  5545. }
  5546. }
  5547. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5548. {
  5549. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5550. idoFlg[i] = true;
  5551. }
  5552. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5553. {
  5554. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5555. idoFlg[i] = true;
  5556. }
  5557. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5558. {
  5559. if (!xFlg[i])
  5560. {
  5561. xFlg[i] = true;
  5562. zFlg[i] = false;
  5563. if (maid.status.personal.uniqueName == "Pride")
  5564. {
  5565. string text = "s0_";
  5566. Random random = new Random();
  5567. int num4 = random.Next(10000);
  5568. bool flag7 = false;
  5569. for (int k = 0; k < tunArray.Length; k++)
  5570. {
  5571. if (tunArray[k] == num4)
  5572. {
  5573. flag7 = true;
  5574. break;
  5575. }
  5576. }
  5577. if (!flag7)
  5578. {
  5579. text = text + "0" + num4.ToString() + ".ogg";
  5580. if (GameUty.FileSystem.IsExistentFile(text))
  5581. {
  5582. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5583. }
  5584. }
  5585. }
  5586. if (maid.status.personal.uniqueName == "Cool")
  5587. {
  5588. string text = "s1_";
  5589. Random random = new Random();
  5590. int num4 = random.Next(10000);
  5591. bool flag7 = false;
  5592. for (int k = 0; k < coolArray.Length; k++)
  5593. {
  5594. if (coolArray[k] == num4)
  5595. {
  5596. flag7 = true;
  5597. break;
  5598. }
  5599. }
  5600. if (!flag7)
  5601. {
  5602. text = text + "0" + num4.ToString() + ".ogg";
  5603. if (GameUty.FileSystem.IsExistentFile(text))
  5604. {
  5605. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5606. }
  5607. }
  5608. }
  5609. if (maid.status.personal.uniqueName == "Pure")
  5610. {
  5611. string text = "s2_";
  5612. Random random = new Random();
  5613. int num4 = random.Next(10000);
  5614. bool flag7 = false;
  5615. for (int k = 0; k < pureArray.Length; k++)
  5616. {
  5617. if (pureArray[k] == num4)
  5618. {
  5619. flag7 = true;
  5620. break;
  5621. }
  5622. }
  5623. if (!flag7)
  5624. {
  5625. text = text + "0" + num4.ToString() + ".ogg";
  5626. if (GameUty.FileSystem.IsExistentFile(text))
  5627. {
  5628. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5629. }
  5630. }
  5631. }
  5632. if (maid.status.personal.uniqueName == "Yandere")
  5633. {
  5634. string text = "s3_";
  5635. Random random = new Random();
  5636. int num4 = random.Next(10000);
  5637. bool flag7 = false;
  5638. for (int k = 0; k < yanArray.Length; k++)
  5639. {
  5640. if (yanArray[k] == num4)
  5641. {
  5642. flag7 = true;
  5643. break;
  5644. }
  5645. }
  5646. if (!flag7)
  5647. {
  5648. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5649. if (GameUty.FileSystem.IsExistentFile(text))
  5650. {
  5651. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5652. }
  5653. }
  5654. }
  5655. if (maid.status.personal.uniqueName == "Muku")
  5656. {
  5657. string text = "h0_";
  5658. Random random = new Random();
  5659. int num4 = random.Next(10000);
  5660. bool flag7 = false;
  5661. for (int k = 0; k < h0Array.Length; k++)
  5662. {
  5663. if (h0Array[k] == num4)
  5664. {
  5665. flag7 = true;
  5666. break;
  5667. }
  5668. }
  5669. if (flag7)
  5670. {
  5671. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5672. if (GameUty.FileSystem.IsExistentFile(text))
  5673. {
  5674. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5675. }
  5676. }
  5677. }
  5678. if (maid.status.personal.uniqueName == "Majime")
  5679. {
  5680. string text = "h1_";
  5681. Random random = new Random();
  5682. int num4 = random.Next(10000);
  5683. bool flag7 = false;
  5684. for (int k = 0; k < h1Array.Length; k++)
  5685. {
  5686. if (h1Array[k] == num4)
  5687. {
  5688. flag7 = true;
  5689. break;
  5690. }
  5691. }
  5692. if (flag7)
  5693. {
  5694. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5695. if (GameUty.FileSystem.IsExistentFile(text))
  5696. {
  5697. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5698. }
  5699. }
  5700. }
  5701. if (maid.status.personal.uniqueName == "Rindere")
  5702. {
  5703. string text = "h2_";
  5704. Random random = new Random();
  5705. int num4 = random.Next(10000);
  5706. bool flag7 = false;
  5707. for (int k = 0; k < h2Array.Length; k++)
  5708. {
  5709. if (h2Array[k] == num4)
  5710. {
  5711. flag7 = true;
  5712. break;
  5713. }
  5714. }
  5715. if (flag7)
  5716. {
  5717. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5718. if (GameUty.FileSystem.IsExistentFile(text))
  5719. {
  5720. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5721. }
  5722. }
  5723. }
  5724. }
  5725. else
  5726. {
  5727. xFlg[i] = false;
  5728. maid.AudioMan.Clear();
  5729. }
  5730. idoFlg[i] = true;
  5731. }
  5732. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5733. {
  5734. if (!zFlg[i])
  5735. {
  5736. zFlg[i] = true;
  5737. xFlg[i] = false;
  5738. string text = "";
  5739. if (maid.status.personal.uniqueName == "Pride")
  5740. {
  5741. text = "s0_";
  5742. Random random = new Random();
  5743. int num4 = random.Next(tunArray.Length);
  5744. object obj = text;
  5745. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5746. }
  5747. if (maid.status.personal.uniqueName == "Cool")
  5748. {
  5749. text = "s1_";
  5750. Random random = new Random();
  5751. int num4 = random.Next(coolArray.Length);
  5752. object obj = text;
  5753. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5754. }
  5755. if (maid.status.personal.uniqueName == "Pure")
  5756. {
  5757. text = "s2_";
  5758. Random random = new Random();
  5759. int num4 = random.Next(pureArray.Length);
  5760. object obj = text;
  5761. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5762. }
  5763. if (maid.status.personal.uniqueName == "Yandere")
  5764. {
  5765. text = "s3_";
  5766. Random random = new Random();
  5767. int num4 = random.Next(yanArray.Length);
  5768. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5769. }
  5770. if (maid.status.personal.uniqueName == "Muku")
  5771. {
  5772. text = "h0_";
  5773. Random random = new Random();
  5774. int num4 = random.Next(h0tArray.Length);
  5775. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5776. }
  5777. if (maid.status.personal.uniqueName == "Majime")
  5778. {
  5779. text = "h1_";
  5780. Random random = new Random();
  5781. int num4 = random.Next(h1tArray.Length);
  5782. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5783. }
  5784. if (maid.status.personal.uniqueName == "Rindere")
  5785. {
  5786. text = "h2_";
  5787. Random random = new Random();
  5788. int num4 = random.Next(h2tArray.Length);
  5789. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5790. }
  5791. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5792. }
  5793. else
  5794. {
  5795. zFlg[i] = false;
  5796. maid.AudioMan.Clear();
  5797. }
  5798. idoFlg[i] = true;
  5799. }
  5800. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5801. {
  5802. string text = "";
  5803. if (maid.status.personal.uniqueName == "Pride")
  5804. {
  5805. text = "s0_";
  5806. Random random = new Random();
  5807. int num4 = random.Next(tunArray.Length);
  5808. object obj = text;
  5809. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5810. }
  5811. if (maid.status.personal.uniqueName == "Cool")
  5812. {
  5813. text = "s1_";
  5814. Random random = new Random();
  5815. int num4 = random.Next(coolArray.Length);
  5816. object obj = text;
  5817. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5818. }
  5819. if (maid.status.personal.uniqueName == "Pure")
  5820. {
  5821. text = "s2_";
  5822. Random random = new Random();
  5823. int num4 = random.Next(pureArray.Length);
  5824. object obj = text;
  5825. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5826. }
  5827. if (maid.status.personal.uniqueName == "Yandere")
  5828. {
  5829. text = "s3_";
  5830. Random random = new Random();
  5831. int num4 = random.Next(yanArray.Length);
  5832. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5833. }
  5834. if (maid.status.personal.uniqueName == "Muku")
  5835. {
  5836. text = "h0_";
  5837. Random random = new Random();
  5838. int num4 = random.Next(h0tArray.Length);
  5839. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5840. }
  5841. if (maid.status.personal.uniqueName == "Majime")
  5842. {
  5843. text = "h1_";
  5844. Random random = new Random();
  5845. int num4 = random.Next(h1tArray.Length);
  5846. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5847. }
  5848. if (maid.status.personal.uniqueName == "Rindere")
  5849. {
  5850. text = "h2_";
  5851. Random random = new Random();
  5852. int num4 = random.Next(h2tArray.Length);
  5853. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5854. }
  5855. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5856. idoFlg[i] = true;
  5857. }
  5858. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5859. {
  5860. if (maid.status.personal.uniqueName == "Pride")
  5861. {
  5862. string text = "s0_";
  5863. Random random = new Random();
  5864. int num4 = random.Next(10000);
  5865. bool flag7 = false;
  5866. for (int k = 0; k < tunArray.Length; k++)
  5867. {
  5868. if (tunArray[k] == num4)
  5869. {
  5870. flag7 = true;
  5871. break;
  5872. }
  5873. }
  5874. if (!flag7)
  5875. {
  5876. text = text + "0" + num4.ToString() + ".ogg";
  5877. if (GameUty.FileSystem.IsExistentFile(text))
  5878. {
  5879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5880. }
  5881. }
  5882. }
  5883. if (maid.status.personal.uniqueName == "Cool")
  5884. {
  5885. string text = "s1_";
  5886. Random random = new Random();
  5887. int num4 = random.Next(10000);
  5888. bool flag7 = false;
  5889. for (int k = 0; k < coolArray.Length; k++)
  5890. {
  5891. if (coolArray[k] == num4)
  5892. {
  5893. flag7 = true;
  5894. break;
  5895. }
  5896. }
  5897. if (!flag7)
  5898. {
  5899. text = text + "0" + num4.ToString() + ".ogg";
  5900. if (GameUty.FileSystem.IsExistentFile(text))
  5901. {
  5902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5903. }
  5904. }
  5905. }
  5906. if (maid.status.personal.uniqueName == "Pure")
  5907. {
  5908. string text = "s2_";
  5909. Random random = new Random();
  5910. int num4 = random.Next(10000);
  5911. bool flag7 = false;
  5912. for (int k = 0; k < pureArray.Length; k++)
  5913. {
  5914. if (pureArray[k] == num4)
  5915. {
  5916. flag7 = true;
  5917. break;
  5918. }
  5919. }
  5920. if (!flag7)
  5921. {
  5922. text = text + "0" + num4.ToString() + ".ogg";
  5923. if (GameUty.FileSystem.IsExistentFile(text))
  5924. {
  5925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5926. }
  5927. }
  5928. }
  5929. if (maid.status.personal.uniqueName == "Yandere")
  5930. {
  5931. string text = "s3_";
  5932. Random random = new Random();
  5933. int num4 = random.Next(10000);
  5934. bool flag7 = false;
  5935. for (int k = 0; k < yanArray.Length; k++)
  5936. {
  5937. if (yanArray[k] == num4)
  5938. {
  5939. flag7 = true;
  5940. break;
  5941. }
  5942. }
  5943. if (!flag7)
  5944. {
  5945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5946. if (GameUty.FileSystem.IsExistentFile(text))
  5947. {
  5948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5949. }
  5950. }
  5951. }
  5952. if (maid.status.personal.uniqueName == "Muku")
  5953. {
  5954. string text = "h0_";
  5955. Random random = new Random();
  5956. int num4 = random.Next(10000);
  5957. bool flag7 = false;
  5958. for (int k = 0; k < h0Array.Length; k++)
  5959. {
  5960. if (h0Array[k] == num4)
  5961. {
  5962. flag7 = true;
  5963. break;
  5964. }
  5965. }
  5966. if (flag7)
  5967. {
  5968. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5969. if (GameUty.FileSystem.IsExistentFile(text))
  5970. {
  5971. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5972. }
  5973. }
  5974. }
  5975. if (maid.status.personal.uniqueName == "Majime")
  5976. {
  5977. string text = "h1_";
  5978. Random random = new Random();
  5979. int num4 = random.Next(10000);
  5980. bool flag7 = false;
  5981. for (int k = 0; k < h1Array.Length; k++)
  5982. {
  5983. if (h1Array[k] == num4)
  5984. {
  5985. flag7 = true;
  5986. break;
  5987. }
  5988. }
  5989. if (flag7)
  5990. {
  5991. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5992. if (GameUty.FileSystem.IsExistentFile(text))
  5993. {
  5994. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5995. }
  5996. }
  5997. }
  5998. if (maid.status.personal.uniqueName == "Rindere")
  5999. {
  6000. string text = "h2_";
  6001. Random random = new Random();
  6002. int num4 = random.Next(10000);
  6003. bool flag7 = false;
  6004. for (int k = 0; k < h2Array.Length; k++)
  6005. {
  6006. if (h2Array[k] == num4)
  6007. {
  6008. flag7 = true;
  6009. break;
  6010. }
  6011. }
  6012. if (flag7)
  6013. {
  6014. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6015. if (GameUty.FileSystem.IsExistentFile(text))
  6016. {
  6017. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6018. }
  6019. }
  6020. }
  6021. idoFlg[i] = true;
  6022. }
  6023. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6024. {
  6025. Vector3 vector = maid.transform.position;
  6026. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6027. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6028. maid.SetPos(vector);
  6029. idoFlg[i] = true;
  6030. }
  6031. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6032. {
  6033. Vector3 vector = maid.transform.position;
  6034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6035. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6036. maid.SetPos(vector);
  6037. idoFlg[i] = true;
  6038. }
  6039. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6040. {
  6041. Vector3 vector = maid.transform.position;
  6042. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6043. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6044. maid.SetPos(vector);
  6045. idoFlg[i] = true;
  6046. }
  6047. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6048. {
  6049. Vector3 vector = maid.transform.position;
  6050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6051. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6052. maid.SetPos(vector);
  6053. idoFlg[i] = true;
  6054. }
  6055. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6056. {
  6057. Vector3 vector = maid.transform.position;
  6058. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6059. maid.SetPos(vector);
  6060. idoFlg[i] = true;
  6061. }
  6062. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6063. {
  6064. Vector3 vector = maid.transform.position;
  6065. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6066. maid.SetPos(vector);
  6067. idoFlg[i] = true;
  6068. }
  6069. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6070. {
  6071. Vector3 vector = maid.transform.position;
  6072. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6073. maid.SetPos(vector);
  6074. idoFlg[i] = true;
  6075. }
  6076. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6077. {
  6078. Vector3 vector = maid.transform.position;
  6079. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6080. maid.SetPos(vector);
  6081. idoFlg[i] = true;
  6082. }
  6083. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6084. {
  6085. Vector3 vector = maid.transform.position;
  6086. vector.y += 0.0075f * speed;
  6087. maid.SetPos(vector);
  6088. idoFlg[i] = true;
  6089. }
  6090. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6091. {
  6092. Vector3 vector = maid.transform.position;
  6093. vector.y -= 0.0075f * speed;
  6094. maid.SetPos(vector);
  6095. idoFlg[i] = true;
  6096. }
  6097. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6098. {
  6099. faceIndex[i]--;
  6100. if (faceIndex[i] <= -1)
  6101. {
  6102. faceIndex[i] = faceArray.Length - 1;
  6103. }
  6104. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6105. idoFlg[i] = true;
  6106. }
  6107. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6108. {
  6109. faceIndex[i]++;
  6110. if (faceIndex[i] == faceArray.Length)
  6111. {
  6112. faceIndex[i] = 0;
  6113. }
  6114. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6115. idoFlg[i] = true;
  6116. }
  6117. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6118. {
  6119. faceBlendIndex[i]++;
  6120. if (faceBlendIndex[i] == faceBlendArray.Length)
  6121. {
  6122. faceBlendIndex[i] = 0;
  6123. }
  6124. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6125. idoFlg[i] = true;
  6126. }
  6127. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6128. {
  6129. idoFlg[i] = true;
  6130. if (i >= 7)
  6131. {
  6132. idoFlg[i - 7] = true;
  6133. }
  6134. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6135. maid.transform.localScale.y * 1.005f,
  6136. maid.transform.localScale.z * 1.005f);
  6137. }
  6138. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6139. {
  6140. idoFlg[i] = true;
  6141. if (i >= 7)
  6142. {
  6143. idoFlg[i - 7] = true;
  6144. }
  6145. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6146. maid.transform.localScale.y * 0.995f,
  6147. maid.transform.localScale.z * 0.995f);
  6148. }
  6149. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6150. {
  6151. idoFlg[i] = true;
  6152. if (i >= 7)
  6153. {
  6154. idoFlg[i - 7] = true;
  6155. }
  6156. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6159. {
  6160. if (!isVR)
  6161. {
  6162. if (goSlot[(int)selectList[i]] != null)
  6163. {
  6164. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6165. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6166. {
  6167. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6168. }
  6169. }
  6170. }
  6171. maid.body0.SetMask(TBody.SlotID.wear, true);
  6172. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6173. maid.body0.SetMask(TBody.SlotID.bra, true);
  6174. maid.body0.SetMask(TBody.SlotID.panz, true);
  6175. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6176. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6177. isWear = true;
  6178. isSkirt = true;
  6179. isBra = true;
  6180. isPanz = true;
  6181. Random random = new Random();
  6182. int num4 = random.Next(2);
  6183. if (num4 == 1)
  6184. {
  6185. maid.body0.SetMask(TBody.SlotID.wear, false);
  6186. }
  6187. if (num4 == 1)
  6188. {
  6189. isWear = false;
  6190. }
  6191. num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isSkirt = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.bra, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isBra = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.panz, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isPanz = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6222. }
  6223. num4 = random.Next(2);
  6224. if (num4 == 1)
  6225. {
  6226. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6227. }
  6228. hFlg = true;
  6229. idoFlg[i] = true;
  6230. if (i >= 7)
  6231. {
  6232. idoFlg[i - 7] = true;
  6233. }
  6234. }
  6235. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6236. {
  6237. poseIndex[i]--;
  6238. if (poseIndex[i] <= -1)
  6239. {
  6240. poseIndex[i] = poseArray.Length - 1;
  6241. }
  6242. if (maid && maid.Visible)
  6243. {
  6244. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6245. isStop[i] = false;
  6246. poseCount[i] = 20;
  6247. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6248. {
  6249. maid.body0.MuneYureL(0f);
  6250. maid.body0.MuneYureR(0f);
  6251. }
  6252. else
  6253. {
  6254. maid.body0.MuneYureL(1f);
  6255. maid.body0.MuneYureR(1f);
  6256. }
  6257. if (array[0].Contains("MultipleMaidsPose"))
  6258. {
  6259. string path = array[0].Split(new char[] { '/' })[1];
  6260. byte[] array2 = new byte[0];
  6261. try
  6262. {
  6263. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6264. {
  6265. array2 = new byte[fileStream.Length];
  6266. fileStream.Read(array2, 0, array2.Length);
  6267. }
  6268. }
  6269. catch { }
  6270. if (0 < array2.Length)
  6271. {
  6272. string text = Path.GetFileName(path);
  6273. long num5 = text.GetHashCode();
  6274. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6275. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6276. {
  6277. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6278. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6279. };
  6280. for (int m = 0; m < array3.Length; m++)
  6281. {
  6282. maid.SetAutoTwist(array3[m], true);
  6283. }
  6284. }
  6285. }
  6286. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6287. {
  6288. loadPose[i] = array[0];
  6289. }
  6290. else if (!array[0].StartsWith("dance_"))
  6291. {
  6292. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6293. }
  6294. else
  6295. {
  6296. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6297. {
  6298. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6299. }
  6300. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6301. }
  6302. if (array.Length > 1)
  6303. {
  6304. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6305. isStop[i] = true;
  6306. if (array.Length > 2)
  6307. {
  6308. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6309. isPoseIti[i] = true;
  6310. poseIti[i] = maidArray[i].transform.position;
  6311. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6312. }
  6313. }
  6314. }
  6315. idoFlg[i] = true;
  6316. if (i >= 7)
  6317. {
  6318. idoFlg[i - 7] = true;
  6319. }
  6320. }
  6321. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6322. {
  6323. int num7 = poseIndex[i];
  6324. for (int k = 0; k < groupList.Count; k++)
  6325. {
  6326. if (poseIndex[i] < (int)groupList[k])
  6327. {
  6328. poseIndex[i] = (int)groupList[k];
  6329. break;
  6330. }
  6331. }
  6332. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6333. {
  6334. poseIndex[i] = 0;
  6335. }
  6336. if (maid && maid.Visible)
  6337. {
  6338. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6339. isStop[i] = false;
  6340. poseCount[i] = 20;
  6341. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6342. {
  6343. maid.body0.MuneYureL(0f);
  6344. maid.body0.MuneYureR(0f);
  6345. }
  6346. else
  6347. {
  6348. maid.body0.MuneYureL(1f);
  6349. maid.body0.MuneYureR(1f);
  6350. }
  6351. if (array[0].Contains("MultipleMaidsPose"))
  6352. {
  6353. string path = array[0].Split(new char[] { '/' })[1];
  6354. byte[] array2 = new byte[0];
  6355. try
  6356. {
  6357. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6358. {
  6359. array2 = new byte[fileStream.Length];
  6360. fileStream.Read(array2, 0, array2.Length);
  6361. }
  6362. }
  6363. catch { }
  6364. if (0 < array2.Length)
  6365. {
  6366. string text = Path.GetFileName(path);
  6367. long num5 = text.GetHashCode();
  6368. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6369. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6370. {
  6371. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6372. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6373. };
  6374. for (int m = 0; m < array3.Length; m++)
  6375. {
  6376. maid.SetAutoTwist(array3[m], true);
  6377. }
  6378. }
  6379. }
  6380. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6381. {
  6382. loadPose[i] = array[0];
  6383. }
  6384. else if (!array[0].StartsWith("dance_"))
  6385. {
  6386. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6387. }
  6388. else
  6389. {
  6390. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6391. {
  6392. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6393. }
  6394. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6395. }
  6396. if (array.Length > 1)
  6397. {
  6398. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6399. isStop[i] = true;
  6400. if (array.Length > 2)
  6401. {
  6402. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6403. isPoseIti[i] = true;
  6404. poseIti[i] = maidArray[i].transform.position;
  6405. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6406. }
  6407. }
  6408. }
  6409. idoFlg[i] = true;
  6410. if (i >= 7)
  6411. {
  6412. idoFlg[i - 7] = true;
  6413. }
  6414. }
  6415. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6416. {
  6417. for (int k = 0; k < groupList.Count; k++)
  6418. {
  6419. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6420. {
  6421. if (poseIndex[i] == 0)
  6422. {
  6423. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6424. }
  6425. else
  6426. {
  6427. poseIndex[i] = 0;
  6428. }
  6429. break;
  6430. }
  6431. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6432. {
  6433. poseIndex[i] = (int)groupList[k - 1];
  6434. break;
  6435. }
  6436. }
  6437. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6438. {
  6439. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6440. }
  6441. if (maid && maid.Visible)
  6442. {
  6443. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6444. isStop[i] = false;
  6445. poseCount[i] = 20;
  6446. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6447. {
  6448. maid.body0.MuneYureL(0f);
  6449. maid.body0.MuneYureR(0f);
  6450. }
  6451. else
  6452. {
  6453. maid.body0.MuneYureL(1f);
  6454. maid.body0.MuneYureR(1f);
  6455. }
  6456. if (array[0].Contains("MultipleMaidsPose"))
  6457. {
  6458. string path = array[0].Split(new char[] { '/' })[1];
  6459. byte[] array2 = new byte[0];
  6460. try
  6461. {
  6462. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6463. {
  6464. array2 = new byte[fileStream.Length];
  6465. fileStream.Read(array2, 0, array2.Length);
  6466. }
  6467. }
  6468. catch { }
  6469. if (0 < array2.Length)
  6470. {
  6471. string text = Path.GetFileName(path);
  6472. long num5 = text.GetHashCode();
  6473. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6474. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6475. {
  6476. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6477. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6478. };
  6479. for (int m = 0; m < array3.Length; m++)
  6480. {
  6481. maid.SetAutoTwist(array3[m], true);
  6482. }
  6483. }
  6484. }
  6485. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6486. {
  6487. loadPose[i] = array[0];
  6488. }
  6489. else if (!array[0].StartsWith("dance_"))
  6490. {
  6491. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6492. }
  6493. else
  6494. {
  6495. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6496. {
  6497. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6498. }
  6499. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6500. }
  6501. if (array.Length > 1)
  6502. {
  6503. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6504. isStop[i] = true;
  6505. if (array.Length > 2)
  6506. {
  6507. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6508. isPoseIti[i] = true;
  6509. poseIti[i] = maidArray[i].transform.position;
  6510. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6511. }
  6512. }
  6513. }
  6514. idoFlg[i] = true;
  6515. if (i >= 7)
  6516. {
  6517. idoFlg[i - 7] = true;
  6518. }
  6519. }
  6520. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6521. {
  6522. headEyeIndex[i]++;
  6523. if (headEyeIndex[i] == headEyeArray.Length)
  6524. {
  6525. headEyeIndex[i] = 0;
  6526. }
  6527. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6528. maid.body0.boHeadToCam = true;
  6529. maid.body0.boEyeToCam = true;
  6530. if (headEyeIndex[i] == 0)
  6531. {
  6532. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6533. maid.body0.boHeadToCam = true;
  6534. maid.body0.boEyeToCam = true;
  6535. }
  6536. else
  6537. {
  6538. maid.body0.trsLookTarget = null;
  6539. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6540. if (headEyeIndex[i] == 1)
  6541. {
  6542. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6543. }
  6544. if (headEyeIndex[i] == 2)
  6545. {
  6546. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6547. }
  6548. if (headEyeIndex[i] == 3)
  6549. {
  6550. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6551. }
  6552. if (headEyeIndex[i] == 4)
  6553. {
  6554. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6555. }
  6556. if (headEyeIndex[i] == 5)
  6557. {
  6558. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6559. }
  6560. if (headEyeIndex[i] == 6)
  6561. {
  6562. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6563. }
  6564. if (headEyeIndex[i] == 7)
  6565. {
  6566. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6567. }
  6568. if (headEyeIndex[i] == 8)
  6569. {
  6570. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6571. }
  6572. if (headEyeIndex[i] == 9)
  6573. {
  6574. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6575. }
  6576. }
  6577. idoFlg[i] = true;
  6578. if (i >= 7)
  6579. {
  6580. idoFlg[i - 7] = true;
  6581. }
  6582. }
  6583. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6584. {
  6585. idoFlg[i] = true;
  6586. if (i >= 7)
  6587. {
  6588. idoFlg[i - 7] = true;
  6589. }
  6590. }
  6591. else if (Input.GetKeyUp(key))
  6592. {
  6593. if (idoFlg[i])
  6594. {
  6595. idoFlg[i] = false;
  6596. }
  6597. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6598. {
  6599. if (!isLock[i])
  6600. {
  6601. poseIndex[i]++;
  6602. if (poseIndex[i] == poseArray.Length)
  6603. {
  6604. poseIndex[i] = 0;
  6605. }
  6606. if (maid && maid.Visible)
  6607. {
  6608. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6609. isStop[i] = false;
  6610. poseCount[i] = 20;
  6611. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6612. {
  6613. maid.body0.MuneYureL(0f);
  6614. maid.body0.MuneYureR(0f);
  6615. }
  6616. else
  6617. {
  6618. maid.body0.MuneYureL(1f);
  6619. maid.body0.MuneYureR(1f);
  6620. }
  6621. if (array[0].Contains("MultipleMaidsPose"))
  6622. {
  6623. string path = array[0].Split(new char[] { '/' })[1];
  6624. byte[] array2 = new byte[0];
  6625. try
  6626. {
  6627. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6628. {
  6629. array2 = new byte[fileStream.Length];
  6630. fileStream.Read(array2, 0, array2.Length);
  6631. }
  6632. }
  6633. catch { }
  6634. if (0 < array2.Length)
  6635. {
  6636. string text = Path.GetFileName(path);
  6637. long num5 = text.GetHashCode();
  6638. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6639. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6640. {
  6641. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6642. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6643. };
  6644. for (int m = 0; m < array3.Length; m++)
  6645. {
  6646. maid.SetAutoTwist(array3[m], true);
  6647. }
  6648. }
  6649. }
  6650. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6651. {
  6652. loadPose[i] = array[0];
  6653. }
  6654. else if (!array[0].StartsWith("dance_"))
  6655. {
  6656. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6657. }
  6658. else
  6659. {
  6660. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6661. {
  6662. maid.body0.LoadAnime(array[0] + ".anm",
  6663. GameUty.FileSystem,
  6664. array[0] + ".anm",
  6665. false,
  6666. false);
  6667. }
  6668. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6669. }
  6670. if (array.Length > 1)
  6671. {
  6672. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6673. isStop[i] = true;
  6674. if (array.Length > 2)
  6675. {
  6676. Transform transform2 =
  6677. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6678. isPoseIti[i] = true;
  6679. poseIti[i] = maidArray[i].transform.position;
  6680. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6681. }
  6682. }
  6683. }
  6684. }
  6685. }
  6686. }
  6687. goto IL_1688E;
  6688. }
  6689. }
  6690. if (Input.GetKeyDown(KeyCode.E)) { }
  6691. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6692. {
  6693. bGui = false;
  6694. }
  6695. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6696. {
  6697. sceneFlg = true;
  6698. faceFlg = false;
  6699. poseFlg = false;
  6700. kankyoFlg = false;
  6701. kankyo2Flg = false;
  6702. bGui = true;
  6703. for (int i = 0; i < 10; i++)
  6704. {
  6705. date[i] = "未保存";
  6706. ninzu[i] = "";
  6707. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6708. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6709. {
  6710. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6711. if (array4.Length >= 2)
  6712. {
  6713. string[] array5 = array4[0].Split(new char[] { ',' });
  6714. date[i] = array5[0];
  6715. ninzu[i] = array5[1] + "人";
  6716. }
  6717. }
  6718. }
  6719. }
  6720. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6721. {
  6722. bgmIndex--;
  6723. if (bgmIndex <= -1)
  6724. {
  6725. bgmIndex = bgmArray.Length - 1;
  6726. }
  6727. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6728. bgmCombo.selectedItemIndex = bgmIndex;
  6729. }
  6730. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6731. {
  6732. bgmIndex++;
  6733. if (bgmIndex == bgmArray.Length)
  6734. {
  6735. bgmIndex = 0;
  6736. }
  6737. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6738. bgmCombo.selectedItemIndex = bgmIndex;
  6739. }
  6740. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6741. {
  6742. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6743. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6744. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6745. if (isMessage)
  6746. {
  6747. isMessage = false;
  6748. messageWindowMgr.CloseMessageWindowPanel();
  6749. }
  6750. else if (!bGuiMessage)
  6751. {
  6752. bGuiMessage = true;
  6753. }
  6754. else
  6755. {
  6756. bGuiMessage = false;
  6757. isMessage = false;
  6758. messageWindowMgr.CloseMessageWindowPanel();
  6759. }
  6760. }
  6761. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6762. {
  6763. escFlg = true;
  6764. for (int j = 0; j < maidCnt; j++)
  6765. {
  6766. if (maidArray[j] && maidArray[j].Visible)
  6767. {
  6768. maidArray[j].StopKuchipakuPattern();
  6769. if (isDanceStart7V)
  6770. {
  6771. maidArray[j].SetPos(dancePos[j]);
  6772. maidArray[j].body0.transform.localRotation = danceRot[j];
  6773. }
  6774. if (isDanceStart8V)
  6775. {
  6776. maidArray[j].SetPos(dancePos[j]);
  6777. maidArray[j].body0.transform.localRotation = danceRot[j];
  6778. }
  6779. if (isDanceStart11V)
  6780. {
  6781. maidArray[j].SetPos(dancePos[j]);
  6782. maidArray[j].body0.transform.localRotation = danceRot[j];
  6783. }
  6784. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6785. || isDanceStart13K)
  6786. {
  6787. maidArray[j].SetPos(dancePos[j]);
  6788. maidArray[j].body0.transform.localRotation = danceRot[j];
  6789. int i = j;
  6790. if (!isVR)
  6791. {
  6792. delCount[i] = 20;
  6793. if (goSlot[(int)selectList[i]] != null)
  6794. {
  6795. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6796. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6797. {
  6798. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6799. }
  6800. }
  6801. }
  6802. Maid maid = maidArray[j];
  6803. maid.DelProp(MPN.handitem, true);
  6804. maid.DelProp(MPN.accvag, true);
  6805. maid.DelProp(MPN.accanl, true);
  6806. maid.DelProp(MPN.kousoku_upper, true);
  6807. maid.DelProp(MPN.kousoku_lower, true);
  6808. maid.AllProcPropSeqStart();
  6809. }
  6810. if (isDanceStart14V)
  6811. {
  6812. maidArray[j].SetPos(dancePos[j]);
  6813. maidArray[j].body0.transform.localRotation = danceRot[j];
  6814. }
  6815. if (isDanceStart15V)
  6816. {
  6817. maidArray[j].SetPos(dancePos[j]);
  6818. maidArray[j].body0.transform.localRotation = danceRot[j];
  6819. }
  6820. }
  6821. }
  6822. isDanceStart1F = false;
  6823. isDanceStart1K = false;
  6824. isDanceStart2F = false;
  6825. isDanceStart3F = false;
  6826. isDanceStart3K = false;
  6827. isDanceStart4F = false;
  6828. isDanceStart4K = false;
  6829. isDanceStart5F = false;
  6830. isDanceStart5K = false;
  6831. isDanceStart6F = false;
  6832. isDanceStart6K = false;
  6833. isDanceStart7F = false;
  6834. isDanceStart7V = false;
  6835. isDanceStart8F = false;
  6836. isDanceStart8V = false;
  6837. isDanceStart8P = false;
  6838. isDanceStart9F = false;
  6839. isDanceStart9K = false;
  6840. isDanceStart10F = false;
  6841. isDanceStart11F = false;
  6842. isDanceStart11V = false;
  6843. isDanceStart12F = false;
  6844. isDanceStart13F = false;
  6845. isDanceStart13K = false;
  6846. isDanceStart14F = false;
  6847. isDanceStart14V = false;
  6848. isDanceStart15F = false;
  6849. isDanceStart15V = false;
  6850. for (int j = 0; j < maidCnt; j++)
  6851. {
  6852. danceFace[j] = 0f;
  6853. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6854. maidArray[j].SetAutoTwistAll(true);
  6855. }
  6856. danceCheckIndex = 0;
  6857. for (int k = 0; k < danceCheck.Length; k++)
  6858. {
  6859. danceCheck[danceCheckIndex] = 1f;
  6860. }
  6861. isDance = false;
  6862. isDanceChu = false;
  6863. if (maidArray[1] && maidArray[1].Visible)
  6864. {
  6865. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6866. {
  6867. Vector3 vector = Vector3.zero;
  6868. vector.x = 0.6f;
  6869. maidArray[1].SetPos(vector);
  6870. if (maidArray[2] && maidArray[2].Visible)
  6871. {
  6872. vector.x = -0.6f;
  6873. maidArray[2].SetPos(vector);
  6874. }
  6875. if (maidArray[3] && maidArray[3].Visible)
  6876. {
  6877. vector.x = 1.2f;
  6878. maidArray[3].SetPos(vector);
  6879. }
  6880. if (maidArray[4] && maidArray[4].Visible)
  6881. {
  6882. vector.x = -1.2f;
  6883. maidArray[4].SetPos(vector);
  6884. }
  6885. if (maidArray[5] && maidArray[5].Visible)
  6886. {
  6887. vector.x = 1.8f;
  6888. maidArray[5].SetPos(vector);
  6889. }
  6890. if (maidArray[6] && maidArray[6].Visible)
  6891. {
  6892. vector.x = -1.8f;
  6893. maidArray[6].SetPos(vector);
  6894. }
  6895. if (maidArray[7] && maidArray[7].Visible)
  6896. {
  6897. vector.x = 2.4f;
  6898. maidArray[7].SetPos(vector);
  6899. }
  6900. if (maidArray[8] && maidArray[8].Visible)
  6901. {
  6902. vector.x = -2.4f;
  6903. maidArray[8].SetPos(vector);
  6904. }
  6905. if (maidArray[9] && maidArray[9].Visible)
  6906. {
  6907. vector.x = 3f;
  6908. maidArray[9].SetPos(vector);
  6909. }
  6910. if (maidArray[10] && maidArray[10].Visible)
  6911. {
  6912. vector.x = -3f;
  6913. maidArray[10].SetPos(vector);
  6914. }
  6915. if (maidArray[11] && maidArray[11].Visible)
  6916. {
  6917. vector.x = 3.6f;
  6918. maidArray[11].SetPos(vector);
  6919. }
  6920. if (maidArray[12] && maidArray[12].Visible)
  6921. {
  6922. vector.x = -3.6f;
  6923. maidArray[12].SetPos(vector);
  6924. }
  6925. if (maidArray[13] && maidArray[13].Visible)
  6926. {
  6927. vector.x = 4.2f;
  6928. maidArray[13].SetPos(vector);
  6929. }
  6930. }
  6931. }
  6932. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6933. }
  6934. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6935. {
  6936. if (isScript)
  6937. {
  6938. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6939. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6940. if (isPanel)
  6941. {
  6942. isPanel = false;
  6943. }
  6944. else
  6945. {
  6946. isPanel = true;
  6947. }
  6948. gameObject5.SetActive(isPanel);
  6949. }
  6950. else
  6951. {
  6952. bGui = !bGui;
  6953. }
  6954. }
  6955. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6956. {
  6957. keyFlg = true;
  6958. bgIndex--;
  6959. if (bgIndex <= -1)
  6960. {
  6961. bgIndex = bgArray.Length - 1;
  6962. }
  6963. if (!moveBg)
  6964. {
  6965. bg.localScale = new Vector3(1f, 1f, 1f);
  6966. if (bgArray[bgIndex].Length == 36)
  6967. {
  6968. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6969. }
  6970. else
  6971. {
  6972. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6973. }
  6974. bgCombo.selectedItemIndex = bgIndex;
  6975. if (bgArray[bgIndex] == "karaokeroom")
  6976. {
  6977. bg.transform.position = bgObject.transform.position;
  6978. Vector3 vector = Vector3.zero;
  6979. Vector3 zero3 = Vector3.zero;
  6980. zero3.y = 90f;
  6981. vector.z = 4f;
  6982. vector.x = 1f;
  6983. bg.transform.localPosition = vector;
  6984. bg.transform.localRotation = Quaternion.Euler(zero3);
  6985. }
  6986. }
  6987. }
  6988. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6989. {
  6990. keyFlg = true;
  6991. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6992. }
  6993. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6994. {
  6995. keyFlg = true;
  6996. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6997. }
  6998. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6999. {
  7000. keyFlg = true;
  7001. bg.localScale = new Vector3(1f, 1f, 1f);
  7002. }
  7003. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7004. {
  7005. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7006. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7007. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7008. Vector3 vector = bg.position;
  7009. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7010. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7011. bg.localPosition = vector;
  7012. if (Input.GetKey(KeyCode.Y))
  7013. {
  7014. keyFlg = true;
  7015. }
  7016. }
  7017. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7018. {
  7019. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7020. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7021. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7022. Vector3 vector = bg.position;
  7023. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7024. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7025. bg.localPosition = vector;
  7026. if (Input.GetKey(KeyCode.Y))
  7027. {
  7028. keyFlg = true;
  7029. }
  7030. }
  7031. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7032. {
  7033. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7034. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7035. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7036. Vector3 vector = bg.position;
  7037. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7038. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7039. bg.localPosition = vector;
  7040. if (Input.GetKey(KeyCode.Y))
  7041. {
  7042. keyFlg = true;
  7043. }
  7044. }
  7045. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7046. {
  7047. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7048. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7049. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7050. Vector3 vector = bg.position;
  7051. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7053. bg.localPosition = vector;
  7054. if (Input.GetKey(KeyCode.Y))
  7055. {
  7056. keyFlg = true;
  7057. }
  7058. }
  7059. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7060. {
  7061. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7062. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7063. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7064. Vector3 vector = bg.position;
  7065. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7066. bg.localPosition = vector;
  7067. if (Input.GetKey(KeyCode.Y))
  7068. {
  7069. keyFlg = true;
  7070. }
  7071. }
  7072. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7073. {
  7074. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7075. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7076. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7077. Vector3 vector = bg.position;
  7078. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7079. bg.localPosition = vector;
  7080. if (Input.GetKey(KeyCode.Y))
  7081. {
  7082. keyFlg = true;
  7083. }
  7084. }
  7085. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7086. {
  7087. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7088. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7089. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7090. Vector3 vector = bg.position;
  7091. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7092. bg.localPosition = vector;
  7093. if (Input.GetKey(KeyCode.Y))
  7094. {
  7095. keyFlg = true;
  7096. }
  7097. }
  7098. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7099. {
  7100. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7101. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7102. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7103. Vector3 vector = bg.position;
  7104. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7105. bg.localPosition = vector;
  7106. if (Input.GetKey(KeyCode.Y))
  7107. {
  7108. keyFlg = true;
  7109. }
  7110. }
  7111. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7112. {
  7113. Vector3 vector = bg.position;
  7114. vector.y -= 0.015f * speed;
  7115. bg.localPosition = vector;
  7116. if (Input.GetKey(KeyCode.Y))
  7117. {
  7118. keyFlg = true;
  7119. }
  7120. }
  7121. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7122. {
  7123. Vector3 vector = bg.position;
  7124. vector.y += 0.015f * speed;
  7125. bg.localPosition = vector;
  7126. if (Input.GetKey(KeyCode.Y))
  7127. {
  7128. keyFlg = true;
  7129. }
  7130. }
  7131. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7132. {
  7133. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7134. if (Input.GetKey(KeyCode.Y))
  7135. {
  7136. keyFlg = true;
  7137. }
  7138. }
  7139. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7140. {
  7141. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7142. if (Input.GetKey(KeyCode.Y))
  7143. {
  7144. keyFlg = true;
  7145. }
  7146. }
  7147. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7148. {
  7149. if (Input.GetKey(KeyCode.Y))
  7150. {
  7151. keyFlg = true;
  7152. }
  7153. }
  7154. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7155. {
  7156. if (keyFlg)
  7157. {
  7158. keyFlg = false;
  7159. }
  7160. else
  7161. {
  7162. bgIndex++;
  7163. if (bgIndex == bgArray.Length)
  7164. {
  7165. bgIndex = 0;
  7166. }
  7167. if (!moveBg)
  7168. {
  7169. bg.localScale = new Vector3(1f, 1f, 1f);
  7170. if (bgArray[bgIndex].Length == 36)
  7171. {
  7172. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7173. }
  7174. else
  7175. {
  7176. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7177. }
  7178. bgCombo.selectedItemIndex = bgIndex;
  7179. if (bgArray[bgIndex] == "karaokeroom")
  7180. {
  7181. bg.transform.position = bgObject.transform.position;
  7182. Vector3 vector = Vector3.zero;
  7183. Vector3 zero3 = Vector3.zero;
  7184. zero3.y = 90f;
  7185. vector.z = 4f;
  7186. vector.x = 1f;
  7187. bg.transform.localPosition = vector;
  7188. bg.transform.localRotation = Quaternion.Euler(zero3);
  7189. }
  7190. }
  7191. }
  7192. }
  7193. if (maidArray[0] != null && maidArray[0].Visible)
  7194. {
  7195. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7196. {
  7197. int[] array6 = new int[1];
  7198. int[] array7 = array6;
  7199. if (maidCnt == 2)
  7200. {
  7201. array7 = new int[] { 0, 1 };
  7202. }
  7203. if (maidCnt == 3)
  7204. {
  7205. array7 = new int[] { 0, 1, 2 };
  7206. }
  7207. if (maidCnt == 4)
  7208. {
  7209. array7 = new int[] { 0, 1, 2, 3 };
  7210. }
  7211. if (maidCnt == 5)
  7212. {
  7213. array7 = new int[] { 0, 1, 2, 3, 4 };
  7214. }
  7215. if (maidCnt == 6)
  7216. {
  7217. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7218. }
  7219. if (maidCnt == 7)
  7220. {
  7221. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7222. }
  7223. if (maidCnt == 8)
  7224. {
  7225. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7226. }
  7227. if (maidCnt == 9)
  7228. {
  7229. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7230. }
  7231. if (maidCnt == 10)
  7232. {
  7233. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7234. }
  7235. if (maidCnt == 11)
  7236. {
  7237. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7238. }
  7239. if (maidCnt == 12)
  7240. {
  7241. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7242. }
  7243. Random random = new Random();
  7244. int n = array7.Length;
  7245. while (n > 1)
  7246. {
  7247. n--;
  7248. int j = random.Next(n + 1);
  7249. int num8 = array7[j];
  7250. array7[j] = array7[n];
  7251. array7[n] = num8;
  7252. }
  7253. int[] array8 = new int[maidCnt];
  7254. Vector3[] array9 = new Vector3[maidCnt];
  7255. Vector3[] array10 = new Vector3[maidCnt];
  7256. int[] array11 = new int[maidCnt];
  7257. for (int i = 0; i < maidCnt; i++)
  7258. {
  7259. array8[array7[i]] = poseIndex[array7[i]];
  7260. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7261. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7262. array11[array7[i]] = headEyeIndex[array7[i]];
  7263. }
  7264. for (int i = 0; i < maidCnt; i++)
  7265. {
  7266. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7267. {
  7268. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7269. isStop[i] = false;
  7270. poseCount[i] = 20;
  7271. Maid maid = maidArray[i];
  7272. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7273. {
  7274. maid.body0.MuneYureL(0f);
  7275. maid.body0.MuneYureR(0f);
  7276. }
  7277. else
  7278. {
  7279. maid.body0.MuneYureL(1f);
  7280. maid.body0.MuneYureR(1f);
  7281. }
  7282. if (array12[0].Contains("MultipleMaidsPose"))
  7283. {
  7284. string path = array12[0].Split(new char[] { '/' })[1];
  7285. byte[] array2 = new byte[0];
  7286. try
  7287. {
  7288. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7289. {
  7290. array2 = new byte[fileStream.Length];
  7291. fileStream.Read(array2, 0, array2.Length);
  7292. }
  7293. }
  7294. catch { }
  7295. if (0 < array2.Length)
  7296. {
  7297. string text = Path.GetFileName(path);
  7298. long num5 = text.GetHashCode();
  7299. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7300. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7301. {
  7302. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7303. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7304. };
  7305. for (int m = 0; m < array3.Length; m++)
  7306. {
  7307. maid.SetAutoTwist(array3[m], true);
  7308. }
  7309. }
  7310. }
  7311. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7312. {
  7313. loadPose[i] = array12[0];
  7314. }
  7315. else if (!array12[0].StartsWith("dance_"))
  7316. {
  7317. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7318. }
  7319. else
  7320. {
  7321. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7322. {
  7323. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7324. GameUty.FileSystem,
  7325. array12[0] + ".anm",
  7326. false,
  7327. false);
  7328. }
  7329. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7330. }
  7331. if (array12.Length > 1)
  7332. {
  7333. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7334. float.Parse(array12[1]);
  7335. isStop[i] = true;
  7336. if (array12.Length > 2)
  7337. {
  7338. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7339. isPoseIti[i] = true;
  7340. poseIti[i] = maidArray[i].transform.position;
  7341. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7342. }
  7343. }
  7344. }
  7345. poseIndex[i] = array8[array7[i]];
  7346. maidArray[i].SetRot(array9[array7[i]]);
  7347. maidArray[i].SetPos(array10[array7[i]]);
  7348. headEyeIndex[i] = array11[array7[i]];
  7349. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7350. maidArray[i].body0.boHeadToCam = true;
  7351. maidArray[i].body0.boEyeToCam = true;
  7352. if (headEyeIndex[i] == 0)
  7353. {
  7354. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7355. maidArray[i].body0.boHeadToCam = true;
  7356. maidArray[i].body0.boEyeToCam = true;
  7357. }
  7358. else
  7359. {
  7360. maidArray[i].body0.trsLookTarget = null;
  7361. if (headEyeIndex[i] == 1)
  7362. {
  7363. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7364. }
  7365. if (headEyeIndex[i] == 2)
  7366. {
  7367. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7368. }
  7369. if (headEyeIndex[i] == 3)
  7370. {
  7371. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7372. }
  7373. if (headEyeIndex[i] == 4)
  7374. {
  7375. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7376. }
  7377. if (headEyeIndex[i] == 5)
  7378. {
  7379. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7380. }
  7381. if (headEyeIndex[i] == 6)
  7382. {
  7383. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7384. }
  7385. if (headEyeIndex[i] == 7)
  7386. {
  7387. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7388. }
  7389. if (headEyeIndex[i] == 8)
  7390. {
  7391. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7392. }
  7393. if (headEyeIndex[i] == 9)
  7394. {
  7395. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7396. }
  7397. }
  7398. }
  7399. }
  7400. else if (Input.GetKeyDown(KeyCode.Comma))
  7401. {
  7402. int[] array8 = new int[maidCnt];
  7403. Vector3[] array9 = new Vector3[maidCnt];
  7404. Vector3[] array10 = new Vector3[maidCnt];
  7405. int[] array11 = new int[maidCnt];
  7406. for (int i = 0; i < maidCnt; i++)
  7407. {
  7408. array8[i] = poseIndex[i];
  7409. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7410. array10[i] = maidArray[i].transform.position;
  7411. array11[i] = headEyeIndex[i];
  7412. }
  7413. for (int i = 0; i < maidCnt; i++)
  7414. {
  7415. if (i == 0)
  7416. {
  7417. if (!isLock[i])
  7418. {
  7419. if (maidArray[i] && maidArray[i].Visible)
  7420. {
  7421. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7422. isStop[i] = false;
  7423. poseCount[i] = 20;
  7424. Maid maid = maidArray[i];
  7425. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7426. {
  7427. maid.body0.MuneYureL(0f);
  7428. maid.body0.MuneYureR(0f);
  7429. }
  7430. else
  7431. {
  7432. maid.body0.MuneYureL(1f);
  7433. maid.body0.MuneYureR(1f);
  7434. }
  7435. if (array12[0].Contains("MultipleMaidsPose"))
  7436. {
  7437. string path = array12[0].Split(new char[] { '/' })[1];
  7438. byte[] array2 = new byte[0];
  7439. try
  7440. {
  7441. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7442. {
  7443. array2 = new byte[fileStream.Length];
  7444. fileStream.Read(array2, 0, array2.Length);
  7445. }
  7446. }
  7447. catch { }
  7448. if (0 < array2.Length)
  7449. {
  7450. string text = Path.GetFileName(path);
  7451. long num5 = text.GetHashCode();
  7452. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7453. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7454. {
  7455. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7456. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7457. };
  7458. for (int m = 0; m < array3.Length; m++)
  7459. {
  7460. maid.SetAutoTwist(array3[m], true);
  7461. }
  7462. }
  7463. }
  7464. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7465. {
  7466. loadPose[i] = array12[0];
  7467. }
  7468. else if (!array12[0].StartsWith("dance_"))
  7469. {
  7470. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7471. }
  7472. else
  7473. {
  7474. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7475. {
  7476. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7477. GameUty.FileSystem,
  7478. array12[0] + ".anm",
  7479. false,
  7480. false);
  7481. }
  7482. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7483. }
  7484. if (array12.Length > 1)
  7485. {
  7486. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7487. float.Parse(array12[1]);
  7488. isStop[i] = true;
  7489. if (array12.Length > 2)
  7490. {
  7491. Transform transform2 =
  7492. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7493. isPoseIti[i] = true;
  7494. poseIti[i] = maidArray[i].transform.position;
  7495. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7496. }
  7497. }
  7498. }
  7499. }
  7500. poseIndex[i] = array8[maidCnt - i - 1];
  7501. headEyeIndex[i] = array11[maidCnt - i - 1];
  7502. }
  7503. else
  7504. {
  7505. if (!isLock[i])
  7506. {
  7507. if (maidArray[i] && maidArray[i].Visible)
  7508. {
  7509. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7510. isStop[i] = false;
  7511. poseCount[i] = 20;
  7512. Maid maid = maidArray[i];
  7513. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7514. {
  7515. maid.body0.MuneYureL(0f);
  7516. maid.body0.MuneYureR(0f);
  7517. }
  7518. else
  7519. {
  7520. maid.body0.MuneYureL(1f);
  7521. maid.body0.MuneYureR(1f);
  7522. }
  7523. if (array12[0].Contains("MultipleMaidsPose"))
  7524. {
  7525. string path = array12[0].Split(new char[] { '/' })[1];
  7526. byte[] array2 = new byte[0];
  7527. try
  7528. {
  7529. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7530. {
  7531. array2 = new byte[fileStream.Length];
  7532. fileStream.Read(array2, 0, array2.Length);
  7533. }
  7534. }
  7535. catch { }
  7536. if (0 < array2.Length)
  7537. {
  7538. string text = Path.GetFileName(path);
  7539. long num5 = text.GetHashCode();
  7540. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7541. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7542. {
  7543. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7544. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7545. };
  7546. for (int m = 0; m < array3.Length; m++)
  7547. {
  7548. maid.SetAutoTwist(array3[m], true);
  7549. }
  7550. }
  7551. }
  7552. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7553. {
  7554. loadPose[i] = array12[0];
  7555. }
  7556. else if (!array12[0].StartsWith("dance_"))
  7557. {
  7558. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7559. }
  7560. else
  7561. {
  7562. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7563. {
  7564. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7565. GameUty.FileSystem,
  7566. array12[0] + ".anm",
  7567. false,
  7568. false);
  7569. }
  7570. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7571. }
  7572. if (array12.Length > 1)
  7573. {
  7574. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7575. float.Parse(array12[1]);
  7576. isStop[i] = true;
  7577. if (array12.Length > 2)
  7578. {
  7579. Transform transform2 =
  7580. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7581. isPoseIti[i] = true;
  7582. poseIti[i] = maidArray[i].transform.position;
  7583. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7584. }
  7585. }
  7586. }
  7587. }
  7588. poseIndex[i] = array8[i - 1];
  7589. headEyeIndex[i] = array11[i - 1];
  7590. }
  7591. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7592. maidArray[i].body0.boHeadToCam = true;
  7593. maidArray[i].body0.boEyeToCam = true;
  7594. if (headEyeIndex[i] == 0)
  7595. {
  7596. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7597. maidArray[i].body0.boHeadToCam = true;
  7598. maidArray[i].body0.boEyeToCam = true;
  7599. }
  7600. else
  7601. {
  7602. maidArray[i].body0.trsLookTarget = null;
  7603. if (headEyeIndex[i] == 1)
  7604. {
  7605. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7606. }
  7607. if (headEyeIndex[i] == 2)
  7608. {
  7609. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7610. }
  7611. if (headEyeIndex[i] == 3)
  7612. {
  7613. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7614. }
  7615. if (headEyeIndex[i] == 4)
  7616. {
  7617. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7618. }
  7619. if (headEyeIndex[i] == 5)
  7620. {
  7621. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7622. }
  7623. if (headEyeIndex[i] == 6)
  7624. {
  7625. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7626. }
  7627. if (headEyeIndex[i] == 7)
  7628. {
  7629. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7630. }
  7631. if (headEyeIndex[i] == 8)
  7632. {
  7633. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7634. }
  7635. if (headEyeIndex[i] == 9)
  7636. {
  7637. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7638. }
  7639. }
  7640. if (i == 0)
  7641. {
  7642. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7643. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7644. }
  7645. else
  7646. {
  7647. maidArray[i].SetRot(array9[i - 1]);
  7648. maidArray[i].SetPos(array10[i - 1]);
  7649. }
  7650. }
  7651. }
  7652. for (int i = 0; i < maidCnt; i++)
  7653. {
  7654. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7655. {
  7656. if (maidArray[i] && maidArray[i].Visible)
  7657. {
  7658. maidArray[i].body0.transform.localRotation =
  7659. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7660. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7661. }
  7662. }
  7663. else if (Input.GetKey(KeyCode.B))
  7664. {
  7665. if (maidArray[i] && maidArray[i].Visible)
  7666. {
  7667. maidArray[i].body0.transform.localRotation =
  7668. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7669. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7670. }
  7671. }
  7672. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7673. {
  7674. if (maidArray[1] && maidArray[1].Visible)
  7675. {
  7676. if (maidArray[0].transform.position == maidArray[1].transform.position
  7677. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7678. {
  7679. Vector3 vector = Vector3.zero;
  7680. vector.x = 0.6f;
  7681. maidArray[1].SetPos(vector);
  7682. if (maidArray[2] && maidArray[2].Visible)
  7683. {
  7684. vector.x = -0.6f;
  7685. maidArray[2].SetPos(vector);
  7686. }
  7687. if (maidArray[3] && maidArray[3].Visible)
  7688. {
  7689. vector.x = 1.2f;
  7690. maidArray[3].SetPos(vector);
  7691. }
  7692. if (maidArray[4] && maidArray[4].Visible)
  7693. {
  7694. vector.x = -1.2f;
  7695. maidArray[4].SetPos(vector);
  7696. }
  7697. if (maidArray[5] && maidArray[5].Visible)
  7698. {
  7699. vector.x = 1.8f;
  7700. maidArray[5].SetPos(vector);
  7701. }
  7702. if (maidArray[6] && maidArray[6].Visible)
  7703. {
  7704. vector.x = -1.8f;
  7705. maidArray[6].SetPos(vector);
  7706. }
  7707. if (maidArray[7] && maidArray[7].Visible)
  7708. {
  7709. vector.x = 2.4f;
  7710. maidArray[7].SetPos(vector);
  7711. }
  7712. if (maidArray[8] && maidArray[8].Visible)
  7713. {
  7714. vector.x = -2.4f;
  7715. maidArray[8].SetPos(vector);
  7716. }
  7717. if (maidArray[9] && maidArray[9].Visible)
  7718. {
  7719. vector.x = 3f;
  7720. maidArray[9].SetPos(vector);
  7721. }
  7722. if (maidArray[10] && maidArray[10].Visible)
  7723. {
  7724. vector.x = -3f;
  7725. maidArray[10].SetPos(vector);
  7726. }
  7727. if (maidArray[11] && maidArray[11].Visible)
  7728. {
  7729. vector.x = 3.6f;
  7730. maidArray[11].SetPos(vector);
  7731. }
  7732. if (maidArray[12] && maidArray[12].Visible)
  7733. {
  7734. vector.x = -3.6f;
  7735. maidArray[12].SetPos(vector);
  7736. }
  7737. if (maidArray[13] && maidArray[13].Visible)
  7738. {
  7739. vector.x = 4.2f;
  7740. maidArray[13].SetPos(vector);
  7741. }
  7742. }
  7743. }
  7744. for (int k = 0; k < groupList.Count; k++)
  7745. {
  7746. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7747. {
  7748. if (poseIndex[i] == 0)
  7749. {
  7750. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7751. }
  7752. else
  7753. {
  7754. poseIndex[i] = 0;
  7755. }
  7756. break;
  7757. }
  7758. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7759. {
  7760. poseIndex[i] = (int)groupList[k - 1];
  7761. break;
  7762. }
  7763. }
  7764. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7765. {
  7766. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7767. }
  7768. if (maidArray[i] && maidArray[i].Visible)
  7769. {
  7770. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7771. isStop[i] = false;
  7772. poseCount[i] = 20;
  7773. Maid maid = maidArray[i];
  7774. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7775. {
  7776. maid.body0.MuneYureL(0f);
  7777. maid.body0.MuneYureR(0f);
  7778. }
  7779. else
  7780. {
  7781. maid.body0.MuneYureL(1f);
  7782. maid.body0.MuneYureR(1f);
  7783. }
  7784. if (array[0].Contains("MultipleMaidsPose"))
  7785. {
  7786. string path = array[0].Split(new char[] { '/' })[1];
  7787. byte[] array2 = new byte[0];
  7788. try
  7789. {
  7790. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7791. {
  7792. array2 = new byte[fileStream.Length];
  7793. fileStream.Read(array2, 0, array2.Length);
  7794. }
  7795. }
  7796. catch { }
  7797. if (0 < array2.Length)
  7798. {
  7799. string text = Path.GetFileName(path);
  7800. long num5 = text.GetHashCode();
  7801. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7802. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7803. {
  7804. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7805. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7806. };
  7807. for (int m = 0; m < array3.Length; m++)
  7808. {
  7809. maid.SetAutoTwist(array3[m], true);
  7810. }
  7811. }
  7812. }
  7813. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7814. {
  7815. loadPose[i] = array[0];
  7816. }
  7817. else if (!array[0].StartsWith("dance_"))
  7818. {
  7819. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7820. }
  7821. else
  7822. {
  7823. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7824. {
  7825. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7826. GameUty.FileSystem,
  7827. array[0] + ".anm",
  7828. false,
  7829. false);
  7830. }
  7831. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7832. }
  7833. if (array.Length > 1)
  7834. {
  7835. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7836. isStop[i] = true;
  7837. if (array.Length > 2)
  7838. {
  7839. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7840. isPoseIti[i] = true;
  7841. poseIti[i] = maidArray[i].transform.position;
  7842. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7843. }
  7844. }
  7845. }
  7846. }
  7847. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7848. {
  7849. if (maidArray[1] && maidArray[1].Visible)
  7850. {
  7851. if (maidArray[0].transform.position == maidArray[1].transform.position
  7852. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7853. {
  7854. Vector3 vector = Vector3.zero;
  7855. vector.x = 0.6f;
  7856. maidArray[1].SetPos(vector);
  7857. if (maidArray[2] && maidArray[2].Visible)
  7858. {
  7859. vector.x = -0.6f;
  7860. maidArray[2].SetPos(vector);
  7861. }
  7862. if (maidArray[3] && maidArray[3].Visible)
  7863. {
  7864. vector.x = 1.2f;
  7865. maidArray[3].SetPos(vector);
  7866. }
  7867. if (maidArray[4] && maidArray[4].Visible)
  7868. {
  7869. vector.x = -1.2f;
  7870. maidArray[4].SetPos(vector);
  7871. }
  7872. if (maidArray[5] && maidArray[5].Visible)
  7873. {
  7874. vector.x = 1.8f;
  7875. maidArray[5].SetPos(vector);
  7876. }
  7877. if (maidArray[6] && maidArray[6].Visible)
  7878. {
  7879. vector.x = -1.8f;
  7880. maidArray[6].SetPos(vector);
  7881. }
  7882. if (maidArray[7] && maidArray[7].Visible)
  7883. {
  7884. vector.x = 2.4f;
  7885. maidArray[7].SetPos(vector);
  7886. }
  7887. if (maidArray[8] && maidArray[8].Visible)
  7888. {
  7889. vector.x = -2.4f;
  7890. maidArray[8].SetPos(vector);
  7891. }
  7892. if (maidArray[9] && maidArray[9].Visible)
  7893. {
  7894. vector.x = 3f;
  7895. maidArray[9].SetPos(vector);
  7896. }
  7897. if (maidArray[10] && maidArray[10].Visible)
  7898. {
  7899. vector.x = -3f;
  7900. maidArray[10].SetPos(vector);
  7901. }
  7902. if (maidArray[11] && maidArray[11].Visible)
  7903. {
  7904. vector.x = 3.6f;
  7905. maidArray[11].SetPos(vector);
  7906. }
  7907. if (maidArray[12] && maidArray[12].Visible)
  7908. {
  7909. vector.x = -3.6f;
  7910. maidArray[12].SetPos(vector);
  7911. }
  7912. if (maidArray[13] && maidArray[13].Visible)
  7913. {
  7914. vector.x = 4.2f;
  7915. maidArray[13].SetPos(vector);
  7916. }
  7917. }
  7918. }
  7919. int num7 = poseIndex[i];
  7920. for (int k = 0; k < groupList.Count; k++)
  7921. {
  7922. if (poseIndex[i] < (int)groupList[k])
  7923. {
  7924. poseIndex[i] = (int)groupList[k];
  7925. break;
  7926. }
  7927. }
  7928. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7929. {
  7930. poseIndex[i] = 0;
  7931. }
  7932. if (maidArray[i] && maidArray[i].Visible)
  7933. {
  7934. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7935. isStop[i] = false;
  7936. poseCount[i] = 20;
  7937. Maid maid = maidArray[i];
  7938. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7939. {
  7940. maid.body0.MuneYureL(0f);
  7941. maid.body0.MuneYureR(0f);
  7942. }
  7943. else
  7944. {
  7945. maid.body0.MuneYureL(1f);
  7946. maid.body0.MuneYureR(1f);
  7947. }
  7948. if (array[0].Contains("MultipleMaidsPose"))
  7949. {
  7950. string path = array[0].Split(new char[] { '/' })[1];
  7951. byte[] array2 = new byte[0];
  7952. try
  7953. {
  7954. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7955. {
  7956. array2 = new byte[fileStream.Length];
  7957. fileStream.Read(array2, 0, array2.Length);
  7958. }
  7959. }
  7960. catch { }
  7961. if (0 < array2.Length)
  7962. {
  7963. string text = Path.GetFileName(path);
  7964. long num5 = text.GetHashCode();
  7965. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7966. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7967. {
  7968. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7969. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7970. };
  7971. for (int m = 0; m < array3.Length; m++)
  7972. {
  7973. maid.SetAutoTwist(array3[m], true);
  7974. }
  7975. }
  7976. }
  7977. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7978. {
  7979. loadPose[i] = array[0];
  7980. }
  7981. else if (!array[0].StartsWith("dance_"))
  7982. {
  7983. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7984. }
  7985. else
  7986. {
  7987. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7988. {
  7989. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7990. GameUty.FileSystem,
  7991. array[0] + ".anm",
  7992. false,
  7993. false);
  7994. }
  7995. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7996. }
  7997. if (array.Length > 1)
  7998. {
  7999. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8000. isStop[i] = true;
  8001. if (array.Length > 2)
  8002. {
  8003. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8004. isPoseIti[i] = true;
  8005. poseIti[i] = maidArray[i].transform.position;
  8006. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8007. }
  8008. }
  8009. }
  8010. }
  8011. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8012. {
  8013. if (maidArray[1] && maidArray[1].Visible)
  8014. {
  8015. if (maidArray[0].transform.position == maidArray[1].transform.position
  8016. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8017. {
  8018. Vector3 vector = Vector3.zero;
  8019. vector.x = 0.6f;
  8020. maidArray[1].SetPos(vector);
  8021. if (maidArray[2] && maidArray[2].Visible)
  8022. {
  8023. vector.x = -0.6f;
  8024. maidArray[2].SetPos(vector);
  8025. }
  8026. if (maidArray[3] && maidArray[3].Visible)
  8027. {
  8028. vector.x = 1.2f;
  8029. maidArray[3].SetPos(vector);
  8030. }
  8031. if (maidArray[4] && maidArray[4].Visible)
  8032. {
  8033. vector.x = -1.2f;
  8034. maidArray[4].SetPos(vector);
  8035. }
  8036. if (maidArray[5] && maidArray[5].Visible)
  8037. {
  8038. vector.x = 1.8f;
  8039. maidArray[5].SetPos(vector);
  8040. }
  8041. if (maidArray[6] && maidArray[6].Visible)
  8042. {
  8043. vector.x = -1.8f;
  8044. maidArray[6].SetPos(vector);
  8045. }
  8046. if (maidArray[7] && maidArray[7].Visible)
  8047. {
  8048. vector.x = 2.4f;
  8049. maidArray[7].SetPos(vector);
  8050. }
  8051. if (maidArray[8] && maidArray[8].Visible)
  8052. {
  8053. vector.x = -2.4f;
  8054. maidArray[8].SetPos(vector);
  8055. }
  8056. if (maidArray[9] && maidArray[9].Visible)
  8057. {
  8058. vector.x = 3f;
  8059. maidArray[9].SetPos(vector);
  8060. }
  8061. if (maidArray[10] && maidArray[10].Visible)
  8062. {
  8063. vector.x = -3f;
  8064. maidArray[10].SetPos(vector);
  8065. }
  8066. if (maidArray[11] && maidArray[11].Visible)
  8067. {
  8068. vector.x = 3.6f;
  8069. maidArray[11].SetPos(vector);
  8070. }
  8071. if (maidArray[12] && maidArray[12].Visible)
  8072. {
  8073. vector.x = -3.6f;
  8074. maidArray[12].SetPos(vector);
  8075. }
  8076. if (maidArray[13] && maidArray[13].Visible)
  8077. {
  8078. vector.x = 4.2f;
  8079. maidArray[13].SetPos(vector);
  8080. }
  8081. }
  8082. }
  8083. poseIndex[i]--;
  8084. if (poseIndex[i] <= -1)
  8085. {
  8086. poseIndex[i] = poseArray.Length - 1;
  8087. }
  8088. if (maidArray[i] && maidArray[i].Visible)
  8089. {
  8090. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8091. isStop[i] = false;
  8092. poseCount[i] = 20;
  8093. Maid maid = maidArray[i];
  8094. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8095. {
  8096. maid.body0.MuneYureL(0f);
  8097. maid.body0.MuneYureR(0f);
  8098. }
  8099. else
  8100. {
  8101. maid.body0.MuneYureL(1f);
  8102. maid.body0.MuneYureR(1f);
  8103. }
  8104. if (array[0].Contains("MultipleMaidsPose"))
  8105. {
  8106. string path = array[0].Split(new char[] { '/' })[1];
  8107. byte[] array2 = new byte[0];
  8108. try
  8109. {
  8110. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8111. {
  8112. array2 = new byte[fileStream.Length];
  8113. fileStream.Read(array2, 0, array2.Length);
  8114. }
  8115. }
  8116. catch { }
  8117. if (0 < array2.Length)
  8118. {
  8119. string text = Path.GetFileName(path);
  8120. long num5 = text.GetHashCode();
  8121. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8122. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8123. {
  8124. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8125. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8126. };
  8127. for (int m = 0; m < array3.Length; m++)
  8128. {
  8129. maid.SetAutoTwist(array3[m], true);
  8130. }
  8131. }
  8132. }
  8133. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8134. {
  8135. loadPose[i] = array[0];
  8136. }
  8137. else if (!array[0].StartsWith("dance_"))
  8138. {
  8139. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8140. }
  8141. else
  8142. {
  8143. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8144. {
  8145. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8146. GameUty.FileSystem,
  8147. array[0] + ".anm",
  8148. false,
  8149. false);
  8150. }
  8151. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8152. }
  8153. if (array.Length > 1)
  8154. {
  8155. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8156. isStop[i] = true;
  8157. if (array.Length > 2)
  8158. {
  8159. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8160. isPoseIti[i] = true;
  8161. poseIti[i] = maidArray[i].transform.position;
  8162. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8163. }
  8164. }
  8165. }
  8166. }
  8167. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8168. {
  8169. if (maidArray[1] && maidArray[1].Visible)
  8170. {
  8171. if (maidArray[0].transform.position == maidArray[1].transform.position
  8172. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8173. {
  8174. Vector3 vector = Vector3.zero;
  8175. vector.x = 0.6f;
  8176. maidArray[1].SetPos(vector);
  8177. if (maidArray[2] && maidArray[2].Visible)
  8178. {
  8179. vector.x = -0.6f;
  8180. maidArray[2].SetPos(vector);
  8181. }
  8182. if (maidArray[3] && maidArray[3].Visible)
  8183. {
  8184. vector.x = 1.2f;
  8185. maidArray[3].SetPos(vector);
  8186. }
  8187. if (maidArray[4] && maidArray[4].Visible)
  8188. {
  8189. vector.x = -1.2f;
  8190. maidArray[4].SetPos(vector);
  8191. }
  8192. if (maidArray[5] && maidArray[5].Visible)
  8193. {
  8194. vector.x = 1.8f;
  8195. maidArray[5].SetPos(vector);
  8196. }
  8197. if (maidArray[6] && maidArray[6].Visible)
  8198. {
  8199. vector.x = -1.8f;
  8200. maidArray[6].SetPos(vector);
  8201. }
  8202. if (maidArray[7] && maidArray[7].Visible)
  8203. {
  8204. vector.x = 2.4f;
  8205. maidArray[7].SetPos(vector);
  8206. }
  8207. if (maidArray[8] && maidArray[8].Visible)
  8208. {
  8209. vector.x = -2.4f;
  8210. maidArray[8].SetPos(vector);
  8211. }
  8212. if (maidArray[9] && maidArray[9].Visible)
  8213. {
  8214. vector.x = 3f;
  8215. maidArray[9].SetPos(vector);
  8216. }
  8217. if (maidArray[10] && maidArray[10].Visible)
  8218. {
  8219. vector.x = -3f;
  8220. maidArray[10].SetPos(vector);
  8221. }
  8222. if (maidArray[11] && maidArray[11].Visible)
  8223. {
  8224. vector.x = 3.6f;
  8225. maidArray[11].SetPos(vector);
  8226. }
  8227. if (maidArray[12] && maidArray[12].Visible)
  8228. {
  8229. vector.x = -3.6f;
  8230. maidArray[12].SetPos(vector);
  8231. }
  8232. if (maidArray[13] && maidArray[13].Visible)
  8233. {
  8234. vector.x = 4.2f;
  8235. maidArray[13].SetPos(vector);
  8236. }
  8237. }
  8238. }
  8239. poseIndex[i]++;
  8240. if (poseIndex[i] == poseArray.Length)
  8241. {
  8242. poseIndex[i] = 0;
  8243. }
  8244. if (maidArray[i] && maidArray[i].Visible)
  8245. {
  8246. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8247. isStop[i] = false;
  8248. poseCount[i] = 20;
  8249. Maid maid = maidArray[i];
  8250. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8251. {
  8252. maid.body0.MuneYureL(0f);
  8253. maid.body0.MuneYureR(0f);
  8254. }
  8255. else
  8256. {
  8257. maid.body0.MuneYureL(1f);
  8258. maid.body0.MuneYureR(1f);
  8259. }
  8260. if (array[0].Contains("MultipleMaidsPose"))
  8261. {
  8262. string path = array[0].Split(new char[] { '/' })[1];
  8263. byte[] array2 = new byte[0];
  8264. try
  8265. {
  8266. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8267. {
  8268. array2 = new byte[fileStream.Length];
  8269. fileStream.Read(array2, 0, array2.Length);
  8270. }
  8271. }
  8272. catch { }
  8273. if (0 < array2.Length)
  8274. {
  8275. string text = Path.GetFileName(path);
  8276. long num5 = text.GetHashCode();
  8277. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8278. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8279. {
  8280. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8281. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8282. };
  8283. for (int m = 0; m < array3.Length; m++)
  8284. {
  8285. maid.SetAutoTwist(array3[m], true);
  8286. }
  8287. }
  8288. }
  8289. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8290. {
  8291. loadPose[i] = array[0];
  8292. }
  8293. else if (!array[0].StartsWith("dance_"))
  8294. {
  8295. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8296. }
  8297. else
  8298. {
  8299. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8300. {
  8301. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8302. GameUty.FileSystem,
  8303. array[0] + ".anm",
  8304. false,
  8305. false);
  8306. }
  8307. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8308. }
  8309. if (array.Length > 1)
  8310. {
  8311. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8312. isStop[i] = true;
  8313. if (array.Length > 2)
  8314. {
  8315. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8316. isPoseIti[i] = true;
  8317. poseIti[i] = maidArray[i].transform.position;
  8318. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8319. }
  8320. }
  8321. }
  8322. }
  8323. }
  8324. }
  8325. if (isDanceChu)
  8326. {
  8327. for (int j = 0; j < maidCnt; j++)
  8328. {
  8329. if (maidArray[j] && maidArray[j].Visible)
  8330. {
  8331. string text2 = danceName[j];
  8332. float num = 0f;
  8333. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8334. || text2 == "dance_cm3d_004_kano_f1.anm")
  8335. {
  8336. num = 0.166666f;
  8337. }
  8338. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8339. {
  8340. num = -0.35f;
  8341. }
  8342. if (text2 != null)
  8343. {
  8344. if (danceCount > 0)
  8345. {
  8346. danceCount--;
  8347. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8348. }
  8349. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8350. {
  8351. danceCount = 20;
  8352. }
  8353. }
  8354. }
  8355. }
  8356. }
  8357. if (isDanceStart1)
  8358. {
  8359. for (int j = 0; j < maidCnt; j++)
  8360. {
  8361. if (maidArray[j] && maidArray[j].Visible)
  8362. {
  8363. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8364. if (!isShift)
  8365. {
  8366. if (j == 0)
  8367. {
  8368. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8369. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8370. danceName[j] = "dance_cm3d2_001_f1.anm";
  8371. }
  8372. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8373. {
  8374. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8375. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8376. danceName[j] = "dance_cm3d2_001_f2.anm";
  8377. }
  8378. else
  8379. {
  8380. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8381. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8382. danceName[j] = "dance_cm3d2_001_f3.anm";
  8383. }
  8384. }
  8385. else
  8386. {
  8387. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8388. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8389. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8390. }
  8391. }
  8392. }
  8393. isDanceStart1 = false;
  8394. isDanceStart1F = true;
  8395. isShift = false;
  8396. }
  8397. if (isDanceStart2)
  8398. {
  8399. for (int j = 0; j < maidCnt; j++)
  8400. {
  8401. if (maidArray[j] && maidArray[j].Visible)
  8402. {
  8403. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8404. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8406. danceName[j] = "dance_cm3d_001_f1.anm";
  8407. }
  8408. }
  8409. isDanceStart2 = false;
  8410. isDanceStart2F = true;
  8411. }
  8412. if (isDanceStart3)
  8413. {
  8414. for (int j = 0; j < maidCnt; j++)
  8415. {
  8416. if (maidArray[j] && maidArray[j].Visible)
  8417. {
  8418. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8419. if (!isShift)
  8420. {
  8421. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8422. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8423. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8424. }
  8425. else
  8426. {
  8427. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8428. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8429. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8430. }
  8431. }
  8432. }
  8433. isDanceStart3 = false;
  8434. isDanceStart3F = true;
  8435. isShift = false;
  8436. }
  8437. if (isDanceStart4)
  8438. {
  8439. for (int j = 0; j < maidCnt; j++)
  8440. {
  8441. if (maidArray[j] && maidArray[j].Visible)
  8442. {
  8443. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8444. if (!isShift)
  8445. {
  8446. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8447. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8448. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8449. }
  8450. else
  8451. {
  8452. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8453. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8454. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8455. }
  8456. }
  8457. }
  8458. isDanceStart4 = false;
  8459. isDanceStart4F = true;
  8460. isShift = false;
  8461. }
  8462. if (isDanceStart5)
  8463. {
  8464. for (int j = 0; j < maidCnt; j++)
  8465. {
  8466. if (maidArray[j] && maidArray[j].Visible)
  8467. {
  8468. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8469. if (!isShift)
  8470. {
  8471. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8472. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8473. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8474. }
  8475. else
  8476. {
  8477. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8478. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8479. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8480. }
  8481. }
  8482. }
  8483. isDanceStart5 = false;
  8484. isDanceStart5F = true;
  8485. isShift = false;
  8486. }
  8487. if (isDanceStart6)
  8488. {
  8489. for (int j = 0; j < maidCnt; j++)
  8490. {
  8491. if (maidArray[j] && maidArray[j].Visible)
  8492. {
  8493. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8494. if (!isShift)
  8495. {
  8496. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8497. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8498. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8499. }
  8500. else
  8501. {
  8502. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8503. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8504. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8505. }
  8506. }
  8507. }
  8508. isDanceStart6 = false;
  8509. isDanceStart6F = true;
  8510. isShift = false;
  8511. }
  8512. if (isDanceStart7)
  8513. {
  8514. for (int j = 0; j < maidCnt; j++)
  8515. {
  8516. if (maidArray[j] && maidArray[j].Visible)
  8517. {
  8518. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8519. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8520. {
  8521. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8522. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8523. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8524. }
  8525. else
  8526. {
  8527. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8528. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8529. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8530. }
  8531. }
  8532. }
  8533. isDanceStart7 = false;
  8534. isDanceStart7V = true;
  8535. isDanceStart7F = true;
  8536. }
  8537. if (isDanceStart8)
  8538. {
  8539. for (int j = 0; j < maidCnt; j++)
  8540. {
  8541. if (maidArray[j] && maidArray[j].Visible)
  8542. {
  8543. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8544. if (j == 0 || j == 4 || j == 8 || j == 12)
  8545. {
  8546. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8547. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8548. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8549. }
  8550. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8551. {
  8552. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8553. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8554. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8555. }
  8556. else if (j == 2 || j == 6 || j == 10)
  8557. {
  8558. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8559. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8560. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8561. }
  8562. else
  8563. {
  8564. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8565. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8566. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8567. }
  8568. }
  8569. }
  8570. isDanceStart8 = false;
  8571. isDanceStart8V = true;
  8572. isDanceStart8F = true;
  8573. }
  8574. if (isDanceStart9)
  8575. {
  8576. isDanceStart9Count++;
  8577. if (isShift)
  8578. {
  8579. for (int j = 0; j < maidCnt; j++)
  8580. {
  8581. if (maidArray[j] && maidArray[j].Visible)
  8582. {
  8583. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8584. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8585. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8586. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8587. }
  8588. }
  8589. isDanceStart9 = false;
  8590. isDanceStart9F = true;
  8591. isDanceStart9Count = 0;
  8592. isShift = false;
  8593. }
  8594. if (isDanceStart9Count == 10)
  8595. {
  8596. for (int j = 0; j < maidCnt; j++)
  8597. {
  8598. if (maidArray[j] && maidArray[j].Visible)
  8599. {
  8600. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8601. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8602. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8603. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8604. }
  8605. }
  8606. isDanceStart9 = false;
  8607. isDanceStart9F = true;
  8608. isDanceStart9Count = 0;
  8609. }
  8610. }
  8611. if (isDanceStart10)
  8612. {
  8613. for (int j = 0; j < maidCnt; j++)
  8614. {
  8615. if (maidArray[j] && maidArray[j].Visible)
  8616. {
  8617. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8618. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8619. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8620. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8621. }
  8622. }
  8623. isDanceStart10 = false;
  8624. isDanceStart10F = true;
  8625. }
  8626. if (isDanceStart11)
  8627. {
  8628. for (int j = 0; j < maidCnt; j++)
  8629. {
  8630. if (maidArray[j] && maidArray[j].Visible)
  8631. {
  8632. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8633. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8634. {
  8635. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8636. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8637. danceName[j] = nameA + danceNo2 + ".anm";
  8638. }
  8639. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8640. {
  8641. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8642. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8643. danceName[j] = nameA + danceNo3 + ".anm";
  8644. }
  8645. else
  8646. {
  8647. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8648. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8649. danceName[j] = nameA + danceNo1 + ".anm";
  8650. }
  8651. }
  8652. }
  8653. isDanceStart11 = false;
  8654. isDanceStart11V = true;
  8655. isDanceStart11F = true;
  8656. }
  8657. if (isDanceStart12)
  8658. {
  8659. for (int j = 0; j < maidCnt; j++)
  8660. {
  8661. if (maidArray[j] && maidArray[j].Visible)
  8662. {
  8663. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8664. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8666. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8667. }
  8668. }
  8669. isDanceStart12 = false;
  8670. isDanceStart12F = true;
  8671. }
  8672. if (isDanceStart13)
  8673. {
  8674. for (int j = 0; j < maidCnt; j++)
  8675. {
  8676. if (maidArray[j] && maidArray[j].Visible)
  8677. {
  8678. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8679. if (!isShift)
  8680. {
  8681. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8682. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8683. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8684. }
  8685. else
  8686. {
  8687. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8688. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8689. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8690. }
  8691. }
  8692. }
  8693. isDanceStart13 = false;
  8694. isDanceStart13F = true;
  8695. isShift = false;
  8696. }
  8697. if (isDanceStart14)
  8698. {
  8699. for (int j = 0; j < maidCnt; j++)
  8700. {
  8701. if (maidArray[j] && maidArray[j].Visible)
  8702. {
  8703. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8704. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8705. {
  8706. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8707. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8708. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8709. }
  8710. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8711. {
  8712. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8713. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8714. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8715. }
  8716. else
  8717. {
  8718. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8719. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8720. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8721. }
  8722. }
  8723. }
  8724. isDanceStart14 = false;
  8725. isDanceStart14V = true;
  8726. isDanceStart14F = true;
  8727. }
  8728. if (isDanceStart15)
  8729. {
  8730. isDanceStart15Count++;
  8731. }
  8732. if (isDanceStart15Count == 10)
  8733. {
  8734. for (int j = 0; j < maidCnt; j++)
  8735. {
  8736. if (maidArray[j] && maidArray[j].Visible)
  8737. {
  8738. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8739. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8740. {
  8741. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8742. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8743. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8744. }
  8745. else
  8746. {
  8747. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8748. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8749. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8750. }
  8751. }
  8752. }
  8753. isDanceStart15 = false;
  8754. isDanceStart15V = true;
  8755. isDanceStart15F = true;
  8756. isDanceStart15Count = 0;
  8757. }
  8758. if (isDance)
  8759. {
  8760. for (int j = 0; j < maidCnt; j++)
  8761. {
  8762. if (maidArray[j].Visible)
  8763. {
  8764. if (isDanceStart1F)
  8765. {
  8766. if (isDanceStart1K)
  8767. {
  8768. foreach (string text3 in dance1KArray)
  8769. {
  8770. string[] array = text3.Split(new char[] { ',' });
  8771. float num10 = float.Parse(array[0]);
  8772. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8773. {
  8774. danceFace[j] = num10;
  8775. FaceName[j] = FaceName2[j];
  8776. FaceName2[j] = array[1];
  8777. FaceName3[j] = array[2];
  8778. FaceTime[j] = 0.0166666675f;
  8779. break;
  8780. }
  8781. }
  8782. }
  8783. else if (j == 0)
  8784. {
  8785. foreach (string text3 in dance1Array)
  8786. {
  8787. string[] array = text3.Split(new char[] { ',' });
  8788. float num10 = float.Parse(array[0]);
  8789. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8790. {
  8791. danceFace[j] = num10;
  8792. FaceName[j] = FaceName2[j];
  8793. FaceName2[j] = array[1];
  8794. FaceName3[j] = array[2];
  8795. FaceTime[j] = 0.0166666675f;
  8796. break;
  8797. }
  8798. }
  8799. }
  8800. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8801. {
  8802. foreach (string text3 in dance1BArray)
  8803. {
  8804. string[] array = text3.Split(new char[] { ',' });
  8805. float num10 = float.Parse(array[0]);
  8806. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8807. {
  8808. danceFace[j] = num10;
  8809. FaceName[j] = FaceName2[j];
  8810. FaceName2[j] = array[1];
  8811. FaceName3[j] = array[2];
  8812. FaceTime[j] = 0.0166666675f;
  8813. break;
  8814. }
  8815. }
  8816. }
  8817. else
  8818. {
  8819. foreach (string text3 in dance1CArray)
  8820. {
  8821. string[] array = text3.Split(new char[] { ',' });
  8822. float num10 = float.Parse(array[0]);
  8823. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8824. {
  8825. danceFace[j] = num10;
  8826. FaceName[j] = FaceName2[j];
  8827. FaceName2[j] = array[1];
  8828. FaceName3[j] = array[2];
  8829. FaceTime[j] = 0.0166666675f;
  8830. break;
  8831. }
  8832. }
  8833. }
  8834. }
  8835. if (isDanceStart2F)
  8836. {
  8837. foreach (string text3 in dance2Array)
  8838. {
  8839. string[] array = text3.Split(new char[] { ',' });
  8840. float num10 = float.Parse(array[0]);
  8841. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8842. {
  8843. danceFace[j] = num10;
  8844. FaceName[j] = FaceName2[j];
  8845. FaceName2[j] = array[1];
  8846. FaceName3[j] = array[2];
  8847. FaceTime[j] = 0.0166666675f;
  8848. break;
  8849. }
  8850. }
  8851. }
  8852. if (isDanceStart3F)
  8853. {
  8854. if (isDanceStart3K)
  8855. {
  8856. foreach (string text3 in dance3KArray)
  8857. {
  8858. string[] array = text3.Split(new char[] { ',' });
  8859. float num10 = float.Parse(array[0]);
  8860. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8861. {
  8862. danceFace[j] = num10;
  8863. FaceName[j] = FaceName2[j];
  8864. FaceName2[j] = array[1];
  8865. FaceName3[j] = array[2];
  8866. FaceTime[j] = 0.0166666675f;
  8867. break;
  8868. }
  8869. }
  8870. }
  8871. else
  8872. {
  8873. foreach (string text3 in dance3Array)
  8874. {
  8875. string[] array = text3.Split(new char[] { ',' });
  8876. float num10 = float.Parse(array[0]);
  8877. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8878. {
  8879. danceFace[j] = num10;
  8880. FaceName[j] = FaceName2[j];
  8881. FaceName2[j] = array[1];
  8882. FaceName3[j] = array[2];
  8883. FaceTime[j] = 0.0166666675f;
  8884. break;
  8885. }
  8886. }
  8887. }
  8888. }
  8889. if (isDanceStart4F)
  8890. {
  8891. if (isDanceStart4K)
  8892. {
  8893. foreach (string text3 in dance4KArray)
  8894. {
  8895. string[] array = text3.Split(new char[] { ',' });
  8896. float num10 = float.Parse(array[0]);
  8897. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8898. {
  8899. danceFace[j] = num10;
  8900. FaceName[j] = FaceName2[j];
  8901. FaceName2[j] = array[1];
  8902. FaceName3[j] = array[2];
  8903. FaceTime[j] = 0.0166666675f;
  8904. break;
  8905. }
  8906. }
  8907. }
  8908. else
  8909. {
  8910. foreach (string text3 in dance4Array)
  8911. {
  8912. string[] array = text3.Split(new char[] { ',' });
  8913. float num10 = float.Parse(array[0]);
  8914. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8915. {
  8916. danceFace[j] = num10;
  8917. FaceName[j] = FaceName2[j];
  8918. FaceName2[j] = array[1];
  8919. FaceName3[j] = array[2];
  8920. FaceTime[j] = 0.0166666675f;
  8921. break;
  8922. }
  8923. }
  8924. }
  8925. }
  8926. if (isDanceStart5F)
  8927. {
  8928. if (isDanceStart5K)
  8929. {
  8930. foreach (string text3 in dance5KArray)
  8931. {
  8932. string[] array = text3.Split(new char[] { ',' });
  8933. float num10 = float.Parse(array[0]);
  8934. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8935. {
  8936. danceFace[j] = num10;
  8937. FaceName[j] = FaceName2[j];
  8938. FaceName2[j] = array[1];
  8939. FaceName3[j] = array[2];
  8940. FaceTime[j] = 0.0166666675f;
  8941. break;
  8942. }
  8943. }
  8944. }
  8945. else
  8946. {
  8947. foreach (string text3 in dance5Array)
  8948. {
  8949. string[] array = text3.Split(new char[] { ',' });
  8950. float num10 = float.Parse(array[0]);
  8951. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8952. {
  8953. danceFace[j] = num10;
  8954. FaceName[j] = FaceName2[j];
  8955. FaceName2[j] = array[1];
  8956. FaceName3[j] = array[2];
  8957. FaceTime[j] = 0.0166666675f;
  8958. break;
  8959. }
  8960. }
  8961. }
  8962. }
  8963. if (isDanceStart6F)
  8964. {
  8965. if (isDanceStart6K)
  8966. {
  8967. foreach (string text3 in dance6KArray)
  8968. {
  8969. string[] array = text3.Split(new char[] { ',' });
  8970. float num10 = float.Parse(array[0]);
  8971. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8972. {
  8973. danceFace[j] = num10;
  8974. FaceName[j] = FaceName2[j];
  8975. FaceName2[j] = array[1];
  8976. FaceName3[j] = array[2];
  8977. FaceTime[j] = 0.0166666675f;
  8978. break;
  8979. }
  8980. }
  8981. }
  8982. else
  8983. {
  8984. foreach (string text3 in dance6Array)
  8985. {
  8986. string[] array = text3.Split(new char[] { ',' });
  8987. float num10 = float.Parse(array[0]);
  8988. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8989. {
  8990. danceFace[j] = num10;
  8991. FaceName[j] = FaceName2[j];
  8992. FaceName2[j] = array[1];
  8993. FaceName3[j] = array[2];
  8994. FaceTime[j] = 0.0166666675f;
  8995. break;
  8996. }
  8997. }
  8998. }
  8999. }
  9000. if (isDanceStart7F)
  9001. {
  9002. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9003. {
  9004. foreach (string text3 in dance6BArray)
  9005. {
  9006. string[] array = text3.Split(new char[] { ',' });
  9007. float num10 = float.Parse(array[0]);
  9008. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9009. {
  9010. danceFace[j] = num10;
  9011. FaceName[j] = FaceName2[j];
  9012. FaceName2[j] = array[1];
  9013. FaceName3[j] = array[2];
  9014. FaceTime[j] = 0.0166666675f;
  9015. break;
  9016. }
  9017. }
  9018. }
  9019. else
  9020. {
  9021. foreach (string text3 in dance6Array)
  9022. {
  9023. string[] array = text3.Split(new char[] { ',' });
  9024. float num10 = float.Parse(array[0]);
  9025. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9026. {
  9027. danceFace[j] = num10;
  9028. FaceName[j] = FaceName2[j];
  9029. FaceName2[j] = array[1];
  9030. FaceName3[j] = array[2];
  9031. FaceTime[j] = 0.0166666675f;
  9032. break;
  9033. }
  9034. }
  9035. }
  9036. }
  9037. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9038. {
  9039. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9040. {
  9041. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9042. }
  9043. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9044. {
  9045. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9046. 100f,
  9047. maidArray[j - 1].transform.position.z));
  9048. }
  9049. }
  9050. if (isDanceStart8F)
  9051. {
  9052. if (j == 1 || j == 5 || j == 9 || j == 13)
  9053. {
  9054. foreach (string text3 in dance6BArray)
  9055. {
  9056. string[] array = text3.Split(new char[] { ',' });
  9057. float num10 = float.Parse(array[0]);
  9058. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9059. {
  9060. danceFace[j] = num10;
  9061. FaceName[j] = FaceName2[j];
  9062. FaceName2[j] = array[1];
  9063. FaceName3[j] = array[2];
  9064. FaceTime[j] = 0.0166666675f;
  9065. break;
  9066. }
  9067. }
  9068. }
  9069. else if (j == 2 || j == 6 || j == 10)
  9070. {
  9071. foreach (string text3 in dance6CArray)
  9072. {
  9073. string[] array = text3.Split(new char[] { ',' });
  9074. float num10 = float.Parse(array[0]);
  9075. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9076. {
  9077. danceFace[j] = num10;
  9078. FaceName[j] = FaceName2[j];
  9079. FaceName2[j] = array[1];
  9080. FaceName3[j] = array[2];
  9081. FaceTime[j] = 0.0166666675f;
  9082. break;
  9083. }
  9084. }
  9085. }
  9086. else if (j == 3 || j == 9 || j == 11)
  9087. {
  9088. foreach (string text3 in dance6DArray)
  9089. {
  9090. string[] array = text3.Split(new char[] { ',' });
  9091. float num10 = float.Parse(array[0]);
  9092. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9093. {
  9094. danceFace[j] = num10;
  9095. FaceName[j] = FaceName2[j];
  9096. FaceName2[j] = array[1];
  9097. FaceName3[j] = array[2];
  9098. FaceTime[j] = 0.0166666675f;
  9099. break;
  9100. }
  9101. }
  9102. }
  9103. else
  9104. {
  9105. foreach (string text3 in dance6Array)
  9106. {
  9107. string[] array = text3.Split(new char[] { ',' });
  9108. float num10 = float.Parse(array[0]);
  9109. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9110. {
  9111. danceFace[j] = num10;
  9112. FaceName[j] = FaceName2[j];
  9113. FaceName2[j] = array[1];
  9114. FaceName3[j] = array[2];
  9115. FaceTime[j] = 0.0166666675f;
  9116. break;
  9117. }
  9118. }
  9119. }
  9120. }
  9121. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9122. {
  9123. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9124. {
  9125. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9126. }
  9127. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9128. {
  9129. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9130. 100f,
  9131. maidArray[j - 1].transform.position.z));
  9132. }
  9133. }
  9134. if (isDanceStart8V)
  9135. {
  9136. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9137. {
  9138. isDanceStart8P = true;
  9139. for (int num11 = 0; num11 < maidCnt; num11++)
  9140. {
  9141. if (maidArray[num11].Visible)
  9142. {
  9143. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9144. {
  9145. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9146. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9147. gameObject6.transform.position =
  9148. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9149. .position;
  9150. }
  9151. }
  9152. }
  9153. }
  9154. }
  9155. if (isDanceStart9F)
  9156. {
  9157. if (isDanceStart9K)
  9158. {
  9159. foreach (string text3 in dance9KArray)
  9160. {
  9161. string[] array = text3.Split(new char[] { ',' });
  9162. float num10 = float.Parse(array[0]);
  9163. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9164. {
  9165. danceFace[j] = num10;
  9166. FaceName[j] = FaceName2[j];
  9167. FaceName2[j] = array[1];
  9168. FaceName3[j] = array[2];
  9169. FaceTime[j] = 0.0166666675f;
  9170. break;
  9171. }
  9172. }
  9173. }
  9174. else
  9175. {
  9176. foreach (string text3 in dance7Array)
  9177. {
  9178. string[] array = text3.Split(new char[] { ',' });
  9179. float num10 = float.Parse(array[0]);
  9180. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9181. {
  9182. danceFace[j] = num10;
  9183. FaceName[j] = FaceName2[j];
  9184. FaceName2[j] = array[1];
  9185. FaceName3[j] = array[2];
  9186. FaceTime[j] = 0.0166666675f;
  9187. break;
  9188. }
  9189. }
  9190. }
  9191. }
  9192. if (isDanceStart10F)
  9193. {
  9194. foreach (string text3 in danceO1Array)
  9195. {
  9196. string[] array = text3.Split(new char[] { ',' });
  9197. float num10 = float.Parse(array[0]);
  9198. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9199. {
  9200. danceFace[j] = num10;
  9201. FaceName[j] = FaceName2[j];
  9202. FaceName2[j] = array[1];
  9203. FaceName3[j] = array[2];
  9204. FaceTime[j] = 0.0166666675f;
  9205. break;
  9206. }
  9207. }
  9208. }
  9209. if (isDanceStart11F)
  9210. {
  9211. string[] array14 = null;
  9212. string[] array12 = null;
  9213. string[] array15 = null;
  9214. if (isSS1)
  9215. {
  9216. array14 = danceO1Array;
  9217. array12 = danceO1CArray;
  9218. array15 = danceO1BArray;
  9219. }
  9220. if (isSS2)
  9221. {
  9222. array14 = danceO2Array;
  9223. array12 = danceO2BArray;
  9224. array15 = danceO2CArray;
  9225. }
  9226. if (isSS3)
  9227. {
  9228. array14 = danceO3CArray;
  9229. array12 = danceO3Array;
  9230. array15 = danceO3BArray;
  9231. }
  9232. if (isSS4)
  9233. {
  9234. array14 = danceO5BArray;
  9235. array12 = danceO5Array;
  9236. array15 = danceO5CArray;
  9237. }
  9238. if (isSS5)
  9239. {
  9240. array14 = danceO4Array;
  9241. array12 = danceO4BArray;
  9242. array15 = danceO4CArray;
  9243. }
  9244. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9245. {
  9246. foreach (string text3 in array12)
  9247. {
  9248. string[] array = text3.Split(new char[] { ',' });
  9249. float num10 = float.Parse(array[0]) - 0.03f;
  9250. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9251. {
  9252. danceFace[j] = num10;
  9253. FaceName[j] = FaceName2[j];
  9254. FaceName2[j] = array[1];
  9255. FaceName3[j] = array[2];
  9256. FaceTime[j] = 0.0166666675f;
  9257. break;
  9258. }
  9259. }
  9260. }
  9261. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9262. {
  9263. foreach (string text3 in array15)
  9264. {
  9265. string[] array = text3.Split(new char[] { ',' });
  9266. float num10 = float.Parse(array[0]) - 0.03f;
  9267. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9268. {
  9269. danceFace[j] = num10;
  9270. FaceName[j] = FaceName2[j];
  9271. FaceName2[j] = array[1];
  9272. FaceName3[j] = array[2];
  9273. FaceTime[j] = 0.0166666675f;
  9274. break;
  9275. }
  9276. }
  9277. }
  9278. else
  9279. {
  9280. foreach (string text3 in array14)
  9281. {
  9282. string[] array = text3.Split(new char[] { ',' });
  9283. float num10 = float.Parse(array[0]) - 0.03f;
  9284. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9285. {
  9286. danceFace[j] = num10;
  9287. FaceName[j] = FaceName2[j];
  9288. FaceName2[j] = array[1];
  9289. FaceName3[j] = array[2];
  9290. FaceTime[j] = 0.0166666675f;
  9291. break;
  9292. }
  9293. }
  9294. }
  9295. }
  9296. if (isDanceStart12F)
  9297. {
  9298. foreach (string text3 in dance12Array)
  9299. {
  9300. string[] array = text3.Split(new char[] { ',' });
  9301. float num10 = float.Parse(array[0]);
  9302. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9303. {
  9304. danceFace[j] = num10;
  9305. FaceName[j] = FaceName2[j];
  9306. FaceName2[j] = array[1];
  9307. FaceName3[j] = array[2];
  9308. FaceTime[j] = 0.0166666675f;
  9309. break;
  9310. }
  9311. }
  9312. }
  9313. if (isDanceStart13F)
  9314. {
  9315. if (!isDanceStart13K)
  9316. {
  9317. foreach (string text3 in dance13Array)
  9318. {
  9319. string[] array = text3.Split(new char[] { ',' });
  9320. float num10 = float.Parse(array[0]);
  9321. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9322. {
  9323. danceFace[j] = num10;
  9324. FaceName[j] = FaceName2[j];
  9325. FaceName2[j] = array[1];
  9326. FaceName3[j] = array[2];
  9327. FaceTime[j] = 0.0166666675f;
  9328. break;
  9329. }
  9330. }
  9331. }
  9332. }
  9333. if (isDanceStart14F)
  9334. {
  9335. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9336. {
  9337. foreach (string text3 in dance13BArray)
  9338. {
  9339. string[] array = text3.Split(new char[] { ',' });
  9340. float num10 = float.Parse(array[0]);
  9341. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9342. {
  9343. danceFace[j] = num10;
  9344. FaceName[j] = FaceName2[j];
  9345. FaceName2[j] = array[1];
  9346. FaceName3[j] = array[2];
  9347. FaceTime[j] = 0.0166666675f;
  9348. break;
  9349. }
  9350. }
  9351. }
  9352. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9353. {
  9354. foreach (string text3 in dance13CArray)
  9355. {
  9356. string[] array = text3.Split(new char[] { ',' });
  9357. float num10 = float.Parse(array[0]);
  9358. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9359. {
  9360. danceFace[j] = num10;
  9361. FaceName[j] = FaceName2[j];
  9362. FaceName2[j] = array[1];
  9363. FaceName3[j] = array[2];
  9364. FaceTime[j] = 0.0166666675f;
  9365. break;
  9366. }
  9367. }
  9368. }
  9369. else
  9370. {
  9371. foreach (string text3 in dance13Array)
  9372. {
  9373. string[] array = text3.Split(new char[] { ',' });
  9374. float num10 = float.Parse(array[0]);
  9375. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9376. {
  9377. danceFace[j] = num10;
  9378. FaceName[j] = FaceName2[j];
  9379. FaceName2[j] = array[1];
  9380. FaceName3[j] = array[2];
  9381. FaceTime[j] = 0.0166666675f;
  9382. break;
  9383. }
  9384. }
  9385. }
  9386. }
  9387. if (isDanceStart15F)
  9388. {
  9389. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9390. {
  9391. foreach (string text3 in dance15BArray)
  9392. {
  9393. string[] array = text3.Split(new char[] { ',' });
  9394. float num10 = float.Parse(array[0]);
  9395. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9396. {
  9397. danceFace[j] = num10;
  9398. FaceName[j] = FaceName2[j];
  9399. FaceName2[j] = array[1];
  9400. FaceName3[j] = array[2];
  9401. FaceTime[j] = 0.0166666675f;
  9402. break;
  9403. }
  9404. }
  9405. }
  9406. else
  9407. {
  9408. foreach (string text3 in dance15Array)
  9409. {
  9410. string[] array = text3.Split(new char[] { ',' });
  9411. float num10 = float.Parse(array[0]);
  9412. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9413. {
  9414. danceFace[j] = num10;
  9415. FaceName[j] = FaceName2[j];
  9416. FaceName2[j] = array[1];
  9417. FaceName3[j] = array[2];
  9418. FaceTime[j] = 0.0166666675f;
  9419. break;
  9420. }
  9421. }
  9422. }
  9423. }
  9424. if (!isFadeOut)
  9425. {
  9426. Maid maid = maidArray[j];
  9427. if (maid && maid.Visible)
  9428. {
  9429. if (maid.transform.position.y != 100f)
  9430. {
  9431. FaceTime[j] += Time.deltaTime;
  9432. if (FaceTime[j] < 1f)
  9433. {
  9434. TMorph morph = maid.body0.Face.morph;
  9435. maid.boMabataki = false;
  9436. maid.body0.Face.morph.EyeMabataki = 0f;
  9437. if (FaceName[j] != string.Empty)
  9438. {
  9439. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9440. }
  9441. if (FaceName2[j] != "")
  9442. {
  9443. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9444. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9445. }
  9446. if (FaceName3[j] != string.Empty)
  9447. {
  9448. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9449. }
  9450. maid.body0.Face.morph.FixBlendValues_Face();
  9451. }
  9452. else
  9453. {
  9454. FaceName[j] = FaceName2[j];
  9455. }
  9456. if (isHenkou)
  9457. {
  9458. TMorph morph = maid.body0.Face.morph;
  9459. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9460. maid.boMabataki = false;
  9461. if (isNamidaH)
  9462. {
  9463. fieldValue[(int)morph.hash["namida"]] = 1f;
  9464. }
  9465. else
  9466. {
  9467. fieldValue[(int)morph.hash["namida"]] = 0f;
  9468. }
  9469. if (isSekimenH)
  9470. {
  9471. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9472. }
  9473. else
  9474. {
  9475. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9476. }
  9477. if (isHohoH)
  9478. {
  9479. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9480. }
  9481. else
  9482. {
  9483. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9484. }
  9485. maid.body0.Face.morph.FixBlendValues_Face();
  9486. }
  9487. }
  9488. }
  9489. }
  9490. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9491. }
  9492. }
  9493. if (Input.GetKey(KeyCode.H) || isVR)
  9494. {
  9495. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9496. {
  9497. h2Flg = true;
  9498. isNamidaH = !isNamidaH;
  9499. isHenkou = true;
  9500. }
  9501. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9502. {
  9503. h2Flg = true;
  9504. isSekimenH = !isSekimenH;
  9505. isHenkou = true;
  9506. }
  9507. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9508. {
  9509. h2Flg = true;
  9510. isHohoH = !isHohoH;
  9511. isHenkou = true;
  9512. }
  9513. }
  9514. danceCheckIndex++;
  9515. if (danceCheckIndex == 10)
  9516. {
  9517. danceCheckIndex = 0;
  9518. }
  9519. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9520. isDanceChu = false;
  9521. for (int k = 0; k < danceCheck.Length; k++)
  9522. {
  9523. if (danceCheck[k] > 0f)
  9524. {
  9525. isDanceChu = true;
  9526. break;
  9527. }
  9528. }
  9529. if (!isDanceChu)
  9530. {
  9531. danceWait--;
  9532. if (danceWait > 0)
  9533. {
  9534. isDanceChu = true;
  9535. }
  9536. }
  9537. if (!isDanceChu)
  9538. {
  9539. for (int j = 0; j < maidCnt; j++)
  9540. {
  9541. if (maidArray[j] && maidArray[j].Visible)
  9542. {
  9543. maidArray[j].StopKuchipakuPattern();
  9544. if (isDanceStart7V)
  9545. {
  9546. maidArray[j].SetPos(dancePos[j]);
  9547. maidArray[j].body0.transform.localRotation = danceRot[j];
  9548. }
  9549. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9550. {
  9551. maidArray[j].SetPos(dancePos[j]);
  9552. maidArray[j].body0.transform.localRotation = danceRot[j];
  9553. }
  9554. if (isDanceStart11V)
  9555. {
  9556. maidArray[j].SetPos(dancePos[j]);
  9557. maidArray[j].body0.transform.localRotation = danceRot[j];
  9558. }
  9559. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9560. || isDanceStart13K)
  9561. {
  9562. maidArray[j].SetPos(dancePos[j]);
  9563. maidArray[j].body0.transform.localRotation = danceRot[j];
  9564. int i = j;
  9565. if (!isVR)
  9566. {
  9567. delCount[i] = 20;
  9568. if (goSlot[(int)selectList[i]] != null)
  9569. {
  9570. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9571. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9572. {
  9573. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9574. }
  9575. }
  9576. }
  9577. Maid maid = maidArray[j];
  9578. maid.DelProp(MPN.handitem, true);
  9579. maid.DelProp(MPN.accvag, true);
  9580. maid.DelProp(MPN.accanl, true);
  9581. maid.DelProp(MPN.kousoku_upper, true);
  9582. maid.DelProp(MPN.kousoku_lower, true);
  9583. maid.AllProcPropSeqStart();
  9584. isStop[i] = true;
  9585. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9586. isPoseIti[i] = true;
  9587. poseIti[i] = maidArray[i].transform.position;
  9588. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9589. }
  9590. if (isDanceStart14V)
  9591. {
  9592. maidArray[j].SetPos(dancePos[j]);
  9593. maidArray[j].body0.transform.localRotation = danceRot[j];
  9594. }
  9595. if (isDanceStart15V)
  9596. {
  9597. maidArray[j].SetPos(dancePos[j]);
  9598. maidArray[j].body0.transform.localRotation = danceRot[j];
  9599. }
  9600. }
  9601. }
  9602. isDanceStart1F = false;
  9603. isDanceStart1K = false;
  9604. isDanceStart2F = false;
  9605. isDanceStart3F = false;
  9606. isDanceStart3K = false;
  9607. isDanceStart4F = false;
  9608. isDanceStart4K = false;
  9609. isDanceStart5F = false;
  9610. isDanceStart5K = false;
  9611. isDanceStart6F = false;
  9612. isDanceStart6K = false;
  9613. isDanceStart7F = false;
  9614. isDanceStart7V = false;
  9615. isDanceStart8F = false;
  9616. isDanceStart8V = false;
  9617. isDanceStart8P = false;
  9618. isDanceStart9F = false;
  9619. isDanceStart9K = false;
  9620. isDanceStart10F = false;
  9621. isDanceStart11F = false;
  9622. isDanceStart11V = false;
  9623. isDanceStart12F = false;
  9624. isDanceStart13F = false;
  9625. isDanceStart13K = false;
  9626. isDanceStart14F = false;
  9627. isDanceStart14V = false;
  9628. isDanceStart15F = false;
  9629. isDanceStart15V = false;
  9630. for (int j = 0; j < maidCnt; j++)
  9631. {
  9632. danceFace[j] = 0f;
  9633. }
  9634. danceCheckIndex = 0;
  9635. for (int k = 0; k < danceCheck.Length; k++)
  9636. {
  9637. danceCheck[danceCheckIndex] = 1f;
  9638. }
  9639. isDance = false;
  9640. }
  9641. }
  9642. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9643. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9644. {
  9645. if (getModKeyPressing(modKey.Shift))
  9646. {
  9647. isShift = true;
  9648. }
  9649. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9650. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9651. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9652. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9653. if (!isShift)
  9654. {
  9655. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9656. }
  9657. for (int j = 0; j < maidCnt; j++)
  9658. {
  9659. string text5 = "dance_cm3d2_001_f1.anm";
  9660. switch (j)
  9661. {
  9662. case 1:
  9663. case 3:
  9664. case 5:
  9665. case 7:
  9666. case 9:
  9667. case 11:
  9668. case 13:
  9669. text5 = "dance_cm3d2_001_f2.anm";
  9670. break;
  9671. case 2:
  9672. case 4:
  9673. case 6:
  9674. case 8:
  9675. case 10:
  9676. case 12:
  9677. text5 = "dance_cm3d2_001_f3.anm";
  9678. break;
  9679. }
  9680. if (!isShift)
  9681. {
  9682. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9683. {
  9684. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9685. }
  9686. }
  9687. else
  9688. {
  9689. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9690. {
  9691. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9692. GameUty.FileSystem,
  9693. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9694. false,
  9695. false);
  9696. }
  9697. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9698. text4 = textAsset.text;
  9699. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9700. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9701. && !isDanceStart9K && !isDanceStart13K)
  9702. {
  9703. dancePos[j] = maidArray[j].transform.position;
  9704. danceRot[j] = maidArray[j].transform.localRotation;
  9705. }
  9706. }
  9707. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9708. }
  9709. if (!isShift)
  9710. {
  9711. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9712. sw = new Stopwatch();
  9713. sw.Start();
  9714. }
  9715. else if (getModKeyPressing(modKey.Ctrl))
  9716. {
  9717. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9718. }
  9719. else
  9720. {
  9721. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9722. }
  9723. for (int j = 0; j < maidCnt; j++)
  9724. {
  9725. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9726. Vector3 vector = Vector3.zero;
  9727. switch (j)
  9728. {
  9729. case 3:
  9730. vector.x = 1f;
  9731. break;
  9732. case 4:
  9733. vector.x = -1f;
  9734. break;
  9735. case 5:
  9736. vector.x = 2f;
  9737. break;
  9738. case 6:
  9739. vector.x = -2f;
  9740. break;
  9741. case 7:
  9742. vector.x = 3f;
  9743. break;
  9744. case 8:
  9745. vector.x = -3f;
  9746. break;
  9747. case 9:
  9748. vector.x = 4f;
  9749. break;
  9750. case 10:
  9751. vector.x = -4f;
  9752. break;
  9753. case 11:
  9754. vector.x = 5f;
  9755. break;
  9756. case 12:
  9757. vector.x = -5f;
  9758. break;
  9759. case 13:
  9760. vector.x = 6f;
  9761. break;
  9762. }
  9763. if (!isShift)
  9764. {
  9765. maidArray[j].SetPos(vector);
  9766. }
  9767. isStop[j] = false;
  9768. isLock[j] = false;
  9769. pHandL[j] = 0;
  9770. pHandR[j] = 0;
  9771. muneIKL[j] = false;
  9772. muneIKR[j] = false;
  9773. if (!isVR)
  9774. {
  9775. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9776. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9777. }
  9778. }
  9779. ikBui = 5;
  9780. isDanceStart1F = false;
  9781. isDanceStart2F = false;
  9782. isDanceStart3F = false;
  9783. isDanceStart4F = false;
  9784. isDanceStart5F = false;
  9785. isDanceStart6F = false;
  9786. isDanceStart7F = false;
  9787. isDanceStart8F = false;
  9788. isDanceStart9F = false;
  9789. isDanceStart10F = false;
  9790. isDanceStart11F = false;
  9791. isDanceStart12F = false;
  9792. isDanceStart13F = false;
  9793. isDanceStart14F = false;
  9794. isDanceStart15F = false;
  9795. for (int j = 0; j < maidCnt; j++)
  9796. {
  9797. danceFace[j] = 0f;
  9798. }
  9799. if (isDanceStart7V)
  9800. {
  9801. for (int j = 0; j < maidCnt; j++)
  9802. {
  9803. if (maidArray[j] && maidArray[j].Visible)
  9804. {
  9805. if (isDanceStart7V)
  9806. {
  9807. maidArray[j].SetPos(dancePos[j]);
  9808. maidArray[j].body0.transform.localRotation = danceRot[j];
  9809. }
  9810. }
  9811. }
  9812. isDanceStart7V = false;
  9813. }
  9814. if (isDanceStart8V)
  9815. {
  9816. for (int j = 0; j < maidCnt; j++)
  9817. {
  9818. if (maidArray[j] && maidArray[j].Visible)
  9819. {
  9820. if (isDanceStart8V)
  9821. {
  9822. maidArray[j].SetPos(dancePos[j]);
  9823. maidArray[j].body0.transform.localRotation = danceRot[j];
  9824. }
  9825. }
  9826. }
  9827. isDanceStart8V = false;
  9828. isDanceStart8P = false;
  9829. }
  9830. if (isDanceStart11V)
  9831. {
  9832. for (int j = 0; j < maidCnt; j++)
  9833. {
  9834. if (maidArray[j] && maidArray[j].Visible)
  9835. {
  9836. if (isDanceStart11V)
  9837. {
  9838. maidArray[j].SetPos(dancePos[j]);
  9839. maidArray[j].body0.transform.localRotation = danceRot[j];
  9840. }
  9841. }
  9842. }
  9843. isDanceStart11V = false;
  9844. }
  9845. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9846. || isDanceStart13K)
  9847. {
  9848. for (int j = 0; j < maidCnt; j++)
  9849. {
  9850. if (maidArray[j] && maidArray[j].Visible)
  9851. {
  9852. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9853. || isDanceStart13K)
  9854. {
  9855. maidArray[j].SetPos(dancePos[j]);
  9856. maidArray[j].body0.transform.localRotation = danceRot[j];
  9857. int i = j;
  9858. if (!isVR)
  9859. {
  9860. delCount[i] = 20;
  9861. if (goSlot[(int)selectList[i]] != null)
  9862. {
  9863. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9864. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9865. {
  9866. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9867. }
  9868. }
  9869. }
  9870. Maid maid = maidArray[j];
  9871. maid.DelProp(MPN.handitem, true);
  9872. maid.DelProp(MPN.accvag, true);
  9873. maid.DelProp(MPN.accanl, true);
  9874. maid.DelProp(MPN.kousoku_upper, true);
  9875. maid.DelProp(MPN.kousoku_lower, true);
  9876. maid.AllProcPropSeqStart();
  9877. }
  9878. }
  9879. }
  9880. isDanceStart1K = false;
  9881. isDanceStart3K = false;
  9882. isDanceStart4K = false;
  9883. isDanceStart5K = false;
  9884. isDanceStart6K = false;
  9885. isDanceStart9K = false;
  9886. isDanceStart13K = false;
  9887. }
  9888. if (isDanceStart14V)
  9889. {
  9890. for (int j = 0; j < maidCnt; j++)
  9891. {
  9892. if (maidArray[j] && maidArray[j].Visible)
  9893. {
  9894. if (isDanceStart14V)
  9895. {
  9896. maidArray[j].SetPos(dancePos[j]);
  9897. maidArray[j].body0.transform.localRotation = danceRot[j];
  9898. }
  9899. }
  9900. }
  9901. isDanceStart14V = false;
  9902. }
  9903. if (isDanceStart15V)
  9904. {
  9905. for (int j = 0; j < maidCnt; j++)
  9906. {
  9907. if (maidArray[j] && maidArray[j].Visible)
  9908. {
  9909. if (isDanceStart15V)
  9910. {
  9911. maidArray[j].SetPos(dancePos[j]);
  9912. maidArray[j].body0.transform.localRotation = danceRot[j];
  9913. }
  9914. }
  9915. }
  9916. isDanceStart15V = false;
  9917. }
  9918. if (isShift)
  9919. {
  9920. if (maidArray[1] && maidArray[1].Visible)
  9921. {
  9922. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9923. {
  9924. Vector3 vector = Vector3.zero;
  9925. vector.x = 0.6f;
  9926. maidArray[1].SetPos(vector);
  9927. if (maidArray[2] && maidArray[2].Visible)
  9928. {
  9929. vector.x = -0.6f;
  9930. maidArray[2].SetPos(vector);
  9931. }
  9932. if (maidArray[3] && maidArray[3].Visible)
  9933. {
  9934. vector.x = 1.2f;
  9935. maidArray[3].SetPos(vector);
  9936. }
  9937. if (maidArray[4] && maidArray[4].Visible)
  9938. {
  9939. vector.x = -1.2f;
  9940. maidArray[4].SetPos(vector);
  9941. }
  9942. if (maidArray[5] && maidArray[5].Visible)
  9943. {
  9944. vector.x = 1.8f;
  9945. maidArray[5].SetPos(vector);
  9946. }
  9947. if (maidArray[6] && maidArray[6].Visible)
  9948. {
  9949. vector.x = -1.8f;
  9950. maidArray[6].SetPos(vector);
  9951. }
  9952. if (maidArray[7] && maidArray[7].Visible)
  9953. {
  9954. vector.x = 2.4f;
  9955. maidArray[7].SetPos(vector);
  9956. }
  9957. if (maidArray[8] && maidArray[8].Visible)
  9958. {
  9959. vector.x = -2.4f;
  9960. maidArray[8].SetPos(vector);
  9961. }
  9962. if (maidArray[9] && maidArray[9].Visible)
  9963. {
  9964. vector.x = 3f;
  9965. maidArray[9].SetPos(vector);
  9966. }
  9967. if (maidArray[10] && maidArray[10].Visible)
  9968. {
  9969. vector.x = -3f;
  9970. maidArray[10].SetPos(vector);
  9971. }
  9972. if (maidArray[11] && maidArray[11].Visible)
  9973. {
  9974. vector.x = 3.6f;
  9975. maidArray[11].SetPos(vector);
  9976. }
  9977. if (maidArray[12] && maidArray[12].Visible)
  9978. {
  9979. vector.x = -3.6f;
  9980. maidArray[12].SetPos(vector);
  9981. }
  9982. if (maidArray[13] && maidArray[13].Visible)
  9983. {
  9984. vector.x = 4.2f;
  9985. maidArray[13].SetPos(vector);
  9986. }
  9987. }
  9988. }
  9989. isDanceStart1K = true;
  9990. for (int j = 0; j < maidCnt; j++)
  9991. {
  9992. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9993. maidArray[j].body0.transform.localRotation.y + 90f,
  9994. maidArray[j].body0.transform.localRotation.z));
  9995. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9996. maidArray[j].body0.transform.position.y,
  9997. maidArray[j].body0.transform.position.z + 4f));
  9998. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9999. int i = j;
  10000. Maid maid = maidArray[j];
  10001. if (!isVR)
  10002. {
  10003. delCount[i] = 20;
  10004. if (goSlot[(int)selectList[i]] != null)
  10005. {
  10006. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10007. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10008. {
  10009. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10010. }
  10011. }
  10012. }
  10013. string[] array = new string[2];
  10014. array = text2.Split(new char[] { ',' });
  10015. maid.DelProp(MPN.handitem, true);
  10016. maid.DelProp(MPN.accvag, true);
  10017. maid.DelProp(MPN.accanl, true);
  10018. maid.DelProp(MPN.kousoku_upper, true);
  10019. maid.DelProp(MPN.kousoku_lower, true);
  10020. if (array[0] != "")
  10021. {
  10022. maid.SetProp(array[0], array[1], 0, true, false);
  10023. }
  10024. maid.AllProcPropSeqStart();
  10025. }
  10026. }
  10027. isDance = true;
  10028. isDanceStart1 = true;
  10029. }
  10030. if (isF2)
  10031. {
  10032. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10033. string text4 = textAsset.text;
  10034. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10035. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10036. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10037. for (int j = 0; j < maidCnt; j++)
  10038. {
  10039. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10040. {
  10041. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10042. GameUty.FileSystem,
  10043. "dance_cm3d_001_f1.anm",
  10044. false,
  10045. false);
  10046. }
  10047. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10048. }
  10049. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10050. for (int j = 0; j < maidCnt; j++)
  10051. {
  10052. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10053. isStop[j] = false;
  10054. isLock[j] = false;
  10055. pHandL[j] = 0;
  10056. pHandR[j] = 0;
  10057. muneIKL[j] = false;
  10058. muneIKR[j] = false;
  10059. if (!isVR)
  10060. {
  10061. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10062. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10063. }
  10064. }
  10065. ikBui = 5;
  10066. isDanceStart1F = false;
  10067. isDanceStart2F = false;
  10068. isDanceStart3F = false;
  10069. isDanceStart4F = false;
  10070. isDanceStart5F = false;
  10071. isDanceStart6F = false;
  10072. isDanceStart7F = false;
  10073. isDanceStart8F = false;
  10074. isDanceStart9F = false;
  10075. isDanceStart10F = false;
  10076. isDanceStart11F = false;
  10077. isDanceStart12F = false;
  10078. isDanceStart13F = false;
  10079. isDanceStart14F = false;
  10080. isDanceStart15F = false;
  10081. for (int j = 0; j < maidCnt; j++)
  10082. {
  10083. danceFace[j] = 0f;
  10084. }
  10085. if (isDanceStart7V)
  10086. {
  10087. for (int j = 0; j < maidCnt; j++)
  10088. {
  10089. if (maidArray[j] && maidArray[j].Visible)
  10090. {
  10091. if (isDanceStart7V)
  10092. {
  10093. maidArray[j].SetPos(dancePos[j]);
  10094. maidArray[j].body0.transform.localRotation = danceRot[j];
  10095. }
  10096. }
  10097. }
  10098. isDanceStart7V = false;
  10099. }
  10100. if (isDanceStart8V)
  10101. {
  10102. for (int j = 0; j < maidCnt; j++)
  10103. {
  10104. if (maidArray[j] && maidArray[j].Visible)
  10105. {
  10106. if (isDanceStart8V)
  10107. {
  10108. maidArray[j].SetPos(dancePos[j]);
  10109. maidArray[j].body0.transform.localRotation = danceRot[j];
  10110. }
  10111. }
  10112. }
  10113. isDanceStart8V = false;
  10114. isDanceStart8P = false;
  10115. }
  10116. if (isDanceStart11V)
  10117. {
  10118. for (int j = 0; j < maidCnt; j++)
  10119. {
  10120. if (maidArray[j] && maidArray[j].Visible)
  10121. {
  10122. if (isDanceStart11V)
  10123. {
  10124. maidArray[j].SetPos(dancePos[j]);
  10125. maidArray[j].body0.transform.localRotation = danceRot[j];
  10126. }
  10127. }
  10128. }
  10129. isDanceStart11V = false;
  10130. }
  10131. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10132. || isDanceStart13K)
  10133. {
  10134. for (int j = 0; j < maidCnt; j++)
  10135. {
  10136. if (maidArray[j] && maidArray[j].Visible)
  10137. {
  10138. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10139. || isDanceStart13K)
  10140. {
  10141. maidArray[j].SetPos(dancePos[j]);
  10142. maidArray[j].body0.transform.localRotation = danceRot[j];
  10143. int i = j;
  10144. if (!isVR)
  10145. {
  10146. delCount[i] = 20;
  10147. if (goSlot[(int)selectList[i]] != null)
  10148. {
  10149. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10150. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10151. {
  10152. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10153. }
  10154. }
  10155. }
  10156. Maid maid = maidArray[j];
  10157. maid.DelProp(MPN.handitem, true);
  10158. maid.DelProp(MPN.accvag, true);
  10159. maid.DelProp(MPN.accanl, true);
  10160. maid.DelProp(MPN.kousoku_upper, true);
  10161. maid.DelProp(MPN.kousoku_lower, true);
  10162. maid.AllProcPropSeqStart();
  10163. }
  10164. }
  10165. }
  10166. isDanceStart1K = false;
  10167. isDanceStart3K = false;
  10168. isDanceStart4K = false;
  10169. isDanceStart5K = false;
  10170. isDanceStart6K = false;
  10171. isDanceStart9K = false;
  10172. isDanceStart13K = false;
  10173. }
  10174. if (isDanceStart14V)
  10175. {
  10176. for (int j = 0; j < maidCnt; j++)
  10177. {
  10178. if (maidArray[j] && maidArray[j].Visible)
  10179. {
  10180. if (isDanceStart14V)
  10181. {
  10182. maidArray[j].SetPos(dancePos[j]);
  10183. maidArray[j].body0.transform.localRotation = danceRot[j];
  10184. }
  10185. }
  10186. }
  10187. isDanceStart14V = false;
  10188. }
  10189. if (isDanceStart15V)
  10190. {
  10191. for (int j = 0; j < maidCnt; j++)
  10192. {
  10193. if (maidArray[j] && maidArray[j].Visible)
  10194. {
  10195. if (isDanceStart15V)
  10196. {
  10197. maidArray[j].SetPos(dancePos[j]);
  10198. maidArray[j].body0.transform.localRotation = danceRot[j];
  10199. }
  10200. }
  10201. }
  10202. isDanceStart15V = false;
  10203. }
  10204. if (maidArray[1] && maidArray[1].Visible)
  10205. {
  10206. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10207. {
  10208. Vector3 vector = Vector3.zero;
  10209. vector.x = 0.6f;
  10210. maidArray[1].SetPos(vector);
  10211. if (maidArray[2] && maidArray[2].Visible)
  10212. {
  10213. vector.x = -0.6f;
  10214. maidArray[2].SetPos(vector);
  10215. }
  10216. if (maidArray[3] && maidArray[3].Visible)
  10217. {
  10218. vector.x = 1.2f;
  10219. maidArray[3].SetPos(vector);
  10220. }
  10221. if (maidArray[4] && maidArray[4].Visible)
  10222. {
  10223. vector.x = -1.2f;
  10224. maidArray[4].SetPos(vector);
  10225. }
  10226. if (maidArray[5] && maidArray[5].Visible)
  10227. {
  10228. vector.x = 1.8f;
  10229. maidArray[5].SetPos(vector);
  10230. }
  10231. if (maidArray[6] && maidArray[6].Visible)
  10232. {
  10233. vector.x = -1.8f;
  10234. maidArray[6].SetPos(vector);
  10235. }
  10236. if (maidArray[7] && maidArray[7].Visible)
  10237. {
  10238. vector.x = 2.4f;
  10239. maidArray[7].SetPos(vector);
  10240. }
  10241. if (maidArray[8] && maidArray[8].Visible)
  10242. {
  10243. vector.x = -2.4f;
  10244. maidArray[8].SetPos(vector);
  10245. }
  10246. if (maidArray[9] && maidArray[9].Visible)
  10247. {
  10248. vector.x = 3f;
  10249. maidArray[9].SetPos(vector);
  10250. }
  10251. if (maidArray[10] && maidArray[10].Visible)
  10252. {
  10253. vector.x = -3f;
  10254. maidArray[10].SetPos(vector);
  10255. }
  10256. if (maidArray[11] && maidArray[11].Visible)
  10257. {
  10258. vector.x = 3.6f;
  10259. maidArray[11].SetPos(vector);
  10260. }
  10261. if (maidArray[12] && maidArray[12].Visible)
  10262. {
  10263. vector.x = -3.6f;
  10264. maidArray[12].SetPos(vector);
  10265. }
  10266. if (maidArray[13] && maidArray[13].Visible)
  10267. {
  10268. vector.x = 4.2f;
  10269. maidArray[13].SetPos(vector);
  10270. }
  10271. }
  10272. }
  10273. isDance = true;
  10274. isDanceStart2 = true;
  10275. isF2 = false;
  10276. }
  10277. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10278. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10279. {
  10280. GameMain.Instance.SoundMgr.StopBGM(0f);
  10281. isF2 = true;
  10282. }
  10283. if (isF3)
  10284. {
  10285. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10286. string text4 = textAsset.text;
  10287. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10288. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10289. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10290. for (int j = 0; j < maidCnt; j++)
  10291. {
  10292. if (!isShift)
  10293. {
  10294. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10295. {
  10296. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10297. GameUty.FileSystem,
  10298. "dance_cm3d_002_end_f1.anm",
  10299. false,
  10300. false);
  10301. }
  10302. }
  10303. else
  10304. {
  10305. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10306. {
  10307. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10308. GameUty.FileSystem,
  10309. "dance_cm3d2_kara_001_sl_f1.anm",
  10310. false,
  10311. false);
  10312. }
  10313. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10314. text4 = textAsset.text;
  10315. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10316. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10317. && !isDanceStart9K && !isDanceStart13K)
  10318. {
  10319. dancePos[j] = maidArray[j].transform.position;
  10320. danceRot[j] = maidArray[j].transform.localRotation;
  10321. }
  10322. }
  10323. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10324. }
  10325. if (!isShift)
  10326. {
  10327. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10328. }
  10329. else
  10330. {
  10331. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10332. }
  10333. for (int j = 0; j < maidCnt; j++)
  10334. {
  10335. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10336. isStop[j] = false;
  10337. isLock[j] = false;
  10338. pHandL[j] = 0;
  10339. pHandR[j] = 0;
  10340. muneIKL[j] = false;
  10341. muneIKR[j] = false;
  10342. if (!isVR)
  10343. {
  10344. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10345. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10346. }
  10347. }
  10348. ikBui = 5;
  10349. isDanceStart1F = false;
  10350. isDanceStart2F = false;
  10351. isDanceStart3F = false;
  10352. isDanceStart4F = false;
  10353. isDanceStart5F = false;
  10354. isDanceStart6F = false;
  10355. isDanceStart7F = false;
  10356. isDanceStart8F = false;
  10357. isDanceStart9F = false;
  10358. isDanceStart10F = false;
  10359. isDanceStart11F = false;
  10360. isDanceStart12F = false;
  10361. isDanceStart13F = false;
  10362. isDanceStart14F = false;
  10363. isDanceStart15F = false;
  10364. for (int j = 0; j < maidCnt; j++)
  10365. {
  10366. danceFace[j] = 0f;
  10367. }
  10368. if (isDanceStart7V)
  10369. {
  10370. for (int j = 0; j < maidCnt; j++)
  10371. {
  10372. if (maidArray[j] && maidArray[j].Visible)
  10373. {
  10374. if (isDanceStart7V)
  10375. {
  10376. maidArray[j].SetPos(dancePos[j]);
  10377. maidArray[j].body0.transform.localRotation = danceRot[j];
  10378. }
  10379. }
  10380. }
  10381. isDanceStart7V = false;
  10382. }
  10383. if (isDanceStart8V)
  10384. {
  10385. for (int j = 0; j < maidCnt; j++)
  10386. {
  10387. if (maidArray[j] && maidArray[j].Visible)
  10388. {
  10389. if (isDanceStart8V)
  10390. {
  10391. maidArray[j].SetPos(dancePos[j]);
  10392. maidArray[j].body0.transform.localRotation = danceRot[j];
  10393. }
  10394. }
  10395. }
  10396. isDanceStart8V = false;
  10397. isDanceStart8P = false;
  10398. }
  10399. if (isDanceStart11V)
  10400. {
  10401. for (int j = 0; j < maidCnt; j++)
  10402. {
  10403. if (maidArray[j] && maidArray[j].Visible)
  10404. {
  10405. if (isDanceStart11V)
  10406. {
  10407. maidArray[j].SetPos(dancePos[j]);
  10408. maidArray[j].body0.transform.localRotation = danceRot[j];
  10409. }
  10410. }
  10411. }
  10412. isDanceStart11V = false;
  10413. }
  10414. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10415. || isDanceStart13K)
  10416. {
  10417. for (int j = 0; j < maidCnt; j++)
  10418. {
  10419. if (maidArray[j] && maidArray[j].Visible)
  10420. {
  10421. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10422. || isDanceStart13K)
  10423. {
  10424. maidArray[j].SetPos(dancePos[j]);
  10425. maidArray[j].body0.transform.localRotation = danceRot[j];
  10426. int i = j;
  10427. if (!isVR)
  10428. {
  10429. delCount[i] = 20;
  10430. if (goSlot[(int)selectList[i]] != null)
  10431. {
  10432. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10433. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10434. {
  10435. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10436. }
  10437. }
  10438. }
  10439. Maid maid = maidArray[j];
  10440. maid.DelProp(MPN.handitem, true);
  10441. maid.DelProp(MPN.accvag, true);
  10442. maid.DelProp(MPN.accanl, true);
  10443. maid.DelProp(MPN.kousoku_upper, true);
  10444. maid.DelProp(MPN.kousoku_lower, true);
  10445. maid.AllProcPropSeqStart();
  10446. }
  10447. }
  10448. }
  10449. isDanceStart1K = false;
  10450. isDanceStart3K = false;
  10451. isDanceStart4K = false;
  10452. isDanceStart5K = false;
  10453. isDanceStart6K = false;
  10454. isDanceStart9K = false;
  10455. isDanceStart13K = false;
  10456. }
  10457. if (isDanceStart14V)
  10458. {
  10459. for (int j = 0; j < maidCnt; j++)
  10460. {
  10461. if (maidArray[j] && maidArray[j].Visible)
  10462. {
  10463. if (isDanceStart14V)
  10464. {
  10465. maidArray[j].SetPos(dancePos[j]);
  10466. maidArray[j].body0.transform.localRotation = danceRot[j];
  10467. }
  10468. }
  10469. }
  10470. isDanceStart14V = false;
  10471. }
  10472. if (isDanceStart15V)
  10473. {
  10474. for (int j = 0; j < maidCnt; j++)
  10475. {
  10476. if (maidArray[j] && maidArray[j].Visible)
  10477. {
  10478. if (isDanceStart15V)
  10479. {
  10480. maidArray[j].SetPos(dancePos[j]);
  10481. maidArray[j].body0.transform.localRotation = danceRot[j];
  10482. }
  10483. }
  10484. }
  10485. isDanceStart15V = false;
  10486. }
  10487. if (maidArray[1] && maidArray[1].Visible)
  10488. {
  10489. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10490. {
  10491. Vector3 vector = Vector3.zero;
  10492. vector.x = 0.6f;
  10493. maidArray[1].SetPos(vector);
  10494. if (maidArray[2] && maidArray[2].Visible)
  10495. {
  10496. vector.x = -0.6f;
  10497. maidArray[2].SetPos(vector);
  10498. }
  10499. if (maidArray[3] && maidArray[3].Visible)
  10500. {
  10501. vector.x = 1.2f;
  10502. maidArray[3].SetPos(vector);
  10503. }
  10504. if (maidArray[4] && maidArray[4].Visible)
  10505. {
  10506. vector.x = -1.2f;
  10507. maidArray[4].SetPos(vector);
  10508. }
  10509. if (maidArray[5] && maidArray[5].Visible)
  10510. {
  10511. vector.x = 1.8f;
  10512. maidArray[5].SetPos(vector);
  10513. }
  10514. if (maidArray[6] && maidArray[6].Visible)
  10515. {
  10516. vector.x = -1.8f;
  10517. maidArray[6].SetPos(vector);
  10518. }
  10519. if (maidArray[7] && maidArray[7].Visible)
  10520. {
  10521. vector.x = 2.4f;
  10522. maidArray[7].SetPos(vector);
  10523. }
  10524. if (maidArray[8] && maidArray[8].Visible)
  10525. {
  10526. vector.x = -2.4f;
  10527. maidArray[8].SetPos(vector);
  10528. }
  10529. if (maidArray[9] && maidArray[9].Visible)
  10530. {
  10531. vector.x = 3f;
  10532. maidArray[9].SetPos(vector);
  10533. }
  10534. if (maidArray[10] && maidArray[10].Visible)
  10535. {
  10536. vector.x = -3f;
  10537. maidArray[10].SetPos(vector);
  10538. }
  10539. if (maidArray[11] && maidArray[11].Visible)
  10540. {
  10541. vector.x = 3.6f;
  10542. maidArray[11].SetPos(vector);
  10543. }
  10544. if (maidArray[12] && maidArray[12].Visible)
  10545. {
  10546. vector.x = -3.6f;
  10547. maidArray[12].SetPos(vector);
  10548. }
  10549. if (maidArray[13] && maidArray[13].Visible)
  10550. {
  10551. vector.x = 4.2f;
  10552. maidArray[13].SetPos(vector);
  10553. }
  10554. }
  10555. }
  10556. if (isShift)
  10557. {
  10558. isDanceStart3K = true;
  10559. for (int j = 0; j < maidCnt; j++)
  10560. {
  10561. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10562. maidArray[j].body0.transform.localRotation.y + 90f,
  10563. maidArray[j].body0.transform.localRotation.z));
  10564. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10565. maidArray[j].body0.transform.position.y,
  10566. maidArray[j].body0.transform.position.z + 4f));
  10567. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10568. int i = j;
  10569. Maid maid = maidArray[j];
  10570. if (!isVR)
  10571. {
  10572. delCount[i] = 20;
  10573. if (goSlot[(int)selectList[i]] != null)
  10574. {
  10575. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10576. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10577. {
  10578. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10579. }
  10580. }
  10581. }
  10582. string[] array = new string[2];
  10583. array = text2.Split(new char[] { ',' });
  10584. maid.DelProp(MPN.handitem, true);
  10585. maid.DelProp(MPN.accvag, true);
  10586. maid.DelProp(MPN.accanl, true);
  10587. maid.DelProp(MPN.kousoku_upper, true);
  10588. maid.DelProp(MPN.kousoku_lower, true);
  10589. if (array[0] != "")
  10590. {
  10591. maid.SetProp(array[0], array[1], 0, true, false);
  10592. }
  10593. maid.AllProcPropSeqStart();
  10594. }
  10595. }
  10596. isDance = true;
  10597. isDanceStart3 = true;
  10598. isF3 = false;
  10599. }
  10600. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10601. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10602. {
  10603. GameMain.Instance.SoundMgr.StopBGM(0f);
  10604. isF3 = true;
  10605. if (getModKeyPressing(modKey.Shift))
  10606. {
  10607. isShift = true;
  10608. }
  10609. }
  10610. if (isSF1 || isSF2 || isSF3)
  10611. {
  10612. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10613. string text4 = textAsset.text;
  10614. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10615. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10616. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10617. for (int j = 0; j < maidCnt; j++)
  10618. {
  10619. if (!isShift)
  10620. {
  10621. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10622. {
  10623. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10624. GameUty.FileSystem,
  10625. "dance_cm3d2_002_smt_f.anm",
  10626. false,
  10627. false);
  10628. }
  10629. }
  10630. else
  10631. {
  10632. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10633. {
  10634. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10635. GameUty.FileSystem,
  10636. "dance_cm3d2_kara02_001_smt_f1.anm",
  10637. false,
  10638. false);
  10639. }
  10640. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10641. text4 = textAsset.text;
  10642. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10643. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10644. && !isDanceStart9K && !isDanceStart13K)
  10645. {
  10646. dancePos[j] = maidArray[j].transform.position;
  10647. danceRot[j] = maidArray[j].transform.localRotation;
  10648. }
  10649. }
  10650. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10651. }
  10652. if (!isShift)
  10653. {
  10654. if (isSF1)
  10655. {
  10656. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10657. }
  10658. if (isSF2)
  10659. {
  10660. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10661. }
  10662. if (isSF3)
  10663. {
  10664. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10665. }
  10666. }
  10667. else
  10668. {
  10669. if (isSF1)
  10670. {
  10671. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10672. }
  10673. if (isSF2)
  10674. {
  10675. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10676. }
  10677. if (isSF3)
  10678. {
  10679. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10680. }
  10681. }
  10682. for (int j = 0; j < maidCnt; j++)
  10683. {
  10684. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10685. isStop[j] = false;
  10686. isLock[j] = false;
  10687. pHandL[j] = 0;
  10688. pHandR[j] = 0;
  10689. muneIKL[j] = false;
  10690. muneIKR[j] = false;
  10691. if (!isVR)
  10692. {
  10693. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10694. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10695. }
  10696. }
  10697. ikBui = 5;
  10698. isDanceStart1F = false;
  10699. isDanceStart2F = false;
  10700. isDanceStart3F = false;
  10701. isDanceStart4F = false;
  10702. isDanceStart5F = false;
  10703. isDanceStart6F = false;
  10704. isDanceStart7F = false;
  10705. isDanceStart8F = false;
  10706. isDanceStart9F = false;
  10707. isDanceStart10F = false;
  10708. isDanceStart11F = false;
  10709. isDanceStart12F = false;
  10710. isDanceStart13F = false;
  10711. isDanceStart14F = false;
  10712. isDanceStart15F = false;
  10713. for (int j = 0; j < maidCnt; j++)
  10714. {
  10715. danceFace[j] = 0f;
  10716. }
  10717. if (isDanceStart7V)
  10718. {
  10719. for (int j = 0; j < maidCnt; j++)
  10720. {
  10721. if (maidArray[j] && maidArray[j].Visible)
  10722. {
  10723. if (isDanceStart7V)
  10724. {
  10725. maidArray[j].SetPos(dancePos[j]);
  10726. maidArray[j].body0.transform.localRotation = danceRot[j];
  10727. }
  10728. }
  10729. }
  10730. isDanceStart7V = false;
  10731. }
  10732. if (isDanceStart8V)
  10733. {
  10734. for (int j = 0; j < maidCnt; j++)
  10735. {
  10736. if (maidArray[j] && maidArray[j].Visible)
  10737. {
  10738. if (isDanceStart8V)
  10739. {
  10740. maidArray[j].SetPos(dancePos[j]);
  10741. maidArray[j].body0.transform.localRotation = danceRot[j];
  10742. }
  10743. }
  10744. }
  10745. isDanceStart8V = false;
  10746. isDanceStart8P = false;
  10747. }
  10748. if (isDanceStart11V)
  10749. {
  10750. for (int j = 0; j < maidCnt; j++)
  10751. {
  10752. if (maidArray[j] && maidArray[j].Visible)
  10753. {
  10754. if (isDanceStart11V)
  10755. {
  10756. maidArray[j].SetPos(dancePos[j]);
  10757. maidArray[j].body0.transform.localRotation = danceRot[j];
  10758. }
  10759. }
  10760. }
  10761. isDanceStart11V = false;
  10762. }
  10763. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10764. || isDanceStart13K)
  10765. {
  10766. for (int j = 0; j < maidCnt; j++)
  10767. {
  10768. if (maidArray[j] && maidArray[j].Visible)
  10769. {
  10770. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10771. || isDanceStart13K)
  10772. {
  10773. maidArray[j].SetPos(dancePos[j]);
  10774. maidArray[j].body0.transform.localRotation = danceRot[j];
  10775. int i = j;
  10776. if (!isVR)
  10777. {
  10778. delCount[i] = 20;
  10779. if (goSlot[(int)selectList[i]] != null)
  10780. {
  10781. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10782. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10783. {
  10784. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10785. }
  10786. }
  10787. }
  10788. Maid maid = maidArray[j];
  10789. maid.DelProp(MPN.handitem, true);
  10790. maid.DelProp(MPN.accvag, true);
  10791. maid.DelProp(MPN.accanl, true);
  10792. maid.DelProp(MPN.kousoku_upper, true);
  10793. maid.DelProp(MPN.kousoku_lower, true);
  10794. maid.AllProcPropSeqStart();
  10795. }
  10796. }
  10797. }
  10798. isDanceStart1K = false;
  10799. isDanceStart3K = false;
  10800. isDanceStart4K = false;
  10801. isDanceStart5K = false;
  10802. isDanceStart6K = false;
  10803. isDanceStart9K = false;
  10804. isDanceStart13K = false;
  10805. }
  10806. if (isDanceStart14V)
  10807. {
  10808. for (int j = 0; j < maidCnt; j++)
  10809. {
  10810. if (maidArray[j] && maidArray[j].Visible)
  10811. {
  10812. if (isDanceStart14V)
  10813. {
  10814. maidArray[j].SetPos(dancePos[j]);
  10815. maidArray[j].body0.transform.localRotation = danceRot[j];
  10816. }
  10817. }
  10818. }
  10819. isDanceStart14V = false;
  10820. }
  10821. if (isDanceStart15V)
  10822. {
  10823. for (int j = 0; j < maidCnt; j++)
  10824. {
  10825. if (maidArray[j] && maidArray[j].Visible)
  10826. {
  10827. if (isDanceStart15V)
  10828. {
  10829. maidArray[j].SetPos(dancePos[j]);
  10830. maidArray[j].body0.transform.localRotation = danceRot[j];
  10831. }
  10832. }
  10833. }
  10834. isDanceStart15V = false;
  10835. }
  10836. if (maidArray[1] && maidArray[1].Visible)
  10837. {
  10838. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10839. {
  10840. Vector3 vector = Vector3.zero;
  10841. vector.x = 0.6f;
  10842. maidArray[1].SetPos(vector);
  10843. if (maidArray[2] && maidArray[2].Visible)
  10844. {
  10845. vector.x = -0.6f;
  10846. maidArray[2].SetPos(vector);
  10847. }
  10848. if (maidArray[3] && maidArray[3].Visible)
  10849. {
  10850. vector.x = 1.2f;
  10851. maidArray[3].SetPos(vector);
  10852. }
  10853. if (maidArray[4] && maidArray[4].Visible)
  10854. {
  10855. vector.x = -1.2f;
  10856. maidArray[4].SetPos(vector);
  10857. }
  10858. if (maidArray[5] && maidArray[5].Visible)
  10859. {
  10860. vector.x = 1.8f;
  10861. maidArray[5].SetPos(vector);
  10862. }
  10863. if (maidArray[6] && maidArray[6].Visible)
  10864. {
  10865. vector.x = -1.8f;
  10866. maidArray[6].SetPos(vector);
  10867. }
  10868. if (maidArray[7] && maidArray[7].Visible)
  10869. {
  10870. vector.x = 2.4f;
  10871. maidArray[7].SetPos(vector);
  10872. }
  10873. if (maidArray[8] && maidArray[8].Visible)
  10874. {
  10875. vector.x = -2.4f;
  10876. maidArray[8].SetPos(vector);
  10877. }
  10878. if (maidArray[9] && maidArray[9].Visible)
  10879. {
  10880. vector.x = 3f;
  10881. maidArray[9].SetPos(vector);
  10882. }
  10883. if (maidArray[10] && maidArray[10].Visible)
  10884. {
  10885. vector.x = -3f;
  10886. maidArray[10].SetPos(vector);
  10887. }
  10888. if (maidArray[11] && maidArray[11].Visible)
  10889. {
  10890. vector.x = 3.6f;
  10891. maidArray[11].SetPos(vector);
  10892. }
  10893. if (maidArray[12] && maidArray[12].Visible)
  10894. {
  10895. vector.x = -3.6f;
  10896. maidArray[12].SetPos(vector);
  10897. }
  10898. if (maidArray[13] && maidArray[13].Visible)
  10899. {
  10900. vector.x = 4.2f;
  10901. maidArray[13].SetPos(vector);
  10902. }
  10903. }
  10904. }
  10905. if (isShift)
  10906. {
  10907. isDanceStart4K = true;
  10908. for (int j = 0; j < maidCnt; j++)
  10909. {
  10910. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10911. maidArray[j].body0.transform.localRotation.y + 90f,
  10912. maidArray[j].body0.transform.localRotation.z));
  10913. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10914. maidArray[j].body0.transform.position.y,
  10915. maidArray[j].body0.transform.position.z + 4f));
  10916. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10917. int i = j;
  10918. Maid maid = maidArray[j];
  10919. if (!isVR)
  10920. {
  10921. delCount[i] = 20;
  10922. if (goSlot[(int)selectList[i]] != null)
  10923. {
  10924. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10925. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10926. {
  10927. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10928. }
  10929. }
  10930. }
  10931. string[] array = new string[2];
  10932. array = text2.Split(new char[] { ',' });
  10933. maid.DelProp(MPN.handitem, true);
  10934. maid.DelProp(MPN.accvag, true);
  10935. maid.DelProp(MPN.accanl, true);
  10936. maid.DelProp(MPN.kousoku_upper, true);
  10937. maid.DelProp(MPN.kousoku_lower, true);
  10938. if (array[0] != "")
  10939. {
  10940. maid.SetProp(array[0], array[1], 0, true, false);
  10941. }
  10942. maid.AllProcPropSeqStart();
  10943. }
  10944. }
  10945. isDance = true;
  10946. isDanceStart4 = true;
  10947. isSF1 = false;
  10948. isSF2 = false;
  10949. isSF3 = false;
  10950. }
  10951. if (isHS1 || isHS2 || isHS3)
  10952. {
  10953. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10954. string text4 = textAsset.text;
  10955. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10956. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10957. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10958. for (int j = 0; j < maidCnt; j++)
  10959. {
  10960. if (!isShift)
  10961. {
  10962. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10963. {
  10964. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10965. GameUty.FileSystem,
  10966. "dance_cm3d2_003_hs_f1.anm",
  10967. false,
  10968. false);
  10969. }
  10970. }
  10971. else
  10972. {
  10973. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10974. {
  10975. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10976. GameUty.FileSystem,
  10977. "dance_cm3d2_kara02_003_hs_f1.anm",
  10978. false,
  10979. false);
  10980. }
  10981. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10982. text4 = textAsset.text;
  10983. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10984. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10985. && !isDanceStart9K && !isDanceStart13K)
  10986. {
  10987. dancePos[j] = maidArray[j].transform.position;
  10988. danceRot[j] = maidArray[j].transform.localRotation;
  10989. }
  10990. }
  10991. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10992. }
  10993. if (!isShift)
  10994. {
  10995. if (isHS1)
  10996. {
  10997. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10998. }
  10999. if (isHS2)
  11000. {
  11001. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11002. }
  11003. if (isHS3)
  11004. {
  11005. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11006. }
  11007. }
  11008. else
  11009. {
  11010. if (isHS1)
  11011. {
  11012. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11013. }
  11014. if (isHS2)
  11015. {
  11016. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11017. }
  11018. if (isHS3)
  11019. {
  11020. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11021. }
  11022. }
  11023. for (int j = 0; j < maidCnt; j++)
  11024. {
  11025. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11026. isStop[j] = false;
  11027. isLock[j] = false;
  11028. pHandL[j] = 0;
  11029. pHandR[j] = 0;
  11030. muneIKL[j] = false;
  11031. muneIKR[j] = false;
  11032. if (!isVR)
  11033. {
  11034. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11035. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11036. }
  11037. }
  11038. ikBui = 5;
  11039. isDanceStart1F = false;
  11040. isDanceStart2F = false;
  11041. isDanceStart3F = false;
  11042. isDanceStart4F = false;
  11043. isDanceStart5F = false;
  11044. isDanceStart6F = false;
  11045. isDanceStart7F = false;
  11046. isDanceStart8F = false;
  11047. isDanceStart9F = false;
  11048. isDanceStart10F = false;
  11049. isDanceStart11F = false;
  11050. isDanceStart12F = false;
  11051. isDanceStart13F = false;
  11052. isDanceStart14F = false;
  11053. isDanceStart15F = false;
  11054. for (int j = 0; j < maidCnt; j++)
  11055. {
  11056. danceFace[j] = 0f;
  11057. }
  11058. if (isDanceStart7V)
  11059. {
  11060. for (int j = 0; j < maidCnt; j++)
  11061. {
  11062. if (maidArray[j] && maidArray[j].Visible)
  11063. {
  11064. if (isDanceStart7V)
  11065. {
  11066. maidArray[j].SetPos(dancePos[j]);
  11067. maidArray[j].body0.transform.localRotation = danceRot[j];
  11068. }
  11069. }
  11070. }
  11071. isDanceStart7V = false;
  11072. }
  11073. if (isDanceStart8V)
  11074. {
  11075. for (int j = 0; j < maidCnt; j++)
  11076. {
  11077. if (maidArray[j] && maidArray[j].Visible)
  11078. {
  11079. if (isDanceStart8V)
  11080. {
  11081. maidArray[j].SetPos(dancePos[j]);
  11082. maidArray[j].body0.transform.localRotation = danceRot[j];
  11083. }
  11084. }
  11085. }
  11086. isDanceStart8V = false;
  11087. isDanceStart8P = false;
  11088. }
  11089. if (isDanceStart11V)
  11090. {
  11091. for (int j = 0; j < maidCnt; j++)
  11092. {
  11093. if (maidArray[j] && maidArray[j].Visible)
  11094. {
  11095. if (isDanceStart11V)
  11096. {
  11097. maidArray[j].SetPos(dancePos[j]);
  11098. maidArray[j].body0.transform.localRotation = danceRot[j];
  11099. }
  11100. }
  11101. }
  11102. isDanceStart11V = false;
  11103. }
  11104. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11105. || isDanceStart13K)
  11106. {
  11107. for (int j = 0; j < maidCnt; j++)
  11108. {
  11109. if (maidArray[j] && maidArray[j].Visible)
  11110. {
  11111. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11112. || isDanceStart13K)
  11113. {
  11114. maidArray[j].SetPos(dancePos[j]);
  11115. maidArray[j].body0.transform.localRotation = danceRot[j];
  11116. int i = j;
  11117. if (!isVR)
  11118. {
  11119. delCount[i] = 20;
  11120. if (goSlot[(int)selectList[i]] != null)
  11121. {
  11122. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11123. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11124. {
  11125. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11126. }
  11127. }
  11128. }
  11129. Maid maid = maidArray[j];
  11130. maid.DelProp(MPN.handitem, true);
  11131. maid.DelProp(MPN.accvag, true);
  11132. maid.DelProp(MPN.accanl, true);
  11133. maid.DelProp(MPN.kousoku_upper, true);
  11134. maid.DelProp(MPN.kousoku_lower, true);
  11135. maid.AllProcPropSeqStart();
  11136. }
  11137. }
  11138. }
  11139. isDanceStart1K = false;
  11140. isDanceStart3K = false;
  11141. isDanceStart4K = false;
  11142. isDanceStart5K = false;
  11143. isDanceStart6K = false;
  11144. isDanceStart9K = false;
  11145. isDanceStart13K = false;
  11146. }
  11147. if (isDanceStart14V)
  11148. {
  11149. for (int j = 0; j < maidCnt; j++)
  11150. {
  11151. if (maidArray[j] && maidArray[j].Visible)
  11152. {
  11153. if (isDanceStart14V)
  11154. {
  11155. maidArray[j].SetPos(dancePos[j]);
  11156. maidArray[j].body0.transform.localRotation = danceRot[j];
  11157. }
  11158. }
  11159. }
  11160. isDanceStart14V = false;
  11161. }
  11162. if (isDanceStart15V)
  11163. {
  11164. for (int j = 0; j < maidCnt; j++)
  11165. {
  11166. if (maidArray[j] && maidArray[j].Visible)
  11167. {
  11168. if (isDanceStart15V)
  11169. {
  11170. maidArray[j].SetPos(dancePos[j]);
  11171. maidArray[j].body0.transform.localRotation = danceRot[j];
  11172. }
  11173. }
  11174. }
  11175. isDanceStart15V = false;
  11176. }
  11177. if (maidArray[1] && maidArray[1].Visible)
  11178. {
  11179. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11180. {
  11181. Vector3 vector = Vector3.zero;
  11182. vector.x = 0.6f;
  11183. maidArray[1].SetPos(vector);
  11184. if (maidArray[2] && maidArray[2].Visible)
  11185. {
  11186. vector.x = -0.6f;
  11187. maidArray[2].SetPos(vector);
  11188. }
  11189. if (maidArray[3] && maidArray[3].Visible)
  11190. {
  11191. vector.x = 1.2f;
  11192. maidArray[3].SetPos(vector);
  11193. }
  11194. if (maidArray[4] && maidArray[4].Visible)
  11195. {
  11196. vector.x = -1.2f;
  11197. maidArray[4].SetPos(vector);
  11198. }
  11199. if (maidArray[5] && maidArray[5].Visible)
  11200. {
  11201. vector.x = 1.8f;
  11202. maidArray[5].SetPos(vector);
  11203. }
  11204. if (maidArray[6] && maidArray[6].Visible)
  11205. {
  11206. vector.x = -1.8f;
  11207. maidArray[6].SetPos(vector);
  11208. }
  11209. if (maidArray[7] && maidArray[7].Visible)
  11210. {
  11211. vector.x = 2.4f;
  11212. maidArray[7].SetPos(vector);
  11213. }
  11214. if (maidArray[8] && maidArray[8].Visible)
  11215. {
  11216. vector.x = -2.4f;
  11217. maidArray[8].SetPos(vector);
  11218. }
  11219. if (maidArray[9] && maidArray[9].Visible)
  11220. {
  11221. vector.x = 3f;
  11222. maidArray[9].SetPos(vector);
  11223. }
  11224. if (maidArray[10] && maidArray[10].Visible)
  11225. {
  11226. vector.x = -3f;
  11227. maidArray[10].SetPos(vector);
  11228. }
  11229. if (maidArray[11] && maidArray[11].Visible)
  11230. {
  11231. vector.x = 3.6f;
  11232. maidArray[11].SetPos(vector);
  11233. }
  11234. if (maidArray[12] && maidArray[12].Visible)
  11235. {
  11236. vector.x = -3.6f;
  11237. maidArray[12].SetPos(vector);
  11238. }
  11239. if (maidArray[13] && maidArray[13].Visible)
  11240. {
  11241. vector.x = 4.2f;
  11242. maidArray[13].SetPos(vector);
  11243. }
  11244. }
  11245. }
  11246. if (isShift)
  11247. {
  11248. isDanceStart6K = true;
  11249. for (int j = 0; j < maidCnt; j++)
  11250. {
  11251. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11252. maidArray[j].body0.transform.localRotation.y + 90f,
  11253. maidArray[j].body0.transform.localRotation.z));
  11254. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11255. maidArray[j].body0.transform.position.y,
  11256. maidArray[j].body0.transform.position.z + 4f));
  11257. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11258. int i = j;
  11259. Maid maid = maidArray[j];
  11260. if (!isVR)
  11261. {
  11262. delCount[i] = 20;
  11263. if (goSlot[(int)selectList[i]] != null)
  11264. {
  11265. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11266. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11267. {
  11268. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11269. }
  11270. }
  11271. }
  11272. string[] array = new string[2];
  11273. array = text2.Split(new char[] { ',' });
  11274. maid.DelProp(MPN.handitem, true);
  11275. maid.DelProp(MPN.accvag, true);
  11276. maid.DelProp(MPN.accanl, true);
  11277. maid.DelProp(MPN.kousoku_upper, true);
  11278. maid.DelProp(MPN.kousoku_lower, true);
  11279. if (array[0] != "")
  11280. {
  11281. maid.SetProp(array[0], array[1], 0, true, false);
  11282. }
  11283. maid.AllProcPropSeqStart();
  11284. }
  11285. }
  11286. isDance = true;
  11287. isDanceStart6 = true;
  11288. isHS1 = false;
  11289. isHS2 = false;
  11290. isHS3 = false;
  11291. }
  11292. if (isHS4 || isHS5 || isHS6)
  11293. {
  11294. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11295. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11296. for (int j = 0; j < maidCnt; j++)
  11297. {
  11298. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11299. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11300. switch (j)
  11301. {
  11302. case 1:
  11303. case 3:
  11304. case 5:
  11305. case 7:
  11306. case 9:
  11307. case 11:
  11308. case 13:
  11309. text5 = "dance_cm3d2_003_hs_f2.anm";
  11310. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11311. break;
  11312. }
  11313. if (maidArray[j] && maidArray[j].Visible)
  11314. {
  11315. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11316. {
  11317. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11318. }
  11319. string text4 = textAsset.text;
  11320. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11321. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11322. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11323. }
  11324. }
  11325. if (isHS4)
  11326. {
  11327. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11328. }
  11329. if (isHS5)
  11330. {
  11331. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11332. }
  11333. if (isHS6)
  11334. {
  11335. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11336. }
  11337. ikBui = 5;
  11338. isDanceStart1F = false;
  11339. isDanceStart2F = false;
  11340. isDanceStart3F = false;
  11341. isDanceStart4F = false;
  11342. isDanceStart5F = false;
  11343. isDanceStart6F = false;
  11344. isDanceStart7F = false;
  11345. isDanceStart8F = false;
  11346. isDanceStart9F = false;
  11347. isDanceStart10F = false;
  11348. isDanceStart11F = false;
  11349. isDanceStart12F = false;
  11350. isDanceStart13F = false;
  11351. isDanceStart14F = false;
  11352. isDanceStart15F = false;
  11353. for (int j = 0; j < maidCnt; j++)
  11354. {
  11355. danceFace[j] = 0f;
  11356. }
  11357. if (isDanceStart7V)
  11358. {
  11359. for (int j = 0; j < maidCnt; j++)
  11360. {
  11361. if (maidArray[j] && maidArray[j].Visible)
  11362. {
  11363. if (isDanceStart7V)
  11364. {
  11365. maidArray[j].SetPos(dancePos[j]);
  11366. maidArray[j].body0.transform.localRotation = danceRot[j];
  11367. }
  11368. }
  11369. }
  11370. isDanceStart7V = false;
  11371. }
  11372. if (isDanceStart8V)
  11373. {
  11374. for (int j = 0; j < maidCnt; j++)
  11375. {
  11376. if (maidArray[j] && maidArray[j].Visible)
  11377. {
  11378. if (isDanceStart8V)
  11379. {
  11380. maidArray[j].SetPos(dancePos[j]);
  11381. maidArray[j].body0.transform.localRotation = danceRot[j];
  11382. }
  11383. }
  11384. }
  11385. isDanceStart8V = false;
  11386. isDanceStart8P = false;
  11387. }
  11388. if (isDanceStart11V)
  11389. {
  11390. for (int j = 0; j < maidCnt; j++)
  11391. {
  11392. if (maidArray[j] && maidArray[j].Visible)
  11393. {
  11394. if (isDanceStart11V)
  11395. {
  11396. maidArray[j].SetPos(dancePos[j]);
  11397. maidArray[j].body0.transform.localRotation = danceRot[j];
  11398. }
  11399. }
  11400. }
  11401. isDanceStart11V = false;
  11402. }
  11403. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11404. || isDanceStart13K)
  11405. {
  11406. for (int j = 0; j < maidCnt; j++)
  11407. {
  11408. if (maidArray[j] && maidArray[j].Visible)
  11409. {
  11410. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11411. || isDanceStart13K)
  11412. {
  11413. maidArray[j].SetPos(dancePos[j]);
  11414. maidArray[j].body0.transform.localRotation = danceRot[j];
  11415. int i = j;
  11416. if (!isVR)
  11417. {
  11418. delCount[i] = 20;
  11419. if (goSlot[(int)selectList[i]] != null)
  11420. {
  11421. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11422. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11423. {
  11424. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11425. }
  11426. }
  11427. }
  11428. Maid maid = maidArray[j];
  11429. maid.DelProp(MPN.handitem, true);
  11430. maid.DelProp(MPN.accvag, true);
  11431. maid.DelProp(MPN.accanl, true);
  11432. maid.DelProp(MPN.kousoku_upper, true);
  11433. maid.DelProp(MPN.kousoku_lower, true);
  11434. maid.AllProcPropSeqStart();
  11435. }
  11436. }
  11437. }
  11438. isDanceStart1K = false;
  11439. isDanceStart3K = false;
  11440. isDanceStart4K = false;
  11441. isDanceStart5K = false;
  11442. isDanceStart6K = false;
  11443. isDanceStart9K = false;
  11444. isDanceStart13K = false;
  11445. }
  11446. if (isDanceStart14V)
  11447. {
  11448. for (int j = 0; j < maidCnt; j++)
  11449. {
  11450. if (maidArray[j] && maidArray[j].Visible)
  11451. {
  11452. if (isDanceStart14V)
  11453. {
  11454. maidArray[j].SetPos(dancePos[j]);
  11455. maidArray[j].body0.transform.localRotation = danceRot[j];
  11456. }
  11457. }
  11458. }
  11459. isDanceStart14V = false;
  11460. }
  11461. if (isDanceStart15V)
  11462. {
  11463. for (int j = 0; j < maidCnt; j++)
  11464. {
  11465. if (maidArray[j] && maidArray[j].Visible)
  11466. {
  11467. if (isDanceStart15V)
  11468. {
  11469. maidArray[j].SetPos(dancePos[j]);
  11470. maidArray[j].body0.transform.localRotation = danceRot[j];
  11471. }
  11472. }
  11473. }
  11474. isDanceStart15V = false;
  11475. }
  11476. for (int j = 0; j < maidCnt; j++)
  11477. {
  11478. isStop[j] = false;
  11479. isLock[j] = false;
  11480. pHandL[j] = 0;
  11481. pHandR[j] = 0;
  11482. muneIKL[j] = false;
  11483. muneIKR[j] = false;
  11484. if (!isVR)
  11485. {
  11486. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11487. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11488. }
  11489. if (maidArray[j].transform.position.y != 100f)
  11490. {
  11491. dancePos[j] = maidArray[j].transform.position;
  11492. }
  11493. else
  11494. {
  11495. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11496. }
  11497. danceRot[j] = maidArray[j].transform.localRotation;
  11498. }
  11499. if (maidArray[1] && maidArray[1].Visible)
  11500. {
  11501. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11502. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11503. }
  11504. if (maidArray[3] && maidArray[3].Visible)
  11505. {
  11506. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11507. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11508. }
  11509. if (maidArray[5] && maidArray[5].Visible)
  11510. {
  11511. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11512. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11513. }
  11514. if (maidArray[7] && maidArray[7].Visible)
  11515. {
  11516. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11517. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11518. }
  11519. if (maidArray[9] && maidArray[9].Visible)
  11520. {
  11521. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11522. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11523. }
  11524. if (maidArray[11] && maidArray[11].Visible)
  11525. {
  11526. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11527. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11528. }
  11529. if (maidArray[13] && maidArray[13].Visible)
  11530. {
  11531. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11532. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11533. }
  11534. if (maidArray[2] && maidArray[2].Visible)
  11535. {
  11536. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11537. {
  11538. Vector3 vector = Vector3.zero;
  11539. vector.x = 0.6f;
  11540. maidArray[1].SetPos(vector);
  11541. if (maidArray[2] && maidArray[2].Visible)
  11542. {
  11543. vector.x = -0.6f;
  11544. maidArray[2].SetPos(vector);
  11545. }
  11546. if (maidArray[3] && maidArray[3].Visible)
  11547. {
  11548. vector.x = 1.2f;
  11549. maidArray[3].SetPos(vector);
  11550. }
  11551. if (maidArray[4] && maidArray[4].Visible)
  11552. {
  11553. vector.x = -1.2f;
  11554. maidArray[4].SetPos(vector);
  11555. }
  11556. if (maidArray[5] && maidArray[5].Visible)
  11557. {
  11558. vector.x = 1.8f;
  11559. maidArray[5].SetPos(vector);
  11560. }
  11561. if (maidArray[6] && maidArray[6].Visible)
  11562. {
  11563. vector.x = -1.8f;
  11564. maidArray[6].SetPos(vector);
  11565. }
  11566. if (maidArray[7] && maidArray[7].Visible)
  11567. {
  11568. vector.x = 2.4f;
  11569. maidArray[7].SetPos(vector);
  11570. }
  11571. if (maidArray[8] && maidArray[8].Visible)
  11572. {
  11573. vector.x = -2.4f;
  11574. maidArray[8].SetPos(vector);
  11575. }
  11576. if (maidArray[9] && maidArray[9].Visible)
  11577. {
  11578. vector.x = 3f;
  11579. maidArray[9].SetPos(vector);
  11580. }
  11581. if (maidArray[10] && maidArray[10].Visible)
  11582. {
  11583. vector.x = -3f;
  11584. maidArray[10].SetPos(vector);
  11585. }
  11586. if (maidArray[11] && maidArray[11].Visible)
  11587. {
  11588. vector.x = 3.6f;
  11589. maidArray[11].SetPos(vector);
  11590. }
  11591. if (maidArray[12] && maidArray[12].Visible)
  11592. {
  11593. vector.x = -3.6f;
  11594. maidArray[12].SetPos(vector);
  11595. }
  11596. if (maidArray[13] && maidArray[13].Visible)
  11597. {
  11598. vector.x = 4.2f;
  11599. maidArray[13].SetPos(vector);
  11600. }
  11601. }
  11602. }
  11603. isDance = true;
  11604. isDanceStart7 = true;
  11605. isHS4 = false;
  11606. isHS5 = false;
  11607. isHS6 = false;
  11608. }
  11609. if (isHS7 || isHS8 || isHS9)
  11610. {
  11611. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11612. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11613. for (int j = 0; j < maidCnt; j++)
  11614. {
  11615. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11616. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11617. switch (j)
  11618. {
  11619. case 1:
  11620. case 5:
  11621. case 9:
  11622. case 13:
  11623. text5 = "dance_cm3d2_003_hs_f2.anm";
  11624. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11625. break;
  11626. case 2:
  11627. case 6:
  11628. case 10:
  11629. text5 = "dance_cm3d2_003_hs_f3.anm";
  11630. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11631. break;
  11632. case 3:
  11633. case 7:
  11634. case 11:
  11635. text5 = "dance_cm3d2_003_hs_f4.anm";
  11636. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11637. break;
  11638. }
  11639. if (maidArray[j] && maidArray[j].Visible)
  11640. {
  11641. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11642. {
  11643. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11644. }
  11645. }
  11646. string text4 = textAsset.text;
  11647. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11648. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11649. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11650. }
  11651. if (isHS7)
  11652. {
  11653. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11654. }
  11655. if (isHS8)
  11656. {
  11657. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11658. }
  11659. if (isHS9)
  11660. {
  11661. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11662. }
  11663. ikBui = 5;
  11664. isDanceStart1F = false;
  11665. isDanceStart2F = false;
  11666. isDanceStart3F = false;
  11667. isDanceStart4F = false;
  11668. isDanceStart5F = false;
  11669. isDanceStart6F = false;
  11670. isDanceStart7F = false;
  11671. isDanceStart8F = false;
  11672. isDanceStart9F = false;
  11673. isDanceStart10F = false;
  11674. isDanceStart11F = false;
  11675. isDanceStart12F = false;
  11676. isDanceStart13F = false;
  11677. isDanceStart14F = false;
  11678. isDanceStart15F = false;
  11679. for (int j = 0; j < maidCnt; j++)
  11680. {
  11681. danceFace[j] = 0f;
  11682. }
  11683. if (isDanceStart8V)
  11684. {
  11685. for (int j = 0; j < maidCnt; j++)
  11686. {
  11687. if (maidArray[j] && maidArray[j].Visible)
  11688. {
  11689. if (isDanceStart8V)
  11690. {
  11691. maidArray[j].SetPos(dancePos[j]);
  11692. maidArray[j].body0.transform.localRotation = danceRot[j];
  11693. }
  11694. }
  11695. }
  11696. isDanceStart8V = false;
  11697. isDanceStart8P = false;
  11698. }
  11699. for (int j = 0; j < maidCnt; j++)
  11700. {
  11701. isStop[j] = false;
  11702. isLock[j] = false;
  11703. pHandL[j] = 0;
  11704. pHandR[j] = 0;
  11705. muneIKL[j] = false;
  11706. muneIKR[j] = false;
  11707. if (!isVR)
  11708. {
  11709. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11710. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11711. }
  11712. if (maidArray[j].transform.position.y != 100f)
  11713. {
  11714. dancePos[j] = maidArray[j].transform.position;
  11715. }
  11716. else
  11717. {
  11718. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11719. }
  11720. danceRot[j] = maidArray[j].transform.localRotation;
  11721. }
  11722. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11723. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11724. {
  11725. maidArray[0].SetPos(Vector3.zero);
  11726. maidArray[0].SetRot(Vector3.zero);
  11727. }
  11728. if (maidArray[1] && maidArray[1].Visible)
  11729. {
  11730. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11731. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11732. }
  11733. if (maidArray[2] && maidArray[2].Visible)
  11734. {
  11735. maidArray[2].SetPos(maidArray[0].transform.position);
  11736. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11737. }
  11738. if (maidArray[3] && maidArray[3].Visible)
  11739. {
  11740. maidArray[3].SetPos(maidArray[0].transform.position);
  11741. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11742. }
  11743. if (maidArray[5] && maidArray[5].Visible)
  11744. {
  11745. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11746. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11747. }
  11748. if (maidArray[6] && maidArray[6].Visible)
  11749. {
  11750. maidArray[6].SetPos(maidArray[4].transform.position);
  11751. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11752. }
  11753. if (maidArray[7] && maidArray[7].Visible)
  11754. {
  11755. maidArray[7].SetPos(maidArray[4].transform.position);
  11756. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11757. }
  11758. if (maidArray[9] && maidArray[9].Visible)
  11759. {
  11760. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11761. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11762. }
  11763. if (maidArray[10] && maidArray[10].Visible)
  11764. {
  11765. maidArray[10].SetPos(maidArray[8].transform.position);
  11766. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11767. }
  11768. if (maidArray[11] && maidArray[11].Visible)
  11769. {
  11770. maidArray[11].SetPos(maidArray[8].transform.position);
  11771. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11772. }
  11773. if (maidArray[13] && maidArray[13].Visible)
  11774. {
  11775. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11776. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11777. }
  11778. if (maidArray[4] && maidArray[4].Visible)
  11779. {
  11780. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11781. {
  11782. Vector3 vector = Vector3.zero;
  11783. vector.x = 0.6f;
  11784. maidArray[1].SetPos(vector);
  11785. if (maidArray[2] && maidArray[2].Visible)
  11786. {
  11787. vector.x = -0.6f;
  11788. maidArray[2].SetPos(vector);
  11789. }
  11790. if (maidArray[3] && maidArray[3].Visible)
  11791. {
  11792. vector.x = 1.2f;
  11793. maidArray[3].SetPos(vector);
  11794. }
  11795. if (maidArray[4] && maidArray[4].Visible)
  11796. {
  11797. vector.x = -1.2f;
  11798. maidArray[4].SetPos(vector);
  11799. }
  11800. if (maidArray[5] && maidArray[5].Visible)
  11801. {
  11802. vector.x = 1.8f;
  11803. maidArray[5].SetPos(vector);
  11804. }
  11805. if (maidArray[6] && maidArray[6].Visible)
  11806. {
  11807. vector.x = -1.8f;
  11808. maidArray[6].SetPos(vector);
  11809. }
  11810. if (maidArray[7] && maidArray[7].Visible)
  11811. {
  11812. vector.x = 2.4f;
  11813. maidArray[7].SetPos(vector);
  11814. }
  11815. if (maidArray[8] && maidArray[8].Visible)
  11816. {
  11817. vector.x = -2.4f;
  11818. maidArray[8].SetPos(vector);
  11819. }
  11820. if (maidArray[9] && maidArray[9].Visible)
  11821. {
  11822. vector.x = 3f;
  11823. maidArray[9].SetPos(vector);
  11824. }
  11825. if (maidArray[10] && maidArray[10].Visible)
  11826. {
  11827. vector.x = -3f;
  11828. maidArray[10].SetPos(vector);
  11829. }
  11830. if (maidArray[11] && maidArray[11].Visible)
  11831. {
  11832. vector.x = 3.6f;
  11833. maidArray[11].SetPos(vector);
  11834. }
  11835. if (maidArray[12] && maidArray[12].Visible)
  11836. {
  11837. vector.x = -3.6f;
  11838. maidArray[12].SetPos(vector);
  11839. }
  11840. if (maidArray[13] && maidArray[13].Visible)
  11841. {
  11842. vector.x = 4.2f;
  11843. maidArray[13].SetPos(vector);
  11844. }
  11845. }
  11846. }
  11847. isDance = true;
  11848. isDanceStart8 = true;
  11849. isHS7 = false;
  11850. isHS8 = false;
  11851. isHS9 = false;
  11852. }
  11853. if (isCF1)
  11854. {
  11855. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11856. string text4 = textAsset.text;
  11857. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11858. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11859. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11860. for (int j = 0; j < maidCnt; j++)
  11861. {
  11862. if (!isShift)
  11863. {
  11864. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11865. {
  11866. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11867. GameUty.FileSystem,
  11868. "dance_cm3d_003_sp2_f1.anm",
  11869. false,
  11870. false);
  11871. }
  11872. }
  11873. else
  11874. {
  11875. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11876. {
  11877. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11878. GameUty.FileSystem,
  11879. "dance_cm3d2_kara02_002_rty_f1.anm",
  11880. false,
  11881. false);
  11882. }
  11883. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11884. text4 = textAsset.text;
  11885. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11886. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11887. && !isDanceStart9K && !isDanceStart13K)
  11888. {
  11889. dancePos[j] = maidArray[j].transform.position;
  11890. danceRot[j] = maidArray[j].transform.localRotation;
  11891. }
  11892. }
  11893. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11894. }
  11895. if (!isShift)
  11896. {
  11897. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11898. }
  11899. else
  11900. {
  11901. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11902. }
  11903. for (int j = 0; j < maidCnt; j++)
  11904. {
  11905. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11906. isStop[j] = false;
  11907. isLock[j] = false;
  11908. pHandL[j] = 0;
  11909. pHandR[j] = 0;
  11910. muneIKL[j] = false;
  11911. muneIKR[j] = false;
  11912. if (!isVR)
  11913. {
  11914. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11915. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11916. }
  11917. }
  11918. ikBui = 5;
  11919. isDanceStart1F = false;
  11920. isDanceStart2F = false;
  11921. isDanceStart3F = false;
  11922. isDanceStart4F = false;
  11923. isDanceStart5F = false;
  11924. isDanceStart6F = false;
  11925. isDanceStart7F = false;
  11926. isDanceStart8F = false;
  11927. isDanceStart9F = false;
  11928. isDanceStart10F = false;
  11929. isDanceStart11F = false;
  11930. isDanceStart12F = false;
  11931. isDanceStart13F = false;
  11932. isDanceStart14F = false;
  11933. isDanceStart15F = false;
  11934. for (int j = 0; j < maidCnt; j++)
  11935. {
  11936. danceFace[j] = 0f;
  11937. }
  11938. if (isDanceStart7V)
  11939. {
  11940. for (int j = 0; j < maidCnt; j++)
  11941. {
  11942. if (maidArray[j] && maidArray[j].Visible)
  11943. {
  11944. if (isDanceStart7V)
  11945. {
  11946. maidArray[j].SetPos(dancePos[j]);
  11947. maidArray[j].body0.transform.localRotation = danceRot[j];
  11948. }
  11949. }
  11950. }
  11951. isDanceStart7V = false;
  11952. }
  11953. if (isDanceStart8V)
  11954. {
  11955. for (int j = 0; j < maidCnt; j++)
  11956. {
  11957. if (maidArray[j] && maidArray[j].Visible)
  11958. {
  11959. if (isDanceStart8V)
  11960. {
  11961. maidArray[j].SetPos(dancePos[j]);
  11962. maidArray[j].body0.transform.localRotation = danceRot[j];
  11963. }
  11964. }
  11965. }
  11966. isDanceStart8V = false;
  11967. isDanceStart8P = false;
  11968. }
  11969. if (isDanceStart11V)
  11970. {
  11971. for (int j = 0; j < maidCnt; j++)
  11972. {
  11973. if (maidArray[j] && maidArray[j].Visible)
  11974. {
  11975. if (isDanceStart11V)
  11976. {
  11977. maidArray[j].SetPos(dancePos[j]);
  11978. maidArray[j].body0.transform.localRotation = danceRot[j];
  11979. }
  11980. }
  11981. }
  11982. isDanceStart11V = false;
  11983. }
  11984. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11985. || isDanceStart13K)
  11986. {
  11987. for (int j = 0; j < maidCnt; j++)
  11988. {
  11989. if (maidArray[j] && maidArray[j].Visible)
  11990. {
  11991. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11992. || isDanceStart13K)
  11993. {
  11994. maidArray[j].SetPos(dancePos[j]);
  11995. maidArray[j].body0.transform.localRotation = danceRot[j];
  11996. int i = j;
  11997. if (!isVR)
  11998. {
  11999. delCount[i] = 20;
  12000. if (goSlot[(int)selectList[i]] != null)
  12001. {
  12002. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12003. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12004. {
  12005. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12006. }
  12007. }
  12008. }
  12009. Maid maid = maidArray[j];
  12010. maid.DelProp(MPN.handitem, true);
  12011. maid.DelProp(MPN.accvag, true);
  12012. maid.DelProp(MPN.accanl, true);
  12013. maid.DelProp(MPN.kousoku_upper, true);
  12014. maid.DelProp(MPN.kousoku_lower, true);
  12015. maid.AllProcPropSeqStart();
  12016. }
  12017. }
  12018. }
  12019. isDanceStart1K = false;
  12020. isDanceStart3K = false;
  12021. isDanceStart4K = false;
  12022. isDanceStart5K = false;
  12023. isDanceStart6K = false;
  12024. isDanceStart9K = false;
  12025. isDanceStart13K = false;
  12026. }
  12027. if (isDanceStart14V)
  12028. {
  12029. for (int j = 0; j < maidCnt; j++)
  12030. {
  12031. if (maidArray[j] && maidArray[j].Visible)
  12032. {
  12033. if (isDanceStart14V)
  12034. {
  12035. maidArray[j].SetPos(dancePos[j]);
  12036. maidArray[j].body0.transform.localRotation = danceRot[j];
  12037. }
  12038. }
  12039. }
  12040. isDanceStart14V = false;
  12041. }
  12042. if (isDanceStart15V)
  12043. {
  12044. for (int j = 0; j < maidCnt; j++)
  12045. {
  12046. if (maidArray[j] && maidArray[j].Visible)
  12047. {
  12048. if (isDanceStart15V)
  12049. {
  12050. maidArray[j].SetPos(dancePos[j]);
  12051. maidArray[j].body0.transform.localRotation = danceRot[j];
  12052. }
  12053. }
  12054. }
  12055. isDanceStart15V = false;
  12056. }
  12057. if (maidArray[1] && maidArray[1].Visible)
  12058. {
  12059. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12060. {
  12061. Vector3 vector = Vector3.zero;
  12062. vector.x = 0.6f;
  12063. maidArray[1].SetPos(vector);
  12064. if (maidArray[2] && maidArray[2].Visible)
  12065. {
  12066. vector.x = -0.6f;
  12067. maidArray[2].SetPos(vector);
  12068. }
  12069. if (maidArray[3] && maidArray[3].Visible)
  12070. {
  12071. vector.x = 1.2f;
  12072. maidArray[3].SetPos(vector);
  12073. }
  12074. if (maidArray[4] && maidArray[4].Visible)
  12075. {
  12076. vector.x = -1.2f;
  12077. maidArray[4].SetPos(vector);
  12078. }
  12079. if (maidArray[5] && maidArray[5].Visible)
  12080. {
  12081. vector.x = 1.8f;
  12082. maidArray[5].SetPos(vector);
  12083. }
  12084. if (maidArray[6] && maidArray[6].Visible)
  12085. {
  12086. vector.x = -1.8f;
  12087. maidArray[6].SetPos(vector);
  12088. }
  12089. if (maidArray[7] && maidArray[7].Visible)
  12090. {
  12091. vector.x = 2.4f;
  12092. maidArray[7].SetPos(vector);
  12093. }
  12094. if (maidArray[8] && maidArray[8].Visible)
  12095. {
  12096. vector.x = -2.4f;
  12097. maidArray[8].SetPos(vector);
  12098. }
  12099. if (maidArray[9] && maidArray[9].Visible)
  12100. {
  12101. vector.x = 3f;
  12102. maidArray[9].SetPos(vector);
  12103. }
  12104. if (maidArray[10] && maidArray[10].Visible)
  12105. {
  12106. vector.x = -3f;
  12107. maidArray[10].SetPos(vector);
  12108. }
  12109. if (maidArray[11] && maidArray[11].Visible)
  12110. {
  12111. vector.x = 3.6f;
  12112. maidArray[11].SetPos(vector);
  12113. }
  12114. if (maidArray[12] && maidArray[12].Visible)
  12115. {
  12116. vector.x = -3.6f;
  12117. maidArray[12].SetPos(vector);
  12118. }
  12119. if (maidArray[13] && maidArray[13].Visible)
  12120. {
  12121. vector.x = 4.2f;
  12122. maidArray[13].SetPos(vector);
  12123. }
  12124. }
  12125. }
  12126. if (isShift)
  12127. {
  12128. isDanceStart5K = true;
  12129. for (int j = 0; j < maidCnt; j++)
  12130. {
  12131. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12132. maidArray[j].body0.transform.localRotation.y + 90f,
  12133. maidArray[j].body0.transform.localRotation.z));
  12134. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12135. maidArray[j].body0.transform.position.y,
  12136. maidArray[j].body0.transform.position.z + 4f));
  12137. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12138. int i = j;
  12139. Maid maid = maidArray[j];
  12140. if (!isVR)
  12141. {
  12142. delCount[i] = 20;
  12143. if (goSlot[(int)selectList[i]] != null)
  12144. {
  12145. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12146. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12147. {
  12148. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12149. }
  12150. }
  12151. }
  12152. string[] array = new string[2];
  12153. array = text2.Split(new char[] { ',' });
  12154. maid.DelProp(MPN.handitem, true);
  12155. maid.DelProp(MPN.accvag, true);
  12156. maid.DelProp(MPN.accanl, true);
  12157. maid.DelProp(MPN.kousoku_upper, true);
  12158. maid.DelProp(MPN.kousoku_lower, true);
  12159. if (array[0] != "")
  12160. {
  12161. maid.SetProp(array[0], array[1], 0, true, false);
  12162. }
  12163. maid.AllProcPropSeqStart();
  12164. }
  12165. }
  12166. isDance = true;
  12167. isDanceStart5 = true;
  12168. isCF1 = false;
  12169. }
  12170. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12171. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12172. {
  12173. GameMain.Instance.SoundMgr.StopBGM(0f);
  12174. isCF1 = true;
  12175. if (getModKeyPressing(modKey.Shift))
  12176. {
  12177. isShift = true;
  12178. }
  12179. }
  12180. if (isKT1)
  12181. {
  12182. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12183. string text4 = textAsset.text;
  12184. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12185. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12186. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12187. for (int j = 0; j < maidCnt; j++)
  12188. {
  12189. if (!isShift)
  12190. {
  12191. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12192. {
  12193. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12194. GameUty.FileSystem,
  12195. "dance_cm3d_004_kano_f1.anm",
  12196. false,
  12197. false);
  12198. }
  12199. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12200. }
  12201. else
  12202. {
  12203. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12204. {
  12205. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12206. GameUty.FileSystem,
  12207. "dance_cm3d2_kara_002_cktc_f1.anm",
  12208. false,
  12209. false);
  12210. }
  12211. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12212. text4 = textAsset.text;
  12213. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12214. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12215. && !isDanceStart9K && !isDanceStart13K)
  12216. {
  12217. dancePos[j] = maidArray[j].transform.position;
  12218. danceRot[j] = maidArray[j].transform.localRotation;
  12219. }
  12220. }
  12221. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12222. }
  12223. if (!isShift)
  12224. {
  12225. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12226. }
  12227. else
  12228. {
  12229. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12230. }
  12231. for (int j = 0; j < maidCnt; j++)
  12232. {
  12233. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12234. isStop[j] = false;
  12235. isLock[j] = false;
  12236. pHandL[j] = 0;
  12237. pHandR[j] = 0;
  12238. muneIKL[j] = false;
  12239. muneIKR[j] = false;
  12240. if (!isVR)
  12241. {
  12242. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12243. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12244. }
  12245. }
  12246. ikBui = 5;
  12247. isDanceStart1F = false;
  12248. isDanceStart2F = false;
  12249. isDanceStart3F = false;
  12250. isDanceStart4F = false;
  12251. isDanceStart5F = false;
  12252. isDanceStart6F = false;
  12253. isDanceStart7F = false;
  12254. isDanceStart8F = false;
  12255. isDanceStart9F = false;
  12256. isDanceStart10F = false;
  12257. isDanceStart11F = false;
  12258. isDanceStart12F = false;
  12259. isDanceStart13F = false;
  12260. isDanceStart14F = false;
  12261. isDanceStart15F = false;
  12262. for (int j = 0; j < maidCnt; j++)
  12263. {
  12264. danceFace[j] = 0f;
  12265. }
  12266. if (isDanceStart7V)
  12267. {
  12268. for (int j = 0; j < maidCnt; j++)
  12269. {
  12270. if (maidArray[j] && maidArray[j].Visible)
  12271. {
  12272. if (isDanceStart7V)
  12273. {
  12274. maidArray[j].SetPos(dancePos[j]);
  12275. maidArray[j].body0.transform.localRotation = danceRot[j];
  12276. }
  12277. }
  12278. }
  12279. isDanceStart7V = false;
  12280. }
  12281. if (isDanceStart8V)
  12282. {
  12283. for (int j = 0; j < maidCnt; j++)
  12284. {
  12285. if (maidArray[j] && maidArray[j].Visible)
  12286. {
  12287. if (isDanceStart8V)
  12288. {
  12289. maidArray[j].SetPos(dancePos[j]);
  12290. maidArray[j].body0.transform.localRotation = danceRot[j];
  12291. }
  12292. }
  12293. }
  12294. isDanceStart8V = false;
  12295. isDanceStart8P = false;
  12296. }
  12297. if (isDanceStart11V)
  12298. {
  12299. for (int j = 0; j < maidCnt; j++)
  12300. {
  12301. if (maidArray[j] && maidArray[j].Visible)
  12302. {
  12303. if (isDanceStart11V)
  12304. {
  12305. maidArray[j].SetPos(dancePos[j]);
  12306. maidArray[j].body0.transform.localRotation = danceRot[j];
  12307. }
  12308. }
  12309. }
  12310. isDanceStart11V = false;
  12311. }
  12312. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12313. || isDanceStart13K)
  12314. {
  12315. for (int j = 0; j < maidCnt; j++)
  12316. {
  12317. if (maidArray[j] && maidArray[j].Visible)
  12318. {
  12319. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12320. || isDanceStart13K)
  12321. {
  12322. maidArray[j].SetPos(dancePos[j]);
  12323. maidArray[j].body0.transform.localRotation = danceRot[j];
  12324. int i = j;
  12325. if (!isVR)
  12326. {
  12327. delCount[i] = 20;
  12328. if (goSlot[(int)selectList[i]] != null)
  12329. {
  12330. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12331. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12332. {
  12333. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12334. }
  12335. }
  12336. }
  12337. Maid maid = maidArray[j];
  12338. maid.DelProp(MPN.handitem, true);
  12339. maid.DelProp(MPN.accvag, true);
  12340. maid.DelProp(MPN.accanl, true);
  12341. maid.DelProp(MPN.kousoku_upper, true);
  12342. maid.DelProp(MPN.kousoku_lower, true);
  12343. maid.AllProcPropSeqStart();
  12344. }
  12345. }
  12346. }
  12347. isDanceStart1K = false;
  12348. isDanceStart3K = false;
  12349. isDanceStart4K = false;
  12350. isDanceStart5K = false;
  12351. isDanceStart6K = false;
  12352. isDanceStart9K = false;
  12353. isDanceStart13K = false;
  12354. }
  12355. if (isDanceStart14V)
  12356. {
  12357. for (int j = 0; j < maidCnt; j++)
  12358. {
  12359. if (maidArray[j] && maidArray[j].Visible)
  12360. {
  12361. if (isDanceStart14V)
  12362. {
  12363. maidArray[j].SetPos(dancePos[j]);
  12364. maidArray[j].body0.transform.localRotation = danceRot[j];
  12365. }
  12366. }
  12367. }
  12368. isDanceStart14V = false;
  12369. }
  12370. if (isDanceStart15V)
  12371. {
  12372. for (int j = 0; j < maidCnt; j++)
  12373. {
  12374. if (maidArray[j] && maidArray[j].Visible)
  12375. {
  12376. if (isDanceStart15V)
  12377. {
  12378. maidArray[j].SetPos(dancePos[j]);
  12379. maidArray[j].body0.transform.localRotation = danceRot[j];
  12380. }
  12381. }
  12382. }
  12383. isDanceStart15V = false;
  12384. }
  12385. if (maidArray[1] && maidArray[1].Visible)
  12386. {
  12387. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12388. {
  12389. Vector3 vector = Vector3.zero;
  12390. vector.x = 0.6f;
  12391. maidArray[1].SetPos(vector);
  12392. if (maidArray[2] && maidArray[2].Visible)
  12393. {
  12394. vector.x = -0.6f;
  12395. maidArray[2].SetPos(vector);
  12396. }
  12397. if (maidArray[3] && maidArray[3].Visible)
  12398. {
  12399. vector.x = 1.2f;
  12400. maidArray[3].SetPos(vector);
  12401. }
  12402. if (maidArray[4] && maidArray[4].Visible)
  12403. {
  12404. vector.x = -1.2f;
  12405. maidArray[4].SetPos(vector);
  12406. }
  12407. if (maidArray[5] && maidArray[5].Visible)
  12408. {
  12409. vector.x = 1.8f;
  12410. maidArray[5].SetPos(vector);
  12411. }
  12412. if (maidArray[6] && maidArray[6].Visible)
  12413. {
  12414. vector.x = -1.8f;
  12415. maidArray[6].SetPos(vector);
  12416. }
  12417. if (maidArray[7] && maidArray[7].Visible)
  12418. {
  12419. vector.x = 2.4f;
  12420. maidArray[7].SetPos(vector);
  12421. }
  12422. if (maidArray[8] && maidArray[8].Visible)
  12423. {
  12424. vector.x = -2.4f;
  12425. maidArray[8].SetPos(vector);
  12426. }
  12427. if (maidArray[9] && maidArray[9].Visible)
  12428. {
  12429. vector.x = 3f;
  12430. maidArray[9].SetPos(vector);
  12431. }
  12432. if (maidArray[10] && maidArray[10].Visible)
  12433. {
  12434. vector.x = -3f;
  12435. maidArray[10].SetPos(vector);
  12436. }
  12437. if (maidArray[11] && maidArray[11].Visible)
  12438. {
  12439. vector.x = 3.6f;
  12440. maidArray[11].SetPos(vector);
  12441. }
  12442. if (maidArray[12] && maidArray[12].Visible)
  12443. {
  12444. vector.x = -3.6f;
  12445. maidArray[12].SetPos(vector);
  12446. }
  12447. if (maidArray[13] && maidArray[13].Visible)
  12448. {
  12449. vector.x = 4.2f;
  12450. maidArray[13].SetPos(vector);
  12451. }
  12452. }
  12453. }
  12454. if (maidArray[2] && maidArray[2].Visible)
  12455. {
  12456. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12457. {
  12458. Vector3 vector = Vector3.zero;
  12459. vector.x = 0.6f;
  12460. maidArray[1].SetPos(vector);
  12461. if (maidArray[2] && maidArray[2].Visible)
  12462. {
  12463. vector.x = -0.6f;
  12464. maidArray[2].SetPos(vector);
  12465. }
  12466. if (maidArray[3] && maidArray[3].Visible)
  12467. {
  12468. vector.x = 1.2f;
  12469. maidArray[3].SetPos(vector);
  12470. }
  12471. if (maidArray[4] && maidArray[4].Visible)
  12472. {
  12473. vector.x = -1.2f;
  12474. maidArray[4].SetPos(vector);
  12475. }
  12476. if (maidArray[5] && maidArray[5].Visible)
  12477. {
  12478. vector.x = 1.8f;
  12479. maidArray[5].SetPos(vector);
  12480. }
  12481. if (maidArray[6] && maidArray[6].Visible)
  12482. {
  12483. vector.x = -1.8f;
  12484. maidArray[6].SetPos(vector);
  12485. }
  12486. if (maidArray[7] && maidArray[7].Visible)
  12487. {
  12488. vector.x = 2.4f;
  12489. maidArray[7].SetPos(vector);
  12490. }
  12491. if (maidArray[8] && maidArray[8].Visible)
  12492. {
  12493. vector.x = -2.4f;
  12494. maidArray[8].SetPos(vector);
  12495. }
  12496. if (maidArray[9] && maidArray[9].Visible)
  12497. {
  12498. vector.x = 3f;
  12499. maidArray[9].SetPos(vector);
  12500. }
  12501. if (maidArray[10] && maidArray[10].Visible)
  12502. {
  12503. vector.x = -3f;
  12504. maidArray[10].SetPos(vector);
  12505. }
  12506. if (maidArray[11] && maidArray[11].Visible)
  12507. {
  12508. vector.x = 3.6f;
  12509. maidArray[11].SetPos(vector);
  12510. }
  12511. if (maidArray[12] && maidArray[12].Visible)
  12512. {
  12513. vector.x = -3.6f;
  12514. maidArray[12].SetPos(vector);
  12515. }
  12516. if (maidArray[13] && maidArray[13].Visible)
  12517. {
  12518. vector.x = 4.2f;
  12519. maidArray[13].SetPos(vector);
  12520. }
  12521. }
  12522. }
  12523. if (isShift)
  12524. {
  12525. isDanceStart9K = true;
  12526. for (int j = 0; j < maidCnt; j++)
  12527. {
  12528. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12529. maidArray[j].body0.transform.localRotation.y + 90f,
  12530. maidArray[j].body0.transform.localRotation.z));
  12531. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12532. maidArray[j].body0.transform.position.y,
  12533. maidArray[j].body0.transform.position.z + 4f));
  12534. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12535. int i = j;
  12536. Maid maid = maidArray[j];
  12537. if (!isVR)
  12538. {
  12539. delCount[i] = 20;
  12540. if (goSlot[(int)selectList[i]] != null)
  12541. {
  12542. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12543. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12544. {
  12545. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12546. }
  12547. }
  12548. }
  12549. string[] array = new string[2];
  12550. array = text2.Split(new char[] { ',' });
  12551. maid.DelProp(MPN.handitem, true);
  12552. maid.DelProp(MPN.accvag, true);
  12553. maid.DelProp(MPN.accanl, true);
  12554. maid.DelProp(MPN.kousoku_upper, true);
  12555. maid.DelProp(MPN.kousoku_lower, true);
  12556. if (array[0] != "")
  12557. {
  12558. maid.SetProp(array[0], array[1], 0, true, false);
  12559. }
  12560. maid.AllProcPropSeqStart();
  12561. }
  12562. }
  12563. isDance = true;
  12564. isDanceStart9 = true;
  12565. isKT1 = false;
  12566. }
  12567. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12568. {
  12569. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12570. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12571. if (isSS1)
  12572. {
  12573. nameK = "dance_BlD_m";
  12574. nameA = "dance_cm3d21_002_bid_f";
  12575. nameS = "bloomingdreaming_short";
  12576. danceNo1 = 1;
  12577. danceNo2 = 3;
  12578. danceNo3 = 2;
  12579. }
  12580. if (isSS2)
  12581. {
  12582. nameK = "dance_KAD_m";
  12583. nameA = "dance_cm3d21_003_kad_f";
  12584. nameS = "kiminiaijodelicious_short";
  12585. danceNo1 = 1;
  12586. danceNo2 = 2;
  12587. danceNo3 = 3;
  12588. }
  12589. if (isSS3)
  12590. {
  12591. nameK = "dance_LUM_m";
  12592. nameA = "dance_cm3d21_004_lm_f";
  12593. nameS = "luminousmoment_short";
  12594. danceNo1 = 3;
  12595. danceNo2 = 1;
  12596. danceNo3 = 2;
  12597. }
  12598. if (isSS4)
  12599. {
  12600. nameK = "dance_NmF_m";
  12601. nameA = "dance_cm3d21_001_nmf_f";
  12602. nameS = "nightmagicfire_short";
  12603. danceNo1 = 2;
  12604. danceNo2 = 1;
  12605. danceNo3 = 3;
  12606. }
  12607. if (isSS5)
  12608. {
  12609. nameK = "dance_MoE_m";
  12610. nameA = "dance_cm3d21_005_moe_f";
  12611. nameS = "melodyofempire_short";
  12612. danceNo1 = 1;
  12613. danceNo2 = 3;
  12614. danceNo3 = 2;
  12615. }
  12616. if (isSS6)
  12617. {
  12618. nameK = "dance_NmF_m";
  12619. nameA = "dance_cm3d21_kara_001_nmf_f";
  12620. nameS = "nightmagicfire_short";
  12621. danceNo1 = 1;
  12622. danceNo2 = 1;
  12623. danceNo3 = 1;
  12624. }
  12625. for (int j = 0; j < maidCnt; j++)
  12626. {
  12627. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12628. string text5 = nameA + danceNo1 + ".anm";
  12629. switch (j)
  12630. {
  12631. case 1:
  12632. case 4:
  12633. case 7:
  12634. case 10:
  12635. case 13:
  12636. text5 = nameA + danceNo2 + ".anm";
  12637. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12638. break;
  12639. case 2:
  12640. case 5:
  12641. case 8:
  12642. case 11:
  12643. text5 = nameA + danceNo3 + ".anm";
  12644. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12645. break;
  12646. }
  12647. if (maidArray[j] && maidArray[j].Visible)
  12648. {
  12649. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12650. {
  12651. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12652. }
  12653. string text4 = textAsset.text;
  12654. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12655. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12656. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12657. }
  12658. }
  12659. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12660. ikBui = 5;
  12661. isDanceStart1F = false;
  12662. isDanceStart2F = false;
  12663. isDanceStart3F = false;
  12664. isDanceStart4F = false;
  12665. isDanceStart5F = false;
  12666. isDanceStart6F = false;
  12667. isDanceStart7F = false;
  12668. isDanceStart8F = false;
  12669. isDanceStart9F = false;
  12670. isDanceStart10F = false;
  12671. isDanceStart11F = false;
  12672. isDanceStart12F = false;
  12673. isDanceStart13F = false;
  12674. isDanceStart14F = false;
  12675. isDanceStart15F = false;
  12676. for (int j = 0; j < maidCnt; j++)
  12677. {
  12678. danceFace[j] = 0f;
  12679. }
  12680. if (isDanceStart7V)
  12681. {
  12682. for (int j = 0; j < maidCnt; j++)
  12683. {
  12684. if (maidArray[j] && maidArray[j].Visible)
  12685. {
  12686. if (isDanceStart7V)
  12687. {
  12688. maidArray[j].SetPos(dancePos[j]);
  12689. maidArray[j].body0.transform.localRotation = danceRot[j];
  12690. }
  12691. }
  12692. }
  12693. isDanceStart7V = false;
  12694. }
  12695. if (isDanceStart8V)
  12696. {
  12697. for (int j = 0; j < maidCnt; j++)
  12698. {
  12699. if (maidArray[j] && maidArray[j].Visible)
  12700. {
  12701. if (isDanceStart8V)
  12702. {
  12703. maidArray[j].SetPos(dancePos[j]);
  12704. maidArray[j].body0.transform.localRotation = danceRot[j];
  12705. }
  12706. }
  12707. }
  12708. isDanceStart8V = false;
  12709. isDanceStart8P = false;
  12710. }
  12711. if (isDanceStart11V)
  12712. {
  12713. for (int j = 0; j < maidCnt; j++)
  12714. {
  12715. if (maidArray[j] && maidArray[j].Visible)
  12716. {
  12717. if (isDanceStart11V)
  12718. {
  12719. maidArray[j].SetPos(dancePos[j]);
  12720. maidArray[j].body0.transform.localRotation = danceRot[j];
  12721. }
  12722. }
  12723. }
  12724. isDanceStart11V = false;
  12725. }
  12726. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12727. || isDanceStart13K)
  12728. {
  12729. for (int j = 0; j < maidCnt; j++)
  12730. {
  12731. if (maidArray[j] && maidArray[j].Visible)
  12732. {
  12733. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12734. || isDanceStart13K)
  12735. {
  12736. maidArray[j].SetPos(dancePos[j]);
  12737. maidArray[j].body0.transform.localRotation = danceRot[j];
  12738. int i = j;
  12739. if (!isVR)
  12740. {
  12741. delCount[i] = 20;
  12742. if (goSlot[(int)selectList[i]] != null)
  12743. {
  12744. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12745. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12746. {
  12747. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12748. }
  12749. }
  12750. }
  12751. Maid maid = maidArray[j];
  12752. maid.DelProp(MPN.handitem, true);
  12753. maid.DelProp(MPN.accvag, true);
  12754. maid.DelProp(MPN.accanl, true);
  12755. maid.DelProp(MPN.kousoku_upper, true);
  12756. maid.DelProp(MPN.kousoku_lower, true);
  12757. maid.AllProcPropSeqStart();
  12758. }
  12759. }
  12760. }
  12761. isDanceStart1K = false;
  12762. isDanceStart3K = false;
  12763. isDanceStart4K = false;
  12764. isDanceStart5K = false;
  12765. isDanceStart6K = false;
  12766. isDanceStart9K = false;
  12767. isDanceStart13K = false;
  12768. }
  12769. if (isDanceStart14V)
  12770. {
  12771. for (int j = 0; j < maidCnt; j++)
  12772. {
  12773. if (maidArray[j] && maidArray[j].Visible)
  12774. {
  12775. if (isDanceStart14V)
  12776. {
  12777. maidArray[j].SetPos(dancePos[j]);
  12778. maidArray[j].body0.transform.localRotation = danceRot[j];
  12779. }
  12780. }
  12781. }
  12782. isDanceStart14V = false;
  12783. }
  12784. if (isDanceStart15V)
  12785. {
  12786. for (int j = 0; j < maidCnt; j++)
  12787. {
  12788. if (maidArray[j] && maidArray[j].Visible)
  12789. {
  12790. if (isDanceStart15V)
  12791. {
  12792. maidArray[j].SetPos(dancePos[j]);
  12793. maidArray[j].body0.transform.localRotation = danceRot[j];
  12794. }
  12795. }
  12796. }
  12797. isDanceStart15V = false;
  12798. }
  12799. for (int j = 0; j < maidCnt; j++)
  12800. {
  12801. isStop[j] = false;
  12802. isLock[j] = false;
  12803. pHandL[j] = 0;
  12804. pHandR[j] = 0;
  12805. muneIKL[j] = false;
  12806. muneIKR[j] = false;
  12807. if (!isVR)
  12808. {
  12809. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12810. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12811. }
  12812. if (maidArray[j].transform.position.y != 100f)
  12813. {
  12814. dancePos[j] = maidArray[j].transform.position;
  12815. }
  12816. else
  12817. {
  12818. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12819. }
  12820. danceRot[j] = maidArray[j].transform.localRotation;
  12821. }
  12822. if (maidArray[1] && maidArray[1].Visible)
  12823. {
  12824. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12825. maidArray[0].transform.position.y,
  12826. maidArray[0].transform.position.z));
  12827. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12828. }
  12829. if (maidArray[2] && maidArray[2].Visible)
  12830. {
  12831. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12832. maidArray[0].transform.position.y,
  12833. maidArray[0].transform.position.z));
  12834. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12835. }
  12836. if (maidArray[4] && maidArray[4].Visible)
  12837. {
  12838. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12839. maidArray[3].transform.position.y,
  12840. maidArray[3].transform.position.z));
  12841. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12842. }
  12843. if (maidArray[5] && maidArray[5].Visible)
  12844. {
  12845. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12846. maidArray[3].transform.position.y,
  12847. maidArray[3].transform.position.z));
  12848. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12849. }
  12850. if (maidArray[7] && maidArray[7].Visible)
  12851. {
  12852. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12853. maidArray[6].transform.position.y,
  12854. maidArray[6].transform.position.z));
  12855. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12856. }
  12857. if (maidArray[8] && maidArray[8].Visible)
  12858. {
  12859. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12860. maidArray[6].transform.position.y,
  12861. maidArray[6].transform.position.z));
  12862. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12863. }
  12864. if (maidArray[10] && maidArray[10].Visible)
  12865. {
  12866. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12867. maidArray[9].transform.position.y,
  12868. maidArray[9].transform.position.z));
  12869. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12870. }
  12871. if (maidArray[11] && maidArray[11].Visible)
  12872. {
  12873. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12874. maidArray[9].transform.position.y,
  12875. maidArray[9].transform.position.z));
  12876. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12877. }
  12878. if (maidArray[13] && maidArray[13].Visible)
  12879. {
  12880. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12881. maidArray[12].transform.position.y,
  12882. maidArray[12].transform.position.z));
  12883. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12884. }
  12885. isSS = false;
  12886. isDance = true;
  12887. isDanceStart11 = true;
  12888. }
  12889. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12890. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12891. {
  12892. GameMain.Instance.SoundMgr.StopBGM(0f);
  12893. isSS1 = true;
  12894. isSS2 = false;
  12895. isSS3 = false;
  12896. isSS4 = false;
  12897. isSS5 = false;
  12898. isSS6 = false;
  12899. isSS = true;
  12900. }
  12901. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12902. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12903. {
  12904. GameMain.Instance.SoundMgr.StopBGM(0f);
  12905. isSS1 = false;
  12906. isSS2 = true;
  12907. isSS3 = false;
  12908. isSS4 = false;
  12909. isSS5 = false;
  12910. isSS6 = false;
  12911. isSS = true;
  12912. }
  12913. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12914. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12915. {
  12916. GameMain.Instance.SoundMgr.StopBGM(0f);
  12917. isSS1 = false;
  12918. isSS2 = false;
  12919. isSS3 = true;
  12920. isSS4 = false;
  12921. isSS5 = false;
  12922. isSS6 = false;
  12923. isSS = true;
  12924. }
  12925. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12926. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12927. {
  12928. GameMain.Instance.SoundMgr.StopBGM(0f);
  12929. isSS1 = false;
  12930. isSS2 = false;
  12931. isSS3 = false;
  12932. isSS4 = true;
  12933. isSS5 = false;
  12934. isSS6 = false;
  12935. isSS = true;
  12936. }
  12937. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12938. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12939. {
  12940. GameMain.Instance.SoundMgr.StopBGM(0f);
  12941. isSS1 = false;
  12942. isSS2 = false;
  12943. isSS3 = false;
  12944. isSS4 = false;
  12945. isSS5 = true;
  12946. isSS6 = false;
  12947. isSS = true;
  12948. }
  12949. if (isKHG1 || isKHG2)
  12950. {
  12951. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12952. string text4 = textAsset.text;
  12953. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12954. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12955. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12956. for (int j = 0; j < maidCnt; j++)
  12957. {
  12958. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12959. {
  12960. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12961. GameUty.FileSystem,
  12962. "dance_cm3d2_005_khg_f.anm",
  12963. false,
  12964. false);
  12965. }
  12966. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12967. }
  12968. if (isKHG1)
  12969. {
  12970. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12971. }
  12972. if (isKHG2)
  12973. {
  12974. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12975. }
  12976. for (int j = 0; j < maidCnt; j++)
  12977. {
  12978. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12979. isStop[j] = false;
  12980. isLock[j] = false;
  12981. pHandL[j] = 0;
  12982. pHandR[j] = 0;
  12983. muneIKL[j] = false;
  12984. muneIKR[j] = false;
  12985. if (!isVR)
  12986. {
  12987. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12988. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12989. }
  12990. }
  12991. ikBui = 5;
  12992. isDanceStart1F = false;
  12993. isDanceStart2F = false;
  12994. isDanceStart3F = false;
  12995. isDanceStart4F = false;
  12996. isDanceStart5F = false;
  12997. isDanceStart6F = false;
  12998. isDanceStart7F = false;
  12999. isDanceStart8F = false;
  13000. isDanceStart9F = false;
  13001. isDanceStart10F = false;
  13002. isDanceStart11F = false;
  13003. isDanceStart12F = false;
  13004. isDanceStart13F = false;
  13005. isDanceStart14F = false;
  13006. isDanceStart15F = false;
  13007. for (int j = 0; j < maidCnt; j++)
  13008. {
  13009. danceFace[j] = 0f;
  13010. }
  13011. if (isDanceStart7V)
  13012. {
  13013. for (int j = 0; j < maidCnt; j++)
  13014. {
  13015. if (maidArray[j] && maidArray[j].Visible)
  13016. {
  13017. if (isDanceStart7V)
  13018. {
  13019. maidArray[j].SetPos(dancePos[j]);
  13020. maidArray[j].body0.transform.localRotation = danceRot[j];
  13021. }
  13022. }
  13023. }
  13024. isDanceStart7V = false;
  13025. }
  13026. if (isDanceStart8V)
  13027. {
  13028. for (int j = 0; j < maidCnt; j++)
  13029. {
  13030. if (maidArray[j] && maidArray[j].Visible)
  13031. {
  13032. if (isDanceStart8V)
  13033. {
  13034. maidArray[j].SetPos(dancePos[j]);
  13035. maidArray[j].body0.transform.localRotation = danceRot[j];
  13036. }
  13037. }
  13038. }
  13039. isDanceStart8V = false;
  13040. isDanceStart8P = false;
  13041. }
  13042. if (isDanceStart11V)
  13043. {
  13044. for (int j = 0; j < maidCnt; j++)
  13045. {
  13046. if (maidArray[j] && maidArray[j].Visible)
  13047. {
  13048. if (isDanceStart11V)
  13049. {
  13050. maidArray[j].SetPos(dancePos[j]);
  13051. maidArray[j].body0.transform.localRotation = danceRot[j];
  13052. }
  13053. }
  13054. }
  13055. isDanceStart11V = false;
  13056. }
  13057. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13058. || isDanceStart13K)
  13059. {
  13060. for (int j = 0; j < maidCnt; j++)
  13061. {
  13062. if (maidArray[j] && maidArray[j].Visible)
  13063. {
  13064. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13065. || isDanceStart13K)
  13066. {
  13067. maidArray[j].SetPos(dancePos[j]);
  13068. maidArray[j].body0.transform.localRotation = danceRot[j];
  13069. int i = j;
  13070. if (!isVR)
  13071. {
  13072. delCount[i] = 20;
  13073. if (goSlot[(int)selectList[i]] != null)
  13074. {
  13075. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13076. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13077. {
  13078. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13079. }
  13080. }
  13081. }
  13082. Maid maid = maidArray[j];
  13083. maid.DelProp(MPN.handitem, true);
  13084. maid.DelProp(MPN.accvag, true);
  13085. maid.DelProp(MPN.accanl, true);
  13086. maid.DelProp(MPN.kousoku_upper, true);
  13087. maid.DelProp(MPN.kousoku_lower, true);
  13088. maid.AllProcPropSeqStart();
  13089. }
  13090. }
  13091. }
  13092. isDanceStart1K = false;
  13093. isDanceStart3K = false;
  13094. isDanceStart4K = false;
  13095. isDanceStart5K = false;
  13096. isDanceStart6K = false;
  13097. isDanceStart9K = false;
  13098. isDanceStart13K = false;
  13099. }
  13100. if (isDanceStart14V)
  13101. {
  13102. for (int j = 0; j < maidCnt; j++)
  13103. {
  13104. if (maidArray[j] && maidArray[j].Visible)
  13105. {
  13106. if (isDanceStart14V)
  13107. {
  13108. maidArray[j].SetPos(dancePos[j]);
  13109. maidArray[j].body0.transform.localRotation = danceRot[j];
  13110. }
  13111. }
  13112. }
  13113. isDanceStart14V = false;
  13114. }
  13115. if (isDanceStart15V)
  13116. {
  13117. for (int j = 0; j < maidCnt; j++)
  13118. {
  13119. if (maidArray[j] && maidArray[j].Visible)
  13120. {
  13121. if (isDanceStart15V)
  13122. {
  13123. maidArray[j].SetPos(dancePos[j]);
  13124. maidArray[j].body0.transform.localRotation = danceRot[j];
  13125. }
  13126. }
  13127. }
  13128. isDanceStart15V = false;
  13129. }
  13130. if (maidArray[1] && maidArray[1].Visible)
  13131. {
  13132. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13133. {
  13134. Vector3 vector = Vector3.zero;
  13135. vector.x = 0.6f;
  13136. maidArray[1].SetPos(vector);
  13137. if (maidArray[2] && maidArray[2].Visible)
  13138. {
  13139. vector.x = -0.6f;
  13140. maidArray[2].SetPos(vector);
  13141. }
  13142. if (maidArray[3] && maidArray[3].Visible)
  13143. {
  13144. vector.x = 1.2f;
  13145. maidArray[3].SetPos(vector);
  13146. }
  13147. if (maidArray[4] && maidArray[4].Visible)
  13148. {
  13149. vector.x = -1.2f;
  13150. maidArray[4].SetPos(vector);
  13151. }
  13152. if (maidArray[5] && maidArray[5].Visible)
  13153. {
  13154. vector.x = 1.8f;
  13155. maidArray[5].SetPos(vector);
  13156. }
  13157. if (maidArray[6] && maidArray[6].Visible)
  13158. {
  13159. vector.x = -1.8f;
  13160. maidArray[6].SetPos(vector);
  13161. }
  13162. if (maidArray[7] && maidArray[7].Visible)
  13163. {
  13164. vector.x = 2.4f;
  13165. maidArray[7].SetPos(vector);
  13166. }
  13167. if (maidArray[8] && maidArray[8].Visible)
  13168. {
  13169. vector.x = -2.4f;
  13170. maidArray[8].SetPos(vector);
  13171. }
  13172. if (maidArray[9] && maidArray[9].Visible)
  13173. {
  13174. vector.x = 3f;
  13175. maidArray[9].SetPos(vector);
  13176. }
  13177. if (maidArray[10] && maidArray[10].Visible)
  13178. {
  13179. vector.x = -3f;
  13180. maidArray[10].SetPos(vector);
  13181. }
  13182. if (maidArray[11] && maidArray[11].Visible)
  13183. {
  13184. vector.x = 3.6f;
  13185. maidArray[11].SetPos(vector);
  13186. }
  13187. if (maidArray[12] && maidArray[12].Visible)
  13188. {
  13189. vector.x = -3.6f;
  13190. maidArray[12].SetPos(vector);
  13191. }
  13192. if (maidArray[13] && maidArray[13].Visible)
  13193. {
  13194. vector.x = 4.2f;
  13195. maidArray[13].SetPos(vector);
  13196. }
  13197. }
  13198. }
  13199. isDance = true;
  13200. isDanceStart12 = true;
  13201. isKHG1 = false;
  13202. isKHG2 = false;
  13203. }
  13204. if (isDanceStart13Count > 0)
  13205. {
  13206. isDanceStart13Count++;
  13207. }
  13208. if (isDanceStart13Count == 1)
  13209. {
  13210. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13211. isDanceStart13Count = 0;
  13212. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13213. string text4 = textAsset.text;
  13214. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13215. for (int j = 0; j < maidCnt; j++)
  13216. {
  13217. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13218. }
  13219. }
  13220. if ((isSN1 || isSN2 || isSN3) && isShift)
  13221. {
  13222. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13223. string text4 = textAsset.text;
  13224. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13225. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13226. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13227. for (int j = 0; j < maidCnt; j++)
  13228. {
  13229. if (!isShift)
  13230. {
  13231. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13232. {
  13233. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13234. GameUty.FileSystem,
  13235. "dance_cm3d2_006_ssn_f1.anm",
  13236. false,
  13237. false);
  13238. }
  13239. }
  13240. else
  13241. {
  13242. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13243. {
  13244. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13245. GameUty.FileSystem,
  13246. "dance_cm3d21_kara_001_nmf_f1.anm",
  13247. false,
  13248. false);
  13249. }
  13250. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13251. string text5 = nameA + danceNo1 + ".anm";
  13252. switch (j)
  13253. {
  13254. case 1:
  13255. case 4:
  13256. case 7:
  13257. case 10:
  13258. case 13:
  13259. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13260. break;
  13261. case 2:
  13262. case 5:
  13263. case 8:
  13264. case 11:
  13265. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13266. break;
  13267. }
  13268. text4 = textAsset.text;
  13269. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13270. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13271. && !isDanceStart9K && !isDanceStart13K)
  13272. {
  13273. dancePos[j] = maidArray[j].transform.position;
  13274. danceRot[j] = maidArray[j].transform.localRotation;
  13275. }
  13276. }
  13277. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13278. }
  13279. if (!isShift)
  13280. {
  13281. if (isSN1)
  13282. {
  13283. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13284. }
  13285. if (isSN2)
  13286. {
  13287. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13288. }
  13289. if (isSN3)
  13290. {
  13291. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13292. }
  13293. }
  13294. else
  13295. {
  13296. danceWait = 400;
  13297. isDanceStart13Count++;
  13298. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13299. }
  13300. for (int j = 0; j < maidCnt; j++)
  13301. {
  13302. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13303. isStop[j] = false;
  13304. isLock[j] = false;
  13305. pHandL[j] = 0;
  13306. pHandR[j] = 0;
  13307. muneIKL[j] = false;
  13308. muneIKR[j] = false;
  13309. if (!isVR)
  13310. {
  13311. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13312. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13313. }
  13314. }
  13315. ikBui = 5;
  13316. isDanceStart1F = false;
  13317. isDanceStart2F = false;
  13318. isDanceStart3F = false;
  13319. isDanceStart4F = false;
  13320. isDanceStart5F = false;
  13321. isDanceStart6F = false;
  13322. isDanceStart7F = false;
  13323. isDanceStart8F = false;
  13324. isDanceStart9F = false;
  13325. isDanceStart10F = false;
  13326. isDanceStart11F = false;
  13327. isDanceStart12F = false;
  13328. isDanceStart13F = false;
  13329. isDanceStart14F = false;
  13330. isDanceStart15F = false;
  13331. for (int j = 0; j < maidCnt; j++)
  13332. {
  13333. danceFace[j] = 0f;
  13334. }
  13335. if (isDanceStart7V)
  13336. {
  13337. for (int j = 0; j < maidCnt; j++)
  13338. {
  13339. if (maidArray[j] && maidArray[j].Visible)
  13340. {
  13341. if (isDanceStart7V)
  13342. {
  13343. maidArray[j].SetPos(dancePos[j]);
  13344. maidArray[j].body0.transform.localRotation = danceRot[j];
  13345. }
  13346. }
  13347. }
  13348. isDanceStart7V = false;
  13349. }
  13350. if (isDanceStart8V)
  13351. {
  13352. for (int j = 0; j < maidCnt; j++)
  13353. {
  13354. if (maidArray[j] && maidArray[j].Visible)
  13355. {
  13356. if (isDanceStart8V)
  13357. {
  13358. maidArray[j].SetPos(dancePos[j]);
  13359. maidArray[j].body0.transform.localRotation = danceRot[j];
  13360. }
  13361. }
  13362. }
  13363. isDanceStart8V = false;
  13364. isDanceStart8P = false;
  13365. }
  13366. if (isDanceStart11V)
  13367. {
  13368. for (int j = 0; j < maidCnt; j++)
  13369. {
  13370. if (maidArray[j] && maidArray[j].Visible)
  13371. {
  13372. if (isDanceStart11V)
  13373. {
  13374. maidArray[j].SetPos(dancePos[j]);
  13375. maidArray[j].body0.transform.localRotation = danceRot[j];
  13376. }
  13377. }
  13378. }
  13379. isDanceStart11V = false;
  13380. }
  13381. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13382. || isDanceStart13K)
  13383. {
  13384. for (int j = 0; j < maidCnt; j++)
  13385. {
  13386. if (maidArray[j] && maidArray[j].Visible)
  13387. {
  13388. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13389. || isDanceStart13K)
  13390. {
  13391. maidArray[j].SetPos(dancePos[j]);
  13392. maidArray[j].body0.transform.localRotation = danceRot[j];
  13393. int i = j;
  13394. if (!isVR)
  13395. {
  13396. delCount[i] = 20;
  13397. if (goSlot[(int)selectList[i]] != null)
  13398. {
  13399. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13400. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13401. {
  13402. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13403. }
  13404. }
  13405. }
  13406. Maid maid = maidArray[j];
  13407. maid.DelProp(MPN.handitem, true);
  13408. maid.DelProp(MPN.accvag, true);
  13409. maid.DelProp(MPN.accanl, true);
  13410. maid.DelProp(MPN.kousoku_upper, true);
  13411. maid.DelProp(MPN.kousoku_lower, true);
  13412. maid.AllProcPropSeqStart();
  13413. }
  13414. }
  13415. }
  13416. isDanceStart1K = false;
  13417. isDanceStart3K = false;
  13418. isDanceStart4K = false;
  13419. isDanceStart5K = false;
  13420. isDanceStart6K = false;
  13421. isDanceStart9K = false;
  13422. isDanceStart13K = false;
  13423. }
  13424. if (isDanceStart14V)
  13425. {
  13426. for (int j = 0; j < maidCnt; j++)
  13427. {
  13428. if (maidArray[j] && maidArray[j].Visible)
  13429. {
  13430. if (isDanceStart14V)
  13431. {
  13432. maidArray[j].SetPos(dancePos[j]);
  13433. maidArray[j].body0.transform.localRotation = danceRot[j];
  13434. }
  13435. }
  13436. }
  13437. isDanceStart14V = false;
  13438. }
  13439. if (isDanceStart15V)
  13440. {
  13441. for (int j = 0; j < maidCnt; j++)
  13442. {
  13443. if (maidArray[j] && maidArray[j].Visible)
  13444. {
  13445. if (isDanceStart15V)
  13446. {
  13447. maidArray[j].SetPos(dancePos[j]);
  13448. maidArray[j].body0.transform.localRotation = danceRot[j];
  13449. }
  13450. }
  13451. }
  13452. isDanceStart15V = false;
  13453. }
  13454. if (maidArray[1] && maidArray[1].Visible)
  13455. {
  13456. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13457. {
  13458. Vector3 vector = Vector3.zero;
  13459. vector.x = 0.6f;
  13460. maidArray[1].SetPos(vector);
  13461. if (maidArray[2] && maidArray[2].Visible)
  13462. {
  13463. vector.x = -0.6f;
  13464. maidArray[2].SetPos(vector);
  13465. }
  13466. if (maidArray[3] && maidArray[3].Visible)
  13467. {
  13468. vector.x = 1.2f;
  13469. maidArray[3].SetPos(vector);
  13470. }
  13471. if (maidArray[4] && maidArray[4].Visible)
  13472. {
  13473. vector.x = -1.2f;
  13474. maidArray[4].SetPos(vector);
  13475. }
  13476. if (maidArray[5] && maidArray[5].Visible)
  13477. {
  13478. vector.x = 1.8f;
  13479. maidArray[5].SetPos(vector);
  13480. }
  13481. if (maidArray[6] && maidArray[6].Visible)
  13482. {
  13483. vector.x = -1.8f;
  13484. maidArray[6].SetPos(vector);
  13485. }
  13486. if (maidArray[7] && maidArray[7].Visible)
  13487. {
  13488. vector.x = 2.4f;
  13489. maidArray[7].SetPos(vector);
  13490. }
  13491. if (maidArray[8] && maidArray[8].Visible)
  13492. {
  13493. vector.x = -2.4f;
  13494. maidArray[8].SetPos(vector);
  13495. }
  13496. if (maidArray[9] && maidArray[9].Visible)
  13497. {
  13498. vector.x = 3f;
  13499. maidArray[9].SetPos(vector);
  13500. }
  13501. if (maidArray[10] && maidArray[10].Visible)
  13502. {
  13503. vector.x = -3f;
  13504. maidArray[10].SetPos(vector);
  13505. }
  13506. if (maidArray[11] && maidArray[11].Visible)
  13507. {
  13508. vector.x = 3.6f;
  13509. maidArray[11].SetPos(vector);
  13510. }
  13511. if (maidArray[12] && maidArray[12].Visible)
  13512. {
  13513. vector.x = -3.6f;
  13514. maidArray[12].SetPos(vector);
  13515. }
  13516. if (maidArray[13] && maidArray[13].Visible)
  13517. {
  13518. vector.x = 4.2f;
  13519. maidArray[13].SetPos(vector);
  13520. }
  13521. }
  13522. }
  13523. if (isShift)
  13524. {
  13525. isDanceStart13K = true;
  13526. for (int j = 0; j < maidCnt; j++)
  13527. {
  13528. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13529. maidArray[j].body0.transform.localRotation.y + 90f,
  13530. maidArray[j].body0.transform.localRotation.z));
  13531. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13532. maidArray[j].body0.transform.position.y,
  13533. maidArray[j].body0.transform.position.z + 4f));
  13534. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13535. int i = j;
  13536. Maid maid = maidArray[j];
  13537. if (!isVR)
  13538. {
  13539. delCount[i] = 20;
  13540. if (goSlot[(int)selectList[i]] != null)
  13541. {
  13542. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13543. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13544. {
  13545. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13546. }
  13547. }
  13548. }
  13549. string[] array = new string[2];
  13550. array = text2.Split(new char[] { ',' });
  13551. maid.DelProp(MPN.handitem, true);
  13552. maid.DelProp(MPN.accvag, true);
  13553. maid.DelProp(MPN.accanl, true);
  13554. maid.DelProp(MPN.kousoku_upper, true);
  13555. maid.DelProp(MPN.kousoku_lower, true);
  13556. if (array[0] != "")
  13557. {
  13558. maid.SetProp(array[0], array[1], 0, true, false);
  13559. }
  13560. maid.AllProcPropSeqStart();
  13561. }
  13562. }
  13563. isDance = true;
  13564. isDanceStart13 = true;
  13565. isSN1 = false;
  13566. isSN2 = false;
  13567. isSN3 = false;
  13568. }
  13569. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13570. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13571. {
  13572. GameMain.Instance.SoundMgr.StopBGM(0f);
  13573. isSN1 = true;
  13574. hFlg = true;
  13575. if (getModKeyPressing(modKey.Shift))
  13576. {
  13577. isShift = true;
  13578. }
  13579. }
  13580. if (isSN4 || isSN5 || isSN6)
  13581. {
  13582. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13583. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13584. for (int j = 0; j < maidCnt; j++)
  13585. {
  13586. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13587. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13588. switch (j)
  13589. {
  13590. case 1:
  13591. case 4:
  13592. case 7:
  13593. case 10:
  13594. case 13:
  13595. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13596. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13597. break;
  13598. case 2:
  13599. case 5:
  13600. case 8:
  13601. case 11:
  13602. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13603. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13604. break;
  13605. }
  13606. if (maidArray[j] && maidArray[j].Visible)
  13607. {
  13608. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13609. {
  13610. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13611. }
  13612. string text4 = textAsset.text;
  13613. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13614. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13615. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13616. }
  13617. }
  13618. if (isSN4)
  13619. {
  13620. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13621. }
  13622. if (isSN5)
  13623. {
  13624. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13625. }
  13626. if (isSN6)
  13627. {
  13628. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13629. }
  13630. ikBui = 5;
  13631. isDanceStart1F = false;
  13632. isDanceStart2F = false;
  13633. isDanceStart3F = false;
  13634. isDanceStart4F = false;
  13635. isDanceStart5F = false;
  13636. isDanceStart6F = false;
  13637. isDanceStart7F = false;
  13638. isDanceStart8F = false;
  13639. isDanceStart9F = false;
  13640. isDanceStart10F = false;
  13641. isDanceStart11F = false;
  13642. isDanceStart12F = false;
  13643. isDanceStart13F = false;
  13644. isDanceStart14F = false;
  13645. isDanceStart15F = false;
  13646. for (int j = 0; j < maidCnt; j++)
  13647. {
  13648. danceFace[j] = 0f;
  13649. }
  13650. if (isDanceStart7V)
  13651. {
  13652. for (int j = 0; j < maidCnt; j++)
  13653. {
  13654. if (maidArray[j] && maidArray[j].Visible)
  13655. {
  13656. if (isDanceStart7V)
  13657. {
  13658. maidArray[j].SetPos(dancePos[j]);
  13659. maidArray[j].body0.transform.localRotation = danceRot[j];
  13660. }
  13661. }
  13662. }
  13663. isDanceStart7V = false;
  13664. }
  13665. if (isDanceStart8V)
  13666. {
  13667. for (int j = 0; j < maidCnt; j++)
  13668. {
  13669. if (maidArray[j] && maidArray[j].Visible)
  13670. {
  13671. if (isDanceStart8V)
  13672. {
  13673. maidArray[j].SetPos(dancePos[j]);
  13674. maidArray[j].body0.transform.localRotation = danceRot[j];
  13675. }
  13676. }
  13677. }
  13678. isDanceStart8V = false;
  13679. isDanceStart8P = false;
  13680. }
  13681. if (isDanceStart11V)
  13682. {
  13683. for (int j = 0; j < maidCnt; j++)
  13684. {
  13685. if (maidArray[j] && maidArray[j].Visible)
  13686. {
  13687. if (isDanceStart11V)
  13688. {
  13689. maidArray[j].SetPos(dancePos[j]);
  13690. maidArray[j].body0.transform.localRotation = danceRot[j];
  13691. }
  13692. }
  13693. }
  13694. isDanceStart11V = false;
  13695. }
  13696. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13697. || isDanceStart13K)
  13698. {
  13699. for (int j = 0; j < maidCnt; j++)
  13700. {
  13701. if (maidArray[j] && maidArray[j].Visible)
  13702. {
  13703. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13704. || isDanceStart13K)
  13705. {
  13706. maidArray[j].SetPos(dancePos[j]);
  13707. maidArray[j].body0.transform.localRotation = danceRot[j];
  13708. int i = j;
  13709. if (!isVR)
  13710. {
  13711. delCount[i] = 20;
  13712. if (goSlot[(int)selectList[i]] != null)
  13713. {
  13714. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13715. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13716. {
  13717. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13718. }
  13719. }
  13720. }
  13721. Maid maid = maidArray[j];
  13722. maid.DelProp(MPN.handitem, true);
  13723. maid.DelProp(MPN.accvag, true);
  13724. maid.DelProp(MPN.accanl, true);
  13725. maid.DelProp(MPN.kousoku_upper, true);
  13726. maid.DelProp(MPN.kousoku_lower, true);
  13727. maid.AllProcPropSeqStart();
  13728. }
  13729. }
  13730. }
  13731. isDanceStart1K = false;
  13732. isDanceStart3K = false;
  13733. isDanceStart4K = false;
  13734. isDanceStart5K = false;
  13735. isDanceStart6K = false;
  13736. isDanceStart9K = false;
  13737. isDanceStart13K = false;
  13738. }
  13739. if (isDanceStart14V)
  13740. {
  13741. for (int j = 0; j < maidCnt; j++)
  13742. {
  13743. if (maidArray[j] && maidArray[j].Visible)
  13744. {
  13745. if (isDanceStart14V)
  13746. {
  13747. maidArray[j].SetPos(dancePos[j]);
  13748. maidArray[j].body0.transform.localRotation = danceRot[j];
  13749. }
  13750. }
  13751. }
  13752. isDanceStart14V = false;
  13753. }
  13754. if (isDanceStart15V)
  13755. {
  13756. for (int j = 0; j < maidCnt; j++)
  13757. {
  13758. if (maidArray[j] && maidArray[j].Visible)
  13759. {
  13760. if (isDanceStart15V)
  13761. {
  13762. maidArray[j].SetPos(dancePos[j]);
  13763. maidArray[j].body0.transform.localRotation = danceRot[j];
  13764. }
  13765. }
  13766. }
  13767. isDanceStart15V = false;
  13768. }
  13769. for (int j = 0; j < maidCnt; j++)
  13770. {
  13771. isStop[j] = false;
  13772. isLock[j] = false;
  13773. pHandL[j] = 0;
  13774. pHandR[j] = 0;
  13775. muneIKL[j] = false;
  13776. muneIKR[j] = false;
  13777. if (!isVR)
  13778. {
  13779. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13780. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13781. }
  13782. if (maidArray[j].transform.position.y != 100f)
  13783. {
  13784. dancePos[j] = maidArray[j].transform.position;
  13785. }
  13786. else
  13787. {
  13788. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13789. }
  13790. danceRot[j] = maidArray[j].transform.localRotation;
  13791. }
  13792. if (maidArray[1] && maidArray[1].Visible)
  13793. {
  13794. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13795. maidArray[0].transform.position.y,
  13796. maidArray[0].transform.position.z));
  13797. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13798. }
  13799. if (maidArray[2] && maidArray[2].Visible)
  13800. {
  13801. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13802. maidArray[0].transform.position.y,
  13803. maidArray[0].transform.position.z));
  13804. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13805. }
  13806. if (maidArray[4] && maidArray[4].Visible)
  13807. {
  13808. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13809. maidArray[3].transform.position.y,
  13810. maidArray[3].transform.position.z));
  13811. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13812. }
  13813. if (maidArray[5] && maidArray[5].Visible)
  13814. {
  13815. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13816. maidArray[3].transform.position.y,
  13817. maidArray[3].transform.position.z));
  13818. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13819. }
  13820. if (maidArray[7] && maidArray[7].Visible)
  13821. {
  13822. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13823. maidArray[6].transform.position.y,
  13824. maidArray[6].transform.position.z));
  13825. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13826. }
  13827. if (maidArray[8] && maidArray[8].Visible)
  13828. {
  13829. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13830. maidArray[6].transform.position.y,
  13831. maidArray[6].transform.position.z));
  13832. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13833. }
  13834. if (maidArray[10] && maidArray[10].Visible)
  13835. {
  13836. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13837. maidArray[9].transform.position.y,
  13838. maidArray[9].transform.position.z));
  13839. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13840. }
  13841. if (maidArray[11] && maidArray[11].Visible)
  13842. {
  13843. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13844. maidArray[9].transform.position.y,
  13845. maidArray[9].transform.position.z));
  13846. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13847. }
  13848. if (maidArray[13] && maidArray[13].Visible)
  13849. {
  13850. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13851. maidArray[12].transform.position.y,
  13852. maidArray[12].transform.position.z));
  13853. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13854. }
  13855. isDance = true;
  13856. isDanceStart14 = true;
  13857. isSN4 = false;
  13858. isSN5 = false;
  13859. isSN6 = false;
  13860. }
  13861. if (isSD1)
  13862. {
  13863. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13864. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13865. for (int j = 0; j < maidCnt; j++)
  13866. {
  13867. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13868. string text5 = "dance_cmo_002_sd_f1.anm";
  13869. switch (j)
  13870. {
  13871. case 1:
  13872. case 3:
  13873. case 5:
  13874. case 7:
  13875. case 9:
  13876. case 11:
  13877. case 13:
  13878. text5 = "dance_cmo_002_sd_f2.anm";
  13879. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13880. break;
  13881. }
  13882. danceName[j] = text5;
  13883. if (maidArray[j] && maidArray[j].Visible)
  13884. {
  13885. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13886. {
  13887. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13888. }
  13889. string text4 = textAsset.text;
  13890. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13891. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13892. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13893. }
  13894. }
  13895. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13896. ikBui = 5;
  13897. isDanceStart1F = false;
  13898. isDanceStart2F = false;
  13899. isDanceStart3F = false;
  13900. isDanceStart4F = false;
  13901. isDanceStart5F = false;
  13902. isDanceStart6F = false;
  13903. isDanceStart7F = false;
  13904. isDanceStart8F = false;
  13905. isDanceStart9F = false;
  13906. isDanceStart10F = false;
  13907. isDanceStart11F = false;
  13908. isDanceStart12F = false;
  13909. isDanceStart13F = false;
  13910. isDanceStart14F = false;
  13911. isDanceStart15F = false;
  13912. for (int j = 0; j < maidCnt; j++)
  13913. {
  13914. danceFace[j] = 0f;
  13915. }
  13916. if (isDanceStart7V)
  13917. {
  13918. for (int j = 0; j < maidCnt; j++)
  13919. {
  13920. if (maidArray[j] && maidArray[j].Visible)
  13921. {
  13922. if (isDanceStart7V)
  13923. {
  13924. maidArray[j].SetPos(dancePos[j]);
  13925. maidArray[j].body0.transform.localRotation = danceRot[j];
  13926. }
  13927. }
  13928. }
  13929. isDanceStart7V = false;
  13930. }
  13931. if (isDanceStart8V)
  13932. {
  13933. for (int j = 0; j < maidCnt; j++)
  13934. {
  13935. if (maidArray[j] && maidArray[j].Visible)
  13936. {
  13937. if (isDanceStart8V)
  13938. {
  13939. maidArray[j].SetPos(dancePos[j]);
  13940. maidArray[j].body0.transform.localRotation = danceRot[j];
  13941. }
  13942. }
  13943. }
  13944. isDanceStart8V = false;
  13945. isDanceStart8P = false;
  13946. }
  13947. if (isDanceStart11V)
  13948. {
  13949. for (int j = 0; j < maidCnt; j++)
  13950. {
  13951. if (maidArray[j] && maidArray[j].Visible)
  13952. {
  13953. if (isDanceStart11V)
  13954. {
  13955. maidArray[j].SetPos(dancePos[j]);
  13956. maidArray[j].body0.transform.localRotation = danceRot[j];
  13957. }
  13958. }
  13959. }
  13960. isDanceStart11V = false;
  13961. }
  13962. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13963. || isDanceStart13K)
  13964. {
  13965. for (int j = 0; j < maidCnt; j++)
  13966. {
  13967. if (maidArray[j] && maidArray[j].Visible)
  13968. {
  13969. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13970. || isDanceStart13K)
  13971. {
  13972. maidArray[j].SetPos(dancePos[j]);
  13973. maidArray[j].body0.transform.localRotation = danceRot[j];
  13974. int i = j;
  13975. if (!isVR)
  13976. {
  13977. delCount[i] = 20;
  13978. if (goSlot[(int)selectList[i]] != null)
  13979. {
  13980. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13981. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13982. {
  13983. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13984. }
  13985. }
  13986. }
  13987. Maid maid = maidArray[j];
  13988. maid.DelProp(MPN.handitem, true);
  13989. maid.DelProp(MPN.accvag, true);
  13990. maid.DelProp(MPN.accanl, true);
  13991. maid.DelProp(MPN.kousoku_upper, true);
  13992. maid.DelProp(MPN.kousoku_lower, true);
  13993. maid.AllProcPropSeqStart();
  13994. }
  13995. }
  13996. }
  13997. isDanceStart1K = false;
  13998. isDanceStart3K = false;
  13999. isDanceStart4K = false;
  14000. isDanceStart5K = false;
  14001. isDanceStart6K = false;
  14002. isDanceStart9K = false;
  14003. isDanceStart13K = false;
  14004. }
  14005. if (isDanceStart14V)
  14006. {
  14007. for (int j = 0; j < maidCnt; j++)
  14008. {
  14009. if (maidArray[j] && maidArray[j].Visible)
  14010. {
  14011. if (isDanceStart14V)
  14012. {
  14013. maidArray[j].SetPos(dancePos[j]);
  14014. maidArray[j].body0.transform.localRotation = danceRot[j];
  14015. }
  14016. }
  14017. }
  14018. isDanceStart14V = false;
  14019. }
  14020. if (isDanceStart15V)
  14021. {
  14022. for (int j = 0; j < maidCnt; j++)
  14023. {
  14024. if (maidArray[j] && maidArray[j].Visible)
  14025. {
  14026. if (isDanceStart15V)
  14027. {
  14028. maidArray[j].SetPos(dancePos[j]);
  14029. maidArray[j].body0.transform.localRotation = danceRot[j];
  14030. }
  14031. }
  14032. }
  14033. isDanceStart15V = false;
  14034. }
  14035. for (int j = 0; j < maidCnt; j++)
  14036. {
  14037. isStop[j] = false;
  14038. isLock[j] = false;
  14039. pHandL[j] = 0;
  14040. pHandR[j] = 0;
  14041. muneIKL[j] = false;
  14042. muneIKR[j] = false;
  14043. if (!isVR)
  14044. {
  14045. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14046. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14047. }
  14048. if (maidArray[j].transform.position.y != 100f)
  14049. {
  14050. dancePos[j] = maidArray[j].transform.position;
  14051. }
  14052. else
  14053. {
  14054. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14055. }
  14056. danceRot[j] = maidArray[j].transform.localRotation;
  14057. }
  14058. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14059. {
  14060. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14061. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14062. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14063. maidArray[0].body0.transform.localRotation =
  14064. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14065. }
  14066. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14067. {
  14068. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14069. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14070. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14071. maidArray[2].body0.transform.localRotation =
  14072. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14073. }
  14074. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14075. {
  14076. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14077. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14078. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14079. maidArray[4].body0.transform.localRotation =
  14080. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14081. }
  14082. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14083. {
  14084. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14085. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14086. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14087. maidArray[6].body0.transform.localRotation =
  14088. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14089. }
  14090. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14091. {
  14092. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14093. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14094. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14095. maidArray[8].body0.transform.localRotation =
  14096. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14097. }
  14098. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14099. {
  14100. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14101. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14102. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14103. maidArray[10].body0.transform.localRotation =
  14104. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14105. }
  14106. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14107. {
  14108. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14109. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14110. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14111. maidArray[12].body0.transform.localRotation =
  14112. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14113. }
  14114. if (maidArray[1] && maidArray[1].Visible)
  14115. {
  14116. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14117. maidArray[0].transform.position.y,
  14118. maidArray[0].transform.position.z));
  14119. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14120. }
  14121. if (maidArray[3] && maidArray[3].Visible)
  14122. {
  14123. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14124. maidArray[2].transform.position.y,
  14125. maidArray[2].transform.position.z));
  14126. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14127. }
  14128. if (maidArray[5] && maidArray[5].Visible)
  14129. {
  14130. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14131. maidArray[4].transform.position.y,
  14132. maidArray[4].transform.position.z));
  14133. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14134. }
  14135. if (maidArray[7] && maidArray[7].Visible)
  14136. {
  14137. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14138. maidArray[6].transform.position.y,
  14139. maidArray[6].transform.position.z));
  14140. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14141. }
  14142. if (maidArray[9] && maidArray[9].Visible)
  14143. {
  14144. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14145. maidArray[8].transform.position.y,
  14146. maidArray[8].transform.position.z));
  14147. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14148. }
  14149. if (maidArray[11] && maidArray[11].Visible)
  14150. {
  14151. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14152. maidArray[10].transform.position.y,
  14153. maidArray[10].transform.position.z));
  14154. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14155. }
  14156. if (maidArray[13] && maidArray[13].Visible)
  14157. {
  14158. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14159. maidArray[12].transform.position.y,
  14160. maidArray[12].transform.position.z));
  14161. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14162. }
  14163. if (maidArray[2] && maidArray[2].Visible)
  14164. {
  14165. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14166. {
  14167. Vector3 vector = Vector3.zero;
  14168. vector.x = 0.6f;
  14169. maidArray[1].SetPos(vector);
  14170. if (maidArray[2] && maidArray[2].Visible)
  14171. {
  14172. vector.x = -0.6f;
  14173. maidArray[2].SetPos(vector);
  14174. }
  14175. if (maidArray[3] && maidArray[3].Visible)
  14176. {
  14177. vector.x = 1.2f;
  14178. maidArray[3].SetPos(vector);
  14179. }
  14180. if (maidArray[4] && maidArray[4].Visible)
  14181. {
  14182. vector.x = -1.2f;
  14183. maidArray[4].SetPos(vector);
  14184. }
  14185. if (maidArray[5] && maidArray[5].Visible)
  14186. {
  14187. vector.x = 1.8f;
  14188. maidArray[5].SetPos(vector);
  14189. }
  14190. if (maidArray[6] && maidArray[6].Visible)
  14191. {
  14192. vector.x = -1.8f;
  14193. maidArray[6].SetPos(vector);
  14194. }
  14195. if (maidArray[7] && maidArray[7].Visible)
  14196. {
  14197. vector.x = 2.4f;
  14198. maidArray[7].SetPos(vector);
  14199. }
  14200. if (maidArray[8] && maidArray[8].Visible)
  14201. {
  14202. vector.x = -2.4f;
  14203. maidArray[8].SetPos(vector);
  14204. }
  14205. if (maidArray[9] && maidArray[9].Visible)
  14206. {
  14207. vector.x = 3f;
  14208. maidArray[9].SetPos(vector);
  14209. }
  14210. if (maidArray[10] && maidArray[10].Visible)
  14211. {
  14212. vector.x = -3f;
  14213. maidArray[10].SetPos(vector);
  14214. }
  14215. if (maidArray[11] && maidArray[11].Visible)
  14216. {
  14217. vector.x = 3.6f;
  14218. maidArray[11].SetPos(vector);
  14219. }
  14220. if (maidArray[12] && maidArray[12].Visible)
  14221. {
  14222. vector.x = -3.6f;
  14223. maidArray[12].SetPos(vector);
  14224. }
  14225. if (maidArray[13] && maidArray[13].Visible)
  14226. {
  14227. vector.x = 4.2f;
  14228. maidArray[13].SetPos(vector);
  14229. }
  14230. }
  14231. }
  14232. isDance = true;
  14233. isDanceStart15 = true;
  14234. isSD1 = false;
  14235. }
  14236. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14237. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14238. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14239. || Input.GetKeyDown(KeyCode.Keypad0))
  14240. {
  14241. for (int j = 0; j < maidCnt; j++)
  14242. {
  14243. if (maidArray[j] && maidArray[j].Visible)
  14244. {
  14245. if (!isVR)
  14246. {
  14247. if (goSlot[(int)selectList[j]] != null)
  14248. {
  14249. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14250. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14251. {
  14252. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14253. }
  14254. }
  14255. }
  14256. }
  14257. }
  14258. }
  14259. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14260. {
  14261. if (h2Flg)
  14262. {
  14263. h2Flg = false;
  14264. }
  14265. else
  14266. {
  14267. string text4 = "";
  14268. if (wearIndex == 0)
  14269. {
  14270. text4 = "Underwear";
  14271. wearIndex = 1;
  14272. isWear = false;
  14273. isSkirt = false;
  14274. isBra = true;
  14275. isPanz = true;
  14276. isHeadset = false;
  14277. isGlove = false;
  14278. isStkg = true;
  14279. isShoes = false;
  14280. }
  14281. else if (wearIndex == 1)
  14282. {
  14283. text4 = "Nude";
  14284. wearIndex = 2;
  14285. isWear = false;
  14286. isSkirt = false;
  14287. isBra = false;
  14288. isPanz = false;
  14289. isHeadset = false;
  14290. isGlove = false;
  14291. isStkg = false;
  14292. isShoes = false;
  14293. }
  14294. else if (wearIndex == 2)
  14295. {
  14296. text4 = "None";
  14297. wearIndex = 0;
  14298. isWear = true;
  14299. isSkirt = true;
  14300. isBra = true;
  14301. isPanz = true;
  14302. isHeadset = true;
  14303. isGlove = true;
  14304. isStkg = true;
  14305. isShoes = true;
  14306. }
  14307. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14308. for (int j = 0; j < maidCnt; j++)
  14309. {
  14310. if (maidArray[j] && maidArray[j].Visible)
  14311. {
  14312. if (!isVR)
  14313. {
  14314. if (goSlot[(int)selectList[j]] != null)
  14315. {
  14316. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14317. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14318. {
  14319. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14320. }
  14321. }
  14322. }
  14323. maidArray[j].body0.SetMaskMode(maskMode);
  14324. }
  14325. }
  14326. }
  14327. }
  14328. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14329. {
  14330. saveScene = 9999;
  14331. saveScene2 = saveScene;
  14332. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14333. try
  14334. {
  14335. thum_byte_to_base64_ = string.Empty;
  14336. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14337. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14338. }
  14339. catch { }
  14340. }
  14341. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14342. {
  14343. loadScene = 9999;
  14344. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14345. }
  14346. if (isScreen)
  14347. {
  14348. isScreen = false;
  14349. bGui = isGui;
  14350. isGui = false;
  14351. if (!isMessage)
  14352. {
  14353. foreach (UICamera uicamera in ui_cam_hide_list_)
  14354. {
  14355. uicamera.GetComponent<Camera>().enabled = true;
  14356. }
  14357. ui_cam_hide_list_.Clear();
  14358. }
  14359. else
  14360. {
  14361. if (editUI != null)
  14362. {
  14363. editUI.SetActive(true);
  14364. }
  14365. if (GameMain.Instance.CMSystem.ViewFps)
  14366. {
  14367. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14368. childObject.SetActive(true);
  14369. }
  14370. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14371. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14372. childObject2.SetActive(true);
  14373. childObject3.SetActive(true);
  14374. }
  14375. for (int j = 0; j < maidCnt; j++)
  14376. {
  14377. if (maidArray[j] && maidArray[j].Visible)
  14378. {
  14379. isBone[j] = isBoneN[j];
  14380. if (isBone[j])
  14381. {
  14382. gNeck[j].SetActive(true);
  14383. gSpine[j].SetActive(true);
  14384. gSpine0a[j].SetActive(true);
  14385. gSpine1a[j].SetActive(true);
  14386. gSpine1[j].SetActive(true);
  14387. gPelvis[j].SetActive(true);
  14388. gHandL[j].SetActive(true);
  14389. gArmL[j].SetActive(true);
  14390. gFootL[j].SetActive(true);
  14391. gHizaL[j].SetActive(true);
  14392. gHandR[j].SetActive(true);
  14393. gArmR[j].SetActive(true);
  14394. gFootR[j].SetActive(true);
  14395. gHizaR[j].SetActive(true);
  14396. gClavicleL[j].SetActive(true);
  14397. gClavicleR[j].SetActive(true);
  14398. }
  14399. }
  14400. }
  14401. }
  14402. if (isScreen2)
  14403. {
  14404. isScreen = true;
  14405. isScreen2 = false;
  14406. }
  14407. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14408. && !Input.GetKey(KeyCode.Q))
  14409. {
  14410. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14411. {
  14412. isScreen = true;
  14413. for (int j = 0; j < maidCnt; j++)
  14414. {
  14415. if (maidArray[j] && maidArray[j].Visible)
  14416. {
  14417. if (isBone[j])
  14418. {
  14419. gNeck[j].SetActive(false);
  14420. gSpine[j].SetActive(false);
  14421. gSpine0a[j].SetActive(false);
  14422. gSpine1a[j].SetActive(false);
  14423. gSpine1[j].SetActive(false);
  14424. gPelvis[j].SetActive(false);
  14425. gHandL[j].SetActive(false);
  14426. gArmL[j].SetActive(false);
  14427. gFootL[j].SetActive(false);
  14428. gHizaL[j].SetActive(false);
  14429. gHandR[j].SetActive(false);
  14430. gArmR[j].SetActive(false);
  14431. gFootR[j].SetActive(false);
  14432. gHizaR[j].SetActive(false);
  14433. gClavicleL[j].SetActive(false);
  14434. gClavicleR[j].SetActive(false);
  14435. }
  14436. isBoneN[j] = isBone[j];
  14437. isBone[j] = false;
  14438. }
  14439. }
  14440. if (!isMessage)
  14441. {
  14442. ui_cam_hide_list_.Clear();
  14443. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14444. foreach (UICamera uicamera2 in array16)
  14445. {
  14446. if (uicamera2.GetComponent<Camera>().enabled)
  14447. {
  14448. uicamera2.GetComponent<Camera>().enabled = false;
  14449. ui_cam_hide_list_.Add(uicamera2);
  14450. }
  14451. }
  14452. }
  14453. else
  14454. {
  14455. editUI = GameObject.Find("/UI Root/Camera");
  14456. if (editUI != null)
  14457. {
  14458. editUI.SetActive(false);
  14459. }
  14460. if (GameMain.Instance.CMSystem.ViewFps)
  14461. {
  14462. GameObject childObject =
  14463. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14464. childObject.SetActive(false);
  14465. }
  14466. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14467. GameObject childObject3 =
  14468. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14469. childObject2.SetActive(false);
  14470. childObject3.SetActive(false);
  14471. }
  14472. isGui = bGui;
  14473. bGui = false;
  14474. GameMain.Instance.MainCamera.ScreenShot(false);
  14475. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14476. }
  14477. }
  14478. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14479. {
  14480. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14481. keyFlg2 = true;
  14482. }
  14483. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14484. {
  14485. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14486. keyFlg2 = true;
  14487. }
  14488. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14489. {
  14490. mainCameraTransform.eulerAngles =
  14491. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14492. keyFlg2 = true;
  14493. }
  14494. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14495. {
  14496. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14497. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14498. mainCamera.SetDistance(3f, true);
  14499. keyFlg2 = true;
  14500. }
  14501. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14502. {
  14503. cameraIti = mainCamera.GetTargetPos();
  14504. cameraIti2 = mainCamera.GetPos();
  14505. cameraItiAngle = mainCamera.GetAroundAngle();
  14506. cameraItiDistance = mainCamera.GetDistance();
  14507. keyFlg2 = true;
  14508. }
  14509. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14510. {
  14511. mainCamera.SetTargetPos(cameraIti, true);
  14512. mainCamera.SetPos(cameraIti2);
  14513. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14514. mainCamera.SetDistance(cameraItiDistance, true);
  14515. keyFlg2 = true;
  14516. }
  14517. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14518. {
  14519. if (keyFlg2)
  14520. {
  14521. keyFlg2 = false;
  14522. }
  14523. else
  14524. {
  14525. effectIndex++;
  14526. if (effectIndex == 9)
  14527. {
  14528. kami.SetActive(false);
  14529. effectIndex = 0;
  14530. }
  14531. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14532. if (!isBlur)
  14533. {
  14534. component3.mode = Vignetting.AberrationMode.Simple;
  14535. component3.intensity = -3.98f;
  14536. component3.chromaticAberration = -0.75f;
  14537. component3.axialAberration = 1.18f;
  14538. component3.blurSpread = 4.19f;
  14539. component3.luminanceDependency = 0.494f;
  14540. component3.blurDistance = 1.71f;
  14541. component3.enabled = false;
  14542. }
  14543. if (kami) { }
  14544. if (effectIndex == 0)
  14545. {
  14546. component3.enabled = false;
  14547. }
  14548. if (effectIndex == 1)
  14549. {
  14550. component3.mode = Vignetting.AberrationMode.Simple;
  14551. component3.intensity = -1f;
  14552. component3.chromaticAberration = 0f;
  14553. component3.axialAberration = 0f;
  14554. component3.blurSpread = 5f;
  14555. component3.luminanceDependency = 0f;
  14556. component3.blurDistance = 0f;
  14557. component3.enabled = true;
  14558. }
  14559. if (effectIndex == 2)
  14560. {
  14561. component3.enabled = true;
  14562. }
  14563. if (effectIndex == 3)
  14564. {
  14565. component3.mode = Vignetting.AberrationMode.Simple;
  14566. component3.intensity = 9f;
  14567. component3.chromaticAberration = 0f;
  14568. component3.axialAberration = 0f;
  14569. component3.blurSpread = 5f;
  14570. component3.luminanceDependency = 0f;
  14571. component3.blurDistance = 0f;
  14572. component3.enabled = true;
  14573. }
  14574. if (effectIndex == 4)
  14575. {
  14576. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14577. kami = (GameObject)Instantiate(@object);
  14578. Vector3 localPosition = kami.transform.localPosition;
  14579. localPosition.y = 3.5f;
  14580. kami.transform.localPosition = localPosition;
  14581. }
  14582. if (effectIndex == 5)
  14583. {
  14584. component3.enabled = true;
  14585. component3.mode = Vignetting.AberrationMode.Simple;
  14586. component3.intensity = -2.5f;
  14587. component3.chromaticAberration = -0.3f;
  14588. component3.axialAberration = 0.5f;
  14589. component3.blurSpread = 4.5f;
  14590. component3.luminanceDependency = 0.2f;
  14591. component3.blurDistance = 0.8f;
  14592. component3.enabled = true;
  14593. }
  14594. if (effectIndex == 6)
  14595. {
  14596. kami.SetActive(false);
  14597. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14598. kami = (GameObject)Instantiate(@object);
  14599. Vector3 localPosition = kami.transform.localPosition;
  14600. localPosition.y = 3.5f;
  14601. kami.transform.localPosition = localPosition;
  14602. }
  14603. if (effectIndex == 7)
  14604. {
  14605. component3.enabled = true;
  14606. component3.mode = Vignetting.AberrationMode.Simple;
  14607. component3.intensity = -2.5f;
  14608. component3.chromaticAberration = -0.3f;
  14609. component3.axialAberration = 0.5f;
  14610. component3.blurSpread = 4.5f;
  14611. component3.luminanceDependency = 0.2f;
  14612. component3.blurDistance = 0.8f;
  14613. component3.enabled = true;
  14614. }
  14615. if (effectIndex == 8)
  14616. {
  14617. component3.mode = Vignetting.AberrationMode.Simple;
  14618. component3.intensity = 8f;
  14619. component3.chromaticAberration = 0f;
  14620. component3.axialAberration = 0f;
  14621. component3.blurSpread = 5f;
  14622. component3.luminanceDependency = 0f;
  14623. component3.blurDistance = 0f;
  14624. component3.enabled = true;
  14625. }
  14626. }
  14627. }
  14628. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14629. {
  14630. qFlg = false;
  14631. }
  14632. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14633. {
  14634. bool flag5 = false;
  14635. for (int k = 0; k < keyArray.Length; k++)
  14636. {
  14637. if (Input.GetKey(keyArray[k]))
  14638. {
  14639. flag5 = true;
  14640. break;
  14641. }
  14642. }
  14643. if (!getModKeyPressing(modKey.Shift))
  14644. {
  14645. if (!flag5)
  14646. {
  14647. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14648. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14649. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14650. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14651. {
  14652. Vector3 vector = softG;
  14653. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14654. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14655. softG = vector;
  14656. }
  14657. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14658. {
  14659. Vector3 vector = softG;
  14660. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14661. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14662. softG = vector;
  14663. }
  14664. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14665. {
  14666. Vector3 vector = softG;
  14667. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14668. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14669. softG = vector;
  14670. }
  14671. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14672. {
  14673. Vector3 vector = softG;
  14674. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14675. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14676. softG = vector;
  14677. }
  14678. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14679. {
  14680. Vector3 vector = softG;
  14681. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14682. softG = vector;
  14683. }
  14684. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14685. {
  14686. Vector3 vector = softG;
  14687. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14688. softG = vector;
  14689. }
  14690. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14691. {
  14692. Vector3 vector = softG;
  14693. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14694. softG = vector;
  14695. }
  14696. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14697. {
  14698. Vector3 vector = softG;
  14699. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14700. softG = vector;
  14701. }
  14702. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14703. {
  14704. Vector3 vector = softG;
  14705. vector.y += 6E-05f * speed;
  14706. softG = vector;
  14707. }
  14708. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14709. {
  14710. Vector3 vector = softG;
  14711. vector.y -= 6E-05f * speed;
  14712. softG = vector;
  14713. }
  14714. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14715. {
  14716. softG = new Vector3(0f, -0.003f, 0f);
  14717. }
  14718. for (int j = 0; j < maidCnt; j++)
  14719. {
  14720. Maid maid = maidArray[j];
  14721. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14722. {
  14723. if (maid.body0.goSlot[l].obj != null)
  14724. {
  14725. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14726. if (component2 != null && component2.enabled)
  14727. {
  14728. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14729. }
  14730. }
  14731. List<THair1> fieldValue3 =
  14732. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14733. for (int k = 0; k < fieldValue3.Count; k++)
  14734. {
  14735. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14736. }
  14737. }
  14738. }
  14739. }
  14740. }
  14741. else if (!flag5)
  14742. {
  14743. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14744. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14745. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14746. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14747. {
  14748. Vector3 vector = softG2;
  14749. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14750. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14751. softG2 = vector;
  14752. }
  14753. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14754. {
  14755. Vector3 vector = softG2;
  14756. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14757. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14758. softG2 = vector;
  14759. }
  14760. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14761. {
  14762. Vector3 vector = softG2;
  14763. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14764. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14765. softG2 = vector;
  14766. }
  14767. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14768. {
  14769. Vector3 vector = softG2;
  14770. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14771. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14772. softG2 = vector;
  14773. }
  14774. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14775. {
  14776. Vector3 vector = softG2;
  14777. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14778. softG2 = vector;
  14779. }
  14780. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14781. {
  14782. Vector3 vector = softG2;
  14783. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14784. softG2 = vector;
  14785. }
  14786. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14787. {
  14788. Vector3 vector = softG2;
  14789. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14790. softG2 = vector;
  14791. }
  14792. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14793. {
  14794. Vector3 vector = softG2;
  14795. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14796. softG2 = vector;
  14797. }
  14798. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14799. {
  14800. Vector3 vector = softG2;
  14801. vector.y += 2E-05f * speed;
  14802. softG2 = vector;
  14803. }
  14804. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14805. {
  14806. Vector3 vector = softG2;
  14807. vector.y -= 2E-05f * speed;
  14808. softG2 = vector;
  14809. }
  14810. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14811. {
  14812. softG2 = new Vector3(0f, -0.005f, 0f);
  14813. }
  14814. for (int j = 0; j < maidCnt; j++)
  14815. {
  14816. Maid maid = maidArray[j];
  14817. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14818. {
  14819. if (maid.body0.goSlot[l].obj != null)
  14820. {
  14821. DynamicSkirtBone fieldValue8 =
  14822. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14823. "m_SkirtBone");
  14824. if (fieldValue8 != null)
  14825. {
  14826. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14827. fieldValue8.UpdateParameters();
  14828. }
  14829. }
  14830. }
  14831. }
  14832. }
  14833. }
  14834. if (!isVR)
  14835. {
  14836. if (doguObject.Count > 0)
  14837. {
  14838. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14839. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14840. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14841. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14842. {
  14843. idoFlg2 = true;
  14844. doguObject[doguSelectIndex].transform.localScale =
  14845. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14846. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14847. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14848. }
  14849. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14850. {
  14851. idoFlg2 = true;
  14852. doguObject[doguSelectIndex].transform.localScale =
  14853. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14854. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14855. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14856. }
  14857. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14858. {
  14859. idoFlg2 = true;
  14860. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14861. }
  14862. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14863. {
  14864. doguObject[doguSelectIndex]
  14865. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14866. idoFlg2 = true;
  14867. }
  14868. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14869. {
  14870. doguObject[doguSelectIndex]
  14871. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14872. idoFlg2 = true;
  14873. }
  14874. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14875. && getModKeyPressing(modKey.Alt))
  14876. {
  14877. for (int k = 0; k < 10; k++)
  14878. {
  14879. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14880. Vector3.right,
  14881. -doguObject[doguSelectIndex]
  14882. .transform.rotation.eulerAngles.x);
  14883. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14884. Vector3.forward,
  14885. -doguObject[doguSelectIndex]
  14886. .transform.rotation.eulerAngles.z);
  14887. }
  14888. idoFlg2 = true;
  14889. Vector3 vector = Vector3.zero;
  14890. Vector3 zero3 = Vector3.zero;
  14891. zero3.x = -90f;
  14892. int num12 = doguIndex[doguSelectIndex];
  14893. switch (num12)
  14894. {
  14895. case 3:
  14896. vector.z = 0.5f;
  14897. zero3.z = 90f;
  14898. break;
  14899. case 4:
  14900. case 5:
  14901. case 7:
  14902. case 10:
  14903. case 11: break;
  14904. case 6:
  14905. vector.z = 0.6f;
  14906. zero3.x = 0f;
  14907. break;
  14908. case 8:
  14909. vector.z = 0.5f;
  14910. zero3.x = 0f;
  14911. break;
  14912. case 9:
  14913. vector.z = 0.32f;
  14914. zero3.z = 180f;
  14915. break;
  14916. case 12:
  14917. vector.z = 0.5f;
  14918. zero3.z = 180f;
  14919. break;
  14920. case 13:
  14921. vector.z = 0.7f;
  14922. zero3.z = 180f;
  14923. break;
  14924. default:
  14925. if (num12 != 16)
  14926. {
  14927. switch (num12)
  14928. {
  14929. case 23:
  14930. vector.z = 2.7f;
  14931. vector.x = 0.77f;
  14932. zero3.z = 90f;
  14933. break;
  14934. case 25:
  14935. vector.z = 0.5f;
  14936. vector.y = 0.9f;
  14937. zero3.z = 180f;
  14938. break;
  14939. case 26:
  14940. vector.z = 0.5f;
  14941. vector.y = 0.9f;
  14942. zero3.z = 180f;
  14943. break;
  14944. case 30:
  14945. vector.z = 0f;
  14946. zero3.z = 0f;
  14947. break;
  14948. case 31:
  14949. vector.z = -0.6f;
  14950. vector.y = 0.96f;
  14951. zero3.z = 180f;
  14952. break;
  14953. case 32:
  14954. vector.z = -0.6f;
  14955. vector.y = 0.96f;
  14956. zero3.z = 180f;
  14957. break;
  14958. case 33:
  14959. vector.z = -0.6f;
  14960. vector.y = 0.85f;
  14961. zero3.z = 180f;
  14962. break;
  14963. }
  14964. }
  14965. else
  14966. {
  14967. vector.z = -0.4f;
  14968. zero3.z = 180f;
  14969. }
  14970. break;
  14971. }
  14972. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14973. }
  14974. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14975. && Input.GetKey(KeyCode.J))
  14976. {
  14977. doguObject[doguSelectIndex]
  14978. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14979. new Vector3(vector3.x, 0f, vector3.z),
  14980. 0.3f);
  14981. doguObject[doguSelectIndex]
  14982. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14983. new Vector3(vector2.x, 0f, vector2.z),
  14984. 0.3f);
  14985. idoFlg2 = true;
  14986. }
  14987. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14988. && Input.GetKey(KeyCode.L))
  14989. {
  14990. doguObject[doguSelectIndex]
  14991. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14992. new Vector3(vector3.x, 0f, vector3.z),
  14993. 0.3f);
  14994. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14995. new Vector3(vector2.x, 0f, vector2.z),
  14996. -0.3f);
  14997. idoFlg2 = true;
  14998. }
  14999. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15000. && Input.GetKey(KeyCode.J))
  15001. {
  15002. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15003. new Vector3(vector3.x, 0f, vector3.z),
  15004. -0.3f);
  15005. doguObject[doguSelectIndex]
  15006. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15007. new Vector3(vector2.x, 0f, vector2.z),
  15008. 0.3f);
  15009. idoFlg2 = true;
  15010. }
  15011. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15012. && Input.GetKey(KeyCode.L))
  15013. {
  15014. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15015. new Vector3(vector3.x, 0f, vector3.z),
  15016. -0.3f);
  15017. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15018. new Vector3(vector2.x, 0f, vector2.z),
  15019. -0.3f);
  15020. idoFlg2 = true;
  15021. }
  15022. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15023. {
  15024. doguObject[doguSelectIndex]
  15025. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15026. new Vector3(vector3.x, 0f, vector3.z),
  15027. 0.4f);
  15028. idoFlg2 = true;
  15029. }
  15030. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15031. {
  15032. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15033. new Vector3(vector3.x, 0f, vector3.z),
  15034. -0.4f);
  15035. idoFlg2 = true;
  15036. }
  15037. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15038. {
  15039. doguObject[doguSelectIndex]
  15040. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15041. new Vector3(vector2.x, 0f, vector2.z),
  15042. 0.4f);
  15043. idoFlg2 = true;
  15044. }
  15045. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15046. {
  15047. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15048. new Vector3(vector2.x, 0f, vector2.z),
  15049. -0.4f);
  15050. idoFlg2 = true;
  15051. }
  15052. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15053. {
  15054. doguObject[doguSelectIndex].transform.localRotation =
  15055. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15056. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15057. idoFlg2 = true;
  15058. }
  15059. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15060. {
  15061. doguObject[doguSelectIndex].transform.localRotation =
  15062. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15063. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15064. idoFlg2 = true;
  15065. }
  15066. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15067. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15068. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15069. {
  15070. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15071. new Vector3(vector3.x, 0f, vector3.z),
  15072. -0.7f);
  15073. idoFlg2 = true;
  15074. }
  15075. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15076. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15077. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15078. {
  15079. doguObject[doguSelectIndex]
  15080. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15081. new Vector3(vector3.x, 0f, vector3.z),
  15082. 0.7f);
  15083. idoFlg2 = true;
  15084. }
  15085. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15086. && (Input.GetKey(KeyCode.Minus)
  15087. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15088. {
  15089. doguObject[doguSelectIndex]
  15090. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15091. new Vector3(vector2.x, 0f, vector2.z),
  15092. 0.7f);
  15093. idoFlg2 = true;
  15094. }
  15095. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15096. && (Input.GetKey(KeyCode.Quote)
  15097. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15098. {
  15099. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15100. new Vector3(vector2.x, 0f, vector2.z),
  15101. -0.7f);
  15102. idoFlg2 = true;
  15103. }
  15104. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15105. && Input.GetKey(KeyCode.J))
  15106. {
  15107. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15108. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15109. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15110. doguObject[doguSelectIndex].transform.localPosition = vector;
  15111. idoFlg2 = true;
  15112. }
  15113. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15114. && Input.GetKey(KeyCode.L))
  15115. {
  15116. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15117. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15118. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15119. doguObject[doguSelectIndex].transform.localPosition = vector;
  15120. idoFlg2 = true;
  15121. }
  15122. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15123. && Input.GetKey(KeyCode.J))
  15124. {
  15125. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15126. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15127. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15128. doguObject[doguSelectIndex].transform.localPosition = vector;
  15129. idoFlg2 = true;
  15130. }
  15131. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15132. && Input.GetKey(KeyCode.L))
  15133. {
  15134. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15135. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15136. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15137. doguObject[doguSelectIndex].transform.localPosition = vector;
  15138. idoFlg2 = true;
  15139. }
  15140. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15141. {
  15142. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15143. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15144. doguObject[doguSelectIndex].transform.localPosition = vector;
  15145. idoFlg2 = true;
  15146. }
  15147. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15148. {
  15149. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15150. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15151. doguObject[doguSelectIndex].transform.localPosition = vector;
  15152. idoFlg2 = true;
  15153. }
  15154. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15155. {
  15156. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15157. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15158. doguObject[doguSelectIndex].transform.localPosition = vector;
  15159. idoFlg2 = true;
  15160. }
  15161. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15162. {
  15163. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15164. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15165. doguObject[doguSelectIndex].transform.localPosition = vector;
  15166. idoFlg2 = true;
  15167. }
  15168. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15169. {
  15170. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15171. vector.y += 0.0075f * speed;
  15172. doguObject[doguSelectIndex].transform.localPosition = vector;
  15173. idoFlg2 = true;
  15174. }
  15175. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15176. {
  15177. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15178. vector.y -= 0.0075f * speed;
  15179. doguObject[doguSelectIndex].transform.localPosition = vector;
  15180. idoFlg2 = true;
  15181. }
  15182. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15183. {
  15184. idoFlg2 = true;
  15185. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15186. {
  15187. Destroy(doguObject[doguSelectIndex]);
  15188. doguObject.RemoveAt(doguSelectIndex);
  15189. }
  15190. doguIndex.RemoveAt(doguSelectIndex);
  15191. doguSelectIndex = 0;
  15192. }
  15193. }
  15194. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15195. {
  15196. idoFlg2 = true;
  15197. if (doguSelectIndex == doguObject.Count)
  15198. {
  15199. doguIndex.Add(0);
  15200. }
  15201. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15202. {
  15203. Destroy(doguObject[doguSelectIndex]);
  15204. doguObject.RemoveAt(doguSelectIndex);
  15205. }
  15206. else
  15207. {
  15208. doguIndex.Add(0);
  15209. doguSelectIndex = doguIndex.Count - 1;
  15210. }
  15211. List<int> list2;
  15212. int index;
  15213. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15214. if (doguIndex[doguSelectIndex] <= -1)
  15215. {
  15216. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15217. }
  15218. if (doguIndex[doguSelectIndex] > 0)
  15219. {
  15220. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15221. {
  15222. Object @object = null;
  15223. for (int j = 0; j < 5; j++)
  15224. {
  15225. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15226. if (@object != null)
  15227. {
  15228. break;
  15229. }
  15230. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15231. }
  15232. doguObject.Add(Instantiate(@object) as GameObject);
  15233. }
  15234. else
  15235. {
  15236. Material material = new Material(Shader.Find("Mirror"));
  15237. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15238. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15239. gameObject7.GetComponent<Renderer>().material = material;
  15240. gameObject7.AddComponent<MirrorReflection2>();
  15241. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15242. component5.m_TextureSize = 2048;
  15243. component5.m_ClipPlaneOffset = 0f;
  15244. gameObject7.GetComponent<Renderer>().enabled = true;
  15245. doguObject.Add(gameObject7);
  15246. }
  15247. Vector3 vector = Vector3.zero;
  15248. Vector3 zero3 = Vector3.zero;
  15249. zero3.x = -90f;
  15250. switch (doguIndex[doguSelectIndex])
  15251. {
  15252. case 1:
  15253. vector.z = -0.5f;
  15254. goto IL_344DC;
  15255. case 2:
  15256. vector.z = -0.5f;
  15257. goto IL_344DC;
  15258. case 3:
  15259. vector.z = 0.5f;
  15260. zero3.z = 90f;
  15261. goto IL_344DC;
  15262. case 4:
  15263. vector.z = 0.9f;
  15264. goto IL_344DC;
  15265. case 5:
  15266. vector.z = 0.9f;
  15267. goto IL_344DC;
  15268. case 6:
  15269. vector.z = 0.6f;
  15270. zero3.x = 0f;
  15271. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15272. goto IL_344DC;
  15273. case 7:
  15274. vector.z = 0.6f;
  15275. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15276. goto IL_344DC;
  15277. case 8:
  15278. vector.z = 0.5f;
  15279. zero3.x = 0f;
  15280. goto IL_344DC;
  15281. case 9:
  15282. vector.z = 0.32f;
  15283. zero3.z = 180f;
  15284. goto IL_344DC;
  15285. case 10:
  15286. vector.z = 0.6f;
  15287. goto IL_344DC;
  15288. case 11:
  15289. vector.z = 0.6f;
  15290. goto IL_344DC;
  15291. case 12:
  15292. vector.z = 0.5f;
  15293. zero3.z = 180f;
  15294. goto IL_344DC;
  15295. case 13:
  15296. vector.z = 0.7f;
  15297. zero3.z = 180f;
  15298. goto IL_344DC;
  15299. case 14:
  15300. vector.z = -0.4f;
  15301. goto IL_344DC;
  15302. case 15:
  15303. vector.z = -0.4f;
  15304. goto IL_344DC;
  15305. case 16:
  15306. vector.z = -0.4f;
  15307. zero3.z = 180f;
  15308. goto IL_344DC;
  15309. case 17:
  15310. vector.z = -0.4f;
  15311. goto IL_344DC;
  15312. case 18:
  15313. vector.z = -0.2f;
  15314. goto IL_344DC;
  15315. case 19:
  15316. vector.z = 0f;
  15317. goto IL_344DC;
  15318. case 20:
  15319. vector.z = 3.4f;
  15320. vector.x = -1f;
  15321. goto IL_344DC;
  15322. case 21:
  15323. vector.z = 3.4f;
  15324. vector.x = -1f;
  15325. goto IL_344DC;
  15326. case 22:
  15327. vector.z = 3.4f;
  15328. vector.y = 0.3f;
  15329. vector.x = -1f;
  15330. goto IL_344DC;
  15331. case 23:
  15332. vector.z = 2.7f;
  15333. vector.x = 0.77f;
  15334. zero3.z = 90f;
  15335. goto IL_344DC;
  15336. case 25:
  15337. vector.z = 0.5f;
  15338. vector.y = 0.9f;
  15339. zero3.z = 180f;
  15340. goto IL_344DC;
  15341. case 26:
  15342. vector.z = 0.5f;
  15343. vector.y = 0.9f;
  15344. zero3.z = 180f;
  15345. goto IL_344DC;
  15346. case 29:
  15347. vector.z = 0.5f;
  15348. vector.x = -1.05f;
  15349. goto IL_344DC;
  15350. case 30:
  15351. vector.z = -2.8f;
  15352. zero3.z = 0f;
  15353. zero3.x = 0f;
  15354. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15355. goto IL_344DC;
  15356. case 31:
  15357. vector.z = -0.6f;
  15358. vector.y = 0.96f;
  15359. zero3.z = 180f;
  15360. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15361. goto IL_344DC;
  15362. case 32:
  15363. vector.z = -0.6f;
  15364. vector.y = 0.96f;
  15365. zero3.z = 180f;
  15366. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15367. goto IL_344DC;
  15368. case 33:
  15369. vector.z = -0.6f;
  15370. vector.y = 0.85f;
  15371. zero3.z = 180f;
  15372. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15373. goto IL_344DC;
  15374. }
  15375. vector.z = 0.5f;
  15376. IL_344DC:
  15377. doguObject[doguSelectIndex].transform.localPosition = vector;
  15378. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15379. }
  15380. if (doguIndex[doguSelectIndex] == 0)
  15381. {
  15382. doguIndex.RemoveAt(doguSelectIndex);
  15383. }
  15384. }
  15385. else if (Input.GetKeyDown(KeyCode.W))
  15386. {
  15387. for (int k = 0; k < keyArray.Length; k++)
  15388. {
  15389. if (Input.GetKey(keyArray[k]))
  15390. {
  15391. wFlg = true;
  15392. break;
  15393. }
  15394. }
  15395. }
  15396. else if (Input.GetKeyUp(KeyCode.W))
  15397. {
  15398. if (wFlg)
  15399. {
  15400. wFlg = false;
  15401. }
  15402. else if (idoFlg2)
  15403. {
  15404. idoFlg2 = false;
  15405. }
  15406. else
  15407. {
  15408. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15409. {
  15410. Destroy(doguObject[doguSelectIndex]);
  15411. doguObject.RemoveAt(doguSelectIndex);
  15412. }
  15413. else
  15414. {
  15415. doguIndex.Add(0);
  15416. doguSelectIndex = doguIndex.Count - 1;
  15417. }
  15418. List<int> list2;
  15419. int index;
  15420. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15421. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15422. {
  15423. doguIndex[doguSelectIndex] = 0;
  15424. }
  15425. if (doguIndex[doguSelectIndex] > 0)
  15426. {
  15427. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15428. {
  15429. Object @object = null;
  15430. for (int j = 0; j < 5; j++)
  15431. {
  15432. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15433. if (@object != null)
  15434. {
  15435. break;
  15436. }
  15437. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15438. }
  15439. doguObject.Add(Instantiate(@object) as GameObject);
  15440. }
  15441. else
  15442. {
  15443. Material material = new Material(Shader.Find("Mirror"));
  15444. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15445. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15446. gameObject7.GetComponent<Renderer>().material = material;
  15447. gameObject7.AddComponent<MirrorReflection2>();
  15448. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15449. component5.m_TextureSize = 2048;
  15450. component5.m_ClipPlaneOffset = 0f;
  15451. gameObject7.GetComponent<Renderer>().enabled = true;
  15452. doguObject.Add(gameObject7);
  15453. }
  15454. Vector3 vector = Vector3.zero;
  15455. Vector3 zero3 = Vector3.zero;
  15456. zero3.x = -90f;
  15457. switch (doguIndex[doguSelectIndex])
  15458. {
  15459. case 1:
  15460. vector.z = -0.5f;
  15461. goto IL_34D66;
  15462. case 2:
  15463. vector.z = -0.5f;
  15464. goto IL_34D66;
  15465. case 3:
  15466. vector.z = 0.5f;
  15467. zero3.z = 90f;
  15468. goto IL_34D66;
  15469. case 4:
  15470. vector.z = 0.9f;
  15471. goto IL_34D66;
  15472. case 5:
  15473. vector.z = 0.9f;
  15474. goto IL_34D66;
  15475. case 6:
  15476. vector.z = 0.6f;
  15477. zero3.x = 0f;
  15478. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15479. goto IL_34D66;
  15480. case 7:
  15481. vector.z = 0.6f;
  15482. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15483. goto IL_34D66;
  15484. case 8:
  15485. vector.z = 0.5f;
  15486. zero3.x = 0f;
  15487. goto IL_34D66;
  15488. case 9:
  15489. vector.z = 0.32f;
  15490. zero3.z = 180f;
  15491. goto IL_34D66;
  15492. case 10:
  15493. vector.z = 0.6f;
  15494. goto IL_34D66;
  15495. case 11:
  15496. vector.z = 0.6f;
  15497. goto IL_34D66;
  15498. case 12:
  15499. vector.z = 0.5f;
  15500. zero3.z = 180f;
  15501. goto IL_34D66;
  15502. case 13:
  15503. vector.z = 0.7f;
  15504. zero3.z = 180f;
  15505. goto IL_34D66;
  15506. case 14:
  15507. vector.z = -0.4f;
  15508. goto IL_34D66;
  15509. case 15:
  15510. vector.z = -0.4f;
  15511. goto IL_34D66;
  15512. case 16:
  15513. vector.z = -0.4f;
  15514. zero3.z = 180f;
  15515. goto IL_34D66;
  15516. case 17:
  15517. vector.z = -0.4f;
  15518. goto IL_34D66;
  15519. case 18:
  15520. vector.z = -0.2f;
  15521. goto IL_34D66;
  15522. case 19:
  15523. vector.z = 0f;
  15524. goto IL_34D66;
  15525. case 20:
  15526. vector.z = 3.4f;
  15527. vector.x = -1f;
  15528. goto IL_34D66;
  15529. case 21:
  15530. vector.z = 3.4f;
  15531. vector.x = -1f;
  15532. goto IL_34D66;
  15533. case 22:
  15534. vector.z = 3.4f;
  15535. vector.y = 0.3f;
  15536. vector.x = -1f;
  15537. goto IL_34D66;
  15538. case 23:
  15539. vector.z = 2.7f;
  15540. vector.x = 0.77f;
  15541. zero3.z = 90f;
  15542. goto IL_34D66;
  15543. case 25:
  15544. vector.z = 0.5f;
  15545. vector.y = 0.9f;
  15546. zero3.z = 180f;
  15547. goto IL_34D66;
  15548. case 26:
  15549. vector.z = 0.5f;
  15550. vector.y = 0.9f;
  15551. zero3.z = 180f;
  15552. goto IL_34D66;
  15553. case 29:
  15554. vector.z = 0.5f;
  15555. vector.x = -1.05f;
  15556. goto IL_34D66;
  15557. case 30:
  15558. vector.z = -2.8f;
  15559. zero3.z = 0f;
  15560. zero3.x = 0f;
  15561. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15562. goto IL_34D66;
  15563. case 31:
  15564. vector.z = -0.6f;
  15565. vector.y = 0.96f;
  15566. zero3.z = 180f;
  15567. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15568. goto IL_34D66;
  15569. case 32:
  15570. vector.z = -0.6f;
  15571. vector.y = 0.96f;
  15572. zero3.z = 180f;
  15573. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15574. goto IL_34D66;
  15575. case 33:
  15576. vector.z = -0.6f;
  15577. vector.y = 0.85f;
  15578. zero3.z = 180f;
  15579. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15580. goto IL_34D66;
  15581. }
  15582. vector.z = 0.5f;
  15583. IL_34D66:;
  15584. }
  15585. if (doguIndex[doguSelectIndex] == 0)
  15586. {
  15587. doguIndex.RemoveAt(doguSelectIndex);
  15588. }
  15589. }
  15590. }
  15591. }
  15592. if (!isVR)
  15593. {
  15594. int i;
  15595. for (i = 0; i < 999; i++)
  15596. {
  15597. if (gDogu[i] != null)
  15598. {
  15599. gDogu[i].GetComponent<Renderer>().enabled = false;
  15600. gDogu[i].SetActive(false);
  15601. if (mDogu[i].del)
  15602. {
  15603. mDogu[i].del = false;
  15604. Destroy(doguBObject[i]);
  15605. doguBObject.RemoveAt(i);
  15606. }
  15607. else if (mDogu[i].count > 0)
  15608. {
  15609. mDogu[i].count--;
  15610. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15611. {
  15612. if (mDogu[i].count == 1)
  15613. {
  15614. doguBObject[i].SetActive(false);
  15615. }
  15616. if (mDogu[i].count == 0)
  15617. {
  15618. doguBObject[i].SetActive(true);
  15619. string name = doguBObject[i].name;
  15620. if (name != null)
  15621. {
  15622. if (!(name == "Particle/pLineY"))
  15623. {
  15624. if (!(name == "Particle/pLineP02"))
  15625. {
  15626. if (!(name == "Particle/pLine_act2"))
  15627. {
  15628. if (name == "Particle/pHeart01")
  15629. {
  15630. mDogu[i].count = 77;
  15631. }
  15632. }
  15633. else
  15634. {
  15635. mDogu[i].count = 90;
  15636. }
  15637. }
  15638. else
  15639. {
  15640. mDogu[i].count = 115;
  15641. }
  15642. }
  15643. else
  15644. {
  15645. mDogu[i].count = 180;
  15646. }
  15647. }
  15648. }
  15649. }
  15650. }
  15651. }
  15652. }
  15653. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15654. {
  15655. ikMode2 = 11;
  15656. }
  15657. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15658. {
  15659. ikMode2 = 12;
  15660. }
  15661. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15662. {
  15663. ikMode2 = 14;
  15664. }
  15665. else if (Input.GetKey(KeyCode.X))
  15666. {
  15667. ikMode2 = 9;
  15668. }
  15669. else if (Input.GetKey(KeyCode.Z))
  15670. {
  15671. ikMode2 = 10;
  15672. }
  15673. else if (Input.GetKey(KeyCode.C))
  15674. {
  15675. ikMode2 = 13;
  15676. }
  15677. else if (Input.GetKey(KeyCode.D))
  15678. {
  15679. ikMode2 = 15;
  15680. }
  15681. else
  15682. {
  15683. ikMode2 = 0;
  15684. }
  15685. if (gBg != null)
  15686. {
  15687. if (!isCube3)
  15688. {
  15689. gBg.GetComponent<Renderer>().enabled = false;
  15690. gBg.SetActive(false);
  15691. }
  15692. else
  15693. {
  15694. if (ikMode2 > 0 && ikMode2 != 15)
  15695. {
  15696. gBg.GetComponent<Renderer>().enabled = true;
  15697. gBg.SetActive(true);
  15698. }
  15699. else
  15700. {
  15701. gBg.GetComponent<Renderer>().enabled = false;
  15702. gBg.SetActive(false);
  15703. }
  15704. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15705. {
  15706. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15707. }
  15708. if (ikMode2 == 9 || ikMode2 == 14)
  15709. {
  15710. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15711. mBg.Update();
  15712. }
  15713. if (ikMode2 == 13)
  15714. {
  15715. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15716. mBg.Update();
  15717. }
  15718. if (ikMode2 == 13)
  15719. {
  15720. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15721. {
  15722. mBg.ido = 5;
  15723. mBg.reset = true;
  15724. }
  15725. else
  15726. {
  15727. gBg.transform.position = bg.position;
  15728. gBg.transform.eulerAngles = bg.eulerAngles;
  15729. mBg.maid = bgObject;
  15730. mBg.ido = 5;
  15731. }
  15732. }
  15733. else if (ikMode2 == 11)
  15734. {
  15735. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15736. {
  15737. mBg.ido = 3;
  15738. mBg.reset = true;
  15739. }
  15740. else
  15741. {
  15742. gBg.transform.position = bg.position;
  15743. gBg.transform.eulerAngles = bg.eulerAngles;
  15744. mBg.maid = bgObject;
  15745. mBg.ido = 3;
  15746. }
  15747. }
  15748. else if (ikMode2 == 12)
  15749. {
  15750. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15751. {
  15752. mBg.ido = 2;
  15753. mBg.reset = true;
  15754. }
  15755. else
  15756. {
  15757. gBg.transform.position = bg.position;
  15758. gBg.transform.eulerAngles = bg.eulerAngles;
  15759. mBg.maid = bgObject;
  15760. mBg.ido = 2;
  15761. }
  15762. }
  15763. else if (ikMode2 == 10)
  15764. {
  15765. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15766. {
  15767. mBg.ido = 1;
  15768. mBg.reset = true;
  15769. }
  15770. else
  15771. {
  15772. gBg.transform.position = bg.position;
  15773. gBg.transform.eulerAngles = bg.eulerAngles;
  15774. mBg.maid = bgObject;
  15775. mBg.ido = 1;
  15776. }
  15777. }
  15778. else if (ikMode2 == 9)
  15779. {
  15780. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15781. {
  15782. mBg.ido = 4;
  15783. mBg.reset = true;
  15784. }
  15785. else
  15786. {
  15787. gBg.transform.position = bg.position;
  15788. gBg.transform.eulerAngles = bg.eulerAngles;
  15789. mBg.maid = bgObject;
  15790. mBg.ido = 4;
  15791. }
  15792. }
  15793. else if (ikMode2 == 14)
  15794. {
  15795. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15796. {
  15797. mBg.ido = 6;
  15798. mBg.reset = true;
  15799. }
  15800. else
  15801. {
  15802. gBg.transform.position = bg.position;
  15803. gBg.transform.eulerAngles = bg.eulerAngles;
  15804. mBg.maid = bgObject;
  15805. mBg.ido = 6;
  15806. }
  15807. }
  15808. }
  15809. }
  15810. for (i = 0; i < lightIndex.Count; i++)
  15811. {
  15812. if (gLight[0] == null)
  15813. {
  15814. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15815. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15816. {
  15817. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15818. };
  15819. gLight[0].GetComponent<Renderer>().material = material2;
  15820. gLight[0].layer = 8;
  15821. gLight[0].GetComponent<Renderer>().enabled = false;
  15822. gLight[0].SetActive(false);
  15823. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15824. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15825. mLight[0].obj = gLight[0];
  15826. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15827. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15828. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15829. mLight[0].ido = 1;
  15830. mLight[0].isScale = false;
  15831. }
  15832. if (gLight[i] != null)
  15833. {
  15834. if (!isCube4)
  15835. {
  15836. gLight[i].GetComponent<Renderer>().enabled = false;
  15837. gLight[i].SetActive(false);
  15838. }
  15839. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15840. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15841. {
  15842. if (ikMode2 > 0 && ikMode2 != 15)
  15843. {
  15844. gLight[i].GetComponent<Renderer>().enabled = true;
  15845. gLight[i].SetActive(true);
  15846. }
  15847. else
  15848. {
  15849. gLight[i].GetComponent<Renderer>().enabled = false;
  15850. gLight[i].SetActive(false);
  15851. mLight[i].isAlt = false;
  15852. }
  15853. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15854. {
  15855. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15856. if (mLight[i].isAlt)
  15857. {
  15858. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15859. }
  15860. }
  15861. if (ikMode2 == 9 || ikMode2 == 14)
  15862. {
  15863. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15864. mLight[i].Update();
  15865. }
  15866. if (ikMode2 == 13)
  15867. {
  15868. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15869. mLight[i].Update();
  15870. }
  15871. if (ikMode2 == 13)
  15872. {
  15873. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15874. {
  15875. mLight[i].ido = 15;
  15876. mLight[i].reset = true;
  15877. }
  15878. else
  15879. {
  15880. if (lightList[i].transform.localScale.x == 1f)
  15881. {
  15882. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15883. }
  15884. lightRange[i] = lightList[i].transform.localScale.x;
  15885. gLight[i].transform.position = lightList[i].transform.position;
  15886. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15887. mLight[i].maid = lightList[i];
  15888. mLight[i].ido = 15;
  15889. }
  15890. }
  15891. else if (ikMode2 == 11)
  15892. {
  15893. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15894. {
  15895. mLight[i].ido = 3;
  15896. mLight[i].reset = true;
  15897. }
  15898. else
  15899. {
  15900. gLight[i].transform.position = lightList[i].transform.position;
  15901. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15902. lightX[i] = gLight[i].transform.eulerAngles.x;
  15903. lightY[i] = gLight[i].transform.eulerAngles.y;
  15904. mLight[i].maid = lightList[i];
  15905. mLight[i].ido = 3;
  15906. }
  15907. }
  15908. else if (ikMode2 == 12)
  15909. {
  15910. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15911. {
  15912. mLight[i].ido = 2;
  15913. mLight[i].reset = true;
  15914. }
  15915. else
  15916. {
  15917. gLight[i].transform.position = lightList[i].transform.position;
  15918. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15919. mLight[i].maid = lightList[i];
  15920. mLight[i].ido = 2;
  15921. }
  15922. }
  15923. else if (ikMode2 == 10)
  15924. {
  15925. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15926. {
  15927. mLight[i].ido = 1;
  15928. mLight[i].reset = true;
  15929. }
  15930. else
  15931. {
  15932. gLight[i].transform.position = lightList[i].transform.position;
  15933. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15934. mLight[i].maid = lightList[i];
  15935. mLight[i].maidArray = lightList.ToArray();
  15936. mLight[i].mArray = mLight.ToArray();
  15937. mLight[i].ido = 1;
  15938. }
  15939. }
  15940. else if (ikMode2 == 9)
  15941. {
  15942. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15943. {
  15944. mLight[i].ido = 4;
  15945. mLight[i].reset = true;
  15946. }
  15947. else
  15948. {
  15949. gLight[i].transform.position = lightList[i].transform.position;
  15950. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15951. lightX[i] = gLight[i].transform.eulerAngles.x;
  15952. lightY[i] = gLight[i].transform.eulerAngles.y;
  15953. mLight[i].maid = lightList[i];
  15954. mLight[i].ido = 4;
  15955. }
  15956. }
  15957. else if (ikMode2 == 14)
  15958. {
  15959. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15960. {
  15961. mLight[i].ido = 6;
  15962. mLight[i].reset = true;
  15963. }
  15964. else
  15965. {
  15966. gLight[i].transform.position = lightList[i].transform.position;
  15967. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15968. lightX[i] = gLight[i].transform.eulerAngles.x;
  15969. lightY[i] = gLight[i].transform.eulerAngles.y;
  15970. mLight[i].maid = lightList[i];
  15971. mLight[i].ido = 6;
  15972. }
  15973. }
  15974. }
  15975. }
  15976. }
  15977. for (i = 0; i < doguBObject.Count; i++)
  15978. {
  15979. if (!isCube2)
  15980. {
  15981. gDogu[i].GetComponent<Renderer>().enabled = false;
  15982. gDogu[i].SetActive(false);
  15983. }
  15984. else
  15985. {
  15986. if (ikMode2 > 0)
  15987. {
  15988. gDogu[i].GetComponent<Renderer>().enabled = true;
  15989. gDogu[i].SetActive(true);
  15990. }
  15991. else
  15992. {
  15993. gDogu[i].GetComponent<Renderer>().enabled = false;
  15994. gDogu[i].SetActive(false);
  15995. mDogu[i].isAlt = false;
  15996. }
  15997. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15998. {
  15999. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  16000. if (mDogu[i].isAlt)
  16001. {
  16002. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16003. }
  16004. }
  16005. if (ikMode2 == 9 || ikMode2 == 14)
  16006. {
  16007. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16008. mDogu[i].Update();
  16009. }
  16010. if (ikMode2 == 15)
  16011. {
  16012. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16013. }
  16014. if (ikMode2 == 13)
  16015. {
  16016. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16017. mDogu[i].Update();
  16018. }
  16019. if (ikMode2 == 13)
  16020. {
  16021. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16022. {
  16023. mDogu[i].ido = 5;
  16024. mDogu[i].reset = true;
  16025. }
  16026. else
  16027. {
  16028. gDogu[i].transform.position = doguBObject[i].transform.position;
  16029. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16030. mDogu[i].maid = doguBObject[i];
  16031. mDogu[i].ido = 5;
  16032. }
  16033. }
  16034. else if (ikMode2 == 11)
  16035. {
  16036. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16037. {
  16038. mDogu[i].ido = 3;
  16039. mDogu[i].reset = true;
  16040. }
  16041. else
  16042. {
  16043. gDogu[i].transform.position = doguBObject[i].transform.position;
  16044. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16045. mDogu[i].maid = doguBObject[i];
  16046. mDogu[i].ido = 3;
  16047. }
  16048. }
  16049. else if (ikMode2 == 12)
  16050. {
  16051. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16052. {
  16053. mDogu[i].ido = 2;
  16054. mDogu[i].reset = true;
  16055. }
  16056. else
  16057. {
  16058. gDogu[i].transform.position = doguBObject[i].transform.position;
  16059. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16060. mDogu[i].maid = doguBObject[i];
  16061. mDogu[i].ido = 2;
  16062. }
  16063. }
  16064. else if (ikMode2 == 10)
  16065. {
  16066. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16067. {
  16068. mDogu[i].ido = 1;
  16069. mDogu[i].reset = true;
  16070. }
  16071. else
  16072. {
  16073. gDogu[i].transform.position = doguBObject[i].transform.position;
  16074. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16075. mDogu[i].maid = doguBObject[i];
  16076. mDogu[i].maidArray = doguBObject.ToArray();
  16077. mDogu[i].mArray = mDogu.ToArray();
  16078. mDogu[i].ido = 1;
  16079. }
  16080. }
  16081. else if (ikMode2 == 9)
  16082. {
  16083. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16084. {
  16085. mDogu[i].ido = 4;
  16086. mDogu[i].reset = true;
  16087. }
  16088. else
  16089. {
  16090. gDogu[i].transform.position = doguBObject[i].transform.position;
  16091. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16092. mDogu[i].maid = doguBObject[i];
  16093. mDogu[i].ido = 4;
  16094. }
  16095. }
  16096. else if (ikMode2 == 14)
  16097. {
  16098. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16099. {
  16100. mDogu[i].ido = 6;
  16101. mDogu[i].reset = true;
  16102. }
  16103. else
  16104. {
  16105. gDogu[i].transform.position = doguBObject[i].transform.position;
  16106. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16107. mDogu[i].maid = doguBObject[i];
  16108. mDogu[i].ido = 6;
  16109. }
  16110. }
  16111. else if (ikMode2 == 15)
  16112. {
  16113. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16114. {
  16115. mDogu[i].ido = 7;
  16116. mDogu[i].reset = true;
  16117. }
  16118. else
  16119. {
  16120. gDogu[i].transform.position = doguBObject[i].transform.position;
  16121. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16122. mDogu[i].maid = doguBObject[i];
  16123. mDogu[i].ido = 7;
  16124. }
  16125. }
  16126. }
  16127. }
  16128. ikModeOld2 = ikMode2;
  16129. }
  16130. if (isVR)
  16131. {
  16132. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16133. {
  16134. if (!isVR2)
  16135. {
  16136. isVR2 = true;
  16137. Preferences["config"]["shift_f8"].Value = "true";
  16138. SaveConfig();
  16139. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16140. }
  16141. else
  16142. {
  16143. isVR2 = false;
  16144. Preferences["config"]["shift_f8"].Value = "false";
  16145. SaveConfig();
  16146. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16147. }
  16148. }
  16149. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16150. {
  16151. loadScene = 1;
  16152. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16153. }
  16154. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16155. {
  16156. loadScene = 2;
  16157. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16158. }
  16159. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16160. {
  16161. loadScene = 3;
  16162. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16163. }
  16164. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16165. {
  16166. loadScene = 4;
  16167. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16168. }
  16169. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16170. {
  16171. loadScene = 5;
  16172. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16173. }
  16174. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16175. {
  16176. loadScene = 6;
  16177. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16178. }
  16179. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16180. {
  16181. loadScene = 7;
  16182. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16183. }
  16184. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16185. {
  16186. loadScene = 8;
  16187. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16188. }
  16189. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16190. {
  16191. loadScene = 9;
  16192. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16193. }
  16194. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16195. {
  16196. loadScene = 10;
  16197. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16198. }
  16199. for (int j = 0; j < 7; j++)
  16200. {
  16201. if (!maidArray[j])
  16202. {
  16203. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16204. }
  16205. }
  16206. }
  16207. }
  16208. }
  16209. }
  16210. }