MultipleMaids.MaidUpdate.cs 921 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. if (lightList.Count == 0)
  661. {
  662. float num2 = 2f;
  663. if (Application.unityVersion.StartsWith("4"))
  664. {
  665. num2 = 1f;
  666. }
  667. GameObject gameObject3 = new GameObject("Light");
  668. gameObject3.AddComponent<Light>();
  669. lightList.Add(gameObject3);
  670. lightColorR.Add(1f);
  671. lightColorG.Add(1f);
  672. lightColorB.Add(1f);
  673. lightIndex.Add(0);
  674. lightX.Add(40f);
  675. lightY.Add(180f);
  676. lightAkarusa.Add(num2);
  677. lightKage.Add(0.098f);
  678. lightRange.Add(50f);
  679. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  680. gameObject3.GetComponent<Light>().intensity = num2;
  681. gameObject3.GetComponent<Light>().spotAngle = 50f;
  682. gameObject3.GetComponent<Light>().range = 10f;
  683. gameObject3.GetComponent<Light>().type = LightType.Directional;
  684. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  685. gameObject3.GetComponent<Light>().cullingMask = 256;
  686. // lightComboList = new GUIContent[lightList.Count];
  687. // lightComboList[0] = new GUIContent("メイン");
  688. // lightCombo.selectedItemIndex = 0;
  689. // selectLightIndex = 0;
  690. }
  691. }
  692. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  693. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  694. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  695. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  696. {
  697. float axis = Input.GetAxis("Mouse ScrollWheel");
  698. if (axis > 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  701. if (mainCamera.GetDistance() < 0.1f)
  702. {
  703. mainCamera.SetDistance(0.1f, true);
  704. }
  705. }
  706. else if (axis < 0f)
  707. {
  708. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  709. if (mainCamera.GetDistance() > 25f)
  710. {
  711. mainCamera.SetDistance(25f, true);
  712. }
  713. }
  714. }
  715. for (int j = 0; j < maxMaidCnt; j++)
  716. {
  717. if (maidArray[j] && maidArray[j].Visible)
  718. {
  719. maidCnt++;
  720. }
  721. }
  722. if (maidArray[0] != null && maidArray[0].Visible)
  723. {
  724. if (getModKeyPressing(modKey.Shift))
  725. {
  726. speed = 5f * Time.deltaTime * 60f;
  727. }
  728. else
  729. {
  730. speed = 1f * Time.deltaTime * 60f;
  731. }
  732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  735. if (!isVR || isVR2)
  736. {
  737. if (!isVR)
  738. {
  739. if (isBloom)
  740. {
  741. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  742. fieldValue2.enabled = true;
  743. fieldValue2.bloomIntensity = bloom1;
  744. fieldValue2.bloomBlurIterations = (int)bloom2;
  745. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  746. if (isBloomA)
  747. {
  748. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  749. }
  750. else
  751. {
  752. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  753. }
  754. isBloom2 = true;
  755. }
  756. else if (isBloom2)
  757. {
  758. isBloom2 = false;
  759. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  760. fieldValue2.enabled = true;
  761. fieldValue2.bloomIntensity = 2.85f;
  762. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  763. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  764. fieldValue2.bloomBlurIterations = 3;
  765. }
  766. if (isDepth)
  767. {
  768. depth_field_.enabled = true;
  769. depth_field_.focalLength = depth1;
  770. depth_field_.focalSize = depth2;
  771. depth_field_.aperture = depth3;
  772. depth_field_.maxBlurSize = depth4;
  773. if (isDepthA)
  774. {
  775. depth_field_.visualizeFocus = true;
  776. }
  777. else
  778. {
  779. depth_field_.visualizeFocus = false;
  780. }
  781. }
  782. else
  783. {
  784. if (depth_field_ == null)
  785. {
  786. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  787. if (depth_field_.dofHdrShader == null)
  788. {
  789. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  790. }
  791. if (depth_field_.dx11BokehShader == null)
  792. {
  793. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  794. }
  795. if (depth_field_.dx11BokehTexture == null)
  796. {
  797. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  798. }
  799. }
  800. depth_field_.enabled = false;
  801. }
  802. if (isFog)
  803. {
  804. if (fog_.fogShader == null)
  805. {
  806. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  807. }
  808. fog_.enabled = true;
  809. fog_.startDistance = fog1;
  810. fog_.globalDensity = fog2;
  811. fog_.heightScale = fog3;
  812. fog_.height = fog4;
  813. fog_.globalFogColor.r = fog5;
  814. fog_.globalFogColor.g = fog6;
  815. fog_.globalFogColor.b = fog7;
  816. }
  817. else
  818. {
  819. if (fog_ == null)
  820. {
  821. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  822. }
  823. fog_.enabled = false;
  824. }
  825. if (isSepia != isSepian)
  826. {
  827. isSepia = isSepian;
  828. if (isSepia)
  829. {
  830. if (sepia_tone_.shader == null)
  831. {
  832. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  833. }
  834. sepia_tone_.enabled = true;
  835. }
  836. else
  837. {
  838. if (sepia_tone_ == null)
  839. {
  840. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  841. }
  842. sepia_tone_.enabled = false;
  843. }
  844. }
  845. if (bokashi > 0f)
  846. {
  847. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  848. component.enabled = true;
  849. component.blurSize = bokashi / 10f;
  850. component.blurIterations = 0;
  851. component.downsample = 0;
  852. if (bokashi > 3f)
  853. {
  854. component.blurSize -= 0.3f;
  855. component.blurIterations = 1;
  856. component.downsample = 1;
  857. }
  858. }
  859. else
  860. {
  861. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  862. component.enabled = false;
  863. }
  864. if (kamiyure > 0f)
  865. {
  866. for (int j = 0; j < maidCnt; j++)
  867. {
  868. Maid maid = maidArray[j];
  869. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  870. {
  871. if (maid.body0.goSlot[l].obj != null)
  872. {
  873. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  874. if (component2 != null && component2.enabled)
  875. {
  876. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  877. }
  878. }
  879. List<THair1> fieldValue3 =
  880. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  881. for (int k = 0; k < fieldValue3.Count; k++)
  882. {
  883. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  884. }
  885. }
  886. }
  887. }
  888. if (isBlur)
  889. {
  890. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  891. component3.mode = Vignetting.AberrationMode.Simple;
  892. component3.intensity = blur1;
  893. component3.chromaticAberration = blur4;
  894. component3.blur = blur2;
  895. component3.blurSpread = blur3;
  896. component3.enabled = true;
  897. isBlur2 = true;
  898. }
  899. else if (isBlur2)
  900. {
  901. isBlur2 = false;
  902. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  903. component3.mode = Vignetting.AberrationMode.Simple;
  904. component3.intensity = -3.98f;
  905. component3.chromaticAberration = -0.75f;
  906. component3.axialAberration = 1.18f;
  907. component3.blurSpread = 4.19f;
  908. component3.luminanceDependency = 0.494f;
  909. component3.blurDistance = 1.71f;
  910. component3.enabled = false;
  911. }
  912. }
  913. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  919. {
  920. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  921. {
  922. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  923. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  924. }
  925. }
  926. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  927. {
  928. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  929. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  930. }
  931. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  932. {
  933. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  934. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  937. {
  938. GameMain.Instance.MainLight.Reset();
  939. GameMain.Instance.MainLight.SetIntensity(0.95f);
  940. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  941. lightIndex[0] = 0;
  942. lightColorR[0] = 1f;
  943. lightColorG[0] = 1f;
  944. lightColorB[0] = 1f;
  945. lightX[0] = 40f;
  946. lightY[0] = 180f;
  947. lightAkarusa[0] = 0.95f;
  948. lightKage[0] = 0.098f;
  949. lightRange[0] = 50f;
  950. bgObject.SetActive(true);
  951. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  952. isIdx1 = false;
  953. isIdx2 = false;
  954. isIdx3 = false;
  955. isIdx4 = false;
  956. }
  957. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  958. {
  959. List<float> list;
  960. (list = lightColorR)[0] = list[0] + 0.01f;
  961. if (lightColorR[0] > 1f)
  962. {
  963. lightColorR[0] = 1f;
  964. }
  965. if (lightIndex[0] != 3)
  966. {
  967. GameMain.Instance.MainLight.GetComponent<Light>().color =
  968. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  969. }
  970. else
  971. {
  972. mainCamera.GetComponent<Camera>().backgroundColor =
  973. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  974. }
  975. }
  976. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  977. {
  978. List<float> list;
  979. (list = lightColorG)[0] = list[0] + 0.01f;
  980. if (lightColorG[0] > 1f)
  981. {
  982. lightColorG[0] = 1f;
  983. }
  984. if (lightIndex[0] != 3)
  985. {
  986. GameMain.Instance.MainLight.GetComponent<Light>().color =
  987. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  988. }
  989. else
  990. {
  991. mainCamera.GetComponent<Camera>().backgroundColor =
  992. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  993. }
  994. }
  995. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  996. {
  997. List<float> list;
  998. (list = lightColorB)[0] = list[0] + 0.01f;
  999. if (lightColorB[0] > 1f)
  1000. {
  1001. lightColorB[0] = 1f;
  1002. }
  1003. if (lightIndex[0] != 3)
  1004. {
  1005. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1006. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1007. }
  1008. else
  1009. {
  1010. mainCamera.GetComponent<Camera>().backgroundColor =
  1011. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1012. }
  1013. }
  1014. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1015. {
  1016. List<float> list;
  1017. (list = lightColorR)[0] = list[0] - 0.01f;
  1018. if (lightColorR[0] < 0f)
  1019. {
  1020. lightColorR[0] = 0f;
  1021. }
  1022. if (lightIndex[0] != 3)
  1023. {
  1024. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1025. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1026. }
  1027. else
  1028. {
  1029. mainCamera.GetComponent<Camera>().backgroundColor =
  1030. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1031. }
  1032. }
  1033. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1034. {
  1035. List<float> list;
  1036. (list = lightColorG)[0] = list[0] - 0.01f;
  1037. if (lightColorG[0] < 0f)
  1038. {
  1039. lightColorG[0] = 0f;
  1040. }
  1041. if (lightIndex[0] != 3)
  1042. {
  1043. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1044. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1045. }
  1046. else
  1047. {
  1048. mainCamera.GetComponent<Camera>().backgroundColor =
  1049. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1050. }
  1051. }
  1052. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1053. {
  1054. List<float> list;
  1055. (list = lightColorB)[0] = list[0] - 0.01f;
  1056. if (lightColorB[0] < 0f)
  1057. {
  1058. lightColorB[0] = 0f;
  1059. }
  1060. if (lightIndex[0] != 3)
  1061. {
  1062. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1063. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1064. }
  1065. else
  1066. {
  1067. mainCamera.GetComponent<Camera>().backgroundColor =
  1068. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1069. }
  1070. }
  1071. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1072. {
  1073. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1074. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1075. }
  1076. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1077. {
  1078. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1079. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1080. }
  1081. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1084. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1085. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1086. }
  1087. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1088. {
  1089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1090. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1091. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1092. }
  1093. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1094. {
  1095. List<int> list2;
  1096. (list2 = lightIndex)[0] = list2[0] + 1;
  1097. if (lightIndex[0] == 4)
  1098. {
  1099. lightIndex[0] = 0;
  1100. }
  1101. lightColorR[0] = 1f;
  1102. lightColorG[0] = 1f;
  1103. lightColorB[0] = 1f;
  1104. lightX[0] = 40f;
  1105. lightY[0] = 180f;
  1106. lightAkarusa[0] = 0.95f;
  1107. lightKage[0] = 0.098f;
  1108. lightRange[0] = 50f;
  1109. GameMain.Instance.MainLight.Reset();
  1110. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1111. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1112. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1113. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1114. if (lightIndex[0] == 0)
  1115. {
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1117. bgObject.SetActive(true);
  1118. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1119. }
  1120. else if (lightIndex[0] == 1)
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1123. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1125. }
  1126. else if (lightIndex[0] == 2)
  1127. {
  1128. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1129. }
  1130. else if (lightIndex[0] == 3)
  1131. {
  1132. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1133. mainCamera.GetComponent<Camera>().backgroundColor =
  1134. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1135. bgObject.SetActive(false);
  1136. }
  1137. isIdx1 = false;
  1138. isIdx2 = false;
  1139. isIdx3 = false;
  1140. isIdx4 = false;
  1141. }
  1142. }
  1143. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1144. {
  1145. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1148. {
  1149. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1150. {
  1151. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1152. }
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1155. {
  1156. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1159. {
  1160. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1163. {
  1164. GameMain.Instance.MainLight.Reset();
  1165. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1168. {
  1169. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1170. }
  1171. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1172. {
  1173. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1174. }
  1175. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1176. {
  1177. if (lightIndex[0] == 1)
  1178. {
  1179. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1180. }
  1181. else
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1184. }
  1185. }
  1186. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1187. {
  1188. if (lightIndex[0] == 1)
  1189. {
  1190. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1191. }
  1192. else
  1193. {
  1194. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1195. }
  1196. }
  1197. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1198. {
  1199. List<int> list2;
  1200. (list2 = lightIndex)[0] = list2[0] + 1;
  1201. if (lightIndex[0] == 3)
  1202. {
  1203. lightIndex[0] = 0;
  1204. }
  1205. GameMain.Instance.MainLight.Reset();
  1206. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1208. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1209. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1210. if (lightIndex[0] == 0)
  1211. {
  1212. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1213. }
  1214. else if (lightIndex[0] == 1)
  1215. {
  1216. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1217. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1218. }
  1219. else if (lightIndex[0] == 2)
  1220. {
  1221. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1222. }
  1223. }
  1224. int i;
  1225. for (i = 0; i < lightList.Count; i++)
  1226. {
  1227. if (i > 0)
  1228. {
  1229. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1230. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1231. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1232. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1233. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1234. {
  1235. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1236. }
  1237. }
  1238. else
  1239. {
  1240. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1241. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1242. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1243. {
  1244. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1245. }
  1246. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1247. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1248. if (lightIndex[i] != 3)
  1249. {
  1250. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1251. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1252. }
  1253. else
  1254. {
  1255. mainCamera.GetComponent<Camera>().backgroundColor =
  1256. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1257. }
  1258. }
  1259. }
  1260. bool flag3 = false;
  1261. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1262. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1263. {
  1264. for (i = 0; i < maidCnt; i++)
  1265. {
  1266. if (goSlot[(int)selectList[i]] != null)
  1267. {
  1268. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1269. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1270. {
  1271. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1272. }
  1273. }
  1274. }
  1275. }
  1276. for (int j = 0; j < maidCnt; j++)
  1277. {
  1278. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1279. {
  1280. bool flag4 = shodaiFlg[(int)selectList[j]];
  1281. shodaiFlg[(int)selectList[j]] = false;
  1282. try
  1283. {
  1284. TMorph morph = maidArray[j].body0.Face.morph;
  1285. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1286. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1287. }
  1288. catch
  1289. {
  1290. shodaiFlg[(int)selectList[j]] = true;
  1291. }
  1292. if (shodaiFlg[(int)selectList[j]] != flag4)
  1293. {
  1294. if (!isVR)
  1295. {
  1296. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1297. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1298. }
  1299. }
  1300. }
  1301. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1302. {
  1303. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1304. }
  1305. if (sceneLevel == 5)
  1306. {
  1307. if (editSelectMaid == maidArray[j])
  1308. {
  1309. flag3 = true;
  1310. }
  1311. }
  1312. Maid maid = maidArray[j];
  1313. }
  1314. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1315. {
  1316. isEditNo = 0;
  1317. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1318. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1319. }
  1320. i = 0;
  1321. while (i < maidCnt)
  1322. {
  1323. Transform transform = maidArray[i].transform;
  1324. Maid maid = maidArray[i];
  1325. if (cafeFlg[i])
  1326. {
  1327. cafeCount[i]++;
  1328. if (cafeCount[i] > 1)
  1329. {
  1330. maid.DelProp(MPN.handitem, true);
  1331. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1332. maid.AllProcPropSeqStart();
  1333. cafeFlg[i] = false;
  1334. cafeCount[i] = 0;
  1335. }
  1336. }
  1337. KeyCode key;
  1338. if (i >= 14)
  1339. {
  1340. bool flag5 = false;
  1341. bool flag6 = false;
  1342. for (int k = 0; k < keyArray.Length; k++)
  1343. {
  1344. if (Input.GetKey(keyArray[k]))
  1345. {
  1346. flag5 = true;
  1347. break;
  1348. }
  1349. if (Input.GetKeyUp(keyArray[k]))
  1350. {
  1351. flag6 = true;
  1352. break;
  1353. }
  1354. }
  1355. key = keyArray[6];
  1356. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1357. {
  1358. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1359. {
  1360. goto IL_49FE;
  1361. }
  1362. idoFlg[i - 7] = false;
  1363. }
  1364. }
  1365. else if (i >= 7)
  1366. {
  1367. bool flag5 = false;
  1368. bool flag6 = false;
  1369. for (int k = 0; k < keyArray.Length; k++)
  1370. {
  1371. if (Input.GetKey(keyArray[k]))
  1372. {
  1373. flag5 = true;
  1374. break;
  1375. }
  1376. if (Input.GetKeyUp(keyArray[k]))
  1377. {
  1378. flag6 = true;
  1379. break;
  1380. }
  1381. }
  1382. key = keyArray[i - 7];
  1383. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1384. {
  1385. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1386. {
  1387. goto IL_49FE;
  1388. }
  1389. idoFlg[i - 7] = false;
  1390. }
  1391. }
  1392. else
  1393. {
  1394. bool flag5 = false;
  1395. for (int k = 0; k < keyArray.Length; k++)
  1396. {
  1397. if (Input.GetKey(keyArray[k]))
  1398. {
  1399. flag5 = true;
  1400. break;
  1401. }
  1402. }
  1403. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1404. {
  1405. key = keyArray[i];
  1406. goto IL_49FE;
  1407. }
  1408. }
  1409. IL_1688E:
  1410. i++;
  1411. continue;
  1412. IL_49FE:
  1413. if (xFlg[i])
  1414. {
  1415. if (!maid.AudioMan.audiosource.isPlaying)
  1416. {
  1417. if (maid.status.personal.uniqueName == "Pride")
  1418. {
  1419. string text = "s0_";
  1420. Random random = new Random();
  1421. int num4 = random.Next(10000);
  1422. bool flag7 = false;
  1423. for (int k = 0; k < tunArray.Length; k++)
  1424. {
  1425. if (tunArray[k] == num4)
  1426. {
  1427. flag7 = true;
  1428. break;
  1429. }
  1430. }
  1431. if (!flag7)
  1432. {
  1433. text = text + "0" + num4.ToString() + ".ogg";
  1434. if (GameUty.FileSystem.IsExistentFile(text))
  1435. {
  1436. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1437. }
  1438. }
  1439. }
  1440. if (maid.status.personal.uniqueName == "Cool")
  1441. {
  1442. string text = "s1_";
  1443. Random random = new Random();
  1444. int num4 = random.Next(10000);
  1445. bool flag7 = false;
  1446. for (int k = 0; k < coolArray.Length; k++)
  1447. {
  1448. if (coolArray[k] == num4)
  1449. {
  1450. flag7 = true;
  1451. break;
  1452. }
  1453. }
  1454. if (!flag7)
  1455. {
  1456. text = text + "0" + num4.ToString() + ".ogg";
  1457. if (GameUty.FileSystem.IsExistentFile(text))
  1458. {
  1459. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1460. }
  1461. }
  1462. }
  1463. if (maid.status.personal.uniqueName == "Pure")
  1464. {
  1465. string text = "s2_";
  1466. Random random = new Random();
  1467. int num4 = random.Next(10000);
  1468. bool flag7 = false;
  1469. for (int k = 0; k < pureArray.Length; k++)
  1470. {
  1471. if (pureArray[k] == num4)
  1472. {
  1473. flag7 = true;
  1474. break;
  1475. }
  1476. }
  1477. if (!flag7)
  1478. {
  1479. text = text + "0" + num4.ToString() + ".ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(text))
  1481. {
  1482. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1483. }
  1484. }
  1485. }
  1486. if (maid.status.personal.uniqueName == "Yandere")
  1487. {
  1488. string text = "s3_";
  1489. Random random = new Random();
  1490. int num4 = random.Next(10000);
  1491. bool flag7 = false;
  1492. for (int k = 0; k < yanArray.Length; k++)
  1493. {
  1494. if (yanArray[k] == num4)
  1495. {
  1496. flag7 = true;
  1497. break;
  1498. }
  1499. }
  1500. if (!flag7)
  1501. {
  1502. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1503. if (GameUty.FileSystem.IsExistentFile(text))
  1504. {
  1505. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1506. }
  1507. }
  1508. }
  1509. if (maid.status.personal.uniqueName == "Muku")
  1510. {
  1511. string text = "h0_";
  1512. Random random = new Random();
  1513. int num4 = random.Next(10000);
  1514. bool flag7 = false;
  1515. for (int k = 0; k < h0Array.Length; k++)
  1516. {
  1517. if (h0Array[k] == num4)
  1518. {
  1519. flag7 = true;
  1520. break;
  1521. }
  1522. }
  1523. if (flag7)
  1524. {
  1525. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1526. if (GameUty.FileSystem.IsExistentFile(text))
  1527. {
  1528. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1529. }
  1530. }
  1531. }
  1532. if (maid.status.personal.uniqueName == "Majime")
  1533. {
  1534. string text = "h1_";
  1535. Random random = new Random();
  1536. int num4 = random.Next(10000);
  1537. bool flag7 = false;
  1538. for (int k = 0; k < h1Array.Length; k++)
  1539. {
  1540. if (h1Array[k] == num4)
  1541. {
  1542. flag7 = true;
  1543. break;
  1544. }
  1545. }
  1546. if (flag7)
  1547. {
  1548. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1549. if (GameUty.FileSystem.IsExistentFile(text))
  1550. {
  1551. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1552. }
  1553. }
  1554. }
  1555. if (maid.status.personal.uniqueName == "Rindere")
  1556. {
  1557. string text = "h2_";
  1558. Random random = new Random();
  1559. int num4 = random.Next(10000);
  1560. bool flag7 = false;
  1561. for (int k = 0; k < h2Array.Length; k++)
  1562. {
  1563. if (h2Array[k] == num4)
  1564. {
  1565. flag7 = true;
  1566. break;
  1567. }
  1568. }
  1569. if (flag7)
  1570. {
  1571. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1572. if (GameUty.FileSystem.IsExistentFile(text))
  1573. {
  1574. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. if (zFlg[i])
  1581. {
  1582. if (!maid.AudioMan.audiosource.isPlaying)
  1583. {
  1584. string text = "";
  1585. if (maid.status.personal.uniqueName == "Pride")
  1586. {
  1587. text = "s0_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(tunArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Cool")
  1594. {
  1595. text = "s1_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(coolArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Pure")
  1602. {
  1603. text = "s2_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(pureArray.Length);
  1606. object obj = text;
  1607. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1608. }
  1609. if (maid.status.personal.uniqueName == "Yandere")
  1610. {
  1611. text = "s3_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(yanArray.Length);
  1614. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Muku")
  1617. {
  1618. text = "h0_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h0tArray.Length);
  1621. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Majime")
  1624. {
  1625. text = "h1_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h1tArray.Length);
  1628. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1629. }
  1630. if (maid.status.personal.uniqueName == "Rindere")
  1631. {
  1632. text = "h2_";
  1633. Random random = new Random();
  1634. int num4 = random.Next(h2tArray.Length);
  1635. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1636. }
  1637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1638. }
  1639. }
  1640. if (!isVR || isVR2)
  1641. {
  1642. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 1;
  1647. ikMode[i] = 0;
  1648. SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. qFlg = true;
  1660. }
  1661. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1662. {
  1663. ikMaid = i;
  1664. isIK[i] = true;
  1665. ikBui = 2;
  1666. ikMode[i] = 0;
  1667. SetIK(maid, i);
  1668. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1669. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1670. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1671. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1672. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1673. idoFlg[i] = true;
  1674. if (i >= 7)
  1675. {
  1676. idoFlg[i - 7] = true;
  1677. }
  1678. }
  1679. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1680. {
  1681. ikMaid = i;
  1682. isIK[i] = true;
  1683. ikBui = 3;
  1684. ikMode[i] = 0;
  1685. SetIK(maid, i);
  1686. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1687. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1688. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1689. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1690. idoFlg[i] = true;
  1691. if (i >= 7)
  1692. {
  1693. idoFlg[i - 7] = true;
  1694. }
  1695. }
  1696. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1697. {
  1698. ikMaid = i;
  1699. isIK[i] = true;
  1700. ikBui = 4;
  1701. ikMode[i] = 0;
  1702. SetIK(maid, i);
  1703. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1704. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1705. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1706. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1707. idoFlg[i] = true;
  1708. if (i >= 7)
  1709. {
  1710. idoFlg[i - 7] = true;
  1711. }
  1712. sFlg = true;
  1713. }
  1714. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1715. {
  1716. maid.body0.transform.localRotation =
  1717. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1718. if (i >= 7)
  1719. {
  1720. idoFlg[i - 7] = true;
  1721. }
  1722. idoFlg[i] = true;
  1723. }
  1724. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1725. {
  1726. maid.body0.transform.localRotation =
  1727. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1728. if (i >= 7)
  1729. {
  1730. idoFlg[i - 7] = true;
  1731. }
  1732. idoFlg[i] = true;
  1733. }
  1734. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1735. {
  1736. bGui = true;
  1737. isPoseInit = true;
  1738. isGuiInit = true;
  1739. poseFlg = true;
  1740. faceFlg = false;
  1741. // sceneFlg = false;
  1742. kankyoFlg = false;
  1743. kankyo2Flg = false;
  1744. fFlg = true;
  1745. for (int k = 0; k < maidCnt; k++)
  1746. {
  1747. if (maid == maidArray[k])
  1748. {
  1749. selectMaidIndex = k;
  1750. }
  1751. }
  1752. copyIndex = 0;
  1753. if (i >= 7)
  1754. {
  1755. idoFlg[i - 7] = true;
  1756. }
  1757. idoFlg[i] = true;
  1758. }
  1759. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1760. {
  1761. bGui = true;
  1762. isFaceInit = true;
  1763. isGuiInit = true;
  1764. faceFlg = true;
  1765. poseFlg = false;
  1766. // sceneFlg = false;
  1767. kankyoFlg = false;
  1768. kankyo2Flg = false;
  1769. maid.boMabataki = false;
  1770. for (int k = 0; k < maidCnt; k++)
  1771. {
  1772. if (maid == maidArray[k])
  1773. {
  1774. selectMaidIndex = k;
  1775. }
  1776. }
  1777. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1778. if (i >= 7)
  1779. {
  1780. idoFlg[i - 7] = true;
  1781. }
  1782. idoFlg[i] = true;
  1783. }
  1784. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1785. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1786. {
  1787. if (!xFlg[i])
  1788. {
  1789. xFlg[i] = true;
  1790. zFlg[i] = false;
  1791. if (maid.status.personal.uniqueName == "Pride")
  1792. {
  1793. string text = "s0_";
  1794. Random random = new Random();
  1795. int num4 = random.Next(10000);
  1796. bool flag7 = false;
  1797. for (int k = 0; k < tunArray.Length; k++)
  1798. {
  1799. if (tunArray[k] == num4)
  1800. {
  1801. flag7 = true;
  1802. break;
  1803. }
  1804. }
  1805. if (!flag7)
  1806. {
  1807. text = text + "0" + num4.ToString() + ".ogg";
  1808. if (GameUty.FileSystem.IsExistentFile(text))
  1809. {
  1810. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1811. }
  1812. }
  1813. }
  1814. if (maid.status.personal.uniqueName == "Cool")
  1815. {
  1816. string text = "s1_";
  1817. Random random = new Random();
  1818. int num4 = random.Next(10000);
  1819. bool flag7 = false;
  1820. for (int k = 0; k < coolArray.Length; k++)
  1821. {
  1822. if (coolArray[k] == num4)
  1823. {
  1824. flag7 = true;
  1825. break;
  1826. }
  1827. }
  1828. if (!flag7)
  1829. {
  1830. text = text + "0" + num4.ToString() + ".ogg";
  1831. if (GameUty.FileSystem.IsExistentFile(text))
  1832. {
  1833. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1834. }
  1835. }
  1836. }
  1837. if (maid.status.personal.uniqueName == "Pure")
  1838. {
  1839. string text = "s2_";
  1840. Random random = new Random();
  1841. int num4 = random.Next(10000);
  1842. bool flag7 = false;
  1843. for (int k = 0; k < pureArray.Length; k++)
  1844. {
  1845. if (pureArray[k] == num4)
  1846. {
  1847. flag7 = true;
  1848. break;
  1849. }
  1850. }
  1851. if (!flag7)
  1852. {
  1853. text = text + "0" + num4.ToString() + ".ogg";
  1854. if (GameUty.FileSystem.IsExistentFile(text))
  1855. {
  1856. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1857. }
  1858. }
  1859. }
  1860. if (maid.status.personal.uniqueName == "Yandere")
  1861. {
  1862. string text = "s3_";
  1863. Random random = new Random();
  1864. int num4 = random.Next(10000);
  1865. bool flag7 = false;
  1866. for (int k = 0; k < yanArray.Length; k++)
  1867. {
  1868. if (yanArray[k] == num4)
  1869. {
  1870. flag7 = true;
  1871. break;
  1872. }
  1873. }
  1874. if (!flag7)
  1875. {
  1876. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1877. if (GameUty.FileSystem.IsExistentFile(text))
  1878. {
  1879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1880. }
  1881. }
  1882. }
  1883. if (maid.status.personal.uniqueName == "Muku")
  1884. {
  1885. string text = "h0_";
  1886. Random random = new Random();
  1887. int num4 = random.Next(10000);
  1888. bool flag7 = false;
  1889. for (int k = 0; k < h0Array.Length; k++)
  1890. {
  1891. if (h0Array[k] == num4)
  1892. {
  1893. flag7 = true;
  1894. break;
  1895. }
  1896. }
  1897. if (flag7)
  1898. {
  1899. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1900. if (GameUty.FileSystem.IsExistentFile(text))
  1901. {
  1902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1903. }
  1904. }
  1905. }
  1906. if (maid.status.personal.uniqueName == "Majime")
  1907. {
  1908. string text = "h1_";
  1909. Random random = new Random();
  1910. int num4 = random.Next(10000);
  1911. bool flag7 = false;
  1912. for (int k = 0; k < h1Array.Length; k++)
  1913. {
  1914. if (h1Array[k] == num4)
  1915. {
  1916. flag7 = true;
  1917. break;
  1918. }
  1919. }
  1920. if (flag7)
  1921. {
  1922. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1923. if (GameUty.FileSystem.IsExistentFile(text))
  1924. {
  1925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1926. }
  1927. }
  1928. }
  1929. if (maid.status.personal.uniqueName == "Rindere")
  1930. {
  1931. string text = "h2_";
  1932. Random random = new Random();
  1933. int num4 = random.Next(10000);
  1934. bool flag7 = false;
  1935. for (int k = 0; k < h2Array.Length; k++)
  1936. {
  1937. if (h2Array[k] == num4)
  1938. {
  1939. flag7 = true;
  1940. break;
  1941. }
  1942. }
  1943. if (flag7)
  1944. {
  1945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1946. if (GameUty.FileSystem.IsExistentFile(text))
  1947. {
  1948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. else
  1954. {
  1955. xFlg[i] = false;
  1956. maid.AudioMan.Clear();
  1957. }
  1958. idoFlg[i] = true;
  1959. if (i >= 7)
  1960. {
  1961. idoFlg[i - 7] = true;
  1962. }
  1963. }
  1964. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1965. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1966. {
  1967. if (!zFlg[i])
  1968. {
  1969. zFlg[i] = true;
  1970. xFlg[i] = false;
  1971. string text = "";
  1972. if (maid.status.personal.uniqueName == "Pride")
  1973. {
  1974. text = "s0_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(tunArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Cool")
  1981. {
  1982. text = "s1_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(coolArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Pure")
  1989. {
  1990. text = "s2_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(pureArray.Length);
  1993. object obj = text;
  1994. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1995. }
  1996. if (maid.status.personal.uniqueName == "Yandere")
  1997. {
  1998. text = "s3_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(yanArray.Length);
  2001. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Muku")
  2004. {
  2005. text = "h0_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h0tArray.Length);
  2008. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Majime")
  2011. {
  2012. text = "h1_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h1tArray.Length);
  2015. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2016. }
  2017. if (maid.status.personal.uniqueName == "Rindere")
  2018. {
  2019. text = "h2_";
  2020. Random random = new Random();
  2021. int num4 = random.Next(h2tArray.Length);
  2022. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2023. }
  2024. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2025. }
  2026. else
  2027. {
  2028. zFlg[i] = false;
  2029. maid.AudioMan.Clear();
  2030. }
  2031. idoFlg[i] = true;
  2032. if (i >= 7)
  2033. {
  2034. idoFlg[i - 7] = true;
  2035. }
  2036. }
  2037. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2038. {
  2039. string text = "";
  2040. if (maid.status.personal.uniqueName == "Pride")
  2041. {
  2042. text = "s0_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(tunArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Cool")
  2049. {
  2050. text = "s1_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(coolArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Pure")
  2057. {
  2058. text = "s2_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(pureArray.Length);
  2061. object obj = text;
  2062. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2063. }
  2064. if (maid.status.personal.uniqueName == "Yandere")
  2065. {
  2066. text = "s3_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(yanArray.Length);
  2069. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Muku")
  2072. {
  2073. text = "h0_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h0tArray.Length);
  2076. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Majime")
  2079. {
  2080. text = "h1_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h1tArray.Length);
  2083. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2084. }
  2085. if (maid.status.personal.uniqueName == "Rindere")
  2086. {
  2087. text = "h2_";
  2088. Random random = new Random();
  2089. int num4 = random.Next(h2tArray.Length);
  2090. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2091. }
  2092. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2093. idoFlg[i] = true;
  2094. if (i >= 7)
  2095. {
  2096. idoFlg[i - 7] = true;
  2097. }
  2098. }
  2099. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2100. {
  2101. if (maid.status.personal.uniqueName == "Pride")
  2102. {
  2103. string text = "s0_";
  2104. Random random = new Random();
  2105. int num4 = random.Next(10000);
  2106. bool flag7 = false;
  2107. for (int k = 0; k < tunArray.Length; k++)
  2108. {
  2109. if (tunArray[k] == num4)
  2110. {
  2111. flag7 = true;
  2112. break;
  2113. }
  2114. }
  2115. if (!flag7)
  2116. {
  2117. text = text + "0" + num4.ToString() + ".ogg";
  2118. if (GameUty.FileSystem.IsExistentFile(text))
  2119. {
  2120. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2121. }
  2122. }
  2123. }
  2124. if (maid.status.personal.uniqueName == "Cool")
  2125. {
  2126. string text = "s1_";
  2127. Random random = new Random();
  2128. int num4 = random.Next(10000);
  2129. bool flag7 = false;
  2130. for (int k = 0; k < coolArray.Length; k++)
  2131. {
  2132. if (coolArray[k] == num4)
  2133. {
  2134. flag7 = true;
  2135. break;
  2136. }
  2137. }
  2138. if (!flag7)
  2139. {
  2140. text = text + "0" + num4.ToString() + ".ogg";
  2141. if (GameUty.FileSystem.IsExistentFile(text))
  2142. {
  2143. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2144. }
  2145. }
  2146. }
  2147. if (maid.status.personal.uniqueName == "Pure")
  2148. {
  2149. string text = "s2_";
  2150. Random random = new Random();
  2151. int num4 = random.Next(10000);
  2152. bool flag7 = false;
  2153. for (int k = 0; k < pureArray.Length; k++)
  2154. {
  2155. if (pureArray[k] == num4)
  2156. {
  2157. flag7 = true;
  2158. break;
  2159. }
  2160. }
  2161. if (!flag7)
  2162. {
  2163. text = text + "0" + num4.ToString() + ".ogg";
  2164. if (GameUty.FileSystem.IsExistentFile(text))
  2165. {
  2166. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2167. }
  2168. }
  2169. }
  2170. if (maid.status.personal.uniqueName == "Yandere")
  2171. {
  2172. string text = "s3_";
  2173. Random random = new Random();
  2174. int num4 = random.Next(10000);
  2175. bool flag7 = false;
  2176. for (int k = 0; k < yanArray.Length; k++)
  2177. {
  2178. if (yanArray[k] == num4)
  2179. {
  2180. flag7 = true;
  2181. break;
  2182. }
  2183. }
  2184. if (!flag7)
  2185. {
  2186. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2187. if (GameUty.FileSystem.IsExistentFile(text))
  2188. {
  2189. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2190. }
  2191. }
  2192. }
  2193. if (maid.status.personal.uniqueName == "Muku")
  2194. {
  2195. string text = "h0_";
  2196. Random random = new Random();
  2197. int num4 = random.Next(10000);
  2198. bool flag7 = false;
  2199. for (int k = 0; k < h0Array.Length; k++)
  2200. {
  2201. if (h0Array[k] == num4)
  2202. {
  2203. flag7 = true;
  2204. break;
  2205. }
  2206. }
  2207. if (flag7)
  2208. {
  2209. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2210. if (GameUty.FileSystem.IsExistentFile(text))
  2211. {
  2212. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2213. }
  2214. }
  2215. }
  2216. if (maid.status.personal.uniqueName == "Majime")
  2217. {
  2218. string text = "h1_";
  2219. Random random = new Random();
  2220. int num4 = random.Next(10000);
  2221. bool flag7 = false;
  2222. for (int k = 0; k < h1Array.Length; k++)
  2223. {
  2224. if (h1Array[k] == num4)
  2225. {
  2226. flag7 = true;
  2227. break;
  2228. }
  2229. }
  2230. if (flag7)
  2231. {
  2232. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2233. if (GameUty.FileSystem.IsExistentFile(text))
  2234. {
  2235. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2236. }
  2237. }
  2238. }
  2239. if (maid.status.personal.uniqueName == "Rindere")
  2240. {
  2241. string text = "h2_";
  2242. Random random = new Random();
  2243. int num4 = random.Next(10000);
  2244. bool flag7 = false;
  2245. for (int k = 0; k < h2Array.Length; k++)
  2246. {
  2247. if (h2Array[k] == num4)
  2248. {
  2249. flag7 = true;
  2250. break;
  2251. }
  2252. }
  2253. if (flag7)
  2254. {
  2255. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2256. if (GameUty.FileSystem.IsExistentFile(text))
  2257. {
  2258. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2259. }
  2260. }
  2261. }
  2262. idoFlg[i] = true;
  2263. if (i >= 7)
  2264. {
  2265. idoFlg[i - 7] = true;
  2266. }
  2267. }
  2268. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2269. {
  2270. delCount[i] = 20;
  2271. if (goSlot[(int)selectList[i]] != null)
  2272. {
  2273. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2274. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2275. {
  2276. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2277. }
  2278. }
  2279. itemIndex[i]++;
  2280. if (itemIndex[i] == itemArray.Length - 1)
  2281. {
  2282. itemIndex[i] = 0;
  2283. }
  2284. string[] array = new string[2];
  2285. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2286. if (itemIndex[i] > 13)
  2287. {
  2288. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2289. }
  2290. maid.DelProp(MPN.handitem, true);
  2291. maid.DelProp(MPN.accvag, true);
  2292. maid.DelProp(MPN.accanl, true);
  2293. bool flag8 = false;
  2294. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2295. {
  2296. flag8 = true;
  2297. }
  2298. if (!flag8)
  2299. {
  2300. maid.DelProp(MPN.kousoku_upper, true);
  2301. maid.DelProp(MPN.kousoku_lower, true);
  2302. }
  2303. if (array[0] != "")
  2304. {
  2305. maid.SetProp(array[0], array[1], 0, true, false);
  2306. }
  2307. if (itemIndex[i] == 13)
  2308. {
  2309. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2310. maid.SetProp(array[0], array[1], 0, true, false);
  2311. }
  2312. if (itemIndex[i] == 23)
  2313. {
  2314. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2315. maid.SetProp(array[0], array[1], 0, true, false);
  2316. cafeFlg[i] = true;
  2317. }
  2318. maid.AllProcPropSeqStart();
  2319. idoFlg[i] = true;
  2320. if (i >= 7)
  2321. {
  2322. idoFlg[i - 7] = true;
  2323. }
  2324. mFlg = true;
  2325. }
  2326. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2327. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2328. {
  2329. for (int k = 0; k < 10; k++)
  2330. {
  2331. maid.transform.RotateAround(maid.transform.position,
  2332. Vector3.right,
  2333. -maid.transform.rotation.eulerAngles.x);
  2334. maid.transform.RotateAround(maid.transform.position,
  2335. Vector3.forward,
  2336. -maid.transform.rotation.eulerAngles.z);
  2337. }
  2338. idoFlg[i] = true;
  2339. atFlg = true;
  2340. if (i >= 7)
  2341. {
  2342. idoFlg[i - 7] = true;
  2343. }
  2344. }
  2345. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2346. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2347. {
  2348. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2349. idoFlg[i] = true;
  2350. if (i >= 7)
  2351. {
  2352. idoFlg[i - 7] = true;
  2353. }
  2354. }
  2355. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2356. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2357. {
  2358. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2359. idoFlg[i] = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2366. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2367. {
  2368. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2369. idoFlg[i] = true;
  2370. if (i >= 7)
  2371. {
  2372. idoFlg[i - 7] = true;
  2373. }
  2374. }
  2375. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2376. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2377. {
  2378. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2379. idoFlg[i] = true;
  2380. if (i >= 7)
  2381. {
  2382. idoFlg[i - 7] = true;
  2383. }
  2384. }
  2385. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2386. {
  2387. Vector3 vector = maid.transform.position;
  2388. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2389. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2390. maid.SetPos(vector);
  2391. idoFlg[i] = true;
  2392. if (i >= 7)
  2393. {
  2394. idoFlg[i - 7] = true;
  2395. }
  2396. }
  2397. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2398. {
  2399. Vector3 vector = maid.transform.position;
  2400. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2401. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2402. maid.SetPos(vector);
  2403. idoFlg[i] = true;
  2404. if (i >= 7)
  2405. {
  2406. idoFlg[i - 7] = true;
  2407. }
  2408. }
  2409. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2410. {
  2411. Vector3 vector = maid.transform.position;
  2412. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2413. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2414. maid.SetPos(vector);
  2415. idoFlg[i] = true;
  2416. if (i >= 7)
  2417. {
  2418. idoFlg[i - 7] = true;
  2419. }
  2420. }
  2421. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2422. {
  2423. Vector3 vector = maid.transform.position;
  2424. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2425. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2426. maid.SetPos(vector);
  2427. idoFlg[i] = true;
  2428. if (i >= 7)
  2429. {
  2430. idoFlg[i - 7] = true;
  2431. }
  2432. }
  2433. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2434. {
  2435. Vector3 vector = maid.transform.position;
  2436. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2437. maid.SetPos(vector);
  2438. idoFlg[i] = true;
  2439. if (i >= 7)
  2440. {
  2441. idoFlg[i - 7] = true;
  2442. }
  2443. }
  2444. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2445. {
  2446. Vector3 vector = maid.transform.position;
  2447. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2448. maid.SetPos(vector);
  2449. idoFlg[i] = true;
  2450. if (i >= 7)
  2451. {
  2452. idoFlg[i - 7] = true;
  2453. }
  2454. }
  2455. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2456. {
  2457. Vector3 vector = maid.transform.position;
  2458. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2459. maid.SetPos(vector);
  2460. idoFlg[i] = true;
  2461. if (i >= 7)
  2462. {
  2463. idoFlg[i - 7] = true;
  2464. }
  2465. }
  2466. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2467. {
  2468. Vector3 vector = maid.transform.position;
  2469. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2470. maid.SetPos(vector);
  2471. idoFlg[i] = true;
  2472. if (i >= 7)
  2473. {
  2474. idoFlg[i - 7] = true;
  2475. }
  2476. }
  2477. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2478. {
  2479. Vector3 vector = maid.transform.position;
  2480. vector.y += 0.0075f * speed;
  2481. maid.SetPos(vector);
  2482. idoFlg[i] = true;
  2483. if (i >= 7)
  2484. {
  2485. idoFlg[i - 7] = true;
  2486. }
  2487. }
  2488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2489. {
  2490. Vector3 vector = maid.transform.position;
  2491. vector.y -= 0.0075f * speed;
  2492. maid.SetPos(vector);
  2493. idoFlg[i] = true;
  2494. if (i >= 7)
  2495. {
  2496. idoFlg[i - 7] = true;
  2497. }
  2498. }
  2499. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2500. && getModKeyPressing(modKey.Shift))
  2501. {
  2502. faceIndex[i]--;
  2503. if (faceIndex[i] <= -1)
  2504. {
  2505. faceIndex[i] = faceArray.Length - 1;
  2506. }
  2507. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2508. idoFlg[i] = true;
  2509. if (i >= 7)
  2510. {
  2511. idoFlg[i - 7] = true;
  2512. }
  2513. }
  2514. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2515. {
  2516. faceIndex[i]++;
  2517. if (faceIndex[i] == faceArray.Length)
  2518. {
  2519. faceIndex[i] = 0;
  2520. }
  2521. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2522. idoFlg[i] = true;
  2523. if (i >= 7)
  2524. {
  2525. idoFlg[i - 7] = true;
  2526. }
  2527. }
  2528. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2529. {
  2530. faceBlendIndex[i]++;
  2531. if (faceBlendIndex[i] == faceBlendArray.Length)
  2532. {
  2533. faceBlendIndex[i] = 0;
  2534. }
  2535. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2536. idoFlg[i] = true;
  2537. if (i >= 7)
  2538. {
  2539. idoFlg[i - 7] = true;
  2540. }
  2541. }
  2542. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2543. {
  2544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2545. isStop[i] = false;
  2546. poseCount[i] = 20;
  2547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2548. {
  2549. maid.body0.MuneYureL(0f);
  2550. maid.body0.MuneYureR(0f);
  2551. }
  2552. else
  2553. {
  2554. maid.body0.MuneYureL(1f);
  2555. maid.body0.MuneYureR(1f);
  2556. maid.body0.jbMuneL.enabled = true;
  2557. maid.body0.jbMuneR.enabled = true;
  2558. }
  2559. if (array[0].Contains("MultipleMaidsPose"))
  2560. {
  2561. string path = array[0].Split(new char[] { '/' })[1];
  2562. byte[] array2 = new byte[0];
  2563. try
  2564. {
  2565. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2566. {
  2567. array2 = new byte[fileStream.Length];
  2568. fileStream.Read(array2, 0, array2.Length);
  2569. }
  2570. }
  2571. catch { }
  2572. if (0 < array2.Length)
  2573. {
  2574. string text = Path.GetFileName(path);
  2575. long num5 = text.GetHashCode();
  2576. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2577. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2578. {
  2579. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2580. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2581. };
  2582. for (int m = 0; m < array3.Length; m++)
  2583. {
  2584. maid.SetAutoTwist(array3[m], true);
  2585. }
  2586. }
  2587. }
  2588. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2589. {
  2590. loadPose[i] = array[0];
  2591. }
  2592. else if (!array[0].StartsWith("dance_"))
  2593. {
  2594. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2595. }
  2596. else
  2597. {
  2598. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2599. {
  2600. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2601. GameUty.FileSystem,
  2602. array[0] + ".anm",
  2603. false,
  2604. false);
  2605. }
  2606. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2607. }
  2608. if (array.Length > 1)
  2609. {
  2610. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2611. isStop[i] = true;
  2612. if (array.Length > 2)
  2613. {
  2614. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2615. isPoseIti[i] = true;
  2616. poseIti[i] = maidArray[i].transform.position;
  2617. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2618. }
  2619. }
  2620. isLock[i] = false;
  2621. idoFlg[i] = true;
  2622. mHandL[i].initFlg = false;
  2623. mHandR[i].initFlg = false;
  2624. mFootL[i].initFlg = false;
  2625. mFootR[i].initFlg = false;
  2626. pHandL[i] = 0;
  2627. pHandR[i] = 0;
  2628. muneIKL[i] = false;
  2629. muneIKR[i] = false;
  2630. if (!isVR)
  2631. {
  2632. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2633. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2634. }
  2635. if (i >= 7)
  2636. {
  2637. idoFlg[i - 7] = true;
  2638. }
  2639. }
  2640. else if (maid.body0.isLoadedBody)
  2641. {
  2642. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2643. {
  2644. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2645. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2646. }
  2647. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2648. {
  2649. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2650. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2651. }
  2652. if (!HandL1[i])
  2653. {
  2654. SetIKInit(i);
  2655. SetIK(maid, i);
  2656. ikBui = 5;
  2657. }
  2658. else
  2659. {
  2660. bool flag5 = false;
  2661. for (int k = 0; k < keyArray.Length; k++)
  2662. {
  2663. if (Input.GetKey(keyArray[k]))
  2664. {
  2665. flag5 = true;
  2666. break;
  2667. }
  2668. }
  2669. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2670. || Input.GetKey(KeyCode.Y))
  2671. {
  2672. flag5 = true;
  2673. }
  2674. if (!flag5)
  2675. {
  2676. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2677. && getModKeyPressing(modKey.Shift))
  2678. {
  2679. ikMode[i] = 15;
  2680. }
  2681. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2682. {
  2683. ikMode[i] = 5;
  2684. }
  2685. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2686. {
  2687. ikMode[i] = 6;
  2688. }
  2689. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2690. {
  2691. ikMode[i] = 7;
  2692. }
  2693. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 11;
  2696. }
  2697. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2698. {
  2699. ikMode[i] = 12;
  2700. }
  2701. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2702. {
  2703. ikMode[i] = 14;
  2704. }
  2705. else if (getModKeyPressing(modKey.Shift))
  2706. {
  2707. ikMode[i] = 1;
  2708. }
  2709. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 8;
  2712. }
  2713. else if (getModKeyPressing(modKey.Ctrl))
  2714. {
  2715. ikMode[i] = 2;
  2716. }
  2717. else if (getModKeyPressing(modKey.Alt))
  2718. {
  2719. ikMode[i] = 3;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Space))
  2722. {
  2723. ikMode[i] = 4;
  2724. }
  2725. else if (Input.GetKey(KeyCode.X))
  2726. {
  2727. ikMode[i] = 9;
  2728. }
  2729. else if (Input.GetKey(KeyCode.Z))
  2730. {
  2731. ikMode[i] = 10;
  2732. }
  2733. else if (Input.GetKey(KeyCode.C))
  2734. {
  2735. ikMode[i] = 13;
  2736. }
  2737. else if (Input.GetKey(KeyCode.A))
  2738. {
  2739. ikMode[i] = 16;
  2740. }
  2741. else
  2742. {
  2743. ikMode[i] = 0;
  2744. }
  2745. if (!isIK[i])
  2746. {
  2747. if (ikMode[i] < 9)
  2748. {
  2749. ikMode[i] = 0;
  2750. }
  2751. }
  2752. bool flag9 = false;
  2753. bool flag10 = false;
  2754. bool flag11 = false;
  2755. bool flag12 = false;
  2756. if (gFinger[i, 0])
  2757. {
  2758. for (int j = 0; j < 15; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag9 = true;
  2763. }
  2764. }
  2765. for (int j = 15; j < 30; j++)
  2766. {
  2767. if (mFinger[i, j].isStop)
  2768. {
  2769. flag10 = true;
  2770. }
  2771. }
  2772. for (int j = 0; j < 6; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag11 = true;
  2777. }
  2778. }
  2779. for (int j = 6; j < 12; j++)
  2780. {
  2781. if (mFinger2[i, j].isStop)
  2782. {
  2783. flag12 = true;
  2784. }
  2785. }
  2786. }
  2787. if (gMaid[i] != null)
  2788. {
  2789. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2790. {
  2791. gMaid[i].SetActive(true);
  2792. if (isCube)
  2793. {
  2794. gMaidC[i].SetActive(true);
  2795. }
  2796. }
  2797. else
  2798. {
  2799. gMaid[i].SetActive(false);
  2800. gMaidC[i].SetActive(false);
  2801. }
  2802. }
  2803. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2804. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2805. {
  2806. ikBui = 1;
  2807. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2808. {
  2809. ikMaid = i;
  2810. }
  2811. if (ikMaid == i)
  2812. {
  2813. SetIK(maid, i);
  2814. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2815. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2816. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2817. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2818. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2819. }
  2820. if (Input.GetKeyDown(KeyCode.Q))
  2821. {
  2822. qFlg = true;
  2823. }
  2824. }
  2825. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2826. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2827. {
  2828. ikBui = 2;
  2829. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2830. {
  2831. ikMaid = i;
  2832. }
  2833. if (ikMaid == i)
  2834. {
  2835. SetIK(maid, i);
  2836. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2837. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2838. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2839. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2840. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2841. }
  2842. if (Input.GetKeyDown(KeyCode.W))
  2843. {
  2844. wFlg = true;
  2845. }
  2846. }
  2847. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2848. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2849. {
  2850. ikBui = 3;
  2851. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2852. {
  2853. ikMaid = i;
  2854. }
  2855. if (ikMaid == i)
  2856. {
  2857. SetIK(maid, i);
  2858. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2859. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2860. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2861. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2862. }
  2863. }
  2864. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2865. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2866. {
  2867. ikBui = 4;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. if (Input.GetKeyDown(KeyCode.S))
  2881. {
  2882. sFlg = true;
  2883. }
  2884. }
  2885. mHandR[i].isSelect = false;
  2886. mArmR[i].isSelect = false;
  2887. mHandL[i].isSelect = false;
  2888. mArmL[i].isSelect = false;
  2889. mFootR[i].isSelect = false;
  2890. mHizaR[i].isSelect = false;
  2891. mFootL[i].isSelect = false;
  2892. mHizaL[i].isSelect = false;
  2893. mClavicleL[i].isSelect = false;
  2894. mClavicleR[i].isSelect = false;
  2895. if (ikMode[i] == 16)
  2896. {
  2897. if (!gHead2[i])
  2898. {
  2899. SetIKInit6(i);
  2900. }
  2901. if (mHead2[i].isClick)
  2902. {
  2903. mHead2[i].isClick = false;
  2904. bGui = true;
  2905. isFaceInit = true;
  2906. // isGuiInit = true;
  2907. faceFlg = true;
  2908. poseFlg = false;
  2909. // sceneFlg = false;
  2910. kankyoFlg = false;
  2911. kankyo2Flg = false;
  2912. maid.boMabataki = false;
  2913. selectMaidIndex = mHead2[i].no;
  2914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2915. }
  2916. if (mMaid2[i].isClick)
  2917. {
  2918. mMaid2[i].isClick = false;
  2919. bGui = true;
  2920. isPoseInit = true;
  2921. // isGuiInit = true;
  2922. poseFlg = true;
  2923. faceFlg = false;
  2924. // sceneFlg = false;
  2925. kankyoFlg = false;
  2926. kankyo2Flg = false;
  2927. selectMaidIndex = mMaid2[i].no;
  2928. copyIndex = 0;
  2929. }
  2930. gHead2[i].transform.position =
  2931. new Vector3(Head2[i].position.x,
  2932. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2933. Head2[i].position.z);
  2934. gHead2[i].transform.eulerAngles =
  2935. new Vector3(Head2[i].transform.eulerAngles.x,
  2936. Head2[i].transform.eulerAngles.y,
  2937. Head2[i].transform.eulerAngles.z + 90f);
  2938. mHead2[i].no = i;
  2939. mHead2[i].maid = maid;
  2940. mHead2[i].ido = 1;
  2941. gMaid2[i].transform.position =
  2942. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2943. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2944. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2945. gMaid2[i].transform.eulerAngles =
  2946. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2947. Spine0a2[i].transform.eulerAngles.y,
  2948. Spine0a2[i].transform.eulerAngles.z + 90f);
  2949. mMaid2[i].no = i;
  2950. mMaid2[i].maid = maid;
  2951. mMaid2[i].ido = 2;
  2952. gArmL[i].SetActive(false);
  2953. gFootL[i].SetActive(false);
  2954. gHizaL[i].SetActive(false);
  2955. gHandR[i].SetActive(false);
  2956. gArmR[i].SetActive(false);
  2957. gFootR[i].SetActive(false);
  2958. gHizaR[i].SetActive(false);
  2959. gClavicleL[i].SetActive(false);
  2960. gClavicleR[i].SetActive(false);
  2961. gNeck[i].SetActive(false);
  2962. gSpine[i].SetActive(false);
  2963. gSpine0a[i].SetActive(false);
  2964. gSpine1a[i].SetActive(false);
  2965. gSpine1[i].SetActive(false);
  2966. gPelvis[i].SetActive(false);
  2967. }
  2968. else if (ikMode[i] == 8)
  2969. {
  2970. if (ikModeOld[i] == 15 && gIKHandL[i])
  2971. {
  2972. mIKHandL[i].ido = 1;
  2973. mIKHandL[i].reset = true;
  2974. mIKHandR[i].ido = 1;
  2975. mIKHandR[i].reset = true;
  2976. }
  2977. else if (ikModeOld[i] == 3 && gHead[i])
  2978. {
  2979. mHead[i].ido = 7;
  2980. mHead[i].reset = true;
  2981. }
  2982. else
  2983. {
  2984. if (!gIKHandL[i])
  2985. {
  2986. SetIKInit5(i);
  2987. }
  2988. gIKHandL[i].transform.position = IKHandL[i].position;
  2989. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2990. mIKHandL[i].maid = maid;
  2991. mIKHandL[i].HandL = IKHandL[i];
  2992. mIKHandL[i].ido = 1;
  2993. gIKHandR[i].transform.position = IKHandR[i].position;
  2994. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2995. mIKHandR[i].maid = maid;
  2996. mIKHandR[i].HandL = IKHandR[i];
  2997. mIKHandR[i].ido = 1;
  2998. if (!gIKMuneL[i])
  2999. {
  3000. SetIKInit7(i);
  3001. }
  3002. if (!gHead[i])
  3003. {
  3004. SetIKInit4(i);
  3005. }
  3006. mIKMuneL[i].maid = maid;
  3007. mIKMuneL[i].HandL = IKMuneLSub[i];
  3008. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3009. mIKMuneL[i].ForearmL = IKMuneL[i];
  3010. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3011. mIKMuneR[i].maid = maid;
  3012. mIKMuneR[i].HandL = IKMuneRSub[i];
  3013. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3014. mIKMuneR[i].ForearmL = IKMuneR[i];
  3015. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3016. gHead[i].transform.position =
  3017. new Vector3(Head2[i].position.x,
  3018. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3019. Head2[i].position.z);
  3020. gHead[i].transform.eulerAngles =
  3021. new Vector3(Head2[i].transform.eulerAngles.x,
  3022. Head2[i].transform.eulerAngles.y,
  3023. Head2[i].transform.eulerAngles.z + 90f);
  3024. mHead[i].head = Head1[i];
  3025. mHead[i].maid = maid;
  3026. mHead[i].ido = 7;
  3027. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3028. gHead[i].SetActive(true);
  3029. if (mHead[i].isClick)
  3030. {
  3031. mHead[i].isClick = false;
  3032. mHead[i].isClick2 = false;
  3033. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3034. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3035. }
  3036. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3037. {
  3038. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3039. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3040. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3041. IKMuneLSub[i].localEulerAngles.y,
  3042. IKMuneLSub[i].localEulerAngles.z);
  3043. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3044. IKMuneL[i].localEulerAngles.y,
  3045. IKMuneL[i].localEulerAngles.z);
  3046. muneIKL[i] = true;
  3047. isStop[i] = true;
  3048. isLock[i] = true;
  3049. mIKMuneL[i].isMouseDrag = false;
  3050. }
  3051. if (mIKMuneL[i].isMouseDown)
  3052. {
  3053. maid.body0.MuneYureL(0f);
  3054. maid.body0.MuneYureR(0f);
  3055. maid.body0.jbMuneL.enabled = false;
  3056. maid.body0.jbMuneR.enabled = false;
  3057. muneIKL[i] = false;
  3058. mIKMuneL[i].isMouseUp = false;
  3059. }
  3060. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3061. {
  3062. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3063. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3064. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3065. IKMuneRSub[i].localEulerAngles.y,
  3066. IKMuneRSub[i].localEulerAngles.z);
  3067. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3068. IKMuneR[i].localEulerAngles.y,
  3069. IKMuneR[i].localEulerAngles.z);
  3070. muneIKR[i] = true;
  3071. isStop[i] = true;
  3072. isLock[i] = true;
  3073. mIKMuneR[i].isMouseDrag = false;
  3074. }
  3075. if (mIKMuneR[i].isMouseDown)
  3076. {
  3077. maid.body0.MuneYureL(0f);
  3078. maid.body0.MuneYureR(0f);
  3079. maid.body0.jbMuneL.enabled = false;
  3080. maid.body0.jbMuneR.enabled = false;
  3081. muneIKR[i] = false;
  3082. mIKMuneL[i].isMouseUp = false;
  3083. }
  3084. if (mHead[i].isStop)
  3085. {
  3086. isStop[i] = true;
  3087. isLock[i] = true;
  3088. mHead[i].isStop = false;
  3089. }
  3090. gJotai[i].SetActive(false);
  3091. gKahuku[i].SetActive(false);
  3092. gHandL[i].SetActive(false);
  3093. gArmL[i].SetActive(false);
  3094. gFootL[i].SetActive(false);
  3095. gHizaL[i].SetActive(false);
  3096. gHandR[i].SetActive(false);
  3097. gArmR[i].SetActive(false);
  3098. gFootR[i].SetActive(false);
  3099. gHizaR[i].SetActive(false);
  3100. gClavicleL[i].SetActive(false);
  3101. gClavicleR[i].SetActive(false);
  3102. gNeck[i].SetActive(false);
  3103. gSpine[i].SetActive(false);
  3104. gSpine0a[i].SetActive(false);
  3105. gSpine1a[i].SetActive(false);
  3106. gSpine1[i].SetActive(false);
  3107. gPelvis[i].SetActive(false);
  3108. }
  3109. }
  3110. else if (ikMode[i] == 15)
  3111. {
  3112. if (ikModeOld[i] == 8 && gIKHandL[i])
  3113. {
  3114. mIKHandL[i].ido = 2;
  3115. mIKHandL[i].reset = true;
  3116. mIKHandR[i].ido = 2;
  3117. mIKHandR[i].reset = true;
  3118. }
  3119. else
  3120. {
  3121. if (!gIKHandL[i])
  3122. {
  3123. SetIKInit5(i);
  3124. }
  3125. gIKHandL[i].transform.position = IKHandL[i].position;
  3126. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3127. mIKHandL[i].maid = maid;
  3128. mIKHandL[i].HandL = IKHandL[i];
  3129. mIKHandL[i].ido = 2;
  3130. gIKHandR[i].transform.position = IKHandR[i].position;
  3131. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3132. mIKHandR[i].maid = maid;
  3133. mIKHandR[i].HandL = IKHandR[i];
  3134. mIKHandR[i].ido = 2;
  3135. Destroy(gHead[i]);
  3136. Destroy(gJotai[i]);
  3137. Destroy(gKahuku[i]);
  3138. gHandL[i].SetActive(false);
  3139. gArmL[i].SetActive(false);
  3140. gFootL[i].SetActive(false);
  3141. gHizaL[i].SetActive(false);
  3142. gHandR[i].SetActive(false);
  3143. gArmR[i].SetActive(false);
  3144. gFootR[i].SetActive(false);
  3145. gHizaR[i].SetActive(false);
  3146. gClavicleL[i].SetActive(false);
  3147. gClavicleR[i].SetActive(false);
  3148. gNeck[i].SetActive(false);
  3149. gSpine[i].SetActive(false);
  3150. gSpine0a[i].SetActive(false);
  3151. gSpine1a[i].SetActive(false);
  3152. gSpine1[i].SetActive(false);
  3153. gPelvis[i].SetActive(false);
  3154. }
  3155. }
  3156. else if (ikMode[i] == 1)
  3157. {
  3158. mHandL[i].ido = 10;
  3159. mHandR[i].ido = 10;
  3160. mFootL[i].ido = 10;
  3161. mFootR[i].ido = 10;
  3162. if (ikModeOld[i] == 0 && gNeck[i])
  3163. {
  3164. if (isBone[i])
  3165. {
  3166. mNeck[i].ido = 4;
  3167. mNeck[i].reset = true;
  3168. mSpine[i].ido = 4;
  3169. mSpine[i].reset = true;
  3170. mSpine0a[i].ido = 4;
  3171. mSpine0a[i].reset = true;
  3172. mSpine1a[i].ido = 4;
  3173. mSpine1a[i].reset = true;
  3174. mSpine1[i].ido = 4;
  3175. mSpine1[i].reset = true;
  3176. mPelvis[i].ido = 4;
  3177. mPelvis[i].reset = true;
  3178. mHizaL[i].ido = 5;
  3179. mHizaL[i].reset = true;
  3180. mHizaR[i].ido = 5;
  3181. mHizaR[i].reset = true;
  3182. }
  3183. }
  3184. else
  3185. {
  3186. gArmL[i].SetActive(false);
  3187. gArmR[i].SetActive(false);
  3188. if (!isBone[i])
  3189. {
  3190. gHizaL[i].SetActive(false);
  3191. gHizaR[i].SetActive(false);
  3192. }
  3193. gClavicleL[i].SetActive(false);
  3194. gClavicleR[i].SetActive(false);
  3195. if (isBone[i])
  3196. {
  3197. mNeck[i].maid = maid;
  3198. mNeck[i].head = Neck[i];
  3199. mNeck[i].no = i;
  3200. mNeck[i].ido = 4;
  3201. gNeck[i].transform.position = Neck[i].position;
  3202. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3203. if (mNeck[i].isHead)
  3204. {
  3205. mNeck[i].isHead = false;
  3206. isLookn[i] = isLook[i];
  3207. isLook[i] = !isLook[i];
  3208. }
  3209. mSpine[i].maid = maid;
  3210. mSpine[i].head = Spine2[i];
  3211. mSpine[i].no = i;
  3212. mSpine[i].ido = 4;
  3213. gSpine[i].transform.position = Spine2[i].position;
  3214. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3215. mSpine0a[i].maid = maid;
  3216. mSpine0a[i].head = Spine0a2[i];
  3217. mSpine0a[i].no = i;
  3218. mSpine0a[i].ido = 4;
  3219. gSpine0a[i].transform.position = Spine0a2[i].position;
  3220. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3221. mSpine1a[i].maid = maid;
  3222. mSpine1a[i].head = Spine1a2[i];
  3223. mSpine1a[i].no = i;
  3224. mSpine1a[i].ido = 4;
  3225. gSpine1a[i].transform.position = Spine1a2[i].position;
  3226. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3227. mSpine1[i].maid = maid;
  3228. mSpine1[i].head = Spine12[i];
  3229. mSpine1[i].no = i;
  3230. mSpine1[i].ido = 4;
  3231. gSpine1[i].transform.position = Spine12[i].position;
  3232. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3233. mPelvis[i].maid = maid;
  3234. mPelvis[i].head = Pelvis2[i];
  3235. mPelvis[i].no = i;
  3236. mPelvis[i].ido = 8;
  3237. gPelvis[i].transform.position = Pelvis2[i].position;
  3238. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3239. mHizaL[i].ido = 5;
  3240. mHizaR[i].ido = 5;
  3241. }
  3242. }
  3243. }
  3244. else if (ikMode[i] == 2)
  3245. {
  3246. if (ikModeOld[i] == 0 && gPelvis[i])
  3247. {
  3248. mPelvis[i].ido = 9;
  3249. mPelvis[i].reset = true;
  3250. }
  3251. else
  3252. {
  3253. gArmL[i].SetActive(false);
  3254. gHizaL[i].SetActive(false);
  3255. gArmR[i].SetActive(false);
  3256. gHizaR[i].SetActive(false);
  3257. gClavicleL[i].SetActive(false);
  3258. gClavicleR[i].SetActive(false);
  3259. gNeck[i].SetActive(false);
  3260. gSpine[i].SetActive(false);
  3261. gSpine0a[i].SetActive(false);
  3262. gSpine1a[i].SetActive(false);
  3263. gSpine1[i].SetActive(false);
  3264. mPelvis[i].maid = maid;
  3265. mPelvis[i].head = Pelvis2[i];
  3266. mPelvis[i].no = i;
  3267. mPelvis[i].ido = 9;
  3268. gPelvis[i].transform.position = Pelvis2[i].position;
  3269. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3270. }
  3271. }
  3272. else if (ikMode[i] == 3)
  3273. {
  3274. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3275. {
  3276. mHead[i].ido = 1;
  3277. mHead[i].reset = true;
  3278. mJotai[i].ido = 2;
  3279. mJotai[i].reset = true;
  3280. mKahuku[i].ido = 3;
  3281. mKahuku[i].reset = true;
  3282. mHandL[i].ido = 1;
  3283. mHandR[i].ido = 1;
  3284. mFootL[i].ido = 3;
  3285. mFootR[i].ido = 3;
  3286. mHizaL[i].ido = 5;
  3287. mHizaR[i].ido = 5;
  3288. mHandL[i].reset = true;
  3289. mHandR[i].reset = true;
  3290. mFootL[i].reset = true;
  3291. mFootR[i].reset = true;
  3292. mHizaL[i].reset = true;
  3293. mHizaR[i].reset = true;
  3294. }
  3295. else if (ikModeOld[i] == 0)
  3296. {
  3297. mHandL[i].ido = 1;
  3298. mHandR[i].ido = 1;
  3299. mFootL[i].ido = 3;
  3300. mFootR[i].ido = 3;
  3301. mHizaL[i].ido = 5;
  3302. mHizaR[i].ido = 5;
  3303. mHandL[i].reset = true;
  3304. mHandR[i].reset = true;
  3305. mFootL[i].reset = true;
  3306. mFootR[i].reset = true;
  3307. mHizaL[i].reset = true;
  3308. mHizaR[i].reset = true;
  3309. }
  3310. else
  3311. {
  3312. if (!gHead[i])
  3313. {
  3314. SetIKInit4(i);
  3315. }
  3316. if (mHead[i].isHead)
  3317. {
  3318. mHead[i].isHead = false;
  3319. isLookn[i] = isLook[i];
  3320. isLook[i] = !isLook[i];
  3321. }
  3322. gHead[i].transform.position =
  3323. new Vector3(Head2[i].position.x,
  3324. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3325. Head2[i].position.z);
  3326. gHead[i].transform.eulerAngles =
  3327. new Vector3(Head2[i].transform.eulerAngles.x,
  3328. Head2[i].transform.eulerAngles.y,
  3329. Head2[i].transform.eulerAngles.z + 90f);
  3330. mHead[i].head = Head1[i];
  3331. mHead[i].maid = maid;
  3332. mHead[i].no = i;
  3333. mHead[i].ido = 1;
  3334. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3335. Transform transform3 =
  3336. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3337. Transform transform4 =
  3338. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3339. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3340. Transform transform6 =
  3341. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3342. gJotai[i].transform.position =
  3343. new Vector3(transform3.position.x,
  3344. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3345. transform3.position.z);
  3346. gJotai[i].transform.eulerAngles =
  3347. new Vector3(transform3.transform.eulerAngles.x,
  3348. transform3.transform.eulerAngles.y,
  3349. transform3.transform.eulerAngles.z + 90f);
  3350. mJotai[i].Spine0a = spine0a;
  3351. mJotai[i].Spine1 = transform3;
  3352. mJotai[i].Spine1a = transform4;
  3353. mJotai[i].Spine = transform5;
  3354. mJotai[i].maid = maid;
  3355. mJotai[i].ido = 2;
  3356. gKahuku[i].transform.position =
  3357. new Vector3(transform6.position.x,
  3358. (transform6.position.y + transform5.position.y) / 2f,
  3359. transform6.position.z);
  3360. gKahuku[i].transform.eulerAngles =
  3361. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3362. transform6.transform.eulerAngles.y + 90f,
  3363. transform6.transform.eulerAngles.z);
  3364. mKahuku[i].Pelvis = transform6;
  3365. mKahuku[i].maid = maid;
  3366. mKahuku[i].ido = 3;
  3367. mHandL[i].ido = 1;
  3368. mHandR[i].ido = 1;
  3369. mFootL[i].ido = 3;
  3370. mFootR[i].ido = 3;
  3371. mHizaL[i].ido = 5;
  3372. mHizaR[i].ido = 5;
  3373. gJotai[i].SetActive(true);
  3374. gKahuku[i].SetActive(true);
  3375. gHandL[i].SetActive(true);
  3376. gArmL[i].SetActive(false);
  3377. gFootL[i].SetActive(true);
  3378. gHizaL[i].SetActive(true);
  3379. gHandR[i].SetActive(true);
  3380. gArmR[i].SetActive(false);
  3381. gFootR[i].SetActive(true);
  3382. gHizaR[i].SetActive(true);
  3383. Destroy(gIKHandL[i]);
  3384. Destroy(gIKHandR[i]);
  3385. Destroy(gIKMuneL[i]);
  3386. Destroy(gIKMuneR[i]);
  3387. if (isBone[i])
  3388. {
  3389. gHizaL[i].SetActive(false);
  3390. gHizaR[i].SetActive(false);
  3391. gHead[i].SetActive(false);
  3392. gJotai[i].SetActive(false);
  3393. gKahuku[i].SetActive(false);
  3394. }
  3395. else
  3396. {
  3397. gHizaL[i].SetActive(true);
  3398. gHizaR[i].SetActive(true);
  3399. gHead[i].SetActive(true);
  3400. gJotai[i].SetActive(true);
  3401. gKahuku[i].SetActive(true);
  3402. }
  3403. gClavicleL[i].SetActive(false);
  3404. gClavicleR[i].SetActive(false);
  3405. gNeck[i].SetActive(false);
  3406. gSpine[i].SetActive(false);
  3407. gSpine0a[i].SetActive(false);
  3408. gSpine1a[i].SetActive(false);
  3409. gSpine1[i].SetActive(false);
  3410. gPelvis[i].SetActive(false);
  3411. if (mHead[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mHead[i].isStop = false;
  3416. }
  3417. if (mJotai[i].isStop)
  3418. {
  3419. isStop[i] = true;
  3420. isLock[i] = true;
  3421. mJotai[i].isStop = false;
  3422. }
  3423. if (mKahuku[i].isStop)
  3424. {
  3425. isStop[i] = true;
  3426. isLock[i] = true;
  3427. mKahuku[i].isStop = false;
  3428. }
  3429. if (mKahuku[i].isSelect)
  3430. {
  3431. mKahuku[i].isSelect = false;
  3432. if (ikMaid != i)
  3433. {
  3434. ikMaid = i;
  3435. ikBui = 5;
  3436. SetIK(maid, i);
  3437. }
  3438. }
  3439. if (mJotai[i].isSelect)
  3440. {
  3441. mJotai[i].isSelect = false;
  3442. if (ikMaid != i)
  3443. {
  3444. ikMaid = i;
  3445. ikBui = 5;
  3446. SetIK(maid, i);
  3447. }
  3448. }
  3449. if (mKahuku[i].isSelect)
  3450. {
  3451. mKahuku[i].isSelect = false;
  3452. if (ikMaid != i)
  3453. {
  3454. ikMaid = i;
  3455. ikBui = 5;
  3456. SetIK(maid, i);
  3457. }
  3458. }
  3459. }
  3460. }
  3461. else if (ikMode[i] == 5)
  3462. {
  3463. if (ikModeOld[i] == 3 && gHead[i])
  3464. {
  3465. mHead[i].ido = 4;
  3466. mHead[i].reset = true;
  3467. mJotai[i].ido = 5;
  3468. mJotai[i].reset = true;
  3469. mKahuku[i].ido = 6;
  3470. mKahuku[i].reset = true;
  3471. mHandL[i].ido = 2;
  3472. mHandR[i].ido = 2;
  3473. mFootL[i].ido = 4;
  3474. mFootR[i].ido = 4;
  3475. mHizaL[i].ido = 5;
  3476. mHizaR[i].ido = 5;
  3477. mHandL[i].reset = true;
  3478. mHandR[i].reset = true;
  3479. mFootL[i].reset = true;
  3480. mFootR[i].reset = true;
  3481. mHizaL[i].reset = true;
  3482. mHizaR[i].reset = true;
  3483. }
  3484. else if (ikModeOld[i] == 0)
  3485. {
  3486. mHandL[i].ido = 2;
  3487. mHandR[i].ido = 2;
  3488. mFootL[i].ido = 4;
  3489. mFootR[i].ido = 4;
  3490. mHizaL[i].ido = 5;
  3491. mHizaR[i].ido = 5;
  3492. mHandL[i].reset = true;
  3493. mHandR[i].reset = true;
  3494. mFootL[i].reset = true;
  3495. mFootR[i].reset = true;
  3496. mHizaL[i].reset = true;
  3497. mHizaR[i].reset = true;
  3498. }
  3499. else
  3500. {
  3501. if (!gHead[i])
  3502. {
  3503. SetIKInit4(i);
  3504. }
  3505. if (mHead[i].isHead)
  3506. {
  3507. mHead[i].isHead = false;
  3508. isLookn[i] = isLook[i];
  3509. isLook[i] = !isLook[i];
  3510. }
  3511. gHead[i].transform.position =
  3512. new Vector3(Head2[i].position.x,
  3513. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3514. Head2[i].position.z);
  3515. gHead[i].transform.eulerAngles =
  3516. new Vector3(Head2[i].transform.eulerAngles.x,
  3517. Head2[i].transform.eulerAngles.y,
  3518. Head2[i].transform.eulerAngles.z + 90f);
  3519. mHead[i].head = Head1[i];
  3520. mHead[i].maid = maid;
  3521. mHead[i].ido = 4;
  3522. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3523. Transform transform3 =
  3524. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3525. Transform transform4 =
  3526. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3527. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3528. Transform transform6 =
  3529. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3530. gJotai[i].transform.position =
  3531. new Vector3(transform3.position.x,
  3532. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3533. transform3.position.z);
  3534. gJotai[i].transform.eulerAngles =
  3535. new Vector3(transform3.transform.eulerAngles.x,
  3536. transform3.transform.eulerAngles.y,
  3537. transform3.transform.eulerAngles.z + 90f);
  3538. mJotai[i].Spine0a = spine0a;
  3539. mJotai[i].Spine1 = transform3;
  3540. mJotai[i].Spine1a = transform4;
  3541. mJotai[i].Spine = transform5;
  3542. mJotai[i].maid = maid;
  3543. mJotai[i].ido = 5;
  3544. gKahuku[i].transform.position =
  3545. new Vector3(transform6.position.x,
  3546. (transform6.position.y + transform5.position.y) / 2f,
  3547. transform6.position.z);
  3548. gKahuku[i].transform.eulerAngles =
  3549. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3550. transform6.transform.eulerAngles.y + 90f,
  3551. transform6.transform.eulerAngles.z);
  3552. mKahuku[i].Pelvis = transform6;
  3553. mKahuku[i].maid = maid;
  3554. mKahuku[i].ido = 6;
  3555. mHandL[i].ido = 2;
  3556. mHandR[i].ido = 2;
  3557. mFootL[i].ido = 4;
  3558. mFootR[i].ido = 4;
  3559. mHizaL[i].ido = 5;
  3560. mHizaR[i].ido = 5;
  3561. gArmL[i].SetActive(false);
  3562. gArmR[i].SetActive(false);
  3563. gClavicleL[i].SetActive(false);
  3564. gClavicleR[i].SetActive(false);
  3565. gNeck[i].SetActive(false);
  3566. gSpine[i].SetActive(false);
  3567. gSpine0a[i].SetActive(false);
  3568. gSpine1a[i].SetActive(false);
  3569. gSpine1[i].SetActive(false);
  3570. gPelvis[i].SetActive(false);
  3571. if (isBone[i])
  3572. {
  3573. gHizaL[i].SetActive(false);
  3574. gHizaR[i].SetActive(false);
  3575. gHead[i].SetActive(false);
  3576. gJotai[i].SetActive(false);
  3577. gKahuku[i].SetActive(false);
  3578. }
  3579. else
  3580. {
  3581. gHizaL[i].SetActive(true);
  3582. gHizaR[i].SetActive(true);
  3583. gHead[i].SetActive(true);
  3584. gJotai[i].SetActive(true);
  3585. gKahuku[i].SetActive(true);
  3586. }
  3587. if (mHead[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mHead[i].isStop = false;
  3592. }
  3593. if (mJotai[i].isStop)
  3594. {
  3595. isStop[i] = true;
  3596. isLock[i] = true;
  3597. mJotai[i].isStop = false;
  3598. }
  3599. if (mKahuku[i].isStop)
  3600. {
  3601. isStop[i] = true;
  3602. isLock[i] = true;
  3603. mKahuku[i].isStop = false;
  3604. }
  3605. if (mHead[i].isSelect)
  3606. {
  3607. mHead[i].isSelect = false;
  3608. if (ikMaid != i)
  3609. {
  3610. ikMaid = i;
  3611. ikBui = 5;
  3612. SetIK(maid, i);
  3613. }
  3614. }
  3615. if (mJotai[i].isSelect)
  3616. {
  3617. mJotai[i].isSelect = false;
  3618. if (ikMaid != i)
  3619. {
  3620. ikMaid = i;
  3621. ikBui = 5;
  3622. SetIK(maid, i);
  3623. }
  3624. }
  3625. if (mKahuku[i].isSelect)
  3626. {
  3627. mKahuku[i].isSelect = false;
  3628. if (ikMaid != i)
  3629. {
  3630. ikMaid = i;
  3631. ikBui = 5;
  3632. SetIK(maid, i);
  3633. }
  3634. }
  3635. }
  3636. }
  3637. else if (ikMode[i] == 13)
  3638. {
  3639. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3640. {
  3641. mMaid[i].ido = 5;
  3642. mMaid[i].reset = true;
  3643. mMaidC[i].ido = 5;
  3644. mMaidC[i].reset = true;
  3645. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3646. }
  3647. else
  3648. {
  3649. if (!gMaid[i])
  3650. {
  3651. SetIKInit3(i);
  3652. }
  3653. gMaid[i].transform.position =
  3654. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3655. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3656. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3657. gMaid[i].transform.eulerAngles =
  3658. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3659. Spine0a2[i].transform.eulerAngles.y,
  3660. Spine0a2[i].transform.eulerAngles.z + 90f);
  3661. mMaid[i].maid = maid;
  3662. mMaid[i].ido = 5;
  3663. gMaidC[i].transform.position = maid.transform.position;
  3664. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3665. mMaidC[i].maid = maid;
  3666. mMaidC[i].ido = 5;
  3667. if (isCube)
  3668. {
  3669. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3670. gMaidC[i].SetActive(true);
  3671. }
  3672. else
  3673. {
  3674. gMaidC[i].SetActive(false);
  3675. }
  3676. gHandL[i].SetActive(false);
  3677. gArmL[i].SetActive(false);
  3678. gFootL[i].SetActive(false);
  3679. gHizaL[i].SetActive(false);
  3680. gHandR[i].SetActive(false);
  3681. gArmR[i].SetActive(false);
  3682. gFootR[i].SetActive(false);
  3683. gHizaR[i].SetActive(false);
  3684. gClavicleL[i].SetActive(false);
  3685. gClavicleR[i].SetActive(false);
  3686. gNeck[i].SetActive(false);
  3687. gSpine[i].SetActive(false);
  3688. gSpine0a[i].SetActive(false);
  3689. gSpine1a[i].SetActive(false);
  3690. gSpine1[i].SetActive(false);
  3691. gPelvis[i].SetActive(false);
  3692. }
  3693. if (mMaid[i].isSelect)
  3694. {
  3695. mMaid[i].isSelect = false;
  3696. if (ikMaid != i)
  3697. {
  3698. ikMaid = i;
  3699. ikBui = 5;
  3700. SetIK(maid, i);
  3701. }
  3702. }
  3703. }
  3704. else if (ikMode[i] == 11)
  3705. {
  3706. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3707. {
  3708. mMaid[i].ido = 3;
  3709. mMaid[i].reset = true;
  3710. mMaidC[i].ido = 3;
  3711. mMaidC[i].reset = true;
  3712. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3713. }
  3714. else
  3715. {
  3716. if (!gMaid[i])
  3717. {
  3718. SetIKInit3(i);
  3719. }
  3720. gMaid[i].transform.position =
  3721. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3722. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3723. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3724. gMaid[i].transform.eulerAngles =
  3725. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3726. Spine0a2[i].transform.eulerAngles.y,
  3727. Spine0a2[i].transform.eulerAngles.z + 90f);
  3728. mMaid[i].maid = maid;
  3729. mMaid[i].ido = 3;
  3730. gMaidC[i].transform.position = maid.transform.position;
  3731. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3732. mMaidC[i].maid = maid;
  3733. mMaidC[i].ido = 3;
  3734. if (isCube)
  3735. {
  3736. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3737. gMaidC[i].SetActive(true);
  3738. }
  3739. else
  3740. {
  3741. gMaidC[i].SetActive(false);
  3742. }
  3743. gHandL[i].SetActive(false);
  3744. gArmL[i].SetActive(false);
  3745. gFootL[i].SetActive(false);
  3746. gHizaL[i].SetActive(false);
  3747. gHandR[i].SetActive(false);
  3748. gArmR[i].SetActive(false);
  3749. gFootR[i].SetActive(false);
  3750. gHizaR[i].SetActive(false);
  3751. gClavicleL[i].SetActive(false);
  3752. gClavicleR[i].SetActive(false);
  3753. gNeck[i].SetActive(false);
  3754. gSpine[i].SetActive(false);
  3755. gSpine0a[i].SetActive(false);
  3756. gSpine1a[i].SetActive(false);
  3757. gSpine1[i].SetActive(false);
  3758. gPelvis[i].SetActive(false);
  3759. }
  3760. if (mMaid[i].isSelect)
  3761. {
  3762. mMaid[i].isSelect = false;
  3763. if (ikMaid != i)
  3764. {
  3765. ikMaid = i;
  3766. ikBui = 5;
  3767. SetIK(maid, i);
  3768. }
  3769. }
  3770. }
  3771. else if (ikMode[i] == 12)
  3772. {
  3773. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3774. {
  3775. mMaid[i].ido = 2;
  3776. mMaid[i].reset = true;
  3777. mMaidC[i].ido = 2;
  3778. mMaidC[i].reset = true;
  3779. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3780. }
  3781. else
  3782. {
  3783. if (!gMaid[i])
  3784. {
  3785. SetIKInit3(i);
  3786. }
  3787. gMaid[i].transform.position =
  3788. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3789. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3790. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3791. gMaid[i].transform.eulerAngles =
  3792. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3793. Spine0a2[i].transform.eulerAngles.y,
  3794. Spine0a2[i].transform.eulerAngles.z + 90f);
  3795. mMaid[i].maid = maid;
  3796. mMaid[i].ido = 2;
  3797. gMaidC[i].transform.position = maid.transform.position;
  3798. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3799. mMaidC[i].maid = maid;
  3800. mMaidC[i].ido = 2;
  3801. if (isCube)
  3802. {
  3803. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3804. gMaidC[i].SetActive(true);
  3805. }
  3806. else
  3807. {
  3808. gMaidC[i].SetActive(false);
  3809. }
  3810. gHandL[i].SetActive(false);
  3811. gArmL[i].SetActive(false);
  3812. gFootL[i].SetActive(false);
  3813. gHizaL[i].SetActive(false);
  3814. gHandR[i].SetActive(false);
  3815. gArmR[i].SetActive(false);
  3816. gFootR[i].SetActive(false);
  3817. gHizaR[i].SetActive(false);
  3818. gClavicleL[i].SetActive(false);
  3819. gClavicleR[i].SetActive(false);
  3820. gNeck[i].SetActive(false);
  3821. gSpine[i].SetActive(false);
  3822. gSpine0a[i].SetActive(false);
  3823. gSpine1a[i].SetActive(false);
  3824. gSpine1[i].SetActive(false);
  3825. gPelvis[i].SetActive(false);
  3826. }
  3827. if (mMaid[i].isSelect)
  3828. {
  3829. mMaid[i].isSelect = false;
  3830. if (ikMaid != i)
  3831. {
  3832. ikMaid = i;
  3833. ikBui = 5;
  3834. SetIK(maid, i);
  3835. }
  3836. }
  3837. }
  3838. else if (ikMode[i] == 10)
  3839. {
  3840. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3841. {
  3842. mMaid[i].ido = 1;
  3843. mMaid[i].reset = true;
  3844. mMaidC[i].ido = 1;
  3845. mMaidC[i].reset = true;
  3846. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3847. }
  3848. else
  3849. {
  3850. if (!gMaid[i])
  3851. {
  3852. SetIKInit3(i);
  3853. }
  3854. gMaid[i].transform.position =
  3855. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3856. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3857. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3858. gMaid[i].transform.eulerAngles =
  3859. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3860. Spine0a2[i].transform.eulerAngles.y,
  3861. Spine0a2[i].transform.eulerAngles.z + 90f);
  3862. mMaid[i].maid = maid;
  3863. mMaid[i].ido = 1;
  3864. gMaidC[i].transform.position = maid.transform.position;
  3865. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3866. mMaidC[i].maid = maid;
  3867. mMaidC[i].ido = 1;
  3868. if (isCube)
  3869. {
  3870. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3871. gMaidC[i].SetActive(true);
  3872. }
  3873. else
  3874. {
  3875. gMaidC[i].SetActive(false);
  3876. }
  3877. gHandL[i].SetActive(false);
  3878. gArmL[i].SetActive(false);
  3879. gFootL[i].SetActive(false);
  3880. gHizaL[i].SetActive(false);
  3881. gHandR[i].SetActive(false);
  3882. gArmR[i].SetActive(false);
  3883. gFootR[i].SetActive(false);
  3884. gHizaR[i].SetActive(false);
  3885. gClavicleL[i].SetActive(false);
  3886. gClavicleR[i].SetActive(false);
  3887. gNeck[i].SetActive(false);
  3888. gSpine[i].SetActive(false);
  3889. gSpine0a[i].SetActive(false);
  3890. gSpine1a[i].SetActive(false);
  3891. gSpine1[i].SetActive(false);
  3892. gPelvis[i].SetActive(false);
  3893. }
  3894. if (mMaid[i].isSelect)
  3895. {
  3896. mMaid[i].isSelect = false;
  3897. if (ikMaid != i)
  3898. {
  3899. ikMaid = i;
  3900. ikBui = 5;
  3901. SetIK(maid, i);
  3902. }
  3903. }
  3904. }
  3905. else if (ikMode[i] == 9)
  3906. {
  3907. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3908. {
  3909. mMaid[i].ido = 4;
  3910. mMaid[i].reset = true;
  3911. mMaidC[i].ido = 4;
  3912. mMaidC[i].reset = true;
  3913. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3914. }
  3915. else
  3916. {
  3917. if (!gMaid[i])
  3918. {
  3919. SetIKInit3(i);
  3920. }
  3921. gMaid[i].transform.position =
  3922. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3923. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3924. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3925. gMaid[i].transform.eulerAngles =
  3926. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3927. Spine0a2[i].transform.eulerAngles.y,
  3928. Spine0a2[i].transform.eulerAngles.z + 90f);
  3929. mMaid[i].maid = maid;
  3930. mMaid[i].ido = 4;
  3931. gMaidC[i].transform.position = maid.transform.position;
  3932. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3933. mMaidC[i].maid = maid;
  3934. mMaidC[i].ido = 4;
  3935. if (isCube)
  3936. {
  3937. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3938. gMaidC[i].SetActive(true);
  3939. }
  3940. else
  3941. {
  3942. gMaidC[i].SetActive(false);
  3943. }
  3944. gHandL[i].SetActive(false);
  3945. gArmL[i].SetActive(false);
  3946. gFootL[i].SetActive(false);
  3947. gHizaL[i].SetActive(false);
  3948. gHandR[i].SetActive(false);
  3949. gArmR[i].SetActive(false);
  3950. gFootR[i].SetActive(false);
  3951. gHizaR[i].SetActive(false);
  3952. gClavicleL[i].SetActive(false);
  3953. gClavicleR[i].SetActive(false);
  3954. gNeck[i].SetActive(false);
  3955. gSpine[i].SetActive(false);
  3956. gSpine0a[i].SetActive(false);
  3957. gSpine1a[i].SetActive(false);
  3958. gSpine1[i].SetActive(false);
  3959. gPelvis[i].SetActive(false);
  3960. }
  3961. if (mMaid[i].isSelect)
  3962. {
  3963. mMaid[i].isSelect = false;
  3964. if (ikMaid != i)
  3965. {
  3966. ikMaid = i;
  3967. ikBui = 5;
  3968. SetIK(maid, i);
  3969. }
  3970. }
  3971. }
  3972. else if (ikMode[i] == 14)
  3973. {
  3974. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3975. {
  3976. mMaid[i].ido = 6;
  3977. mMaid[i].reset = true;
  3978. mMaidC[i].ido = 6;
  3979. mMaidC[i].reset = true;
  3980. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3981. }
  3982. else
  3983. {
  3984. if (!gMaid[i])
  3985. {
  3986. SetIKInit3(i);
  3987. }
  3988. gMaid[i].transform.position =
  3989. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3990. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3991. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3992. gMaid[i].transform.eulerAngles =
  3993. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3994. Spine0a2[i].transform.eulerAngles.y,
  3995. Spine0a2[i].transform.eulerAngles.z + 90f);
  3996. mMaid[i].maid = maid;
  3997. mMaid[i].ido = 6;
  3998. gMaidC[i].transform.position = maid.transform.position;
  3999. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  4000. mMaidC[i].maid = maid;
  4001. mMaidC[i].ido = 6;
  4002. if (isCube)
  4003. {
  4004. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  4005. gMaidC[i].SetActive(true);
  4006. }
  4007. else
  4008. {
  4009. gMaidC[i].SetActive(false);
  4010. }
  4011. gHandL[i].SetActive(false);
  4012. gArmL[i].SetActive(false);
  4013. gFootL[i].SetActive(false);
  4014. gHizaL[i].SetActive(false);
  4015. gHandR[i].SetActive(false);
  4016. gArmR[i].SetActive(false);
  4017. gFootR[i].SetActive(false);
  4018. gHizaR[i].SetActive(false);
  4019. gClavicleL[i].SetActive(false);
  4020. gClavicleR[i].SetActive(false);
  4021. gNeck[i].SetActive(false);
  4022. gSpine[i].SetActive(false);
  4023. gSpine0a[i].SetActive(false);
  4024. gSpine1a[i].SetActive(false);
  4025. gSpine1[i].SetActive(false);
  4026. gPelvis[i].SetActive(false);
  4027. }
  4028. if (mMaid[i].isSelect)
  4029. {
  4030. mMaid[i].isSelect = false;
  4031. if (ikMaid != i)
  4032. {
  4033. ikMaid = i;
  4034. ikBui = 5;
  4035. SetIK(maid, i);
  4036. }
  4037. }
  4038. }
  4039. else if (ikMode[i] == 6)
  4040. {
  4041. if (!gFinger[i, 0])
  4042. {
  4043. SetIKInit2(i);
  4044. }
  4045. Destroy(gMaid[i]);
  4046. Destroy(gMaidC[i]);
  4047. Destroy(gHead[i]);
  4048. Destroy(gJotai[i]);
  4049. Destroy(gKahuku[i]);
  4050. gHandL[i].SetActive(false);
  4051. gArmL[i].SetActive(false);
  4052. gFootL[i].SetActive(false);
  4053. gHizaL[i].SetActive(false);
  4054. gHandR[i].SetActive(false);
  4055. gArmR[i].SetActive(false);
  4056. gFootR[i].SetActive(false);
  4057. gHizaR[i].SetActive(false);
  4058. gClavicleL[i].SetActive(false);
  4059. gClavicleR[i].SetActive(false);
  4060. gNeck[i].SetActive(false);
  4061. gSpine[i].SetActive(false);
  4062. gSpine0a[i].SetActive(false);
  4063. gSpine1a[i].SetActive(false);
  4064. gSpine1[i].SetActive(false);
  4065. gPelvis[i].SetActive(false);
  4066. for (int j = 0; j < 10; j++)
  4067. {
  4068. mFinger[i, j * 3 + 2].maid = maid;
  4069. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4070. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 2].ido = 12;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3 + 2].ido = 15;
  4076. }
  4077. mFinger[i, j * 3 + 1].maid = maid;
  4078. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4079. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3 + 1].ido = 11;
  4082. if (j == 0 || j == 5)
  4083. {
  4084. mFinger[i, j * 3 + 1].ido = 14;
  4085. }
  4086. mFinger[i, j * 3].maid = maid;
  4087. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4088. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4089. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4090. mFinger[i, j * 3].ido = 13;
  4091. if (j == 0 || j == 5)
  4092. {
  4093. mFinger[i, j * 3].ido = 0;
  4094. }
  4095. gFinger[i, j * 3 + 2].SetActive(false);
  4096. gFinger[i, j * 3 + 1].SetActive(false);
  4097. gFinger[i, j * 3].SetActive(true);
  4098. gFinger[i, j * 3].SetActive(true);
  4099. mFinger[i, j * 3].ido = 16;
  4100. if (ikModeOld[i] != 6)
  4101. {
  4102. mFinger[i, j * 3].reset = true;
  4103. }
  4104. gFinger[i, j * 3 + 2].transform.position =
  4105. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4106. + Finger[i, j * 4 + 2].position) / 3f;
  4107. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4108. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4109. if (mFinger[i, j * 3 + 2].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3 + 2].isStop = false;
  4114. }
  4115. if (mFinger[i, j * 3 + 1].isStop)
  4116. {
  4117. isStop[i] = true;
  4118. isLock[i] = true;
  4119. mFinger[i, j * 3 + 1].isStop = false;
  4120. }
  4121. if (mFinger[i, j * 3].isStop)
  4122. {
  4123. isStop[i] = true;
  4124. isLock[i] = true;
  4125. mFinger[i, j * 3].isStop = false;
  4126. }
  4127. }
  4128. for (int j = 0; j < 6; j++)
  4129. {
  4130. mFinger2[i, j * 2 + 1].maid = maid;
  4131. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4132. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4133. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4134. mFinger2[i, j * 2 + 1].ido = 0;
  4135. mFinger2[i, j * 2].maid = maid;
  4136. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4137. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4138. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4139. mFinger2[i, j * 2].ido = 0;
  4140. gFinger2[i, j * 2 + 1].SetActive(false);
  4141. gFinger2[i, j * 2].SetActive(false);
  4142. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4143. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4144. if (mFinger2[i, j * 2 + 1].isStop)
  4145. {
  4146. isStop[i] = true;
  4147. isLock[i] = true;
  4148. mFinger2[i, j * 2 + 1].isStop = false;
  4149. }
  4150. if (mFinger2[i, j * 2].isStop)
  4151. {
  4152. isStop[i] = true;
  4153. isLock[i] = true;
  4154. mFinger2[i, j * 2].isStop = false;
  4155. }
  4156. }
  4157. }
  4158. else if (ikMode[i] == 4)
  4159. {
  4160. if (!gFinger[i, 0])
  4161. {
  4162. SetIKInit2(i);
  4163. }
  4164. Destroy(gMaid[i]);
  4165. Destroy(gMaidC[i]);
  4166. Destroy(gHead[i]);
  4167. Destroy(gJotai[i]);
  4168. Destroy(gKahuku[i]);
  4169. gHandL[i].SetActive(false);
  4170. gArmL[i].SetActive(false);
  4171. gFootL[i].SetActive(false);
  4172. gHizaL[i].SetActive(false);
  4173. gHandR[i].SetActive(false);
  4174. gArmR[i].SetActive(false);
  4175. gFootR[i].SetActive(false);
  4176. gHizaR[i].SetActive(false);
  4177. gClavicleL[i].SetActive(false);
  4178. gClavicleR[i].SetActive(false);
  4179. gNeck[i].SetActive(false);
  4180. gSpine[i].SetActive(false);
  4181. gSpine0a[i].SetActive(false);
  4182. gSpine1a[i].SetActive(false);
  4183. gSpine1[i].SetActive(false);
  4184. gPelvis[i].SetActive(false);
  4185. for (int j = 0; j < 10; j++)
  4186. {
  4187. mFinger[i, j * 3 + 2].maid = maid;
  4188. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4189. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4190. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 2].ido = 12;
  4192. mFinger[i, j * 3 + 2].onFlg = true;
  4193. if (j == 0 || j == 5)
  4194. {
  4195. mFinger[i, j * 3 + 2].ido = 15;
  4196. }
  4197. mFinger[i, j * 3 + 1].maid = maid;
  4198. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4199. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4200. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3 + 1].ido = 11;
  4202. mFinger[i, j * 3 + 1].onFlg = true;
  4203. if (j == 0 || j == 5)
  4204. {
  4205. mFinger[i, j * 3 + 1].ido = 14;
  4206. }
  4207. mFinger[i, j * 3].maid = maid;
  4208. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4209. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4210. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4211. mFinger[i, j * 3].ido = 13;
  4212. mFinger[i, j * 3].onFlg = true;
  4213. if (j == 0 || j == 5)
  4214. {
  4215. mFinger[i, j * 3].ido = 0;
  4216. }
  4217. if (ikModeOld[i] != 4)
  4218. {
  4219. mFinger[i, j * 3].reset = true;
  4220. }
  4221. gFinger[i, j * 3 + 2].SetActive(true);
  4222. gFinger[i, j * 3 + 1].SetActive(true);
  4223. gFinger[i, j * 3].SetActive(true);
  4224. gFinger[i, j * 3 + 2].transform.position =
  4225. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4226. + Finger[i, j * 4 + 2].position) / 3f;
  4227. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4228. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4229. if (mFinger[i, j * 3 + 2].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3 + 2].isStop = false;
  4234. }
  4235. if (mFinger[i, j * 3 + 1].isStop)
  4236. {
  4237. isStop[i] = true;
  4238. isLock[i] = true;
  4239. mFinger[i, j * 3 + 1].isStop = false;
  4240. }
  4241. if (mFinger[i, j * 3].isStop)
  4242. {
  4243. isStop[i] = true;
  4244. isLock[i] = true;
  4245. mFinger[i, j * 3].isStop = false;
  4246. }
  4247. }
  4248. for (int j = 0; j < 6; j++)
  4249. {
  4250. mFinger2[i, j * 2 + 1].maid = maid;
  4251. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4252. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4253. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4254. mFinger2[i, j * 2 + 1].ido = 17;
  4255. mFinger2[i, j * 2].maid = maid;
  4256. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4257. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4258. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4259. mFinger2[i, j * 2].ido = 0;
  4260. gFinger2[i, j * 2 + 1].SetActive(true);
  4261. gFinger2[i, j * 2].SetActive(true);
  4262. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4263. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4264. if (mFinger2[i, j * 2 + 1].isStop)
  4265. {
  4266. isStop[i] = true;
  4267. isLock[i] = true;
  4268. mFinger2[i, j * 2 + 1].isStop = false;
  4269. }
  4270. if (mFinger2[i, j * 2].isStop)
  4271. {
  4272. isStop[i] = true;
  4273. isLock[i] = true;
  4274. mFinger2[i, j * 2].isStop = false;
  4275. }
  4276. }
  4277. }
  4278. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4279. {
  4280. mHandL[i].ido = 0;
  4281. mHandR[i].ido = 0;
  4282. mFootL[i].ido = 0;
  4283. mFootR[i].ido = 0;
  4284. mHizaL[i].ido = 0;
  4285. mHizaR[i].ido = 0;
  4286. mHandL[i].reset = true;
  4287. mHandR[i].reset = true;
  4288. mFootL[i].reset = true;
  4289. mFootR[i].reset = true;
  4290. mHizaL[i].reset = true;
  4291. mHizaR[i].reset = true;
  4292. }
  4293. else
  4294. {
  4295. if (gFinger[i, 0])
  4296. {
  4297. for (int j = 0; j < 30; j++)
  4298. {
  4299. gFinger[i, j].SetActive(false);
  4300. }
  4301. for (int j = 0; j < 12; j++)
  4302. {
  4303. gFinger2[i, j].SetActive(false);
  4304. }
  4305. }
  4306. Destroy(gHead[i]);
  4307. Destroy(gJotai[i]);
  4308. Destroy(gKahuku[i]);
  4309. Destroy(gIKHandL[i]);
  4310. Destroy(gIKHandR[i]);
  4311. Destroy(gIKMuneL[i]);
  4312. Destroy(gIKMuneR[i]);
  4313. Destroy(gHead2[i]);
  4314. Destroy(gMaid2[i]);
  4315. gHandL[i].SetActive(true);
  4316. gArmL[i].SetActive(true);
  4317. gFootL[i].SetActive(true);
  4318. gHizaL[i].SetActive(true);
  4319. gHandR[i].SetActive(true);
  4320. gArmR[i].SetActive(true);
  4321. gFootR[i].SetActive(true);
  4322. gHizaR[i].SetActive(true);
  4323. mHandL[i].ido = 0;
  4324. mHandR[i].ido = 0;
  4325. mFootL[i].ido = 0;
  4326. mFootR[i].ido = 0;
  4327. gClavicleL[i].SetActive(true);
  4328. gClavicleR[i].SetActive(true);
  4329. }
  4330. if (!isIK[i])
  4331. {
  4332. gHandL[i].SetActive(false);
  4333. gArmL[i].SetActive(false);
  4334. gFootL[i].SetActive(false);
  4335. gHizaL[i].SetActive(false);
  4336. gHandR[i].SetActive(false);
  4337. gArmR[i].SetActive(false);
  4338. gFootR[i].SetActive(false);
  4339. gHizaR[i].SetActive(false);
  4340. gClavicleL[i].SetActive(false);
  4341. gClavicleR[i].SetActive(false);
  4342. gNeck[i].SetActive(false);
  4343. gSpine[i].SetActive(false);
  4344. gSpine0a[i].SetActive(false);
  4345. gSpine1a[i].SetActive(false);
  4346. gSpine1[i].SetActive(false);
  4347. gPelvis[i].SetActive(false);
  4348. }
  4349. if (isIK[i])
  4350. {
  4351. mHandL[i].maid = maid;
  4352. mHandL[i].HandL = HandL1[i];
  4353. if (ikMode[i] == 2)
  4354. {
  4355. mHandL[i].UpperArmL = ForearmL1[i];
  4356. }
  4357. else
  4358. {
  4359. mHandL[i].UpperArmL = UpperArmL1[i];
  4360. if (ikModeOld[i] == 2 && isLock[i])
  4361. {
  4362. mHandL[i].OnMouseDown();
  4363. mHandL[i].isSelect = false;
  4364. }
  4365. }
  4366. mHandL[i].ForearmL = ForearmL1[i];
  4367. mArmL[i].maid = maid;
  4368. mArmL[i].HandL = ForearmL1[i];
  4369. mArmL[i].UpperArmL = UpperArmL1[i];
  4370. mArmL[i].ForearmL = UpperArmL1[i];
  4371. mArmL[i].onFlg = true;
  4372. if (mArmL[i].onFlg2)
  4373. {
  4374. mArmL[i].onFlg2 = false;
  4375. mHandL[i].initFlg = false;
  4376. }
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mHandL[i].initFlg = false;
  4380. mHandR[i].initFlg = false;
  4381. mFootL[i].initFlg = false;
  4382. mFootR[i].initFlg = false;
  4383. mHandL[i].onFlg = true;
  4384. mHandR[i].onFlg = true;
  4385. mFootL[i].onFlg = true;
  4386. mFootR[i].onFlg = true;
  4387. }
  4388. else
  4389. {
  4390. mHandL[i].onFlg = false;
  4391. mHandR[i].onFlg = false;
  4392. mFootL[i].onFlg = false;
  4393. mFootR[i].onFlg = false;
  4394. }
  4395. gHandL[i].transform.position = HandL1[i].position;
  4396. gArmL[i].transform.position = ForearmL1[i].position;
  4397. mClavicleL[i].maid = maid;
  4398. mClavicleL[i].HandL = UpperArmL1[i];
  4399. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4400. mClavicleL[i].ForearmL = ClavicleL1[i];
  4401. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4402. if (mHandL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mHandL[i].isStop = false;
  4407. }
  4408. if (mArmL[i].isStop)
  4409. {
  4410. isStop[i] = true;
  4411. isLock[i] = true;
  4412. mArmL[i].isStop = false;
  4413. }
  4414. if (mClavicleL[i].isStop)
  4415. {
  4416. isStop[i] = true;
  4417. isLock[i] = true;
  4418. mClavicleL[i].isStop = false;
  4419. }
  4420. mHandR[i].maid = maid;
  4421. mHandR[i].HandL = HandR1[i];
  4422. if (ikMode[i] == 2)
  4423. {
  4424. mHandR[i].UpperArmL = ForearmR1[i];
  4425. }
  4426. else
  4427. {
  4428. mHandR[i].UpperArmL = UpperArmR1[i];
  4429. if (ikModeOld[i] == 2 && isLock[i])
  4430. {
  4431. mHandR[i].OnMouseDown();
  4432. mHandR[i].isSelect = false;
  4433. }
  4434. }
  4435. mHandR[i].ForearmL = ForearmR1[i];
  4436. mArmR[i].maid = maid;
  4437. mArmR[i].HandL = ForearmR1[i];
  4438. mArmR[i].UpperArmL = UpperArmR1[i];
  4439. mArmR[i].ForearmL = UpperArmR1[i];
  4440. mArmR[i].onFlg = true;
  4441. if (mArmR[i].onFlg2)
  4442. {
  4443. mArmR[i].onFlg2 = false;
  4444. mHandR[i].initFlg = false;
  4445. }
  4446. gHandR[i].transform.position = HandR1[i].position;
  4447. gArmR[i].transform.position = ForearmR1[i].position;
  4448. mClavicleR[i].maid = maid;
  4449. mClavicleR[i].HandL = UpperArmR1[i];
  4450. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4451. mClavicleR[i].ForearmL = ClavicleR1[i];
  4452. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4453. if (mHandR[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mHandR[i].isStop = false;
  4458. }
  4459. if (mArmR[i].isStop)
  4460. {
  4461. isStop[i] = true;
  4462. isLock[i] = true;
  4463. mArmR[i].isStop = false;
  4464. }
  4465. if (mClavicleL[i].isStop)
  4466. {
  4467. isStop[i] = true;
  4468. isLock[i] = true;
  4469. mClavicleL[i].isStop = false;
  4470. }
  4471. mFootL[i].maid = maid;
  4472. mFootL[i].HandL = HandL2[i];
  4473. if (ikMode[i] == 2)
  4474. {
  4475. mFootL[i].UpperArmL = ForearmL2[i];
  4476. }
  4477. else
  4478. {
  4479. mFootL[i].UpperArmL = UpperArmL2[i];
  4480. if (ikModeOld[i] == 2 && isLock[i])
  4481. {
  4482. mFootL[i].OnMouseDown();
  4483. mFootL[i].isSelect = false;
  4484. }
  4485. }
  4486. mFootL[i].ForearmL = ForearmL2[i];
  4487. mHizaL[i].maid = maid;
  4488. mHizaL[i].HandL = ForearmL2[i];
  4489. mHizaL[i].UpperArmL = UpperArmL2[i];
  4490. mHizaL[i].ForearmL = UpperArmL2[i];
  4491. mHizaL[i].onFlg = true;
  4492. if (mHizaL[i].onFlg2)
  4493. {
  4494. mHizaL[i].onFlg2 = false;
  4495. mFootL[i].initFlg = false;
  4496. }
  4497. gFootL[i].transform.position = HandL2[i].position;
  4498. gHizaL[i].transform.position = ForearmL2[i].position;
  4499. if (mFootL[i].isStop)
  4500. {
  4501. isStop[i] = true;
  4502. isLock[i] = true;
  4503. mFootL[i].isStop = false;
  4504. }
  4505. if (mHizaL[i].isStop)
  4506. {
  4507. isStop[i] = true;
  4508. isLock[i] = true;
  4509. mHizaL[i].isStop = false;
  4510. }
  4511. mFootR[i].maid = maid;
  4512. mFootR[i].HandL = HandR2[i];
  4513. if (ikMode[i] == 2)
  4514. {
  4515. mFootR[i].UpperArmL = ForearmR2[i];
  4516. }
  4517. else
  4518. {
  4519. mFootR[i].UpperArmL = UpperArmR2[i];
  4520. if (ikModeOld[i] == 2 && isLock[i])
  4521. {
  4522. mFootR[i].OnMouseDown();
  4523. mFootR[i].isSelect = false;
  4524. }
  4525. }
  4526. mFootR[i].ForearmL = ForearmR2[i];
  4527. mHizaR[i].maid = maid;
  4528. mHizaR[i].HandL = ForearmR2[i];
  4529. mHizaR[i].UpperArmL = UpperArmR2[i];
  4530. mHizaR[i].ForearmL = UpperArmR2[i];
  4531. mHizaR[i].onFlg = true;
  4532. if (mHizaR[i].onFlg2)
  4533. {
  4534. mHizaR[i].onFlg2 = false;
  4535. mFootR[i].initFlg = false;
  4536. }
  4537. gFootR[i].transform.position = HandR2[i].position;
  4538. gHizaR[i].transform.position = ForearmR2[i].position;
  4539. if (mFootR[i].isStop)
  4540. {
  4541. isStop[i] = true;
  4542. isLock[i] = true;
  4543. mFootR[i].isStop = false;
  4544. }
  4545. if (mHizaR[i].isStop)
  4546. {
  4547. isStop[i] = true;
  4548. isLock[i] = true;
  4549. mHizaR[i].isStop = false;
  4550. }
  4551. bool flag13 = false;
  4552. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4553. || ikModeOld[i] == 14)
  4554. {
  4555. flag13 = true;
  4556. }
  4557. if (isBone[i])
  4558. {
  4559. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4560. || isChange[i])
  4561. {
  4562. float gizmoSizeSpine = 0.2f;
  4563. gizmoNeck[i].Visible = false;
  4564. gizmoFootL[i].Visible = false;
  4565. gizmoHandR[i].Visible = false;
  4566. gizmoHandL[i].Visible = false;
  4567. gizmoFootR[i].Visible = false;
  4568. gizmoPelvis[i].Visible = false;
  4569. if (ikMode[i] == 2 || ikMode[i] == 1)
  4570. {
  4571. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4572. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4573. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4574. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4575. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4576. if (ikMode[i] == 2)
  4577. {
  4578. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4579. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4580. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4581. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4582. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4583. if (isDragging)
  4584. {
  4585. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4586. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4587. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4588. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4589. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4590. }
  4591. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4592. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4596. gizmoNeck[i].Visible = true;
  4597. gizmoHandL[i].Visible = true;
  4598. gizmoHandR[i].Visible = true;
  4599. gizmoFootL[i].Visible = true;
  4600. gizmoFootR[i].Visible = true;
  4601. gNeck[i].SetActive(false);
  4602. gSpine[i].SetActive(false);
  4603. gSpine0a[i].SetActive(false);
  4604. gSpine1[i].SetActive(false);
  4605. gSpine1a[i].SetActive(false);
  4606. }
  4607. else
  4608. {
  4609. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4610. if (isDragging)
  4611. {
  4612. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4613. }
  4614. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4615. gizmoPelvis[i].Visible = true;
  4616. gPelvis[i].SetActive(false);
  4617. }
  4618. if (!isLock[i])
  4619. {
  4620. if (isDragging)
  4621. {
  4622. isStop[i] = true;
  4623. isLock[i] = true;
  4624. }
  4625. }
  4626. }
  4627. }
  4628. else
  4629. {
  4630. float gizmoSizeLimb = 0.25f;
  4631. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4632. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4633. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4634. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4635. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4636. if (ikMode[i] == 3)
  4637. {
  4638. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4639. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4640. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4641. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4642. if (isDragging)
  4643. {
  4644. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4645. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4646. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4647. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4648. }
  4649. else
  4650. {
  4651. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4652. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4653. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4654. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4655. }
  4656. }
  4657. else if (ikMode[i] == 5)
  4658. {
  4659. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4660. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4661. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4662. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4663. if (isDragging)
  4664. {
  4665. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4666. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4667. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4668. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4669. flag13 = true;
  4670. }
  4671. else
  4672. {
  4673. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4674. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4675. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4676. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4677. }
  4678. }
  4679. else if (ikMode[i] == 8)
  4680. {
  4681. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4682. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4683. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4684. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4685. if (isDragging)
  4686. {
  4687. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4688. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4689. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4690. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4691. flag13 = true;
  4692. }
  4693. else
  4694. {
  4695. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4696. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4697. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4698. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4699. }
  4700. }
  4701. gizmoHandL[i].Visible = true;
  4702. gizmoHandR[i].Visible = true;
  4703. gizmoFootL[i].Visible = true;
  4704. gizmoFootR[i].Visible = true;
  4705. gHandL[i].SetActive(false);
  4706. gFootL[i].SetActive(false);
  4707. gHandR[i].SetActive(false);
  4708. gFootR[i].SetActive(false);
  4709. if (!isLock[i])
  4710. {
  4711. if (isDragging)
  4712. {
  4713. isStop[i] = true;
  4714. isLock[i] = true;
  4715. }
  4716. }
  4717. }
  4718. if (isChange[i])
  4719. {
  4720. isChange[i] = false;
  4721. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4725. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4726. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4727. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4728. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4729. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4730. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4731. gHandL[i].GetComponent<Renderer>().enabled = true;
  4732. gHandR[i].GetComponent<Renderer>().enabled = true;
  4733. gArmL[i].GetComponent<Renderer>().enabled = true;
  4734. gArmR[i].GetComponent<Renderer>().enabled = true;
  4735. gFootL[i].GetComponent<Renderer>().enabled = true;
  4736. gFootR[i].GetComponent<Renderer>().enabled = true;
  4737. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4738. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4739. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4740. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4741. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4742. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4743. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4744. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4745. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4746. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4747. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4748. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4749. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4750. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4751. }
  4752. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4753. {
  4754. mNeck[i].ido = 1;
  4755. mNeck[i].reset = true;
  4756. mSpine[i].ido = 1;
  4757. mSpine[i].reset = true;
  4758. mSpine0a[i].ido = 1;
  4759. mSpine0a[i].reset = true;
  4760. mSpine1a[i].ido = 1;
  4761. mSpine1a[i].reset = true;
  4762. mSpine1[i].ido = 1;
  4763. mSpine1[i].reset = true;
  4764. mPelvis[i].ido = 1;
  4765. mPelvis[i].reset = true;
  4766. }
  4767. else if (ikMode[i] == 0)
  4768. {
  4769. gNeck[i].SetActive(true);
  4770. gSpine[i].SetActive(true);
  4771. gSpine0a[i].SetActive(true);
  4772. gSpine1a[i].SetActive(true);
  4773. gSpine1[i].SetActive(true);
  4774. gPelvis[i].SetActive(true);
  4775. if (mNeck[i].isHead)
  4776. {
  4777. mNeck[i].isHead = false;
  4778. isLookn[i] = isLook[i];
  4779. isLook[i] = !isLook[i];
  4780. }
  4781. mNeck[i].maid = maid;
  4782. mNeck[i].head = Neck[i];
  4783. mNeck[i].no = i;
  4784. mNeck[i].ido = 1;
  4785. gNeck[i].transform.position = Neck[i].position;
  4786. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4787. mSpine[i].maid = maid;
  4788. mSpine[i].head = Spine2[i];
  4789. mSpine[i].no = i;
  4790. mSpine[i].ido = 1;
  4791. gSpine[i].transform.position = Spine2[i].position;
  4792. gSpine[i].transform.eulerAngles =
  4793. new Vector3(Spine2[i].localEulerAngles.z,
  4794. Spine2[i].localEulerAngles.y,
  4795. Spine2[i].localEulerAngles.x);
  4796. mSpine0a[i].maid = maid;
  4797. mSpine0a[i].head = Spine0a2[i];
  4798. mSpine0a[i].no = i;
  4799. mSpine0a[i].ido = 1;
  4800. gSpine0a[i].transform.position = Spine0a2[i].position;
  4801. gSpine0a[i].transform.eulerAngles =
  4802. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4803. Spine0a2[i].localEulerAngles.x,
  4804. Spine0a2[i].localEulerAngles.y);
  4805. mSpine1a[i].maid = maid;
  4806. mSpine1a[i].head = Spine1a2[i];
  4807. mSpine1a[i].no = i;
  4808. mSpine1a[i].ido = 1;
  4809. gSpine1a[i].transform.position = Spine1a2[i].position;
  4810. gSpine1a[i].transform.localEulerAngles =
  4811. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4812. Spine1a2[i].localEulerAngles.x,
  4813. Spine1a2[i].localEulerAngles.y);
  4814. mSpine1[i].maid = maid;
  4815. mSpine1[i].head = Spine12[i];
  4816. mSpine1[i].no = i;
  4817. mSpine1[i].ido = 1;
  4818. gSpine1[i].transform.position = Spine12[i].position;
  4819. gSpine1[i].transform.localEulerAngles =
  4820. new Vector3(-Spine12[i].localEulerAngles.z,
  4821. Spine12[i].localEulerAngles.x,
  4822. Spine12[i].localEulerAngles.y);
  4823. mPelvis[i].maid = maid;
  4824. mPelvis[i].head = Pelvis2[i];
  4825. mPelvis[i].no = i;
  4826. mPelvis[i].ido = 1;
  4827. gPelvis[i].transform.position = Pelvis2[i].position;
  4828. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4829. if (mNeck[i].isIdo)
  4830. {
  4831. mNeck[i].isIdo = false;
  4832. isLock[i] = true;
  4833. }
  4834. if (mSpine[i].isIdo)
  4835. {
  4836. mSpine[i].isIdo = false;
  4837. flag13 = true;
  4838. isLock[i] = true;
  4839. }
  4840. if (mSpine0a[i].isIdo)
  4841. {
  4842. mSpine0a[i].isIdo = false;
  4843. flag13 = true;
  4844. isLock[i] = true;
  4845. }
  4846. if (mSpine1a[i].isIdo)
  4847. {
  4848. mSpine1a[i].isIdo = false;
  4849. flag13 = true;
  4850. isLock[i] = true;
  4851. }
  4852. if (mSpine1[i].isIdo)
  4853. {
  4854. mSpine1[i].isIdo = false;
  4855. flag13 = true;
  4856. isLock[i] = true;
  4857. }
  4858. if (mPelvis[i].isIdo)
  4859. {
  4860. mPelvis[i].isIdo = false;
  4861. flag13 = true;
  4862. isLock[i] = true;
  4863. }
  4864. if (mClavicleL[i].isIdo)
  4865. {
  4866. mClavicleL[i].isIdo = false;
  4867. flag13 = true;
  4868. isLock[i] = true;
  4869. }
  4870. if (mClavicleR[i].isIdo)
  4871. {
  4872. mClavicleR[i].isIdo = false;
  4873. flag13 = true;
  4874. isLock[i] = true;
  4875. }
  4876. }
  4877. }
  4878. else if (isChange[i])
  4879. {
  4880. isChange[i] = false;
  4881. gHandL[i].GetComponent<Renderer>().enabled = false;
  4882. gArmL[i].GetComponent<Renderer>().enabled = false;
  4883. gFootL[i].GetComponent<Renderer>().enabled = false;
  4884. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4885. gHandR[i].GetComponent<Renderer>().enabled = false;
  4886. gArmR[i].GetComponent<Renderer>().enabled = false;
  4887. gFootR[i].GetComponent<Renderer>().enabled = false;
  4888. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4889. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4890. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4891. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4892. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4893. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4894. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4895. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4896. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4897. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4898. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4899. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4900. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4901. gNeck[i].SetActive(false);
  4902. gSpine[i].SetActive(false);
  4903. gSpine0a[i].SetActive(false);
  4904. gSpine1a[i].SetActive(false);
  4905. gSpine1[i].SetActive(false);
  4906. gPelvis[i].SetActive(false);
  4907. gizmoHandL[i].Visible = false;
  4908. gizmoHandR[i].Visible = false;
  4909. gizmoFootL[i].Visible = false;
  4910. gizmoFootR[i].Visible = false;
  4911. gizmoNeck[i].Visible = false;
  4912. gizmoPelvis[i].Visible = false;
  4913. }
  4914. if (flag13)
  4915. {
  4916. mHandL[i].initFlg = false;
  4917. mHandR[i].initFlg = false;
  4918. mFootL[i].initFlg = false;
  4919. mFootR[i].initFlg = false;
  4920. }
  4921. }
  4922. ikModeOld[i] = ikMode[i];
  4923. bool flag14 = false;
  4924. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4925. {
  4926. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4927. {
  4928. for (int k = 0; k < 10; k++)
  4929. {
  4930. maid.transform.RotateAround(maid.transform.position,
  4931. Vector3.right,
  4932. -maid.transform.rotation.eulerAngles.x);
  4933. maid.transform.RotateAround(maid.transform.position,
  4934. Vector3.forward,
  4935. -maid.transform.rotation.eulerAngles.z);
  4936. }
  4937. flag14 = true;
  4938. }
  4939. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4940. {
  4941. maid.transform.RotateAround(maid.transform.position,
  4942. new Vector3(vector3.x, 0f, vector3.z),
  4943. 0.3f);
  4944. maid.transform.RotateAround(maid.transform.position,
  4945. new Vector3(vector2.x, 0f, vector2.z),
  4946. 0.3f);
  4947. flag14 = true;
  4948. }
  4949. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4950. {
  4951. maid.transform.RotateAround(maid.transform.position,
  4952. new Vector3(vector3.x, 0f, vector3.z),
  4953. 0.3f);
  4954. maid.transform.RotateAround(maid.transform.position,
  4955. new Vector3(vector2.x, 0f, vector2.z),
  4956. -0.3f);
  4957. flag14 = true;
  4958. }
  4959. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4960. {
  4961. maid.transform.RotateAround(maid.transform.position,
  4962. new Vector3(vector3.x, 0f, vector3.z),
  4963. -0.3f);
  4964. maid.transform.RotateAround(maid.transform.position,
  4965. new Vector3(vector2.x, 0f, vector2.z),
  4966. 0.3f);
  4967. flag14 = true;
  4968. }
  4969. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4970. {
  4971. maid.transform.RotateAround(maid.transform.position,
  4972. new Vector3(vector3.x, 0f, vector3.z),
  4973. -0.3f);
  4974. maid.transform.RotateAround(maid.transform.position,
  4975. new Vector3(vector2.x, 0f, vector2.z),
  4976. -0.3f);
  4977. flag14 = true;
  4978. }
  4979. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4980. {
  4981. maid.transform.RotateAround(maid.transform.position,
  4982. new Vector3(vector3.x, 0f, vector3.z),
  4983. 0.4f);
  4984. flag14 = true;
  4985. }
  4986. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4987. {
  4988. maid.transform.RotateAround(maid.transform.position,
  4989. new Vector3(vector3.x, 0f, vector3.z),
  4990. -0.4f);
  4991. flag14 = true;
  4992. }
  4993. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4994. {
  4995. maid.transform.RotateAround(maid.transform.position,
  4996. new Vector3(vector2.x, 0f, vector2.z),
  4997. 0.4f);
  4998. flag14 = true;
  4999. }
  5000. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  5001. {
  5002. maid.transform.RotateAround(maid.transform.position,
  5003. new Vector3(vector2.x, 0f, vector2.z),
  5004. -0.4f);
  5005. flag14 = true;
  5006. }
  5007. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  5008. {
  5009. maid.body0.transform.localRotation =
  5010. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5011. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5012. flag14 = true;
  5013. }
  5014. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5015. {
  5016. maid.body0.transform.localRotation =
  5017. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5018. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5019. flag14 = true;
  5020. }
  5021. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5022. {
  5023. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5024. flag14 = true;
  5025. }
  5026. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5027. {
  5028. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5029. flag14 = true;
  5030. }
  5031. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5032. {
  5033. Vector3 vector = maid.transform.position;
  5034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5035. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5036. maid.SetPos(vector);
  5037. flag14 = true;
  5038. }
  5039. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5040. {
  5041. Vector3 vector = maid.transform.position;
  5042. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5043. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5044. maid.SetPos(vector);
  5045. flag14 = true;
  5046. }
  5047. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5048. {
  5049. Vector3 vector = maid.transform.position;
  5050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5052. maid.SetPos(vector);
  5053. flag14 = true;
  5054. }
  5055. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5056. {
  5057. Vector3 vector = maid.transform.position;
  5058. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5059. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5060. maid.SetPos(vector);
  5061. flag14 = true;
  5062. }
  5063. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5064. {
  5065. Vector3 vector = maid.transform.position;
  5066. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5067. maid.SetPos(vector);
  5068. flag14 = true;
  5069. }
  5070. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5071. {
  5072. Vector3 vector = maid.transform.position;
  5073. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5074. maid.SetPos(vector);
  5075. flag14 = true;
  5076. }
  5077. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5078. {
  5079. Vector3 vector = maid.transform.position;
  5080. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5081. maid.SetPos(vector);
  5082. flag14 = true;
  5083. }
  5084. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5085. {
  5086. Vector3 vector = maid.transform.position;
  5087. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5088. maid.SetPos(vector);
  5089. flag14 = true;
  5090. }
  5091. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5092. {
  5093. Vector3 vector = maid.transform.position;
  5094. vector.y += 0.0075f * speed;
  5095. maid.SetPos(vector);
  5096. flag14 = true;
  5097. }
  5098. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5099. {
  5100. Vector3 vector = maid.transform.position;
  5101. vector.y -= 0.0075f * speed;
  5102. maid.SetPos(vector);
  5103. flag14 = true;
  5104. }
  5105. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5106. {
  5107. maid.transform.localScale =
  5108. new Vector3(maid.transform.localScale.x * 1.005f,
  5109. maid.transform.localScale.y * 1.005f,
  5110. maid.transform.localScale.z * 1.005f);
  5111. flag14 = true;
  5112. }
  5113. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5114. {
  5115. maid.transform.localScale =
  5116. new Vector3(maid.transform.localScale.x * 0.995f,
  5117. maid.transform.localScale.y * 0.995f,
  5118. maid.transform.localScale.z * 0.995f);
  5119. flag14 = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5122. {
  5123. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5124. flag14 = true;
  5125. }
  5126. }
  5127. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5128. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5129. && i == ikMaid)
  5130. {
  5131. if (Input.GetKey(KeyCode.I))
  5132. {
  5133. if (ikMode[i] == 0)
  5134. {
  5135. Vector3 vector5 = HandL.position;
  5136. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5137. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5138. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5139. }
  5140. else if (ikMode[i] == 2)
  5141. {
  5142. Vector3 vector5 = HandL.position;
  5143. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5144. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5145. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5146. }
  5147. else if (ikMode[i] == 3)
  5148. {
  5149. if (ikBui == 1 || ikBui == 2)
  5150. {
  5151. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5152. }
  5153. else
  5154. {
  5155. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5156. }
  5157. }
  5158. else if (ikMode[i] == 4)
  5159. {
  5160. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5161. }
  5162. else if (ikMode[i] == 8)
  5163. {
  5164. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5165. }
  5166. else if (ikMode[i] == 6)
  5167. {
  5168. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5169. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5170. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5171. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5172. }
  5173. else if (ikMode[i] == 7)
  5174. {
  5175. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5176. }
  5177. else if (ikMode[i] == 5)
  5178. {
  5179. Vector3 vector5 = ForearmL.position;
  5180. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5181. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5182. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5183. }
  5184. else
  5185. {
  5186. Vector3 vector5 = ForearmL.position;
  5187. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5188. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5189. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5190. }
  5191. isStop[i] = true;
  5192. isLock[i] = true;
  5193. }
  5194. else if (Input.GetKey(KeyCode.K))
  5195. {
  5196. if (ikMode[i] == 0)
  5197. {
  5198. Vector3 vector5 = HandL.position;
  5199. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5200. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5201. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5202. }
  5203. else if (ikMode[i] == 2)
  5204. {
  5205. Vector3 vector5 = HandL.position;
  5206. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5207. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5208. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5209. }
  5210. else if (ikMode[i] == 3)
  5211. {
  5212. if (ikBui == 1 || ikBui == 2)
  5213. {
  5214. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5215. }
  5216. else
  5217. {
  5218. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5219. }
  5220. }
  5221. else if (ikMode[i] == 4)
  5222. {
  5223. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5224. }
  5225. else if (ikMode[i] == 8)
  5226. {
  5227. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5228. }
  5229. else if (ikMode[i] == 6)
  5230. {
  5231. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5232. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5233. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5234. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5235. }
  5236. else if (ikMode[i] == 7)
  5237. {
  5238. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5239. }
  5240. else if (ikMode[i] == 5)
  5241. {
  5242. Vector3 vector5 = ForearmL.position;
  5243. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5244. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5245. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5246. }
  5247. else
  5248. {
  5249. Vector3 vector5 = ForearmL.position;
  5250. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5251. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5252. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5253. }
  5254. isStop[i] = true;
  5255. isLock[i] = true;
  5256. }
  5257. else if (Input.GetKey(KeyCode.J))
  5258. {
  5259. if (ikMode[i] == 0)
  5260. {
  5261. Vector3 vector5 = HandL.position;
  5262. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5263. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5264. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5265. }
  5266. else if (ikMode[i] == 2)
  5267. {
  5268. Vector3 vector5 = HandL.position;
  5269. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5270. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5271. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5272. }
  5273. else if (ikMode[i] == 3)
  5274. {
  5275. if (ikBui == 1 || ikBui == 2)
  5276. {
  5277. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5278. }
  5279. else
  5280. {
  5281. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5282. }
  5283. }
  5284. else if (ikMode[i] == 4)
  5285. {
  5286. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5287. }
  5288. else if (ikMode[i] == 8)
  5289. {
  5290. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5291. }
  5292. else if (ikMode[i] == 6)
  5293. {
  5294. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5295. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5296. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5297. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5298. }
  5299. else if (ikMode[i] == 7)
  5300. {
  5301. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5302. }
  5303. else if (ikMode[i] == 5)
  5304. {
  5305. Vector3 vector5 = ForearmL.position;
  5306. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5307. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5308. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5309. }
  5310. else
  5311. {
  5312. Vector3 vector5 = ForearmL.position;
  5313. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5314. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5315. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5316. }
  5317. isStop[i] = true;
  5318. isLock[i] = true;
  5319. }
  5320. else if (Input.GetKey(KeyCode.L))
  5321. {
  5322. if (ikMode[i] == 0)
  5323. {
  5324. Vector3 vector5 = HandL.position;
  5325. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5326. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5327. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5328. }
  5329. else if (ikMode[i] == 2)
  5330. {
  5331. Vector3 vector5 = HandL.position;
  5332. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5333. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5334. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5335. }
  5336. else if (ikMode[i] == 3)
  5337. {
  5338. if (ikBui == 1 || ikBui == 2)
  5339. {
  5340. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5341. }
  5342. else
  5343. {
  5344. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5345. }
  5346. }
  5347. else if (ikMode[i] == 4)
  5348. {
  5349. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5350. }
  5351. else if (ikMode[i] == 8)
  5352. {
  5353. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5354. }
  5355. else if (ikMode[i] == 6)
  5356. {
  5357. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5358. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5359. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5360. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5361. }
  5362. else if (ikMode[i] == 7)
  5363. {
  5364. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5365. }
  5366. else if (ikMode[i] == 5)
  5367. {
  5368. Vector3 vector5 = ForearmL.position;
  5369. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5370. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5371. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5372. }
  5373. else
  5374. {
  5375. Vector3 vector5 = ForearmL.position;
  5376. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5377. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5378. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5379. }
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (Input.GetKey(KeyCode.U))
  5384. {
  5385. if (ikMode[i] == 3)
  5386. {
  5387. HandL.localRotation =
  5388. Quaternion.Euler(HandL.localEulerAngles)
  5389. * Quaternion.AngleAxis(1f, Vector3.right);
  5390. isStop[i] = true;
  5391. isLock[i] = true;
  5392. }
  5393. else if (ikMode[i] == 4)
  5394. {
  5395. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5396. isStop[i] = true;
  5397. isLock[i] = true;
  5398. }
  5399. else if (ikMode[i] == 8)
  5400. {
  5401. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5402. isStop[i] = true;
  5403. isLock[i] = true;
  5404. }
  5405. else if (ikMode[i] == 6)
  5406. {
  5407. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5408. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5409. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5410. isStop[i] = true;
  5411. isLock[i] = true;
  5412. }
  5413. else if (ikMode[i] == 7)
  5414. {
  5415. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5416. isStop[i] = true;
  5417. isLock[i] = true;
  5418. }
  5419. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5420. {
  5421. UpperArmL.localRotation =
  5422. Quaternion.Euler(UpperArmL.localEulerAngles)
  5423. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5424. isStop[i] = true;
  5425. isLock[i] = true;
  5426. }
  5427. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5428. {
  5429. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5430. isStop[i] = true;
  5431. isLock[i] = true;
  5432. }
  5433. }
  5434. else if (Input.GetKey(KeyCode.O))
  5435. {
  5436. if (ikMode[i] == 3)
  5437. {
  5438. HandL.localRotation =
  5439. Quaternion.Euler(HandL.localEulerAngles)
  5440. * Quaternion.AngleAxis(-1f, Vector3.right);
  5441. isStop[i] = true;
  5442. isLock[i] = true;
  5443. }
  5444. else if (ikMode[i] == 4)
  5445. {
  5446. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5447. isStop[i] = true;
  5448. isLock[i] = true;
  5449. }
  5450. else if (ikMode[i] == 8)
  5451. {
  5452. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5453. isStop[i] = true;
  5454. isLock[i] = true;
  5455. }
  5456. else if (ikMode[i] == 6)
  5457. {
  5458. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5459. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5460. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5461. isStop[i] = true;
  5462. isLock[i] = true;
  5463. }
  5464. else if (ikMode[i] == 7)
  5465. {
  5466. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5467. isStop[i] = true;
  5468. isLock[i] = true;
  5469. }
  5470. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5471. {
  5472. UpperArmL.localRotation =
  5473. Quaternion.Euler(UpperArmL.localEulerAngles)
  5474. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5475. isStop[i] = true;
  5476. isLock[i] = true;
  5477. }
  5478. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5479. {
  5480. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5481. isStop[i] = true;
  5482. isLock[i] = true;
  5483. }
  5484. }
  5485. else if (Input.GetKey(KeyCode.Alpha0))
  5486. {
  5487. if (ikMode[i] == 0)
  5488. {
  5489. Vector3 vector5 = HandL.position;
  5490. vector5.y += 0.005f;
  5491. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5492. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5493. }
  5494. else if (ikMode[i] == 2)
  5495. {
  5496. Vector3 vector5 = HandL.position;
  5497. vector5.y += 0.005f;
  5498. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5499. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5500. }
  5501. else if (ikMode[i] == 5)
  5502. {
  5503. Vector3 vector5 = ForearmL.position;
  5504. vector5.y += 0.0035f;
  5505. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5506. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5507. }
  5508. else
  5509. {
  5510. Vector3 vector5 = ForearmL.position;
  5511. vector5.y += 0.0035f;
  5512. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5513. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5514. }
  5515. isStop[i] = true;
  5516. isLock[i] = true;
  5517. }
  5518. else if (Input.GetKey(KeyCode.P))
  5519. {
  5520. if (ikMode[i] == 0)
  5521. {
  5522. Vector3 vector5 = HandL.position;
  5523. vector5.y -= 0.005f;
  5524. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5525. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5526. }
  5527. else if (ikMode[i] == 2)
  5528. {
  5529. Vector3 vector5 = HandL.position;
  5530. vector5.y -= 0.005f;
  5531. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5532. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5533. }
  5534. else if (ikMode[i] == 5)
  5535. {
  5536. Vector3 vector5 = ForearmL.position;
  5537. vector5.y -= 0.0035f;
  5538. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5539. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5540. }
  5541. else
  5542. {
  5543. Vector3 vector5 = ForearmL.position;
  5544. vector5.y -= 0.0035f;
  5545. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5546. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5547. }
  5548. isStop[i] = true;
  5549. isLock[i] = true;
  5550. }
  5551. }
  5552. }
  5553. }
  5554. }
  5555. }
  5556. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5557. {
  5558. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5559. idoFlg[i] = true;
  5560. }
  5561. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5562. {
  5563. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5564. idoFlg[i] = true;
  5565. }
  5566. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5567. {
  5568. if (!xFlg[i])
  5569. {
  5570. xFlg[i] = true;
  5571. zFlg[i] = false;
  5572. if (maid.status.personal.uniqueName == "Pride")
  5573. {
  5574. string text = "s0_";
  5575. Random random = new Random();
  5576. int num4 = random.Next(10000);
  5577. bool flag7 = false;
  5578. for (int k = 0; k < tunArray.Length; k++)
  5579. {
  5580. if (tunArray[k] == num4)
  5581. {
  5582. flag7 = true;
  5583. break;
  5584. }
  5585. }
  5586. if (!flag7)
  5587. {
  5588. text = text + "0" + num4.ToString() + ".ogg";
  5589. if (GameUty.FileSystem.IsExistentFile(text))
  5590. {
  5591. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5592. }
  5593. }
  5594. }
  5595. if (maid.status.personal.uniqueName == "Cool")
  5596. {
  5597. string text = "s1_";
  5598. Random random = new Random();
  5599. int num4 = random.Next(10000);
  5600. bool flag7 = false;
  5601. for (int k = 0; k < coolArray.Length; k++)
  5602. {
  5603. if (coolArray[k] == num4)
  5604. {
  5605. flag7 = true;
  5606. break;
  5607. }
  5608. }
  5609. if (!flag7)
  5610. {
  5611. text = text + "0" + num4.ToString() + ".ogg";
  5612. if (GameUty.FileSystem.IsExistentFile(text))
  5613. {
  5614. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5615. }
  5616. }
  5617. }
  5618. if (maid.status.personal.uniqueName == "Pure")
  5619. {
  5620. string text = "s2_";
  5621. Random random = new Random();
  5622. int num4 = random.Next(10000);
  5623. bool flag7 = false;
  5624. for (int k = 0; k < pureArray.Length; k++)
  5625. {
  5626. if (pureArray[k] == num4)
  5627. {
  5628. flag7 = true;
  5629. break;
  5630. }
  5631. }
  5632. if (!flag7)
  5633. {
  5634. text = text + "0" + num4.ToString() + ".ogg";
  5635. if (GameUty.FileSystem.IsExistentFile(text))
  5636. {
  5637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5638. }
  5639. }
  5640. }
  5641. if (maid.status.personal.uniqueName == "Yandere")
  5642. {
  5643. string text = "s3_";
  5644. Random random = new Random();
  5645. int num4 = random.Next(10000);
  5646. bool flag7 = false;
  5647. for (int k = 0; k < yanArray.Length; k++)
  5648. {
  5649. if (yanArray[k] == num4)
  5650. {
  5651. flag7 = true;
  5652. break;
  5653. }
  5654. }
  5655. if (!flag7)
  5656. {
  5657. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5658. if (GameUty.FileSystem.IsExistentFile(text))
  5659. {
  5660. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5661. }
  5662. }
  5663. }
  5664. if (maid.status.personal.uniqueName == "Muku")
  5665. {
  5666. string text = "h0_";
  5667. Random random = new Random();
  5668. int num4 = random.Next(10000);
  5669. bool flag7 = false;
  5670. for (int k = 0; k < h0Array.Length; k++)
  5671. {
  5672. if (h0Array[k] == num4)
  5673. {
  5674. flag7 = true;
  5675. break;
  5676. }
  5677. }
  5678. if (flag7)
  5679. {
  5680. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5681. if (GameUty.FileSystem.IsExistentFile(text))
  5682. {
  5683. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5684. }
  5685. }
  5686. }
  5687. if (maid.status.personal.uniqueName == "Majime")
  5688. {
  5689. string text = "h1_";
  5690. Random random = new Random();
  5691. int num4 = random.Next(10000);
  5692. bool flag7 = false;
  5693. for (int k = 0; k < h1Array.Length; k++)
  5694. {
  5695. if (h1Array[k] == num4)
  5696. {
  5697. flag7 = true;
  5698. break;
  5699. }
  5700. }
  5701. if (flag7)
  5702. {
  5703. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5704. if (GameUty.FileSystem.IsExistentFile(text))
  5705. {
  5706. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5707. }
  5708. }
  5709. }
  5710. if (maid.status.personal.uniqueName == "Rindere")
  5711. {
  5712. string text = "h2_";
  5713. Random random = new Random();
  5714. int num4 = random.Next(10000);
  5715. bool flag7 = false;
  5716. for (int k = 0; k < h2Array.Length; k++)
  5717. {
  5718. if (h2Array[k] == num4)
  5719. {
  5720. flag7 = true;
  5721. break;
  5722. }
  5723. }
  5724. if (flag7)
  5725. {
  5726. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5727. if (GameUty.FileSystem.IsExistentFile(text))
  5728. {
  5729. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5730. }
  5731. }
  5732. }
  5733. }
  5734. else
  5735. {
  5736. xFlg[i] = false;
  5737. maid.AudioMan.Clear();
  5738. }
  5739. idoFlg[i] = true;
  5740. }
  5741. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5742. {
  5743. if (!zFlg[i])
  5744. {
  5745. zFlg[i] = true;
  5746. xFlg[i] = false;
  5747. string text = "";
  5748. if (maid.status.personal.uniqueName == "Pride")
  5749. {
  5750. text = "s0_";
  5751. Random random = new Random();
  5752. int num4 = random.Next(tunArray.Length);
  5753. object obj = text;
  5754. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5755. }
  5756. if (maid.status.personal.uniqueName == "Cool")
  5757. {
  5758. text = "s1_";
  5759. Random random = new Random();
  5760. int num4 = random.Next(coolArray.Length);
  5761. object obj = text;
  5762. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5763. }
  5764. if (maid.status.personal.uniqueName == "Pure")
  5765. {
  5766. text = "s2_";
  5767. Random random = new Random();
  5768. int num4 = random.Next(pureArray.Length);
  5769. object obj = text;
  5770. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5771. }
  5772. if (maid.status.personal.uniqueName == "Yandere")
  5773. {
  5774. text = "s3_";
  5775. Random random = new Random();
  5776. int num4 = random.Next(yanArray.Length);
  5777. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5778. }
  5779. if (maid.status.personal.uniqueName == "Muku")
  5780. {
  5781. text = "h0_";
  5782. Random random = new Random();
  5783. int num4 = random.Next(h0tArray.Length);
  5784. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5785. }
  5786. if (maid.status.personal.uniqueName == "Majime")
  5787. {
  5788. text = "h1_";
  5789. Random random = new Random();
  5790. int num4 = random.Next(h1tArray.Length);
  5791. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5792. }
  5793. if (maid.status.personal.uniqueName == "Rindere")
  5794. {
  5795. text = "h2_";
  5796. Random random = new Random();
  5797. int num4 = random.Next(h2tArray.Length);
  5798. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5799. }
  5800. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5801. }
  5802. else
  5803. {
  5804. zFlg[i] = false;
  5805. maid.AudioMan.Clear();
  5806. }
  5807. idoFlg[i] = true;
  5808. }
  5809. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5810. {
  5811. string text = "";
  5812. if (maid.status.personal.uniqueName == "Pride")
  5813. {
  5814. text = "s0_";
  5815. Random random = new Random();
  5816. int num4 = random.Next(tunArray.Length);
  5817. object obj = text;
  5818. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5819. }
  5820. if (maid.status.personal.uniqueName == "Cool")
  5821. {
  5822. text = "s1_";
  5823. Random random = new Random();
  5824. int num4 = random.Next(coolArray.Length);
  5825. object obj = text;
  5826. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5827. }
  5828. if (maid.status.personal.uniqueName == "Pure")
  5829. {
  5830. text = "s2_";
  5831. Random random = new Random();
  5832. int num4 = random.Next(pureArray.Length);
  5833. object obj = text;
  5834. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5835. }
  5836. if (maid.status.personal.uniqueName == "Yandere")
  5837. {
  5838. text = "s3_";
  5839. Random random = new Random();
  5840. int num4 = random.Next(yanArray.Length);
  5841. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5842. }
  5843. if (maid.status.personal.uniqueName == "Muku")
  5844. {
  5845. text = "h0_";
  5846. Random random = new Random();
  5847. int num4 = random.Next(h0tArray.Length);
  5848. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5849. }
  5850. if (maid.status.personal.uniqueName == "Majime")
  5851. {
  5852. text = "h1_";
  5853. Random random = new Random();
  5854. int num4 = random.Next(h1tArray.Length);
  5855. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5856. }
  5857. if (maid.status.personal.uniqueName == "Rindere")
  5858. {
  5859. text = "h2_";
  5860. Random random = new Random();
  5861. int num4 = random.Next(h2tArray.Length);
  5862. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5863. }
  5864. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5865. idoFlg[i] = true;
  5866. }
  5867. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5868. {
  5869. if (maid.status.personal.uniqueName == "Pride")
  5870. {
  5871. string text = "s0_";
  5872. Random random = new Random();
  5873. int num4 = random.Next(10000);
  5874. bool flag7 = false;
  5875. for (int k = 0; k < tunArray.Length; k++)
  5876. {
  5877. if (tunArray[k] == num4)
  5878. {
  5879. flag7 = true;
  5880. break;
  5881. }
  5882. }
  5883. if (!flag7)
  5884. {
  5885. text = text + "0" + num4.ToString() + ".ogg";
  5886. if (GameUty.FileSystem.IsExistentFile(text))
  5887. {
  5888. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5889. }
  5890. }
  5891. }
  5892. if (maid.status.personal.uniqueName == "Cool")
  5893. {
  5894. string text = "s1_";
  5895. Random random = new Random();
  5896. int num4 = random.Next(10000);
  5897. bool flag7 = false;
  5898. for (int k = 0; k < coolArray.Length; k++)
  5899. {
  5900. if (coolArray[k] == num4)
  5901. {
  5902. flag7 = true;
  5903. break;
  5904. }
  5905. }
  5906. if (!flag7)
  5907. {
  5908. text = text + "0" + num4.ToString() + ".ogg";
  5909. if (GameUty.FileSystem.IsExistentFile(text))
  5910. {
  5911. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5912. }
  5913. }
  5914. }
  5915. if (maid.status.personal.uniqueName == "Pure")
  5916. {
  5917. string text = "s2_";
  5918. Random random = new Random();
  5919. int num4 = random.Next(10000);
  5920. bool flag7 = false;
  5921. for (int k = 0; k < pureArray.Length; k++)
  5922. {
  5923. if (pureArray[k] == num4)
  5924. {
  5925. flag7 = true;
  5926. break;
  5927. }
  5928. }
  5929. if (!flag7)
  5930. {
  5931. text = text + "0" + num4.ToString() + ".ogg";
  5932. if (GameUty.FileSystem.IsExistentFile(text))
  5933. {
  5934. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5935. }
  5936. }
  5937. }
  5938. if (maid.status.personal.uniqueName == "Yandere")
  5939. {
  5940. string text = "s3_";
  5941. Random random = new Random();
  5942. int num4 = random.Next(10000);
  5943. bool flag7 = false;
  5944. for (int k = 0; k < yanArray.Length; k++)
  5945. {
  5946. if (yanArray[k] == num4)
  5947. {
  5948. flag7 = true;
  5949. break;
  5950. }
  5951. }
  5952. if (!flag7)
  5953. {
  5954. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5955. if (GameUty.FileSystem.IsExistentFile(text))
  5956. {
  5957. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5958. }
  5959. }
  5960. }
  5961. if (maid.status.personal.uniqueName == "Muku")
  5962. {
  5963. string text = "h0_";
  5964. Random random = new Random();
  5965. int num4 = random.Next(10000);
  5966. bool flag7 = false;
  5967. for (int k = 0; k < h0Array.Length; k++)
  5968. {
  5969. if (h0Array[k] == num4)
  5970. {
  5971. flag7 = true;
  5972. break;
  5973. }
  5974. }
  5975. if (flag7)
  5976. {
  5977. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5978. if (GameUty.FileSystem.IsExistentFile(text))
  5979. {
  5980. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5981. }
  5982. }
  5983. }
  5984. if (maid.status.personal.uniqueName == "Majime")
  5985. {
  5986. string text = "h1_";
  5987. Random random = new Random();
  5988. int num4 = random.Next(10000);
  5989. bool flag7 = false;
  5990. for (int k = 0; k < h1Array.Length; k++)
  5991. {
  5992. if (h1Array[k] == num4)
  5993. {
  5994. flag7 = true;
  5995. break;
  5996. }
  5997. }
  5998. if (flag7)
  5999. {
  6000. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6001. if (GameUty.FileSystem.IsExistentFile(text))
  6002. {
  6003. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6004. }
  6005. }
  6006. }
  6007. if (maid.status.personal.uniqueName == "Rindere")
  6008. {
  6009. string text = "h2_";
  6010. Random random = new Random();
  6011. int num4 = random.Next(10000);
  6012. bool flag7 = false;
  6013. for (int k = 0; k < h2Array.Length; k++)
  6014. {
  6015. if (h2Array[k] == num4)
  6016. {
  6017. flag7 = true;
  6018. break;
  6019. }
  6020. }
  6021. if (flag7)
  6022. {
  6023. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6024. if (GameUty.FileSystem.IsExistentFile(text))
  6025. {
  6026. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6027. }
  6028. }
  6029. }
  6030. idoFlg[i] = true;
  6031. }
  6032. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6033. {
  6034. Vector3 vector = maid.transform.position;
  6035. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6036. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6037. maid.SetPos(vector);
  6038. idoFlg[i] = true;
  6039. }
  6040. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6041. {
  6042. Vector3 vector = maid.transform.position;
  6043. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6044. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6045. maid.SetPos(vector);
  6046. idoFlg[i] = true;
  6047. }
  6048. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6049. {
  6050. Vector3 vector = maid.transform.position;
  6051. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6053. maid.SetPos(vector);
  6054. idoFlg[i] = true;
  6055. }
  6056. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6057. {
  6058. Vector3 vector = maid.transform.position;
  6059. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6060. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6061. maid.SetPos(vector);
  6062. idoFlg[i] = true;
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6065. {
  6066. Vector3 vector = maid.transform.position;
  6067. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6068. maid.SetPos(vector);
  6069. idoFlg[i] = true;
  6070. }
  6071. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6072. {
  6073. Vector3 vector = maid.transform.position;
  6074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6075. maid.SetPos(vector);
  6076. idoFlg[i] = true;
  6077. }
  6078. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6079. {
  6080. Vector3 vector = maid.transform.position;
  6081. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6082. maid.SetPos(vector);
  6083. idoFlg[i] = true;
  6084. }
  6085. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6086. {
  6087. Vector3 vector = maid.transform.position;
  6088. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6089. maid.SetPos(vector);
  6090. idoFlg[i] = true;
  6091. }
  6092. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6093. {
  6094. Vector3 vector = maid.transform.position;
  6095. vector.y += 0.0075f * speed;
  6096. maid.SetPos(vector);
  6097. idoFlg[i] = true;
  6098. }
  6099. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6100. {
  6101. Vector3 vector = maid.transform.position;
  6102. vector.y -= 0.0075f * speed;
  6103. maid.SetPos(vector);
  6104. idoFlg[i] = true;
  6105. }
  6106. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6107. {
  6108. faceIndex[i]--;
  6109. if (faceIndex[i] <= -1)
  6110. {
  6111. faceIndex[i] = faceArray.Length - 1;
  6112. }
  6113. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6114. idoFlg[i] = true;
  6115. }
  6116. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6117. {
  6118. faceIndex[i]++;
  6119. if (faceIndex[i] == faceArray.Length)
  6120. {
  6121. faceIndex[i] = 0;
  6122. }
  6123. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6124. idoFlg[i] = true;
  6125. }
  6126. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6127. {
  6128. faceBlendIndex[i]++;
  6129. if (faceBlendIndex[i] == faceBlendArray.Length)
  6130. {
  6131. faceBlendIndex[i] = 0;
  6132. }
  6133. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6134. idoFlg[i] = true;
  6135. }
  6136. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6137. {
  6138. idoFlg[i] = true;
  6139. if (i >= 7)
  6140. {
  6141. idoFlg[i - 7] = true;
  6142. }
  6143. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6144. maid.transform.localScale.y * 1.005f,
  6145. maid.transform.localScale.z * 1.005f);
  6146. }
  6147. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6148. {
  6149. idoFlg[i] = true;
  6150. if (i >= 7)
  6151. {
  6152. idoFlg[i - 7] = true;
  6153. }
  6154. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6155. maid.transform.localScale.y * 0.995f,
  6156. maid.transform.localScale.z * 0.995f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6159. {
  6160. idoFlg[i] = true;
  6161. if (i >= 7)
  6162. {
  6163. idoFlg[i - 7] = true;
  6164. }
  6165. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6166. }
  6167. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6168. {
  6169. if (!isVR)
  6170. {
  6171. if (goSlot[(int)selectList[i]] != null)
  6172. {
  6173. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6174. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6175. {
  6176. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6177. }
  6178. }
  6179. }
  6180. maid.body0.SetMask(TBody.SlotID.wear, true);
  6181. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6182. maid.body0.SetMask(TBody.SlotID.bra, true);
  6183. maid.body0.SetMask(TBody.SlotID.panz, true);
  6184. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6185. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6186. isWear = true;
  6187. isSkirt = true;
  6188. isBra = true;
  6189. isPanz = true;
  6190. Random random = new Random();
  6191. int num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.wear, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isWear = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isSkirt = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.bra, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isBra = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.panz, false);
  6222. }
  6223. if (num4 == 1)
  6224. {
  6225. isPanz = false;
  6226. }
  6227. num4 = random.Next(2);
  6228. if (num4 == 1)
  6229. {
  6230. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6231. }
  6232. num4 = random.Next(2);
  6233. if (num4 == 1)
  6234. {
  6235. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6236. }
  6237. hFlg = true;
  6238. idoFlg[i] = true;
  6239. if (i >= 7)
  6240. {
  6241. idoFlg[i - 7] = true;
  6242. }
  6243. }
  6244. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6245. {
  6246. poseIndex[i]--;
  6247. if (poseIndex[i] <= -1)
  6248. {
  6249. poseIndex[i] = poseArray.Length - 1;
  6250. }
  6251. if (maid && maid.Visible)
  6252. {
  6253. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6254. isStop[i] = false;
  6255. poseCount[i] = 20;
  6256. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6257. {
  6258. maid.body0.MuneYureL(0f);
  6259. maid.body0.MuneYureR(0f);
  6260. }
  6261. else
  6262. {
  6263. maid.body0.MuneYureL(1f);
  6264. maid.body0.MuneYureR(1f);
  6265. }
  6266. if (array[0].Contains("MultipleMaidsPose"))
  6267. {
  6268. string path = array[0].Split(new char[] { '/' })[1];
  6269. byte[] array2 = new byte[0];
  6270. try
  6271. {
  6272. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6273. {
  6274. array2 = new byte[fileStream.Length];
  6275. fileStream.Read(array2, 0, array2.Length);
  6276. }
  6277. }
  6278. catch { }
  6279. if (0 < array2.Length)
  6280. {
  6281. string text = Path.GetFileName(path);
  6282. long num5 = text.GetHashCode();
  6283. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6284. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6285. {
  6286. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6287. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6288. };
  6289. for (int m = 0; m < array3.Length; m++)
  6290. {
  6291. maid.SetAutoTwist(array3[m], true);
  6292. }
  6293. }
  6294. }
  6295. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6296. {
  6297. loadPose[i] = array[0];
  6298. }
  6299. else if (!array[0].StartsWith("dance_"))
  6300. {
  6301. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6302. }
  6303. else
  6304. {
  6305. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6306. {
  6307. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6308. }
  6309. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6310. }
  6311. if (array.Length > 1)
  6312. {
  6313. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6314. isStop[i] = true;
  6315. if (array.Length > 2)
  6316. {
  6317. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6318. isPoseIti[i] = true;
  6319. poseIti[i] = maidArray[i].transform.position;
  6320. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6321. }
  6322. }
  6323. }
  6324. idoFlg[i] = true;
  6325. if (i >= 7)
  6326. {
  6327. idoFlg[i - 7] = true;
  6328. }
  6329. }
  6330. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6331. {
  6332. int num7 = poseIndex[i];
  6333. for (int k = 0; k < groupList.Count; k++)
  6334. {
  6335. if (poseIndex[i] < (int)groupList[k])
  6336. {
  6337. poseIndex[i] = (int)groupList[k];
  6338. break;
  6339. }
  6340. }
  6341. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6342. {
  6343. poseIndex[i] = 0;
  6344. }
  6345. if (maid && maid.Visible)
  6346. {
  6347. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6348. isStop[i] = false;
  6349. poseCount[i] = 20;
  6350. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6351. {
  6352. maid.body0.MuneYureL(0f);
  6353. maid.body0.MuneYureR(0f);
  6354. }
  6355. else
  6356. {
  6357. maid.body0.MuneYureL(1f);
  6358. maid.body0.MuneYureR(1f);
  6359. }
  6360. if (array[0].Contains("MultipleMaidsPose"))
  6361. {
  6362. string path = array[0].Split(new char[] { '/' })[1];
  6363. byte[] array2 = new byte[0];
  6364. try
  6365. {
  6366. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6367. {
  6368. array2 = new byte[fileStream.Length];
  6369. fileStream.Read(array2, 0, array2.Length);
  6370. }
  6371. }
  6372. catch { }
  6373. if (0 < array2.Length)
  6374. {
  6375. string text = Path.GetFileName(path);
  6376. long num5 = text.GetHashCode();
  6377. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6378. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6379. {
  6380. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6381. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6382. };
  6383. for (int m = 0; m < array3.Length; m++)
  6384. {
  6385. maid.SetAutoTwist(array3[m], true);
  6386. }
  6387. }
  6388. }
  6389. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6390. {
  6391. loadPose[i] = array[0];
  6392. }
  6393. else if (!array[0].StartsWith("dance_"))
  6394. {
  6395. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6396. }
  6397. else
  6398. {
  6399. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6400. {
  6401. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6402. }
  6403. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6404. }
  6405. if (array.Length > 1)
  6406. {
  6407. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6408. isStop[i] = true;
  6409. if (array.Length > 2)
  6410. {
  6411. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6412. isPoseIti[i] = true;
  6413. poseIti[i] = maidArray[i].transform.position;
  6414. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6415. }
  6416. }
  6417. }
  6418. idoFlg[i] = true;
  6419. if (i >= 7)
  6420. {
  6421. idoFlg[i - 7] = true;
  6422. }
  6423. }
  6424. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6425. {
  6426. for (int k = 0; k < groupList.Count; k++)
  6427. {
  6428. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6429. {
  6430. if (poseIndex[i] == 0)
  6431. {
  6432. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6433. }
  6434. else
  6435. {
  6436. poseIndex[i] = 0;
  6437. }
  6438. break;
  6439. }
  6440. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6441. {
  6442. poseIndex[i] = (int)groupList[k - 1];
  6443. break;
  6444. }
  6445. }
  6446. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6447. {
  6448. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6449. }
  6450. if (maid && maid.Visible)
  6451. {
  6452. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6453. isStop[i] = false;
  6454. poseCount[i] = 20;
  6455. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6456. {
  6457. maid.body0.MuneYureL(0f);
  6458. maid.body0.MuneYureR(0f);
  6459. }
  6460. else
  6461. {
  6462. maid.body0.MuneYureL(1f);
  6463. maid.body0.MuneYureR(1f);
  6464. }
  6465. if (array[0].Contains("MultipleMaidsPose"))
  6466. {
  6467. string path = array[0].Split(new char[] { '/' })[1];
  6468. byte[] array2 = new byte[0];
  6469. try
  6470. {
  6471. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6472. {
  6473. array2 = new byte[fileStream.Length];
  6474. fileStream.Read(array2, 0, array2.Length);
  6475. }
  6476. }
  6477. catch { }
  6478. if (0 < array2.Length)
  6479. {
  6480. string text = Path.GetFileName(path);
  6481. long num5 = text.GetHashCode();
  6482. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6483. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6484. {
  6485. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6486. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6487. };
  6488. for (int m = 0; m < array3.Length; m++)
  6489. {
  6490. maid.SetAutoTwist(array3[m], true);
  6491. }
  6492. }
  6493. }
  6494. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6495. {
  6496. loadPose[i] = array[0];
  6497. }
  6498. else if (!array[0].StartsWith("dance_"))
  6499. {
  6500. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6501. }
  6502. else
  6503. {
  6504. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6505. {
  6506. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6507. }
  6508. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6509. }
  6510. if (array.Length > 1)
  6511. {
  6512. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6513. isStop[i] = true;
  6514. if (array.Length > 2)
  6515. {
  6516. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6517. isPoseIti[i] = true;
  6518. poseIti[i] = maidArray[i].transform.position;
  6519. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6520. }
  6521. }
  6522. }
  6523. idoFlg[i] = true;
  6524. if (i >= 7)
  6525. {
  6526. idoFlg[i - 7] = true;
  6527. }
  6528. }
  6529. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6530. {
  6531. headEyeIndex[i]++;
  6532. if (headEyeIndex[i] == headEyeArray.Length)
  6533. {
  6534. headEyeIndex[i] = 0;
  6535. }
  6536. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6537. maid.body0.boHeadToCam = true;
  6538. maid.body0.boEyeToCam = true;
  6539. if (headEyeIndex[i] == 0)
  6540. {
  6541. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6542. maid.body0.boHeadToCam = true;
  6543. maid.body0.boEyeToCam = true;
  6544. }
  6545. else
  6546. {
  6547. maid.body0.trsLookTarget = null;
  6548. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6549. if (headEyeIndex[i] == 1)
  6550. {
  6551. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6552. }
  6553. if (headEyeIndex[i] == 2)
  6554. {
  6555. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6556. }
  6557. if (headEyeIndex[i] == 3)
  6558. {
  6559. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6560. }
  6561. if (headEyeIndex[i] == 4)
  6562. {
  6563. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6564. }
  6565. if (headEyeIndex[i] == 5)
  6566. {
  6567. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6568. }
  6569. if (headEyeIndex[i] == 6)
  6570. {
  6571. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6572. }
  6573. if (headEyeIndex[i] == 7)
  6574. {
  6575. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6576. }
  6577. if (headEyeIndex[i] == 8)
  6578. {
  6579. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6580. }
  6581. if (headEyeIndex[i] == 9)
  6582. {
  6583. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6584. }
  6585. }
  6586. idoFlg[i] = true;
  6587. if (i >= 7)
  6588. {
  6589. idoFlg[i - 7] = true;
  6590. }
  6591. }
  6592. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6593. {
  6594. idoFlg[i] = true;
  6595. if (i >= 7)
  6596. {
  6597. idoFlg[i - 7] = true;
  6598. }
  6599. }
  6600. else if (Input.GetKeyUp(key))
  6601. {
  6602. if (idoFlg[i])
  6603. {
  6604. idoFlg[i] = false;
  6605. }
  6606. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6607. {
  6608. if (!isLock[i])
  6609. {
  6610. poseIndex[i]++;
  6611. if (poseIndex[i] == poseArray.Length)
  6612. {
  6613. poseIndex[i] = 0;
  6614. }
  6615. if (maid && maid.Visible)
  6616. {
  6617. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6618. isStop[i] = false;
  6619. poseCount[i] = 20;
  6620. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6621. {
  6622. maid.body0.MuneYureL(0f);
  6623. maid.body0.MuneYureR(0f);
  6624. }
  6625. else
  6626. {
  6627. maid.body0.MuneYureL(1f);
  6628. maid.body0.MuneYureR(1f);
  6629. }
  6630. if (array[0].Contains("MultipleMaidsPose"))
  6631. {
  6632. string path = array[0].Split(new char[] { '/' })[1];
  6633. byte[] array2 = new byte[0];
  6634. try
  6635. {
  6636. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6637. {
  6638. array2 = new byte[fileStream.Length];
  6639. fileStream.Read(array2, 0, array2.Length);
  6640. }
  6641. }
  6642. catch { }
  6643. if (0 < array2.Length)
  6644. {
  6645. string text = Path.GetFileName(path);
  6646. long num5 = text.GetHashCode();
  6647. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6648. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6649. {
  6650. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6651. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6652. };
  6653. for (int m = 0; m < array3.Length; m++)
  6654. {
  6655. maid.SetAutoTwist(array3[m], true);
  6656. }
  6657. }
  6658. }
  6659. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6660. {
  6661. loadPose[i] = array[0];
  6662. }
  6663. else if (!array[0].StartsWith("dance_"))
  6664. {
  6665. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6666. }
  6667. else
  6668. {
  6669. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6670. {
  6671. maid.body0.LoadAnime(array[0] + ".anm",
  6672. GameUty.FileSystem,
  6673. array[0] + ".anm",
  6674. false,
  6675. false);
  6676. }
  6677. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6678. }
  6679. if (array.Length > 1)
  6680. {
  6681. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6682. isStop[i] = true;
  6683. if (array.Length > 2)
  6684. {
  6685. Transform transform2 =
  6686. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6687. isPoseIti[i] = true;
  6688. poseIti[i] = maidArray[i].transform.position;
  6689. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6690. }
  6691. }
  6692. }
  6693. }
  6694. }
  6695. }
  6696. goto IL_1688E;
  6697. }
  6698. }
  6699. if (Input.GetKeyDown(KeyCode.E)) { }
  6700. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6701. {
  6702. bGui = false;
  6703. SaveSceneSortPreferences();
  6704. }
  6705. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6706. {
  6707. sceneFlg = true;
  6708. kankyoToggle = false;
  6709. bGui = true;
  6710. if (!sceneManagerInitialize) InitializeSceneManager();
  6711. }
  6712. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6713. {
  6714. bgmIndex--;
  6715. if (bgmIndex <= -1)
  6716. {
  6717. bgmIndex = bgmArray.Length - 1;
  6718. }
  6719. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6720. bgmCombo.selectedItemIndex = bgmIndex;
  6721. }
  6722. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6723. {
  6724. bgmIndex++;
  6725. if (bgmIndex == bgmArray.Length)
  6726. {
  6727. bgmIndex = 0;
  6728. }
  6729. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6730. bgmCombo.selectedItemIndex = bgmIndex;
  6731. }
  6732. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6733. {
  6734. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6735. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6736. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6737. if (isMessage)
  6738. {
  6739. isMessage = false;
  6740. messageWindowMgr.CloseMessageWindowPanel();
  6741. }
  6742. else if (!bGuiMessage)
  6743. {
  6744. bGuiMessage = true;
  6745. }
  6746. else
  6747. {
  6748. bGuiMessage = false;
  6749. isMessage = false;
  6750. messageWindowMgr.CloseMessageWindowPanel();
  6751. }
  6752. }
  6753. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6754. {
  6755. escFlg = true;
  6756. for (int j = 0; j < maidCnt; j++)
  6757. {
  6758. if (maidArray[j] && maidArray[j].Visible)
  6759. {
  6760. maidArray[j].StopKuchipakuPattern();
  6761. if (isDanceStart7V)
  6762. {
  6763. maidArray[j].SetPos(dancePos[j]);
  6764. maidArray[j].body0.transform.localRotation = danceRot[j];
  6765. }
  6766. if (isDanceStart8V)
  6767. {
  6768. maidArray[j].SetPos(dancePos[j]);
  6769. maidArray[j].body0.transform.localRotation = danceRot[j];
  6770. }
  6771. if (isDanceStart11V)
  6772. {
  6773. maidArray[j].SetPos(dancePos[j]);
  6774. maidArray[j].body0.transform.localRotation = danceRot[j];
  6775. }
  6776. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6777. || isDanceStart13K)
  6778. {
  6779. maidArray[j].SetPos(dancePos[j]);
  6780. maidArray[j].body0.transform.localRotation = danceRot[j];
  6781. int i = j;
  6782. if (!isVR)
  6783. {
  6784. delCount[i] = 20;
  6785. if (goSlot[(int)selectList[i]] != null)
  6786. {
  6787. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6788. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6789. {
  6790. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6791. }
  6792. }
  6793. }
  6794. Maid maid = maidArray[j];
  6795. maid.DelProp(MPN.handitem, true);
  6796. maid.DelProp(MPN.accvag, true);
  6797. maid.DelProp(MPN.accanl, true);
  6798. maid.DelProp(MPN.kousoku_upper, true);
  6799. maid.DelProp(MPN.kousoku_lower, true);
  6800. maid.AllProcPropSeqStart();
  6801. }
  6802. if (isDanceStart14V)
  6803. {
  6804. maidArray[j].SetPos(dancePos[j]);
  6805. maidArray[j].body0.transform.localRotation = danceRot[j];
  6806. }
  6807. if (isDanceStart15V)
  6808. {
  6809. maidArray[j].SetPos(dancePos[j]);
  6810. maidArray[j].body0.transform.localRotation = danceRot[j];
  6811. }
  6812. }
  6813. }
  6814. isDanceStart1F = false;
  6815. isDanceStart1K = false;
  6816. isDanceStart2F = false;
  6817. isDanceStart3F = false;
  6818. isDanceStart3K = false;
  6819. isDanceStart4F = false;
  6820. isDanceStart4K = false;
  6821. isDanceStart5F = false;
  6822. isDanceStart5K = false;
  6823. isDanceStart6F = false;
  6824. isDanceStart6K = false;
  6825. isDanceStart7F = false;
  6826. isDanceStart7V = false;
  6827. isDanceStart8F = false;
  6828. isDanceStart8V = false;
  6829. isDanceStart8P = false;
  6830. isDanceStart9F = false;
  6831. isDanceStart9K = false;
  6832. isDanceStart10F = false;
  6833. isDanceStart11F = false;
  6834. isDanceStart11V = false;
  6835. isDanceStart12F = false;
  6836. isDanceStart13F = false;
  6837. isDanceStart13K = false;
  6838. isDanceStart14F = false;
  6839. isDanceStart14V = false;
  6840. isDanceStart15F = false;
  6841. isDanceStart15V = false;
  6842. for (int j = 0; j < maidCnt; j++)
  6843. {
  6844. danceFace[j] = 0f;
  6845. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6846. maidArray[j].SetAutoTwistAll(true);
  6847. }
  6848. danceCheckIndex = 0;
  6849. for (int k = 0; k < danceCheck.Length; k++)
  6850. {
  6851. danceCheck[danceCheckIndex] = 1f;
  6852. }
  6853. isDance = false;
  6854. isDanceChu = false;
  6855. if (maidArray[1] && maidArray[1].Visible)
  6856. {
  6857. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6858. {
  6859. Vector3 vector = Vector3.zero;
  6860. vector.x = 0.6f;
  6861. maidArray[1].SetPos(vector);
  6862. if (maidArray[2] && maidArray[2].Visible)
  6863. {
  6864. vector.x = -0.6f;
  6865. maidArray[2].SetPos(vector);
  6866. }
  6867. if (maidArray[3] && maidArray[3].Visible)
  6868. {
  6869. vector.x = 1.2f;
  6870. maidArray[3].SetPos(vector);
  6871. }
  6872. if (maidArray[4] && maidArray[4].Visible)
  6873. {
  6874. vector.x = -1.2f;
  6875. maidArray[4].SetPos(vector);
  6876. }
  6877. if (maidArray[5] && maidArray[5].Visible)
  6878. {
  6879. vector.x = 1.8f;
  6880. maidArray[5].SetPos(vector);
  6881. }
  6882. if (maidArray[6] && maidArray[6].Visible)
  6883. {
  6884. vector.x = -1.8f;
  6885. maidArray[6].SetPos(vector);
  6886. }
  6887. if (maidArray[7] && maidArray[7].Visible)
  6888. {
  6889. vector.x = 2.4f;
  6890. maidArray[7].SetPos(vector);
  6891. }
  6892. if (maidArray[8] && maidArray[8].Visible)
  6893. {
  6894. vector.x = -2.4f;
  6895. maidArray[8].SetPos(vector);
  6896. }
  6897. if (maidArray[9] && maidArray[9].Visible)
  6898. {
  6899. vector.x = 3f;
  6900. maidArray[9].SetPos(vector);
  6901. }
  6902. if (maidArray[10] && maidArray[10].Visible)
  6903. {
  6904. vector.x = -3f;
  6905. maidArray[10].SetPos(vector);
  6906. }
  6907. if (maidArray[11] && maidArray[11].Visible)
  6908. {
  6909. vector.x = 3.6f;
  6910. maidArray[11].SetPos(vector);
  6911. }
  6912. if (maidArray[12] && maidArray[12].Visible)
  6913. {
  6914. vector.x = -3.6f;
  6915. maidArray[12].SetPos(vector);
  6916. }
  6917. if (maidArray[13] && maidArray[13].Visible)
  6918. {
  6919. vector.x = 4.2f;
  6920. maidArray[13].SetPos(vector);
  6921. }
  6922. }
  6923. }
  6924. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6925. }
  6926. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6927. {
  6928. if (isScript)
  6929. {
  6930. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6931. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6932. if (isPanel)
  6933. {
  6934. isPanel = false;
  6935. }
  6936. else
  6937. {
  6938. isPanel = true;
  6939. }
  6940. gameObject5.SetActive(isPanel);
  6941. }
  6942. else
  6943. {
  6944. bGui = !bGui;
  6945. }
  6946. }
  6947. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6948. {
  6949. keyFlg = true;
  6950. bgIndex--;
  6951. if (bgIndex <= -1)
  6952. {
  6953. bgIndex = bgArray.Length - 1;
  6954. }
  6955. if (!moveBg)
  6956. {
  6957. bg.localScale = new Vector3(1f, 1f, 1f);
  6958. if (bgArray[bgIndex].Length == 36)
  6959. {
  6960. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6961. }
  6962. else
  6963. {
  6964. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6965. }
  6966. bgCombo.selectedItemIndex = bgIndex;
  6967. if (bgArray[bgIndex] == "karaokeroom")
  6968. {
  6969. bg.transform.position = bgObject.transform.position;
  6970. Vector3 vector = Vector3.zero;
  6971. Vector3 zero3 = Vector3.zero;
  6972. zero3.y = 90f;
  6973. vector.z = 4f;
  6974. vector.x = 1f;
  6975. bg.transform.localPosition = vector;
  6976. bg.transform.localRotation = Quaternion.Euler(zero3);
  6977. }
  6978. }
  6979. }
  6980. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6981. {
  6982. keyFlg = true;
  6983. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6984. }
  6985. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6986. {
  6987. keyFlg = true;
  6988. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6989. }
  6990. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6991. {
  6992. keyFlg = true;
  6993. bg.localScale = new Vector3(1f, 1f, 1f);
  6994. }
  6995. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6996. {
  6997. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6998. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6999. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7000. Vector3 vector = bg.position;
  7001. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7002. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7003. bg.localPosition = vector;
  7004. if (Input.GetKey(KeyCode.Y))
  7005. {
  7006. keyFlg = true;
  7007. }
  7008. }
  7009. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7010. {
  7011. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7012. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7013. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7014. Vector3 vector = bg.position;
  7015. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7016. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7017. bg.localPosition = vector;
  7018. if (Input.GetKey(KeyCode.Y))
  7019. {
  7020. keyFlg = true;
  7021. }
  7022. }
  7023. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7024. {
  7025. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7026. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7027. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7028. Vector3 vector = bg.position;
  7029. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7030. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7031. bg.localPosition = vector;
  7032. if (Input.GetKey(KeyCode.Y))
  7033. {
  7034. keyFlg = true;
  7035. }
  7036. }
  7037. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7038. {
  7039. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7040. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7041. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7042. Vector3 vector = bg.position;
  7043. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7044. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7045. bg.localPosition = vector;
  7046. if (Input.GetKey(KeyCode.Y))
  7047. {
  7048. keyFlg = true;
  7049. }
  7050. }
  7051. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7052. {
  7053. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7054. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7055. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7056. Vector3 vector = bg.position;
  7057. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7058. bg.localPosition = vector;
  7059. if (Input.GetKey(KeyCode.Y))
  7060. {
  7061. keyFlg = true;
  7062. }
  7063. }
  7064. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7065. {
  7066. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7067. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7068. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7069. Vector3 vector = bg.position;
  7070. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7071. bg.localPosition = vector;
  7072. if (Input.GetKey(KeyCode.Y))
  7073. {
  7074. keyFlg = true;
  7075. }
  7076. }
  7077. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7078. {
  7079. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7080. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7081. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7082. Vector3 vector = bg.position;
  7083. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7084. bg.localPosition = vector;
  7085. if (Input.GetKey(KeyCode.Y))
  7086. {
  7087. keyFlg = true;
  7088. }
  7089. }
  7090. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7091. {
  7092. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7093. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7094. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7095. Vector3 vector = bg.position;
  7096. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7097. bg.localPosition = vector;
  7098. if (Input.GetKey(KeyCode.Y))
  7099. {
  7100. keyFlg = true;
  7101. }
  7102. }
  7103. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7104. {
  7105. Vector3 vector = bg.position;
  7106. vector.y -= 0.015f * speed;
  7107. bg.localPosition = vector;
  7108. if (Input.GetKey(KeyCode.Y))
  7109. {
  7110. keyFlg = true;
  7111. }
  7112. }
  7113. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7114. {
  7115. Vector3 vector = bg.position;
  7116. vector.y += 0.015f * speed;
  7117. bg.localPosition = vector;
  7118. if (Input.GetKey(KeyCode.Y))
  7119. {
  7120. keyFlg = true;
  7121. }
  7122. }
  7123. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7124. {
  7125. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  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.O))
  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.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7140. {
  7141. if (Input.GetKey(KeyCode.Y))
  7142. {
  7143. keyFlg = true;
  7144. }
  7145. }
  7146. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7147. {
  7148. if (keyFlg)
  7149. {
  7150. keyFlg = false;
  7151. }
  7152. else
  7153. {
  7154. bgIndex++;
  7155. if (bgIndex == bgArray.Length)
  7156. {
  7157. bgIndex = 0;
  7158. }
  7159. if (!moveBg)
  7160. {
  7161. bg.localScale = new Vector3(1f, 1f, 1f);
  7162. if (bgArray[bgIndex].Length == 36)
  7163. {
  7164. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7165. }
  7166. else
  7167. {
  7168. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7169. }
  7170. bgCombo.selectedItemIndex = bgIndex;
  7171. if (bgArray[bgIndex] == "karaokeroom")
  7172. {
  7173. bg.transform.position = bgObject.transform.position;
  7174. Vector3 vector = Vector3.zero;
  7175. Vector3 zero3 = Vector3.zero;
  7176. zero3.y = 90f;
  7177. vector.z = 4f;
  7178. vector.x = 1f;
  7179. bg.transform.localPosition = vector;
  7180. bg.transform.localRotation = Quaternion.Euler(zero3);
  7181. }
  7182. }
  7183. }
  7184. }
  7185. if (maidArray[0] != null && maidArray[0].Visible)
  7186. {
  7187. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7188. {
  7189. int[] array6 = new int[1];
  7190. int[] array7 = array6;
  7191. if (maidCnt == 2)
  7192. {
  7193. array7 = new int[] { 0, 1 };
  7194. }
  7195. if (maidCnt == 3)
  7196. {
  7197. array7 = new int[] { 0, 1, 2 };
  7198. }
  7199. if (maidCnt == 4)
  7200. {
  7201. array7 = new int[] { 0, 1, 2, 3 };
  7202. }
  7203. if (maidCnt == 5)
  7204. {
  7205. array7 = new int[] { 0, 1, 2, 3, 4 };
  7206. }
  7207. if (maidCnt == 6)
  7208. {
  7209. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7210. }
  7211. if (maidCnt == 7)
  7212. {
  7213. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7214. }
  7215. if (maidCnt == 8)
  7216. {
  7217. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7218. }
  7219. if (maidCnt == 9)
  7220. {
  7221. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7222. }
  7223. if (maidCnt == 10)
  7224. {
  7225. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7226. }
  7227. if (maidCnt == 11)
  7228. {
  7229. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7230. }
  7231. if (maidCnt == 12)
  7232. {
  7233. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7234. }
  7235. Random random = new Random();
  7236. int n = array7.Length;
  7237. while (n > 1)
  7238. {
  7239. n--;
  7240. int j = random.Next(n + 1);
  7241. int num8 = array7[j];
  7242. array7[j] = array7[n];
  7243. array7[n] = num8;
  7244. }
  7245. int[] array8 = new int[maidCnt];
  7246. Vector3[] array9 = new Vector3[maidCnt];
  7247. Vector3[] array10 = new Vector3[maidCnt];
  7248. int[] array11 = new int[maidCnt];
  7249. for (int i = 0; i < maidCnt; i++)
  7250. {
  7251. array8[array7[i]] = poseIndex[array7[i]];
  7252. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7253. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7254. array11[array7[i]] = headEyeIndex[array7[i]];
  7255. }
  7256. for (int i = 0; i < maidCnt; i++)
  7257. {
  7258. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7259. {
  7260. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7261. isStop[i] = false;
  7262. poseCount[i] = 20;
  7263. Maid maid = maidArray[i];
  7264. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7265. {
  7266. maid.body0.MuneYureL(0f);
  7267. maid.body0.MuneYureR(0f);
  7268. }
  7269. else
  7270. {
  7271. maid.body0.MuneYureL(1f);
  7272. maid.body0.MuneYureR(1f);
  7273. }
  7274. if (array12[0].Contains("MultipleMaidsPose"))
  7275. {
  7276. string path = array12[0].Split(new char[] { '/' })[1];
  7277. byte[] array2 = new byte[0];
  7278. try
  7279. {
  7280. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7281. {
  7282. array2 = new byte[fileStream.Length];
  7283. fileStream.Read(array2, 0, array2.Length);
  7284. }
  7285. }
  7286. catch { }
  7287. if (0 < array2.Length)
  7288. {
  7289. string text = Path.GetFileName(path);
  7290. long num5 = text.GetHashCode();
  7291. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7292. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7293. {
  7294. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7295. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7296. };
  7297. for (int m = 0; m < array3.Length; m++)
  7298. {
  7299. maid.SetAutoTwist(array3[m], true);
  7300. }
  7301. }
  7302. }
  7303. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7304. {
  7305. loadPose[i] = array12[0];
  7306. }
  7307. else if (!array12[0].StartsWith("dance_"))
  7308. {
  7309. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7310. }
  7311. else
  7312. {
  7313. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7314. {
  7315. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7316. GameUty.FileSystem,
  7317. array12[0] + ".anm",
  7318. false,
  7319. false);
  7320. }
  7321. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7322. }
  7323. if (array12.Length > 1)
  7324. {
  7325. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7326. float.Parse(array12[1]);
  7327. isStop[i] = true;
  7328. if (array12.Length > 2)
  7329. {
  7330. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7331. isPoseIti[i] = true;
  7332. poseIti[i] = maidArray[i].transform.position;
  7333. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7334. }
  7335. }
  7336. }
  7337. poseIndex[i] = array8[array7[i]];
  7338. maidArray[i].SetRot(array9[array7[i]]);
  7339. maidArray[i].SetPos(array10[array7[i]]);
  7340. headEyeIndex[i] = array11[array7[i]];
  7341. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7342. maidArray[i].body0.boHeadToCam = true;
  7343. maidArray[i].body0.boEyeToCam = true;
  7344. if (headEyeIndex[i] == 0)
  7345. {
  7346. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7347. maidArray[i].body0.boHeadToCam = true;
  7348. maidArray[i].body0.boEyeToCam = true;
  7349. }
  7350. else
  7351. {
  7352. maidArray[i].body0.trsLookTarget = null;
  7353. if (headEyeIndex[i] == 1)
  7354. {
  7355. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7356. }
  7357. if (headEyeIndex[i] == 2)
  7358. {
  7359. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7360. }
  7361. if (headEyeIndex[i] == 3)
  7362. {
  7363. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7364. }
  7365. if (headEyeIndex[i] == 4)
  7366. {
  7367. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7368. }
  7369. if (headEyeIndex[i] == 5)
  7370. {
  7371. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7372. }
  7373. if (headEyeIndex[i] == 6)
  7374. {
  7375. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7376. }
  7377. if (headEyeIndex[i] == 7)
  7378. {
  7379. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7380. }
  7381. if (headEyeIndex[i] == 8)
  7382. {
  7383. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7384. }
  7385. if (headEyeIndex[i] == 9)
  7386. {
  7387. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7388. }
  7389. }
  7390. }
  7391. }
  7392. else if (Input.GetKeyDown(KeyCode.Comma))
  7393. {
  7394. int[] array8 = new int[maidCnt];
  7395. Vector3[] array9 = new Vector3[maidCnt];
  7396. Vector3[] array10 = new Vector3[maidCnt];
  7397. int[] array11 = new int[maidCnt];
  7398. for (int i = 0; i < maidCnt; i++)
  7399. {
  7400. array8[i] = poseIndex[i];
  7401. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7402. array10[i] = maidArray[i].transform.position;
  7403. array11[i] = headEyeIndex[i];
  7404. }
  7405. for (int i = 0; i < maidCnt; i++)
  7406. {
  7407. if (i == 0)
  7408. {
  7409. if (!isLock[i])
  7410. {
  7411. if (maidArray[i] && maidArray[i].Visible)
  7412. {
  7413. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7414. isStop[i] = false;
  7415. poseCount[i] = 20;
  7416. Maid maid = maidArray[i];
  7417. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7418. {
  7419. maid.body0.MuneYureL(0f);
  7420. maid.body0.MuneYureR(0f);
  7421. }
  7422. else
  7423. {
  7424. maid.body0.MuneYureL(1f);
  7425. maid.body0.MuneYureR(1f);
  7426. }
  7427. if (array12[0].Contains("MultipleMaidsPose"))
  7428. {
  7429. string path = array12[0].Split(new char[] { '/' })[1];
  7430. byte[] array2 = new byte[0];
  7431. try
  7432. {
  7433. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7434. {
  7435. array2 = new byte[fileStream.Length];
  7436. fileStream.Read(array2, 0, array2.Length);
  7437. }
  7438. }
  7439. catch { }
  7440. if (0 < array2.Length)
  7441. {
  7442. string text = Path.GetFileName(path);
  7443. long num5 = text.GetHashCode();
  7444. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7445. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7446. {
  7447. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7448. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7449. };
  7450. for (int m = 0; m < array3.Length; m++)
  7451. {
  7452. maid.SetAutoTwist(array3[m], true);
  7453. }
  7454. }
  7455. }
  7456. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7457. {
  7458. loadPose[i] = array12[0];
  7459. }
  7460. else if (!array12[0].StartsWith("dance_"))
  7461. {
  7462. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7463. }
  7464. else
  7465. {
  7466. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7467. {
  7468. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7469. GameUty.FileSystem,
  7470. array12[0] + ".anm",
  7471. false,
  7472. false);
  7473. }
  7474. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7475. }
  7476. if (array12.Length > 1)
  7477. {
  7478. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7479. float.Parse(array12[1]);
  7480. isStop[i] = true;
  7481. if (array12.Length > 2)
  7482. {
  7483. Transform transform2 =
  7484. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7485. isPoseIti[i] = true;
  7486. poseIti[i] = maidArray[i].transform.position;
  7487. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7488. }
  7489. }
  7490. }
  7491. }
  7492. poseIndex[i] = array8[maidCnt - i - 1];
  7493. headEyeIndex[i] = array11[maidCnt - i - 1];
  7494. }
  7495. else
  7496. {
  7497. if (!isLock[i])
  7498. {
  7499. if (maidArray[i] && maidArray[i].Visible)
  7500. {
  7501. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7502. isStop[i] = false;
  7503. poseCount[i] = 20;
  7504. Maid maid = maidArray[i];
  7505. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7506. {
  7507. maid.body0.MuneYureL(0f);
  7508. maid.body0.MuneYureR(0f);
  7509. }
  7510. else
  7511. {
  7512. maid.body0.MuneYureL(1f);
  7513. maid.body0.MuneYureR(1f);
  7514. }
  7515. if (array12[0].Contains("MultipleMaidsPose"))
  7516. {
  7517. string path = array12[0].Split(new char[] { '/' })[1];
  7518. byte[] array2 = new byte[0];
  7519. try
  7520. {
  7521. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7522. {
  7523. array2 = new byte[fileStream.Length];
  7524. fileStream.Read(array2, 0, array2.Length);
  7525. }
  7526. }
  7527. catch { }
  7528. if (0 < array2.Length)
  7529. {
  7530. string text = Path.GetFileName(path);
  7531. long num5 = text.GetHashCode();
  7532. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7533. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7534. {
  7535. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7536. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7537. };
  7538. for (int m = 0; m < array3.Length; m++)
  7539. {
  7540. maid.SetAutoTwist(array3[m], true);
  7541. }
  7542. }
  7543. }
  7544. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7545. {
  7546. loadPose[i] = array12[0];
  7547. }
  7548. else if (!array12[0].StartsWith("dance_"))
  7549. {
  7550. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7551. }
  7552. else
  7553. {
  7554. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7555. {
  7556. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7557. GameUty.FileSystem,
  7558. array12[0] + ".anm",
  7559. false,
  7560. false);
  7561. }
  7562. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7563. }
  7564. if (array12.Length > 1)
  7565. {
  7566. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7567. float.Parse(array12[1]);
  7568. isStop[i] = true;
  7569. if (array12.Length > 2)
  7570. {
  7571. Transform transform2 =
  7572. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7573. isPoseIti[i] = true;
  7574. poseIti[i] = maidArray[i].transform.position;
  7575. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7576. }
  7577. }
  7578. }
  7579. }
  7580. poseIndex[i] = array8[i - 1];
  7581. headEyeIndex[i] = array11[i - 1];
  7582. }
  7583. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7584. maidArray[i].body0.boHeadToCam = true;
  7585. maidArray[i].body0.boEyeToCam = true;
  7586. if (headEyeIndex[i] == 0)
  7587. {
  7588. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7589. maidArray[i].body0.boHeadToCam = true;
  7590. maidArray[i].body0.boEyeToCam = true;
  7591. }
  7592. else
  7593. {
  7594. maidArray[i].body0.trsLookTarget = null;
  7595. if (headEyeIndex[i] == 1)
  7596. {
  7597. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7598. }
  7599. if (headEyeIndex[i] == 2)
  7600. {
  7601. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7602. }
  7603. if (headEyeIndex[i] == 3)
  7604. {
  7605. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7606. }
  7607. if (headEyeIndex[i] == 4)
  7608. {
  7609. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7610. }
  7611. if (headEyeIndex[i] == 5)
  7612. {
  7613. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7614. }
  7615. if (headEyeIndex[i] == 6)
  7616. {
  7617. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7618. }
  7619. if (headEyeIndex[i] == 7)
  7620. {
  7621. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7622. }
  7623. if (headEyeIndex[i] == 8)
  7624. {
  7625. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7626. }
  7627. if (headEyeIndex[i] == 9)
  7628. {
  7629. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7630. }
  7631. }
  7632. if (i == 0)
  7633. {
  7634. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7635. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7636. }
  7637. else
  7638. {
  7639. maidArray[i].SetRot(array9[i - 1]);
  7640. maidArray[i].SetPos(array10[i - 1]);
  7641. }
  7642. }
  7643. }
  7644. for (int i = 0; i < maidCnt; i++)
  7645. {
  7646. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7647. {
  7648. if (maidArray[i] && maidArray[i].Visible)
  7649. {
  7650. maidArray[i].body0.transform.localRotation =
  7651. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7652. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7653. }
  7654. }
  7655. else if (Input.GetKey(KeyCode.B))
  7656. {
  7657. if (maidArray[i] && maidArray[i].Visible)
  7658. {
  7659. maidArray[i].body0.transform.localRotation =
  7660. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7661. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7662. }
  7663. }
  7664. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7665. {
  7666. if (maidArray[1] && maidArray[1].Visible)
  7667. {
  7668. if (maidArray[0].transform.position == maidArray[1].transform.position
  7669. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7670. {
  7671. Vector3 vector = Vector3.zero;
  7672. vector.x = 0.6f;
  7673. maidArray[1].SetPos(vector);
  7674. if (maidArray[2] && maidArray[2].Visible)
  7675. {
  7676. vector.x = -0.6f;
  7677. maidArray[2].SetPos(vector);
  7678. }
  7679. if (maidArray[3] && maidArray[3].Visible)
  7680. {
  7681. vector.x = 1.2f;
  7682. maidArray[3].SetPos(vector);
  7683. }
  7684. if (maidArray[4] && maidArray[4].Visible)
  7685. {
  7686. vector.x = -1.2f;
  7687. maidArray[4].SetPos(vector);
  7688. }
  7689. if (maidArray[5] && maidArray[5].Visible)
  7690. {
  7691. vector.x = 1.8f;
  7692. maidArray[5].SetPos(vector);
  7693. }
  7694. if (maidArray[6] && maidArray[6].Visible)
  7695. {
  7696. vector.x = -1.8f;
  7697. maidArray[6].SetPos(vector);
  7698. }
  7699. if (maidArray[7] && maidArray[7].Visible)
  7700. {
  7701. vector.x = 2.4f;
  7702. maidArray[7].SetPos(vector);
  7703. }
  7704. if (maidArray[8] && maidArray[8].Visible)
  7705. {
  7706. vector.x = -2.4f;
  7707. maidArray[8].SetPos(vector);
  7708. }
  7709. if (maidArray[9] && maidArray[9].Visible)
  7710. {
  7711. vector.x = 3f;
  7712. maidArray[9].SetPos(vector);
  7713. }
  7714. if (maidArray[10] && maidArray[10].Visible)
  7715. {
  7716. vector.x = -3f;
  7717. maidArray[10].SetPos(vector);
  7718. }
  7719. if (maidArray[11] && maidArray[11].Visible)
  7720. {
  7721. vector.x = 3.6f;
  7722. maidArray[11].SetPos(vector);
  7723. }
  7724. if (maidArray[12] && maidArray[12].Visible)
  7725. {
  7726. vector.x = -3.6f;
  7727. maidArray[12].SetPos(vector);
  7728. }
  7729. if (maidArray[13] && maidArray[13].Visible)
  7730. {
  7731. vector.x = 4.2f;
  7732. maidArray[13].SetPos(vector);
  7733. }
  7734. }
  7735. }
  7736. for (int k = 0; k < groupList.Count; k++)
  7737. {
  7738. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7739. {
  7740. if (poseIndex[i] == 0)
  7741. {
  7742. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7743. }
  7744. else
  7745. {
  7746. poseIndex[i] = 0;
  7747. }
  7748. break;
  7749. }
  7750. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7751. {
  7752. poseIndex[i] = (int)groupList[k - 1];
  7753. break;
  7754. }
  7755. }
  7756. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7757. {
  7758. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7759. }
  7760. if (maidArray[i] && maidArray[i].Visible)
  7761. {
  7762. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7763. isStop[i] = false;
  7764. poseCount[i] = 20;
  7765. Maid maid = maidArray[i];
  7766. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7767. {
  7768. maid.body0.MuneYureL(0f);
  7769. maid.body0.MuneYureR(0f);
  7770. }
  7771. else
  7772. {
  7773. maid.body0.MuneYureL(1f);
  7774. maid.body0.MuneYureR(1f);
  7775. }
  7776. if (array[0].Contains("MultipleMaidsPose"))
  7777. {
  7778. string path = array[0].Split(new char[] { '/' })[1];
  7779. byte[] array2 = new byte[0];
  7780. try
  7781. {
  7782. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7783. {
  7784. array2 = new byte[fileStream.Length];
  7785. fileStream.Read(array2, 0, array2.Length);
  7786. }
  7787. }
  7788. catch { }
  7789. if (0 < array2.Length)
  7790. {
  7791. string text = Path.GetFileName(path);
  7792. long num5 = text.GetHashCode();
  7793. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7794. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7795. {
  7796. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7797. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7798. };
  7799. for (int m = 0; m < array3.Length; m++)
  7800. {
  7801. maid.SetAutoTwist(array3[m], true);
  7802. }
  7803. }
  7804. }
  7805. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7806. {
  7807. loadPose[i] = array[0];
  7808. }
  7809. else if (!array[0].StartsWith("dance_"))
  7810. {
  7811. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7812. }
  7813. else
  7814. {
  7815. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7816. {
  7817. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7818. GameUty.FileSystem,
  7819. array[0] + ".anm",
  7820. false,
  7821. false);
  7822. }
  7823. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7824. }
  7825. if (array.Length > 1)
  7826. {
  7827. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7828. isStop[i] = true;
  7829. if (array.Length > 2)
  7830. {
  7831. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7832. isPoseIti[i] = true;
  7833. poseIti[i] = maidArray[i].transform.position;
  7834. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7835. }
  7836. }
  7837. }
  7838. }
  7839. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7840. {
  7841. if (maidArray[1] && maidArray[1].Visible)
  7842. {
  7843. if (maidArray[0].transform.position == maidArray[1].transform.position
  7844. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7845. {
  7846. Vector3 vector = Vector3.zero;
  7847. vector.x = 0.6f;
  7848. maidArray[1].SetPos(vector);
  7849. if (maidArray[2] && maidArray[2].Visible)
  7850. {
  7851. vector.x = -0.6f;
  7852. maidArray[2].SetPos(vector);
  7853. }
  7854. if (maidArray[3] && maidArray[3].Visible)
  7855. {
  7856. vector.x = 1.2f;
  7857. maidArray[3].SetPos(vector);
  7858. }
  7859. if (maidArray[4] && maidArray[4].Visible)
  7860. {
  7861. vector.x = -1.2f;
  7862. maidArray[4].SetPos(vector);
  7863. }
  7864. if (maidArray[5] && maidArray[5].Visible)
  7865. {
  7866. vector.x = 1.8f;
  7867. maidArray[5].SetPos(vector);
  7868. }
  7869. if (maidArray[6] && maidArray[6].Visible)
  7870. {
  7871. vector.x = -1.8f;
  7872. maidArray[6].SetPos(vector);
  7873. }
  7874. if (maidArray[7] && maidArray[7].Visible)
  7875. {
  7876. vector.x = 2.4f;
  7877. maidArray[7].SetPos(vector);
  7878. }
  7879. if (maidArray[8] && maidArray[8].Visible)
  7880. {
  7881. vector.x = -2.4f;
  7882. maidArray[8].SetPos(vector);
  7883. }
  7884. if (maidArray[9] && maidArray[9].Visible)
  7885. {
  7886. vector.x = 3f;
  7887. maidArray[9].SetPos(vector);
  7888. }
  7889. if (maidArray[10] && maidArray[10].Visible)
  7890. {
  7891. vector.x = -3f;
  7892. maidArray[10].SetPos(vector);
  7893. }
  7894. if (maidArray[11] && maidArray[11].Visible)
  7895. {
  7896. vector.x = 3.6f;
  7897. maidArray[11].SetPos(vector);
  7898. }
  7899. if (maidArray[12] && maidArray[12].Visible)
  7900. {
  7901. vector.x = -3.6f;
  7902. maidArray[12].SetPos(vector);
  7903. }
  7904. if (maidArray[13] && maidArray[13].Visible)
  7905. {
  7906. vector.x = 4.2f;
  7907. maidArray[13].SetPos(vector);
  7908. }
  7909. }
  7910. }
  7911. int num7 = poseIndex[i];
  7912. for (int k = 0; k < groupList.Count; k++)
  7913. {
  7914. if (poseIndex[i] < (int)groupList[k])
  7915. {
  7916. poseIndex[i] = (int)groupList[k];
  7917. break;
  7918. }
  7919. }
  7920. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7921. {
  7922. poseIndex[i] = 0;
  7923. }
  7924. if (maidArray[i] && maidArray[i].Visible)
  7925. {
  7926. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7927. isStop[i] = false;
  7928. poseCount[i] = 20;
  7929. Maid maid = maidArray[i];
  7930. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7931. {
  7932. maid.body0.MuneYureL(0f);
  7933. maid.body0.MuneYureR(0f);
  7934. }
  7935. else
  7936. {
  7937. maid.body0.MuneYureL(1f);
  7938. maid.body0.MuneYureR(1f);
  7939. }
  7940. if (array[0].Contains("MultipleMaidsPose"))
  7941. {
  7942. string path = array[0].Split(new char[] { '/' })[1];
  7943. byte[] array2 = new byte[0];
  7944. try
  7945. {
  7946. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7947. {
  7948. array2 = new byte[fileStream.Length];
  7949. fileStream.Read(array2, 0, array2.Length);
  7950. }
  7951. }
  7952. catch { }
  7953. if (0 < array2.Length)
  7954. {
  7955. string text = Path.GetFileName(path);
  7956. long num5 = text.GetHashCode();
  7957. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7958. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7959. {
  7960. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7961. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7962. };
  7963. for (int m = 0; m < array3.Length; m++)
  7964. {
  7965. maid.SetAutoTwist(array3[m], true);
  7966. }
  7967. }
  7968. }
  7969. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7970. {
  7971. loadPose[i] = array[0];
  7972. }
  7973. else if (!array[0].StartsWith("dance_"))
  7974. {
  7975. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7976. }
  7977. else
  7978. {
  7979. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7980. {
  7981. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7982. GameUty.FileSystem,
  7983. array[0] + ".anm",
  7984. false,
  7985. false);
  7986. }
  7987. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7988. }
  7989. if (array.Length > 1)
  7990. {
  7991. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7992. isStop[i] = true;
  7993. if (array.Length > 2)
  7994. {
  7995. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7996. isPoseIti[i] = true;
  7997. poseIti[i] = maidArray[i].transform.position;
  7998. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7999. }
  8000. }
  8001. }
  8002. }
  8003. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8004. {
  8005. if (maidArray[1] && maidArray[1].Visible)
  8006. {
  8007. if (maidArray[0].transform.position == maidArray[1].transform.position
  8008. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8009. {
  8010. Vector3 vector = Vector3.zero;
  8011. vector.x = 0.6f;
  8012. maidArray[1].SetPos(vector);
  8013. if (maidArray[2] && maidArray[2].Visible)
  8014. {
  8015. vector.x = -0.6f;
  8016. maidArray[2].SetPos(vector);
  8017. }
  8018. if (maidArray[3] && maidArray[3].Visible)
  8019. {
  8020. vector.x = 1.2f;
  8021. maidArray[3].SetPos(vector);
  8022. }
  8023. if (maidArray[4] && maidArray[4].Visible)
  8024. {
  8025. vector.x = -1.2f;
  8026. maidArray[4].SetPos(vector);
  8027. }
  8028. if (maidArray[5] && maidArray[5].Visible)
  8029. {
  8030. vector.x = 1.8f;
  8031. maidArray[5].SetPos(vector);
  8032. }
  8033. if (maidArray[6] && maidArray[6].Visible)
  8034. {
  8035. vector.x = -1.8f;
  8036. maidArray[6].SetPos(vector);
  8037. }
  8038. if (maidArray[7] && maidArray[7].Visible)
  8039. {
  8040. vector.x = 2.4f;
  8041. maidArray[7].SetPos(vector);
  8042. }
  8043. if (maidArray[8] && maidArray[8].Visible)
  8044. {
  8045. vector.x = -2.4f;
  8046. maidArray[8].SetPos(vector);
  8047. }
  8048. if (maidArray[9] && maidArray[9].Visible)
  8049. {
  8050. vector.x = 3f;
  8051. maidArray[9].SetPos(vector);
  8052. }
  8053. if (maidArray[10] && maidArray[10].Visible)
  8054. {
  8055. vector.x = -3f;
  8056. maidArray[10].SetPos(vector);
  8057. }
  8058. if (maidArray[11] && maidArray[11].Visible)
  8059. {
  8060. vector.x = 3.6f;
  8061. maidArray[11].SetPos(vector);
  8062. }
  8063. if (maidArray[12] && maidArray[12].Visible)
  8064. {
  8065. vector.x = -3.6f;
  8066. maidArray[12].SetPos(vector);
  8067. }
  8068. if (maidArray[13] && maidArray[13].Visible)
  8069. {
  8070. vector.x = 4.2f;
  8071. maidArray[13].SetPos(vector);
  8072. }
  8073. }
  8074. }
  8075. poseIndex[i]--;
  8076. if (poseIndex[i] <= -1)
  8077. {
  8078. poseIndex[i] = poseArray.Length - 1;
  8079. }
  8080. if (maidArray[i] && maidArray[i].Visible)
  8081. {
  8082. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8083. isStop[i] = false;
  8084. poseCount[i] = 20;
  8085. Maid maid = maidArray[i];
  8086. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8087. {
  8088. maid.body0.MuneYureL(0f);
  8089. maid.body0.MuneYureR(0f);
  8090. }
  8091. else
  8092. {
  8093. maid.body0.MuneYureL(1f);
  8094. maid.body0.MuneYureR(1f);
  8095. }
  8096. if (array[0].Contains("MultipleMaidsPose"))
  8097. {
  8098. string path = array[0].Split(new char[] { '/' })[1];
  8099. byte[] array2 = new byte[0];
  8100. try
  8101. {
  8102. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8103. {
  8104. array2 = new byte[fileStream.Length];
  8105. fileStream.Read(array2, 0, array2.Length);
  8106. }
  8107. }
  8108. catch { }
  8109. if (0 < array2.Length)
  8110. {
  8111. string text = Path.GetFileName(path);
  8112. long num5 = text.GetHashCode();
  8113. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8114. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8115. {
  8116. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8117. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8118. };
  8119. for (int m = 0; m < array3.Length; m++)
  8120. {
  8121. maid.SetAutoTwist(array3[m], true);
  8122. }
  8123. }
  8124. }
  8125. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8126. {
  8127. loadPose[i] = array[0];
  8128. }
  8129. else if (!array[0].StartsWith("dance_"))
  8130. {
  8131. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8132. }
  8133. else
  8134. {
  8135. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8136. {
  8137. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8138. GameUty.FileSystem,
  8139. array[0] + ".anm",
  8140. false,
  8141. false);
  8142. }
  8143. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8144. }
  8145. if (array.Length > 1)
  8146. {
  8147. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8148. isStop[i] = true;
  8149. if (array.Length > 2)
  8150. {
  8151. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8152. isPoseIti[i] = true;
  8153. poseIti[i] = maidArray[i].transform.position;
  8154. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8155. }
  8156. }
  8157. }
  8158. }
  8159. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8160. {
  8161. if (maidArray[1] && maidArray[1].Visible)
  8162. {
  8163. if (maidArray[0].transform.position == maidArray[1].transform.position
  8164. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8165. {
  8166. Vector3 vector = Vector3.zero;
  8167. vector.x = 0.6f;
  8168. maidArray[1].SetPos(vector);
  8169. if (maidArray[2] && maidArray[2].Visible)
  8170. {
  8171. vector.x = -0.6f;
  8172. maidArray[2].SetPos(vector);
  8173. }
  8174. if (maidArray[3] && maidArray[3].Visible)
  8175. {
  8176. vector.x = 1.2f;
  8177. maidArray[3].SetPos(vector);
  8178. }
  8179. if (maidArray[4] && maidArray[4].Visible)
  8180. {
  8181. vector.x = -1.2f;
  8182. maidArray[4].SetPos(vector);
  8183. }
  8184. if (maidArray[5] && maidArray[5].Visible)
  8185. {
  8186. vector.x = 1.8f;
  8187. maidArray[5].SetPos(vector);
  8188. }
  8189. if (maidArray[6] && maidArray[6].Visible)
  8190. {
  8191. vector.x = -1.8f;
  8192. maidArray[6].SetPos(vector);
  8193. }
  8194. if (maidArray[7] && maidArray[7].Visible)
  8195. {
  8196. vector.x = 2.4f;
  8197. maidArray[7].SetPos(vector);
  8198. }
  8199. if (maidArray[8] && maidArray[8].Visible)
  8200. {
  8201. vector.x = -2.4f;
  8202. maidArray[8].SetPos(vector);
  8203. }
  8204. if (maidArray[9] && maidArray[9].Visible)
  8205. {
  8206. vector.x = 3f;
  8207. maidArray[9].SetPos(vector);
  8208. }
  8209. if (maidArray[10] && maidArray[10].Visible)
  8210. {
  8211. vector.x = -3f;
  8212. maidArray[10].SetPos(vector);
  8213. }
  8214. if (maidArray[11] && maidArray[11].Visible)
  8215. {
  8216. vector.x = 3.6f;
  8217. maidArray[11].SetPos(vector);
  8218. }
  8219. if (maidArray[12] && maidArray[12].Visible)
  8220. {
  8221. vector.x = -3.6f;
  8222. maidArray[12].SetPos(vector);
  8223. }
  8224. if (maidArray[13] && maidArray[13].Visible)
  8225. {
  8226. vector.x = 4.2f;
  8227. maidArray[13].SetPos(vector);
  8228. }
  8229. }
  8230. }
  8231. poseIndex[i]++;
  8232. if (poseIndex[i] == poseArray.Length)
  8233. {
  8234. poseIndex[i] = 0;
  8235. }
  8236. if (maidArray[i] && maidArray[i].Visible)
  8237. {
  8238. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8239. isStop[i] = false;
  8240. poseCount[i] = 20;
  8241. Maid maid = maidArray[i];
  8242. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8243. {
  8244. maid.body0.MuneYureL(0f);
  8245. maid.body0.MuneYureR(0f);
  8246. }
  8247. else
  8248. {
  8249. maid.body0.MuneYureL(1f);
  8250. maid.body0.MuneYureR(1f);
  8251. }
  8252. if (array[0].Contains("MultipleMaidsPose"))
  8253. {
  8254. string path = array[0].Split(new char[] { '/' })[1];
  8255. byte[] array2 = new byte[0];
  8256. try
  8257. {
  8258. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8259. {
  8260. array2 = new byte[fileStream.Length];
  8261. fileStream.Read(array2, 0, array2.Length);
  8262. }
  8263. }
  8264. catch { }
  8265. if (0 < array2.Length)
  8266. {
  8267. string text = Path.GetFileName(path);
  8268. long num5 = text.GetHashCode();
  8269. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8270. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8271. {
  8272. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8273. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8274. };
  8275. for (int m = 0; m < array3.Length; m++)
  8276. {
  8277. maid.SetAutoTwist(array3[m], true);
  8278. }
  8279. }
  8280. }
  8281. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8282. {
  8283. loadPose[i] = array[0];
  8284. }
  8285. else if (!array[0].StartsWith("dance_"))
  8286. {
  8287. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8288. }
  8289. else
  8290. {
  8291. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8292. {
  8293. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8294. GameUty.FileSystem,
  8295. array[0] + ".anm",
  8296. false,
  8297. false);
  8298. }
  8299. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8300. }
  8301. if (array.Length > 1)
  8302. {
  8303. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8304. isStop[i] = true;
  8305. if (array.Length > 2)
  8306. {
  8307. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8308. isPoseIti[i] = true;
  8309. poseIti[i] = maidArray[i].transform.position;
  8310. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8311. }
  8312. }
  8313. }
  8314. }
  8315. }
  8316. }
  8317. if (isDanceChu)
  8318. {
  8319. for (int j = 0; j < maidCnt; j++)
  8320. {
  8321. if (maidArray[j] && maidArray[j].Visible)
  8322. {
  8323. string text2 = danceName[j];
  8324. float num = 0f;
  8325. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8326. || text2 == "dance_cm3d_004_kano_f1.anm")
  8327. {
  8328. num = 0.166666f;
  8329. }
  8330. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8331. {
  8332. num = -0.35f;
  8333. }
  8334. if (text2 != null)
  8335. {
  8336. if (danceCount > 0)
  8337. {
  8338. danceCount--;
  8339. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8340. }
  8341. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8342. {
  8343. danceCount = 20;
  8344. }
  8345. }
  8346. }
  8347. }
  8348. }
  8349. if (isDanceStart1)
  8350. {
  8351. for (int j = 0; j < maidCnt; j++)
  8352. {
  8353. if (maidArray[j] && maidArray[j].Visible)
  8354. {
  8355. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8356. if (!isShift)
  8357. {
  8358. if (j == 0)
  8359. {
  8360. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8361. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8362. danceName[j] = "dance_cm3d2_001_f1.anm";
  8363. }
  8364. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8365. {
  8366. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8367. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8368. danceName[j] = "dance_cm3d2_001_f2.anm";
  8369. }
  8370. else
  8371. {
  8372. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8373. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8374. danceName[j] = "dance_cm3d2_001_f3.anm";
  8375. }
  8376. }
  8377. else
  8378. {
  8379. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8380. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8381. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8382. }
  8383. }
  8384. }
  8385. isDanceStart1 = false;
  8386. isDanceStart1F = true;
  8387. isShift = false;
  8388. }
  8389. if (isDanceStart2)
  8390. {
  8391. for (int j = 0; j < maidCnt; j++)
  8392. {
  8393. if (maidArray[j] && maidArray[j].Visible)
  8394. {
  8395. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8396. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8397. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8398. danceName[j] = "dance_cm3d_001_f1.anm";
  8399. }
  8400. }
  8401. isDanceStart2 = false;
  8402. isDanceStart2F = true;
  8403. }
  8404. if (isDanceStart3)
  8405. {
  8406. for (int j = 0; j < maidCnt; j++)
  8407. {
  8408. if (maidArray[j] && maidArray[j].Visible)
  8409. {
  8410. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8411. if (!isShift)
  8412. {
  8413. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8414. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8415. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8416. }
  8417. else
  8418. {
  8419. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8420. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8421. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8422. }
  8423. }
  8424. }
  8425. isDanceStart3 = false;
  8426. isDanceStart3F = true;
  8427. isShift = false;
  8428. }
  8429. if (isDanceStart4)
  8430. {
  8431. for (int j = 0; j < maidCnt; j++)
  8432. {
  8433. if (maidArray[j] && maidArray[j].Visible)
  8434. {
  8435. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8436. if (!isShift)
  8437. {
  8438. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8439. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8440. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8441. }
  8442. else
  8443. {
  8444. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8445. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8446. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8447. }
  8448. }
  8449. }
  8450. isDanceStart4 = false;
  8451. isDanceStart4F = true;
  8452. isShift = false;
  8453. }
  8454. if (isDanceStart5)
  8455. {
  8456. for (int j = 0; j < maidCnt; j++)
  8457. {
  8458. if (maidArray[j] && maidArray[j].Visible)
  8459. {
  8460. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8461. if (!isShift)
  8462. {
  8463. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8464. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8465. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8466. }
  8467. else
  8468. {
  8469. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8470. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8471. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8472. }
  8473. }
  8474. }
  8475. isDanceStart5 = false;
  8476. isDanceStart5F = true;
  8477. isShift = false;
  8478. }
  8479. if (isDanceStart6)
  8480. {
  8481. for (int j = 0; j < maidCnt; j++)
  8482. {
  8483. if (maidArray[j] && maidArray[j].Visible)
  8484. {
  8485. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8486. if (!isShift)
  8487. {
  8488. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8489. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8490. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8491. }
  8492. else
  8493. {
  8494. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8495. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8496. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8497. }
  8498. }
  8499. }
  8500. isDanceStart6 = false;
  8501. isDanceStart6F = true;
  8502. isShift = false;
  8503. }
  8504. if (isDanceStart7)
  8505. {
  8506. for (int j = 0; j < maidCnt; j++)
  8507. {
  8508. if (maidArray[j] && maidArray[j].Visible)
  8509. {
  8510. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8511. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8512. {
  8513. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8514. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8515. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8516. }
  8517. else
  8518. {
  8519. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8520. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8521. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8522. }
  8523. }
  8524. }
  8525. isDanceStart7 = false;
  8526. isDanceStart7V = true;
  8527. isDanceStart7F = true;
  8528. }
  8529. if (isDanceStart8)
  8530. {
  8531. for (int j = 0; j < maidCnt; j++)
  8532. {
  8533. if (maidArray[j] && maidArray[j].Visible)
  8534. {
  8535. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8536. if (j == 0 || j == 4 || j == 8 || j == 12)
  8537. {
  8538. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8539. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8540. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8541. }
  8542. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8543. {
  8544. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8545. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8546. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8547. }
  8548. else if (j == 2 || j == 6 || j == 10)
  8549. {
  8550. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8551. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8552. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8553. }
  8554. else
  8555. {
  8556. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8557. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8558. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8559. }
  8560. }
  8561. }
  8562. isDanceStart8 = false;
  8563. isDanceStart8V = true;
  8564. isDanceStart8F = true;
  8565. }
  8566. if (isDanceStart9)
  8567. {
  8568. isDanceStart9Count++;
  8569. if (isShift)
  8570. {
  8571. for (int j = 0; j < maidCnt; j++)
  8572. {
  8573. if (maidArray[j] && maidArray[j].Visible)
  8574. {
  8575. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8576. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8577. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8578. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8579. }
  8580. }
  8581. isDanceStart9 = false;
  8582. isDanceStart9F = true;
  8583. isDanceStart9Count = 0;
  8584. isShift = false;
  8585. }
  8586. if (isDanceStart9Count == 10)
  8587. {
  8588. for (int j = 0; j < maidCnt; j++)
  8589. {
  8590. if (maidArray[j] && maidArray[j].Visible)
  8591. {
  8592. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8593. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8594. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8595. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8596. }
  8597. }
  8598. isDanceStart9 = false;
  8599. isDanceStart9F = true;
  8600. isDanceStart9Count = 0;
  8601. }
  8602. }
  8603. if (isDanceStart10)
  8604. {
  8605. for (int j = 0; j < maidCnt; j++)
  8606. {
  8607. if (maidArray[j] && maidArray[j].Visible)
  8608. {
  8609. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8610. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8611. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8612. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8613. }
  8614. }
  8615. isDanceStart10 = false;
  8616. isDanceStart10F = true;
  8617. }
  8618. if (isDanceStart11)
  8619. {
  8620. for (int j = 0; j < maidCnt; j++)
  8621. {
  8622. if (maidArray[j] && maidArray[j].Visible)
  8623. {
  8624. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8625. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8626. {
  8627. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8628. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8629. danceName[j] = nameA + danceNo2 + ".anm";
  8630. }
  8631. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8632. {
  8633. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8634. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8635. danceName[j] = nameA + danceNo3 + ".anm";
  8636. }
  8637. else
  8638. {
  8639. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8640. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8641. danceName[j] = nameA + danceNo1 + ".anm";
  8642. }
  8643. }
  8644. }
  8645. isDanceStart11 = false;
  8646. isDanceStart11V = true;
  8647. isDanceStart11F = true;
  8648. }
  8649. if (isDanceStart12)
  8650. {
  8651. for (int j = 0; j < maidCnt; j++)
  8652. {
  8653. if (maidArray[j] && maidArray[j].Visible)
  8654. {
  8655. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8656. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8657. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8658. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8659. }
  8660. }
  8661. isDanceStart12 = false;
  8662. isDanceStart12F = true;
  8663. }
  8664. if (isDanceStart13)
  8665. {
  8666. for (int j = 0; j < maidCnt; j++)
  8667. {
  8668. if (maidArray[j] && maidArray[j].Visible)
  8669. {
  8670. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8671. if (!isShift)
  8672. {
  8673. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8674. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8675. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8676. }
  8677. else
  8678. {
  8679. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8680. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8681. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8682. }
  8683. }
  8684. }
  8685. isDanceStart13 = false;
  8686. isDanceStart13F = true;
  8687. isShift = false;
  8688. }
  8689. if (isDanceStart14)
  8690. {
  8691. for (int j = 0; j < maidCnt; j++)
  8692. {
  8693. if (maidArray[j] && maidArray[j].Visible)
  8694. {
  8695. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8696. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8697. {
  8698. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8699. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8700. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8701. }
  8702. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8703. {
  8704. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8705. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8706. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8707. }
  8708. else
  8709. {
  8710. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8711. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8712. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8713. }
  8714. }
  8715. }
  8716. isDanceStart14 = false;
  8717. isDanceStart14V = true;
  8718. isDanceStart14F = true;
  8719. }
  8720. if (isDanceStart15)
  8721. {
  8722. isDanceStart15Count++;
  8723. }
  8724. if (isDanceStart15Count == 10)
  8725. {
  8726. for (int j = 0; j < maidCnt; j++)
  8727. {
  8728. if (maidArray[j] && maidArray[j].Visible)
  8729. {
  8730. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8731. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8732. {
  8733. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8734. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8735. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8736. }
  8737. else
  8738. {
  8739. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8740. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8741. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8742. }
  8743. }
  8744. }
  8745. isDanceStart15 = false;
  8746. isDanceStart15V = true;
  8747. isDanceStart15F = true;
  8748. isDanceStart15Count = 0;
  8749. }
  8750. if (isDance)
  8751. {
  8752. for (int j = 0; j < maidCnt; j++)
  8753. {
  8754. if (maidArray[j].Visible)
  8755. {
  8756. if (isDanceStart1F)
  8757. {
  8758. if (isDanceStart1K)
  8759. {
  8760. foreach (string text3 in dance1KArray)
  8761. {
  8762. string[] array = text3.Split(new char[] { ',' });
  8763. float num10 = float.Parse(array[0]);
  8764. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8765. {
  8766. danceFace[j] = num10;
  8767. FaceName[j] = FaceName2[j];
  8768. FaceName2[j] = array[1];
  8769. FaceName3[j] = array[2];
  8770. FaceTime[j] = 0.0166666675f;
  8771. break;
  8772. }
  8773. }
  8774. }
  8775. else if (j == 0)
  8776. {
  8777. foreach (string text3 in dance1Array)
  8778. {
  8779. string[] array = text3.Split(new char[] { ',' });
  8780. float num10 = float.Parse(array[0]);
  8781. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8782. {
  8783. danceFace[j] = num10;
  8784. FaceName[j] = FaceName2[j];
  8785. FaceName2[j] = array[1];
  8786. FaceName3[j] = array[2];
  8787. FaceTime[j] = 0.0166666675f;
  8788. break;
  8789. }
  8790. }
  8791. }
  8792. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8793. {
  8794. foreach (string text3 in dance1BArray)
  8795. {
  8796. string[] array = text3.Split(new char[] { ',' });
  8797. float num10 = float.Parse(array[0]);
  8798. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8799. {
  8800. danceFace[j] = num10;
  8801. FaceName[j] = FaceName2[j];
  8802. FaceName2[j] = array[1];
  8803. FaceName3[j] = array[2];
  8804. FaceTime[j] = 0.0166666675f;
  8805. break;
  8806. }
  8807. }
  8808. }
  8809. else
  8810. {
  8811. foreach (string text3 in dance1CArray)
  8812. {
  8813. string[] array = text3.Split(new char[] { ',' });
  8814. float num10 = float.Parse(array[0]);
  8815. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8816. {
  8817. danceFace[j] = num10;
  8818. FaceName[j] = FaceName2[j];
  8819. FaceName2[j] = array[1];
  8820. FaceName3[j] = array[2];
  8821. FaceTime[j] = 0.0166666675f;
  8822. break;
  8823. }
  8824. }
  8825. }
  8826. }
  8827. if (isDanceStart2F)
  8828. {
  8829. foreach (string text3 in dance2Array)
  8830. {
  8831. string[] array = text3.Split(new char[] { ',' });
  8832. float num10 = float.Parse(array[0]);
  8833. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8834. {
  8835. danceFace[j] = num10;
  8836. FaceName[j] = FaceName2[j];
  8837. FaceName2[j] = array[1];
  8838. FaceName3[j] = array[2];
  8839. FaceTime[j] = 0.0166666675f;
  8840. break;
  8841. }
  8842. }
  8843. }
  8844. if (isDanceStart3F)
  8845. {
  8846. if (isDanceStart3K)
  8847. {
  8848. foreach (string text3 in dance3KArray)
  8849. {
  8850. string[] array = text3.Split(new char[] { ',' });
  8851. float num10 = float.Parse(array[0]);
  8852. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8853. {
  8854. danceFace[j] = num10;
  8855. FaceName[j] = FaceName2[j];
  8856. FaceName2[j] = array[1];
  8857. FaceName3[j] = array[2];
  8858. FaceTime[j] = 0.0166666675f;
  8859. break;
  8860. }
  8861. }
  8862. }
  8863. else
  8864. {
  8865. foreach (string text3 in dance3Array)
  8866. {
  8867. string[] array = text3.Split(new char[] { ',' });
  8868. float num10 = float.Parse(array[0]);
  8869. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8870. {
  8871. danceFace[j] = num10;
  8872. FaceName[j] = FaceName2[j];
  8873. FaceName2[j] = array[1];
  8874. FaceName3[j] = array[2];
  8875. FaceTime[j] = 0.0166666675f;
  8876. break;
  8877. }
  8878. }
  8879. }
  8880. }
  8881. if (isDanceStart4F)
  8882. {
  8883. if (isDanceStart4K)
  8884. {
  8885. foreach (string text3 in dance4KArray)
  8886. {
  8887. string[] array = text3.Split(new char[] { ',' });
  8888. float num10 = float.Parse(array[0]);
  8889. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8890. {
  8891. danceFace[j] = num10;
  8892. FaceName[j] = FaceName2[j];
  8893. FaceName2[j] = array[1];
  8894. FaceName3[j] = array[2];
  8895. FaceTime[j] = 0.0166666675f;
  8896. break;
  8897. }
  8898. }
  8899. }
  8900. else
  8901. {
  8902. foreach (string text3 in dance4Array)
  8903. {
  8904. string[] array = text3.Split(new char[] { ',' });
  8905. float num10 = float.Parse(array[0]);
  8906. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8907. {
  8908. danceFace[j] = num10;
  8909. FaceName[j] = FaceName2[j];
  8910. FaceName2[j] = array[1];
  8911. FaceName3[j] = array[2];
  8912. FaceTime[j] = 0.0166666675f;
  8913. break;
  8914. }
  8915. }
  8916. }
  8917. }
  8918. if (isDanceStart5F)
  8919. {
  8920. if (isDanceStart5K)
  8921. {
  8922. foreach (string text3 in dance5KArray)
  8923. {
  8924. string[] array = text3.Split(new char[] { ',' });
  8925. float num10 = float.Parse(array[0]);
  8926. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8927. {
  8928. danceFace[j] = num10;
  8929. FaceName[j] = FaceName2[j];
  8930. FaceName2[j] = array[1];
  8931. FaceName3[j] = array[2];
  8932. FaceTime[j] = 0.0166666675f;
  8933. break;
  8934. }
  8935. }
  8936. }
  8937. else
  8938. {
  8939. foreach (string text3 in dance5Array)
  8940. {
  8941. string[] array = text3.Split(new char[] { ',' });
  8942. float num10 = float.Parse(array[0]);
  8943. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8944. {
  8945. danceFace[j] = num10;
  8946. FaceName[j] = FaceName2[j];
  8947. FaceName2[j] = array[1];
  8948. FaceName3[j] = array[2];
  8949. FaceTime[j] = 0.0166666675f;
  8950. break;
  8951. }
  8952. }
  8953. }
  8954. }
  8955. if (isDanceStart6F)
  8956. {
  8957. if (isDanceStart6K)
  8958. {
  8959. foreach (string text3 in dance6KArray)
  8960. {
  8961. string[] array = text3.Split(new char[] { ',' });
  8962. float num10 = float.Parse(array[0]);
  8963. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8964. {
  8965. danceFace[j] = num10;
  8966. FaceName[j] = FaceName2[j];
  8967. FaceName2[j] = array[1];
  8968. FaceName3[j] = array[2];
  8969. FaceTime[j] = 0.0166666675f;
  8970. break;
  8971. }
  8972. }
  8973. }
  8974. else
  8975. {
  8976. foreach (string text3 in dance6Array)
  8977. {
  8978. string[] array = text3.Split(new char[] { ',' });
  8979. float num10 = float.Parse(array[0]);
  8980. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8981. {
  8982. danceFace[j] = num10;
  8983. FaceName[j] = FaceName2[j];
  8984. FaceName2[j] = array[1];
  8985. FaceName3[j] = array[2];
  8986. FaceTime[j] = 0.0166666675f;
  8987. break;
  8988. }
  8989. }
  8990. }
  8991. }
  8992. if (isDanceStart7F)
  8993. {
  8994. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8995. {
  8996. foreach (string text3 in dance6BArray)
  8997. {
  8998. string[] array = text3.Split(new char[] { ',' });
  8999. float num10 = float.Parse(array[0]);
  9000. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9001. {
  9002. danceFace[j] = num10;
  9003. FaceName[j] = FaceName2[j];
  9004. FaceName2[j] = array[1];
  9005. FaceName3[j] = array[2];
  9006. FaceTime[j] = 0.0166666675f;
  9007. break;
  9008. }
  9009. }
  9010. }
  9011. else
  9012. {
  9013. foreach (string text3 in dance6Array)
  9014. {
  9015. string[] array = text3.Split(new char[] { ',' });
  9016. float num10 = float.Parse(array[0]);
  9017. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9018. {
  9019. danceFace[j] = num10;
  9020. FaceName[j] = FaceName2[j];
  9021. FaceName2[j] = array[1];
  9022. FaceName3[j] = array[2];
  9023. FaceTime[j] = 0.0166666675f;
  9024. break;
  9025. }
  9026. }
  9027. }
  9028. }
  9029. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9030. {
  9031. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9032. {
  9033. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9034. }
  9035. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9036. {
  9037. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9038. 100f,
  9039. maidArray[j - 1].transform.position.z));
  9040. }
  9041. }
  9042. if (isDanceStart8F)
  9043. {
  9044. if (j == 1 || j == 5 || j == 9 || j == 13)
  9045. {
  9046. foreach (string text3 in dance6BArray)
  9047. {
  9048. string[] array = text3.Split(new char[] { ',' });
  9049. float num10 = float.Parse(array[0]);
  9050. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9051. {
  9052. danceFace[j] = num10;
  9053. FaceName[j] = FaceName2[j];
  9054. FaceName2[j] = array[1];
  9055. FaceName3[j] = array[2];
  9056. FaceTime[j] = 0.0166666675f;
  9057. break;
  9058. }
  9059. }
  9060. }
  9061. else if (j == 2 || j == 6 || j == 10)
  9062. {
  9063. foreach (string text3 in dance6CArray)
  9064. {
  9065. string[] array = text3.Split(new char[] { ',' });
  9066. float num10 = float.Parse(array[0]);
  9067. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9068. {
  9069. danceFace[j] = num10;
  9070. FaceName[j] = FaceName2[j];
  9071. FaceName2[j] = array[1];
  9072. FaceName3[j] = array[2];
  9073. FaceTime[j] = 0.0166666675f;
  9074. break;
  9075. }
  9076. }
  9077. }
  9078. else if (j == 3 || j == 9 || j == 11)
  9079. {
  9080. foreach (string text3 in dance6DArray)
  9081. {
  9082. string[] array = text3.Split(new char[] { ',' });
  9083. float num10 = float.Parse(array[0]);
  9084. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9085. {
  9086. danceFace[j] = num10;
  9087. FaceName[j] = FaceName2[j];
  9088. FaceName2[j] = array[1];
  9089. FaceName3[j] = array[2];
  9090. FaceTime[j] = 0.0166666675f;
  9091. break;
  9092. }
  9093. }
  9094. }
  9095. else
  9096. {
  9097. foreach (string text3 in dance6Array)
  9098. {
  9099. string[] array = text3.Split(new char[] { ',' });
  9100. float num10 = float.Parse(array[0]);
  9101. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9102. {
  9103. danceFace[j] = num10;
  9104. FaceName[j] = FaceName2[j];
  9105. FaceName2[j] = array[1];
  9106. FaceName3[j] = array[2];
  9107. FaceTime[j] = 0.0166666675f;
  9108. break;
  9109. }
  9110. }
  9111. }
  9112. }
  9113. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9114. {
  9115. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9116. {
  9117. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9118. }
  9119. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9120. {
  9121. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9122. 100f,
  9123. maidArray[j - 1].transform.position.z));
  9124. }
  9125. }
  9126. if (isDanceStart8V)
  9127. {
  9128. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9129. {
  9130. isDanceStart8P = true;
  9131. for (int num11 = 0; num11 < maidCnt; num11++)
  9132. {
  9133. if (maidArray[num11].Visible)
  9134. {
  9135. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9136. {
  9137. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9138. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9139. gameObject6.transform.position =
  9140. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9141. .position;
  9142. }
  9143. }
  9144. }
  9145. }
  9146. }
  9147. if (isDanceStart9F)
  9148. {
  9149. if (isDanceStart9K)
  9150. {
  9151. foreach (string text3 in dance9KArray)
  9152. {
  9153. string[] array = text3.Split(new char[] { ',' });
  9154. float num10 = float.Parse(array[0]);
  9155. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9156. {
  9157. danceFace[j] = num10;
  9158. FaceName[j] = FaceName2[j];
  9159. FaceName2[j] = array[1];
  9160. FaceName3[j] = array[2];
  9161. FaceTime[j] = 0.0166666675f;
  9162. break;
  9163. }
  9164. }
  9165. }
  9166. else
  9167. {
  9168. foreach (string text3 in dance7Array)
  9169. {
  9170. string[] array = text3.Split(new char[] { ',' });
  9171. float num10 = float.Parse(array[0]);
  9172. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9173. {
  9174. danceFace[j] = num10;
  9175. FaceName[j] = FaceName2[j];
  9176. FaceName2[j] = array[1];
  9177. FaceName3[j] = array[2];
  9178. FaceTime[j] = 0.0166666675f;
  9179. break;
  9180. }
  9181. }
  9182. }
  9183. }
  9184. if (isDanceStart10F)
  9185. {
  9186. foreach (string text3 in danceO1Array)
  9187. {
  9188. string[] array = text3.Split(new char[] { ',' });
  9189. float num10 = float.Parse(array[0]);
  9190. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9191. {
  9192. danceFace[j] = num10;
  9193. FaceName[j] = FaceName2[j];
  9194. FaceName2[j] = array[1];
  9195. FaceName3[j] = array[2];
  9196. FaceTime[j] = 0.0166666675f;
  9197. break;
  9198. }
  9199. }
  9200. }
  9201. if (isDanceStart11F)
  9202. {
  9203. string[] array14 = null;
  9204. string[] array12 = null;
  9205. string[] array15 = null;
  9206. if (isSS1)
  9207. {
  9208. array14 = danceO1Array;
  9209. array12 = danceO1CArray;
  9210. array15 = danceO1BArray;
  9211. }
  9212. if (isSS2)
  9213. {
  9214. array14 = danceO2Array;
  9215. array12 = danceO2BArray;
  9216. array15 = danceO2CArray;
  9217. }
  9218. if (isSS3)
  9219. {
  9220. array14 = danceO3CArray;
  9221. array12 = danceO3Array;
  9222. array15 = danceO3BArray;
  9223. }
  9224. if (isSS4)
  9225. {
  9226. array14 = danceO5BArray;
  9227. array12 = danceO5Array;
  9228. array15 = danceO5CArray;
  9229. }
  9230. if (isSS5)
  9231. {
  9232. array14 = danceO4Array;
  9233. array12 = danceO4BArray;
  9234. array15 = danceO4CArray;
  9235. }
  9236. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9237. {
  9238. foreach (string text3 in array12)
  9239. {
  9240. string[] array = text3.Split(new char[] { ',' });
  9241. float num10 = float.Parse(array[0]) - 0.03f;
  9242. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9243. {
  9244. danceFace[j] = num10;
  9245. FaceName[j] = FaceName2[j];
  9246. FaceName2[j] = array[1];
  9247. FaceName3[j] = array[2];
  9248. FaceTime[j] = 0.0166666675f;
  9249. break;
  9250. }
  9251. }
  9252. }
  9253. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9254. {
  9255. foreach (string text3 in array15)
  9256. {
  9257. string[] array = text3.Split(new char[] { ',' });
  9258. float num10 = float.Parse(array[0]) - 0.03f;
  9259. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9260. {
  9261. danceFace[j] = num10;
  9262. FaceName[j] = FaceName2[j];
  9263. FaceName2[j] = array[1];
  9264. FaceName3[j] = array[2];
  9265. FaceTime[j] = 0.0166666675f;
  9266. break;
  9267. }
  9268. }
  9269. }
  9270. else
  9271. {
  9272. foreach (string text3 in array14)
  9273. {
  9274. string[] array = text3.Split(new char[] { ',' });
  9275. float num10 = float.Parse(array[0]) - 0.03f;
  9276. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9277. {
  9278. danceFace[j] = num10;
  9279. FaceName[j] = FaceName2[j];
  9280. FaceName2[j] = array[1];
  9281. FaceName3[j] = array[2];
  9282. FaceTime[j] = 0.0166666675f;
  9283. break;
  9284. }
  9285. }
  9286. }
  9287. }
  9288. if (isDanceStart12F)
  9289. {
  9290. foreach (string text3 in dance12Array)
  9291. {
  9292. string[] array = text3.Split(new char[] { ',' });
  9293. float num10 = float.Parse(array[0]);
  9294. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9295. {
  9296. danceFace[j] = num10;
  9297. FaceName[j] = FaceName2[j];
  9298. FaceName2[j] = array[1];
  9299. FaceName3[j] = array[2];
  9300. FaceTime[j] = 0.0166666675f;
  9301. break;
  9302. }
  9303. }
  9304. }
  9305. if (isDanceStart13F)
  9306. {
  9307. if (!isDanceStart13K)
  9308. {
  9309. foreach (string text3 in dance13Array)
  9310. {
  9311. string[] array = text3.Split(new char[] { ',' });
  9312. float num10 = float.Parse(array[0]);
  9313. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9314. {
  9315. danceFace[j] = num10;
  9316. FaceName[j] = FaceName2[j];
  9317. FaceName2[j] = array[1];
  9318. FaceName3[j] = array[2];
  9319. FaceTime[j] = 0.0166666675f;
  9320. break;
  9321. }
  9322. }
  9323. }
  9324. }
  9325. if (isDanceStart14F)
  9326. {
  9327. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9328. {
  9329. foreach (string text3 in dance13BArray)
  9330. {
  9331. string[] array = text3.Split(new char[] { ',' });
  9332. float num10 = float.Parse(array[0]);
  9333. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9334. {
  9335. danceFace[j] = num10;
  9336. FaceName[j] = FaceName2[j];
  9337. FaceName2[j] = array[1];
  9338. FaceName3[j] = array[2];
  9339. FaceTime[j] = 0.0166666675f;
  9340. break;
  9341. }
  9342. }
  9343. }
  9344. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9345. {
  9346. foreach (string text3 in dance13CArray)
  9347. {
  9348. string[] array = text3.Split(new char[] { ',' });
  9349. float num10 = float.Parse(array[0]);
  9350. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9351. {
  9352. danceFace[j] = num10;
  9353. FaceName[j] = FaceName2[j];
  9354. FaceName2[j] = array[1];
  9355. FaceName3[j] = array[2];
  9356. FaceTime[j] = 0.0166666675f;
  9357. break;
  9358. }
  9359. }
  9360. }
  9361. else
  9362. {
  9363. foreach (string text3 in dance13Array)
  9364. {
  9365. string[] array = text3.Split(new char[] { ',' });
  9366. float num10 = float.Parse(array[0]);
  9367. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9368. {
  9369. danceFace[j] = num10;
  9370. FaceName[j] = FaceName2[j];
  9371. FaceName2[j] = array[1];
  9372. FaceName3[j] = array[2];
  9373. FaceTime[j] = 0.0166666675f;
  9374. break;
  9375. }
  9376. }
  9377. }
  9378. }
  9379. if (isDanceStart15F)
  9380. {
  9381. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9382. {
  9383. foreach (string text3 in dance15BArray)
  9384. {
  9385. string[] array = text3.Split(new char[] { ',' });
  9386. float num10 = float.Parse(array[0]);
  9387. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9388. {
  9389. danceFace[j] = num10;
  9390. FaceName[j] = FaceName2[j];
  9391. FaceName2[j] = array[1];
  9392. FaceName3[j] = array[2];
  9393. FaceTime[j] = 0.0166666675f;
  9394. break;
  9395. }
  9396. }
  9397. }
  9398. else
  9399. {
  9400. foreach (string text3 in dance15Array)
  9401. {
  9402. string[] array = text3.Split(new char[] { ',' });
  9403. float num10 = float.Parse(array[0]);
  9404. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9405. {
  9406. danceFace[j] = num10;
  9407. FaceName[j] = FaceName2[j];
  9408. FaceName2[j] = array[1];
  9409. FaceName3[j] = array[2];
  9410. FaceTime[j] = 0.0166666675f;
  9411. break;
  9412. }
  9413. }
  9414. }
  9415. }
  9416. if (!isFadeOut)
  9417. {
  9418. Maid maid = maidArray[j];
  9419. if (maid && maid.Visible)
  9420. {
  9421. if (maid.transform.position.y != 100f)
  9422. {
  9423. FaceTime[j] += Time.deltaTime;
  9424. if (FaceTime[j] < 1f)
  9425. {
  9426. TMorph morph = maid.body0.Face.morph;
  9427. maid.boMabataki = false;
  9428. maid.body0.Face.morph.EyeMabataki = 0f;
  9429. if (FaceName[j] != string.Empty)
  9430. {
  9431. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9432. }
  9433. if (FaceName2[j] != "")
  9434. {
  9435. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9436. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9437. }
  9438. if (FaceName3[j] != string.Empty)
  9439. {
  9440. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9441. }
  9442. maid.body0.Face.morph.FixBlendValues_Face();
  9443. }
  9444. else
  9445. {
  9446. FaceName[j] = FaceName2[j];
  9447. }
  9448. if (isHenkou)
  9449. {
  9450. TMorph morph = maid.body0.Face.morph;
  9451. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9452. maid.boMabataki = false;
  9453. if (isNamidaH)
  9454. {
  9455. fieldValue[(int)morph.hash["namida"]] = 1f;
  9456. }
  9457. else
  9458. {
  9459. fieldValue[(int)morph.hash["namida"]] = 0f;
  9460. }
  9461. if (isSekimenH)
  9462. {
  9463. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9464. }
  9465. else
  9466. {
  9467. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9468. }
  9469. if (isHohoH)
  9470. {
  9471. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9472. }
  9473. else
  9474. {
  9475. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9476. }
  9477. maid.body0.Face.morph.FixBlendValues_Face();
  9478. }
  9479. }
  9480. }
  9481. }
  9482. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9483. }
  9484. }
  9485. if (Input.GetKey(KeyCode.H) || isVR)
  9486. {
  9487. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9488. {
  9489. h2Flg = true;
  9490. isNamidaH = !isNamidaH;
  9491. isHenkou = true;
  9492. }
  9493. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9494. {
  9495. h2Flg = true;
  9496. isSekimenH = !isSekimenH;
  9497. isHenkou = true;
  9498. }
  9499. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9500. {
  9501. h2Flg = true;
  9502. isHohoH = !isHohoH;
  9503. isHenkou = true;
  9504. }
  9505. }
  9506. danceCheckIndex++;
  9507. if (danceCheckIndex == 10)
  9508. {
  9509. danceCheckIndex = 0;
  9510. }
  9511. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9512. isDanceChu = false;
  9513. for (int k = 0; k < danceCheck.Length; k++)
  9514. {
  9515. if (danceCheck[k] > 0f)
  9516. {
  9517. isDanceChu = true;
  9518. break;
  9519. }
  9520. }
  9521. if (!isDanceChu)
  9522. {
  9523. danceWait--;
  9524. if (danceWait > 0)
  9525. {
  9526. isDanceChu = true;
  9527. }
  9528. }
  9529. if (!isDanceChu)
  9530. {
  9531. for (int j = 0; j < maidCnt; j++)
  9532. {
  9533. if (maidArray[j] && maidArray[j].Visible)
  9534. {
  9535. maidArray[j].StopKuchipakuPattern();
  9536. if (isDanceStart7V)
  9537. {
  9538. maidArray[j].SetPos(dancePos[j]);
  9539. maidArray[j].body0.transform.localRotation = danceRot[j];
  9540. }
  9541. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9542. {
  9543. maidArray[j].SetPos(dancePos[j]);
  9544. maidArray[j].body0.transform.localRotation = danceRot[j];
  9545. }
  9546. if (isDanceStart11V)
  9547. {
  9548. maidArray[j].SetPos(dancePos[j]);
  9549. maidArray[j].body0.transform.localRotation = danceRot[j];
  9550. }
  9551. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9552. || isDanceStart13K)
  9553. {
  9554. maidArray[j].SetPos(dancePos[j]);
  9555. maidArray[j].body0.transform.localRotation = danceRot[j];
  9556. int i = j;
  9557. if (!isVR)
  9558. {
  9559. delCount[i] = 20;
  9560. if (goSlot[(int)selectList[i]] != null)
  9561. {
  9562. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9563. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9564. {
  9565. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9566. }
  9567. }
  9568. }
  9569. Maid maid = maidArray[j];
  9570. maid.DelProp(MPN.handitem, true);
  9571. maid.DelProp(MPN.accvag, true);
  9572. maid.DelProp(MPN.accanl, true);
  9573. maid.DelProp(MPN.kousoku_upper, true);
  9574. maid.DelProp(MPN.kousoku_lower, true);
  9575. maid.AllProcPropSeqStart();
  9576. isStop[i] = true;
  9577. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9578. isPoseIti[i] = true;
  9579. poseIti[i] = maidArray[i].transform.position;
  9580. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9581. }
  9582. if (isDanceStart14V)
  9583. {
  9584. maidArray[j].SetPos(dancePos[j]);
  9585. maidArray[j].body0.transform.localRotation = danceRot[j];
  9586. }
  9587. if (isDanceStart15V)
  9588. {
  9589. maidArray[j].SetPos(dancePos[j]);
  9590. maidArray[j].body0.transform.localRotation = danceRot[j];
  9591. }
  9592. }
  9593. }
  9594. isDanceStart1F = false;
  9595. isDanceStart1K = false;
  9596. isDanceStart2F = false;
  9597. isDanceStart3F = false;
  9598. isDanceStart3K = false;
  9599. isDanceStart4F = false;
  9600. isDanceStart4K = false;
  9601. isDanceStart5F = false;
  9602. isDanceStart5K = false;
  9603. isDanceStart6F = false;
  9604. isDanceStart6K = false;
  9605. isDanceStart7F = false;
  9606. isDanceStart7V = false;
  9607. isDanceStart8F = false;
  9608. isDanceStart8V = false;
  9609. isDanceStart8P = false;
  9610. isDanceStart9F = false;
  9611. isDanceStart9K = false;
  9612. isDanceStart10F = false;
  9613. isDanceStart11F = false;
  9614. isDanceStart11V = false;
  9615. isDanceStart12F = false;
  9616. isDanceStart13F = false;
  9617. isDanceStart13K = false;
  9618. isDanceStart14F = false;
  9619. isDanceStart14V = false;
  9620. isDanceStart15F = false;
  9621. isDanceStart15V = false;
  9622. for (int j = 0; j < maidCnt; j++)
  9623. {
  9624. danceFace[j] = 0f;
  9625. }
  9626. danceCheckIndex = 0;
  9627. for (int k = 0; k < danceCheck.Length; k++)
  9628. {
  9629. danceCheck[danceCheckIndex] = 1f;
  9630. }
  9631. isDance = false;
  9632. }
  9633. }
  9634. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9635. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9636. {
  9637. if (getModKeyPressing(modKey.Shift))
  9638. {
  9639. isShift = true;
  9640. }
  9641. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9642. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9643. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9644. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9645. if (!isShift)
  9646. {
  9647. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9648. }
  9649. for (int j = 0; j < maidCnt; j++)
  9650. {
  9651. string text5 = "dance_cm3d2_001_f1.anm";
  9652. switch (j)
  9653. {
  9654. case 1:
  9655. case 3:
  9656. case 5:
  9657. case 7:
  9658. case 9:
  9659. case 11:
  9660. case 13:
  9661. text5 = "dance_cm3d2_001_f2.anm";
  9662. break;
  9663. case 2:
  9664. case 4:
  9665. case 6:
  9666. case 8:
  9667. case 10:
  9668. case 12:
  9669. text5 = "dance_cm3d2_001_f3.anm";
  9670. break;
  9671. }
  9672. if (!isShift)
  9673. {
  9674. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9675. {
  9676. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9677. }
  9678. }
  9679. else
  9680. {
  9681. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9682. {
  9683. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9684. GameUty.FileSystem,
  9685. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9686. false,
  9687. false);
  9688. }
  9689. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9690. text4 = textAsset.text;
  9691. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9692. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9693. && !isDanceStart9K && !isDanceStart13K)
  9694. {
  9695. dancePos[j] = maidArray[j].transform.position;
  9696. danceRot[j] = maidArray[j].transform.localRotation;
  9697. }
  9698. }
  9699. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9700. }
  9701. if (!isShift)
  9702. {
  9703. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9704. sw = new Stopwatch();
  9705. sw.Start();
  9706. }
  9707. else if (getModKeyPressing(modKey.Ctrl))
  9708. {
  9709. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9710. }
  9711. else
  9712. {
  9713. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9714. }
  9715. for (int j = 0; j < maidCnt; j++)
  9716. {
  9717. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9718. Vector3 vector = Vector3.zero;
  9719. switch (j)
  9720. {
  9721. case 3:
  9722. vector.x = 1f;
  9723. break;
  9724. case 4:
  9725. vector.x = -1f;
  9726. break;
  9727. case 5:
  9728. vector.x = 2f;
  9729. break;
  9730. case 6:
  9731. vector.x = -2f;
  9732. break;
  9733. case 7:
  9734. vector.x = 3f;
  9735. break;
  9736. case 8:
  9737. vector.x = -3f;
  9738. break;
  9739. case 9:
  9740. vector.x = 4f;
  9741. break;
  9742. case 10:
  9743. vector.x = -4f;
  9744. break;
  9745. case 11:
  9746. vector.x = 5f;
  9747. break;
  9748. case 12:
  9749. vector.x = -5f;
  9750. break;
  9751. case 13:
  9752. vector.x = 6f;
  9753. break;
  9754. }
  9755. if (!isShift)
  9756. {
  9757. maidArray[j].SetPos(vector);
  9758. }
  9759. isStop[j] = false;
  9760. isLock[j] = false;
  9761. pHandL[j] = 0;
  9762. pHandR[j] = 0;
  9763. muneIKL[j] = false;
  9764. muneIKR[j] = false;
  9765. if (!isVR)
  9766. {
  9767. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9768. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9769. }
  9770. }
  9771. ikBui = 5;
  9772. isDanceStart1F = false;
  9773. isDanceStart2F = false;
  9774. isDanceStart3F = false;
  9775. isDanceStart4F = false;
  9776. isDanceStart5F = false;
  9777. isDanceStart6F = false;
  9778. isDanceStart7F = false;
  9779. isDanceStart8F = false;
  9780. isDanceStart9F = false;
  9781. isDanceStart10F = false;
  9782. isDanceStart11F = false;
  9783. isDanceStart12F = false;
  9784. isDanceStart13F = false;
  9785. isDanceStart14F = false;
  9786. isDanceStart15F = false;
  9787. for (int j = 0; j < maidCnt; j++)
  9788. {
  9789. danceFace[j] = 0f;
  9790. }
  9791. if (isDanceStart7V)
  9792. {
  9793. for (int j = 0; j < maidCnt; j++)
  9794. {
  9795. if (maidArray[j] && maidArray[j].Visible)
  9796. {
  9797. if (isDanceStart7V)
  9798. {
  9799. maidArray[j].SetPos(dancePos[j]);
  9800. maidArray[j].body0.transform.localRotation = danceRot[j];
  9801. }
  9802. }
  9803. }
  9804. isDanceStart7V = false;
  9805. }
  9806. if (isDanceStart8V)
  9807. {
  9808. for (int j = 0; j < maidCnt; j++)
  9809. {
  9810. if (maidArray[j] && maidArray[j].Visible)
  9811. {
  9812. if (isDanceStart8V)
  9813. {
  9814. maidArray[j].SetPos(dancePos[j]);
  9815. maidArray[j].body0.transform.localRotation = danceRot[j];
  9816. }
  9817. }
  9818. }
  9819. isDanceStart8V = false;
  9820. isDanceStart8P = false;
  9821. }
  9822. if (isDanceStart11V)
  9823. {
  9824. for (int j = 0; j < maidCnt; j++)
  9825. {
  9826. if (maidArray[j] && maidArray[j].Visible)
  9827. {
  9828. if (isDanceStart11V)
  9829. {
  9830. maidArray[j].SetPos(dancePos[j]);
  9831. maidArray[j].body0.transform.localRotation = danceRot[j];
  9832. }
  9833. }
  9834. }
  9835. isDanceStart11V = false;
  9836. }
  9837. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9838. || isDanceStart13K)
  9839. {
  9840. for (int j = 0; j < maidCnt; j++)
  9841. {
  9842. if (maidArray[j] && maidArray[j].Visible)
  9843. {
  9844. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9845. || isDanceStart13K)
  9846. {
  9847. maidArray[j].SetPos(dancePos[j]);
  9848. maidArray[j].body0.transform.localRotation = danceRot[j];
  9849. int i = j;
  9850. if (!isVR)
  9851. {
  9852. delCount[i] = 20;
  9853. if (goSlot[(int)selectList[i]] != null)
  9854. {
  9855. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9856. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9857. {
  9858. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9859. }
  9860. }
  9861. }
  9862. Maid maid = maidArray[j];
  9863. maid.DelProp(MPN.handitem, true);
  9864. maid.DelProp(MPN.accvag, true);
  9865. maid.DelProp(MPN.accanl, true);
  9866. maid.DelProp(MPN.kousoku_upper, true);
  9867. maid.DelProp(MPN.kousoku_lower, true);
  9868. maid.AllProcPropSeqStart();
  9869. }
  9870. }
  9871. }
  9872. isDanceStart1K = false;
  9873. isDanceStart3K = false;
  9874. isDanceStart4K = false;
  9875. isDanceStart5K = false;
  9876. isDanceStart6K = false;
  9877. isDanceStart9K = false;
  9878. isDanceStart13K = false;
  9879. }
  9880. if (isDanceStart14V)
  9881. {
  9882. for (int j = 0; j < maidCnt; j++)
  9883. {
  9884. if (maidArray[j] && maidArray[j].Visible)
  9885. {
  9886. if (isDanceStart14V)
  9887. {
  9888. maidArray[j].SetPos(dancePos[j]);
  9889. maidArray[j].body0.transform.localRotation = danceRot[j];
  9890. }
  9891. }
  9892. }
  9893. isDanceStart14V = false;
  9894. }
  9895. if (isDanceStart15V)
  9896. {
  9897. for (int j = 0; j < maidCnt; j++)
  9898. {
  9899. if (maidArray[j] && maidArray[j].Visible)
  9900. {
  9901. if (isDanceStart15V)
  9902. {
  9903. maidArray[j].SetPos(dancePos[j]);
  9904. maidArray[j].body0.transform.localRotation = danceRot[j];
  9905. }
  9906. }
  9907. }
  9908. isDanceStart15V = false;
  9909. }
  9910. if (isShift)
  9911. {
  9912. if (maidArray[1] && maidArray[1].Visible)
  9913. {
  9914. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9915. {
  9916. Vector3 vector = Vector3.zero;
  9917. vector.x = 0.6f;
  9918. maidArray[1].SetPos(vector);
  9919. if (maidArray[2] && maidArray[2].Visible)
  9920. {
  9921. vector.x = -0.6f;
  9922. maidArray[2].SetPos(vector);
  9923. }
  9924. if (maidArray[3] && maidArray[3].Visible)
  9925. {
  9926. vector.x = 1.2f;
  9927. maidArray[3].SetPos(vector);
  9928. }
  9929. if (maidArray[4] && maidArray[4].Visible)
  9930. {
  9931. vector.x = -1.2f;
  9932. maidArray[4].SetPos(vector);
  9933. }
  9934. if (maidArray[5] && maidArray[5].Visible)
  9935. {
  9936. vector.x = 1.8f;
  9937. maidArray[5].SetPos(vector);
  9938. }
  9939. if (maidArray[6] && maidArray[6].Visible)
  9940. {
  9941. vector.x = -1.8f;
  9942. maidArray[6].SetPos(vector);
  9943. }
  9944. if (maidArray[7] && maidArray[7].Visible)
  9945. {
  9946. vector.x = 2.4f;
  9947. maidArray[7].SetPos(vector);
  9948. }
  9949. if (maidArray[8] && maidArray[8].Visible)
  9950. {
  9951. vector.x = -2.4f;
  9952. maidArray[8].SetPos(vector);
  9953. }
  9954. if (maidArray[9] && maidArray[9].Visible)
  9955. {
  9956. vector.x = 3f;
  9957. maidArray[9].SetPos(vector);
  9958. }
  9959. if (maidArray[10] && maidArray[10].Visible)
  9960. {
  9961. vector.x = -3f;
  9962. maidArray[10].SetPos(vector);
  9963. }
  9964. if (maidArray[11] && maidArray[11].Visible)
  9965. {
  9966. vector.x = 3.6f;
  9967. maidArray[11].SetPos(vector);
  9968. }
  9969. if (maidArray[12] && maidArray[12].Visible)
  9970. {
  9971. vector.x = -3.6f;
  9972. maidArray[12].SetPos(vector);
  9973. }
  9974. if (maidArray[13] && maidArray[13].Visible)
  9975. {
  9976. vector.x = 4.2f;
  9977. maidArray[13].SetPos(vector);
  9978. }
  9979. }
  9980. }
  9981. isDanceStart1K = true;
  9982. for (int j = 0; j < maidCnt; j++)
  9983. {
  9984. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9985. maidArray[j].body0.transform.localRotation.y + 90f,
  9986. maidArray[j].body0.transform.localRotation.z));
  9987. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9988. maidArray[j].body0.transform.position.y,
  9989. maidArray[j].body0.transform.position.z + 4f));
  9990. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9991. int i = j;
  9992. Maid maid = maidArray[j];
  9993. if (!isVR)
  9994. {
  9995. delCount[i] = 20;
  9996. if (goSlot[(int)selectList[i]] != null)
  9997. {
  9998. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9999. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10000. {
  10001. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10002. }
  10003. }
  10004. }
  10005. string[] array = new string[2];
  10006. array = text2.Split(new char[] { ',' });
  10007. maid.DelProp(MPN.handitem, true);
  10008. maid.DelProp(MPN.accvag, true);
  10009. maid.DelProp(MPN.accanl, true);
  10010. maid.DelProp(MPN.kousoku_upper, true);
  10011. maid.DelProp(MPN.kousoku_lower, true);
  10012. if (array[0] != "")
  10013. {
  10014. maid.SetProp(array[0], array[1], 0, true, false);
  10015. }
  10016. maid.AllProcPropSeqStart();
  10017. }
  10018. }
  10019. isDance = true;
  10020. isDanceStart1 = true;
  10021. }
  10022. if (isF2)
  10023. {
  10024. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10025. string text4 = textAsset.text;
  10026. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10027. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10028. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10029. for (int j = 0; j < maidCnt; j++)
  10030. {
  10031. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10032. {
  10033. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10034. GameUty.FileSystem,
  10035. "dance_cm3d_001_f1.anm",
  10036. false,
  10037. false);
  10038. }
  10039. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10040. }
  10041. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10042. for (int j = 0; j < maidCnt; j++)
  10043. {
  10044. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10045. isStop[j] = false;
  10046. isLock[j] = false;
  10047. pHandL[j] = 0;
  10048. pHandR[j] = 0;
  10049. muneIKL[j] = false;
  10050. muneIKR[j] = false;
  10051. if (!isVR)
  10052. {
  10053. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10054. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10055. }
  10056. }
  10057. ikBui = 5;
  10058. isDanceStart1F = false;
  10059. isDanceStart2F = false;
  10060. isDanceStart3F = false;
  10061. isDanceStart4F = false;
  10062. isDanceStart5F = false;
  10063. isDanceStart6F = false;
  10064. isDanceStart7F = false;
  10065. isDanceStart8F = false;
  10066. isDanceStart9F = false;
  10067. isDanceStart10F = false;
  10068. isDanceStart11F = false;
  10069. isDanceStart12F = false;
  10070. isDanceStart13F = false;
  10071. isDanceStart14F = false;
  10072. isDanceStart15F = false;
  10073. for (int j = 0; j < maidCnt; j++)
  10074. {
  10075. danceFace[j] = 0f;
  10076. }
  10077. if (isDanceStart7V)
  10078. {
  10079. for (int j = 0; j < maidCnt; j++)
  10080. {
  10081. if (maidArray[j] && maidArray[j].Visible)
  10082. {
  10083. if (isDanceStart7V)
  10084. {
  10085. maidArray[j].SetPos(dancePos[j]);
  10086. maidArray[j].body0.transform.localRotation = danceRot[j];
  10087. }
  10088. }
  10089. }
  10090. isDanceStart7V = false;
  10091. }
  10092. if (isDanceStart8V)
  10093. {
  10094. for (int j = 0; j < maidCnt; j++)
  10095. {
  10096. if (maidArray[j] && maidArray[j].Visible)
  10097. {
  10098. if (isDanceStart8V)
  10099. {
  10100. maidArray[j].SetPos(dancePos[j]);
  10101. maidArray[j].body0.transform.localRotation = danceRot[j];
  10102. }
  10103. }
  10104. }
  10105. isDanceStart8V = false;
  10106. isDanceStart8P = false;
  10107. }
  10108. if (isDanceStart11V)
  10109. {
  10110. for (int j = 0; j < maidCnt; j++)
  10111. {
  10112. if (maidArray[j] && maidArray[j].Visible)
  10113. {
  10114. if (isDanceStart11V)
  10115. {
  10116. maidArray[j].SetPos(dancePos[j]);
  10117. maidArray[j].body0.transform.localRotation = danceRot[j];
  10118. }
  10119. }
  10120. }
  10121. isDanceStart11V = false;
  10122. }
  10123. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10124. || isDanceStart13K)
  10125. {
  10126. for (int j = 0; j < maidCnt; j++)
  10127. {
  10128. if (maidArray[j] && maidArray[j].Visible)
  10129. {
  10130. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10131. || isDanceStart13K)
  10132. {
  10133. maidArray[j].SetPos(dancePos[j]);
  10134. maidArray[j].body0.transform.localRotation = danceRot[j];
  10135. int i = j;
  10136. if (!isVR)
  10137. {
  10138. delCount[i] = 20;
  10139. if (goSlot[(int)selectList[i]] != null)
  10140. {
  10141. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10142. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10143. {
  10144. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10145. }
  10146. }
  10147. }
  10148. Maid maid = maidArray[j];
  10149. maid.DelProp(MPN.handitem, true);
  10150. maid.DelProp(MPN.accvag, true);
  10151. maid.DelProp(MPN.accanl, true);
  10152. maid.DelProp(MPN.kousoku_upper, true);
  10153. maid.DelProp(MPN.kousoku_lower, true);
  10154. maid.AllProcPropSeqStart();
  10155. }
  10156. }
  10157. }
  10158. isDanceStart1K = false;
  10159. isDanceStart3K = false;
  10160. isDanceStart4K = false;
  10161. isDanceStart5K = false;
  10162. isDanceStart6K = false;
  10163. isDanceStart9K = false;
  10164. isDanceStart13K = false;
  10165. }
  10166. if (isDanceStart14V)
  10167. {
  10168. for (int j = 0; j < maidCnt; j++)
  10169. {
  10170. if (maidArray[j] && maidArray[j].Visible)
  10171. {
  10172. if (isDanceStart14V)
  10173. {
  10174. maidArray[j].SetPos(dancePos[j]);
  10175. maidArray[j].body0.transform.localRotation = danceRot[j];
  10176. }
  10177. }
  10178. }
  10179. isDanceStart14V = false;
  10180. }
  10181. if (isDanceStart15V)
  10182. {
  10183. for (int j = 0; j < maidCnt; j++)
  10184. {
  10185. if (maidArray[j] && maidArray[j].Visible)
  10186. {
  10187. if (isDanceStart15V)
  10188. {
  10189. maidArray[j].SetPos(dancePos[j]);
  10190. maidArray[j].body0.transform.localRotation = danceRot[j];
  10191. }
  10192. }
  10193. }
  10194. isDanceStart15V = false;
  10195. }
  10196. if (maidArray[1] && maidArray[1].Visible)
  10197. {
  10198. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10199. {
  10200. Vector3 vector = Vector3.zero;
  10201. vector.x = 0.6f;
  10202. maidArray[1].SetPos(vector);
  10203. if (maidArray[2] && maidArray[2].Visible)
  10204. {
  10205. vector.x = -0.6f;
  10206. maidArray[2].SetPos(vector);
  10207. }
  10208. if (maidArray[3] && maidArray[3].Visible)
  10209. {
  10210. vector.x = 1.2f;
  10211. maidArray[3].SetPos(vector);
  10212. }
  10213. if (maidArray[4] && maidArray[4].Visible)
  10214. {
  10215. vector.x = -1.2f;
  10216. maidArray[4].SetPos(vector);
  10217. }
  10218. if (maidArray[5] && maidArray[5].Visible)
  10219. {
  10220. vector.x = 1.8f;
  10221. maidArray[5].SetPos(vector);
  10222. }
  10223. if (maidArray[6] && maidArray[6].Visible)
  10224. {
  10225. vector.x = -1.8f;
  10226. maidArray[6].SetPos(vector);
  10227. }
  10228. if (maidArray[7] && maidArray[7].Visible)
  10229. {
  10230. vector.x = 2.4f;
  10231. maidArray[7].SetPos(vector);
  10232. }
  10233. if (maidArray[8] && maidArray[8].Visible)
  10234. {
  10235. vector.x = -2.4f;
  10236. maidArray[8].SetPos(vector);
  10237. }
  10238. if (maidArray[9] && maidArray[9].Visible)
  10239. {
  10240. vector.x = 3f;
  10241. maidArray[9].SetPos(vector);
  10242. }
  10243. if (maidArray[10] && maidArray[10].Visible)
  10244. {
  10245. vector.x = -3f;
  10246. maidArray[10].SetPos(vector);
  10247. }
  10248. if (maidArray[11] && maidArray[11].Visible)
  10249. {
  10250. vector.x = 3.6f;
  10251. maidArray[11].SetPos(vector);
  10252. }
  10253. if (maidArray[12] && maidArray[12].Visible)
  10254. {
  10255. vector.x = -3.6f;
  10256. maidArray[12].SetPos(vector);
  10257. }
  10258. if (maidArray[13] && maidArray[13].Visible)
  10259. {
  10260. vector.x = 4.2f;
  10261. maidArray[13].SetPos(vector);
  10262. }
  10263. }
  10264. }
  10265. isDance = true;
  10266. isDanceStart2 = true;
  10267. isF2 = false;
  10268. }
  10269. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10270. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10271. {
  10272. GameMain.Instance.SoundMgr.StopBGM(0f);
  10273. isF2 = true;
  10274. }
  10275. if (isF3)
  10276. {
  10277. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10278. string text4 = textAsset.text;
  10279. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10280. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10281. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10282. for (int j = 0; j < maidCnt; j++)
  10283. {
  10284. if (!isShift)
  10285. {
  10286. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10287. {
  10288. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10289. GameUty.FileSystem,
  10290. "dance_cm3d_002_end_f1.anm",
  10291. false,
  10292. false);
  10293. }
  10294. }
  10295. else
  10296. {
  10297. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10298. {
  10299. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10300. GameUty.FileSystem,
  10301. "dance_cm3d2_kara_001_sl_f1.anm",
  10302. false,
  10303. false);
  10304. }
  10305. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10306. text4 = textAsset.text;
  10307. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10308. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10309. && !isDanceStart9K && !isDanceStart13K)
  10310. {
  10311. dancePos[j] = maidArray[j].transform.position;
  10312. danceRot[j] = maidArray[j].transform.localRotation;
  10313. }
  10314. }
  10315. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10316. }
  10317. if (!isShift)
  10318. {
  10319. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10320. }
  10321. else
  10322. {
  10323. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10324. }
  10325. for (int j = 0; j < maidCnt; j++)
  10326. {
  10327. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10328. isStop[j] = false;
  10329. isLock[j] = false;
  10330. pHandL[j] = 0;
  10331. pHandR[j] = 0;
  10332. muneIKL[j] = false;
  10333. muneIKR[j] = false;
  10334. if (!isVR)
  10335. {
  10336. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10337. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10338. }
  10339. }
  10340. ikBui = 5;
  10341. isDanceStart1F = false;
  10342. isDanceStart2F = false;
  10343. isDanceStart3F = false;
  10344. isDanceStart4F = false;
  10345. isDanceStart5F = false;
  10346. isDanceStart6F = false;
  10347. isDanceStart7F = false;
  10348. isDanceStart8F = false;
  10349. isDanceStart9F = false;
  10350. isDanceStart10F = false;
  10351. isDanceStart11F = false;
  10352. isDanceStart12F = false;
  10353. isDanceStart13F = false;
  10354. isDanceStart14F = false;
  10355. isDanceStart15F = false;
  10356. for (int j = 0; j < maidCnt; j++)
  10357. {
  10358. danceFace[j] = 0f;
  10359. }
  10360. if (isDanceStart7V)
  10361. {
  10362. for (int j = 0; j < maidCnt; j++)
  10363. {
  10364. if (maidArray[j] && maidArray[j].Visible)
  10365. {
  10366. if (isDanceStart7V)
  10367. {
  10368. maidArray[j].SetPos(dancePos[j]);
  10369. maidArray[j].body0.transform.localRotation = danceRot[j];
  10370. }
  10371. }
  10372. }
  10373. isDanceStart7V = false;
  10374. }
  10375. if (isDanceStart8V)
  10376. {
  10377. for (int j = 0; j < maidCnt; j++)
  10378. {
  10379. if (maidArray[j] && maidArray[j].Visible)
  10380. {
  10381. if (isDanceStart8V)
  10382. {
  10383. maidArray[j].SetPos(dancePos[j]);
  10384. maidArray[j].body0.transform.localRotation = danceRot[j];
  10385. }
  10386. }
  10387. }
  10388. isDanceStart8V = false;
  10389. isDanceStart8P = false;
  10390. }
  10391. if (isDanceStart11V)
  10392. {
  10393. for (int j = 0; j < maidCnt; j++)
  10394. {
  10395. if (maidArray[j] && maidArray[j].Visible)
  10396. {
  10397. if (isDanceStart11V)
  10398. {
  10399. maidArray[j].SetPos(dancePos[j]);
  10400. maidArray[j].body0.transform.localRotation = danceRot[j];
  10401. }
  10402. }
  10403. }
  10404. isDanceStart11V = false;
  10405. }
  10406. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10407. || isDanceStart13K)
  10408. {
  10409. for (int j = 0; j < maidCnt; j++)
  10410. {
  10411. if (maidArray[j] && maidArray[j].Visible)
  10412. {
  10413. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10414. || isDanceStart13K)
  10415. {
  10416. maidArray[j].SetPos(dancePos[j]);
  10417. maidArray[j].body0.transform.localRotation = danceRot[j];
  10418. int i = j;
  10419. if (!isVR)
  10420. {
  10421. delCount[i] = 20;
  10422. if (goSlot[(int)selectList[i]] != null)
  10423. {
  10424. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10425. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10426. {
  10427. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10428. }
  10429. }
  10430. }
  10431. Maid maid = maidArray[j];
  10432. maid.DelProp(MPN.handitem, true);
  10433. maid.DelProp(MPN.accvag, true);
  10434. maid.DelProp(MPN.accanl, true);
  10435. maid.DelProp(MPN.kousoku_upper, true);
  10436. maid.DelProp(MPN.kousoku_lower, true);
  10437. maid.AllProcPropSeqStart();
  10438. }
  10439. }
  10440. }
  10441. isDanceStart1K = false;
  10442. isDanceStart3K = false;
  10443. isDanceStart4K = false;
  10444. isDanceStart5K = false;
  10445. isDanceStart6K = false;
  10446. isDanceStart9K = false;
  10447. isDanceStart13K = false;
  10448. }
  10449. if (isDanceStart14V)
  10450. {
  10451. for (int j = 0; j < maidCnt; j++)
  10452. {
  10453. if (maidArray[j] && maidArray[j].Visible)
  10454. {
  10455. if (isDanceStart14V)
  10456. {
  10457. maidArray[j].SetPos(dancePos[j]);
  10458. maidArray[j].body0.transform.localRotation = danceRot[j];
  10459. }
  10460. }
  10461. }
  10462. isDanceStart14V = false;
  10463. }
  10464. if (isDanceStart15V)
  10465. {
  10466. for (int j = 0; j < maidCnt; j++)
  10467. {
  10468. if (maidArray[j] && maidArray[j].Visible)
  10469. {
  10470. if (isDanceStart15V)
  10471. {
  10472. maidArray[j].SetPos(dancePos[j]);
  10473. maidArray[j].body0.transform.localRotation = danceRot[j];
  10474. }
  10475. }
  10476. }
  10477. isDanceStart15V = false;
  10478. }
  10479. if (maidArray[1] && maidArray[1].Visible)
  10480. {
  10481. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10482. {
  10483. Vector3 vector = Vector3.zero;
  10484. vector.x = 0.6f;
  10485. maidArray[1].SetPos(vector);
  10486. if (maidArray[2] && maidArray[2].Visible)
  10487. {
  10488. vector.x = -0.6f;
  10489. maidArray[2].SetPos(vector);
  10490. }
  10491. if (maidArray[3] && maidArray[3].Visible)
  10492. {
  10493. vector.x = 1.2f;
  10494. maidArray[3].SetPos(vector);
  10495. }
  10496. if (maidArray[4] && maidArray[4].Visible)
  10497. {
  10498. vector.x = -1.2f;
  10499. maidArray[4].SetPos(vector);
  10500. }
  10501. if (maidArray[5] && maidArray[5].Visible)
  10502. {
  10503. vector.x = 1.8f;
  10504. maidArray[5].SetPos(vector);
  10505. }
  10506. if (maidArray[6] && maidArray[6].Visible)
  10507. {
  10508. vector.x = -1.8f;
  10509. maidArray[6].SetPos(vector);
  10510. }
  10511. if (maidArray[7] && maidArray[7].Visible)
  10512. {
  10513. vector.x = 2.4f;
  10514. maidArray[7].SetPos(vector);
  10515. }
  10516. if (maidArray[8] && maidArray[8].Visible)
  10517. {
  10518. vector.x = -2.4f;
  10519. maidArray[8].SetPos(vector);
  10520. }
  10521. if (maidArray[9] && maidArray[9].Visible)
  10522. {
  10523. vector.x = 3f;
  10524. maidArray[9].SetPos(vector);
  10525. }
  10526. if (maidArray[10] && maidArray[10].Visible)
  10527. {
  10528. vector.x = -3f;
  10529. maidArray[10].SetPos(vector);
  10530. }
  10531. if (maidArray[11] && maidArray[11].Visible)
  10532. {
  10533. vector.x = 3.6f;
  10534. maidArray[11].SetPos(vector);
  10535. }
  10536. if (maidArray[12] && maidArray[12].Visible)
  10537. {
  10538. vector.x = -3.6f;
  10539. maidArray[12].SetPos(vector);
  10540. }
  10541. if (maidArray[13] && maidArray[13].Visible)
  10542. {
  10543. vector.x = 4.2f;
  10544. maidArray[13].SetPos(vector);
  10545. }
  10546. }
  10547. }
  10548. if (isShift)
  10549. {
  10550. isDanceStart3K = true;
  10551. for (int j = 0; j < maidCnt; j++)
  10552. {
  10553. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10554. maidArray[j].body0.transform.localRotation.y + 90f,
  10555. maidArray[j].body0.transform.localRotation.z));
  10556. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10557. maidArray[j].body0.transform.position.y,
  10558. maidArray[j].body0.transform.position.z + 4f));
  10559. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10560. int i = j;
  10561. Maid maid = maidArray[j];
  10562. if (!isVR)
  10563. {
  10564. delCount[i] = 20;
  10565. if (goSlot[(int)selectList[i]] != null)
  10566. {
  10567. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10568. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10569. {
  10570. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10571. }
  10572. }
  10573. }
  10574. string[] array = new string[2];
  10575. array = text2.Split(new char[] { ',' });
  10576. maid.DelProp(MPN.handitem, true);
  10577. maid.DelProp(MPN.accvag, true);
  10578. maid.DelProp(MPN.accanl, true);
  10579. maid.DelProp(MPN.kousoku_upper, true);
  10580. maid.DelProp(MPN.kousoku_lower, true);
  10581. if (array[0] != "")
  10582. {
  10583. maid.SetProp(array[0], array[1], 0, true, false);
  10584. }
  10585. maid.AllProcPropSeqStart();
  10586. }
  10587. }
  10588. isDance = true;
  10589. isDanceStart3 = true;
  10590. isF3 = false;
  10591. }
  10592. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10593. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10594. {
  10595. GameMain.Instance.SoundMgr.StopBGM(0f);
  10596. isF3 = true;
  10597. if (getModKeyPressing(modKey.Shift))
  10598. {
  10599. isShift = true;
  10600. }
  10601. }
  10602. if (isSF1 || isSF2 || isSF3)
  10603. {
  10604. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10605. string text4 = textAsset.text;
  10606. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10607. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10608. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10609. for (int j = 0; j < maidCnt; j++)
  10610. {
  10611. if (!isShift)
  10612. {
  10613. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10614. {
  10615. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10616. GameUty.FileSystem,
  10617. "dance_cm3d2_002_smt_f.anm",
  10618. false,
  10619. false);
  10620. }
  10621. }
  10622. else
  10623. {
  10624. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10625. {
  10626. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10627. GameUty.FileSystem,
  10628. "dance_cm3d2_kara02_001_smt_f1.anm",
  10629. false,
  10630. false);
  10631. }
  10632. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10633. text4 = textAsset.text;
  10634. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10635. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10636. && !isDanceStart9K && !isDanceStart13K)
  10637. {
  10638. dancePos[j] = maidArray[j].transform.position;
  10639. danceRot[j] = maidArray[j].transform.localRotation;
  10640. }
  10641. }
  10642. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10643. }
  10644. if (!isShift)
  10645. {
  10646. if (isSF1)
  10647. {
  10648. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10649. }
  10650. if (isSF2)
  10651. {
  10652. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10653. }
  10654. if (isSF3)
  10655. {
  10656. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10657. }
  10658. }
  10659. else
  10660. {
  10661. if (isSF1)
  10662. {
  10663. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10664. }
  10665. if (isSF2)
  10666. {
  10667. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10668. }
  10669. if (isSF3)
  10670. {
  10671. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10672. }
  10673. }
  10674. for (int j = 0; j < maidCnt; j++)
  10675. {
  10676. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10677. isStop[j] = false;
  10678. isLock[j] = false;
  10679. pHandL[j] = 0;
  10680. pHandR[j] = 0;
  10681. muneIKL[j] = false;
  10682. muneIKR[j] = false;
  10683. if (!isVR)
  10684. {
  10685. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10686. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10687. }
  10688. }
  10689. ikBui = 5;
  10690. isDanceStart1F = false;
  10691. isDanceStart2F = false;
  10692. isDanceStart3F = false;
  10693. isDanceStart4F = false;
  10694. isDanceStart5F = false;
  10695. isDanceStart6F = false;
  10696. isDanceStart7F = false;
  10697. isDanceStart8F = false;
  10698. isDanceStart9F = false;
  10699. isDanceStart10F = false;
  10700. isDanceStart11F = false;
  10701. isDanceStart12F = false;
  10702. isDanceStart13F = false;
  10703. isDanceStart14F = false;
  10704. isDanceStart15F = false;
  10705. for (int j = 0; j < maidCnt; j++)
  10706. {
  10707. danceFace[j] = 0f;
  10708. }
  10709. if (isDanceStart7V)
  10710. {
  10711. for (int j = 0; j < maidCnt; j++)
  10712. {
  10713. if (maidArray[j] && maidArray[j].Visible)
  10714. {
  10715. if (isDanceStart7V)
  10716. {
  10717. maidArray[j].SetPos(dancePos[j]);
  10718. maidArray[j].body0.transform.localRotation = danceRot[j];
  10719. }
  10720. }
  10721. }
  10722. isDanceStart7V = false;
  10723. }
  10724. if (isDanceStart8V)
  10725. {
  10726. for (int j = 0; j < maidCnt; j++)
  10727. {
  10728. if (maidArray[j] && maidArray[j].Visible)
  10729. {
  10730. if (isDanceStart8V)
  10731. {
  10732. maidArray[j].SetPos(dancePos[j]);
  10733. maidArray[j].body0.transform.localRotation = danceRot[j];
  10734. }
  10735. }
  10736. }
  10737. isDanceStart8V = false;
  10738. isDanceStart8P = false;
  10739. }
  10740. if (isDanceStart11V)
  10741. {
  10742. for (int j = 0; j < maidCnt; j++)
  10743. {
  10744. if (maidArray[j] && maidArray[j].Visible)
  10745. {
  10746. if (isDanceStart11V)
  10747. {
  10748. maidArray[j].SetPos(dancePos[j]);
  10749. maidArray[j].body0.transform.localRotation = danceRot[j];
  10750. }
  10751. }
  10752. }
  10753. isDanceStart11V = false;
  10754. }
  10755. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10756. || isDanceStart13K)
  10757. {
  10758. for (int j = 0; j < maidCnt; j++)
  10759. {
  10760. if (maidArray[j] && maidArray[j].Visible)
  10761. {
  10762. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10763. || isDanceStart13K)
  10764. {
  10765. maidArray[j].SetPos(dancePos[j]);
  10766. maidArray[j].body0.transform.localRotation = danceRot[j];
  10767. int i = j;
  10768. if (!isVR)
  10769. {
  10770. delCount[i] = 20;
  10771. if (goSlot[(int)selectList[i]] != null)
  10772. {
  10773. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10774. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10775. {
  10776. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10777. }
  10778. }
  10779. }
  10780. Maid maid = maidArray[j];
  10781. maid.DelProp(MPN.handitem, true);
  10782. maid.DelProp(MPN.accvag, true);
  10783. maid.DelProp(MPN.accanl, true);
  10784. maid.DelProp(MPN.kousoku_upper, true);
  10785. maid.DelProp(MPN.kousoku_lower, true);
  10786. maid.AllProcPropSeqStart();
  10787. }
  10788. }
  10789. }
  10790. isDanceStart1K = false;
  10791. isDanceStart3K = false;
  10792. isDanceStart4K = false;
  10793. isDanceStart5K = false;
  10794. isDanceStart6K = false;
  10795. isDanceStart9K = false;
  10796. isDanceStart13K = false;
  10797. }
  10798. if (isDanceStart14V)
  10799. {
  10800. for (int j = 0; j < maidCnt; j++)
  10801. {
  10802. if (maidArray[j] && maidArray[j].Visible)
  10803. {
  10804. if (isDanceStart14V)
  10805. {
  10806. maidArray[j].SetPos(dancePos[j]);
  10807. maidArray[j].body0.transform.localRotation = danceRot[j];
  10808. }
  10809. }
  10810. }
  10811. isDanceStart14V = false;
  10812. }
  10813. if (isDanceStart15V)
  10814. {
  10815. for (int j = 0; j < maidCnt; j++)
  10816. {
  10817. if (maidArray[j] && maidArray[j].Visible)
  10818. {
  10819. if (isDanceStart15V)
  10820. {
  10821. maidArray[j].SetPos(dancePos[j]);
  10822. maidArray[j].body0.transform.localRotation = danceRot[j];
  10823. }
  10824. }
  10825. }
  10826. isDanceStart15V = false;
  10827. }
  10828. if (maidArray[1] && maidArray[1].Visible)
  10829. {
  10830. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10831. {
  10832. Vector3 vector = Vector3.zero;
  10833. vector.x = 0.6f;
  10834. maidArray[1].SetPos(vector);
  10835. if (maidArray[2] && maidArray[2].Visible)
  10836. {
  10837. vector.x = -0.6f;
  10838. maidArray[2].SetPos(vector);
  10839. }
  10840. if (maidArray[3] && maidArray[3].Visible)
  10841. {
  10842. vector.x = 1.2f;
  10843. maidArray[3].SetPos(vector);
  10844. }
  10845. if (maidArray[4] && maidArray[4].Visible)
  10846. {
  10847. vector.x = -1.2f;
  10848. maidArray[4].SetPos(vector);
  10849. }
  10850. if (maidArray[5] && maidArray[5].Visible)
  10851. {
  10852. vector.x = 1.8f;
  10853. maidArray[5].SetPos(vector);
  10854. }
  10855. if (maidArray[6] && maidArray[6].Visible)
  10856. {
  10857. vector.x = -1.8f;
  10858. maidArray[6].SetPos(vector);
  10859. }
  10860. if (maidArray[7] && maidArray[7].Visible)
  10861. {
  10862. vector.x = 2.4f;
  10863. maidArray[7].SetPos(vector);
  10864. }
  10865. if (maidArray[8] && maidArray[8].Visible)
  10866. {
  10867. vector.x = -2.4f;
  10868. maidArray[8].SetPos(vector);
  10869. }
  10870. if (maidArray[9] && maidArray[9].Visible)
  10871. {
  10872. vector.x = 3f;
  10873. maidArray[9].SetPos(vector);
  10874. }
  10875. if (maidArray[10] && maidArray[10].Visible)
  10876. {
  10877. vector.x = -3f;
  10878. maidArray[10].SetPos(vector);
  10879. }
  10880. if (maidArray[11] && maidArray[11].Visible)
  10881. {
  10882. vector.x = 3.6f;
  10883. maidArray[11].SetPos(vector);
  10884. }
  10885. if (maidArray[12] && maidArray[12].Visible)
  10886. {
  10887. vector.x = -3.6f;
  10888. maidArray[12].SetPos(vector);
  10889. }
  10890. if (maidArray[13] && maidArray[13].Visible)
  10891. {
  10892. vector.x = 4.2f;
  10893. maidArray[13].SetPos(vector);
  10894. }
  10895. }
  10896. }
  10897. if (isShift)
  10898. {
  10899. isDanceStart4K = true;
  10900. for (int j = 0; j < maidCnt; j++)
  10901. {
  10902. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10903. maidArray[j].body0.transform.localRotation.y + 90f,
  10904. maidArray[j].body0.transform.localRotation.z));
  10905. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10906. maidArray[j].body0.transform.position.y,
  10907. maidArray[j].body0.transform.position.z + 4f));
  10908. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10909. int i = j;
  10910. Maid maid = maidArray[j];
  10911. if (!isVR)
  10912. {
  10913. delCount[i] = 20;
  10914. if (goSlot[(int)selectList[i]] != null)
  10915. {
  10916. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10917. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10918. {
  10919. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10920. }
  10921. }
  10922. }
  10923. string[] array = new string[2];
  10924. array = text2.Split(new char[] { ',' });
  10925. maid.DelProp(MPN.handitem, true);
  10926. maid.DelProp(MPN.accvag, true);
  10927. maid.DelProp(MPN.accanl, true);
  10928. maid.DelProp(MPN.kousoku_upper, true);
  10929. maid.DelProp(MPN.kousoku_lower, true);
  10930. if (array[0] != "")
  10931. {
  10932. maid.SetProp(array[0], array[1], 0, true, false);
  10933. }
  10934. maid.AllProcPropSeqStart();
  10935. }
  10936. }
  10937. isDance = true;
  10938. isDanceStart4 = true;
  10939. isSF1 = false;
  10940. isSF2 = false;
  10941. isSF3 = false;
  10942. }
  10943. if (isHS1 || isHS2 || isHS3)
  10944. {
  10945. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10946. string text4 = textAsset.text;
  10947. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10948. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10949. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10950. for (int j = 0; j < maidCnt; j++)
  10951. {
  10952. if (!isShift)
  10953. {
  10954. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10955. {
  10956. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10957. GameUty.FileSystem,
  10958. "dance_cm3d2_003_hs_f1.anm",
  10959. false,
  10960. false);
  10961. }
  10962. }
  10963. else
  10964. {
  10965. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10966. {
  10967. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10968. GameUty.FileSystem,
  10969. "dance_cm3d2_kara02_003_hs_f1.anm",
  10970. false,
  10971. false);
  10972. }
  10973. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10974. text4 = textAsset.text;
  10975. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10976. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10977. && !isDanceStart9K && !isDanceStart13K)
  10978. {
  10979. dancePos[j] = maidArray[j].transform.position;
  10980. danceRot[j] = maidArray[j].transform.localRotation;
  10981. }
  10982. }
  10983. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10984. }
  10985. if (!isShift)
  10986. {
  10987. if (isHS1)
  10988. {
  10989. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10990. }
  10991. if (isHS2)
  10992. {
  10993. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10994. }
  10995. if (isHS3)
  10996. {
  10997. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10998. }
  10999. }
  11000. else
  11001. {
  11002. if (isHS1)
  11003. {
  11004. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11005. }
  11006. if (isHS2)
  11007. {
  11008. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11009. }
  11010. if (isHS3)
  11011. {
  11012. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11013. }
  11014. }
  11015. for (int j = 0; j < maidCnt; j++)
  11016. {
  11017. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11018. isStop[j] = false;
  11019. isLock[j] = false;
  11020. pHandL[j] = 0;
  11021. pHandR[j] = 0;
  11022. muneIKL[j] = false;
  11023. muneIKR[j] = false;
  11024. if (!isVR)
  11025. {
  11026. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11027. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11028. }
  11029. }
  11030. ikBui = 5;
  11031. isDanceStart1F = false;
  11032. isDanceStart2F = false;
  11033. isDanceStart3F = false;
  11034. isDanceStart4F = false;
  11035. isDanceStart5F = false;
  11036. isDanceStart6F = false;
  11037. isDanceStart7F = false;
  11038. isDanceStart8F = false;
  11039. isDanceStart9F = false;
  11040. isDanceStart10F = false;
  11041. isDanceStart11F = false;
  11042. isDanceStart12F = false;
  11043. isDanceStart13F = false;
  11044. isDanceStart14F = false;
  11045. isDanceStart15F = false;
  11046. for (int j = 0; j < maidCnt; j++)
  11047. {
  11048. danceFace[j] = 0f;
  11049. }
  11050. if (isDanceStart7V)
  11051. {
  11052. for (int j = 0; j < maidCnt; j++)
  11053. {
  11054. if (maidArray[j] && maidArray[j].Visible)
  11055. {
  11056. if (isDanceStart7V)
  11057. {
  11058. maidArray[j].SetPos(dancePos[j]);
  11059. maidArray[j].body0.transform.localRotation = danceRot[j];
  11060. }
  11061. }
  11062. }
  11063. isDanceStart7V = false;
  11064. }
  11065. if (isDanceStart8V)
  11066. {
  11067. for (int j = 0; j < maidCnt; j++)
  11068. {
  11069. if (maidArray[j] && maidArray[j].Visible)
  11070. {
  11071. if (isDanceStart8V)
  11072. {
  11073. maidArray[j].SetPos(dancePos[j]);
  11074. maidArray[j].body0.transform.localRotation = danceRot[j];
  11075. }
  11076. }
  11077. }
  11078. isDanceStart8V = false;
  11079. isDanceStart8P = false;
  11080. }
  11081. if (isDanceStart11V)
  11082. {
  11083. for (int j = 0; j < maidCnt; j++)
  11084. {
  11085. if (maidArray[j] && maidArray[j].Visible)
  11086. {
  11087. if (isDanceStart11V)
  11088. {
  11089. maidArray[j].SetPos(dancePos[j]);
  11090. maidArray[j].body0.transform.localRotation = danceRot[j];
  11091. }
  11092. }
  11093. }
  11094. isDanceStart11V = false;
  11095. }
  11096. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11097. || isDanceStart13K)
  11098. {
  11099. for (int j = 0; j < maidCnt; j++)
  11100. {
  11101. if (maidArray[j] && maidArray[j].Visible)
  11102. {
  11103. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11104. || isDanceStart13K)
  11105. {
  11106. maidArray[j].SetPos(dancePos[j]);
  11107. maidArray[j].body0.transform.localRotation = danceRot[j];
  11108. int i = j;
  11109. if (!isVR)
  11110. {
  11111. delCount[i] = 20;
  11112. if (goSlot[(int)selectList[i]] != null)
  11113. {
  11114. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11115. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11116. {
  11117. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11118. }
  11119. }
  11120. }
  11121. Maid maid = maidArray[j];
  11122. maid.DelProp(MPN.handitem, true);
  11123. maid.DelProp(MPN.accvag, true);
  11124. maid.DelProp(MPN.accanl, true);
  11125. maid.DelProp(MPN.kousoku_upper, true);
  11126. maid.DelProp(MPN.kousoku_lower, true);
  11127. maid.AllProcPropSeqStart();
  11128. }
  11129. }
  11130. }
  11131. isDanceStart1K = false;
  11132. isDanceStart3K = false;
  11133. isDanceStart4K = false;
  11134. isDanceStart5K = false;
  11135. isDanceStart6K = false;
  11136. isDanceStart9K = false;
  11137. isDanceStart13K = false;
  11138. }
  11139. if (isDanceStart14V)
  11140. {
  11141. for (int j = 0; j < maidCnt; j++)
  11142. {
  11143. if (maidArray[j] && maidArray[j].Visible)
  11144. {
  11145. if (isDanceStart14V)
  11146. {
  11147. maidArray[j].SetPos(dancePos[j]);
  11148. maidArray[j].body0.transform.localRotation = danceRot[j];
  11149. }
  11150. }
  11151. }
  11152. isDanceStart14V = false;
  11153. }
  11154. if (isDanceStart15V)
  11155. {
  11156. for (int j = 0; j < maidCnt; j++)
  11157. {
  11158. if (maidArray[j] && maidArray[j].Visible)
  11159. {
  11160. if (isDanceStart15V)
  11161. {
  11162. maidArray[j].SetPos(dancePos[j]);
  11163. maidArray[j].body0.transform.localRotation = danceRot[j];
  11164. }
  11165. }
  11166. }
  11167. isDanceStart15V = false;
  11168. }
  11169. if (maidArray[1] && maidArray[1].Visible)
  11170. {
  11171. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11172. {
  11173. Vector3 vector = Vector3.zero;
  11174. vector.x = 0.6f;
  11175. maidArray[1].SetPos(vector);
  11176. if (maidArray[2] && maidArray[2].Visible)
  11177. {
  11178. vector.x = -0.6f;
  11179. maidArray[2].SetPos(vector);
  11180. }
  11181. if (maidArray[3] && maidArray[3].Visible)
  11182. {
  11183. vector.x = 1.2f;
  11184. maidArray[3].SetPos(vector);
  11185. }
  11186. if (maidArray[4] && maidArray[4].Visible)
  11187. {
  11188. vector.x = -1.2f;
  11189. maidArray[4].SetPos(vector);
  11190. }
  11191. if (maidArray[5] && maidArray[5].Visible)
  11192. {
  11193. vector.x = 1.8f;
  11194. maidArray[5].SetPos(vector);
  11195. }
  11196. if (maidArray[6] && maidArray[6].Visible)
  11197. {
  11198. vector.x = -1.8f;
  11199. maidArray[6].SetPos(vector);
  11200. }
  11201. if (maidArray[7] && maidArray[7].Visible)
  11202. {
  11203. vector.x = 2.4f;
  11204. maidArray[7].SetPos(vector);
  11205. }
  11206. if (maidArray[8] && maidArray[8].Visible)
  11207. {
  11208. vector.x = -2.4f;
  11209. maidArray[8].SetPos(vector);
  11210. }
  11211. if (maidArray[9] && maidArray[9].Visible)
  11212. {
  11213. vector.x = 3f;
  11214. maidArray[9].SetPos(vector);
  11215. }
  11216. if (maidArray[10] && maidArray[10].Visible)
  11217. {
  11218. vector.x = -3f;
  11219. maidArray[10].SetPos(vector);
  11220. }
  11221. if (maidArray[11] && maidArray[11].Visible)
  11222. {
  11223. vector.x = 3.6f;
  11224. maidArray[11].SetPos(vector);
  11225. }
  11226. if (maidArray[12] && maidArray[12].Visible)
  11227. {
  11228. vector.x = -3.6f;
  11229. maidArray[12].SetPos(vector);
  11230. }
  11231. if (maidArray[13] && maidArray[13].Visible)
  11232. {
  11233. vector.x = 4.2f;
  11234. maidArray[13].SetPos(vector);
  11235. }
  11236. }
  11237. }
  11238. if (isShift)
  11239. {
  11240. isDanceStart6K = true;
  11241. for (int j = 0; j < maidCnt; j++)
  11242. {
  11243. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11244. maidArray[j].body0.transform.localRotation.y + 90f,
  11245. maidArray[j].body0.transform.localRotation.z));
  11246. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11247. maidArray[j].body0.transform.position.y,
  11248. maidArray[j].body0.transform.position.z + 4f));
  11249. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11250. int i = j;
  11251. Maid maid = maidArray[j];
  11252. if (!isVR)
  11253. {
  11254. delCount[i] = 20;
  11255. if (goSlot[(int)selectList[i]] != null)
  11256. {
  11257. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11258. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11259. {
  11260. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11261. }
  11262. }
  11263. }
  11264. string[] array = new string[2];
  11265. array = text2.Split(new char[] { ',' });
  11266. maid.DelProp(MPN.handitem, true);
  11267. maid.DelProp(MPN.accvag, true);
  11268. maid.DelProp(MPN.accanl, true);
  11269. maid.DelProp(MPN.kousoku_upper, true);
  11270. maid.DelProp(MPN.kousoku_lower, true);
  11271. if (array[0] != "")
  11272. {
  11273. maid.SetProp(array[0], array[1], 0, true, false);
  11274. }
  11275. maid.AllProcPropSeqStart();
  11276. }
  11277. }
  11278. isDance = true;
  11279. isDanceStart6 = true;
  11280. isHS1 = false;
  11281. isHS2 = false;
  11282. isHS3 = false;
  11283. }
  11284. if (isHS4 || isHS5 || isHS6)
  11285. {
  11286. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11287. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11288. for (int j = 0; j < maidCnt; j++)
  11289. {
  11290. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11291. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11292. switch (j)
  11293. {
  11294. case 1:
  11295. case 3:
  11296. case 5:
  11297. case 7:
  11298. case 9:
  11299. case 11:
  11300. case 13:
  11301. text5 = "dance_cm3d2_003_hs_f2.anm";
  11302. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11303. break;
  11304. }
  11305. if (maidArray[j] && maidArray[j].Visible)
  11306. {
  11307. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11308. {
  11309. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11310. }
  11311. string text4 = textAsset.text;
  11312. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11313. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11314. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11315. }
  11316. }
  11317. if (isHS4)
  11318. {
  11319. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11320. }
  11321. if (isHS5)
  11322. {
  11323. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11324. }
  11325. if (isHS6)
  11326. {
  11327. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11328. }
  11329. ikBui = 5;
  11330. isDanceStart1F = false;
  11331. isDanceStart2F = false;
  11332. isDanceStart3F = false;
  11333. isDanceStart4F = false;
  11334. isDanceStart5F = false;
  11335. isDanceStart6F = false;
  11336. isDanceStart7F = false;
  11337. isDanceStart8F = false;
  11338. isDanceStart9F = false;
  11339. isDanceStart10F = false;
  11340. isDanceStart11F = false;
  11341. isDanceStart12F = false;
  11342. isDanceStart13F = false;
  11343. isDanceStart14F = false;
  11344. isDanceStart15F = false;
  11345. for (int j = 0; j < maidCnt; j++)
  11346. {
  11347. danceFace[j] = 0f;
  11348. }
  11349. if (isDanceStart7V)
  11350. {
  11351. for (int j = 0; j < maidCnt; j++)
  11352. {
  11353. if (maidArray[j] && maidArray[j].Visible)
  11354. {
  11355. if (isDanceStart7V)
  11356. {
  11357. maidArray[j].SetPos(dancePos[j]);
  11358. maidArray[j].body0.transform.localRotation = danceRot[j];
  11359. }
  11360. }
  11361. }
  11362. isDanceStart7V = false;
  11363. }
  11364. if (isDanceStart8V)
  11365. {
  11366. for (int j = 0; j < maidCnt; j++)
  11367. {
  11368. if (maidArray[j] && maidArray[j].Visible)
  11369. {
  11370. if (isDanceStart8V)
  11371. {
  11372. maidArray[j].SetPos(dancePos[j]);
  11373. maidArray[j].body0.transform.localRotation = danceRot[j];
  11374. }
  11375. }
  11376. }
  11377. isDanceStart8V = false;
  11378. isDanceStart8P = false;
  11379. }
  11380. if (isDanceStart11V)
  11381. {
  11382. for (int j = 0; j < maidCnt; j++)
  11383. {
  11384. if (maidArray[j] && maidArray[j].Visible)
  11385. {
  11386. if (isDanceStart11V)
  11387. {
  11388. maidArray[j].SetPos(dancePos[j]);
  11389. maidArray[j].body0.transform.localRotation = danceRot[j];
  11390. }
  11391. }
  11392. }
  11393. isDanceStart11V = false;
  11394. }
  11395. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11396. || isDanceStart13K)
  11397. {
  11398. for (int j = 0; j < maidCnt; j++)
  11399. {
  11400. if (maidArray[j] && maidArray[j].Visible)
  11401. {
  11402. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11403. || isDanceStart13K)
  11404. {
  11405. maidArray[j].SetPos(dancePos[j]);
  11406. maidArray[j].body0.transform.localRotation = danceRot[j];
  11407. int i = j;
  11408. if (!isVR)
  11409. {
  11410. delCount[i] = 20;
  11411. if (goSlot[(int)selectList[i]] != null)
  11412. {
  11413. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11414. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11415. {
  11416. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11417. }
  11418. }
  11419. }
  11420. Maid maid = maidArray[j];
  11421. maid.DelProp(MPN.handitem, true);
  11422. maid.DelProp(MPN.accvag, true);
  11423. maid.DelProp(MPN.accanl, true);
  11424. maid.DelProp(MPN.kousoku_upper, true);
  11425. maid.DelProp(MPN.kousoku_lower, true);
  11426. maid.AllProcPropSeqStart();
  11427. }
  11428. }
  11429. }
  11430. isDanceStart1K = false;
  11431. isDanceStart3K = false;
  11432. isDanceStart4K = false;
  11433. isDanceStart5K = false;
  11434. isDanceStart6K = false;
  11435. isDanceStart9K = false;
  11436. isDanceStart13K = false;
  11437. }
  11438. if (isDanceStart14V)
  11439. {
  11440. for (int j = 0; j < maidCnt; j++)
  11441. {
  11442. if (maidArray[j] && maidArray[j].Visible)
  11443. {
  11444. if (isDanceStart14V)
  11445. {
  11446. maidArray[j].SetPos(dancePos[j]);
  11447. maidArray[j].body0.transform.localRotation = danceRot[j];
  11448. }
  11449. }
  11450. }
  11451. isDanceStart14V = false;
  11452. }
  11453. if (isDanceStart15V)
  11454. {
  11455. for (int j = 0; j < maidCnt; j++)
  11456. {
  11457. if (maidArray[j] && maidArray[j].Visible)
  11458. {
  11459. if (isDanceStart15V)
  11460. {
  11461. maidArray[j].SetPos(dancePos[j]);
  11462. maidArray[j].body0.transform.localRotation = danceRot[j];
  11463. }
  11464. }
  11465. }
  11466. isDanceStart15V = false;
  11467. }
  11468. for (int j = 0; j < maidCnt; j++)
  11469. {
  11470. isStop[j] = false;
  11471. isLock[j] = false;
  11472. pHandL[j] = 0;
  11473. pHandR[j] = 0;
  11474. muneIKL[j] = false;
  11475. muneIKR[j] = false;
  11476. if (!isVR)
  11477. {
  11478. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11479. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11480. }
  11481. if (maidArray[j].transform.position.y != 100f)
  11482. {
  11483. dancePos[j] = maidArray[j].transform.position;
  11484. }
  11485. else
  11486. {
  11487. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11488. }
  11489. danceRot[j] = maidArray[j].transform.localRotation;
  11490. }
  11491. if (maidArray[1] && maidArray[1].Visible)
  11492. {
  11493. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11494. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11495. }
  11496. if (maidArray[3] && maidArray[3].Visible)
  11497. {
  11498. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11499. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11500. }
  11501. if (maidArray[5] && maidArray[5].Visible)
  11502. {
  11503. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11504. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11505. }
  11506. if (maidArray[7] && maidArray[7].Visible)
  11507. {
  11508. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11509. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11510. }
  11511. if (maidArray[9] && maidArray[9].Visible)
  11512. {
  11513. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11514. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11515. }
  11516. if (maidArray[11] && maidArray[11].Visible)
  11517. {
  11518. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11519. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11520. }
  11521. if (maidArray[13] && maidArray[13].Visible)
  11522. {
  11523. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11524. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11525. }
  11526. if (maidArray[2] && maidArray[2].Visible)
  11527. {
  11528. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11529. {
  11530. Vector3 vector = Vector3.zero;
  11531. vector.x = 0.6f;
  11532. maidArray[1].SetPos(vector);
  11533. if (maidArray[2] && maidArray[2].Visible)
  11534. {
  11535. vector.x = -0.6f;
  11536. maidArray[2].SetPos(vector);
  11537. }
  11538. if (maidArray[3] && maidArray[3].Visible)
  11539. {
  11540. vector.x = 1.2f;
  11541. maidArray[3].SetPos(vector);
  11542. }
  11543. if (maidArray[4] && maidArray[4].Visible)
  11544. {
  11545. vector.x = -1.2f;
  11546. maidArray[4].SetPos(vector);
  11547. }
  11548. if (maidArray[5] && maidArray[5].Visible)
  11549. {
  11550. vector.x = 1.8f;
  11551. maidArray[5].SetPos(vector);
  11552. }
  11553. if (maidArray[6] && maidArray[6].Visible)
  11554. {
  11555. vector.x = -1.8f;
  11556. maidArray[6].SetPos(vector);
  11557. }
  11558. if (maidArray[7] && maidArray[7].Visible)
  11559. {
  11560. vector.x = 2.4f;
  11561. maidArray[7].SetPos(vector);
  11562. }
  11563. if (maidArray[8] && maidArray[8].Visible)
  11564. {
  11565. vector.x = -2.4f;
  11566. maidArray[8].SetPos(vector);
  11567. }
  11568. if (maidArray[9] && maidArray[9].Visible)
  11569. {
  11570. vector.x = 3f;
  11571. maidArray[9].SetPos(vector);
  11572. }
  11573. if (maidArray[10] && maidArray[10].Visible)
  11574. {
  11575. vector.x = -3f;
  11576. maidArray[10].SetPos(vector);
  11577. }
  11578. if (maidArray[11] && maidArray[11].Visible)
  11579. {
  11580. vector.x = 3.6f;
  11581. maidArray[11].SetPos(vector);
  11582. }
  11583. if (maidArray[12] && maidArray[12].Visible)
  11584. {
  11585. vector.x = -3.6f;
  11586. maidArray[12].SetPos(vector);
  11587. }
  11588. if (maidArray[13] && maidArray[13].Visible)
  11589. {
  11590. vector.x = 4.2f;
  11591. maidArray[13].SetPos(vector);
  11592. }
  11593. }
  11594. }
  11595. isDance = true;
  11596. isDanceStart7 = true;
  11597. isHS4 = false;
  11598. isHS5 = false;
  11599. isHS6 = false;
  11600. }
  11601. if (isHS7 || isHS8 || isHS9)
  11602. {
  11603. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11604. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11605. for (int j = 0; j < maidCnt; j++)
  11606. {
  11607. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11608. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11609. switch (j)
  11610. {
  11611. case 1:
  11612. case 5:
  11613. case 9:
  11614. case 13:
  11615. text5 = "dance_cm3d2_003_hs_f2.anm";
  11616. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11617. break;
  11618. case 2:
  11619. case 6:
  11620. case 10:
  11621. text5 = "dance_cm3d2_003_hs_f3.anm";
  11622. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11623. break;
  11624. case 3:
  11625. case 7:
  11626. case 11:
  11627. text5 = "dance_cm3d2_003_hs_f4.anm";
  11628. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11629. break;
  11630. }
  11631. if (maidArray[j] && maidArray[j].Visible)
  11632. {
  11633. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11634. {
  11635. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11636. }
  11637. }
  11638. string text4 = textAsset.text;
  11639. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11640. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11641. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11642. }
  11643. if (isHS7)
  11644. {
  11645. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11646. }
  11647. if (isHS8)
  11648. {
  11649. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11650. }
  11651. if (isHS9)
  11652. {
  11653. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11654. }
  11655. ikBui = 5;
  11656. isDanceStart1F = false;
  11657. isDanceStart2F = false;
  11658. isDanceStart3F = false;
  11659. isDanceStart4F = false;
  11660. isDanceStart5F = false;
  11661. isDanceStart6F = false;
  11662. isDanceStart7F = false;
  11663. isDanceStart8F = false;
  11664. isDanceStart9F = false;
  11665. isDanceStart10F = false;
  11666. isDanceStart11F = false;
  11667. isDanceStart12F = false;
  11668. isDanceStart13F = false;
  11669. isDanceStart14F = false;
  11670. isDanceStart15F = false;
  11671. for (int j = 0; j < maidCnt; j++)
  11672. {
  11673. danceFace[j] = 0f;
  11674. }
  11675. if (isDanceStart8V)
  11676. {
  11677. for (int j = 0; j < maidCnt; j++)
  11678. {
  11679. if (maidArray[j] && maidArray[j].Visible)
  11680. {
  11681. if (isDanceStart8V)
  11682. {
  11683. maidArray[j].SetPos(dancePos[j]);
  11684. maidArray[j].body0.transform.localRotation = danceRot[j];
  11685. }
  11686. }
  11687. }
  11688. isDanceStart8V = false;
  11689. isDanceStart8P = false;
  11690. }
  11691. for (int j = 0; j < maidCnt; j++)
  11692. {
  11693. isStop[j] = false;
  11694. isLock[j] = false;
  11695. pHandL[j] = 0;
  11696. pHandR[j] = 0;
  11697. muneIKL[j] = false;
  11698. muneIKR[j] = false;
  11699. if (!isVR)
  11700. {
  11701. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11702. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11703. }
  11704. if (maidArray[j].transform.position.y != 100f)
  11705. {
  11706. dancePos[j] = maidArray[j].transform.position;
  11707. }
  11708. else
  11709. {
  11710. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11711. }
  11712. danceRot[j] = maidArray[j].transform.localRotation;
  11713. }
  11714. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11715. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11716. {
  11717. maidArray[0].SetPos(Vector3.zero);
  11718. maidArray[0].SetRot(Vector3.zero);
  11719. }
  11720. if (maidArray[1] && maidArray[1].Visible)
  11721. {
  11722. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11723. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11724. }
  11725. if (maidArray[2] && maidArray[2].Visible)
  11726. {
  11727. maidArray[2].SetPos(maidArray[0].transform.position);
  11728. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11729. }
  11730. if (maidArray[3] && maidArray[3].Visible)
  11731. {
  11732. maidArray[3].SetPos(maidArray[0].transform.position);
  11733. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11734. }
  11735. if (maidArray[5] && maidArray[5].Visible)
  11736. {
  11737. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11738. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11739. }
  11740. if (maidArray[6] && maidArray[6].Visible)
  11741. {
  11742. maidArray[6].SetPos(maidArray[4].transform.position);
  11743. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11744. }
  11745. if (maidArray[7] && maidArray[7].Visible)
  11746. {
  11747. maidArray[7].SetPos(maidArray[4].transform.position);
  11748. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11749. }
  11750. if (maidArray[9] && maidArray[9].Visible)
  11751. {
  11752. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11753. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11754. }
  11755. if (maidArray[10] && maidArray[10].Visible)
  11756. {
  11757. maidArray[10].SetPos(maidArray[8].transform.position);
  11758. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11759. }
  11760. if (maidArray[11] && maidArray[11].Visible)
  11761. {
  11762. maidArray[11].SetPos(maidArray[8].transform.position);
  11763. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11764. }
  11765. if (maidArray[13] && maidArray[13].Visible)
  11766. {
  11767. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11768. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11769. }
  11770. if (maidArray[4] && maidArray[4].Visible)
  11771. {
  11772. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11773. {
  11774. Vector3 vector = Vector3.zero;
  11775. vector.x = 0.6f;
  11776. maidArray[1].SetPos(vector);
  11777. if (maidArray[2] && maidArray[2].Visible)
  11778. {
  11779. vector.x = -0.6f;
  11780. maidArray[2].SetPos(vector);
  11781. }
  11782. if (maidArray[3] && maidArray[3].Visible)
  11783. {
  11784. vector.x = 1.2f;
  11785. maidArray[3].SetPos(vector);
  11786. }
  11787. if (maidArray[4] && maidArray[4].Visible)
  11788. {
  11789. vector.x = -1.2f;
  11790. maidArray[4].SetPos(vector);
  11791. }
  11792. if (maidArray[5] && maidArray[5].Visible)
  11793. {
  11794. vector.x = 1.8f;
  11795. maidArray[5].SetPos(vector);
  11796. }
  11797. if (maidArray[6] && maidArray[6].Visible)
  11798. {
  11799. vector.x = -1.8f;
  11800. maidArray[6].SetPos(vector);
  11801. }
  11802. if (maidArray[7] && maidArray[7].Visible)
  11803. {
  11804. vector.x = 2.4f;
  11805. maidArray[7].SetPos(vector);
  11806. }
  11807. if (maidArray[8] && maidArray[8].Visible)
  11808. {
  11809. vector.x = -2.4f;
  11810. maidArray[8].SetPos(vector);
  11811. }
  11812. if (maidArray[9] && maidArray[9].Visible)
  11813. {
  11814. vector.x = 3f;
  11815. maidArray[9].SetPos(vector);
  11816. }
  11817. if (maidArray[10] && maidArray[10].Visible)
  11818. {
  11819. vector.x = -3f;
  11820. maidArray[10].SetPos(vector);
  11821. }
  11822. if (maidArray[11] && maidArray[11].Visible)
  11823. {
  11824. vector.x = 3.6f;
  11825. maidArray[11].SetPos(vector);
  11826. }
  11827. if (maidArray[12] && maidArray[12].Visible)
  11828. {
  11829. vector.x = -3.6f;
  11830. maidArray[12].SetPos(vector);
  11831. }
  11832. if (maidArray[13] && maidArray[13].Visible)
  11833. {
  11834. vector.x = 4.2f;
  11835. maidArray[13].SetPos(vector);
  11836. }
  11837. }
  11838. }
  11839. isDance = true;
  11840. isDanceStart8 = true;
  11841. isHS7 = false;
  11842. isHS8 = false;
  11843. isHS9 = false;
  11844. }
  11845. if (isCF1)
  11846. {
  11847. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11848. string text4 = textAsset.text;
  11849. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11850. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11851. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11852. for (int j = 0; j < maidCnt; j++)
  11853. {
  11854. if (!isShift)
  11855. {
  11856. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11857. {
  11858. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11859. GameUty.FileSystem,
  11860. "dance_cm3d_003_sp2_f1.anm",
  11861. false,
  11862. false);
  11863. }
  11864. }
  11865. else
  11866. {
  11867. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11868. {
  11869. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11870. GameUty.FileSystem,
  11871. "dance_cm3d2_kara02_002_rty_f1.anm",
  11872. false,
  11873. false);
  11874. }
  11875. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11876. text4 = textAsset.text;
  11877. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11878. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11879. && !isDanceStart9K && !isDanceStart13K)
  11880. {
  11881. dancePos[j] = maidArray[j].transform.position;
  11882. danceRot[j] = maidArray[j].transform.localRotation;
  11883. }
  11884. }
  11885. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11886. }
  11887. if (!isShift)
  11888. {
  11889. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11890. }
  11891. else
  11892. {
  11893. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11894. }
  11895. for (int j = 0; j < maidCnt; j++)
  11896. {
  11897. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11898. isStop[j] = false;
  11899. isLock[j] = false;
  11900. pHandL[j] = 0;
  11901. pHandR[j] = 0;
  11902. muneIKL[j] = false;
  11903. muneIKR[j] = false;
  11904. if (!isVR)
  11905. {
  11906. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11907. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11908. }
  11909. }
  11910. ikBui = 5;
  11911. isDanceStart1F = false;
  11912. isDanceStart2F = false;
  11913. isDanceStart3F = false;
  11914. isDanceStart4F = false;
  11915. isDanceStart5F = false;
  11916. isDanceStart6F = false;
  11917. isDanceStart7F = false;
  11918. isDanceStart8F = false;
  11919. isDanceStart9F = false;
  11920. isDanceStart10F = false;
  11921. isDanceStart11F = false;
  11922. isDanceStart12F = false;
  11923. isDanceStart13F = false;
  11924. isDanceStart14F = false;
  11925. isDanceStart15F = false;
  11926. for (int j = 0; j < maidCnt; j++)
  11927. {
  11928. danceFace[j] = 0f;
  11929. }
  11930. if (isDanceStart7V)
  11931. {
  11932. for (int j = 0; j < maidCnt; j++)
  11933. {
  11934. if (maidArray[j] && maidArray[j].Visible)
  11935. {
  11936. if (isDanceStart7V)
  11937. {
  11938. maidArray[j].SetPos(dancePos[j]);
  11939. maidArray[j].body0.transform.localRotation = danceRot[j];
  11940. }
  11941. }
  11942. }
  11943. isDanceStart7V = false;
  11944. }
  11945. if (isDanceStart8V)
  11946. {
  11947. for (int j = 0; j < maidCnt; j++)
  11948. {
  11949. if (maidArray[j] && maidArray[j].Visible)
  11950. {
  11951. if (isDanceStart8V)
  11952. {
  11953. maidArray[j].SetPos(dancePos[j]);
  11954. maidArray[j].body0.transform.localRotation = danceRot[j];
  11955. }
  11956. }
  11957. }
  11958. isDanceStart8V = false;
  11959. isDanceStart8P = false;
  11960. }
  11961. if (isDanceStart11V)
  11962. {
  11963. for (int j = 0; j < maidCnt; j++)
  11964. {
  11965. if (maidArray[j] && maidArray[j].Visible)
  11966. {
  11967. if (isDanceStart11V)
  11968. {
  11969. maidArray[j].SetPos(dancePos[j]);
  11970. maidArray[j].body0.transform.localRotation = danceRot[j];
  11971. }
  11972. }
  11973. }
  11974. isDanceStart11V = false;
  11975. }
  11976. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11977. || isDanceStart13K)
  11978. {
  11979. for (int j = 0; j < maidCnt; j++)
  11980. {
  11981. if (maidArray[j] && maidArray[j].Visible)
  11982. {
  11983. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11984. || isDanceStart13K)
  11985. {
  11986. maidArray[j].SetPos(dancePos[j]);
  11987. maidArray[j].body0.transform.localRotation = danceRot[j];
  11988. int i = j;
  11989. if (!isVR)
  11990. {
  11991. delCount[i] = 20;
  11992. if (goSlot[(int)selectList[i]] != null)
  11993. {
  11994. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11995. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11996. {
  11997. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11998. }
  11999. }
  12000. }
  12001. Maid maid = maidArray[j];
  12002. maid.DelProp(MPN.handitem, true);
  12003. maid.DelProp(MPN.accvag, true);
  12004. maid.DelProp(MPN.accanl, true);
  12005. maid.DelProp(MPN.kousoku_upper, true);
  12006. maid.DelProp(MPN.kousoku_lower, true);
  12007. maid.AllProcPropSeqStart();
  12008. }
  12009. }
  12010. }
  12011. isDanceStart1K = false;
  12012. isDanceStart3K = false;
  12013. isDanceStart4K = false;
  12014. isDanceStart5K = false;
  12015. isDanceStart6K = false;
  12016. isDanceStart9K = false;
  12017. isDanceStart13K = false;
  12018. }
  12019. if (isDanceStart14V)
  12020. {
  12021. for (int j = 0; j < maidCnt; j++)
  12022. {
  12023. if (maidArray[j] && maidArray[j].Visible)
  12024. {
  12025. if (isDanceStart14V)
  12026. {
  12027. maidArray[j].SetPos(dancePos[j]);
  12028. maidArray[j].body0.transform.localRotation = danceRot[j];
  12029. }
  12030. }
  12031. }
  12032. isDanceStart14V = false;
  12033. }
  12034. if (isDanceStart15V)
  12035. {
  12036. for (int j = 0; j < maidCnt; j++)
  12037. {
  12038. if (maidArray[j] && maidArray[j].Visible)
  12039. {
  12040. if (isDanceStart15V)
  12041. {
  12042. maidArray[j].SetPos(dancePos[j]);
  12043. maidArray[j].body0.transform.localRotation = danceRot[j];
  12044. }
  12045. }
  12046. }
  12047. isDanceStart15V = false;
  12048. }
  12049. if (maidArray[1] && maidArray[1].Visible)
  12050. {
  12051. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12052. {
  12053. Vector3 vector = Vector3.zero;
  12054. vector.x = 0.6f;
  12055. maidArray[1].SetPos(vector);
  12056. if (maidArray[2] && maidArray[2].Visible)
  12057. {
  12058. vector.x = -0.6f;
  12059. maidArray[2].SetPos(vector);
  12060. }
  12061. if (maidArray[3] && maidArray[3].Visible)
  12062. {
  12063. vector.x = 1.2f;
  12064. maidArray[3].SetPos(vector);
  12065. }
  12066. if (maidArray[4] && maidArray[4].Visible)
  12067. {
  12068. vector.x = -1.2f;
  12069. maidArray[4].SetPos(vector);
  12070. }
  12071. if (maidArray[5] && maidArray[5].Visible)
  12072. {
  12073. vector.x = 1.8f;
  12074. maidArray[5].SetPos(vector);
  12075. }
  12076. if (maidArray[6] && maidArray[6].Visible)
  12077. {
  12078. vector.x = -1.8f;
  12079. maidArray[6].SetPos(vector);
  12080. }
  12081. if (maidArray[7] && maidArray[7].Visible)
  12082. {
  12083. vector.x = 2.4f;
  12084. maidArray[7].SetPos(vector);
  12085. }
  12086. if (maidArray[8] && maidArray[8].Visible)
  12087. {
  12088. vector.x = -2.4f;
  12089. maidArray[8].SetPos(vector);
  12090. }
  12091. if (maidArray[9] && maidArray[9].Visible)
  12092. {
  12093. vector.x = 3f;
  12094. maidArray[9].SetPos(vector);
  12095. }
  12096. if (maidArray[10] && maidArray[10].Visible)
  12097. {
  12098. vector.x = -3f;
  12099. maidArray[10].SetPos(vector);
  12100. }
  12101. if (maidArray[11] && maidArray[11].Visible)
  12102. {
  12103. vector.x = 3.6f;
  12104. maidArray[11].SetPos(vector);
  12105. }
  12106. if (maidArray[12] && maidArray[12].Visible)
  12107. {
  12108. vector.x = -3.6f;
  12109. maidArray[12].SetPos(vector);
  12110. }
  12111. if (maidArray[13] && maidArray[13].Visible)
  12112. {
  12113. vector.x = 4.2f;
  12114. maidArray[13].SetPos(vector);
  12115. }
  12116. }
  12117. }
  12118. if (isShift)
  12119. {
  12120. isDanceStart5K = true;
  12121. for (int j = 0; j < maidCnt; j++)
  12122. {
  12123. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12124. maidArray[j].body0.transform.localRotation.y + 90f,
  12125. maidArray[j].body0.transform.localRotation.z));
  12126. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12127. maidArray[j].body0.transform.position.y,
  12128. maidArray[j].body0.transform.position.z + 4f));
  12129. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12130. int i = j;
  12131. Maid maid = maidArray[j];
  12132. if (!isVR)
  12133. {
  12134. delCount[i] = 20;
  12135. if (goSlot[(int)selectList[i]] != null)
  12136. {
  12137. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12138. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12139. {
  12140. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12141. }
  12142. }
  12143. }
  12144. string[] array = new string[2];
  12145. array = text2.Split(new char[] { ',' });
  12146. maid.DelProp(MPN.handitem, true);
  12147. maid.DelProp(MPN.accvag, true);
  12148. maid.DelProp(MPN.accanl, true);
  12149. maid.DelProp(MPN.kousoku_upper, true);
  12150. maid.DelProp(MPN.kousoku_lower, true);
  12151. if (array[0] != "")
  12152. {
  12153. maid.SetProp(array[0], array[1], 0, true, false);
  12154. }
  12155. maid.AllProcPropSeqStart();
  12156. }
  12157. }
  12158. isDance = true;
  12159. isDanceStart5 = true;
  12160. isCF1 = false;
  12161. }
  12162. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12163. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12164. {
  12165. GameMain.Instance.SoundMgr.StopBGM(0f);
  12166. isCF1 = true;
  12167. if (getModKeyPressing(modKey.Shift))
  12168. {
  12169. isShift = true;
  12170. }
  12171. }
  12172. if (isKT1)
  12173. {
  12174. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12175. string text4 = textAsset.text;
  12176. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12177. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12178. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12179. for (int j = 0; j < maidCnt; j++)
  12180. {
  12181. if (!isShift)
  12182. {
  12183. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12184. {
  12185. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12186. GameUty.FileSystem,
  12187. "dance_cm3d_004_kano_f1.anm",
  12188. false,
  12189. false);
  12190. }
  12191. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12192. }
  12193. else
  12194. {
  12195. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12196. {
  12197. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12198. GameUty.FileSystem,
  12199. "dance_cm3d2_kara_002_cktc_f1.anm",
  12200. false,
  12201. false);
  12202. }
  12203. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12204. text4 = textAsset.text;
  12205. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12206. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12207. && !isDanceStart9K && !isDanceStart13K)
  12208. {
  12209. dancePos[j] = maidArray[j].transform.position;
  12210. danceRot[j] = maidArray[j].transform.localRotation;
  12211. }
  12212. }
  12213. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12214. }
  12215. if (!isShift)
  12216. {
  12217. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12218. }
  12219. else
  12220. {
  12221. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12222. }
  12223. for (int j = 0; j < maidCnt; j++)
  12224. {
  12225. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12226. isStop[j] = false;
  12227. isLock[j] = false;
  12228. pHandL[j] = 0;
  12229. pHandR[j] = 0;
  12230. muneIKL[j] = false;
  12231. muneIKR[j] = false;
  12232. if (!isVR)
  12233. {
  12234. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12235. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12236. }
  12237. }
  12238. ikBui = 5;
  12239. isDanceStart1F = false;
  12240. isDanceStart2F = false;
  12241. isDanceStart3F = false;
  12242. isDanceStart4F = false;
  12243. isDanceStart5F = false;
  12244. isDanceStart6F = false;
  12245. isDanceStart7F = false;
  12246. isDanceStart8F = false;
  12247. isDanceStart9F = false;
  12248. isDanceStart10F = false;
  12249. isDanceStart11F = false;
  12250. isDanceStart12F = false;
  12251. isDanceStart13F = false;
  12252. isDanceStart14F = false;
  12253. isDanceStart15F = false;
  12254. for (int j = 0; j < maidCnt; j++)
  12255. {
  12256. danceFace[j] = 0f;
  12257. }
  12258. if (isDanceStart7V)
  12259. {
  12260. for (int j = 0; j < maidCnt; j++)
  12261. {
  12262. if (maidArray[j] && maidArray[j].Visible)
  12263. {
  12264. if (isDanceStart7V)
  12265. {
  12266. maidArray[j].SetPos(dancePos[j]);
  12267. maidArray[j].body0.transform.localRotation = danceRot[j];
  12268. }
  12269. }
  12270. }
  12271. isDanceStart7V = false;
  12272. }
  12273. if (isDanceStart8V)
  12274. {
  12275. for (int j = 0; j < maidCnt; j++)
  12276. {
  12277. if (maidArray[j] && maidArray[j].Visible)
  12278. {
  12279. if (isDanceStart8V)
  12280. {
  12281. maidArray[j].SetPos(dancePos[j]);
  12282. maidArray[j].body0.transform.localRotation = danceRot[j];
  12283. }
  12284. }
  12285. }
  12286. isDanceStart8V = false;
  12287. isDanceStart8P = false;
  12288. }
  12289. if (isDanceStart11V)
  12290. {
  12291. for (int j = 0; j < maidCnt; j++)
  12292. {
  12293. if (maidArray[j] && maidArray[j].Visible)
  12294. {
  12295. if (isDanceStart11V)
  12296. {
  12297. maidArray[j].SetPos(dancePos[j]);
  12298. maidArray[j].body0.transform.localRotation = danceRot[j];
  12299. }
  12300. }
  12301. }
  12302. isDanceStart11V = false;
  12303. }
  12304. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12305. || isDanceStart13K)
  12306. {
  12307. for (int j = 0; j < maidCnt; j++)
  12308. {
  12309. if (maidArray[j] && maidArray[j].Visible)
  12310. {
  12311. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12312. || isDanceStart13K)
  12313. {
  12314. maidArray[j].SetPos(dancePos[j]);
  12315. maidArray[j].body0.transform.localRotation = danceRot[j];
  12316. int i = j;
  12317. if (!isVR)
  12318. {
  12319. delCount[i] = 20;
  12320. if (goSlot[(int)selectList[i]] != null)
  12321. {
  12322. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12323. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12324. {
  12325. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12326. }
  12327. }
  12328. }
  12329. Maid maid = maidArray[j];
  12330. maid.DelProp(MPN.handitem, true);
  12331. maid.DelProp(MPN.accvag, true);
  12332. maid.DelProp(MPN.accanl, true);
  12333. maid.DelProp(MPN.kousoku_upper, true);
  12334. maid.DelProp(MPN.kousoku_lower, true);
  12335. maid.AllProcPropSeqStart();
  12336. }
  12337. }
  12338. }
  12339. isDanceStart1K = false;
  12340. isDanceStart3K = false;
  12341. isDanceStart4K = false;
  12342. isDanceStart5K = false;
  12343. isDanceStart6K = false;
  12344. isDanceStart9K = false;
  12345. isDanceStart13K = false;
  12346. }
  12347. if (isDanceStart14V)
  12348. {
  12349. for (int j = 0; j < maidCnt; j++)
  12350. {
  12351. if (maidArray[j] && maidArray[j].Visible)
  12352. {
  12353. if (isDanceStart14V)
  12354. {
  12355. maidArray[j].SetPos(dancePos[j]);
  12356. maidArray[j].body0.transform.localRotation = danceRot[j];
  12357. }
  12358. }
  12359. }
  12360. isDanceStart14V = false;
  12361. }
  12362. if (isDanceStart15V)
  12363. {
  12364. for (int j = 0; j < maidCnt; j++)
  12365. {
  12366. if (maidArray[j] && maidArray[j].Visible)
  12367. {
  12368. if (isDanceStart15V)
  12369. {
  12370. maidArray[j].SetPos(dancePos[j]);
  12371. maidArray[j].body0.transform.localRotation = danceRot[j];
  12372. }
  12373. }
  12374. }
  12375. isDanceStart15V = false;
  12376. }
  12377. if (maidArray[1] && maidArray[1].Visible)
  12378. {
  12379. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12380. {
  12381. Vector3 vector = Vector3.zero;
  12382. vector.x = 0.6f;
  12383. maidArray[1].SetPos(vector);
  12384. if (maidArray[2] && maidArray[2].Visible)
  12385. {
  12386. vector.x = -0.6f;
  12387. maidArray[2].SetPos(vector);
  12388. }
  12389. if (maidArray[3] && maidArray[3].Visible)
  12390. {
  12391. vector.x = 1.2f;
  12392. maidArray[3].SetPos(vector);
  12393. }
  12394. if (maidArray[4] && maidArray[4].Visible)
  12395. {
  12396. vector.x = -1.2f;
  12397. maidArray[4].SetPos(vector);
  12398. }
  12399. if (maidArray[5] && maidArray[5].Visible)
  12400. {
  12401. vector.x = 1.8f;
  12402. maidArray[5].SetPos(vector);
  12403. }
  12404. if (maidArray[6] && maidArray[6].Visible)
  12405. {
  12406. vector.x = -1.8f;
  12407. maidArray[6].SetPos(vector);
  12408. }
  12409. if (maidArray[7] && maidArray[7].Visible)
  12410. {
  12411. vector.x = 2.4f;
  12412. maidArray[7].SetPos(vector);
  12413. }
  12414. if (maidArray[8] && maidArray[8].Visible)
  12415. {
  12416. vector.x = -2.4f;
  12417. maidArray[8].SetPos(vector);
  12418. }
  12419. if (maidArray[9] && maidArray[9].Visible)
  12420. {
  12421. vector.x = 3f;
  12422. maidArray[9].SetPos(vector);
  12423. }
  12424. if (maidArray[10] && maidArray[10].Visible)
  12425. {
  12426. vector.x = -3f;
  12427. maidArray[10].SetPos(vector);
  12428. }
  12429. if (maidArray[11] && maidArray[11].Visible)
  12430. {
  12431. vector.x = 3.6f;
  12432. maidArray[11].SetPos(vector);
  12433. }
  12434. if (maidArray[12] && maidArray[12].Visible)
  12435. {
  12436. vector.x = -3.6f;
  12437. maidArray[12].SetPos(vector);
  12438. }
  12439. if (maidArray[13] && maidArray[13].Visible)
  12440. {
  12441. vector.x = 4.2f;
  12442. maidArray[13].SetPos(vector);
  12443. }
  12444. }
  12445. }
  12446. if (maidArray[2] && maidArray[2].Visible)
  12447. {
  12448. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12449. {
  12450. Vector3 vector = Vector3.zero;
  12451. vector.x = 0.6f;
  12452. maidArray[1].SetPos(vector);
  12453. if (maidArray[2] && maidArray[2].Visible)
  12454. {
  12455. vector.x = -0.6f;
  12456. maidArray[2].SetPos(vector);
  12457. }
  12458. if (maidArray[3] && maidArray[3].Visible)
  12459. {
  12460. vector.x = 1.2f;
  12461. maidArray[3].SetPos(vector);
  12462. }
  12463. if (maidArray[4] && maidArray[4].Visible)
  12464. {
  12465. vector.x = -1.2f;
  12466. maidArray[4].SetPos(vector);
  12467. }
  12468. if (maidArray[5] && maidArray[5].Visible)
  12469. {
  12470. vector.x = 1.8f;
  12471. maidArray[5].SetPos(vector);
  12472. }
  12473. if (maidArray[6] && maidArray[6].Visible)
  12474. {
  12475. vector.x = -1.8f;
  12476. maidArray[6].SetPos(vector);
  12477. }
  12478. if (maidArray[7] && maidArray[7].Visible)
  12479. {
  12480. vector.x = 2.4f;
  12481. maidArray[7].SetPos(vector);
  12482. }
  12483. if (maidArray[8] && maidArray[8].Visible)
  12484. {
  12485. vector.x = -2.4f;
  12486. maidArray[8].SetPos(vector);
  12487. }
  12488. if (maidArray[9] && maidArray[9].Visible)
  12489. {
  12490. vector.x = 3f;
  12491. maidArray[9].SetPos(vector);
  12492. }
  12493. if (maidArray[10] && maidArray[10].Visible)
  12494. {
  12495. vector.x = -3f;
  12496. maidArray[10].SetPos(vector);
  12497. }
  12498. if (maidArray[11] && maidArray[11].Visible)
  12499. {
  12500. vector.x = 3.6f;
  12501. maidArray[11].SetPos(vector);
  12502. }
  12503. if (maidArray[12] && maidArray[12].Visible)
  12504. {
  12505. vector.x = -3.6f;
  12506. maidArray[12].SetPos(vector);
  12507. }
  12508. if (maidArray[13] && maidArray[13].Visible)
  12509. {
  12510. vector.x = 4.2f;
  12511. maidArray[13].SetPos(vector);
  12512. }
  12513. }
  12514. }
  12515. if (isShift)
  12516. {
  12517. isDanceStart9K = true;
  12518. for (int j = 0; j < maidCnt; j++)
  12519. {
  12520. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12521. maidArray[j].body0.transform.localRotation.y + 90f,
  12522. maidArray[j].body0.transform.localRotation.z));
  12523. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12524. maidArray[j].body0.transform.position.y,
  12525. maidArray[j].body0.transform.position.z + 4f));
  12526. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12527. int i = j;
  12528. Maid maid = maidArray[j];
  12529. if (!isVR)
  12530. {
  12531. delCount[i] = 20;
  12532. if (goSlot[(int)selectList[i]] != null)
  12533. {
  12534. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12535. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12536. {
  12537. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12538. }
  12539. }
  12540. }
  12541. string[] array = new string[2];
  12542. array = text2.Split(new char[] { ',' });
  12543. maid.DelProp(MPN.handitem, true);
  12544. maid.DelProp(MPN.accvag, true);
  12545. maid.DelProp(MPN.accanl, true);
  12546. maid.DelProp(MPN.kousoku_upper, true);
  12547. maid.DelProp(MPN.kousoku_lower, true);
  12548. if (array[0] != "")
  12549. {
  12550. maid.SetProp(array[0], array[1], 0, true, false);
  12551. }
  12552. maid.AllProcPropSeqStart();
  12553. }
  12554. }
  12555. isDance = true;
  12556. isDanceStart9 = true;
  12557. isKT1 = false;
  12558. }
  12559. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12560. {
  12561. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12562. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12563. if (isSS1)
  12564. {
  12565. nameK = "dance_BlD_m";
  12566. nameA = "dance_cm3d21_002_bid_f";
  12567. nameS = "bloomingdreaming_short";
  12568. danceNo1 = 1;
  12569. danceNo2 = 3;
  12570. danceNo3 = 2;
  12571. }
  12572. if (isSS2)
  12573. {
  12574. nameK = "dance_KAD_m";
  12575. nameA = "dance_cm3d21_003_kad_f";
  12576. nameS = "kiminiaijodelicious_short";
  12577. danceNo1 = 1;
  12578. danceNo2 = 2;
  12579. danceNo3 = 3;
  12580. }
  12581. if (isSS3)
  12582. {
  12583. nameK = "dance_LUM_m";
  12584. nameA = "dance_cm3d21_004_lm_f";
  12585. nameS = "luminousmoment_short";
  12586. danceNo1 = 3;
  12587. danceNo2 = 1;
  12588. danceNo3 = 2;
  12589. }
  12590. if (isSS4)
  12591. {
  12592. nameK = "dance_NmF_m";
  12593. nameA = "dance_cm3d21_001_nmf_f";
  12594. nameS = "nightmagicfire_short";
  12595. danceNo1 = 2;
  12596. danceNo2 = 1;
  12597. danceNo3 = 3;
  12598. }
  12599. if (isSS5)
  12600. {
  12601. nameK = "dance_MoE_m";
  12602. nameA = "dance_cm3d21_005_moe_f";
  12603. nameS = "melodyofempire_short";
  12604. danceNo1 = 1;
  12605. danceNo2 = 3;
  12606. danceNo3 = 2;
  12607. }
  12608. if (isSS6)
  12609. {
  12610. nameK = "dance_NmF_m";
  12611. nameA = "dance_cm3d21_kara_001_nmf_f";
  12612. nameS = "nightmagicfire_short";
  12613. danceNo1 = 1;
  12614. danceNo2 = 1;
  12615. danceNo3 = 1;
  12616. }
  12617. for (int j = 0; j < maidCnt; j++)
  12618. {
  12619. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12620. string text5 = nameA + danceNo1 + ".anm";
  12621. switch (j)
  12622. {
  12623. case 1:
  12624. case 4:
  12625. case 7:
  12626. case 10:
  12627. case 13:
  12628. text5 = nameA + danceNo2 + ".anm";
  12629. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12630. break;
  12631. case 2:
  12632. case 5:
  12633. case 8:
  12634. case 11:
  12635. text5 = nameA + danceNo3 + ".anm";
  12636. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12637. break;
  12638. }
  12639. if (maidArray[j] && maidArray[j].Visible)
  12640. {
  12641. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12642. {
  12643. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12644. }
  12645. string text4 = textAsset.text;
  12646. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12647. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12648. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12649. }
  12650. }
  12651. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12652. ikBui = 5;
  12653. isDanceStart1F = false;
  12654. isDanceStart2F = false;
  12655. isDanceStart3F = false;
  12656. isDanceStart4F = false;
  12657. isDanceStart5F = false;
  12658. isDanceStart6F = false;
  12659. isDanceStart7F = false;
  12660. isDanceStart8F = false;
  12661. isDanceStart9F = false;
  12662. isDanceStart10F = false;
  12663. isDanceStart11F = false;
  12664. isDanceStart12F = false;
  12665. isDanceStart13F = false;
  12666. isDanceStart14F = false;
  12667. isDanceStart15F = false;
  12668. for (int j = 0; j < maidCnt; j++)
  12669. {
  12670. danceFace[j] = 0f;
  12671. }
  12672. if (isDanceStart7V)
  12673. {
  12674. for (int j = 0; j < maidCnt; j++)
  12675. {
  12676. if (maidArray[j] && maidArray[j].Visible)
  12677. {
  12678. if (isDanceStart7V)
  12679. {
  12680. maidArray[j].SetPos(dancePos[j]);
  12681. maidArray[j].body0.transform.localRotation = danceRot[j];
  12682. }
  12683. }
  12684. }
  12685. isDanceStart7V = false;
  12686. }
  12687. if (isDanceStart8V)
  12688. {
  12689. for (int j = 0; j < maidCnt; j++)
  12690. {
  12691. if (maidArray[j] && maidArray[j].Visible)
  12692. {
  12693. if (isDanceStart8V)
  12694. {
  12695. maidArray[j].SetPos(dancePos[j]);
  12696. maidArray[j].body0.transform.localRotation = danceRot[j];
  12697. }
  12698. }
  12699. }
  12700. isDanceStart8V = false;
  12701. isDanceStart8P = false;
  12702. }
  12703. if (isDanceStart11V)
  12704. {
  12705. for (int j = 0; j < maidCnt; j++)
  12706. {
  12707. if (maidArray[j] && maidArray[j].Visible)
  12708. {
  12709. if (isDanceStart11V)
  12710. {
  12711. maidArray[j].SetPos(dancePos[j]);
  12712. maidArray[j].body0.transform.localRotation = danceRot[j];
  12713. }
  12714. }
  12715. }
  12716. isDanceStart11V = false;
  12717. }
  12718. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12719. || isDanceStart13K)
  12720. {
  12721. for (int j = 0; j < maidCnt; j++)
  12722. {
  12723. if (maidArray[j] && maidArray[j].Visible)
  12724. {
  12725. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12726. || isDanceStart13K)
  12727. {
  12728. maidArray[j].SetPos(dancePos[j]);
  12729. maidArray[j].body0.transform.localRotation = danceRot[j];
  12730. int i = j;
  12731. if (!isVR)
  12732. {
  12733. delCount[i] = 20;
  12734. if (goSlot[(int)selectList[i]] != null)
  12735. {
  12736. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12737. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12738. {
  12739. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12740. }
  12741. }
  12742. }
  12743. Maid maid = maidArray[j];
  12744. maid.DelProp(MPN.handitem, true);
  12745. maid.DelProp(MPN.accvag, true);
  12746. maid.DelProp(MPN.accanl, true);
  12747. maid.DelProp(MPN.kousoku_upper, true);
  12748. maid.DelProp(MPN.kousoku_lower, true);
  12749. maid.AllProcPropSeqStart();
  12750. }
  12751. }
  12752. }
  12753. isDanceStart1K = false;
  12754. isDanceStart3K = false;
  12755. isDanceStart4K = false;
  12756. isDanceStart5K = false;
  12757. isDanceStart6K = false;
  12758. isDanceStart9K = false;
  12759. isDanceStart13K = false;
  12760. }
  12761. if (isDanceStart14V)
  12762. {
  12763. for (int j = 0; j < maidCnt; j++)
  12764. {
  12765. if (maidArray[j] && maidArray[j].Visible)
  12766. {
  12767. if (isDanceStart14V)
  12768. {
  12769. maidArray[j].SetPos(dancePos[j]);
  12770. maidArray[j].body0.transform.localRotation = danceRot[j];
  12771. }
  12772. }
  12773. }
  12774. isDanceStart14V = false;
  12775. }
  12776. if (isDanceStart15V)
  12777. {
  12778. for (int j = 0; j < maidCnt; j++)
  12779. {
  12780. if (maidArray[j] && maidArray[j].Visible)
  12781. {
  12782. if (isDanceStart15V)
  12783. {
  12784. maidArray[j].SetPos(dancePos[j]);
  12785. maidArray[j].body0.transform.localRotation = danceRot[j];
  12786. }
  12787. }
  12788. }
  12789. isDanceStart15V = false;
  12790. }
  12791. for (int j = 0; j < maidCnt; j++)
  12792. {
  12793. isStop[j] = false;
  12794. isLock[j] = false;
  12795. pHandL[j] = 0;
  12796. pHandR[j] = 0;
  12797. muneIKL[j] = false;
  12798. muneIKR[j] = false;
  12799. if (!isVR)
  12800. {
  12801. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12802. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12803. }
  12804. if (maidArray[j].transform.position.y != 100f)
  12805. {
  12806. dancePos[j] = maidArray[j].transform.position;
  12807. }
  12808. else
  12809. {
  12810. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12811. }
  12812. danceRot[j] = maidArray[j].transform.localRotation;
  12813. }
  12814. if (maidArray[1] && maidArray[1].Visible)
  12815. {
  12816. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12817. maidArray[0].transform.position.y,
  12818. maidArray[0].transform.position.z));
  12819. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12820. }
  12821. if (maidArray[2] && maidArray[2].Visible)
  12822. {
  12823. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12824. maidArray[0].transform.position.y,
  12825. maidArray[0].transform.position.z));
  12826. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12827. }
  12828. if (maidArray[4] && maidArray[4].Visible)
  12829. {
  12830. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12831. maidArray[3].transform.position.y,
  12832. maidArray[3].transform.position.z));
  12833. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12834. }
  12835. if (maidArray[5] && maidArray[5].Visible)
  12836. {
  12837. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12838. maidArray[3].transform.position.y,
  12839. maidArray[3].transform.position.z));
  12840. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12841. }
  12842. if (maidArray[7] && maidArray[7].Visible)
  12843. {
  12844. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12845. maidArray[6].transform.position.y,
  12846. maidArray[6].transform.position.z));
  12847. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12848. }
  12849. if (maidArray[8] && maidArray[8].Visible)
  12850. {
  12851. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12852. maidArray[6].transform.position.y,
  12853. maidArray[6].transform.position.z));
  12854. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12855. }
  12856. if (maidArray[10] && maidArray[10].Visible)
  12857. {
  12858. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12859. maidArray[9].transform.position.y,
  12860. maidArray[9].transform.position.z));
  12861. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12862. }
  12863. if (maidArray[11] && maidArray[11].Visible)
  12864. {
  12865. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12866. maidArray[9].transform.position.y,
  12867. maidArray[9].transform.position.z));
  12868. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12869. }
  12870. if (maidArray[13] && maidArray[13].Visible)
  12871. {
  12872. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12873. maidArray[12].transform.position.y,
  12874. maidArray[12].transform.position.z));
  12875. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12876. }
  12877. isSS = false;
  12878. isDance = true;
  12879. isDanceStart11 = true;
  12880. }
  12881. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12882. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12883. {
  12884. GameMain.Instance.SoundMgr.StopBGM(0f);
  12885. isSS1 = true;
  12886. isSS2 = false;
  12887. isSS3 = false;
  12888. isSS4 = false;
  12889. isSS5 = false;
  12890. isSS6 = false;
  12891. isSS = true;
  12892. }
  12893. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12894. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12895. {
  12896. GameMain.Instance.SoundMgr.StopBGM(0f);
  12897. isSS1 = false;
  12898. isSS2 = true;
  12899. isSS3 = false;
  12900. isSS4 = false;
  12901. isSS5 = false;
  12902. isSS6 = false;
  12903. isSS = true;
  12904. }
  12905. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12906. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12907. {
  12908. GameMain.Instance.SoundMgr.StopBGM(0f);
  12909. isSS1 = false;
  12910. isSS2 = false;
  12911. isSS3 = true;
  12912. isSS4 = false;
  12913. isSS5 = false;
  12914. isSS6 = false;
  12915. isSS = true;
  12916. }
  12917. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12918. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12919. {
  12920. GameMain.Instance.SoundMgr.StopBGM(0f);
  12921. isSS1 = false;
  12922. isSS2 = false;
  12923. isSS3 = false;
  12924. isSS4 = true;
  12925. isSS5 = false;
  12926. isSS6 = false;
  12927. isSS = true;
  12928. }
  12929. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12930. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12931. {
  12932. GameMain.Instance.SoundMgr.StopBGM(0f);
  12933. isSS1 = false;
  12934. isSS2 = false;
  12935. isSS3 = false;
  12936. isSS4 = false;
  12937. isSS5 = true;
  12938. isSS6 = false;
  12939. isSS = true;
  12940. }
  12941. if (isKHG1 || isKHG2)
  12942. {
  12943. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12944. string text4 = textAsset.text;
  12945. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12946. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12947. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12948. for (int j = 0; j < maidCnt; j++)
  12949. {
  12950. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12951. {
  12952. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12953. GameUty.FileSystem,
  12954. "dance_cm3d2_005_khg_f.anm",
  12955. false,
  12956. false);
  12957. }
  12958. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12959. }
  12960. if (isKHG1)
  12961. {
  12962. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12963. }
  12964. if (isKHG2)
  12965. {
  12966. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12967. }
  12968. for (int j = 0; j < maidCnt; j++)
  12969. {
  12970. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12971. isStop[j] = false;
  12972. isLock[j] = false;
  12973. pHandL[j] = 0;
  12974. pHandR[j] = 0;
  12975. muneIKL[j] = false;
  12976. muneIKR[j] = false;
  12977. if (!isVR)
  12978. {
  12979. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12980. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12981. }
  12982. }
  12983. ikBui = 5;
  12984. isDanceStart1F = false;
  12985. isDanceStart2F = false;
  12986. isDanceStart3F = false;
  12987. isDanceStart4F = false;
  12988. isDanceStart5F = false;
  12989. isDanceStart6F = false;
  12990. isDanceStart7F = false;
  12991. isDanceStart8F = false;
  12992. isDanceStart9F = false;
  12993. isDanceStart10F = false;
  12994. isDanceStart11F = false;
  12995. isDanceStart12F = false;
  12996. isDanceStart13F = false;
  12997. isDanceStart14F = false;
  12998. isDanceStart15F = false;
  12999. for (int j = 0; j < maidCnt; j++)
  13000. {
  13001. danceFace[j] = 0f;
  13002. }
  13003. if (isDanceStart7V)
  13004. {
  13005. for (int j = 0; j < maidCnt; j++)
  13006. {
  13007. if (maidArray[j] && maidArray[j].Visible)
  13008. {
  13009. if (isDanceStart7V)
  13010. {
  13011. maidArray[j].SetPos(dancePos[j]);
  13012. maidArray[j].body0.transform.localRotation = danceRot[j];
  13013. }
  13014. }
  13015. }
  13016. isDanceStart7V = false;
  13017. }
  13018. if (isDanceStart8V)
  13019. {
  13020. for (int j = 0; j < maidCnt; j++)
  13021. {
  13022. if (maidArray[j] && maidArray[j].Visible)
  13023. {
  13024. if (isDanceStart8V)
  13025. {
  13026. maidArray[j].SetPos(dancePos[j]);
  13027. maidArray[j].body0.transform.localRotation = danceRot[j];
  13028. }
  13029. }
  13030. }
  13031. isDanceStart8V = false;
  13032. isDanceStart8P = false;
  13033. }
  13034. if (isDanceStart11V)
  13035. {
  13036. for (int j = 0; j < maidCnt; j++)
  13037. {
  13038. if (maidArray[j] && maidArray[j].Visible)
  13039. {
  13040. if (isDanceStart11V)
  13041. {
  13042. maidArray[j].SetPos(dancePos[j]);
  13043. maidArray[j].body0.transform.localRotation = danceRot[j];
  13044. }
  13045. }
  13046. }
  13047. isDanceStart11V = false;
  13048. }
  13049. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13050. || isDanceStart13K)
  13051. {
  13052. for (int j = 0; j < maidCnt; j++)
  13053. {
  13054. if (maidArray[j] && maidArray[j].Visible)
  13055. {
  13056. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13057. || isDanceStart13K)
  13058. {
  13059. maidArray[j].SetPos(dancePos[j]);
  13060. maidArray[j].body0.transform.localRotation = danceRot[j];
  13061. int i = j;
  13062. if (!isVR)
  13063. {
  13064. delCount[i] = 20;
  13065. if (goSlot[(int)selectList[i]] != null)
  13066. {
  13067. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13068. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13069. {
  13070. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13071. }
  13072. }
  13073. }
  13074. Maid maid = maidArray[j];
  13075. maid.DelProp(MPN.handitem, true);
  13076. maid.DelProp(MPN.accvag, true);
  13077. maid.DelProp(MPN.accanl, true);
  13078. maid.DelProp(MPN.kousoku_upper, true);
  13079. maid.DelProp(MPN.kousoku_lower, true);
  13080. maid.AllProcPropSeqStart();
  13081. }
  13082. }
  13083. }
  13084. isDanceStart1K = false;
  13085. isDanceStart3K = false;
  13086. isDanceStart4K = false;
  13087. isDanceStart5K = false;
  13088. isDanceStart6K = false;
  13089. isDanceStart9K = false;
  13090. isDanceStart13K = false;
  13091. }
  13092. if (isDanceStart14V)
  13093. {
  13094. for (int j = 0; j < maidCnt; j++)
  13095. {
  13096. if (maidArray[j] && maidArray[j].Visible)
  13097. {
  13098. if (isDanceStart14V)
  13099. {
  13100. maidArray[j].SetPos(dancePos[j]);
  13101. maidArray[j].body0.transform.localRotation = danceRot[j];
  13102. }
  13103. }
  13104. }
  13105. isDanceStart14V = false;
  13106. }
  13107. if (isDanceStart15V)
  13108. {
  13109. for (int j = 0; j < maidCnt; j++)
  13110. {
  13111. if (maidArray[j] && maidArray[j].Visible)
  13112. {
  13113. if (isDanceStart15V)
  13114. {
  13115. maidArray[j].SetPos(dancePos[j]);
  13116. maidArray[j].body0.transform.localRotation = danceRot[j];
  13117. }
  13118. }
  13119. }
  13120. isDanceStart15V = false;
  13121. }
  13122. if (maidArray[1] && maidArray[1].Visible)
  13123. {
  13124. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13125. {
  13126. Vector3 vector = Vector3.zero;
  13127. vector.x = 0.6f;
  13128. maidArray[1].SetPos(vector);
  13129. if (maidArray[2] && maidArray[2].Visible)
  13130. {
  13131. vector.x = -0.6f;
  13132. maidArray[2].SetPos(vector);
  13133. }
  13134. if (maidArray[3] && maidArray[3].Visible)
  13135. {
  13136. vector.x = 1.2f;
  13137. maidArray[3].SetPos(vector);
  13138. }
  13139. if (maidArray[4] && maidArray[4].Visible)
  13140. {
  13141. vector.x = -1.2f;
  13142. maidArray[4].SetPos(vector);
  13143. }
  13144. if (maidArray[5] && maidArray[5].Visible)
  13145. {
  13146. vector.x = 1.8f;
  13147. maidArray[5].SetPos(vector);
  13148. }
  13149. if (maidArray[6] && maidArray[6].Visible)
  13150. {
  13151. vector.x = -1.8f;
  13152. maidArray[6].SetPos(vector);
  13153. }
  13154. if (maidArray[7] && maidArray[7].Visible)
  13155. {
  13156. vector.x = 2.4f;
  13157. maidArray[7].SetPos(vector);
  13158. }
  13159. if (maidArray[8] && maidArray[8].Visible)
  13160. {
  13161. vector.x = -2.4f;
  13162. maidArray[8].SetPos(vector);
  13163. }
  13164. if (maidArray[9] && maidArray[9].Visible)
  13165. {
  13166. vector.x = 3f;
  13167. maidArray[9].SetPos(vector);
  13168. }
  13169. if (maidArray[10] && maidArray[10].Visible)
  13170. {
  13171. vector.x = -3f;
  13172. maidArray[10].SetPos(vector);
  13173. }
  13174. if (maidArray[11] && maidArray[11].Visible)
  13175. {
  13176. vector.x = 3.6f;
  13177. maidArray[11].SetPos(vector);
  13178. }
  13179. if (maidArray[12] && maidArray[12].Visible)
  13180. {
  13181. vector.x = -3.6f;
  13182. maidArray[12].SetPos(vector);
  13183. }
  13184. if (maidArray[13] && maidArray[13].Visible)
  13185. {
  13186. vector.x = 4.2f;
  13187. maidArray[13].SetPos(vector);
  13188. }
  13189. }
  13190. }
  13191. isDance = true;
  13192. isDanceStart12 = true;
  13193. isKHG1 = false;
  13194. isKHG2 = false;
  13195. }
  13196. if (isDanceStart13Count > 0)
  13197. {
  13198. isDanceStart13Count++;
  13199. }
  13200. if (isDanceStart13Count == 1)
  13201. {
  13202. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13203. isDanceStart13Count = 0;
  13204. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13205. string text4 = textAsset.text;
  13206. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13207. for (int j = 0; j < maidCnt; j++)
  13208. {
  13209. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13210. }
  13211. }
  13212. if ((isSN1 || isSN2 || isSN3) && isShift)
  13213. {
  13214. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13215. string text4 = textAsset.text;
  13216. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13217. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13218. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13219. for (int j = 0; j < maidCnt; j++)
  13220. {
  13221. if (!isShift)
  13222. {
  13223. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13224. {
  13225. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13226. GameUty.FileSystem,
  13227. "dance_cm3d2_006_ssn_f1.anm",
  13228. false,
  13229. false);
  13230. }
  13231. }
  13232. else
  13233. {
  13234. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13235. {
  13236. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13237. GameUty.FileSystem,
  13238. "dance_cm3d21_kara_001_nmf_f1.anm",
  13239. false,
  13240. false);
  13241. }
  13242. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13243. string text5 = nameA + danceNo1 + ".anm";
  13244. switch (j)
  13245. {
  13246. case 1:
  13247. case 4:
  13248. case 7:
  13249. case 10:
  13250. case 13:
  13251. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13252. break;
  13253. case 2:
  13254. case 5:
  13255. case 8:
  13256. case 11:
  13257. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13258. break;
  13259. }
  13260. text4 = textAsset.text;
  13261. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13262. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13263. && !isDanceStart9K && !isDanceStart13K)
  13264. {
  13265. dancePos[j] = maidArray[j].transform.position;
  13266. danceRot[j] = maidArray[j].transform.localRotation;
  13267. }
  13268. }
  13269. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13270. }
  13271. if (!isShift)
  13272. {
  13273. if (isSN1)
  13274. {
  13275. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13276. }
  13277. if (isSN2)
  13278. {
  13279. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13280. }
  13281. if (isSN3)
  13282. {
  13283. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13284. }
  13285. }
  13286. else
  13287. {
  13288. danceWait = 400;
  13289. isDanceStart13Count++;
  13290. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13291. }
  13292. for (int j = 0; j < maidCnt; j++)
  13293. {
  13294. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13295. isStop[j] = false;
  13296. isLock[j] = false;
  13297. pHandL[j] = 0;
  13298. pHandR[j] = 0;
  13299. muneIKL[j] = false;
  13300. muneIKR[j] = false;
  13301. if (!isVR)
  13302. {
  13303. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13304. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13305. }
  13306. }
  13307. ikBui = 5;
  13308. isDanceStart1F = false;
  13309. isDanceStart2F = false;
  13310. isDanceStart3F = false;
  13311. isDanceStart4F = false;
  13312. isDanceStart5F = false;
  13313. isDanceStart6F = false;
  13314. isDanceStart7F = false;
  13315. isDanceStart8F = false;
  13316. isDanceStart9F = false;
  13317. isDanceStart10F = false;
  13318. isDanceStart11F = false;
  13319. isDanceStart12F = false;
  13320. isDanceStart13F = false;
  13321. isDanceStart14F = false;
  13322. isDanceStart15F = false;
  13323. for (int j = 0; j < maidCnt; j++)
  13324. {
  13325. danceFace[j] = 0f;
  13326. }
  13327. if (isDanceStart7V)
  13328. {
  13329. for (int j = 0; j < maidCnt; j++)
  13330. {
  13331. if (maidArray[j] && maidArray[j].Visible)
  13332. {
  13333. if (isDanceStart7V)
  13334. {
  13335. maidArray[j].SetPos(dancePos[j]);
  13336. maidArray[j].body0.transform.localRotation = danceRot[j];
  13337. }
  13338. }
  13339. }
  13340. isDanceStart7V = false;
  13341. }
  13342. if (isDanceStart8V)
  13343. {
  13344. for (int j = 0; j < maidCnt; j++)
  13345. {
  13346. if (maidArray[j] && maidArray[j].Visible)
  13347. {
  13348. if (isDanceStart8V)
  13349. {
  13350. maidArray[j].SetPos(dancePos[j]);
  13351. maidArray[j].body0.transform.localRotation = danceRot[j];
  13352. }
  13353. }
  13354. }
  13355. isDanceStart8V = false;
  13356. isDanceStart8P = false;
  13357. }
  13358. if (isDanceStart11V)
  13359. {
  13360. for (int j = 0; j < maidCnt; j++)
  13361. {
  13362. if (maidArray[j] && maidArray[j].Visible)
  13363. {
  13364. if (isDanceStart11V)
  13365. {
  13366. maidArray[j].SetPos(dancePos[j]);
  13367. maidArray[j].body0.transform.localRotation = danceRot[j];
  13368. }
  13369. }
  13370. }
  13371. isDanceStart11V = false;
  13372. }
  13373. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13374. || isDanceStart13K)
  13375. {
  13376. for (int j = 0; j < maidCnt; j++)
  13377. {
  13378. if (maidArray[j] && maidArray[j].Visible)
  13379. {
  13380. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13381. || isDanceStart13K)
  13382. {
  13383. maidArray[j].SetPos(dancePos[j]);
  13384. maidArray[j].body0.transform.localRotation = danceRot[j];
  13385. int i = j;
  13386. if (!isVR)
  13387. {
  13388. delCount[i] = 20;
  13389. if (goSlot[(int)selectList[i]] != null)
  13390. {
  13391. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13392. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13393. {
  13394. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13395. }
  13396. }
  13397. }
  13398. Maid maid = maidArray[j];
  13399. maid.DelProp(MPN.handitem, true);
  13400. maid.DelProp(MPN.accvag, true);
  13401. maid.DelProp(MPN.accanl, true);
  13402. maid.DelProp(MPN.kousoku_upper, true);
  13403. maid.DelProp(MPN.kousoku_lower, true);
  13404. maid.AllProcPropSeqStart();
  13405. }
  13406. }
  13407. }
  13408. isDanceStart1K = false;
  13409. isDanceStart3K = false;
  13410. isDanceStart4K = false;
  13411. isDanceStart5K = false;
  13412. isDanceStart6K = false;
  13413. isDanceStart9K = false;
  13414. isDanceStart13K = false;
  13415. }
  13416. if (isDanceStart14V)
  13417. {
  13418. for (int j = 0; j < maidCnt; j++)
  13419. {
  13420. if (maidArray[j] && maidArray[j].Visible)
  13421. {
  13422. if (isDanceStart14V)
  13423. {
  13424. maidArray[j].SetPos(dancePos[j]);
  13425. maidArray[j].body0.transform.localRotation = danceRot[j];
  13426. }
  13427. }
  13428. }
  13429. isDanceStart14V = false;
  13430. }
  13431. if (isDanceStart15V)
  13432. {
  13433. for (int j = 0; j < maidCnt; j++)
  13434. {
  13435. if (maidArray[j] && maidArray[j].Visible)
  13436. {
  13437. if (isDanceStart15V)
  13438. {
  13439. maidArray[j].SetPos(dancePos[j]);
  13440. maidArray[j].body0.transform.localRotation = danceRot[j];
  13441. }
  13442. }
  13443. }
  13444. isDanceStart15V = false;
  13445. }
  13446. if (maidArray[1] && maidArray[1].Visible)
  13447. {
  13448. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13449. {
  13450. Vector3 vector = Vector3.zero;
  13451. vector.x = 0.6f;
  13452. maidArray[1].SetPos(vector);
  13453. if (maidArray[2] && maidArray[2].Visible)
  13454. {
  13455. vector.x = -0.6f;
  13456. maidArray[2].SetPos(vector);
  13457. }
  13458. if (maidArray[3] && maidArray[3].Visible)
  13459. {
  13460. vector.x = 1.2f;
  13461. maidArray[3].SetPos(vector);
  13462. }
  13463. if (maidArray[4] && maidArray[4].Visible)
  13464. {
  13465. vector.x = -1.2f;
  13466. maidArray[4].SetPos(vector);
  13467. }
  13468. if (maidArray[5] && maidArray[5].Visible)
  13469. {
  13470. vector.x = 1.8f;
  13471. maidArray[5].SetPos(vector);
  13472. }
  13473. if (maidArray[6] && maidArray[6].Visible)
  13474. {
  13475. vector.x = -1.8f;
  13476. maidArray[6].SetPos(vector);
  13477. }
  13478. if (maidArray[7] && maidArray[7].Visible)
  13479. {
  13480. vector.x = 2.4f;
  13481. maidArray[7].SetPos(vector);
  13482. }
  13483. if (maidArray[8] && maidArray[8].Visible)
  13484. {
  13485. vector.x = -2.4f;
  13486. maidArray[8].SetPos(vector);
  13487. }
  13488. if (maidArray[9] && maidArray[9].Visible)
  13489. {
  13490. vector.x = 3f;
  13491. maidArray[9].SetPos(vector);
  13492. }
  13493. if (maidArray[10] && maidArray[10].Visible)
  13494. {
  13495. vector.x = -3f;
  13496. maidArray[10].SetPos(vector);
  13497. }
  13498. if (maidArray[11] && maidArray[11].Visible)
  13499. {
  13500. vector.x = 3.6f;
  13501. maidArray[11].SetPos(vector);
  13502. }
  13503. if (maidArray[12] && maidArray[12].Visible)
  13504. {
  13505. vector.x = -3.6f;
  13506. maidArray[12].SetPos(vector);
  13507. }
  13508. if (maidArray[13] && maidArray[13].Visible)
  13509. {
  13510. vector.x = 4.2f;
  13511. maidArray[13].SetPos(vector);
  13512. }
  13513. }
  13514. }
  13515. if (isShift)
  13516. {
  13517. isDanceStart13K = true;
  13518. for (int j = 0; j < maidCnt; j++)
  13519. {
  13520. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13521. maidArray[j].body0.transform.localRotation.y + 90f,
  13522. maidArray[j].body0.transform.localRotation.z));
  13523. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13524. maidArray[j].body0.transform.position.y,
  13525. maidArray[j].body0.transform.position.z + 4f));
  13526. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13527. int i = j;
  13528. Maid maid = maidArray[j];
  13529. if (!isVR)
  13530. {
  13531. delCount[i] = 20;
  13532. if (goSlot[(int)selectList[i]] != null)
  13533. {
  13534. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13535. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13536. {
  13537. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13538. }
  13539. }
  13540. }
  13541. string[] array = new string[2];
  13542. array = text2.Split(new char[] { ',' });
  13543. maid.DelProp(MPN.handitem, true);
  13544. maid.DelProp(MPN.accvag, true);
  13545. maid.DelProp(MPN.accanl, true);
  13546. maid.DelProp(MPN.kousoku_upper, true);
  13547. maid.DelProp(MPN.kousoku_lower, true);
  13548. if (array[0] != "")
  13549. {
  13550. maid.SetProp(array[0], array[1], 0, true, false);
  13551. }
  13552. maid.AllProcPropSeqStart();
  13553. }
  13554. }
  13555. isDance = true;
  13556. isDanceStart13 = true;
  13557. isSN1 = false;
  13558. isSN2 = false;
  13559. isSN3 = false;
  13560. }
  13561. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13562. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13563. {
  13564. GameMain.Instance.SoundMgr.StopBGM(0f);
  13565. isSN1 = true;
  13566. hFlg = true;
  13567. if (getModKeyPressing(modKey.Shift))
  13568. {
  13569. isShift = true;
  13570. }
  13571. }
  13572. if (isSN4 || isSN5 || isSN6)
  13573. {
  13574. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13575. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13576. for (int j = 0; j < maidCnt; j++)
  13577. {
  13578. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13579. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13580. switch (j)
  13581. {
  13582. case 1:
  13583. case 4:
  13584. case 7:
  13585. case 10:
  13586. case 13:
  13587. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13588. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13589. break;
  13590. case 2:
  13591. case 5:
  13592. case 8:
  13593. case 11:
  13594. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13595. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13596. break;
  13597. }
  13598. if (maidArray[j] && maidArray[j].Visible)
  13599. {
  13600. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13601. {
  13602. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13603. }
  13604. string text4 = textAsset.text;
  13605. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13606. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13607. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13608. }
  13609. }
  13610. if (isSN4)
  13611. {
  13612. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13613. }
  13614. if (isSN5)
  13615. {
  13616. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13617. }
  13618. if (isSN6)
  13619. {
  13620. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13621. }
  13622. ikBui = 5;
  13623. isDanceStart1F = false;
  13624. isDanceStart2F = false;
  13625. isDanceStart3F = false;
  13626. isDanceStart4F = false;
  13627. isDanceStart5F = false;
  13628. isDanceStart6F = false;
  13629. isDanceStart7F = false;
  13630. isDanceStart8F = false;
  13631. isDanceStart9F = false;
  13632. isDanceStart10F = false;
  13633. isDanceStart11F = false;
  13634. isDanceStart12F = false;
  13635. isDanceStart13F = false;
  13636. isDanceStart14F = false;
  13637. isDanceStart15F = false;
  13638. for (int j = 0; j < maidCnt; j++)
  13639. {
  13640. danceFace[j] = 0f;
  13641. }
  13642. if (isDanceStart7V)
  13643. {
  13644. for (int j = 0; j < maidCnt; j++)
  13645. {
  13646. if (maidArray[j] && maidArray[j].Visible)
  13647. {
  13648. if (isDanceStart7V)
  13649. {
  13650. maidArray[j].SetPos(dancePos[j]);
  13651. maidArray[j].body0.transform.localRotation = danceRot[j];
  13652. }
  13653. }
  13654. }
  13655. isDanceStart7V = false;
  13656. }
  13657. if (isDanceStart8V)
  13658. {
  13659. for (int j = 0; j < maidCnt; j++)
  13660. {
  13661. if (maidArray[j] && maidArray[j].Visible)
  13662. {
  13663. if (isDanceStart8V)
  13664. {
  13665. maidArray[j].SetPos(dancePos[j]);
  13666. maidArray[j].body0.transform.localRotation = danceRot[j];
  13667. }
  13668. }
  13669. }
  13670. isDanceStart8V = false;
  13671. isDanceStart8P = false;
  13672. }
  13673. if (isDanceStart11V)
  13674. {
  13675. for (int j = 0; j < maidCnt; j++)
  13676. {
  13677. if (maidArray[j] && maidArray[j].Visible)
  13678. {
  13679. if (isDanceStart11V)
  13680. {
  13681. maidArray[j].SetPos(dancePos[j]);
  13682. maidArray[j].body0.transform.localRotation = danceRot[j];
  13683. }
  13684. }
  13685. }
  13686. isDanceStart11V = false;
  13687. }
  13688. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13689. || isDanceStart13K)
  13690. {
  13691. for (int j = 0; j < maidCnt; j++)
  13692. {
  13693. if (maidArray[j] && maidArray[j].Visible)
  13694. {
  13695. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13696. || isDanceStart13K)
  13697. {
  13698. maidArray[j].SetPos(dancePos[j]);
  13699. maidArray[j].body0.transform.localRotation = danceRot[j];
  13700. int i = j;
  13701. if (!isVR)
  13702. {
  13703. delCount[i] = 20;
  13704. if (goSlot[(int)selectList[i]] != null)
  13705. {
  13706. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13707. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13708. {
  13709. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13710. }
  13711. }
  13712. }
  13713. Maid maid = maidArray[j];
  13714. maid.DelProp(MPN.handitem, true);
  13715. maid.DelProp(MPN.accvag, true);
  13716. maid.DelProp(MPN.accanl, true);
  13717. maid.DelProp(MPN.kousoku_upper, true);
  13718. maid.DelProp(MPN.kousoku_lower, true);
  13719. maid.AllProcPropSeqStart();
  13720. }
  13721. }
  13722. }
  13723. isDanceStart1K = false;
  13724. isDanceStart3K = false;
  13725. isDanceStart4K = false;
  13726. isDanceStart5K = false;
  13727. isDanceStart6K = false;
  13728. isDanceStart9K = false;
  13729. isDanceStart13K = false;
  13730. }
  13731. if (isDanceStart14V)
  13732. {
  13733. for (int j = 0; j < maidCnt; j++)
  13734. {
  13735. if (maidArray[j] && maidArray[j].Visible)
  13736. {
  13737. if (isDanceStart14V)
  13738. {
  13739. maidArray[j].SetPos(dancePos[j]);
  13740. maidArray[j].body0.transform.localRotation = danceRot[j];
  13741. }
  13742. }
  13743. }
  13744. isDanceStart14V = false;
  13745. }
  13746. if (isDanceStart15V)
  13747. {
  13748. for (int j = 0; j < maidCnt; j++)
  13749. {
  13750. if (maidArray[j] && maidArray[j].Visible)
  13751. {
  13752. if (isDanceStart15V)
  13753. {
  13754. maidArray[j].SetPos(dancePos[j]);
  13755. maidArray[j].body0.transform.localRotation = danceRot[j];
  13756. }
  13757. }
  13758. }
  13759. isDanceStart15V = false;
  13760. }
  13761. for (int j = 0; j < maidCnt; j++)
  13762. {
  13763. isStop[j] = false;
  13764. isLock[j] = false;
  13765. pHandL[j] = 0;
  13766. pHandR[j] = 0;
  13767. muneIKL[j] = false;
  13768. muneIKR[j] = false;
  13769. if (!isVR)
  13770. {
  13771. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13772. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13773. }
  13774. if (maidArray[j].transform.position.y != 100f)
  13775. {
  13776. dancePos[j] = maidArray[j].transform.position;
  13777. }
  13778. else
  13779. {
  13780. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13781. }
  13782. danceRot[j] = maidArray[j].transform.localRotation;
  13783. }
  13784. if (maidArray[1] && maidArray[1].Visible)
  13785. {
  13786. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13787. maidArray[0].transform.position.y,
  13788. maidArray[0].transform.position.z));
  13789. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13790. }
  13791. if (maidArray[2] && maidArray[2].Visible)
  13792. {
  13793. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13794. maidArray[0].transform.position.y,
  13795. maidArray[0].transform.position.z));
  13796. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13797. }
  13798. if (maidArray[4] && maidArray[4].Visible)
  13799. {
  13800. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13801. maidArray[3].transform.position.y,
  13802. maidArray[3].transform.position.z));
  13803. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13804. }
  13805. if (maidArray[5] && maidArray[5].Visible)
  13806. {
  13807. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13808. maidArray[3].transform.position.y,
  13809. maidArray[3].transform.position.z));
  13810. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13811. }
  13812. if (maidArray[7] && maidArray[7].Visible)
  13813. {
  13814. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13815. maidArray[6].transform.position.y,
  13816. maidArray[6].transform.position.z));
  13817. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13818. }
  13819. if (maidArray[8] && maidArray[8].Visible)
  13820. {
  13821. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13822. maidArray[6].transform.position.y,
  13823. maidArray[6].transform.position.z));
  13824. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13825. }
  13826. if (maidArray[10] && maidArray[10].Visible)
  13827. {
  13828. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13829. maidArray[9].transform.position.y,
  13830. maidArray[9].transform.position.z));
  13831. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13832. }
  13833. if (maidArray[11] && maidArray[11].Visible)
  13834. {
  13835. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13836. maidArray[9].transform.position.y,
  13837. maidArray[9].transform.position.z));
  13838. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13839. }
  13840. if (maidArray[13] && maidArray[13].Visible)
  13841. {
  13842. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13843. maidArray[12].transform.position.y,
  13844. maidArray[12].transform.position.z));
  13845. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13846. }
  13847. isDance = true;
  13848. isDanceStart14 = true;
  13849. isSN4 = false;
  13850. isSN5 = false;
  13851. isSN6 = false;
  13852. }
  13853. if (isSD1)
  13854. {
  13855. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13856. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13857. for (int j = 0; j < maidCnt; j++)
  13858. {
  13859. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13860. string text5 = "dance_cmo_002_sd_f1.anm";
  13861. switch (j)
  13862. {
  13863. case 1:
  13864. case 3:
  13865. case 5:
  13866. case 7:
  13867. case 9:
  13868. case 11:
  13869. case 13:
  13870. text5 = "dance_cmo_002_sd_f2.anm";
  13871. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13872. break;
  13873. }
  13874. danceName[j] = text5;
  13875. if (maidArray[j] && maidArray[j].Visible)
  13876. {
  13877. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13878. {
  13879. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13880. }
  13881. string text4 = textAsset.text;
  13882. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13883. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13884. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13885. }
  13886. }
  13887. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13888. ikBui = 5;
  13889. isDanceStart1F = false;
  13890. isDanceStart2F = false;
  13891. isDanceStart3F = false;
  13892. isDanceStart4F = false;
  13893. isDanceStart5F = false;
  13894. isDanceStart6F = false;
  13895. isDanceStart7F = false;
  13896. isDanceStart8F = false;
  13897. isDanceStart9F = false;
  13898. isDanceStart10F = false;
  13899. isDanceStart11F = false;
  13900. isDanceStart12F = false;
  13901. isDanceStart13F = false;
  13902. isDanceStart14F = false;
  13903. isDanceStart15F = false;
  13904. for (int j = 0; j < maidCnt; j++)
  13905. {
  13906. danceFace[j] = 0f;
  13907. }
  13908. if (isDanceStart7V)
  13909. {
  13910. for (int j = 0; j < maidCnt; j++)
  13911. {
  13912. if (maidArray[j] && maidArray[j].Visible)
  13913. {
  13914. if (isDanceStart7V)
  13915. {
  13916. maidArray[j].SetPos(dancePos[j]);
  13917. maidArray[j].body0.transform.localRotation = danceRot[j];
  13918. }
  13919. }
  13920. }
  13921. isDanceStart7V = false;
  13922. }
  13923. if (isDanceStart8V)
  13924. {
  13925. for (int j = 0; j < maidCnt; j++)
  13926. {
  13927. if (maidArray[j] && maidArray[j].Visible)
  13928. {
  13929. if (isDanceStart8V)
  13930. {
  13931. maidArray[j].SetPos(dancePos[j]);
  13932. maidArray[j].body0.transform.localRotation = danceRot[j];
  13933. }
  13934. }
  13935. }
  13936. isDanceStart8V = false;
  13937. isDanceStart8P = false;
  13938. }
  13939. if (isDanceStart11V)
  13940. {
  13941. for (int j = 0; j < maidCnt; j++)
  13942. {
  13943. if (maidArray[j] && maidArray[j].Visible)
  13944. {
  13945. if (isDanceStart11V)
  13946. {
  13947. maidArray[j].SetPos(dancePos[j]);
  13948. maidArray[j].body0.transform.localRotation = danceRot[j];
  13949. }
  13950. }
  13951. }
  13952. isDanceStart11V = false;
  13953. }
  13954. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13955. || isDanceStart13K)
  13956. {
  13957. for (int j = 0; j < maidCnt; j++)
  13958. {
  13959. if (maidArray[j] && maidArray[j].Visible)
  13960. {
  13961. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13962. || isDanceStart13K)
  13963. {
  13964. maidArray[j].SetPos(dancePos[j]);
  13965. maidArray[j].body0.transform.localRotation = danceRot[j];
  13966. int i = j;
  13967. if (!isVR)
  13968. {
  13969. delCount[i] = 20;
  13970. if (goSlot[(int)selectList[i]] != null)
  13971. {
  13972. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13973. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13974. {
  13975. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13976. }
  13977. }
  13978. }
  13979. Maid maid = maidArray[j];
  13980. maid.DelProp(MPN.handitem, true);
  13981. maid.DelProp(MPN.accvag, true);
  13982. maid.DelProp(MPN.accanl, true);
  13983. maid.DelProp(MPN.kousoku_upper, true);
  13984. maid.DelProp(MPN.kousoku_lower, true);
  13985. maid.AllProcPropSeqStart();
  13986. }
  13987. }
  13988. }
  13989. isDanceStart1K = false;
  13990. isDanceStart3K = false;
  13991. isDanceStart4K = false;
  13992. isDanceStart5K = false;
  13993. isDanceStart6K = false;
  13994. isDanceStart9K = false;
  13995. isDanceStart13K = false;
  13996. }
  13997. if (isDanceStart14V)
  13998. {
  13999. for (int j = 0; j < maidCnt; j++)
  14000. {
  14001. if (maidArray[j] && maidArray[j].Visible)
  14002. {
  14003. if (isDanceStart14V)
  14004. {
  14005. maidArray[j].SetPos(dancePos[j]);
  14006. maidArray[j].body0.transform.localRotation = danceRot[j];
  14007. }
  14008. }
  14009. }
  14010. isDanceStart14V = false;
  14011. }
  14012. if (isDanceStart15V)
  14013. {
  14014. for (int j = 0; j < maidCnt; j++)
  14015. {
  14016. if (maidArray[j] && maidArray[j].Visible)
  14017. {
  14018. if (isDanceStart15V)
  14019. {
  14020. maidArray[j].SetPos(dancePos[j]);
  14021. maidArray[j].body0.transform.localRotation = danceRot[j];
  14022. }
  14023. }
  14024. }
  14025. isDanceStart15V = false;
  14026. }
  14027. for (int j = 0; j < maidCnt; j++)
  14028. {
  14029. isStop[j] = false;
  14030. isLock[j] = false;
  14031. pHandL[j] = 0;
  14032. pHandR[j] = 0;
  14033. muneIKL[j] = false;
  14034. muneIKR[j] = false;
  14035. if (!isVR)
  14036. {
  14037. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14038. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14039. }
  14040. if (maidArray[j].transform.position.y != 100f)
  14041. {
  14042. dancePos[j] = maidArray[j].transform.position;
  14043. }
  14044. else
  14045. {
  14046. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14047. }
  14048. danceRot[j] = maidArray[j].transform.localRotation;
  14049. }
  14050. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14051. {
  14052. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14053. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14054. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14055. maidArray[0].body0.transform.localRotation =
  14056. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14057. }
  14058. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14059. {
  14060. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14061. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14062. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14063. maidArray[2].body0.transform.localRotation =
  14064. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14065. }
  14066. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14067. {
  14068. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14069. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14070. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14071. maidArray[4].body0.transform.localRotation =
  14072. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14073. }
  14074. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14075. {
  14076. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14077. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14078. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14079. maidArray[6].body0.transform.localRotation =
  14080. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14081. }
  14082. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14083. {
  14084. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14085. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14086. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14087. maidArray[8].body0.transform.localRotation =
  14088. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14089. }
  14090. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14091. {
  14092. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14093. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14094. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14095. maidArray[10].body0.transform.localRotation =
  14096. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14097. }
  14098. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14099. {
  14100. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14101. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14102. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14103. maidArray[12].body0.transform.localRotation =
  14104. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14105. }
  14106. if (maidArray[1] && maidArray[1].Visible)
  14107. {
  14108. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14109. maidArray[0].transform.position.y,
  14110. maidArray[0].transform.position.z));
  14111. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14112. }
  14113. if (maidArray[3] && maidArray[3].Visible)
  14114. {
  14115. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14116. maidArray[2].transform.position.y,
  14117. maidArray[2].transform.position.z));
  14118. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14119. }
  14120. if (maidArray[5] && maidArray[5].Visible)
  14121. {
  14122. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14123. maidArray[4].transform.position.y,
  14124. maidArray[4].transform.position.z));
  14125. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14126. }
  14127. if (maidArray[7] && maidArray[7].Visible)
  14128. {
  14129. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14130. maidArray[6].transform.position.y,
  14131. maidArray[6].transform.position.z));
  14132. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14133. }
  14134. if (maidArray[9] && maidArray[9].Visible)
  14135. {
  14136. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14137. maidArray[8].transform.position.y,
  14138. maidArray[8].transform.position.z));
  14139. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14140. }
  14141. if (maidArray[11] && maidArray[11].Visible)
  14142. {
  14143. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14144. maidArray[10].transform.position.y,
  14145. maidArray[10].transform.position.z));
  14146. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14147. }
  14148. if (maidArray[13] && maidArray[13].Visible)
  14149. {
  14150. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14151. maidArray[12].transform.position.y,
  14152. maidArray[12].transform.position.z));
  14153. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14154. }
  14155. if (maidArray[2] && maidArray[2].Visible)
  14156. {
  14157. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14158. {
  14159. Vector3 vector = Vector3.zero;
  14160. vector.x = 0.6f;
  14161. maidArray[1].SetPos(vector);
  14162. if (maidArray[2] && maidArray[2].Visible)
  14163. {
  14164. vector.x = -0.6f;
  14165. maidArray[2].SetPos(vector);
  14166. }
  14167. if (maidArray[3] && maidArray[3].Visible)
  14168. {
  14169. vector.x = 1.2f;
  14170. maidArray[3].SetPos(vector);
  14171. }
  14172. if (maidArray[4] && maidArray[4].Visible)
  14173. {
  14174. vector.x = -1.2f;
  14175. maidArray[4].SetPos(vector);
  14176. }
  14177. if (maidArray[5] && maidArray[5].Visible)
  14178. {
  14179. vector.x = 1.8f;
  14180. maidArray[5].SetPos(vector);
  14181. }
  14182. if (maidArray[6] && maidArray[6].Visible)
  14183. {
  14184. vector.x = -1.8f;
  14185. maidArray[6].SetPos(vector);
  14186. }
  14187. if (maidArray[7] && maidArray[7].Visible)
  14188. {
  14189. vector.x = 2.4f;
  14190. maidArray[7].SetPos(vector);
  14191. }
  14192. if (maidArray[8] && maidArray[8].Visible)
  14193. {
  14194. vector.x = -2.4f;
  14195. maidArray[8].SetPos(vector);
  14196. }
  14197. if (maidArray[9] && maidArray[9].Visible)
  14198. {
  14199. vector.x = 3f;
  14200. maidArray[9].SetPos(vector);
  14201. }
  14202. if (maidArray[10] && maidArray[10].Visible)
  14203. {
  14204. vector.x = -3f;
  14205. maidArray[10].SetPos(vector);
  14206. }
  14207. if (maidArray[11] && maidArray[11].Visible)
  14208. {
  14209. vector.x = 3.6f;
  14210. maidArray[11].SetPos(vector);
  14211. }
  14212. if (maidArray[12] && maidArray[12].Visible)
  14213. {
  14214. vector.x = -3.6f;
  14215. maidArray[12].SetPos(vector);
  14216. }
  14217. if (maidArray[13] && maidArray[13].Visible)
  14218. {
  14219. vector.x = 4.2f;
  14220. maidArray[13].SetPos(vector);
  14221. }
  14222. }
  14223. }
  14224. isDance = true;
  14225. isDanceStart15 = true;
  14226. isSD1 = false;
  14227. }
  14228. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14229. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14230. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14231. || Input.GetKeyDown(KeyCode.Keypad0))
  14232. {
  14233. for (int j = 0; j < maidCnt; j++)
  14234. {
  14235. if (maidArray[j] && maidArray[j].Visible)
  14236. {
  14237. if (!isVR)
  14238. {
  14239. if (goSlot[(int)selectList[j]] != null)
  14240. {
  14241. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14242. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14243. {
  14244. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14245. }
  14246. }
  14247. }
  14248. }
  14249. }
  14250. }
  14251. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14252. {
  14253. if (h2Flg)
  14254. {
  14255. h2Flg = false;
  14256. }
  14257. else
  14258. {
  14259. string text4 = "";
  14260. if (wearIndex == 0)
  14261. {
  14262. text4 = "Underwear";
  14263. wearIndex = 1;
  14264. isWear = false;
  14265. isSkirt = false;
  14266. isBra = true;
  14267. isPanz = true;
  14268. isHeadset = false;
  14269. isGlove = false;
  14270. isStkg = true;
  14271. isShoes = false;
  14272. }
  14273. else if (wearIndex == 1)
  14274. {
  14275. text4 = "Nude";
  14276. wearIndex = 2;
  14277. isWear = false;
  14278. isSkirt = false;
  14279. isBra = false;
  14280. isPanz = false;
  14281. isHeadset = false;
  14282. isGlove = false;
  14283. isStkg = false;
  14284. isShoes = false;
  14285. }
  14286. else if (wearIndex == 2)
  14287. {
  14288. text4 = "None";
  14289. wearIndex = 0;
  14290. isWear = true;
  14291. isSkirt = true;
  14292. isBra = true;
  14293. isPanz = true;
  14294. isHeadset = true;
  14295. isGlove = true;
  14296. isStkg = true;
  14297. isShoes = true;
  14298. }
  14299. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14300. for (int j = 0; j < maidCnt; j++)
  14301. {
  14302. if (maidArray[j] && maidArray[j].Visible)
  14303. {
  14304. if (!isVR)
  14305. {
  14306. if (goSlot[(int)selectList[j]] != null)
  14307. {
  14308. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14309. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14310. {
  14311. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14312. }
  14313. }
  14314. }
  14315. maidArray[j].body0.SetMaskMode(maskMode);
  14316. }
  14317. }
  14318. }
  14319. }
  14320. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14321. {
  14322. quickSaveFlag = true;
  14323. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14324. try
  14325. {
  14326. thum_byte_to_base64_ = string.Empty;
  14327. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14328. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14329. }
  14330. catch { }
  14331. }
  14332. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14333. {
  14334. loadScene = 9999;
  14335. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14336. }
  14337. if (isScreen)
  14338. {
  14339. isScreen = false;
  14340. bGui = isGui;
  14341. isGui = false;
  14342. if (!isMessage)
  14343. {
  14344. foreach (UICamera uicamera in ui_cam_hide_list_)
  14345. {
  14346. uicamera.GetComponent<Camera>().enabled = true;
  14347. }
  14348. ui_cam_hide_list_.Clear();
  14349. }
  14350. else
  14351. {
  14352. if (editUI != null)
  14353. {
  14354. editUI.SetActive(true);
  14355. }
  14356. if (GameMain.Instance.CMSystem.ViewFps)
  14357. {
  14358. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14359. childObject.SetActive(true);
  14360. }
  14361. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14362. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14363. childObject2.SetActive(true);
  14364. childObject3.SetActive(true);
  14365. }
  14366. for (int j = 0; j < maidCnt; j++)
  14367. {
  14368. if (maidArray[j] && maidArray[j].Visible)
  14369. {
  14370. isBone[j] = isBoneN[j];
  14371. if (isBone[j])
  14372. {
  14373. gNeck[j].SetActive(true);
  14374. gSpine[j].SetActive(true);
  14375. gSpine0a[j].SetActive(true);
  14376. gSpine1a[j].SetActive(true);
  14377. gSpine1[j].SetActive(true);
  14378. gPelvis[j].SetActive(true);
  14379. gHandL[j].SetActive(true);
  14380. gArmL[j].SetActive(true);
  14381. gFootL[j].SetActive(true);
  14382. gHizaL[j].SetActive(true);
  14383. gHandR[j].SetActive(true);
  14384. gArmR[j].SetActive(true);
  14385. gFootR[j].SetActive(true);
  14386. gHizaR[j].SetActive(true);
  14387. gClavicleL[j].SetActive(true);
  14388. gClavicleR[j].SetActive(true);
  14389. }
  14390. }
  14391. }
  14392. }
  14393. if (isScreen2)
  14394. {
  14395. isScreen = true;
  14396. isScreen2 = false;
  14397. }
  14398. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14399. && !Input.GetKey(KeyCode.Q))
  14400. {
  14401. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14402. {
  14403. isScreen = true;
  14404. for (int j = 0; j < maidCnt; j++)
  14405. {
  14406. if (maidArray[j] && maidArray[j].Visible)
  14407. {
  14408. if (isBone[j])
  14409. {
  14410. gNeck[j].SetActive(false);
  14411. gSpine[j].SetActive(false);
  14412. gSpine0a[j].SetActive(false);
  14413. gSpine1a[j].SetActive(false);
  14414. gSpine1[j].SetActive(false);
  14415. gPelvis[j].SetActive(false);
  14416. gHandL[j].SetActive(false);
  14417. gArmL[j].SetActive(false);
  14418. gFootL[j].SetActive(false);
  14419. gHizaL[j].SetActive(false);
  14420. gHandR[j].SetActive(false);
  14421. gArmR[j].SetActive(false);
  14422. gFootR[j].SetActive(false);
  14423. gHizaR[j].SetActive(false);
  14424. gClavicleL[j].SetActive(false);
  14425. gClavicleR[j].SetActive(false);
  14426. }
  14427. isBoneN[j] = isBone[j];
  14428. isBone[j] = false;
  14429. }
  14430. }
  14431. if (!isMessage)
  14432. {
  14433. ui_cam_hide_list_.Clear();
  14434. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14435. foreach (UICamera uicamera2 in array16)
  14436. {
  14437. if (uicamera2.GetComponent<Camera>().enabled)
  14438. {
  14439. uicamera2.GetComponent<Camera>().enabled = false;
  14440. ui_cam_hide_list_.Add(uicamera2);
  14441. }
  14442. }
  14443. }
  14444. else
  14445. {
  14446. editUI = GameObject.Find("/UI Root/Camera");
  14447. if (editUI != null)
  14448. {
  14449. editUI.SetActive(false);
  14450. }
  14451. if (GameMain.Instance.CMSystem.ViewFps)
  14452. {
  14453. GameObject childObject =
  14454. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14455. childObject.SetActive(false);
  14456. }
  14457. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14458. GameObject childObject3 =
  14459. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14460. childObject2.SetActive(false);
  14461. childObject3.SetActive(false);
  14462. }
  14463. isGui = bGui;
  14464. bGui = false;
  14465. GameMain.Instance.MainCamera.ScreenShot(false);
  14466. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14467. }
  14468. }
  14469. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14470. {
  14471. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14472. keyFlg2 = true;
  14473. }
  14474. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14475. {
  14476. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14477. keyFlg2 = true;
  14478. }
  14479. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14480. {
  14481. mainCameraTransform.eulerAngles =
  14482. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14483. keyFlg2 = true;
  14484. }
  14485. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14486. {
  14487. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14488. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14489. mainCamera.SetDistance(3f, true);
  14490. keyFlg2 = true;
  14491. }
  14492. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14493. {
  14494. cameraIti = mainCamera.GetTargetPos();
  14495. cameraIti2 = mainCamera.GetPos();
  14496. cameraItiAngle = mainCamera.transform.eulerAngles;
  14497. cameraItiDistance = mainCamera.GetDistance();
  14498. keyFlg2 = true;
  14499. }
  14500. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14501. {
  14502. mainCamera.SetTargetPos(cameraIti, true);
  14503. mainCamera.SetPos(cameraIti2);
  14504. mainCamera.transform.eulerAngles = cameraItiAngle;
  14505. mainCamera.SetDistance(cameraItiDistance, true);
  14506. keyFlg2 = true;
  14507. }
  14508. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14509. {
  14510. if (keyFlg2)
  14511. {
  14512. keyFlg2 = false;
  14513. }
  14514. else
  14515. {
  14516. effectIndex++;
  14517. if (effectIndex == 9)
  14518. {
  14519. kami.SetActive(false);
  14520. effectIndex = 0;
  14521. }
  14522. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14523. if (!isBlur)
  14524. {
  14525. component3.mode = Vignetting.AberrationMode.Simple;
  14526. component3.intensity = -3.98f;
  14527. component3.chromaticAberration = -0.75f;
  14528. component3.axialAberration = 1.18f;
  14529. component3.blurSpread = 4.19f;
  14530. component3.luminanceDependency = 0.494f;
  14531. component3.blurDistance = 1.71f;
  14532. component3.enabled = false;
  14533. }
  14534. if (kami) { }
  14535. if (effectIndex == 0)
  14536. {
  14537. component3.enabled = false;
  14538. }
  14539. if (effectIndex == 1)
  14540. {
  14541. component3.mode = Vignetting.AberrationMode.Simple;
  14542. component3.intensity = -1f;
  14543. component3.chromaticAberration = 0f;
  14544. component3.axialAberration = 0f;
  14545. component3.blurSpread = 5f;
  14546. component3.luminanceDependency = 0f;
  14547. component3.blurDistance = 0f;
  14548. component3.enabled = true;
  14549. }
  14550. if (effectIndex == 2)
  14551. {
  14552. component3.enabled = true;
  14553. }
  14554. if (effectIndex == 3)
  14555. {
  14556. component3.mode = Vignetting.AberrationMode.Simple;
  14557. component3.intensity = 9f;
  14558. component3.chromaticAberration = 0f;
  14559. component3.axialAberration = 0f;
  14560. component3.blurSpread = 5f;
  14561. component3.luminanceDependency = 0f;
  14562. component3.blurDistance = 0f;
  14563. component3.enabled = true;
  14564. }
  14565. if (effectIndex == 4)
  14566. {
  14567. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14568. kami = (GameObject)Instantiate(@object);
  14569. Vector3 localPosition = kami.transform.localPosition;
  14570. localPosition.y = 3.5f;
  14571. kami.transform.localPosition = localPosition;
  14572. }
  14573. if (effectIndex == 5)
  14574. {
  14575. component3.enabled = true;
  14576. component3.mode = Vignetting.AberrationMode.Simple;
  14577. component3.intensity = -2.5f;
  14578. component3.chromaticAberration = -0.3f;
  14579. component3.axialAberration = 0.5f;
  14580. component3.blurSpread = 4.5f;
  14581. component3.luminanceDependency = 0.2f;
  14582. component3.blurDistance = 0.8f;
  14583. component3.enabled = true;
  14584. }
  14585. if (effectIndex == 6)
  14586. {
  14587. kami.SetActive(false);
  14588. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14589. kami = (GameObject)Instantiate(@object);
  14590. Vector3 localPosition = kami.transform.localPosition;
  14591. localPosition.y = 3.5f;
  14592. kami.transform.localPosition = localPosition;
  14593. }
  14594. if (effectIndex == 7)
  14595. {
  14596. component3.enabled = true;
  14597. component3.mode = Vignetting.AberrationMode.Simple;
  14598. component3.intensity = -2.5f;
  14599. component3.chromaticAberration = -0.3f;
  14600. component3.axialAberration = 0.5f;
  14601. component3.blurSpread = 4.5f;
  14602. component3.luminanceDependency = 0.2f;
  14603. component3.blurDistance = 0.8f;
  14604. component3.enabled = true;
  14605. }
  14606. if (effectIndex == 8)
  14607. {
  14608. component3.mode = Vignetting.AberrationMode.Simple;
  14609. component3.intensity = 8f;
  14610. component3.chromaticAberration = 0f;
  14611. component3.axialAberration = 0f;
  14612. component3.blurSpread = 5f;
  14613. component3.luminanceDependency = 0f;
  14614. component3.blurDistance = 0f;
  14615. component3.enabled = true;
  14616. }
  14617. }
  14618. }
  14619. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14620. {
  14621. qFlg = false;
  14622. }
  14623. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14624. {
  14625. bool flag5 = false;
  14626. for (int k = 0; k < keyArray.Length; k++)
  14627. {
  14628. if (Input.GetKey(keyArray[k]))
  14629. {
  14630. flag5 = true;
  14631. break;
  14632. }
  14633. }
  14634. if (!getModKeyPressing(modKey.Shift))
  14635. {
  14636. if (!flag5)
  14637. {
  14638. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14639. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14640. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14641. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14642. {
  14643. Vector3 vector = softG;
  14644. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14645. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14646. softG = vector;
  14647. }
  14648. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14649. {
  14650. Vector3 vector = softG;
  14651. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14652. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14653. softG = vector;
  14654. }
  14655. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14656. {
  14657. Vector3 vector = softG;
  14658. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14659. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14660. softG = vector;
  14661. }
  14662. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14663. {
  14664. Vector3 vector = softG;
  14665. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14666. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14667. softG = vector;
  14668. }
  14669. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14670. {
  14671. Vector3 vector = softG;
  14672. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14673. softG = vector;
  14674. }
  14675. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14676. {
  14677. Vector3 vector = softG;
  14678. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14679. softG = vector;
  14680. }
  14681. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14682. {
  14683. Vector3 vector = softG;
  14684. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14685. softG = vector;
  14686. }
  14687. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14688. {
  14689. Vector3 vector = softG;
  14690. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14691. softG = vector;
  14692. }
  14693. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14694. {
  14695. Vector3 vector = softG;
  14696. vector.y += 6E-05f * speed;
  14697. softG = vector;
  14698. }
  14699. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14700. {
  14701. Vector3 vector = softG;
  14702. vector.y -= 6E-05f * speed;
  14703. softG = vector;
  14704. }
  14705. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14706. {
  14707. softG = new Vector3(0f, -0.003f, 0f);
  14708. }
  14709. for (int j = 0; j < maidCnt; j++)
  14710. {
  14711. Maid maid = maidArray[j];
  14712. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14713. {
  14714. if (maid.body0.goSlot[l].obj != null)
  14715. {
  14716. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14717. if (component2 != null && component2.enabled)
  14718. {
  14719. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14720. }
  14721. }
  14722. List<THair1> fieldValue3 =
  14723. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14724. for (int k = 0; k < fieldValue3.Count; k++)
  14725. {
  14726. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14727. }
  14728. }
  14729. }
  14730. }
  14731. }
  14732. else if (!flag5)
  14733. {
  14734. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14735. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14736. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14737. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14738. {
  14739. Vector3 vector = softG2;
  14740. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14741. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14742. softG2 = vector;
  14743. }
  14744. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14745. {
  14746. Vector3 vector = softG2;
  14747. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14748. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14749. softG2 = vector;
  14750. }
  14751. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14752. {
  14753. Vector3 vector = softG2;
  14754. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14755. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14756. softG2 = vector;
  14757. }
  14758. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14759. {
  14760. Vector3 vector = softG2;
  14761. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14762. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14763. softG2 = vector;
  14764. }
  14765. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14766. {
  14767. Vector3 vector = softG2;
  14768. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14769. softG2 = vector;
  14770. }
  14771. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14772. {
  14773. Vector3 vector = softG2;
  14774. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14775. softG2 = vector;
  14776. }
  14777. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14778. {
  14779. Vector3 vector = softG2;
  14780. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14781. softG2 = vector;
  14782. }
  14783. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14784. {
  14785. Vector3 vector = softG2;
  14786. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14787. softG2 = vector;
  14788. }
  14789. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14790. {
  14791. Vector3 vector = softG2;
  14792. vector.y += 2E-05f * speed;
  14793. softG2 = vector;
  14794. }
  14795. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14796. {
  14797. Vector3 vector = softG2;
  14798. vector.y -= 2E-05f * speed;
  14799. softG2 = vector;
  14800. }
  14801. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14802. {
  14803. softG2 = new Vector3(0f, -0.005f, 0f);
  14804. }
  14805. for (int j = 0; j < maidCnt; j++)
  14806. {
  14807. Maid maid = maidArray[j];
  14808. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14809. {
  14810. if (maid.body0.goSlot[l].obj != null)
  14811. {
  14812. DynamicSkirtBone fieldValue8 =
  14813. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14814. "m_SkirtBone");
  14815. if (fieldValue8 != null)
  14816. {
  14817. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14818. fieldValue8.UpdateParameters();
  14819. }
  14820. }
  14821. }
  14822. }
  14823. }
  14824. }
  14825. if (!isVR)
  14826. {
  14827. if (doguObject.Count > 0)
  14828. {
  14829. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14830. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14831. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14832. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14833. {
  14834. idoFlg2 = true;
  14835. doguObject[doguSelectIndex].transform.localScale =
  14836. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14837. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14838. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14839. }
  14840. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14841. {
  14842. idoFlg2 = true;
  14843. doguObject[doguSelectIndex].transform.localScale =
  14844. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14845. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14846. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14847. }
  14848. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14849. {
  14850. idoFlg2 = true;
  14851. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14852. }
  14853. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14854. {
  14855. doguObject[doguSelectIndex]
  14856. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14857. idoFlg2 = true;
  14858. }
  14859. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14860. {
  14861. doguObject[doguSelectIndex]
  14862. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14863. idoFlg2 = true;
  14864. }
  14865. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14866. && getModKeyPressing(modKey.Alt))
  14867. {
  14868. for (int k = 0; k < 10; k++)
  14869. {
  14870. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14871. Vector3.right,
  14872. -doguObject[doguSelectIndex]
  14873. .transform.rotation.eulerAngles.x);
  14874. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14875. Vector3.forward,
  14876. -doguObject[doguSelectIndex]
  14877. .transform.rotation.eulerAngles.z);
  14878. }
  14879. idoFlg2 = true;
  14880. Vector3 vector = Vector3.zero;
  14881. Vector3 zero3 = Vector3.zero;
  14882. zero3.x = -90f;
  14883. int num12 = doguIndex[doguSelectIndex];
  14884. switch (num12)
  14885. {
  14886. case 3:
  14887. vector.z = 0.5f;
  14888. zero3.z = 90f;
  14889. break;
  14890. case 4:
  14891. case 5:
  14892. case 7:
  14893. case 10:
  14894. case 11: break;
  14895. case 6:
  14896. vector.z = 0.6f;
  14897. zero3.x = 0f;
  14898. break;
  14899. case 8:
  14900. vector.z = 0.5f;
  14901. zero3.x = 0f;
  14902. break;
  14903. case 9:
  14904. vector.z = 0.32f;
  14905. zero3.z = 180f;
  14906. break;
  14907. case 12:
  14908. vector.z = 0.5f;
  14909. zero3.z = 180f;
  14910. break;
  14911. case 13:
  14912. vector.z = 0.7f;
  14913. zero3.z = 180f;
  14914. break;
  14915. default:
  14916. if (num12 != 16)
  14917. {
  14918. switch (num12)
  14919. {
  14920. case 23:
  14921. vector.z = 2.7f;
  14922. vector.x = 0.77f;
  14923. zero3.z = 90f;
  14924. break;
  14925. case 25:
  14926. vector.z = 0.5f;
  14927. vector.y = 0.9f;
  14928. zero3.z = 180f;
  14929. break;
  14930. case 26:
  14931. vector.z = 0.5f;
  14932. vector.y = 0.9f;
  14933. zero3.z = 180f;
  14934. break;
  14935. case 30:
  14936. vector.z = 0f;
  14937. zero3.z = 0f;
  14938. break;
  14939. case 31:
  14940. vector.z = -0.6f;
  14941. vector.y = 0.96f;
  14942. zero3.z = 180f;
  14943. break;
  14944. case 32:
  14945. vector.z = -0.6f;
  14946. vector.y = 0.96f;
  14947. zero3.z = 180f;
  14948. break;
  14949. case 33:
  14950. vector.z = -0.6f;
  14951. vector.y = 0.85f;
  14952. zero3.z = 180f;
  14953. break;
  14954. }
  14955. }
  14956. else
  14957. {
  14958. vector.z = -0.4f;
  14959. zero3.z = 180f;
  14960. }
  14961. break;
  14962. }
  14963. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14964. }
  14965. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14966. && Input.GetKey(KeyCode.J))
  14967. {
  14968. doguObject[doguSelectIndex]
  14969. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14970. new Vector3(vector3.x, 0f, vector3.z),
  14971. 0.3f);
  14972. doguObject[doguSelectIndex]
  14973. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14974. new Vector3(vector2.x, 0f, vector2.z),
  14975. 0.3f);
  14976. idoFlg2 = true;
  14977. }
  14978. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14979. && Input.GetKey(KeyCode.L))
  14980. {
  14981. doguObject[doguSelectIndex]
  14982. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14983. new Vector3(vector3.x, 0f, vector3.z),
  14984. 0.3f);
  14985. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14986. new Vector3(vector2.x, 0f, vector2.z),
  14987. -0.3f);
  14988. idoFlg2 = true;
  14989. }
  14990. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14991. && Input.GetKey(KeyCode.J))
  14992. {
  14993. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14994. new Vector3(vector3.x, 0f, vector3.z),
  14995. -0.3f);
  14996. doguObject[doguSelectIndex]
  14997. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14998. new Vector3(vector2.x, 0f, vector2.z),
  14999. 0.3f);
  15000. idoFlg2 = true;
  15001. }
  15002. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15003. && Input.GetKey(KeyCode.L))
  15004. {
  15005. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15006. new Vector3(vector3.x, 0f, vector3.z),
  15007. -0.3f);
  15008. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15009. new Vector3(vector2.x, 0f, vector2.z),
  15010. -0.3f);
  15011. idoFlg2 = true;
  15012. }
  15013. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15014. {
  15015. doguObject[doguSelectIndex]
  15016. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15017. new Vector3(vector3.x, 0f, vector3.z),
  15018. 0.4f);
  15019. idoFlg2 = true;
  15020. }
  15021. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15022. {
  15023. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15024. new Vector3(vector3.x, 0f, vector3.z),
  15025. -0.4f);
  15026. idoFlg2 = true;
  15027. }
  15028. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15029. {
  15030. doguObject[doguSelectIndex]
  15031. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15032. new Vector3(vector2.x, 0f, vector2.z),
  15033. 0.4f);
  15034. idoFlg2 = true;
  15035. }
  15036. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15037. {
  15038. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15039. new Vector3(vector2.x, 0f, vector2.z),
  15040. -0.4f);
  15041. idoFlg2 = true;
  15042. }
  15043. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15044. {
  15045. doguObject[doguSelectIndex].transform.localRotation =
  15046. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15047. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15048. idoFlg2 = true;
  15049. }
  15050. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15051. {
  15052. doguObject[doguSelectIndex].transform.localRotation =
  15053. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15054. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15055. idoFlg2 = true;
  15056. }
  15057. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15058. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15059. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15060. {
  15061. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15062. new Vector3(vector3.x, 0f, vector3.z),
  15063. -0.7f);
  15064. idoFlg2 = true;
  15065. }
  15066. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15067. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15068. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15069. {
  15070. doguObject[doguSelectIndex]
  15071. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15072. new Vector3(vector3.x, 0f, vector3.z),
  15073. 0.7f);
  15074. idoFlg2 = true;
  15075. }
  15076. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15077. && (Input.GetKey(KeyCode.Minus)
  15078. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15079. {
  15080. doguObject[doguSelectIndex]
  15081. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15082. new Vector3(vector2.x, 0f, vector2.z),
  15083. 0.7f);
  15084. idoFlg2 = true;
  15085. }
  15086. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15087. && (Input.GetKey(KeyCode.Quote)
  15088. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15089. {
  15090. doguObject[doguSelectIndex].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) && Input.GetKey(KeyCode.I)
  15096. && Input.GetKey(KeyCode.J))
  15097. {
  15098. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15099. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15100. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15101. doguObject[doguSelectIndex].transform.localPosition = vector;
  15102. idoFlg2 = true;
  15103. }
  15104. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15105. && Input.GetKey(KeyCode.L))
  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.K)
  15114. && Input.GetKey(KeyCode.J))
  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.L))
  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.I))
  15132. {
  15133. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15134. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15135. doguObject[doguSelectIndex].transform.localPosition = vector;
  15136. idoFlg2 = true;
  15137. }
  15138. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15139. {
  15140. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15141. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15142. doguObject[doguSelectIndex].transform.localPosition = vector;
  15143. idoFlg2 = true;
  15144. }
  15145. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15146. {
  15147. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15148. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15149. doguObject[doguSelectIndex].transform.localPosition = vector;
  15150. idoFlg2 = true;
  15151. }
  15152. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15153. {
  15154. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15155. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15156. doguObject[doguSelectIndex].transform.localPosition = vector;
  15157. idoFlg2 = true;
  15158. }
  15159. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15160. {
  15161. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15162. vector.y += 0.0075f * speed;
  15163. doguObject[doguSelectIndex].transform.localPosition = vector;
  15164. idoFlg2 = true;
  15165. }
  15166. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15167. {
  15168. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15169. vector.y -= 0.0075f * speed;
  15170. doguObject[doguSelectIndex].transform.localPosition = vector;
  15171. idoFlg2 = true;
  15172. }
  15173. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15174. {
  15175. idoFlg2 = true;
  15176. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15177. {
  15178. Destroy(doguObject[doguSelectIndex]);
  15179. doguObject.RemoveAt(doguSelectIndex);
  15180. }
  15181. doguIndex.RemoveAt(doguSelectIndex);
  15182. doguSelectIndex = 0;
  15183. }
  15184. }
  15185. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15186. {
  15187. idoFlg2 = true;
  15188. if (doguSelectIndex == doguObject.Count)
  15189. {
  15190. doguIndex.Add(0);
  15191. }
  15192. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15193. {
  15194. Destroy(doguObject[doguSelectIndex]);
  15195. doguObject.RemoveAt(doguSelectIndex);
  15196. }
  15197. else
  15198. {
  15199. doguIndex.Add(0);
  15200. doguSelectIndex = doguIndex.Count - 1;
  15201. }
  15202. List<int> list2;
  15203. int index;
  15204. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15205. if (doguIndex[doguSelectIndex] <= -1)
  15206. {
  15207. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15208. }
  15209. if (doguIndex[doguSelectIndex] > 0)
  15210. {
  15211. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15212. {
  15213. Object @object = null;
  15214. for (int j = 0; j < 5; j++)
  15215. {
  15216. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15217. if (@object != null)
  15218. {
  15219. break;
  15220. }
  15221. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15222. }
  15223. doguObject.Add(Instantiate(@object) as GameObject);
  15224. }
  15225. else
  15226. {
  15227. Material material = new Material(Shader.Find("Mirror"));
  15228. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15229. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15230. gameObject7.GetComponent<Renderer>().material = material;
  15231. gameObject7.AddComponent<MirrorReflection2>();
  15232. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15233. component5.m_TextureSize = 2048;
  15234. component5.m_ClipPlaneOffset = 0f;
  15235. gameObject7.GetComponent<Renderer>().enabled = true;
  15236. doguObject.Add(gameObject7);
  15237. }
  15238. Vector3 vector = Vector3.zero;
  15239. Vector3 zero3 = Vector3.zero;
  15240. zero3.x = -90f;
  15241. switch (doguIndex[doguSelectIndex])
  15242. {
  15243. case 1:
  15244. vector.z = -0.5f;
  15245. goto IL_344DC;
  15246. case 2:
  15247. vector.z = -0.5f;
  15248. goto IL_344DC;
  15249. case 3:
  15250. vector.z = 0.5f;
  15251. zero3.z = 90f;
  15252. goto IL_344DC;
  15253. case 4:
  15254. vector.z = 0.9f;
  15255. goto IL_344DC;
  15256. case 5:
  15257. vector.z = 0.9f;
  15258. goto IL_344DC;
  15259. case 6:
  15260. vector.z = 0.6f;
  15261. zero3.x = 0f;
  15262. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15263. goto IL_344DC;
  15264. case 7:
  15265. vector.z = 0.6f;
  15266. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15267. goto IL_344DC;
  15268. case 8:
  15269. vector.z = 0.5f;
  15270. zero3.x = 0f;
  15271. goto IL_344DC;
  15272. case 9:
  15273. vector.z = 0.32f;
  15274. zero3.z = 180f;
  15275. goto IL_344DC;
  15276. case 10:
  15277. vector.z = 0.6f;
  15278. goto IL_344DC;
  15279. case 11:
  15280. vector.z = 0.6f;
  15281. goto IL_344DC;
  15282. case 12:
  15283. vector.z = 0.5f;
  15284. zero3.z = 180f;
  15285. goto IL_344DC;
  15286. case 13:
  15287. vector.z = 0.7f;
  15288. zero3.z = 180f;
  15289. goto IL_344DC;
  15290. case 14:
  15291. vector.z = -0.4f;
  15292. goto IL_344DC;
  15293. case 15:
  15294. vector.z = -0.4f;
  15295. goto IL_344DC;
  15296. case 16:
  15297. vector.z = -0.4f;
  15298. zero3.z = 180f;
  15299. goto IL_344DC;
  15300. case 17:
  15301. vector.z = -0.4f;
  15302. goto IL_344DC;
  15303. case 18:
  15304. vector.z = -0.2f;
  15305. goto IL_344DC;
  15306. case 19:
  15307. vector.z = 0f;
  15308. goto IL_344DC;
  15309. case 20:
  15310. vector.z = 3.4f;
  15311. vector.x = -1f;
  15312. goto IL_344DC;
  15313. case 21:
  15314. vector.z = 3.4f;
  15315. vector.x = -1f;
  15316. goto IL_344DC;
  15317. case 22:
  15318. vector.z = 3.4f;
  15319. vector.y = 0.3f;
  15320. vector.x = -1f;
  15321. goto IL_344DC;
  15322. case 23:
  15323. vector.z = 2.7f;
  15324. vector.x = 0.77f;
  15325. zero3.z = 90f;
  15326. goto IL_344DC;
  15327. case 25:
  15328. vector.z = 0.5f;
  15329. vector.y = 0.9f;
  15330. zero3.z = 180f;
  15331. goto IL_344DC;
  15332. case 26:
  15333. vector.z = 0.5f;
  15334. vector.y = 0.9f;
  15335. zero3.z = 180f;
  15336. goto IL_344DC;
  15337. case 29:
  15338. vector.z = 0.5f;
  15339. vector.x = -1.05f;
  15340. goto IL_344DC;
  15341. case 30:
  15342. vector.z = -2.8f;
  15343. zero3.z = 0f;
  15344. zero3.x = 0f;
  15345. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15346. goto IL_344DC;
  15347. case 31:
  15348. vector.z = -0.6f;
  15349. vector.y = 0.96f;
  15350. zero3.z = 180f;
  15351. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15352. goto IL_344DC;
  15353. case 32:
  15354. vector.z = -0.6f;
  15355. vector.y = 0.96f;
  15356. zero3.z = 180f;
  15357. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15358. goto IL_344DC;
  15359. case 33:
  15360. vector.z = -0.6f;
  15361. vector.y = 0.85f;
  15362. zero3.z = 180f;
  15363. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15364. goto IL_344DC;
  15365. }
  15366. vector.z = 0.5f;
  15367. IL_344DC:
  15368. doguObject[doguSelectIndex].transform.localPosition = vector;
  15369. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15370. }
  15371. if (doguIndex[doguSelectIndex] == 0)
  15372. {
  15373. doguIndex.RemoveAt(doguSelectIndex);
  15374. }
  15375. }
  15376. else if (Input.GetKeyDown(KeyCode.W))
  15377. {
  15378. for (int k = 0; k < keyArray.Length; k++)
  15379. {
  15380. if (Input.GetKey(keyArray[k]))
  15381. {
  15382. wFlg = true;
  15383. break;
  15384. }
  15385. }
  15386. }
  15387. else if (Input.GetKeyUp(KeyCode.W))
  15388. {
  15389. if (wFlg)
  15390. {
  15391. wFlg = false;
  15392. }
  15393. else if (idoFlg2)
  15394. {
  15395. idoFlg2 = false;
  15396. }
  15397. else
  15398. {
  15399. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15400. {
  15401. Destroy(doguObject[doguSelectIndex]);
  15402. doguObject.RemoveAt(doguSelectIndex);
  15403. }
  15404. else
  15405. {
  15406. doguIndex.Add(0);
  15407. doguSelectIndex = doguIndex.Count - 1;
  15408. }
  15409. List<int> list2;
  15410. int index;
  15411. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15412. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15413. {
  15414. doguIndex[doguSelectIndex] = 0;
  15415. }
  15416. if (doguIndex[doguSelectIndex] > 0)
  15417. {
  15418. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15419. {
  15420. Object @object = null;
  15421. for (int j = 0; j < 5; j++)
  15422. {
  15423. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15424. if (@object != null)
  15425. {
  15426. break;
  15427. }
  15428. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15429. }
  15430. doguObject.Add(Instantiate(@object) as GameObject);
  15431. }
  15432. else
  15433. {
  15434. Material material = new Material(Shader.Find("Mirror"));
  15435. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15436. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15437. gameObject7.GetComponent<Renderer>().material = material;
  15438. gameObject7.AddComponent<MirrorReflection2>();
  15439. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15440. component5.m_TextureSize = 2048;
  15441. component5.m_ClipPlaneOffset = 0f;
  15442. gameObject7.GetComponent<Renderer>().enabled = true;
  15443. doguObject.Add(gameObject7);
  15444. }
  15445. Vector3 vector = Vector3.zero;
  15446. Vector3 zero3 = Vector3.zero;
  15447. zero3.x = -90f;
  15448. switch (doguIndex[doguSelectIndex])
  15449. {
  15450. case 1:
  15451. vector.z = -0.5f;
  15452. goto IL_34D66;
  15453. case 2:
  15454. vector.z = -0.5f;
  15455. goto IL_34D66;
  15456. case 3:
  15457. vector.z = 0.5f;
  15458. zero3.z = 90f;
  15459. goto IL_34D66;
  15460. case 4:
  15461. vector.z = 0.9f;
  15462. goto IL_34D66;
  15463. case 5:
  15464. vector.z = 0.9f;
  15465. goto IL_34D66;
  15466. case 6:
  15467. vector.z = 0.6f;
  15468. zero3.x = 0f;
  15469. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15470. goto IL_34D66;
  15471. case 7:
  15472. vector.z = 0.6f;
  15473. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15474. goto IL_34D66;
  15475. case 8:
  15476. vector.z = 0.5f;
  15477. zero3.x = 0f;
  15478. goto IL_34D66;
  15479. case 9:
  15480. vector.z = 0.32f;
  15481. zero3.z = 180f;
  15482. goto IL_34D66;
  15483. case 10:
  15484. vector.z = 0.6f;
  15485. goto IL_34D66;
  15486. case 11:
  15487. vector.z = 0.6f;
  15488. goto IL_34D66;
  15489. case 12:
  15490. vector.z = 0.5f;
  15491. zero3.z = 180f;
  15492. goto IL_34D66;
  15493. case 13:
  15494. vector.z = 0.7f;
  15495. zero3.z = 180f;
  15496. goto IL_34D66;
  15497. case 14:
  15498. vector.z = -0.4f;
  15499. goto IL_34D66;
  15500. case 15:
  15501. vector.z = -0.4f;
  15502. goto IL_34D66;
  15503. case 16:
  15504. vector.z = -0.4f;
  15505. zero3.z = 180f;
  15506. goto IL_34D66;
  15507. case 17:
  15508. vector.z = -0.4f;
  15509. goto IL_34D66;
  15510. case 18:
  15511. vector.z = -0.2f;
  15512. goto IL_34D66;
  15513. case 19:
  15514. vector.z = 0f;
  15515. goto IL_34D66;
  15516. case 20:
  15517. vector.z = 3.4f;
  15518. vector.x = -1f;
  15519. goto IL_34D66;
  15520. case 21:
  15521. vector.z = 3.4f;
  15522. vector.x = -1f;
  15523. goto IL_34D66;
  15524. case 22:
  15525. vector.z = 3.4f;
  15526. vector.y = 0.3f;
  15527. vector.x = -1f;
  15528. goto IL_34D66;
  15529. case 23:
  15530. vector.z = 2.7f;
  15531. vector.x = 0.77f;
  15532. zero3.z = 90f;
  15533. goto IL_34D66;
  15534. case 25:
  15535. vector.z = 0.5f;
  15536. vector.y = 0.9f;
  15537. zero3.z = 180f;
  15538. goto IL_34D66;
  15539. case 26:
  15540. vector.z = 0.5f;
  15541. vector.y = 0.9f;
  15542. zero3.z = 180f;
  15543. goto IL_34D66;
  15544. case 29:
  15545. vector.z = 0.5f;
  15546. vector.x = -1.05f;
  15547. goto IL_34D66;
  15548. case 30:
  15549. vector.z = -2.8f;
  15550. zero3.z = 0f;
  15551. zero3.x = 0f;
  15552. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15553. goto IL_34D66;
  15554. case 31:
  15555. vector.z = -0.6f;
  15556. vector.y = 0.96f;
  15557. zero3.z = 180f;
  15558. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15559. goto IL_34D66;
  15560. case 32:
  15561. vector.z = -0.6f;
  15562. vector.y = 0.96f;
  15563. zero3.z = 180f;
  15564. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15565. goto IL_34D66;
  15566. case 33:
  15567. vector.z = -0.6f;
  15568. vector.y = 0.85f;
  15569. zero3.z = 180f;
  15570. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15571. goto IL_34D66;
  15572. }
  15573. vector.z = 0.5f;
  15574. IL_34D66:;
  15575. }
  15576. if (doguIndex[doguSelectIndex] == 0)
  15577. {
  15578. doguIndex.RemoveAt(doguSelectIndex);
  15579. }
  15580. }
  15581. }
  15582. }
  15583. if (!isVR)
  15584. {
  15585. int i;
  15586. for (i = 0; i < 999; i++)
  15587. {
  15588. if (gDogu[i] != null)
  15589. {
  15590. gDogu[i].GetComponent<Renderer>().enabled = false;
  15591. gDogu[i].SetActive(false);
  15592. if (mDogu[i].del)
  15593. {
  15594. mDogu[i].del = false;
  15595. Destroy(doguBObject[i]);
  15596. doguBObject.RemoveAt(i);
  15597. }
  15598. else if (mDogu[i].count > 0)
  15599. {
  15600. mDogu[i].count--;
  15601. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15602. {
  15603. if (mDogu[i].count == 1)
  15604. {
  15605. doguBObject[i].SetActive(false);
  15606. }
  15607. if (mDogu[i].count == 0)
  15608. {
  15609. doguBObject[i].SetActive(true);
  15610. string name = doguBObject[i].name;
  15611. if (name != null)
  15612. {
  15613. if (!(name == "Particle/pLineY"))
  15614. {
  15615. if (!(name == "Particle/pLineP02"))
  15616. {
  15617. if (!(name == "Particle/pLine_act2"))
  15618. {
  15619. if (name == "Particle/pHeart01")
  15620. {
  15621. mDogu[i].count = 77;
  15622. }
  15623. }
  15624. else
  15625. {
  15626. mDogu[i].count = 90;
  15627. }
  15628. }
  15629. else
  15630. {
  15631. mDogu[i].count = 115;
  15632. }
  15633. }
  15634. else
  15635. {
  15636. mDogu[i].count = 180;
  15637. }
  15638. }
  15639. }
  15640. }
  15641. }
  15642. }
  15643. }
  15644. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15645. {
  15646. ikMode2 = 11;
  15647. }
  15648. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15649. {
  15650. ikMode2 = 12;
  15651. }
  15652. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15653. {
  15654. ikMode2 = 14;
  15655. }
  15656. else if (Input.GetKey(KeyCode.X))
  15657. {
  15658. ikMode2 = 9;
  15659. }
  15660. else if (Input.GetKey(KeyCode.Z))
  15661. {
  15662. ikMode2 = 10;
  15663. }
  15664. else if (Input.GetKey(KeyCode.C))
  15665. {
  15666. ikMode2 = 13;
  15667. }
  15668. else if (Input.GetKey(KeyCode.D))
  15669. {
  15670. ikMode2 = 15;
  15671. }
  15672. else
  15673. {
  15674. ikMode2 = 0;
  15675. }
  15676. if (gBg != null)
  15677. {
  15678. if (!isCube3)
  15679. {
  15680. gBg.GetComponent<Renderer>().enabled = false;
  15681. gBg.SetActive(false);
  15682. }
  15683. else
  15684. {
  15685. if (ikMode2 > 0 && ikMode2 != 15)
  15686. {
  15687. gBg.GetComponent<Renderer>().enabled = true;
  15688. gBg.SetActive(true);
  15689. }
  15690. else
  15691. {
  15692. gBg.GetComponent<Renderer>().enabled = false;
  15693. gBg.SetActive(false);
  15694. }
  15695. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15696. {
  15697. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15698. }
  15699. if (ikMode2 == 9 || ikMode2 == 14)
  15700. {
  15701. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15702. mBg.Update();
  15703. }
  15704. if (ikMode2 == 13)
  15705. {
  15706. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15707. mBg.Update();
  15708. }
  15709. if (ikMode2 == 13)
  15710. {
  15711. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15712. {
  15713. mBg.ido = 5;
  15714. mBg.reset = true;
  15715. }
  15716. else
  15717. {
  15718. gBg.transform.position = bg.position;
  15719. gBg.transform.eulerAngles = bg.eulerAngles;
  15720. mBg.maid = bgObject;
  15721. mBg.ido = 5;
  15722. }
  15723. }
  15724. else if (ikMode2 == 11)
  15725. {
  15726. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15727. {
  15728. mBg.ido = 3;
  15729. mBg.reset = true;
  15730. }
  15731. else
  15732. {
  15733. gBg.transform.position = bg.position;
  15734. gBg.transform.eulerAngles = bg.eulerAngles;
  15735. mBg.maid = bgObject;
  15736. mBg.ido = 3;
  15737. }
  15738. }
  15739. else if (ikMode2 == 12)
  15740. {
  15741. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15742. {
  15743. mBg.ido = 2;
  15744. mBg.reset = true;
  15745. }
  15746. else
  15747. {
  15748. gBg.transform.position = bg.position;
  15749. gBg.transform.eulerAngles = bg.eulerAngles;
  15750. mBg.maid = bgObject;
  15751. mBg.ido = 2;
  15752. }
  15753. }
  15754. else if (ikMode2 == 10)
  15755. {
  15756. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15757. {
  15758. mBg.ido = 1;
  15759. mBg.reset = true;
  15760. }
  15761. else
  15762. {
  15763. gBg.transform.position = bg.position;
  15764. gBg.transform.eulerAngles = bg.eulerAngles;
  15765. mBg.maid = bgObject;
  15766. mBg.ido = 1;
  15767. }
  15768. }
  15769. else if (ikMode2 == 9)
  15770. {
  15771. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15772. {
  15773. mBg.ido = 4;
  15774. mBg.reset = true;
  15775. }
  15776. else
  15777. {
  15778. gBg.transform.position = bg.position;
  15779. gBg.transform.eulerAngles = bg.eulerAngles;
  15780. mBg.maid = bgObject;
  15781. mBg.ido = 4;
  15782. }
  15783. }
  15784. else if (ikMode2 == 14)
  15785. {
  15786. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15787. {
  15788. mBg.ido = 6;
  15789. mBg.reset = true;
  15790. }
  15791. else
  15792. {
  15793. gBg.transform.position = bg.position;
  15794. gBg.transform.eulerAngles = bg.eulerAngles;
  15795. mBg.maid = bgObject;
  15796. mBg.ido = 6;
  15797. }
  15798. }
  15799. }
  15800. }
  15801. for (i = 0; i < lightIndex.Count; i++)
  15802. {
  15803. if (gLight[0] == null)
  15804. {
  15805. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15806. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15807. {
  15808. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15809. };
  15810. gLight[0].GetComponent<Renderer>().material = material2;
  15811. gLight[0].layer = 8;
  15812. gLight[0].GetComponent<Renderer>().enabled = false;
  15813. gLight[0].SetActive(false);
  15814. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15815. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15816. mLight[0].obj = gLight[0];
  15817. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15818. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15819. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15820. mLight[0].ido = 1;
  15821. mLight[0].isScale = false;
  15822. }
  15823. if (gLight[i] != null)
  15824. {
  15825. if (!isCube4)
  15826. {
  15827. gLight[i].GetComponent<Renderer>().enabled = false;
  15828. gLight[i].SetActive(false);
  15829. }
  15830. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15831. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15832. {
  15833. if (ikMode2 > 0 && ikMode2 != 15)
  15834. {
  15835. gLight[i].GetComponent<Renderer>().enabled = true;
  15836. gLight[i].SetActive(true);
  15837. }
  15838. else
  15839. {
  15840. gLight[i].GetComponent<Renderer>().enabled = false;
  15841. gLight[i].SetActive(false);
  15842. mLight[i].isAlt = false;
  15843. }
  15844. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15845. {
  15846. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15847. if (mLight[i].isAlt)
  15848. {
  15849. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15850. }
  15851. }
  15852. if (ikMode2 == 9 || ikMode2 == 14)
  15853. {
  15854. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15855. mLight[i].Update();
  15856. }
  15857. if (ikMode2 == 13)
  15858. {
  15859. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15860. mLight[i].Update();
  15861. }
  15862. if (ikMode2 == 13)
  15863. {
  15864. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15865. {
  15866. mLight[i].ido = 15;
  15867. mLight[i].reset = true;
  15868. }
  15869. else
  15870. {
  15871. if (lightList[i].transform.localScale.x == 1f)
  15872. {
  15873. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15874. }
  15875. lightRange[i] = lightList[i].transform.localScale.x;
  15876. gLight[i].transform.position = lightList[i].transform.position;
  15877. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15878. mLight[i].maid = lightList[i];
  15879. mLight[i].ido = 15;
  15880. }
  15881. }
  15882. else if (ikMode2 == 11)
  15883. {
  15884. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15885. {
  15886. mLight[i].ido = 3;
  15887. mLight[i].reset = true;
  15888. }
  15889. else
  15890. {
  15891. gLight[i].transform.position = lightList[i].transform.position;
  15892. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15893. lightX[i] = gLight[i].transform.eulerAngles.x;
  15894. lightY[i] = gLight[i].transform.eulerAngles.y;
  15895. mLight[i].maid = lightList[i];
  15896. mLight[i].ido = 3;
  15897. }
  15898. }
  15899. else if (ikMode2 == 12)
  15900. {
  15901. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15902. {
  15903. mLight[i].ido = 2;
  15904. mLight[i].reset = true;
  15905. }
  15906. else
  15907. {
  15908. gLight[i].transform.position = lightList[i].transform.position;
  15909. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15910. mLight[i].maid = lightList[i];
  15911. mLight[i].ido = 2;
  15912. }
  15913. }
  15914. else if (ikMode2 == 10)
  15915. {
  15916. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15917. {
  15918. mLight[i].ido = 1;
  15919. mLight[i].reset = true;
  15920. }
  15921. else
  15922. {
  15923. gLight[i].transform.position = lightList[i].transform.position;
  15924. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15925. mLight[i].maid = lightList[i];
  15926. mLight[i].maidArray = lightList.ToArray();
  15927. mLight[i].mArray = mLight.ToArray();
  15928. mLight[i].ido = 1;
  15929. }
  15930. }
  15931. else if (ikMode2 == 9)
  15932. {
  15933. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15934. {
  15935. mLight[i].ido = 4;
  15936. mLight[i].reset = true;
  15937. }
  15938. else
  15939. {
  15940. gLight[i].transform.position = lightList[i].transform.position;
  15941. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15942. lightX[i] = gLight[i].transform.eulerAngles.x;
  15943. lightY[i] = gLight[i].transform.eulerAngles.y;
  15944. mLight[i].maid = lightList[i];
  15945. mLight[i].ido = 4;
  15946. }
  15947. }
  15948. else if (ikMode2 == 14)
  15949. {
  15950. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15951. {
  15952. mLight[i].ido = 6;
  15953. mLight[i].reset = true;
  15954. }
  15955. else
  15956. {
  15957. gLight[i].transform.position = lightList[i].transform.position;
  15958. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15959. lightX[i] = gLight[i].transform.eulerAngles.x;
  15960. lightY[i] = gLight[i].transform.eulerAngles.y;
  15961. mLight[i].maid = lightList[i];
  15962. mLight[i].ido = 6;
  15963. }
  15964. }
  15965. }
  15966. }
  15967. }
  15968. for (i = 0; i < doguBObject.Count; i++)
  15969. {
  15970. if (!isCube2)
  15971. {
  15972. gDogu[i].GetComponent<Renderer>().enabled = false;
  15973. gDogu[i].SetActive(false);
  15974. }
  15975. else
  15976. {
  15977. if (ikMode2 > 0)
  15978. {
  15979. gDogu[i].GetComponent<Renderer>().enabled = true;
  15980. gDogu[i].SetActive(true);
  15981. }
  15982. else
  15983. {
  15984. gDogu[i].GetComponent<Renderer>().enabled = false;
  15985. gDogu[i].SetActive(false);
  15986. mDogu[i].isAlt = false;
  15987. }
  15988. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15989. {
  15990. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15991. if (mDogu[i].isAlt)
  15992. {
  15993. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15994. }
  15995. }
  15996. if (ikMode2 == 9 || ikMode2 == 14)
  15997. {
  15998. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15999. mDogu[i].Update();
  16000. }
  16001. if (ikMode2 == 15)
  16002. {
  16003. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16004. }
  16005. if (ikMode2 == 13)
  16006. {
  16007. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16008. mDogu[i].Update();
  16009. }
  16010. if (ikMode2 == 13)
  16011. {
  16012. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16013. {
  16014. mDogu[i].ido = 5;
  16015. mDogu[i].reset = true;
  16016. }
  16017. else
  16018. {
  16019. gDogu[i].transform.position = doguBObject[i].transform.position;
  16020. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16021. mDogu[i].maid = doguBObject[i];
  16022. mDogu[i].ido = 5;
  16023. }
  16024. }
  16025. else if (ikMode2 == 11)
  16026. {
  16027. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16028. {
  16029. mDogu[i].ido = 3;
  16030. mDogu[i].reset = true;
  16031. }
  16032. else
  16033. {
  16034. gDogu[i].transform.position = doguBObject[i].transform.position;
  16035. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16036. mDogu[i].maid = doguBObject[i];
  16037. mDogu[i].ido = 3;
  16038. }
  16039. }
  16040. else if (ikMode2 == 12)
  16041. {
  16042. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16043. {
  16044. mDogu[i].ido = 2;
  16045. mDogu[i].reset = true;
  16046. }
  16047. else
  16048. {
  16049. gDogu[i].transform.position = doguBObject[i].transform.position;
  16050. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16051. mDogu[i].maid = doguBObject[i];
  16052. mDogu[i].ido = 2;
  16053. }
  16054. }
  16055. else if (ikMode2 == 10)
  16056. {
  16057. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16058. {
  16059. mDogu[i].ido = 1;
  16060. mDogu[i].reset = true;
  16061. }
  16062. else
  16063. {
  16064. gDogu[i].transform.position = doguBObject[i].transform.position;
  16065. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16066. mDogu[i].maid = doguBObject[i];
  16067. mDogu[i].maidArray = doguBObject.ToArray();
  16068. mDogu[i].mArray = mDogu.ToArray();
  16069. mDogu[i].ido = 1;
  16070. }
  16071. }
  16072. else if (ikMode2 == 9)
  16073. {
  16074. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16075. {
  16076. mDogu[i].ido = 4;
  16077. mDogu[i].reset = true;
  16078. }
  16079. else
  16080. {
  16081. gDogu[i].transform.position = doguBObject[i].transform.position;
  16082. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16083. mDogu[i].maid = doguBObject[i];
  16084. mDogu[i].ido = 4;
  16085. }
  16086. }
  16087. else if (ikMode2 == 14)
  16088. {
  16089. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16090. {
  16091. mDogu[i].ido = 6;
  16092. mDogu[i].reset = true;
  16093. }
  16094. else
  16095. {
  16096. gDogu[i].transform.position = doguBObject[i].transform.position;
  16097. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16098. mDogu[i].maid = doguBObject[i];
  16099. mDogu[i].ido = 6;
  16100. }
  16101. }
  16102. else if (ikMode2 == 15)
  16103. {
  16104. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16105. {
  16106. mDogu[i].ido = 7;
  16107. mDogu[i].reset = true;
  16108. }
  16109. else
  16110. {
  16111. gDogu[i].transform.position = doguBObject[i].transform.position;
  16112. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16113. mDogu[i].maid = doguBObject[i];
  16114. mDogu[i].ido = 7;
  16115. }
  16116. }
  16117. }
  16118. }
  16119. ikModeOld2 = ikMode2;
  16120. }
  16121. if (isVR)
  16122. {
  16123. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16124. {
  16125. if (!isVR2)
  16126. {
  16127. isVR2 = true;
  16128. Preferences["config"]["shift_f8"].Value = "true";
  16129. SaveConfig();
  16130. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16131. }
  16132. else
  16133. {
  16134. isVR2 = false;
  16135. Preferences["config"]["shift_f8"].Value = "false";
  16136. SaveConfig();
  16137. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16138. }
  16139. }
  16140. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16141. {
  16142. loadScene = 1;
  16143. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16144. }
  16145. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16146. {
  16147. loadScene = 2;
  16148. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16149. }
  16150. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16151. {
  16152. loadScene = 3;
  16153. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16154. }
  16155. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16156. {
  16157. loadScene = 4;
  16158. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16159. }
  16160. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16161. {
  16162. loadScene = 5;
  16163. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16164. }
  16165. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16166. {
  16167. loadScene = 6;
  16168. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16169. }
  16170. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16171. {
  16172. loadScene = 7;
  16173. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16174. }
  16175. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16176. {
  16177. loadScene = 8;
  16178. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16179. }
  16180. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16181. {
  16182. loadScene = 9;
  16183. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16184. }
  16185. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16186. {
  16187. loadScene = 10;
  16188. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16189. }
  16190. for (int j = 0; j < 7; j++)
  16191. {
  16192. if (!maidArray[j])
  16193. {
  16194. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16195. }
  16196. }
  16197. }
  16198. }
  16199. }
  16200. }
  16201. }